[Mew-dist 10861] describe-bindings in mew-draft-mode
Daiki Ueno
ueno at example.com
1999年 10月 11日 (月) 21:41:01 JST
上野です。
;; SSH の中継がついたおかげで、Mew で送信できるようになりました。
;; にわか Mew 使いなので、おかしな事を言っているかも知れません。^^;;
mew-draft-mode の各 overlay (extent) map 上にて、
C-h b (M-x describe-bindings) としても、binding が表示されません。
個人的に multipart のメールを送ることはたまにしかないため、
キーバインドを忘れてしまい、毎回 info を調べるはめになります。
そこで、local-map 上でこれらのキーバインドが有効になるよう、
いい加減に書き換えてみました。
;; 単にヘルプを表示するコマンドを追加すれば良いような気もしますが...
-------------- next part --------------
Index: mew-env.el
===================================================================
RCS file: /export/data/cvs/mew/mew-env.el,v
retrieving revision 1.1.1.1
diff -u -F^( -r1.1.1.1 mew-env.el
--- mew-env.el 1999/10/11 11:26:17 1.1.1.1
+++ mew-env.el 1999/10/11 11:31:55
@@ -67,6 +67,8 @@ (cond
(interactive "r")
(mapcar (function mew-overlay-delete)
(extent-list (current-buffer) beg end)))
+ (defun mew-overlays-at (pos)
+ (mapcar-extents (function identity) nil nil pos pos nil 'mew))
(defun mew-front-sticky (beg-or-ovl &optional end)
(if (mew-overlay-p beg-or-ovl)
(mew-overlay-put beg-or-ovl 'start-closed t)
@@ -114,6 +116,12 @@ (cond
(while (and (<= cur end) (overlays-at cur))
(mapcar (function mew-overlay-delete) (overlays-at cur)))
(setq cur (next-overlay-change cur)))))
+ (defun mew-overlays-at (pos)
+ (let ((ovls (overlays-at pos)))
+ (delq nil (mapcar (function (lambda (ovl)
+ (if (overlay-get ovl 'mew)
+ ovl)))
+ ovls))))
(defun mew-front-sticky (beg-or-ovl &optional end)
(if (mew-overlay-p beg-or-ovl)
(mew-overlay-put beg-or-ovl 'front-sticky t)
Index: mew-draft.el
===================================================================
RCS file: /export/data/cvs/mew/mew-draft.el,v
retrieving revision 1.1.1.1
diff -u -F^( -r1.1.1.1 mew-draft.el
--- mew-draft.el 1999/10/11 11:26:17 1.1.1.1
+++ mew-draft.el 1999/10/11 11:38:29
@@ -139,7 +139,25 @@ (cond
(define-key (symbol-value symmap) "\C-c\C-p\C-a" 'mew-draft-toggle-privacy-always)
(define-key (symbol-value symmap) "\C-c\C-p\C-e" 'mew-draft-toggle-privacy-encrypted)
(define-key (symbol-value symmap) "\C-c\C-p\C-d" 'mew-draft-set-privacy-type)
- (define-key (symbol-value symmap) "\C-x\C-s" 'mew-save-buffer))
+ (define-key (symbol-value symmap) "\C-x\C-s" 'mew-save-buffer)
+ (let ((bindings
+ (where-is-internal 'describe-bindings (symbol-value symmap))))
+ (while bindings
+ (define-key (symbol-value symmap) (car bindings)
+ 'mew-draft-describe-bindings)
+ (setq bindings (cdr bindings)))))
+
+ (defun mew-draft-describe-bindings (&optional prefix buffer)
+ (interactive "P")
+ (let ((ovls (mew-overlays-at (point))) overriding-local-map)
+ (while ovls
+ (if (setq overriding-local-map
+ (mew-overlay-get (car ovls)
+ (if mew-xemacs-p 'keymap 'local-map)))
+ (prog1 (describe-bindings prefix buffer)
+ (setq ovls nil))
+ (setq ovls (cdr ovls))))))
+
(if mew-draft-body-map
()
(setq mew-draft-body-map (make-sparse-keymap))
-------------- next part --------------
もう一つ、些細なことですが、--with-scrollbars=no で compile された
XEmacs 21.[12] では、scrollbar-height が存在しません。
-------------- next part --------------
Index: mew-summary.el
===================================================================
RCS file: /export/data/cvs/mew/mew-summary.el,v
retrieving revision 1.1.1.1
diff -u -F^( -r1.1.1.1 mew-summary.el
--- mew-summary.el 1999/10/11 11:26:17 1.1.1.1
+++ mew-summary.el 1999/10/11 11:36:07
@@ -514,7 +514,8 @@ (defun mew-summary-setup-menu ()
(if mew-xemacs-p
(progn
(mew-summary-toolbar-update)
- (set-specifier scrollbar-height (cons (current-buffer) 0))
+ (if (featurep 'scrollbar)
+ (set-specifier scrollbar-height (cons (current-buffer) 0)))
(set-buffer-menubar current-menubar)
(if mew-summary-mode-popup-menu
()
-------------- next part --------------
--
Daiki Ueno (ueno at example.com)
Mew-dist メーリングリストの案内