summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-04-11 23:47:14 -0400
committerKyle Meyer <kyle@kyleam.com>2021-04-18 02:11:35 -0400
commit8c29cbdef75fbbac30f5e45d28c7b47968f46fde (patch)
tree970dea9e5cbb3eee85aac4114dcc727ebaf8e69c
parentf10773675d2f60bd4233c11c175a6096ed1d6341 (diff)
downloadorg-mode-8c29cbdef75fbbac30f5e45d28c7b47968f46fde.tar.gz
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
-rw-r--r--lisp/org-capture.el2
-rw-r--r--lisp/org-indent.el2
-rw-r--r--lisp/org-list.el2
-rw-r--r--lisp/org-src.el2
-rw-r--r--lisp/org-table.el6
-rw-r--r--lisp/org.el2
-rw-r--r--lisp/ox-beamer.el8
7 files changed, 13 insertions, 11 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 831c3e1..8f6bc53 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -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
diff --git a/lisp/org-indent.el b/lisp/org-indent.el
index c6bf416..3475cad 100644
--- a/lisp/org-indent.el
+++ b/lisp/org-indent.el
@@ -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.
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 39122e7..f97164e 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -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")))
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 20acee4..cabedec 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -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
diff --git a/lisp/org-table.el b/lisp/org-table.el
index 1248efa..0e93fb2 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -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)
diff --git a/lisp/org.el b/lisp/org.el
index cebe173..f560c65 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -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)
diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index 1a1732b..6ed95e8 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -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