diff options
| author | João Távora <joaotavora@gmail.com> | 2020-04-18 12:39:57 +0100 |
|---|---|---|
| committer | João Távora <joaotavora@gmail.com> | 2020-04-18 12:39:57 +0100 |
| commit | b527e986d00d4e816f817d0d9b1e9021ac69691e (patch) | |
| tree | bcda8ba27703c3dff4dfa4b6368e5db46de9f74b | |
| parent | 035137bc92ec4b3ceab43409d4b8ea0deb975459 (diff) | |
| download | emacs-b527e986d00d4e816f817d0d9b1e9021ac69691e.tar.gz | |
Make lisp-mode-variables function less backward-incompatible
A small number of third-party packages rely on its arguments. They
shouldn't be seriously affected.
* doc/lispref/modes.texi (Example Major Modes): Make example
closer to reality.
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables): Ignore any
number of arguments.
| -rw-r--r-- | doc/lispref/modes.texi | 10 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 5 |
2 files changed, 8 insertions, 7 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index fc68ee1b322..df7458c3fbc 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -1356,9 +1356,9 @@ each calls the following function to set various variables: @smallexample @group -(defun lisp-mode-variables (&optional syntax keywords-case-insensitive elisp) - (when syntax - (set-syntax-table lisp-mode-syntax-table)) +(defun lisp-mode-variables () + "Common initialization routine for lisp modes." + (setq-local paragraph-ignore-fill-prefix t) @dots{} @end group @end smallexample @@ -1414,7 +1414,7 @@ Finally, here is the major mode command for Lisp mode: @smallexample @group -(define-derived-mode lisp-mode prog-mode "Lisp" +(define-derived-mode lisp-mode lisp-data-mode "Lisp" "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp. Commands: Delete converts tabs to spaces as it moves back. @@ -1425,7 +1425,7 @@ Note that `run-lisp' may be used either to start an inferior Lisp job or to switch back to an existing one." @end group @group - (lisp-mode-variables nil t) + (lisp-mode-variables) (setq-local find-tag-default-function 'lisp-find-tag-default) (setq-local comment-start-skip "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 8f7e6c0431b..18f35b69b34 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -611,8 +611,9 @@ Value for `adaptive-fill-function'." ;; a single docstring. Let's fix it here. (if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") "")) -(defun lisp-mode-variables () - "Common initialization routine for lisp modes." +(defun lisp-mode-variables (&rest ignored) + "Common initialization routine for lisp modes. +Any number of parameters is accepted and ignored." (setq-local paragraph-ignore-fill-prefix t) (setq-local fill-paragraph-function 'lisp-fill-paragraph) (setq-local adaptive-fill-function #'lisp-adaptive-fill) |
