Backport commit c45bfd3c4 from Emacs

* lisp/ox-beamer.el (org-beamer-mode-map): Move initialization
into declaration.
(org-beamer-mode):
* lisp/org.el (org-cdlatex-mode):
* lisp/org-table.el (org-table-header-line-mode)
(org-table-follow-field-mode, orgtbl-mode):
* lisp/org-src.el (org-src-mode):
* lisp/org-list.el (org-list-checkbox-radio-mode):
* lisp/org-indent.el (org-indent-mode):
* lisp/org-capture.el (org-capture-mode):
Avoid old-style positional args to `define-minor-mode`.

* lisp/**/*.el: Avoid positional args to `define-minor-mode`
c45bfd3c4abbfa585c9199f4866b6b8046945117
Stefan Monnier
Sun Apr 11 23:47:14 2021 -0400
This commit is contained in:
Stefan Monnier 2021-04-11 23:47:14 -04:00 committed by Kyle Meyer
parent f10773675d
commit 8c29cbdef7
7 changed files with 13 additions and 11 deletions

View File

@ -521,7 +521,7 @@ for a capture buffer.")
"Minor mode for special key bindings in a capture buffer.
Turning on this mode runs the normal hook `org-capture-mode-hook'."
nil " Cap" org-capture-mode-map
:lighter " Cap"
(setq-local
header-line-format
(substitute-command-keys

View File

@ -167,7 +167,7 @@ properties, after each buffer modification, on the modified zone.
The process is synchronous. Though, initial indentation of
buffer, which can take a few seconds on large buffers, is done
during idle time."
nil " Ind" nil
:lighter " Ind"
(cond
(org-indent-mode
;; mode was turned on.

View File

@ -2304,7 +2304,7 @@ is an integer, 0 means `-', 1 means `+' etc. If WHICH is
;;;###autoload
(define-minor-mode org-list-checkbox-radio-mode
"When turned on, use list checkboxes as radio buttons."
nil " CheckBoxRadio" nil
:lighter " CheckBoxRadio"
(unless (eq major-mode 'org-mode)
(user-error "Cannot turn this mode outside org-mode buffers")))

View File

@ -682,7 +682,7 @@ This minor mode is turned on in two situations:
\\{org-src-mode-map}
See also `org-src-mode-hook'."
nil " OrgSrc" nil
:lighter " OrgSrc"
(when org-edit-src-persistent-message
(setq header-line-format
(substitute-command-keys

View File

@ -495,7 +495,7 @@ This may be useful when columns have been shrunk."
;;;###autoload
(define-minor-mode org-table-header-line-mode
"Display the first row of the table at point in the header line."
nil " TblHeader" nil
:lighter " TblHeader"
(unless (eq major-mode 'org-mode)
(user-error "Cannot turn org table header mode outside org-mode buffers"))
(if org-table-header-line-mode
@ -1976,7 +1976,7 @@ lines."
When this mode is active, the field editor window will always show the
current field. The mode exits automatically when the cursor leaves the
table (but see `org-table-exit-follow-field-mode-when-leaving-table')."
nil " TblFollow" nil
:lighter " TblFollow"
(if org-table-follow-field-mode
(add-hook 'post-command-hook 'org-table-follow-fields-with-editor
'append 'local)
@ -5149,7 +5149,7 @@ When LOCAL is non-nil, show references for the table at point."
;;;###autoload
(define-minor-mode orgtbl-mode
"The Org mode table editor as a minor mode for use in other modes."
:lighter " OrgTbl" :keymap orgtbl-mode-map
:lighter " OrgTbl"
(org-load-modules-maybe)
(cond
((derived-mode-p 'org-mode)

View File

@ -15584,7 +15584,7 @@ When a buffer is unmodified, it is just killed. When modified, it is saved
This mode supports entering LaTeX environment and math in LaTeX fragments
in Org mode.
\\{org-cdlatex-mode-map}"
nil " OCDL" nil
:lighter " OCDL"
(when org-cdlatex-mode
(require 'cdlatex)
(run-hooks 'cdlatex-mode-hook)

View File

@ -895,14 +895,16 @@ holding export options."
;;; Minor Mode
(defvar org-beamer-mode-map (make-sparse-keymap)
(defvar org-beamer-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\C-c\C-b" 'org-beamer-select-environment)
map)
"The keymap for `org-beamer-mode'.")
(define-key org-beamer-mode-map "\C-c\C-b" 'org-beamer-select-environment)
;;;###autoload
(define-minor-mode org-beamer-mode
"Support for editing Beamer oriented Org mode files."
nil " Bm" 'org-beamer-mode-map)
:lighter " Bm")
(when (fboundp 'font-lock-add-keywords)
(font-lock-add-keywords