all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Wolfgang Jenkner <wjenkner@inode.at>
Cc: emacs-devel@gnu.org
Subject: Re: conf-space-mode
Date: Mon, 18 Sep 2006 13:00:55 +0200	[thread overview]
Message-ID: <m264flzbfc.fsf@gaston.none> (raw)
In-Reply-To: E1GOfU8-0004qI-GP@fencepost.gnu.org

Richard Stallman <rms@gnu.org> 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

  reply	other threads:[~2006-09-18 11:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-10 13:04 conf-space-mode Richard Stallman
2006-09-11  1:06 ` conf-space-mode Wolfgang Jenkner
2006-09-11 19:58   ` conf-space-mode Richard Stallman
2006-09-12  5:32     ` conf-space-mode Wolfgang Jenkner
2006-09-15 14:29       ` conf-space-mode Richard Stallman
2006-09-16 13:45         ` conf-space-mode Wolfgang Jenkner
2006-09-16 19:05           ` conf-space-mode Richard Stallman
2006-09-18 11:00             ` Wolfgang Jenkner [this message]
2006-09-18 18:52               ` conf-space-mode Richard Stallman

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=m264flzbfc.fsf@gaston.none \
    --to=wjenkner@inode.at \
    --cc=emacs-devel@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.