summaryrefslogtreecommitdiff
path: root/lisp/keymap.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2022-01-22 09:59:05 +0000
committerAlan Mackenzie <acm@muc.de>2022-01-22 09:59:05 +0000
commitbdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8 (patch)
tree2f8c46b47f3cb6f742a186e50d069b5c1d8fecfa /lisp/keymap.el
parent3023e7ca3d911d431738551753e4cfb8e3e01ec5 (diff)
downloademacs-bdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8.tar.gz
emacs-bdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8.tar.bz2
emacs-bdd9b5b8a0d37dd09ee530c1dab3a44bee09e0f8.zip
Miscellaneous amendments to the scratch/correct-warning-pos branch
* lisp/cedet/semantic/fw.el (semantic-alias-obsolete) (semantic-varalias-obsolete): Replace calls to byte-compile-warn with calls to byte-compile-warn-x (when it exists). * lisp/emacs-lisp/bytecomp.el (byte-compile-log-warning-function) (byte-compile--log-warning-for-byte-compile): Make the POSITION parameter no longer &optional (for the benefit of flymake on *.el). (byte-compile-log-warning): Replace a nil POSITION argument with an actual position. (byte-compile-file-form-require): Push the required symbol onto byte-compile-form-stack, for the benefit of `do-after-load-evaluation'. * lisp/keymap.el (define-keymap--compile): Replace four calls to byte-compile-warn with byte-compile-warn-x. * doc/lispref/elisp.texi (master menu): Add entries for Shorthands and Symbols with position. * doc/lispref/streams.texi (Input Functions): Document read-positioning-symbols. * doc/lispref/symbols.texi (Symbols): Add new menu entry. (Symbols with Position): New @section.
Diffstat (limited to 'lisp/keymap.el')
-rw-r--r--lisp/keymap.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/keymap.el b/lisp/keymap.el
index 3e9189fba45..ce566fd8afc 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -462,18 +462,19 @@ If MESSAGE (and interactively), message the result."
(keywordp (car args))
(not (eq (car args) :menu)))
(unless (memq (car args) '(:full :keymap :parent :suppress :name :prefix))
- (byte-compile-warn "Invalid keyword: %s" (car args)))
+ (byte-compile-warn-x (car args) "Invalid keyword: %s" (car args)))
(setq args (cdr args))
(when (null args)
- (byte-compile-warn "Uneven number of keywords in %S" form))
+ (byte-compile-warn-x form "Uneven number of keywords in %S" form))
(setq args (cdr args)))
;; Bindings.
(while args
- (let ((key (pop args)))
+ (let* ((wargs args)
+ (key (pop args)))
(when (and (stringp key) (not (key-valid-p key)))
- (byte-compile-warn "Invalid `kbd' syntax: %S" key)))
+ (byte-compile-warn-x wargs "Invalid `kbd' syntax: %S" key)))
(when (null args)
- (byte-compile-warn "Uneven number of key bindings in %S" form))
+ (byte-compile-warn-x form "Uneven number of key bindings in %S" form))
(setq args (cdr args)))
form)