Emacs 25.1.1 Change: emacs-lisp-mode extracted from lisp-mode to elisp-mode.el

By Xah Lee. Date: .

between GNU Emacs 24.5.1 and GNU Emacs 25.1.1, new is a elisp-mode.el at ~/apps/emacs-25.1/lisp/progmodes/elisp-mode.el

it seems it's extracted from lisp-mode.el at /home/xah/apps/emacs-25.1/lisp/emacs-lisp/lisp-mode.el

no mention of this change in view-emacs-news

in emacs 24.5.1, the emacs-lisp-mode.elis 1782 lines.

in emacs 25.1.1, the elisp-mode.el is 1267 lines. emacs-lisp-mode.elis 1574 lines.

by the way, there is no command “elisp-mode”. We just have emacs-lisp-mode.

a very confusing change. The file name elisp-mode.el should be emacs-lisp-mode.el

The problem is, if in one of your lisp code, if you call elisp-completion-at-point, it'll fail if it's not emacs 25. It doesn't exist in emacs 24.

So, you have to do something like this:

;; when calling emacs's complete-symbol, follow convention. When pressing TAB, do xah way.
  (if (version< emacs-version "25.1.1")
      (progn
        (add-hook 'completion-at-point-functions 'completion-at-point nil 'local))
    (progn
      (require 'elisp-mode)
      (add-hook 'completion-at-point-functions 'elisp-completion-at-point nil 'local)))
Like it? Buy Xah Emacs Tutorial. Thanks.