Incompatible Lisp Changes in Emacs 27.1

7 Incompatible Lisp Changes in Emacs 27.1

7.1 Incomplete destructive splicing support has been removed.

Support for Common Lisp style destructive splicing (",.") was incomplete and broken for a long time. It has now been removed.

This means that backquote substitution now works for identifiers starting with a period ("."). Consider the following example:

(let ((.foo 42)) `,.foo)

In the past, this would have incorrectly evaluated to '(\,\. foo)', but will now instead evaluate to 42.

7.2 The REGEXP in magic-mode-alist is now matched case-sensitively.

Likewise for magic-fallback-mode-alist.

7.3 add-hook does not always add to the front or the end any more.

The replacement of append with depth implies that the function is not always added to the very front (when append/depth is nil) or the very end (when append/depth is t) any more because other functions on the hook may have specified higher/lower depths. This makes it possible to control the ordering of functions more precisely, as was already possible in add-function and advice-add.

7.4 In compilation-error-regexp-alist the old undocumented feature

where line could be a function of 2 arguments has been dropped.

7.5 define-fringe-bitmap is always defined, even when Emacs is built

without any GUI support.

7.6 Just loading a theme's file no longer activates the theme's settings.

Loading a theme with 'M-x load-theme' still activates the theme, as it did before. However, loading the theme's file with 'M-x load-file', or using require or load in a Lisp program, doesn't actually apply the theme's settings until you either invoke 'M-x enable-theme' or type 'M-x load-theme'. (In a Lisp program, calling enable-theme or invoking load-theme with NO-ENABLE argument omitted or nil has the same effect of activating a theme whose file has been loaded.) The special case of the user theme is an exception: it is frequently used for ad-hoc customizations, so the settings of that theme are by default applied immediately.

The variable 'custom–inhibit-theme-enable' controls this behavior; its default value changed in Emacs 27.1.

7.7 The REPETITIONS argument of benchmark-run can now also be a variable.

7.8 Interpretation of relative HOME directory has changed.

If $HOME is set to a relative file name, expand-file-name now interprets it relative to the directory where Emacs was started, not relative to the default-directory of the current buffer. We recommend always setting $HOME to an absolute file name, so that its meaning is independent of where Emacs was started.

7.9 file-name-absolute-p no longer considers ~foo to be an absolute

file name if there is no user named "foo".

7.10 The FILENAME argument to file-name-base is now mandatory and no

longer defaults to buffer-file-name.

7.11 File metadata primitives now signal an error if I/O, access, or

other serious errors prevent them from determining the result. Formerly, these functions often (though not always) silently returned nil. For example, if there is an access error, I/O error or low-level integer overflow when getting the attributes of a file F, '(file-attributes F)' now signals an error instead of returning nil. These functions still behave as before if the only problem is that the file does not exist. The affected primitives are directory-files-and-attributes, file-acl, file-attributes, file-modes, file-newer-than-file-p, file-selinux-context, file-system-info, and set-visited-file-modtime.

7.12 The function eldoc-message now accepts a single argument.

Programs that called it with multiple arguments before should pass them through format first. Even that is discouraged: for ElDoc support, you should set eldoc-documentation-function instead of calling eldoc-message directly.

7.13 Old-style backquotes now generate an error.

They have been generating warnings for a decade. To interpret old-style backquotes as new-style, bind the new variable force-new-style-backquotes to t.

7.14 Defining a Common Lisp structure using cl-defstruct or

cl-struct-define whose name clashes with a builtin type (e.g., integer or hash-table) now signals an error.

7.15 When formatting a floating-point number as an octal or hexadecimal

integer, Emacs now signals an error if the number is too large for the implementation to format.

7.16 logb now returns infinity when given an infinite or zero argument,

and returns a NaN when given a NaN. Formerly, it returned an extreme fixnum for such arguments.

7.17 Some functions and variables obsolete since Emacs 22 have been removed:

archive-mouse-extract, assoc-ignore-case, assoc-ignore-representation, backward-text-line, blink-cursor, bookmark-exit-hooks, c-opt-op-identitier-prefix, comint-use-prompt-regexp-instead-of-fields, compilation-finish-function, count-text-lines, cperl-vc-header-alist, custom-face-save-command, cvs-display-full-path, 'cvs-fileinfo->full-path', delete-frame-hook, derived-mode-class, describe-char-after, describe-project, desktop-basefilename, desktop-buffer-handlers, desktop-buffer-misc-functions, desktop-buffer-modes-to-save, desktop-enable, desktop-load-default, dired-omit-files-p, disabled-command-hook, dungeon-mode-map, electric-nroff-mode, electric-nroff-newline, electric-perl-terminator, executing-macro, focus-frame, forward-text-line, generic-define-mswindows-modes, generic-define-unix-modes, generic-font-lock-defaults, goto-address-at-mouse, highlight-changes-colours, ibuffer-elide-long-columns, ibuffer-hooks, ibuffer-mode-hooks, icalendar-convert-diary-to-ical, icalendar-extract-ical-from-buffer, imenu-always-use-completion-buffer-p, ipconfig-program, ipconfig-program-options, isearch-lazy-highlight-cleanup, isearch-lazy-highlight-initial-delay, isearch-lazy-highlight-interval, isearch-lazy-highlight-max-at-a-time, iswitchb-use-fonts, latin1-char-displayable-p, mouse-wheel-click-button, mouse-wheel-down-button, mouse-wheel-up-button, new-frame, pascal-outline, process-kill-without-query, recentf-menu-append-commands-p, rmail-pop-password, rmail-pop-password-required, savehist-load, set-default-font, spam-list-of-processors, speedbar-add-ignored-path-regexp, speedbar-buffers-line-path, speedbar-ignored-path-expressions, speedbar-ignored-path-regexp, speedbar-line-path, speedbar-path-line, timer-set-time-with-usecs, tooltip-gud-display, tooltip-gud-modes, tooltip-gud-toggle-dereference, unfocus-frame, unload-hook-features-list, update-autoloads-from-directories, vc-comment-ring, vc-comment-ring-index, vc-comment-search-forward, vc-comment-search-reverse, vc-comment-to-change-log, vc-diff-switches-list, vc-next-comment, vc-previous-comment, view-todo, x-lost-selection-hooks, x-sent-selection-hooks.

7.18 Further functions and variables obsolete since Emacs 24 have been removed:

default-directory-alist, dired-default-directory, dired-default-directory-alist, dired-enable-local-variables, dired-hack-local-variables, dired-local-variables-file, dired-omit-here-always.

7.19 Garbage collection no longer treats miscellaneous objects specially;

they are now allocated like any other pseudovector. As a result, the garbage-collect and memory-use-count functions no longer return a misc component, and the misc-objects-consed variable has been removed.

7.20 Reversed character ranges are no longer permitted in rx.

Previously, ranges where the starting character is greater than the ending character were silently omitted. For example, '(rx (any "@z-a" (?9 . ?0)))' would match '@' only. Now, such rx expressions generate an error.

7.21 Internal rx functions and variables have been removed,

as a consequence of an improved implementation. Packages using these should use the public rx and rx-to-string instead. rx-constituents is still available for compatibility, but the new extension mechanism is preferred: rx-define, rx-let and rx-let-eval.

7.22 text-mode no longer sets the value of indent-line-function.

The global value of indent-line-function, which defaults to indent-relative, will no longer be reset locally when turning on text-mode.

To get back the old behavior, add a function to text-mode-hook which performs '(setq-local indent-line-function #'indent-relative)'.

7.23 make-process no longer accepts a non-nil ':stop' key. This has

never worked reliably, and now causes an error.

7.24 eventp no longer returns non-nil for lists whose car is nil.

This is consistent with the fact that nil, though a symbol, is not a valid event type.

7.25 The obsolete package xesam.el (since Emacs 24) has been removed.

7.26 The XBM image handler now accepts a ':stride' argument, which should

be specified in image specs representing the entire bitmap as a single bool vector.

7.27 regexp-quote may return its argument string.

If the argument needs no quoting, it can be returned instead of a copy.

7.28 Mouse scroll up and down with control key modifier changes font size.

Previously, the control key modifier was used to scroll up or down by an amount which was close to near a full screen. This is now instead available by scrolling with the meta modifier key.

To get the old behavior back, customize the user option mouse-wheel-scroll-amount, or add the following to your init file:

(customize-set-variable 'mouse-wheel-scroll-amount '(5 ((shift) . 1) ((control) . nil)))

By default, the font size will be changed in the window that the mouse pointer is over. To change this behavior, you can customize the user option mouse-wheel-follow-mouse. Note that this will also affect scrolling.

7.29 Mouse scroll up and down with control key modifier also works on images

where it scales the image under the mouse pointer.

7.30 help-follow-symbol now signals user-error if point (or the

position pointed to by the argument POS) is not in a symbol.

7.31 The options.el library has been removed.

It was obsolete since Emacs 22.1, replaced by customize.

7.32 The tls.el and starttls.el libraries are now marked obsolete.

Use of built-in libgnutls based functionality (described in the Emacs GnuTLS manual) is recommended instead.

7.33 The url-ns.el library is now marked obsolete.

This library is used to open configuration files for the long defunct web browser Netscape, and is no longer relevant.