[ESS] ess patch: avoid (error "Invalid buffer")

Sam Steingold sds at gnu.org
Mon Feb 27 18:24:54 CET 2012


> * Vitalie Spinu <fcvahivg at tznvy.pbz> [2012-02-27 18:12:50 +0100]:
>
> Thanks for the catch, it's applied now.

Thanks.
Here is another patch: all non-editing modes in emacs should inherit
from special mode map:

Index: ess-help.el
===================================================================
--- ess-help.el	(revision 4654)
+++ ess-help.el	(working copy)
@@ -525,14 +525,15 @@ For internal use. Used in `ess-display-h
 ;; (make-variable-buffer-local 'ess-help-sec-map)
 
 (defvar ess-help-mode-map nil "Keymap for ESS help mode.")
-(if ess-help-mode-map
-    nil
+(unless ess-help-mode-map
   (setq ess-help-mode-map (make-keymap)); Full keymap, in order to
   (suppress-keymap ess-help-mode-map)	; suppress all usual "printing" characters
+  (if (fboundp 'set-keymap-parent)
+      (set-keymap-parent ess-help-mode-map special-mode-map)
+    (define-key ess-help-mode-map "q" 'bury-buffer)) ;was 'ess-switch-to-end-of-ESS)
   (define-key ess-help-mode-map " " 'scroll-up)
   (define-key ess-help-mode-map "b" 'scroll-down)
   (define-key ess-help-mode-map "\177" 'scroll-down) ; DEL
-  (define-key ess-help-mode-map "q" 'bury-buffer) ;was 'ess-switch-to-end-of-ESS)
   (define-key ess-help-mode-map "\C-m" 'next-line)
   ;; (define-key ess-help-mode-map "s" ess-help-sec-map)
   (define-key ess-help-mode-map "h" 'ess-display-help-on-object)



-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://www.childpsy.net/ http://honestreporting.com http://dhimmi.com
http://mideasttruth.com http://truepeace.org
Diplomacy is the art of saying "nice doggy" until you can find a rock.



More information about the ESS-help mailing list