(cond
((eq (aref keys (1- (length keys))) ?\C-h)
- ;; FIXME: XEmacs doesn't show the S-prefixed keys that are defined
- ;; in the parent keymap (try `S C-h' in the article buffer).
- (let ((keymap (make-sparse-keymap))
- (map (copy-keymap gnus-article-send-map)))
- (define-key keymap "S" map)
- (if (featurep 'xemacs)
- (set-keymap-default-binding map nil)
- (define-key map [t] nil))
- (set-keymap-parent keymap
- (with-current-buffer gnus-article-current-summary
- (current-local-map)))
- (with-temp-buffer
- (use-local-map keymap)
- (describe-bindings (substring keys 0 -1)))))
+ (if (featurep 'xemacs)
+ (let ((keymap (with-current-buffer gnus-article-current-summary
+ (copy-keymap (current-local-map)))))
+ (map-keymap
+ (lambda (key def)
+ (define-key keymap (vector ?S key) def))
+ gnus-article-send-map)
+ (with-temp-buffer
+ (setq major-mode 'gnus-article-mode)
+ (use-local-map keymap)
+ (describe-bindings (substring keys 0 -1))))
+ (let ((keymap (make-sparse-keymap))
+ (map (copy-keymap gnus-article-send-map)))
+ (define-key keymap "S" map)
+ (define-key map [t] nil)
+ (set-keymap-parent keymap
+ (with-current-buffer gnus-article-current-summary
+ (current-local-map)))
+ (with-temp-buffer
+ (use-local-map keymap)
+ (describe-bindings (substring keys 0 -1))))))
((or (member keys nosaves)
(member keys nosave-but-article)
(member keys nosave-in-article))
(gnus-article-read-summary-keys)))
(defun gnus-article-describe-key (key)
- "Display documentation of the function invoked by KEY. KEY is a string."
+ "Display documentation of the function invoked by KEY.
+KEY is a string or a vector."
(interactive (list (let ((cursor-in-echo-area t)) ;; better for XEmacs.
(read-key-sequence "Describe key: "))))
(gnus-article-check-buffer)
(setq unread-command-events
(if (featurep 'xemacs)
(append key nil)
- (mapcar (lambda (x) (if (>= x 128) (list 'meta (- x 128)) x))
+ (mapcar (lambda (x) (if (and (integerp x) (>= x 128))
+ (list 'meta (- x 128))
+ x))
key)))
(let ((cursor-in-echo-area t)
gnus-pick-mode)
(describe-key key)))
(defun gnus-article-describe-key-briefly (key &optional insert)
- "Display documentation of the function invoked by KEY. KEY is a string."
+ "Display documentation of the function invoked by KEY.
+KEY is a string or a vector."
(interactive (list (let ((cursor-in-echo-area t)) ;; better for XEmacs.
(read-key-sequence "Describe key: "))
current-prefix-arg))
(setq unread-command-events
(if (featurep 'xemacs)
(append key nil)
- (mapcar (lambda (x) (if (>= x 128) (list 'meta (- x 128)) x))
+ (mapcar (lambda (x) (if (and (integerp x) (>= x 128))
+ (list 'meta (- x 128))
+ x))
key)))
(let ((cursor-in-echo-area t)
gnus-pick-mode)