mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-16 15:46:27 +00:00
Fix Emacs 27 false-positive warnings
* lisp/org-element-ast.el (org-element--plist-property): Shield annoying warning spam with `with-no-warnings'. The warnings are not present in newer Emacs. * lisp/org-element.el (org-element--interpret-affiliated-keywords): Suppress warning about two token unused `_' arguments. * lisp/org-id.el (org-id-find-id-in-file): Suppress warning about number of arguments.
This commit is contained in:
parent
9e40208547
commit
933d282881
|
@ -393,12 +393,18 @@ Ignore standard property array."
|
|||
(`plain-text
|
||||
(or (get-text-property 0 ,property ,node)
|
||||
(when ,dflt
|
||||
(if (plist-member (text-properties-at 0 ,node) ,property)
|
||||
(if
|
||||
;; FIXME: Byte-compiler throws false positives in Emacs 27.
|
||||
(with-no-warnings
|
||||
(plist-member (text-properties-at 0 ,node) ,property))
|
||||
nil ,dflt))))
|
||||
(_
|
||||
(or (plist-get (nth 1 ,node) ,property)
|
||||
(when ,dflt
|
||||
(if (plist-member (nth 1 ,node) ,property)
|
||||
(if
|
||||
;; FIXME: Byte-compiler throws false positives in Emacs 27.
|
||||
(with-no-warnings
|
||||
(plist-member (nth 1 ,node) ,property))
|
||||
nil ,dflt))))))))
|
||||
|
||||
(define-inline org-element-property-raw (property node &optional dflt)
|
||||
|
|
|
@ -5219,7 +5219,7 @@ If there is no affiliated keyword, return the empty string."
|
|||
;; cannot belong to the property list.
|
||||
(let (acc)
|
||||
(org-element-properties-mapc
|
||||
(lambda (prop _ _)
|
||||
(lambda (prop _ __)
|
||||
(let ((keyword (upcase (substring (symbol-name prop) 1))))
|
||||
(when (or (string-match-p "^ATTR_" keyword)
|
||||
(and
|
||||
|
|
|
@ -678,8 +678,8 @@ optional argument MARKERP, return the position as a new marker."
|
|||
(buffer (or visiting
|
||||
(if markerp (find-file-noselect file)
|
||||
(if (<= 2 (cdr (func-arity #'get-buffer-create)))
|
||||
(get-buffer-create " *Org ID temp*" t)
|
||||
;; Emacs 27 does not yet have second argument.
|
||||
(with-no-warnings (get-buffer-create " *Org ID temp*" t))
|
||||
;; FIXME: Emacs 27 does not yet have second argument.
|
||||
(get-buffer-create " *Org ID temp*"))))))
|
||||
(unwind-protect
|
||||
(with-current-buffer buffer
|
||||
|
|
Loading…
Reference in a new issue