emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: [PATCH] define-minor-mode: prefer keyword args [9.4.5 (9.4.5-ga02a3b @ /home/n/.emacs.d/straight/build/org-plus-contrib/)]
@ 2021-04-26 12:32 No Wayman
  2021-04-26 12:51 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: No Wayman @ 2021-04-26 12:32 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 679 bytes --]


Remember to cover the basics, that is, what you expected to happen 
and
what in fact did happen.  You don't know how to make a good 
report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

The attached patch updates the calling convention for several 
minor-mode definitions to use keywords in place of the older 
positional arguments. With the native comp branch being merged 
into Emacs' master branch, these types of warnings become more 
apparent to end users, so I figure it's a good idea to stay on top 
of them.

Thanks,
Nick


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: define-minor-mode-keyword-args --]
[-- Type: text/x-patch, Size: 2823 bytes --]

From b33e081225a441e43cd03cd127197e4abaa0966d Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
Date: Mon, 26 Apr 2021 08:25:25 -0400
Subject: [PATCH] Update define-minor-mode calling convention

* org-list.el, org-src.el, org-table.el, org.el: Migrate minor mode
definitions from positional arguments to keyword args.
---
 lisp/org-list.el  | 2 +-
 lisp/org-src.el   | 2 +-
 lisp/org-table.el | 4 ++--
 lisp/org.el       | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/org-list.el b/lisp/org-list.el
index 98d9e36da..4d84d99bb 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -2296,7 +2296,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 20acee4e6..cabedecb6 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 3030751cc..a0c354d86 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -499,7 +499,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
@@ -1966,7 +1966,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)
diff --git a/lisp/org.el b/lisp/org.el
index 675a614e2..f7fd90cf9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15640,7 +15640,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)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-27 12:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26 12:32 Bug: [PATCH] define-minor-mode: prefer keyword args [9.4.5 (9.4.5-ga02a3b @ /home/n/.emacs.d/straight/build/org-plus-contrib/)] No Wayman
2021-04-26 12:51 ` Bastien
2021-04-26 22:50   ` Kyle Meyer
2021-04-27  5:13     ` Bastien
2021-04-27 12:28     ` No Wayman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).