Emacs uses the GNU Multiple Precision (GMP) library to support
integers whose size is too large to support natively. The integers
supported natively are known as "fixnums", while the larger ones are
"bignums". The new predicates
fixnump can be used to
distinguish between these two types of integers.
All the arithmetic, comparison, and logical (a.k.a. "bitwise")
operations where bignums make sense now support both fixnums and
bignums. However, note that unlike fixnums, bignums will not compare
eq, you must use
eql instead. (Numerical comparison
with '=' works on both, of course.)
Since large bignums consume a lot of memory, Emacs limits the size of the largest bignum a Lisp program is allowed to create. The nonnegative value of the new variable integer-width specifies the maximum number of bits allowed in a bignum. Emacs signals an integer overflow error if this limit is exceeded.
Several primitive functions formerly returned floats or lists of
integers to represent integers that did not fit into fixnums. These
functions now simply return integers instead. Affected functions
include functions like
encode-char that compute code-points, functions
file-attributes that compute file sizes and other attributes,
process-id that compute process IDs, and functions like
group-gid that compute user and group IDs.
overflow-erroris now documented as a subcategory of
Formerly it was undocumented, and was (incorrectly) a subcategory
time-convertconverts Lisp time values to Lisp
timestamps of various forms, including a new timestamp form '(TICKS . HZ)' where TICKS is an integer and HZ a positive integer denoting a clock frequency.
it is planned to change in a future Emacs version, to exploit bignums.
The documentation has been updated to mention that the timestamp
format may change and that programs should use functions like
time-convert rather than
probing the innards of a timestamp directly, or creating a timestamp
decode-time, which generates these timestamps, as well
as functions like
encode-time that accept them. The subsecond info
is present as a '(TICKS . HZ)' value in the seconds element of a
decoded timestamp, and
decode-time has a new optional FORM argument
specifying the form of the seconds member. For example, if X is the
timestamp '(1566009571321878186 . 1000000000)', which represents
"2019-08-17 02:39:31.321878186 UTC", '(decode-time X t t)' returns
'((31321878186 . 1000000000) 39 2 17 8 2019 6 nil 0)' instead of the
traditional '(31 39 2 17 8 2019 6 nil 0)' returned by plain
'(decode-time X t)'. Although the default FORM is currently
integer, which truncates the seconds to an integer and is the
traditional behavior, this default may change in future Emacs
versions, so callers requiring an integer should specify FORM
encode-timesupports a new API '(encode-time TIME)'.
encode-time API is still supported.
intervals has been added. The main function to use is
iso8601-parse, but there's also
iso8601-parse-interval. All these functions return decoded time
structures, except the final one, which returns three of them (start,
end and duration).
infinities and NaNs too, and propagate them or return nil like floating-point operators do. If both arguments are finite, these functions now return exact results instead of rounding in some cases, and they also avoid excess precision when that is easy.
time-equal-pcompares time values for equality.
format-time-stringsupports a new conversion specifier flag '+'
that acts like the
0 flag but also puts a '+' before nonnegative
years containing more than four digits. This is for compatibility
accessors can be used.
date-days-in-month(which will say how many
days there are in a month in a specific year),
(that computes the date of an ordinal day),
doing computations on a decoded time structure),
(for making a decoded time structure with only the given keywords
filled out), and
encoded-time-set-defaults (which fills in nil
elements as if it's midnight January 1st, 1970) have been added.
parse-time-stringnow return -1
if it is not known whether daylight saving time is in effect.
Formerly they were inconsistent:
encode-time returned t in this
parse-time-string returned nil. Now they
consistently use nil to mean that DST is not in effect, and use -1
to mean that it is not known whether DST is in effect.
This macro works like
progn, but messages how long it takes to
evaluate the body forms. The value of the last form is the return
This function works like
read-char, but uses
to read a character, so it maintains a history that can be navigated
via usual minibuffer keystrokes
can be used to specify functions to show and clear messages that normally are displayed in the echo area.
setq-localcan now set an arbitrary number of variables, which
makes the syntax more like
reveal-modecan now also be used for more than to toggle between
invisible and visible: It can also toggle
display properties in
overlays. This is only done on
display properties that have the
reveal-toggle-invisible property set.
process-contactnow takes an optional NO-BLOCK argument to allow
not waiting for a process to be set up.
This variable determines how many bytes can be read from a sub-process in one read operation. The default, 4096 bytes, was previously a hard-coded constant. Setting it to a larger value might enhance throughput of reading from sub-processes that produces vast (megabytes) amounts of data in one go.
vhdl-project-auto-load, as well as the
vhdl-auto-load-project have been renamed to have "autoload"
without the hyphen in their names. Obsolete aliases from the old
names have been added.
make-buttonand related functions) can
now use the
button-data property. If present, the data in this
property will be passed on to the
action function instead of the
button itself in
defcustomnow takes a ':local' keyword that can be either t or
permanent, which mean that the variable should be automatically
permanent also sets the variable's
with-suppressed-warningscan be used to suppress
specific byte-compile warnings.
ignore-errors, but takes a
specific error condition, and will only ignore that condition. (This can also be a list of conditions.)
byte-compile-info-messagecan be used to output
informational messages that look pleasing during the Emacs build.
It makes it possible to add metadata information to
ngettextcan be used now to return the right plural form
according to the given numeric value.
self-insert-commandtakes the char to insert as (optional) argument.
lookup-keycan take a list of keymaps as argument.
condition-casenow accepts t to match any error symbol.
Given a proper list as argument, this predicate returns its length;
otherwise, it returns nil.
format-proper-list-p is now an obsolete
alias for the new function.
define-minor-modeautomatically documents the meaning of ARG.
recenternow accepts an additional optional argument.
By default, calling
recenter will not redraw the frame even if
recenter-redisplay is non-nil. Call
recenter with the new second
argument non-nil to force redisplay per recenter-redisplays value.
Use them when switching temporarily to another major mode, e.g. for
hexl-mode, or to switch between
image-mode in XPM.
This works like
dolist, but reports progress similar to
This works like delete-frame-functions, but runs after the frame to be deleted has been made dead and removed from the frame list.
provided-mode-derived-pwas extended to support aliases.
The function now returns non-nil when the argument MODE is derived from any alias of any of MODES.
The hooks focus-in-hook and focus-out-hook are now obsolete.
Instead, attach to after-focus-change-function using
and inspect the focus state of each frame using
On terminal emulators that support the feature, Emacs can now support focus-in-hook and focus-out-hook for TTY frames.
Face specifications (of the kind used in face-remapping-alist) now support filters, allowing faces to vary between different windows displaying the same buffer. See the node "(elisp) Face Remapping" of the Emacs Lisp Reference manual for more detail.
Hooks reacting to window changes run now only when redisplay detects
that a change has actually occurred. Six hooks are now provided:
window-buffer-change-functions (run after window buffers have
changed), window-size-change-functions (run after a window was
assigned a new buffer or size), window-configuration-change-hook
(like the former but run also when a window was deleted),
window-selection-change-functions (run when the selected window
changed) and window-state-change-functions and
window-state-change-hook (run when any of the preceding ones is
run). Applications can enforce running the latter two using the new
are unaffected by these changes.
In addition, a number of functions now allow the caller to detect what
has changed since last redisplay:
window-old-buffer returns for any
window the buffer it showed at that time.
old-selected-frame return the window and frame that were selected
during last redisplay.
window-old-pixel-width (renamed from
return the total and body sizes of any window during last redisplay.
run-window-configuration-change-hook is declared obsolete.
See the section "(elisp) Window Hooks" in the Elisp manual for a detailed explanation of the new behavior.
have a new optional argument that makes the settings they produce
reliably survive subsequent invocations of
This option allows automatically resizing minibuffer-only frames similarly to how minibuffer windows are resized on "normal" frames.
This function allows specifying the location of the window chosen by
display-buffer in various ways.
Such an entry allows specifying the dedicated status of a window
Such an entry allows specifying a minimum height of the window used
for displaying a buffer.
display-buffer-below-selected is the only
action function to respect it at the moment.
This entry is used to specify the location of the window chosen by
window entry can now also specify a reference window for
assoc-delete-allnow takes an optional predicate argument.
string-distanceto calculate the Levenshtein distance
between two strings.
'(quote x)' instead of 'x you will have to bind it to nil where applicable.
This avoids problems in calls like '(read (format "#x%x" -1))', and is more compatible with bignums. To get the traditional machine-dependent behavior, set the experimental variable binary-as-unsigned to t, and if the new behavior breaks your code please email <email@example.com>. Because '%o' and '%x' can now format signed integers, they now support the '+' and space flags.
For example, the first character in '‘foo' would be highlighted in font-lock-warning-face.
For example '(defun foo (&optional))' is no longer an error. This is sometimes convenient when writing macros. See the ChangeLog entry titled "Allow '&rest' or '&optional' without following variable (Bug#29165)" for a full listing of which arglists are accepted across versions.
open-paren-in-column-0-is-defun-start. This affects mostly things like
forward-sexp when parsing backward.
The new variable comment-use-syntax-ppss can be set to nil to recover
the old behavior if needed.
This also means that there is no longer any need to precede opening
brackets at the start of a line inside documentation strings with a
backslash, although there is no harm in doing so to make the code
easier to edit with an older Emacs version.
The new accessor functions
two-character-syntax can be used on the list value returned by
socket has been passed to Emacs.
file-system-infofunction is now available on all platforms.
instead of just Microsoft platforms. This fixes a
bug on OS X 10.8 and later.
get-free-disk-spacereturns now a non-nil value for
remote systems, which support this check.
memory-limitnow returns a better estimate of memory consumption.
heap size more often and (we hope) more accurately. E.g., formerly '(progn (let ((gc-cons-percentage 0.8)) BODY1) BODY2)' continued to use the 0.8 value during BODY2 until the next garbage collection, but that is no longer true. Applications may need to re-tune their GC tricks.
combine-change-callsarranges to call the change hooks
(before-change-functions and after-change-functions) just once each around a sequence of lisp forms, given a region. This is useful when a function makes a possibly large number of repetitive changes and the change hooks are time consuming.
make-hash-table, etc. now treat NaNs consistently.
Formerly, some of these functions ignored signs and significands of NaNs. Now, all these functions treat NaN signs and significands as significant. For example, '(eql 0.0e+NaN -0.0e+NaN)' now returns nil because the two NaNs have different signs; formerly it returned t. Also, Emacs now reads and prints NaN significands; e.g., if X is a NaN, '(format "%s" X)' now returns "0.0e+NaN", "1.0e+NaN", etc., depending on X's significand.
make-stringaccepts an additional optional argument.
If the optional third argument is non-nil,
make-string will produce
a multibyte string even if its second argument is an ASCII character.
does not fit in a machine integer.
This is the International EBCDIC encoding, also available as aliases
are implemented in C using the Jansson library.
ring-resize can be used to grow or shrink a ring.
flatten-list is provided as an alias. These functions take a tree
flatten it such that the result is a list of all the terminal
zlib-decompress-regioncan partially decompress corrupted data.
If the new optional ALLOW-PARTIAL argument is passed, then the data that was decompressed successfully before failing will be inserted into the buffer.
An Exif library has been added that can parse JPEG files and output
data about creation times and orientation and the like.
exif-parse-buffer are the main interface
image-modenow uses this library to automatically rotate images
according to the orientation in the Exif data, if any.
image-rotatenow accepts a prefix argument.
With a prefix argument,
image-rotate now rotates the image at point
90 degrees counter-clockwise, instead of the default clockwise.
image-modethe image is resized automatically to fit in window.
By default, the image will resize upon first display and whenever the
window's dimensions change. Two user options
image-auto-resize-on-window-resize control the resizing behavior
(including the possibility to disable auto-resizing). A new prefix
s contains the commands that can be used to fit the image to the
image-modevariables are now buffer-local.
The image parameters
image-transform-resize are now declared
buffer-local, so each buffer could have its own values for these
image-modecommands have been added:
m, which marks
the file in the dired buffer(s) for the directory the file is in;
which unmarks the file; and
w, which pushes the current buffer's file
name to the kill ring.
If you need to view exotic image formats for which Emacs doesn't have
native support, customize the new user option
image-use-external-converter to t. If your system has
GraphicsMagick, ImageMagick or
ffmpeg installed, they will then be
used to convert images automatically before displaying them.
supported by the external image converters, like WEPB, BMP and ICO.
These now default to using
image-mode started using ImageMagick by default for all images
some years back. It now respects imagemagick-types-inhibit as a way
to disable that.
loadnow behaves correctly when loading modules.
Specifically, it puts the module name into load-history, prints loading messages if requested, and protects against recursive loads.
process_inputto process user
input while module code is running.
convert between timespec structures and Emacs Lisp time values.
extract_big_integer to create and extract arbitrary-size integer
to the major version of the latest Emacs supported by the header.
read-variablenow uses its own history list.
The history of variable names read by
read-variable is recorded in
the new variable custom-variable-history.
longer declared obsolete. We have found that there are legitimate use cases for these functions, where there's no better alternative. We believe that the incorrect uses of these functions all but disappeared by now, so we are un-obsoleting them.
group-namereturns a group name corresponding to GID.
make-processnow takes a keyword argument ':file-handler'; if
that is non-nil, it will look for a file name handler for the current
buffer's default-directory and invoke that file name handler to make
the process. That way
make-process can start remote processes.
This is currently supported on GNUish hosts and on modern versions of MS-Windows.
regexp-opt, when given an empty list of strings, now
returns a regexp that never matches anything, which is an identity for this operation. Previously, the empty string was returned in this case.
It is a convenient and readable way to specify a regexp that should not match anything, and is as fast as any such regexp can be.
implement the url-variant of base-64 encoding as defined in RFC4648.
accept an optional argument to decode the URL variant of base-64
file-size-human-readableaccepts more optional arguments.
The new third argument is a string put between the number and unit; it
defaults to the empty string. The new fourth argument is a string
representing the unit to use; it defaults to "B" when the second
iec and the empty string otherwise. We recommend a
space or non-breaking space as third argument, and "B" as fourth
argument, circumstances allowing.
format-spechas been expanded with several modifiers to allow
greater flexibility when customizing variables. The modifiers include zero-padding, upper- and lower-casing, and limiting the length of the interpolated strings. The function has now also been documented in the Emacs Lisp manual.
directory-files-recursivelycan now take an optional PREDICATE
parameter to control descending into subdirectories, and a FOLLOW-SYMLINK parameter to say that symbolic links that point to other directories should be followed.
xorreturns the boolean exclusive-or of its args.
The function was previously defined in array.el, but has been moved to
subr.el so that it is available by default. It now always returns the
non-nil argument when the other is nil. Several duplicates of
in other packages are now obsolete aliases of
define-globalized-minor-modenow takes BODY forms.
Setting this on the first character of a help string disables
Setting this on a character of the minibuffer text will display the temporary echo messages before that character, when messages need to be displayed while minibuffer is active.
undocan be made to ignore the active region for a command
undo-inhibit-region symbol property of that command to
non-nil. This is used by
mouse-drag-region to make the effect
easier to undo immediately afterwards.
user-error if there is no buffer to switch to.