diff options
author | Michael R. Mauger <michael@mauger.com> | 2017-07-05 23:37:13 -0400 |
---|---|---|
committer | Michael R. Mauger <michael@mauger.com> | 2017-07-05 23:37:13 -0400 |
commit | 7f62a4a7440aee6aacf04036feb3384a6515e48f (patch) | |
tree | eedee2b54ffce3756f9ca3ef5a1e6e48d83472b6 /lisp/emacs-lisp | |
parent | 776635c01abd4aa759e7aa9584b513146978568c (diff) | |
parent | 7a0170de20fe1225d3eeac099d1e61a0c0410bf3 (diff) | |
download | emacs-7f62a4a7440aee6aacf04036feb3384a6515e48f.tar.gz emacs-7f62a4a7440aee6aacf04036feb3384a6515e48f.tar.bz2 emacs-7f62a4a7440aee6aacf04036feb3384a6515e48f.zip |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 59db00d5f96..985b7513a3b 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -602,6 +602,7 @@ font-lock keywords will not be case sensitive." ;;(set (make-local-variable 'adaptive-fill-mode) nil) (setq-local indent-line-function 'lisp-indent-line) (setq-local indent-region-function 'lisp-indent-region) + (setq-local comment-indent-function #'lisp-comment-indent) (setq-local outline-regexp ";;;\\(;* [^ \t\n]\\|###autoload\\)\\|(") (setq-local outline-level 'lisp-outline-level) (setq-local add-log-current-defun-function #'lisp-current-defun-name) @@ -735,9 +736,15 @@ or to switch back to an existing one." (autoload 'lisp-eval-defun "inf-lisp" nil t) -;; May still be used by some external Lisp-mode variant. -(define-obsolete-function-alias 'lisp-comment-indent - 'comment-indent-default "22.1") +(defun lisp-comment-indent () + "Like `comment-indent-default', but don't put space after open paren." + (let ((pt (point))) + (skip-syntax-backward " ") + (if (eq (preceding-char) ?\() + (cons (current-column) (current-column)) + (goto-char pt) + (comment-indent-default)))) + (define-obsolete-function-alias 'lisp-mode-auto-fill 'do-auto-fill "23.1") (defcustom lisp-indent-offset nil |