branch: externals/org
commit 6d51edc0f938b6a049c1e23c0d1b24bd27cb5833
Merge: ffb1652c4a 303aa80220
Author: Kyle Meyer <k...@kyleam.com>
Commit: Kyle Meyer <k...@kyleam.com>

    Merge branch 'km/from-emacs-master'
---
 doc/doc-setup.org       |  1 -
 etc/ORG-NEWS            |  2 +-
 lisp/ob-core.el         |  2 +-
 lisp/ob-exp.el          |  2 +-
 lisp/ob-processing.el   |  1 -
 lisp/ol-eshell.el       |  4 ++--
 lisp/org-agenda.el      |  6 +++---
 lisp/org-capture.el     |  4 ++--
 lisp/org-element-ast.el |  8 ++++----
 lisp/org-faces.el       | 46 +++++++++++++++++++++++-----------------------
 lisp/org-feed.el        |  1 -
 lisp/org-macro.el       |  2 +-
 lisp/org-persist.el     |  2 +-
 lisp/org-table.el       |  5 ++---
 lisp/org.el             |  6 ++++--
 lisp/ox-odt.el          |  8 ++++----
 lisp/ox-publish.el      |  2 +-
 lisp/ox.el              |  6 +++---
 18 files changed, 53 insertions(+), 55 deletions(-)

diff --git a/doc/doc-setup.org b/doc/doc-setup.org
index fffacbd993..9b76485238 100644
--- a/doc/doc-setup.org
+++ b/doc/doc-setup.org
@@ -50,4 +50,3 @@
 # The "kbd" macro turns KBD into @kbd{KBD}.  Additionally, it
 # encloses case-sensitive special keys (SPC, RET...) within @key{...}.
 #+macro: kbd (eval (org-texinfo-kbd-macro $1))
-
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index a2c01979fe..4e9440b519 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -6194,7 +6194,7 @@ the end of the string.
 
 *** Function ~org-info-export~ changes.
 
