From: "paul r" <paul.r.ml@gmail.com>
To: "Stefan Monnier" <monnier@iro.umontreal.ca>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Maintenance suggestion on an emacs mode
Date: Mon, 31 Mar 2008 21:04:42 +0200 [thread overview]
Message-ID: <e30f0f320803311204v3f0de31btfddc0d9b75f5ee15@mail.gmail.com> (raw)
In-Reply-To: <jwvve33g8jt.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
2008/3/31, Stefan Monnier <monnier@iro.umontreal.ca>:
> You could do the same here.
Please find attached patches.
3 questions :
- why is sgml in textmodes ?
- files are not indented according to emacs lisp default rules,
should I resend a patch with full reindentation according-to-mode ?
Attached patches do not change indentation.
- When testing this kind of modifications, I could not find a way to
unload a mode so that I could make a modification, and reload the
mode. I ended up closing and reopening an emacs instance for that :)
-- Paul
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sgml-keys.patch --]
[-- Type: text/x-patch; name=sgml-keys.patch, Size: 2660 bytes --]
diff -r 49597064d851 lisp/textmodes/sgml-mode.el
--- a/lisp/textmodes/sgml-mode.el Sun Mar 30 16:22:49 2008 +0200
+++ b/lisp/textmodes/sgml-mode.el Mon Mar 31 20:53:56 2008 +0200
@@ -1552,10 +1552,15 @@ Currently just returns (EMPTY-TAGS UNCLO
:type 'hook
:options '(html-autoview-mode))
-(defvar html-quick-keys sgml-quick-keys
- "Use C-c X combinations for quick insertion of frequent tags when non-nil.
-This defaults to `sgml-quick-keys'.
-This takes effect when first loading the library.")
+(defvar html-use-quick-keys sgml-quick-keys
+ "Use `html-quick-keys-prefix'+letter combinations for quick
+insertion of frequent tags when non-nil. This defaults to
+`sgml-quick-keys'. This takes effect when first loading the
+library.")
+
+(defvar html-quick-keys-prefix "\C-c\C-q"
+ "When `html-use-quick-keys' is set to non-nil, quick keys can be
+ inserted using this prefix.")
(defvar html-mode-map
(let ((map (make-sparse-keymap))
@@ -1578,16 +1583,6 @@ This takes effect when first loading the
(define-key map "\C-c\C-ch" 'html-href-anchor)
(define-key map "\C-c\C-cn" 'html-name-anchor)
(define-key map "\C-c\C-ci" 'html-image)
- (when html-quick-keys
- (define-key map "\C-c-" 'html-horizontal-rule)
- (define-key map "\C-co" 'html-ordered-list)
- (define-key map "\C-cu" 'html-unordered-list)
- (define-key map "\C-cr" 'html-radio-buttons)
- (define-key map "\C-cc" 'html-checkboxes)
- (define-key map "\C-cl" 'html-list-item)
- (define-key map "\C-ch" 'html-href-anchor)
- (define-key map "\C-cn" 'html-name-anchor)
- (define-key map "\C-ci" 'html-image))
(define-key map "\C-c\C-s" 'html-autoview-mode)
(define-key map "\C-c\C-v" 'browse-url-of-buffer)
(define-key map [menu-bar html] (cons "HTML" menu-map))
@@ -1615,6 +1610,23 @@ This takes effect when first loading the
(define-key menu-map "n" '("Name Anchor" . html-name-anchor))
map)
"Keymap for commands for use in HTML mode.")
+
+(defvar html-quick-keys-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map "-" 'html-horizontal-rule)
+ (define-key map "o" 'html-ordered-list)
+ (define-key map "u" 'html-unordered-list)
+ (define-key map "r" 'html-radio-buttons)
+ (define-key map "c" 'html-checkboxes)
+ (define-key map "l" 'html-list-item)
+ (define-key map "h" 'html-href-anchor)
+ (define-key map "n" 'html-name-anchor)
+ (define-key map "i" 'html-image)
+ map)
+ "HTML quick keys keymap.")
+
+(when html-use-quick-keys
+ (define-key html-mode-map html-quick-keys-prefix html-quick-keys-map))
(defvar html-face-tag-alist
'((bold . "b")
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: modula2-keys.patch --]
[-- Type: text/x-patch; name=modula2-keys.patch, Size: 3386 bytes --]
diff -r 49597064d851 lisp/progmodes/modula2.el
--- a/lisp/progmodes/modula2.el Sun Mar 30 16:22:49 2008 +0200
+++ b/lisp/progmodes/modula2.el Mon Mar 31 20:56:51 2008 +0200
@@ -75,35 +75,51 @@
(if m2-mode-map ()
(let ((map (make-sparse-keymap)))
(define-key map "\^i" 'm2-tab)
- (define-key map "\C-cb" 'm2-begin)
- (define-key map "\C-cc" 'm2-case)
- (define-key map "\C-cd" 'm2-definition)
- (define-key map "\C-ce" 'm2-else)
- (define-key map "\C-cf" 'm2-for)
- (define-key map "\C-ch" 'm2-header)
- (define-key map "\C-ci" 'm2-if)
- (define-key map "\C-cm" 'm2-module)
- (define-key map "\C-cl" 'm2-loop)
- (define-key map "\C-co" 'm2-or)
- (define-key map "\C-cp" 'm2-procedure)
- (define-key map "\C-c\C-w" 'm2-with)
- (define-key map "\C-cr" 'm2-record)
- (define-key map "\C-cs" 'm2-stdio)
- (define-key map "\C-ct" 'm2-type)
- (define-key map "\C-cu" 'm2-until)
- (define-key map "\C-cv" 'm2-var)
- (define-key map "\C-cw" 'm2-while)
- (define-key map "\C-cx" 'm2-export)
- (define-key map "\C-cy" 'm2-import)
(define-key map "\C-c{" 'm2-begin-comment)
(define-key map "\C-c}" 'm2-end-comment)
(define-key map "\C-j" 'm2-newline)
- (define-key map "\C-c\C-z" 'suspend-emacs)
(define-key map "\C-c\C-v" 'm2-visit)
(define-key map "\C-c\C-t" 'm2-toggle)
(define-key map "\C-c\C-l" 'm2-link)
(define-key map "\C-c\C-c" 'm2-compile)
(setq m2-mode-map map)))
+
+(defvar m2-use-quick-keys nil
+ "Use `m2-quick-keys-prefix'+letter combinations for quick
+insertion of frequent tags when non-nil. This defaults to nil.
+This takes effect when first loading the library.")
+
+(defvar m2-quick-keys-prefix "\C-c\C-q"
+ "When `m2-use-quick-keys' is set to non-nil, quick keys can be
+ inserted using this prefix.")
+
+(defvar m2-quick-keys-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map "b" 'm2-begin)
+ (define-key map "c" 'm2-case)
+ (define-key map "d" 'm2-definition)
+ (define-key map "e" 'm2-else)
+ (define-key map "f" 'm2-for)
+ (define-key map "h" 'm2-header)
+ (define-key map "i" 'm2-if)
+ (define-key map "l" 'm2-loop)
+ (define-key map "m" 'm2-module)
+ (define-key map "o" 'm2-or)
+ (define-key map "p" 'm2-procedure)
+ (define-key map "r" 'm2-record)
+ (define-key map "s" 'm2-stdio)
+ (define-key map "t" 'm2-type)
+ (define-key map "u" 'm2-until)
+ (define-key map "v" 'm2-var)
+ (define-key map "w" 'm2-while)
+ (define-key map "W" 'm2-with)
+ (define-key map "x" 'm2-export)
+ (define-key map "y" 'm2-import)
+ map)
+ "Modula2 quick keys keymap")
+
+(when m2-use-quick-keys
+ (define-key m2-mode-map m2-quick-keys-prefix m2-quick-keys-map))
(defcustom m2-indent 5
"*This variable gives the indentation in Modula-2-Mode."
@@ -149,8 +165,8 @@ followed by the first character of the c
(setq paragraph-separate paragraph-start)
(make-local-variable 'paragraph-ignore-fill-prefix)
(setq paragraph-ignore-fill-prefix t)
-; (make-local-variable 'indent-line-function)
-; (setq indent-line-function 'c-indent-line)
+ ; (make-local-variable 'indent-line-function)
+ ; (setq indent-line-function 'c-indent-line)
(make-local-variable 'require-final-newline)
(setq require-final-newline mode-require-final-newline)
(make-local-variable 'comment-start)
next prev parent reply other threads:[~2008-03-31 19:04 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-29 22:06 Maintenance suggestion on an emacs mode paul r
2008-03-29 22:15 ` paul r
2008-03-30 5:50 ` Richard Stallman
2008-03-30 15:13 ` paul r
2008-03-30 19:55 ` Richard Stallman
2008-03-30 21:50 ` Mathias Dahl
2008-03-30 22:18 ` Stefan Monnier
2008-03-30 22:24 ` Mathias Dahl
2008-03-30 22:41 ` paul r
2008-03-31 1:57 ` Stefan Monnier
2008-03-31 8:02 ` Mathias Dahl
2008-03-30 22:21 ` Stefan Monnier
2008-03-31 19:04 ` paul r [this message]
2008-04-03 22:20 ` Stefan Monnier
2008-04-03 22:31 ` paul r
2008-04-04 1:08 ` Stefan Monnier
2008-04-04 11:45 ` paul r
2008-04-04 11:54 ` Andreas Schwab
2008-04-04 12:04 ` Paul Rivier
2008-04-04 13:54 ` Stefan Monnier
2008-04-09 21:29 ` Paul R
2008-04-21 17:29 ` Paul R
2008-04-22 20:28 ` Ralf Angeli
2008-04-22 20:53 ` Paul R
2008-04-23 5:28 ` Chong Yidong
2008-04-23 19:57 ` Stefan Monnier
2008-04-23 20:19 ` Ralf Angeli
2008-04-23 21:05 ` Stefan Monnier
2008-04-23 21:20 ` Lennart Borgman (gmail)
2008-04-24 20:23 ` Ralf Angeli
2008-04-24 20:36 ` Lennart Borgman (gmail)
2008-04-23 21:07 ` Paul R
2008-04-24 20:12 ` Ralf Angeli
2008-04-24 21:30 ` Reiner Steib
2008-03-30 5:50 ` Richard Stallman
2008-03-30 11:54 ` User reserved keybindings in `gnus-diary.el' (was: Maintenance suggestion on an emacs mode) Reiner Steib
2008-03-30 13:17 ` paul r
2008-03-30 13:23 ` paul r
2008-03-31 2:52 ` Stephen J. Turnbull
2008-04-01 10:46 ` Maintenance suggestion on an emacs mode Reto Zimmermann
2008-04-03 22:13 ` Stefan Monnier
2008-04-04 9:43 ` Reto Zimmermann
2008-04-05 3:43 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e30f0f320803311204v3f0de31btfddc0d9b75f5ee15@mail.gmail.com \
--to=paul.r.ml@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.