From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.devel Subject: Re: conf-space-mode Date: Mon, 18 Sep 2006 13:00:55 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158577268 31255 80.91.229.2 (18 Sep 2006 11:01:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 18 Sep 2006 11:01:08 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 18 13:01:03 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GPGs2-00058A-PQ for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2006 13:01:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GPGs2-0004II-E3 for ged-emacs-devel@m.gmane.org; Mon, 18 Sep 2006 07:01:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GPGrp-0004Fe-Jt for emacs-devel@gnu.org; Mon, 18 Sep 2006 07:00:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GPGrl-00044X-RD for emacs-devel@gnu.org; Mon, 18 Sep 2006 07:00:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GPGrl-00043z-NG for emacs-devel@gnu.org; Mon, 18 Sep 2006 07:00:45 -0400 Original-Received: from [62.99.145.8] (helo=mx.inode.at) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GPGuZ-0004Kg-5J; Mon, 18 Sep 2006 07:03:39 -0400 Original-Received: from [81.223.36.218] (port=6163 helo=gaston.none) by smartmx-08.inode.at with esmtp (Exim 4.50) id 1GPGrg-0007Qy-43; Mon, 18 Sep 2006 13:00:41 +0200 Original-To: rms@gnu.org Mail-Followup-To: rms@gnu.org, emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:59959 Archived-At: Richard Stallman 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