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

Re: Hyperlatex default emacs key bindings for Debian



Hi,

Tatsuya Kinoshita wrote:
> Don't use C-c LETTER, because these sequences are reserved for
> users.
>
> "GNU Emacs Lisp Reference Manual":
>
> | Emacs Lisp CodingConventions
>
> |    * Please do not define `C-c LETTER' as a key in your major modes.
> |      These sequences are reserved for users; they are the *only*
> |      sequences reserved for users, so do not block them.
> | 
> |      Instead, define sequences consisting of `C-c' followed by a control
> |      character, a digit, or certain punctuation characters.  These
> |      sequences are reserved for major modes.

Thanks for your tip! What about the following:

======================================================================
--- debian/42hyperlatex.el      2003-05-19 15:25:18.000000000 +0200
+++ debian/42hyperlatex.el.new  2003-08-10 18:14:08.000000000 +0200
@@ -5,4 +5,11 @@
              (parse-colon-path (getenv "HYPERLATEX_DIR")))) 
 (autoload 'hyperlatex-format-buffer "hyperlatex/hyperlatex" 
   "Process the current buffer as hyperlatex code, into a Html
document." t) 
-(global-set-key "\C-ch" 'hyperlatex-format-buffer)
+(if (not (featurep 'latex))
+    (add-to-list 'after-load-alist
+                 '("latex" (define-key LaTeX-mode-map
+                             (kbd "C-c C-c h")
+                             'hyperlatex-format-buffer)))
+  (define-key LaTeX-mode-map
+    (kbd "C-c C-c h")
+    'hyperlatex-format-buffer))
======================================================================

Or what do you actually suggest? Is the rest ok?

Thanks in advance.

bye,
  Roland

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: