aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-09-18 17:19:16 +0000
committerRichard M. Stallman2006-09-18 17:19:16 +0000
commite5e0a7db2646824a6231feb06d2a690757a391ad (patch)
tree2347c65bb7737f1c2f1e2ac7eadd4d8682616d92
parentd7131bd33f73392e8b82952170353152b33f278b (diff)
downloademacs-e5e0a7db2646824a6231feb06d2a690757a391ad.tar.gz
emacs-e5e0a7db2646824a6231feb06d2a690757a391ad.zip
(conf-space-mode): Doc fix.
Delete duplicate make-local-variable form. (conf-space-keywords): Add autoload cookie. Fix typo (`keywords', not `keyword').
-rw-r--r--lisp/textmodes/conf-mode.el20
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/textmodes/conf-mode.el b/lisp/textmodes/conf-mode.el
index 98a81831dd4..f7a725242ed 100644
--- a/lisp/textmodes/conf-mode.el
+++ b/lisp/textmodes/conf-mode.el
@@ -446,10 +446,11 @@ x.2.y.1.z.2.zz ="
446(define-derived-mode conf-space-mode conf-unix-mode "Conf[Space]" 446(define-derived-mode conf-space-mode conf-unix-mode "Conf[Space]"
447 "Conf Mode starter for space separated conf files. 447 "Conf Mode starter for space separated conf files.
448\"Assignments\" are with ` '. Keywords before the parameters are 448\"Assignments\" are with ` '. Keywords before the parameters are
449recognized according to the variable `conf-space-keywords'. Interactively 449recognized according to the variable `conf-space-keywords-alist'.
450with a prefix ARG of `0' no keywords will be recognized. With 450Alternatively, you can specify a value for the file local variable
451any other prefix arg you will be prompted for a regexp to match 451`conf-space-keywords'.
452the keywords. 452Use the function `conf-space-keywords' if you want to specify keywords
453in an interactive fashion instead.
453 454
454For details see `conf-mode'. Example: 455For details see `conf-mode'. Example:
455 456
@@ -469,9 +470,9 @@ add /dev/mixer desktop"
469 (setq conf-assignment-sign nil) 470 (setq conf-assignment-sign nil)
470 (make-local-variable 'conf-space-keywords) 471 (make-local-variable 'conf-space-keywords)
471 (cond (buffer-file-name 472 (cond (buffer-file-name
472 ;; By setting conf-space-keywords directly, 473 ;; We set conf-space-keywords directly, but a value which is
473 ;; we let a value in the local variables list take precedence. 474 ;; in the local variables list or interactively specified
474 (make-local-variable 'conf-space-keywords) 475 ;; (see the function conf-space-keywords) takes precedence.
475 (setq conf-space-keywords 476 (setq conf-space-keywords
476 (assoc-default buffer-file-name conf-space-keywords-alist 477 (assoc-default buffer-file-name conf-space-keywords-alist
477 'string-match)))) 478 'string-match))))
@@ -480,13 +481,14 @@ add /dev/mixer desktop"
480 ;; recompute other things from that afterward. 481 ;; recompute other things from that afterward.
481 (add-hook 'hack-local-variables-hook 'conf-space-mode-internal nil t)) 482 (add-hook 'hack-local-variables-hook 'conf-space-mode-internal nil t))
482 483
484;;;###autoload
483(defun conf-space-keywords (keywords) 485(defun conf-space-keywords (keywords)
484 "Enter Conf Space mode using regexp KEYWORDS to match the keywords. 486 "Enter Conf Space mode using regexp KEYWORDS to match the keywords.
485See `conf-space-mode'." 487See `conf-space-mode'."
486 (interactive "sConf Space keyword regexp: ") 488 (interactive "sConf Space keyword regexp: ")
487 (delay-mode-hooks 489 (delay-mode-hooks
488 (conf-space-mode)) 490 (conf-space-mode))
489 (if (string-equal keyword "") 491 (if (string-equal keywords "")
490 (setq keywords nil)) 492 (setq keywords nil))
491 (setq conf-space-keywords keywords) 493 (setq conf-space-keywords keywords)
492 (conf-space-mode-internal) 494 (conf-space-mode-internal)
@@ -517,7 +519,7 @@ See `conf-space-mode'."
517 (concat "^[ \t]*\\(?:" conf-space-keywords 519 (concat "^[ \t]*\\(?:" conf-space-keywords
518 "\\)[ \t]+\\([^ \t\n]+\\)\\(?:[ \t]\\|$\\)") 520 "\\)[ \t]+\\([^ \t\n]+\\)\\(?:[ \t]\\|$\\)")
519 "^[ \t]*\\([^ \t\n[]+\\)\\(?:[ \t]\\|$\\)") 521 "^[ \t]*\\([^ \t\n[]+\\)\\(?:[ \t]\\|$\\)")
520 1) 522 1)
521 imenu-generic-expression))) 523 imenu-generic-expression)))
522 524
523;;;###autoload 525;;;###autoload