-HTML links created from certain info links now point to =gnu.org= URL's rather
+HTML links created from certain info links now point to =gnu.org= URLs rather
 than just to local files. For example info links such as =info:emacs#List
 Buffers= used to be converted to HTML links like this:
 
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 10992d61dd..326a9a8572 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -1851,7 +1851,7 @@ HEADER-ARGUMENTS is an alist of all the arguments."
       (cons :colname-names (or (cdr (assq :colname-names params))
                               (cadr  vars-and-names)))
       (cons :rowname-names (or (cdr (assq :rowname-names params))
-                              (cl-caddr vars-and-names)))
+                               (caddr vars-and-names)))
       (cons :result-params result-params)
       (cons :result-type  (cond ((member "output" result-params) 'output)
                                ((member "value" result-params) 'value)
diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index 83b6be8e24..ab99541ab9 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -65,7 +65,7 @@ to avoid evaluating code on export should use the header 
argument
 Source is located in `org-babel-exp-reference-buffer'.  The value
 returned is the value of the last form in BODY.  Assume that
 point is at the beginning of the Babel block."
-  (declare (indent 1) (debug body))
+  (declare (indent 1) (debug (body)))
   `(let ((source (get-text-property (point) 'org-reference)))
      ;; Source blocks created during export process (e.g., by other
      ;; source blocks) are not referenced.  In this case, do not move
diff --git a/lisp/ob-processing.el b/lisp/ob-processing.el
index e1d1edd5c6..81b7f7ee4d 100644
--- a/lisp/ob-processing.el
+++ b/lisp/ob-processing.el
@@ -56,7 +56,6 @@
 (org-assert-version)
 
 (require 'ob)
-(require 'sha1)
 
 (declare-function processing-sketch-run "ext:processing-mode" ())
 
diff --git a/lisp/ol-eshell.el b/lisp/ol-eshell.el
index fe22fb2104..6e54d0e3ca 100644
--- a/lisp/ol-eshell.el
+++ b/lisp/ol-eshell.el
@@ -51,9 +51,9 @@ followed by a colon."
     (if (get-buffer eshell-buffer-name)
         (pop-to-buffer
          eshell-buffer-name
-         (if (boundp 'display-comint-buffer-action) ; Emacs >= 29
+         (if (boundp 'display-comint-buffer-action) ; Emacs >= 29, <= 30
              display-comint-buffer-action
-           '(display-buffer-same-window (inhibit-same-window))))
+           '(display-buffer-same-window (inhibit-same-window) (category . 
comint))))
       (eshell))
     (goto-char (point-max))
     (eshell-kill-input)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 87a9a462a4..187cacad42 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4595,10 +4595,10 @@ START-DAY is an absolute time value."
        ((eq span 'fortnight) 14)
        ((eq span 'month)
         (let ((date (calendar-gregorian-from-absolute start-day)))
-          (calendar-last-day-of-month (car date) (cl-caddr date))))
+           (calendar-last-day-of-month (car date) (caddr date))))
        ((eq span 'year)
         (let ((date (calendar-gregorian-from-absolute start-day)))
-          (if (calendar-leap-year-p (cl-caddr date)) 366 365)))))
+           (if (calendar-leap-year-p (caddr date)) 366 365)))))
 
 (defun org-agenda-span-name (span)
   "Return a SPAN name."
@@ -8210,7 +8210,7 @@ FLAG specifies the type of completion operation to 
perform.  This
 function is passed as a collection function to `completing-read',
 which see."
   (let ((completion-ignore-case t)     ;tags are case-sensitive
-       (confirm (lambda (x) (stringp x)))
+        (confirm #'stringp)
        (prefix "")
        (operator "")
        table
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 23201dccd8..6d395406cf 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1144,7 +1144,7 @@ Store them in the capture property list."
                     (org-encode-time
                      (apply #'list
                             0 0 org-extend-today-until
-                            (cl-cdddr (decode-time prompt-time))))))
+                            (cdddr (decode-time prompt-time))))))
                 (time-to-days prompt-time)))
              (t
               ;; Current date, possibly corrected for late night
@@ -2021,7 +2021,7 @@ placeholder to check."
     (goto-char (match-beginning 0))
     (let ((n (abs (skip-chars-backward "\\\\"))))
       (delete-char (/ (1+ n) 2))
-      (= (% n 2) 1))))
+      (cl-oddp n))))
 
 (defun org-capture-expand-embedded-elisp (&optional mark)
   "Evaluate embedded elisp %(sexp) and replace with the result.
diff --git a/lisp/org-element-ast.el b/lisp/org-element-ast.el
index f56a76a28a..e930dd6ddb 100644
--- a/lisp/org-element-ast.el
+++ b/lisp/org-element-ast.el
@@ -737,10 +737,10 @@ will yield expected results.
 When TYPE is `plain-text', CHILDREN must contain a single node -
 string.  Alternatively, TYPE can be a string.  When TYPE is nil or
 `anonymous', PROPS must be nil."
-  (cl-assert
-   ;; FIXME: Just use `plistp' from Emacs 29 when available.
-   (let ((len (proper-list-p props)))
-     (and len (zerop (% len 2)))))
+  (cl-assert (if (fboundp 'plistp) ; Emacs 29.1
+                 (plistp props)
+               (let ((len (proper-list-p props)))
+                 (and len (cl-evenp len)))))
   ;; Special case: CHILDREN is a single anonymous node
   (when (and (= 1 (length children))
              (org-element-type-p (car children) 'anonymous))
diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index f1d3076e07..a9a906e037 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -104,8 +104,8 @@ color of the frame."
     (((class color) (min-colors 88) (background dark)) (:foreground 
"LightSkyBlue"))
     (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
     (((class color) (min-colors 16) (background dark)) (:foreground 
"LightSkyBlue"))
-    (((class color) (min-colors 8)) (:foreground "blue" :bold t))
-    (t (:bold t)))
+    (((class color) (min-colors 8)) (:foreground "blue" :weight bold))
+    (t (:weight bold)))
   "Face used for drawers."
   :group 'org-faces)
 
@@ -229,30 +229,30 @@ calendar."
   "Face for diary-like sexp date specifications."
   :group 'org-faces)
 
-(defface org-tag '((t (:bold t)))
+(defface org-tag '((t (:weight bold)))
   "Default face for tags.
 Note that the variable `org-tag-faces' can be used to overrule this face for
 specific tags."
   :group 'org-faces)
 
-(defface org-list-dt '((t (:bold t)))
+(defface org-list-dt '((t (:weight bold)))
   "Default face for definition terms in lists."
   :group 'org-faces)
 
 (defface org-todo               ;Copied from `font-lock-warning-face'
-  '((((class color) (min-colors 16) (background light)) (:foreground "Red1" 
:bold t))
-    (((class color) (min-colors 16) (background dark))  (:foreground "Pink" 
:bold t))
-    (((class color) (min-colors 8)  (background light)) (:foreground "red"  
:bold t))
-    (((class color) (min-colors 8)  (background dark))  (:foreground "red"  
:bold t))
-    (t (:inverse-video t :bold t)))
+  '((((class color) (min-colors 16) (background light)) (:foreground "Red1" 
:weight bold))
+    (((class color) (min-colors 16) (background dark))  (:foreground "Pink" 
:weight bold))
+    (((class color) (min-colors 8)  (background light)) (:foreground "red"  
:weight bold))
+    (((class color) (min-colors 8)  (background dark))  (:foreground "red"  
:weight bold))
+    (t (:inverse-video t :weight bold)))
   "Face for TODO keywords."
   :group 'org-faces)
 
 (defface org-done                  ;Copied from `font-lock-type-face'
-  '((((class color) (min-colors 16) (background light)) (:foreground 
"ForestGreen" :bold t))
-    (((class color) (min-colors 16) (background dark)) (:foreground 
"PaleGreen" :bold t))
+  '((((class color) (min-colors 16) (background light)) (:foreground 
"ForestGreen" :weight bold))
+    (((class color) (min-colors 16) (background dark)) (:foreground 
"PaleGreen" :weight bold))
     (((class color) (min-colors 8)) (:foreground "green"))
-    (t (:bold t)))
+    (t (:weight bold)))
   "Face used for todo keywords that indicate DONE items."
   :group 'org-faces)
 
@@ -272,7 +272,7 @@ of the frame, for example."
 (defface org-headline-todo       ;Copied from `font-lock-string-face'
   '((((class color) (min-colors 16) (background light)) (:foreground "Red4"))
     (((class color) (min-colors 16) (background dark)) (:foreground "Pink2"))
-    (((class color) (min-colors 8)  (background light)) (:bold t)))
+    (((class color) (min-colors 8)  (background light)) (:weight bold)))
   "Face used to indicate that a headline is marked as TODO.
 This face is only used if `org-fontify-todo-headline' is set.  If applies
 to the part of the headline after the TODO keyword."
@@ -405,7 +405,7 @@ changes."
     (((class color) (min-colors 88) (background dark)) (:foreground 
"chocolate1"))
     (((class color) (min-colors 8)  (background light)) (:foreground "red"))
     (((class color) (min-colors 8)  (background dark)) (:foreground "red"))
-    (t (:bold t :italic t)))
+    (t (:weight bold :slant italic)))
   "Face for formulas."
   :group 'org-faces)
 
@@ -510,8 +510,8 @@ content of these blocks will still be treated as Org 
syntax."
     (((class color) (min-colors 88) (background dark)) (:foreground 
"LightSkyBlue"))
     (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
     (((class color) (min-colors 16) (background dark)) (:foreground 
"LightSkyBlue"))
-    (((class color) (min-colors 8)) (:foreground "blue" :bold t))
-    (t (:bold t)))
+    (((class color) (min-colors 8)) (:foreground "blue" :weight bold))
+    (t (:weight bold)))
   "Face used in agenda for captions and dates."
   :group 'org-faces)
 
@@ -530,7 +530,7 @@ it (e.g. if that is assigned a different font height or 
family)."
   :group 'org-faces)
 
 (defface org-agenda-date-today
-  '((t (:inherit org-agenda-date :weight bold :italic t)))
+  '((t (:inherit org-agenda-date :weight bold :slant italic)))
   "Face used in agenda for today."
   :group 'org-faces)
 
@@ -553,7 +553,7 @@ which days belong to the weekend."
   '((((class color) (min-colors 88) (background light)) (:foreground 
"DarkGreen"))
     (((class color) (min-colors 88) (background dark)) (:foreground 
"PaleGreen"))
     (((class color) (min-colors 8)) (:foreground "green"))
-    (t (:bold t :italic t)))
+    (t (:weight bold :slant italic)))
   "Face for items scheduled for a certain day."
   :group 'org-faces)
 
@@ -561,7 +561,7 @@ which days belong to the weekend."
   '((((class color) (min-colors 88) (background light)) (:foreground 
"DarkGreen"))
     (((class color) (min-colors 88) (background dark)) (:foreground 
"PaleGreen"))
     (((class color) (min-colors 8)) (:foreground "green"))
-    (t (:bold t :italic t)))
+    (t (:weight bold :slant italic)))
   "Face for items scheduled for a certain day."
   :group 'org-faces)
 
@@ -575,8 +575,8 @@ which days belong to the weekend."
   '((((class color) (min-colors 88) (background light)) (:foreground 
"Firebrick"))
     (((class color) (min-colors 88) (background dark)) (:foreground 
"chocolate1"))
     (((class color) (min-colors 8)  (background light)) (:foreground "red"))
-    (((class color) (min-colors 8)  (background dark)) (:foreground "red" 
:bold t))
-    (t (:bold t)))
+    (((class color) (min-colors 8)  (background dark)) (:foreground "red" 
:weight bold))
+    (t (:weight bold)))
   "Face for items scheduled previously, and not yet done."
   :group 'org-faces)
 
@@ -589,8 +589,8 @@ See also `org-agenda-deadline-faces'."
   '((((class color) (min-colors 88) (background light)) (:foreground 
"Firebrick"))
     (((class color) (min-colors 88) (background dark)) (:foreground 
"chocolate1"))
     (((class color) (min-colors 8)  (background light)) (:foreground "red"))
-    (((class color) (min-colors 8)  (background dark)) (:foreground "red" 
:bold t))
-    (t (:bold t)))
+    (((class color) (min-colors 8)  (background dark)) (:foreground "red" 
:weight bold))
+    (t (:weight bold)))
   "Face for items scheduled previously, and not yet done.
 See also `org-agenda-deadline-faces'."
   :group 'org-faces)
diff --git a/lisp/org-feed.el b/lisp/org-feed.el
index 67be5274de..88a393ae6f 100644
--- a/lisp/org-feed.el
+++ b/lisp/org-feed.el
@@ -92,7 +92,6 @@
 (org-assert-version)
 
 (require 'org)
-(require 'sha1)
 
 (declare-function url-retrieve-synchronously "url"
                   (url &optional silent inhibit-cookies timeout))
diff --git a/lisp/org-macro.el b/lisp/org-macro.el
index a0c07f43d8..f3acafda77 100644
--- a/lisp/org-macro.el
+++ b/lisp/org-macro.el
@@ -330,7 +330,7 @@ Return a list of arguments, as strings.  This is the 
opposite of
     (lambda (str)
       (let ((len (length (match-string 1 str))))
        (concat (make-string (/ len 2) ?\\)
-               (if (zerop (mod len 2)) "\000" ","))))
+               (if (cl-evenp len) "\000" ","))))
     s nil t)
    "\000"))
 
diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index 6579a8e47c..e690254fae 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -622,7 +622,7 @@ or file-path, (:inode inode), (:hash hash), or or (:key 
key).
 MISC, if non-nil will be appended to the collection.  It must be a plist."
   (unless (and (listp container) (listp (car container)))
     (setq container (list container)))
-  (when (and misc (or (not (listp misc)) (= 1 (% (length misc) 2))))
+  (when (and misc (or (not (listp misc)) (cl-oddp (length misc))))
     (error "org-persist: Not a plist: %S" misc))
   (or (org-persist--find-index
        `( :container ,(org-persist--normalize-container container)
diff --git a/lisp/org-table.el b/lisp/org-table.el
index b823fa4f6d..9b4ce2a79b 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2539,8 +2539,7 @@ location of point."
        ;; replace fields with duration values if relevant
        (if duration
            (setq fields
-                 (mapcar (lambda (x) (org-table-time-string-to-seconds x))
-                         fields)))
+                  (mapcar #'org-table-time-string-to-seconds fields)))
        (if (eq numbers t)
            (setq fields (mapcar
                          (lambda (x)
@@ -3419,7 +3418,7 @@ Parameters get priority."
          (when title
            (unless (bobp) (insert "\n"))
            (insert
-            (org-add-props (cdr title) nil 'face 'font-lock-comment-face))
+             (org-add-props (cdr title) nil 'face 'font-lock-comment-face))
            (setq titles (remove title titles)))
          (when (equal key (car entry)) (setq startline (org-current-line)))
          (let ((s (concat
diff --git a/lisp/org.el b/lisp/org.el
index a51cf8280f..dfcbe84ff9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4354,7 +4354,7 @@ related expressions."
                  '("ARCHIVE" "CATEGORY" "COLUMNS" "PRIORITIES"))))
       ;; Startup options.  Get this early since it does change
       ;; behavior for other options (e.g., tags).
-      (let ((startup (cl-mapcan (lambda (value) (split-string value))
+      (let ((startup (cl-mapcan #'split-string
                                (cdr (assoc "STARTUP" alist)))))
        (dolist (option startup)
          (pcase (assoc-string option org-startup-options t)
@@ -12909,7 +12909,7 @@ variables is set."
          (cond
           (increment
            (unless allowed (user-error "Allowed effort values are not set"))
-           (or (cl-caadr (member (list current) allowed))
+            (or (caadr (member (list current) allowed))
                (user-error "Unknown value %S among allowed values" current)))
           (value
            (if (stringp value) value
@@ -20656,6 +20656,8 @@ URLS is a list of file URL."
 
 (put 'org--dnd-multi-local-file-handler 'dnd-multiple-handler t)
 
+(declare-function dnd-open-local-file "dnd" (uri action))
+
 (defun org--dnd-local-file-handler (url action &optional separator)
   "Handle file URL as per ACTION.
 SEPARATOR is the string to insert after each link.  It may be nil
diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index f2ee3a7f3a..389cd7e4ca 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -3341,13 +3341,13 @@ styles congruent with the ODF-1.2 specification."
                     (= (1+ r) (car table-dimensions)))
                "LastRow")
               ((and (cdr (assq 'use-banding-rows-styles cell-style-selectors))
-                    (= (% r 2) 1)) "EvenRow")
+                    (cl-oddp r)) "EvenRow")
               ((and (cdr (assq 'use-banding-rows-styles cell-style-selectors))
-                    (= (% r 2) 0)) "OddRow")
+                    (cl-evenp r)) "OddRow")
               ((and (cdr (assq 'use-banding-columns-styles 
cell-style-selectors))
-                    (= (% c 2) 1)) "EvenColumn")
+                    (cl-oddp c)) "EvenColumn")
               ((and (cdr (assq 'use-banding-columns-styles 
cell-style-selectors))
-                    (= (% c 2) 0)) "OddColumn")
+                    (cl-evenp c)) "OddColumn")
               (t ""))))
        (concat template-name cell-type)))))
 
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 1183281e73..1dc6901b41 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -362,7 +362,7 @@ The timestamp file name is constructed using FILENAME, 
publishing
 directory PUB-DIR, and PUB-FUNC publishing function."
   (setq filename (concat filename "::" (or pub-dir "") "::"
                         (format "%s" (or pub-func ""))))
-  (concat "X" (if (fboundp 'sha1) (sha1 filename) (md5 filename))))
+  (concat "X" (sha1 filename)))
 
 (defun org-publish-needed-p
     (filename &optional pub-dir pub-func _true-pub-dir base-dir)
diff --git a/lisp/ox.el b/lisp/ox.el
index 00ce86d69b..d95e031e87 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -1594,7 +1594,7 @@ Assume buffer is in Org mode.  Narrowing, if any, is 
ignored."
                      (newline
                       (mapconcat #'identity values "\n"))
                      (split
-                      (cl-mapcan (lambda (v) (split-string v)) values))
+                       (cl-mapcan #'split-string values))
                      ((t)
                       (org-last values))
                      (otherwise
@@ -7352,14 +7352,14 @@ back to standard interface."
                             (lambda (sub-entry)
                               (cl-incf index)
                               (format
-                               (if (zerop (mod index 2)) "    [%s] %-26s"
+                               (if (cl-evenp index) "    [%s] %-26s"
                                  "[%s] %s\n")
                                (funcall fontify-key
                                         (char-to-string (car sub-entry))
                                         top-key)
                                (nth 1 sub-entry)))
                             sub-menu "")
-                           (when (zerop (mod index 2)) "\n"))))))))
+                           (when (cl-evenp index) "\n"))))))))
                entries ""))
             ;; Publishing menu is hard-coded.
             (format "\n[%s] Publish

Reply via email to