From 0c9da50e96108589c1cac5e25a3627c25a484bc9 Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Wed, 22 Jan 2020 14:18:17 +0100 Subject: [PATCH] Default lisp-mode to use Common Lisp indentation * lisp/emacs-lisp/lisp-mode.el (lisp-mode): Use common-lisp-indent-function instead of lisp-indent-function as Common Lisp is the most common non-Emacs Lisp today (bug#10097). --- etc/NEWS | 5 +++++ lisp/emacs-lisp/lisp-mode.el | 1 + 2 files changed, 6 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 3147cf48faa..a2919d8e5e2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -72,6 +72,11 @@ line numbers that were previously jumped to. ** The sb-image.el library is now marked obsolete. This file was a compatibility kludge which is no longer needed. +--- +** 'lisp-mode' now uses 'common-lisp-indent-function'. +To revert to the previous behaviour, +(setq lisp-indent-function 'lisp-indent-function) from 'lisp-mode-hook'. + ** Edebug +++ diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index fbbd389bf96..f66122d6d72 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -747,6 +747,7 @@ Blank lines separate paragraphs. Semicolons start comments. Note that `run-lisp' may be used either to start an inferior Lisp job or to switch back to an existing one." (lisp-mode-variables nil t) + (setq-local lisp-indent-function 'common-lisp-indent-function) (setq-local find-tag-default-function 'lisp-find-tag-default) (setq-local comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") -- 2.39.2