emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Maintenance suggestion on an emacs mode


From: Paul R
Subject: Re: Maintenance suggestion on an emacs mode
Date: Mon, 21 Apr 2008 19:29:53 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Some missing patches can be found below.
I did my best to make acceptable changes, but I might have missed
something, let me know if you find something bad.
I received the fsf papers, I'll send them back tomorrow.

> ,---- RefTex :
>
> Those bindings are not activated by default, in this sens they are
> much like those of modula2 and html-mode. Should they be changed in
> the same way ?

This patch change them.

Index: lisp/textmodes/reftex-vars.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/reftex-vars.el,v
retrieving revision 1.44
diff -U 8 -r1.44 reftex-vars.el
--- lisp/textmodes/reftex-vars.el       10 Apr 2008 14:10:44 -0000      1.44
+++ lisp/textmodes/reftex-vars.el       21 Apr 2008 17:21:49 -0000
@@ -1844,17 +1844,26 @@
 ;; Miscellaneous configurations -----------------------------------------
 
 (defgroup reftex-miscellaneous-configurations nil
   "Collection of further configurations."
   :group 'reftex)
 
 (defcustom reftex-extra-bindings nil
   "Non-nil means, make additional key bindings on startup.
-These extra bindings are located in the users `C-c letter' map."
+These extra bindings are located in the
+`reftex-extra-bindings-map' map, bound to
+`reftex-extra-bindings-prefix'."
+  :group 'reftex-miscellaneous-configurations
+  :type 'boolean)
+
+;; below, default is C-c C-y because it is free in LaTeX mode.
+(defcustom reftex-extra-bindings-prefix "\C-c\C-y"
+  "When `reftex-extra-bindings' is set to non-nil, use extra
+bindings with this prefix bound to `reftex-extra-bindings-map'."
   :group 'reftex-miscellaneous-configurations
   :type 'boolean)
 
 (defcustom reftex-plug-into-AUCTeX nil
   "*Plug-in flags for AUCTeX interface.
 This variable is a list of 4 boolean flags.  When a flag is non-nil,
 RefTeX will
 
Index: lisp/textmodes/reftex.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/textmodes/reftex.el,v
retrieving revision 1.86
diff -U 8 -r1.86 reftex.el
--- lisp/textmodes/reftex.el    10 Apr 2008 14:10:45 -0000      1.86
+++ lisp/textmodes/reftex.el    21 Apr 2008 17:21:50 -0000
@@ -2399,26 +2399,33 @@
       'reftex-mouse-view-crossref)))
 
 ;; Bind `reftex-view-crossref-from-bibtex' in BibTeX mode map
 (eval-after-load
  "bibtex"
  '(define-key bibtex-mode-map "\C-c&" 'reftex-view-crossref-from-bibtex))
 
 ;; If the user requests so, she can have a few more bindings:
+(defvar reftex-extra-bindings-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "t" 'reftex-toc)
+    (define-key map "l" 'reftex-label)
+    (define-key map "r" 'reftex-reference)
+    (define-key map "c" 'reftex-citation)
+    (define-key map "v" 'reftex-view-crossref)
+    (define-key map "g" 'reftex-grep-document)
+    (define-key map "s" 'reftex-search-document)
+    map)
+  "Reftex extra bindings map")
+
 (when reftex-extra-bindings
-  (loop for x in
-        '(("\C-ct" . reftex-toc)
-          ("\C-cl" . reftex-label)
-          ("\C-cr" . reftex-reference)
-          ("\C-cc" . reftex-citation)
-          ("\C-cv" . reftex-view-crossref)
-          ("\C-cg" . reftex-grep-document)
-          ("\C-cs" . reftex-search-document))
-        do (define-key reftex-mode-map (car x) (cdr x))))
+  (define-key reftex-mode-map
+    reftex-extra-bindings-prefix
+    reftex-extra-bindings-map))
+    
 
 ;;; =========================================================================
 ;;;
 ;;; Menu
 
 ;; Define a menu for the menu bar if Emacs is running under X
 
 (defvar reftex-isearch-minor-mode nil)


> ,---- Gnus-Diary 
> | Someone wrote something about it but I can't remember what. Emacs 
> | really needs its bug-tracking system :)
> `----

No fixed.

> ,---- Inf-lisp
> `----
> Maintainer did not answer, should we fix that ?

Not fixed.

> ,---- Ada Mode
> `----
Fixed by the patch below.


Index: lisp/progmodes/ada-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/ada-mode.el,v
retrieving revision 1.94
diff -U 8 -r1.94 ada-mode.el
--- lisp/progmodes/ada-mode.el  24 Feb 2008 10:08:51 -0000      1.94
+++ lisp/progmodes/ada-mode.el  21 Apr 2008 17:21:48 -0000
@@ -445,16 +445,23 @@
 The extensions should include a `.' if needed.")
 
 (defvar ada-mode-menu (make-sparse-keymap "Ada")
   "Menu for Ada mode.")
 
 (defvar ada-mode-map (make-sparse-keymap)
   "Local keymap used for Ada mode.")
 
+(defvar ada-mode-extra-map (make-sparse-keymap)
+  "Keymap used for non-standard keybindings.")
+
+;; default is C-c C-q because it's free in ada-mode-map
+(defvar ada-mode-extra-prefix "\C-c\C-q"
+  "Prefix key to access `ada-mode-extra-map' functions.")
+
 (defvar ada-mode-abbrev-table nil
   "Local abbrev table for Ada mode.")
 
 (defvar ada-mode-syntax-table nil
   "Syntax table to be used for editing Ada source code.")
 
 (defvar ada-mode-symbol-syntax-table nil
   "Syntax table for Ada, where `_' is a word constituent.")
@@ -4534,16 +4541,19 @@
 
 ;; ------------------------------------------------------------
 ;; --  Define keymap and menus for Ada
 ;; -------------------------------------------------------------
 
 (defun ada-create-keymap ()
   "Create the keymap associated with the Ada mode."
 
+  ;; All non-standard keys go into ada-mode-extra-map
+  (define-key ada-mode-map ada-mode-extra-prefix ada-mode-extra-map)
+
   ;; Indentation and Formatting
   (define-key ada-mode-map "\C-j"     'ada-indent-newline-indent-conditional)
   (define-key ada-mode-map "\C-m"     'ada-indent-newline-indent-conditional)
   (define-key ada-mode-map "\t"       'ada-tab)
   (define-key ada-mode-map "\C-c\t"   'ada-justified-indent-current)
   (define-key ada-mode-map "\C-c\C-l" 'ada-indent-region)
   (define-key ada-mode-map [(shift tab)]    'ada-untab)
   (define-key ada-mode-map "\C-c\C-f" 'ada-format-paramlist)
@@ -4582,33 +4592,33 @@
   ;; The following keys are bound to functions defined in ada-xref.el or
   ;; ada-prj,el., However, RMS rightly thinks that the code should be shared,
   ;; and activated only if the right compiler is used
 
   (define-key ada-mode-map (if (featurep 'xemacs) '(shift button3) [S-mouse-3])
     'ada-point-and-xref)
   (define-key ada-mode-map [(control tab)] 'ada-complete-identifier)
 
-  (define-key ada-mode-map "\C-co"     'ff-find-other-file)
+  (define-key ada-mode-extra-map "o"     'ff-find-other-file)
   (define-key ada-mode-map "\C-c5\C-d" 'ada-goto-declaration-other-frame)
   (define-key ada-mode-map "\C-c\C-d"  'ada-goto-declaration)
   (define-key ada-mode-map "\C-c\C-s"  'ada-xref-goto-previous-reference)
   (define-key ada-mode-map "\C-c\C-c"  'ada-compile-application)
-  (define-key ada-mode-map "\C-cc"     'ada-change-prj)
-  (define-key ada-mode-map "\C-cd"     'ada-set-default-project-file)
-  (define-key ada-mode-map "\C-cg"     'ada-gdb-application)
+  (define-key ada-mode-extra-map "c"     'ada-change-prj)
+  (define-key ada-mode-extra-map "d"     'ada-set-default-project-file)
+  (define-key ada-mode-extra-map "g"     'ada-gdb-application)
   (define-key ada-mode-map "\C-c\C-m"  'ada-set-main-compile-application)
-  (define-key ada-mode-map "\C-cr"     'ada-run-application)
+  (define-key ada-mode-extra-map "r"     'ada-run-application)
   (define-key ada-mode-map "\C-c\C-o"  'ada-goto-parent)
   (define-key ada-mode-map "\C-c\C-r"  'ada-find-references)
-  (define-key ada-mode-map "\C-cl"     'ada-find-local-references)
+  (define-key ada-mode-extra-map "l"     'ada-find-local-references)
   (define-key ada-mode-map "\C-c\C-v"  'ada-check-current)
-  (define-key ada-mode-map "\C-cf"     'ada-find-file)
+  (define-key ada-mode-extra-map "f"     'ada-find-file)
 
-  (define-key ada-mode-map "\C-cu"  'ada-prj-edit)
+  (define-key ada-mode-extra-map "u"  'ada-prj-edit)
 
   ;;  The templates, defined in ada-stmt.el
 
   (let ((map (make-sparse-keymap)))
     (define-key map "h"    'ada-header)
     (define-key map "\C-a" 'ada-array)
     (define-key map "b"    'ada-exception-block)
     (define-key map "d"    'ada-declare-block)
@@ -4631,17 +4641,17 @@
     (define-key map "\C-y" 'ada-type)
     (define-key map "\C-v" 'ada-private)
     (define-key map "u"    'ada-use)
     (define-key map "\C-u" 'ada-with)
     (define-key map "\C-w" 'ada-when)
     (define-key map "w"    'ada-while-loop)
     (define-key map "\C-x" 'ada-exception)
     (define-key map "x"    'ada-exit)
-    (define-key ada-mode-map "\C-ct" map))
+    (define-key ada-mode-extra-map "t" map))
   )
 
 
 (defun ada-create-menu ()
   "Create the Ada menu as shown in the menu bar."
   (let ((m '("Ada"
             ("Help"
              ["Ada Mode"               (info "ada-mode") t]

>
> ,---- rmail-spam-filter
> `----
Not fixed.

> ,---- mixal-mode
> `----
Fixed by the patch below.

Index: lisp/progmodes/mixal-mode.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/mixal-mode.el,v
retrieving revision 1.16
diff -U 8 -r1.16 mixal-mode.el
--- lisp/progmodes/mixal-mode.el        8 Jan 2008 20:46:20 -0000       1.16
+++ lisp/progmodes/mixal-mode.el        21 Apr 2008 17:21:48 -0000
@@ -74,20 +74,20 @@
 ;; 09/11/02: started mixal-mode.
 
 ;;; Code:
 (defvar compile-command)
 
 ;;; Key map
 (defvar mixal-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "\C-cc" 'compile)
-    (define-key map "\C-cr" 'mixal-run)
-    (define-key map "\C-cd" 'mixal-debug)
-    (define-key map "\C-ho" 'mixal-describe-operation-code)
+    (define-key map "\C-c\C-c" 'compile)
+    (define-key map "\C-c\C-r" 'mixal-run)
+    (define-key map "\C-c\C-d" 'mixal-debug)
+    (define-key map "\C-h\C-o" 'mixal-describe-operation-code)
     map)
   "Keymap for `mixal-mode'.")
 ;; (makunbound 'mixal-mode-map)
 
 ;;; Syntax table
 (defvar mixal-mode-syntax-table
   (let ((st (make-syntax-table)))
     ;; We need to do a bit more to make fontlocking for comments work.




-- 
      Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]