]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove :copy from define-keymap
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 4 Oct 2021 14:37:30 +0000 (16:37 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 4 Oct 2021 14:37:30 +0000 (16:37 +0200)
* doc/lispref/keymaps.texi (Changing Key Bindings): Update
documentation.

* lisp/subr.el (define-keymap):
(define-keymap--define): Remove :copy from the signature.

* lisp/net/eww.el (eww-link-keymap): Use :parent.

doc/lispref/keymaps.texi
lisp/net/eww.el
lisp/subr.el

index 1ca4857450aa52fa8a23f058cda92c2cac1114f9..adee7ce58eda98ef8bfc4c173d1e7bb6317f06b6 100644 (file)
@@ -1442,10 +1442,6 @@ If non-@code{nil}, the keymap will be suppressed with
 @code{suppress-keymap} (@pxref{Changing Key Bindings}).  If
 @code{nodigits}, treat digits like other chars.
 
-@item :copy
-If non-@code{nil}, copy this keymap and use it as the basis
-(@pxref{Creating Keymaps}).
-
 @item :name
 If non-@code{nil}, this should be a string to use as the menu for the
 keymap if you use it as a menu with @code{x-popup-menu} (@pxref{Pop-Up
index e5716d3ffd6ba00231b493a2f2cc987e4efa28f9..afcf2ce8b448b0b2abf7c4e4e7b66e791264b291 100644 (file)
@@ -271,10 +271,10 @@ See also `eww-form-checkbox-selected-symbol'."
   "text/html, text/plain, text/sgml, text/css, application/xhtml+xml, */*;q=0.01"
   "Value used for the HTTP 'Accept' header.")
 
-(defvar-keymap eww-link-keymap (:copy shr-map)
+(defvar-keymap eww-link-keymap (:parent shr-map)
   "\r" #'eww-follow-link)
 
-(defvar-keymap eww-image-link-keymap (:copy shr-map)
+(defvar-keymap eww-image-link-keymap (:parent shr-map)
   "\r" #'eww-follow-link)
 
 (defun eww-suggested-uris nil
index 18b0851b1d8c629f95d065af6a00be6ae760fe29..6473c5ac11b7404e236c1e1b9e76e86de17b3265 100644 (file)
@@ -6478,9 +6478,6 @@ pairs.  Available keywords are:
 :keymap    If non-nil, instead of creating a new keymap, the given keymap
              will be destructively modified instead.
 
-:copy      If non-nil, copy this keymap and use it as the basis
-             (see `copy-keymap').
-
 :name      If non-nil, this should be a string to use as the menu for
              the keymap in case you use it as a menu with `x-popup-menu'.
 
@@ -6492,7 +6489,7 @@ KEY/DEFINITION pairs are as KEY and DEF in `define-key'.  KEY can
 also be the special symbol `:menu', in which case DEFINITION
 should be a MENU form as accepted by `easy-menu-define'.
 
-\n(fn [&key FULL PARENT SUPPRESS NAME PREFIX KEYMAP COPY] [KEY DEFINITION] ...)"
+\n(fn [&key FULL PARENT SUPPRESS NAME PREFIX KEYMAP] [KEY DEFINITION] ...)"
   ;; Handle keywords.
   (let ((options nil))
     (while (and definitions
@@ -6505,7 +6502,7 @@ should be a MENU form as accepted by `easy-menu-define'.
     (define-keymap--define (nreverse options) definitions)))
 
 (defun define-keymap--define (options definitions)
-  (let (full suppress parent name prefix copy keymap)
+  (let (full suppress parent name prefix keymap)
     (while options
       (let ((keyword (pop options))
             (value (pop options)))
@@ -6513,7 +6510,6 @@ should be a MENU form as accepted by `easy-menu-define'.
           (:full (setq full value))
           (:keymap (setq keymap value))
           (:parent (setq parent value))
-          (:copy (setq copy value))
           (:suppress (setq suppress value))
           (:name (setq name value))
           (:prefix (setq prefix value)))))
@@ -6522,16 +6518,12 @@ should be a MENU form as accepted by `easy-menu-define'.
                (or full parent suppress keymap))
       (error "A prefix keymap can't be defined with :full/:parent/:suppress/:keymap keywords"))
 
-    (when (and full copy)
-      (error "Invalid combination: :full/:copy"))
-
-    (when (and keymap (or full copy))
-      (error "Invalid combination: :keymap with :full/:copy"))
+    (when (and keymap full)
+      (error "Invalid combination: :keymap with :full"))
 
     (let ((keymap (cond
                    (keymap keymap)
                    (prefix (define-prefix-command prefix nil name))
-                   (copy (copy-keymap copy))
                    (full (make-keymap name))
                    (t (make-sparse-keymap name)))))
       (when suppress