Being an official GNU project it adheres closely to the GNU coding standards and directory layout. That said, if you are exploring the source tree I would start, as with most projects, with the README file in the root directory.
From that file onwards, there are several sub-directories:
`src' holds the C code for Emacs (the Emacs Lisp interpreter and
All information you need is included in C-h f add-function which
describes the underlying mechanism of advice-add.
The new advice system basically acts like replacing the current
definition of a function by the function described in the table in
C-h f add-function, depending on your choice of the WHERE
argument, only cleaner for the sake of tracking what ...
Thanks to @lunaryorn's suggestions I've been able to locate the piece of code causing this. It looks like format-mode-line eventually calls decode_mode_spec to turn the format codes given into values. For the case of %l this function does a few sanity checks to avoid spending too much time calculating, then checks whether the current line is exceeding line-...
If you have the Emacs source code installed, you can find the source code for sort with M-x find-function.
There you can see that sort performs a merge sort. It checks the length of the list, breaks the list into half, sorts the "front" and the "back" parts separately through recursion, and then merges the two.
As for whether your implementation would be ...
I'm afraid this is not straightforward to do considering F1 v create-lockfiles takes you to filelock.c which only exposes this variable and temporary-file-directory. So, to have this behaviour you'd either need to replace nearly all functions exposed in that file with your own Emacs Lisp functions or hand in a bug via M-x report-emacs-bug and hope for the ...
You can try setting kill-emacs-hook to nil before calling kill-emacs:
(defun really-kill-emacs ()
"Like `kill-emacs', but ignores `kill-emacs-hook'."
Alternatively, you can get Emacs's PID using emacs-pid and make it commit suicide by calling call-process with "kill -9":
There is at least one documented difference: apparently, there is a bug causing a crash of gtk+ emacs daemon, but not lucid emacs.
If you start emacs as a daemon, you will see the following warning:
Warning: due to a long standing Gtk+ bug
http://bugzilla.gnome.org/show_bug.cgi?id=85715 Emacs might crash when
run in daemon mode and the X11 ...
It does sound like this was caused by the user who originally built the binary for you. If they didn't do so in some sort of stripped down environment then this would happen.
You might want to report it to the maintainers of your binary package so that they can fix the problem with their build process.
If you provide information about what platform you are ...
Does that mean that on every call of adjust-fill-column varref and varset do hash lookup?
No. In Emacs Lisp, the hashing is only done by the reader to convert the strings into symbols (this is called interning). After being read, the string names of the symbols are irrelevant because what gets evaluated is a list structure (or equivalent bytecode if you ...
(defun run-with-local-idle-timer (secs repeat function &rest args)
"Like `run-with-idle-timer', but always runs in the `current-buffer'.
Cancels itself, if this buffer was killed."
(let* (;; Chicken and egg problem.
(fns (make-symbol "local-idle-timer"))
(timer (apply 'run-with-idle-timer secs repeat fns args))
It's easy enough to set the horizontal position of the current window.
(defun hscroll-cursor-left ()
"Scroll horizontally to bring the cursor to the leftmost visible column.
Similar to Vim's `zs'."
(set-window-hscroll (selected-window) (current-column)))
(defun hscroll-cursor-right ()
"Scroll horizontally to bring the cursor to ...
Personally, I doubt the buffer implementation can be blamed for every performance problem people encounter with buffers. My specific problem with it did involve long lines that were slowing down redisplay, a known issue with a multitude of reasons behind it, including Bidi rendering, excessive movement of point crossing the problematic line and less than ...
Emacs switched from webkit1gtk to webkit2gtk so you'll need to install that instead. Your GTK package should be fine.
PS: I agree with the linked article, although I wouldn't put it this drastically. You're better off with using a dedicated browser built upon WebKit or WebEngine. If all you're after is Emacs keybindings, EXWM might be an alternative.
Is there a way of configuring the emacs build to produce an executable that does not use dump/unexec functionality?
Yes, the configure script has un-advertised support for inhibiting dumping:
env CANNOT_DUMP=yes ./configure
Of course you still have access to src/temacs after compiling Emacs normally (i.e. without using CANNOT_DUMP), and temacs is a fully-...
but what happens when by pure chance a block of memory stores a valid Elisp object even when it is not supposed to be one?
Emacs conservatively marks the stack, which means that it examines each word on the stack and considers whether it "looks like" a Lisp object. There is a comment in alloc.c that explains the general approach:
/* Conservative C stack ...
Several reasons. First, emacs has grown over time. Thousands of people have contributed, and not all of the code is of identical quality. Like all things which grow over time, the final shape was not planned out in detail from the beginning.
Second, emacs is more than a little bit influenced by image-based systems such as the Lisp Machine, Smalltalk, etc. ...
Entirely up to you, really. I don't think there is any agreed "best practice" here. Your concerns are perfectly valid, so it's certainly not unreasonable to isolate distinct use-cases as separate Emacs instances (especially if you are less-willing to restart some of them than others). If you're happy with how you can switch between them, I'd suggest you ...
I believe this is limited only by amount of available memory. I couldn't find any information about this sort of limitation in official manual, so it generally means that number of arguments an Emacs Lisp function can take is not limited on language level, otherwise it would be explicitly mentioned.
Sometimes, I end up with several unreachable emacs processes laying around. My emacsclient normally automatically starts an emacs and calls server-start--I guess there is some bug in my configuration somewhere which results in this happening more than once.
I kill the extra emacsen with killall emacs in a shell. So far, -9 hasn't been needed. (It works ...