aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/keymap.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into scratch/correct-warning-posscratch/correct-warning-posAlan Mackenzie2022-01-221-32/+32
|\
| * Make key-valid-p work in TurkeyLars Ingebrigtsen2022-01-201-32/+32
| | | | | | | | | | * lisp/keymap.el (key-valid-p): Inhibit case folding, otherwise (key-valid-p "I") would return nil in tr_TR environments.
* | Miscellaneous amendments to the scratch/correct-warning-pos branchAlan Mackenzie2022-01-221-5/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Remove ambiguity from key-valid-p docstringRobert Pluim2022-01-041-1/+1
| | | | | * lisp/keymap.el (key-valid-p): Be explicit about the separator being one and only one space.
* Move define-keymap and defvar-keymap to keymap.elStefan Kangas2022-01-021-0/+133
| | | | | | | | | These functions deal with the "new" keymap binding interface, so they belong in keymap.el rather than in subr.el. * lisp/subr.el (define-keymap--compile, define-keymap) (defvar-keymap): Move from here ... * lisp/keymap.el (define-keymap--compile, define-keymap) (defvar-keymap): ... to here.
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* ; * lisp/keymap.el (key-valid-p): Fix wording of doc string.Eli Zaretskii2021-12-281-1/+1
|
* Doc fix; fix terminology in key binding functionsStefan Kangas2021-12-271-4/+4
| | | | | * lisp/keymap.el (keymap-set, key-valid-p): * lisp/subr.el (define-keymap): Doc fix; improve terminology.
* Make keymap-lookup work for keymap results, tooLars Ingebrigtsen2021-12-101-2/+3
| | | | | * lisp/keymap.el (keymap-lookup): Make this function work for non-symbol lookups, too (bug#52374).
* Fix keymap-lookup implementationLars Ingebrigtsen2021-12-041-2/+2
| | | | | * lisp/keymap.el (keymap-lookup): Make this actually work for looking up keys.
* Fix some of the argument handling in keymap-set and keymap-substituteLars Ingebrigtsen2021-11-301-6/+5
| | | | | | | * lisp/keymap.el (keymap-set): Fix handling of binding one key to another key. (keymap-substitute): Fix confusion in implementation -- the args are definitions, not keys.
* Use compiler macros for the key syntax checksMattias EngdegÄrd2021-11-281-1/+21
| | | | | | | | | | | | | | | | | | Compile-time key string syntax checks are better written using compiler macros than with byte-hunk-handlers inside the compiler proper. * lisp/emacs-lisp/bytecomp.el (byte-compile-define-keymap) (byte-compile-define-keymap--define): Remove. * lisp/keymap.el (keymap--compile-check): New. (keymap-set, keymap-global-set, keymap-local-set, keymap-global-unset) (keymap-local-unset, keymap-unset, keymap-substitute) (keymap-set-after, key-translate, keymap-lookup, keymap-local-lookup) (keymap-global-lookup): Use compiler-macro for argument checks. * lisp/subr.el (define-keymap--compile): New. (define-keymap--define): Fold into define-keymap. (define-keymap): Use compiler-macro. (defvar-keymap): Use define-keymap.
* Change the call signature to keymap-substituteLars Ingebrigtsen2021-11-171-1/+1
| | | | | | | * lisp/keymap.el (keymap-substitute): Make the keymap the first parameter for symmetry with the other functions. * lisp/emacs-lisp/shortdoc.el (keymaps): * lisp/emacs-lisp/bytecomp.el (lambda): Adjust.
* Make keymap-unset workLars Ingebrigtsen2021-11-161-1/+1
| | | | * lisp/keymap.el (keymap-unset): Fix key syntax (bug#51897).
* Add new 'keymap-*' functionsLars Ingebrigtsen2021-11-161-0/+437
* lisp/keymap.el: New file with all the new keymap-* functions. * lisp/loadup.el ("keymap"): Load. * lisp/subr.el (kbd): Refactor out all the code to key-parse. (define-key-after, keyboard-translate, global-set-key) (local-set-key, global-unset-key, local-unset-key) (local-key-binding, global-key-binding) (substitute-key-definition): Note in doc strings that these are legacy functions. (define-keymap--define): Use keymap-set. * lisp/emacs-lisp/byte-opt.el: Remove the optimizations for defvar-keymap and define-keymap since the macros now only understand the kbd syntax. * lisp/emacs-lisp/bytecomp.el (byte-compile-define-keymap) (byte-compile-define-keymap--define): Warn about invalid key definitions in all keymap-* functions. * lisp/emacs-lisp/shortdoc.el (keymaps): Add shortdocs form keymap* functions. * src/keymap.c (possibly_translate_key_sequence): Adjust callers to key-valid-p and key-parse. (syms_of_keymap): Adjust defs.