[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: conf-space-mode
From: |
Wolfgang Jenkner |
Subject: |
Re: conf-space-mode |
Date: |
Mon, 18 Sep 2006 13:00:55 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> I will install these changes. Thanks.
Here's some cleanup and a fix for a critical typo in `conf-space-keywords'.
There's also some whitespace cleanup, which shows up in the patch.
* textmodes/conf-mode.el (conf-space-mode): Doc fix.
Clarify comment.
Delete duplicate make-local-variable form.
(conf-space-keywords): Add autoload cookie.
Fix typo (`keywords', not `keyword').
Index: conf-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/textmodes/conf-mode.el,v
retrieving revision 1.17
diff -c -r1.17 conf-mode.el
*** conf-mode.el 16 Sep 2006 18:43:57 -0000 1.17
--- conf-mode.el 18 Sep 2006 10:39:20 -0000
***************
*** 446,455 ****
(define-derived-mode conf-space-mode conf-unix-mode "Conf[Space]"
"Conf Mode starter for space separated conf files.
\"Assignments\" are with ` '. Keywords before the parameters are
! recognized according to the variable `conf-space-keywords'. Interactively
! with a prefix ARG of `0' no keywords will be recognized. With
! any other prefix arg you will be prompted for a regexp to match
! the keywords.
For details see `conf-mode'. Example:
--- 446,456 ----
(define-derived-mode conf-space-mode conf-unix-mode "Conf[Space]"
"Conf Mode starter for space separated conf files.
\"Assignments\" are with ` '. Keywords before the parameters are
! recognized according to the variable `conf-space-keywords-alist'.
! Alternatively, you can specify a value for the file local variable
! `conf-space-keywords'.
! Use the function `conf-space-keywords' if you want to specify keywords
! in an interactive fashion instead.
For details see `conf-mode'. Example:
***************
*** 469,478 ****
(setq conf-assignment-sign nil)
(make-local-variable 'conf-space-keywords)
(cond (buffer-file-name
! ;; By setting conf-space-keywords directly,
! ;; we let a value in the local variables list take precedence.
! (make-local-variable 'conf-space-keywords)
! (setq conf-space-keywords
(assoc-default buffer-file-name conf-space-keywords-alist
'string-match))))
(conf-space-mode-internal)
--- 470,479 ----
(setq conf-assignment-sign nil)
(make-local-variable 'conf-space-keywords)
(cond (buffer-file-name
! ;; We set conf-space-keywords directly, but a value which is
! ;; in the local variables list or interactively specified
! ;; (see the function conf-space-keywords) takes precedence.
! (setq conf-space-keywords
(assoc-default buffer-file-name conf-space-keywords-alist
'string-match))))
(conf-space-mode-internal)
***************
*** 480,492 ****
;; recompute other things from that afterward.
(add-hook 'hack-local-variables-hook 'conf-space-mode-internal nil t))
(defun conf-space-keywords (keywords)
"Enter Conf Space mode using regexp KEYWORDS to match the keywords.
See `conf-space-mode'."
(interactive "sConf Space keyword regexp: ")
(delay-mode-hooks
(conf-space-mode))
! (if (string-equal keyword "")
(setq keywords nil))
(setq conf-space-keywords keywords)
(conf-space-mode-internal)
--- 481,494 ----
;; recompute other things from that afterward.
(add-hook 'hack-local-variables-hook 'conf-space-mode-internal nil t))
+ ;;;###autoload
(defun conf-space-keywords (keywords)
"Enter Conf Space mode using regexp KEYWORDS to match the keywords.
See `conf-space-mode'."
(interactive "sConf Space keyword regexp: ")
(delay-mode-hooks
(conf-space-mode))
! (if (string-equal keywords "")
(setq keywords nil))
(setq conf-space-keywords keywords)
(conf-space-mode-internal)
***************
*** 517,523 ****
(concat "^[ \t]*\\(?:" conf-space-keywords
"\\)[ \t]+\\([^ \t\n]+\\)\\(?:[ \t]\\|$\\)")
"^[ \t]*\\([^ \t\n[]+\\)\\(?:[ \t]\\|$\\)")
! 1)
imenu-generic-expression)))
;;;###autoload
--- 519,525 ----
(concat "^[ \t]*\\(?:" conf-space-keywords
"\\)[ \t]+\\([^ \t\n]+\\)\\(?:[ \t]\\|$\\)")
"^[ \t]*\\([^ \t\n[]+\\)\\(?:[ \t]\\|$\\)")
! 1)
imenu-generic-expression)))
;;;###autoload
- conf-space-mode, Richard Stallman, 2006/09/10
- Re: conf-space-mode, Wolfgang Jenkner, 2006/09/10
- Re: conf-space-mode, Richard Stallman, 2006/09/11
- Re: conf-space-mode, Wolfgang Jenkner, 2006/09/12
- Re: conf-space-mode, Richard Stallman, 2006/09/15
- Re: conf-space-mode, Wolfgang Jenkner, 2006/09/16
- Re: conf-space-mode, Richard Stallman, 2006/09/16
- Re: conf-space-mode,
Wolfgang Jenkner <=
- Re: conf-space-mode, Richard Stallman, 2006/09/18