diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-01-02 10:11:15 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-01-02 10:11:15 +0100 |
commit | 5db5064395c251a822e429e19ddecb74a974b6ef (patch) | |
tree | 2e04729a03d5fc68d0caef3a16e00349b6d413fc /lisp/emacs-lisp/easy-mmode.el | |
parent | 9420ea6e0840bffcb140d3677dfdabb9251c1f63 (diff) | |
parent | 0f561ee55348ff451600cc6027db5940ee14606f (diff) | |
download | emacs-5db5064395c251a822e429e19ddecb74a974b6ef.tar.gz emacs-5db5064395c251a822e429e19ddecb74a974b6ef.tar.bz2 emacs-5db5064395c251a822e429e19ddecb74a974b6ef.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'lisp/emacs-lisp/easy-mmode.el')
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 261f2508af7..f4dbcee4d69 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -1,6 +1,6 @@ ;;; easy-mmode.el --- easy definition for major and minor modes -*- lexical-binding: t; -*- -;; Copyright (C) 1997, 2000-2020 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2000-2021 Free Software Foundation, Inc. ;; Author: Georges Brun-Cottan <Georges.Brun-Cottan@inria.fr> ;; Maintainer: Stefan Monnier <monnier@gnu.org> @@ -278,8 +278,10 @@ For example, you could write ((not globalp) `(progn :autoload-end - (defvar ,mode ,init-value ,(format "Non-nil if %s is enabled. -Use the command `%s' to change this variable." pretty-name mode)) + (defvar ,mode ,init-value + ,(concat (format "Non-nil if %s is enabled.\n" pretty-name) + (internal--format-docstring-line + "Use the command `%s' to change this variable." mode))) (make-variable-buffer-local ',mode))) (t (let ((base-doc-string @@ -455,24 +457,23 @@ on if the hook has explicitly disabled it. (make-variable-buffer-local ',MODE-major-mode)) ;; The actual global minor-mode (define-minor-mode ,global-mode - ;; Very short lines to avoid too long lines in the generated - ;; doc string. - ,(format "Toggle %s in all buffers. -With prefix ARG, enable %s if ARG is positive; -otherwise, disable it. If called from Lisp, enable the mode if -ARG is omitted or nil. - -%s is enabled in all buffers where -`%s' would do it. - -See `%s' for more information on -%s.%s" - pretty-name pretty-global-name - pretty-name turn-on mode pretty-name + ,(concat (format "Toggle %s in all buffers.\n" pretty-name) + (internal--format-docstring-line + "With prefix ARG, enable %s if ARG is positive; otherwise, \ +disable it. If called from Lisp, enable the mode if ARG is omitted or nil.\n\n" + pretty-global-name) + (internal--format-docstring-line + "%s is enabled in all buffers where `%s' would do it.\n\n" + pretty-name turn-on) + (internal--format-docstring-line + "See `%s' for more information on %s." + mode pretty-name) (if predicate - (format "\n\n`%s' is used to control which modes -this minor mode is used in." - MODE-predicate) + (concat + "\n\n" + (internal--format-docstring-line + "`%s' is used to control which modes this minor mode is used in." + MODE-predicate)) "")) :global t ,@group ,@(nreverse extra-keywords) |