* make-help-screen
@ 2008-09-17 15:41 martin rudalics
0 siblings, 0 replies; only message in thread
From: martin rudalics @ 2008-09-17 15:41 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
With emacs -Q
C-h C-h n q
gets me
Buffer is read-only: #<buffer NEWS>
The reason is `make-help-screen' locally binds `minor-mode-map-alist',
calls `help-mode' which calls `view-mode' which adds its bindings to
`minor-mode-map-alist'. Exiting the local binding restores the original
binding of `minor-mode-map-alist' which now doesn't contain the
view-mode bindings. The attached patch solves this problem for me. Any
objections?
martin
[-- Attachment #2: help-macro.diff --]
[-- Type: text/plain, Size: 2673 bytes --]
*** help-macro.el.~1.43.~ 2008-05-06 09:57:37.000000000 +0200
--- help-macro.el 2008-09-17 17:22:19.593750000 +0200
***************
*** 103,109 ****
;; sections, *excluding* where we switch buffers
;; and where we execute the chosen help command.
(local-map (make-sparse-keymap))
! (minor-mode-map-alist nil)
(prev-frame (selected-frame))
config new-frame key char)
(if (string-match "%THIS-KEY%" help-screen)
--- 103,109 ----
;; sections, *excluding* where we switch buffers
;; and where we execute the chosen help command.
(local-map (make-sparse-keymap))
! (new-minor-mode-map-alist minor-mode-map-alist)
(prev-frame (selected-frame))
config new-frame key char)
(if (string-match "%THIS-KEY%" help-screen)
***************
*** 111,117 ****
(replace-match (key-description (substring (this-command-keys) 0 -1))
t t help-screen)))
(unwind-protect
! (progn
(setcdr local-map ,helped-map)
(define-key local-map [t] 'undefined)
;; Make the scroll bar keep working normally.
--- 111,117 ----
(replace-match (key-description (substring (this-command-keys) 0 -1))
t t help-screen)))
(unwind-protect
! (let ((minor-mode-map-alist nil))
(setcdr local-map ,helped-map)
(define-key local-map [t] 'undefined)
;; Make the scroll bar keep working normally.
***************
*** 140,146 ****
(let ((inhibit-read-only t))
(erase-buffer)
(insert help-screen))
! (help-mode)
(goto-char (point-min))
(while (or (memq char (append help-event-list
(cons help-char '(?? ?\C-v ?\s ?\177 delete backspace vertical-scroll-bar ?\M-v))))
--- 140,148 ----
(let ((inhibit-read-only t))
(erase-buffer)
(insert help-screen))
! (let ((minor-mode-map-alist new-minor-mode-map-alist))
! (help-mode)
! (setq new-minor-mode-map-alist minor-mode-map-alist))
(goto-char (point-min))
(while (or (memq char (append help-event-list
(cons help-char '(?? ?\C-v ?\s ?\177 delete backspace vertical-scroll-bar ?\M-v))))
***************
*** 191,198 ****
(ding)))))
(if new-frame (iconify-frame new-frame))
(if config
! (set-window-configuration config))))))
! )))
(provide 'help-macro)
--- 193,200 ----
(ding)))))
(if new-frame (iconify-frame new-frame))
(if config
! (set-window-configuration config))
! (setq minor-mode-map-alist new-minor-mode-map-alist))))))))
(provide 'help-macro)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-09-17 15:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-17 15:41 make-help-screen martin rudalics
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.