Article View: gnu.emacs.vm.bug
Article #8676Re: Fix for 5.33 vm-edit bug under v19
From: Richard Mlynarik
Date: Thu, 05 Aug 1993 04:58
Date: Thu, 05 Aug 1993 04:58
40 lines
2459 bytes
2459 bytes
In article <JASON.93Aug3133725@cygnus.cygnus.com> jason@cygnus.com (Jason Merrill) writes:
The only problem I've had with the Emacs 19-patched version of 5.33 has
been that vm-edit breaks when trying to construct the keymap. Since v19
has a convenient keymap inheritance scheme, I've patched vm-edit.el to use
that instead of vm-overlay-keymap. Note that this code will need to be
massaged in order to work with v18 as well.
[...]
! (use-local-map (append vm-edit-message-mode-map
! (copy-keymap (or (current-local-map)
! (make-sparse-keymap)))))
! ; (vm-overlay-keymap vm-edit-message-mode-map (current-local-map))
Yep. "append" is sure what I'd call a "convenient" (along with
"obvious", "clear", "transparent" and "abstract", amonst others) name
for a function for modifying the structure of the keymap datatype.
How about
(cond ((fboundp 'set-keymap-parent)
(defun vm-overlay-keymap (src dest)
(let ((map (copy-keymap src)))
(set-keymap-parent map dest)
map)))
((string-match "\\`18\\." emacs-version)
(defun vm-overlay-keymap (src-map dest-map)
(setq dest-map (copy-keymap dest-map))
...horrendous old definition from VM...
dest-map))
(t
(defun vm-overlay-keymap (rms loses)
(append rms loses))))
and then just
(use-local-map (if (current-local-map)
(vm-overlay-keymap vm-edit-message-mode-map
(current-local-map))
vm-message-mode-map))
Technical Details
Message-ID:
<MLY.93Aug4215833@atalanta.adoc.xerox.com>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!math.fu-berlin.de!ifmsun8.ifm.uni-hamburg.de!rzsun2.informatik.uni-hamburg.de!news.dfn.de!darwin.sura.net!spool.mu.edu!olivea!koriel!lll-winken.llnl.gov!parc!news.parc.xerox.com!mlyReferences:
<JASON.93Aug3133725@cygnus.cygnus.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,b8d39b7cd50c2074 X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 1993-08-08 16:46:54 PST Newsgroups: gnu.emacs.vm.bug Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!math.fu-berlin.de!ifmsun8.ifm.uni-hamburg.de!rzsun2.informatik.uni-hamburg.de!news.dfn.de!darwin.sura.net!spool.mu.edu!olivea!koriel!lll-winken.llnl.gov!parc!news.parc.xerox.com!mly From: mly@adoc.xerox.com (Richard Mlynarik) Subject: Re: Fix for 5.33 vm-edit bug under v19 In-Reply-To: jason@cygnus.com's message of Tue, 3 Aug 1993 20:37:25 GMT Message-ID: <MLY.93Aug4215833@atalanta.adoc.xerox.com> Sender: news@parc.xerox.com Organization: ITS Preservation Society References: <JASON.93Aug3133725@cygnus.cygnus.com> Date: 05 Aug 1993 04:58:32 GMT Lines: 40