+2005-10-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * textmodes/conf-mode.el: Don't use font-lock-defaults-alist.
+ Various docstring and line-width fixups.
+ (conf-mode): Use cond.
+ Set font-lock-defaults. Don't set comment-use-syntax.
+
2005-10-18 David Ponce <david@dponce.com>
* tree-widget.el (tree-widget-button-click): New function.
2005-10-17 Chong Yidong <cyd@stupidchicken.com>
- * cus-edit.el (Custom-move-and-invoke): Deleted.
+ * cus-edit.el (Custom-move-and-invoke): Delete.
(custom-mode-map): Bind mouse-1 to widget-move-and-invoke.
* wid-edit.el (widget-move-and-invoke): New function, from
2005-10-17 Bill Wohler <wohler@newt.com>
- Moved all remaining images from lisp/toolbar to etc/images, moved
- lisp/toolbar/tool-bar to lisp and "deleted" lisp/toolbar. The low
- resolution images were placed in their own directory (low-color).
+ Move all remaining images from lisp/toolbar to etc/images, move
+ lisp/toolbar/tool-bar to lisp and "delete" lisp/toolbar. Place
+ the low resolution images in their own directory (low-color).
* toolbar/attach.*, toolbar/cancel.*, toolbar/close.*,
* toolbar/copy.*, toolbar/cut.*, toolbar/diropen.*, toolbar/exit.*:
* toolbar/mail.*, toolbar/new.*, toolbar/open.*, toolbar/paste.*:
* toolbar/preferences.*, toolbar/print.*, toolbar/save.*:
* toolbar/saveas.*, toolbar/search.*, toolbar/search-replace.*:
- * toolbar/spell.*, toolbar/undo.*: Moved to etc/images.
-
- * toolbar/lc-copy.*: Moved to etc/images/low-color/copy.*.
- * toolbar/lc-cut.*: Moved to etc/images/low-color/cut.*.
- * toolbar/lc-help.*: Moved to etc/images/low-color/help.*.
- * toolbar/lc-home.*: Moved to etc/images/low-color/home.*.
- * toolbar/lc-index.*: Moved to etc/images/low-color/index.*.
- * toolbar/lc-new.*: Moved to etc/images/low-color/new.*.
- * toolbar/lc-open.*: Moved to etc/images/low-color/open.*.
- * toolbar/lc-paste.*: Moved to etc/images/low-color/paste.*.
- * toolbar/lc-preferences.*: Moved to
- etc/images/low-color/preferences.*.
- * toolbar/lc-print.*: Moved to etc/images/low-color/print.*.
- * toolbar/lc-save.*: Moved to etc/images/low-color/save.*.
- * toolbar/lc-saveas.*: Moved to etc/images/low-color/saveas.*.
- * toolbar/lc-search.*: Moved to etc/images/low-color/search.*.
- * toolbar/lc-spell.*: Moved to etc/images/low-color/spell.*.
- * toolbar/lc-undo.*: Moved to etc/images/low-color/undo.*.
-
- To conform with convention, the underscore (_) in the following
- image names were replaced with dash (-) or (/) as appropriate.
-
- * toolbar/back_arrow.*: Moved to etc/images/back-arrow.*.
- * toolbar/fld_open.*: Moved to etc/images/fld-open.*.
- * toolbar/fwd_arrow.*: Moved to etc/images/fwd-arrow.*.
- * toolbar/jump_to.*: Moved to etc/images/jump-to.*.
- * toolbar/left_arrow.*: Moved to etc/images/left-arrow.*.
- * toolbar/right_arrow.*: Moved to etc/images/right-arrow.*.
- * toolbar/up_arrow.*: Moved to etc/images/up-arrow.*.
- * toolbar/lc-back_arrow.*.: Moved to etc/images/low-color/back-arrow.*.
- * toolbar/lc-fwd_arrow.*.: Moved to etc/images/low-color/fwd-arrow.*.
- * toolbar/lc-jump_to.*: Moved to etc/images/low-color/jump-to.*.
- * toolbar/lc-left_arrow.*.: Moved to etc/images/low-color/left-arrow.*.
- * toolbar/lc-right_arrow.*.: Moved to
- etc/images/low-color/right-arrow.*.
- * toolbar/lc-up_arrow.*: Moved to etc/images/low-color/up-arrow.*.
- * toolbar/mail_compose.*.: Moved to etc/images/mail/compose.*.
- * toolbar/mail_send.*: Moved to etc/images/mail/send.*.
-
- * info.el (info-tool-bar-map): Replaced underscores in image names
+ * toolbar/spell.*, toolbar/undo.*: Move to etc/images.
+
+ * toolbar/lc-copy.*: Move to etc/images/low-color/copy.*.
+ * toolbar/lc-cut.*: Move to etc/images/low-color/cut.*.
+ * toolbar/lc-help.*: Move to etc/images/low-color/help.*.
+ * toolbar/lc-home.*: Move to etc/images/low-color/home.*.
+ * toolbar/lc-index.*: Move to etc/images/low-color/index.*.
+ * toolbar/lc-new.*: Move to etc/images/low-color/new.*.
+ * toolbar/lc-open.*: Move to etc/images/low-color/open.*.
+ * toolbar/lc-paste.*: Move to etc/images/low-color/paste.*.
+ * toolbar/lc-preferences.*: Move to etc/images/low-color/preferences.*.
+ * toolbar/lc-print.*: Move to etc/images/low-color/print.*.
+ * toolbar/lc-save.*: Move to etc/images/low-color/save.*.
+ * toolbar/lc-saveas.*: Move to etc/images/low-color/saveas.*.
+ * toolbar/lc-search.*: Move to etc/images/low-color/search.*.
+ * toolbar/lc-spell.*: Move to etc/images/low-color/spell.*.
+ * toolbar/lc-undo.*: Move to etc/images/low-color/undo.*.
+
+ To conform with convention, replace the underscore (_) in the
+ following image names with dash (-) or (/) as appropriate.
+
+ * toolbar/back_arrow.*: Move to etc/images/back-arrow.*.
+ * toolbar/fld_open.*: Move to etc/images/fld-open.*.
+ * toolbar/fwd_arrow.*: Move to etc/images/fwd-arrow.*.
+ * toolbar/jump_to.*: Move to etc/images/jump-to.*.
+ * toolbar/left_arrow.*: Move to etc/images/left-arrow.*.
+ * toolbar/right_arrow.*: Move to etc/images/right-arrow.*.
+ * toolbar/up_arrow.*: Move to etc/images/up-arrow.*.
+ * toolbar/lc-back_arrow.*: Move to etc/images/low-color/back-arrow.*.
+ * toolbar/lc-fwd_arrow.*: Move to etc/images/low-color/fwd-arrow.*.
+ * toolbar/lc-jump_to.*: Move to etc/images/low-color/jump-to.*.
+ * toolbar/lc-left_arrow.*: Move to etc/images/low-color/left-arrow.*.
+ * toolbar/lc-right_arrow.*: Move to etc/images/low-color/right-arrow.*.
+ * toolbar/lc-up_arrow.*: Move to etc/images/low-color/up-arrow.*.
+ * toolbar/mail_compose.*: Move to etc/images/mail/compose.*.
+ * toolbar/mail_send.*: Move to etc/images/mail/send.*.
+
+ * info.el (info-tool-bar-map): Replace underscores in image names
with dashes.
- * makefile.w32-in (WINS): Removed toolbar.
+ * makefile.w32-in (WINS): Remove toolbar.
- * menu-bar.el: Replaced toolbar/tool-bar.el with tool-bar.el in
- comment.
+ * menu-bar.el: Replace toolbar/tool-bar.el with tool-bar.el in comment.
- * tool-bar.el: Moved to lisp from toolbar. Now that
- toolbar is empty, it should be deleted when folks run "cvs up
- -P".
+ * tool-bar.el: Move to lisp from toolbar. Now that
+ toolbar is empty, it should be deleted when folks run "cvs up -P".
2005-10-18 Jay Belanger <belanger@truman.edu>
(define-key map "\C-c'" 'conf-quote-normal)
(define-key map "\C-c\C-a" 'conf-align-assignments)
map)
- "Local keymap for conf-mode buffers.")
+ "Local keymap for `conf-mode' buffers.")
(defvar conf-mode-syntax-table
(let ((table (make-syntax-table)))
(modify-syntax-entry ?\n ">" table)
(modify-syntax-entry ?\r ">" table)
table)
- "Syntax table in use in Windows style conf-mode buffers.")
+ "Syntax table in use in Windows style `conf-mode' buffers.")
(defvar conf-unix-mode-syntax-table
(let ((table (make-syntax-table conf-mode-syntax-table)))
;; override
(modify-syntax-entry ?\; "." table)
table)
- "Syntax table in use in Unix style conf-mode buffers.")
+ "Syntax table in use in Unix style `conf-mode' buffers.")
(defvar conf-javaprop-mode-syntax-table
(let ((table (make-syntax-table conf-unix-mode-syntax-table)))
(modify-syntax-entry ?\' "." table)
(modify-syntax-entry ?\; "." table)
table)
- "Syntax table in use in PPD conf-mode buffers.")
+ "Syntax table in use in PPD `conf-mode' buffers.")
(defvar conf-xdefaults-mode-syntax-table
(let ((table (make-syntax-table conf-mode-syntax-table)))
;; override
(modify-syntax-entry ?\; "." table)
table)
- "Syntax table in use in Xdefaults style conf-mode buffers.")
+ "Syntax table in use in Xdefaults style `conf-mode' buffers.")
(defvar conf-font-lock-keywords
(2 'font-lock-constant-face nil t))
;; section { ... } (do this last because some assign ...{...)
("^[ \t]*\\([^=:\n]+?\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face prepend))
- "Keywords to hilight in Conf mode")
+ "Keywords to hilight in Conf mode.")
(defvar conf-javaprop-font-lock-keywords
'(;; var=val
(5 'font-lock-variable-name-face nil t)
(6 'font-lock-constant-face nil t)
(7 'font-lock-variable-name-face nil t)))
- "Keywords to hilight in Conf Java Properties mode")
+ "Keywords to hilight in Conf Java Properties mode.")
(defvar conf-space-keywords-alist
'(("\\`/etc/gpm/" . "key\\|name\\|foreground\\|background\\|border\\|head")
'(1 'font-lock-keyword-face)
'(2 'font-lock-variable-name-face))
'("^[ \t]*\\([^\000- ]+\\)" 1 'font-lock-variable-name-face)))
- "Keywords to hilight in Conf Space mode")
+ "Keywords to hilight in Conf Space mode.")
(defvar conf-colon-font-lock-keywords
`(;; [section] (do this first because it may look like a parameter)
(1 'font-lock-variable-name-face))
;; section { ... } (do this last because some assign ...{...)
("^[ \t]*\\([^:\n]+\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face prepend))
- "Keywords to hilight in Conf Colon mode")
+ "Keywords to hilight in Conf Colon mode.")
(defvar conf-assignment-sign ?=
"What sign is used for assignments.")
(if (>= arg 0)
(progn
(indent-to-column arg)
- (or (not conf-assignment-space) (memq (char-before (point)) '(?\s ?\t)) (insert ?\s))
- (insert conf-assignment-sign (if (and conf-assignment-space (not (eolp))) ?\s "")))
+ (or (not conf-assignment-space)
+ (memq (char-before (point)) '(?\s ?\t)) (insert ?\s))
+ (insert conf-assignment-sign
+ (if (and conf-assignment-space (not (eolp))) ?\s "")))
(insert (if conf-assignment-space ?\s "") conf-assignment-sign)
(unless (eolp)
(indent-to-column (- arg))
- (or (not conf-assignment-space) (memq (char-before (point)) '(?\s ?\t)) (insert ?\s))))
+ (or (not conf-assignment-space)
+ (memq (char-before (point)) '(?\s ?\t)) (insert ?\s))))
(unless (eolp)
(if (>= (current-column) (abs arg))
(insert ?\s)
unbalanced, but hey...)"
(interactive "P")
(let ((table (copy-syntax-table (syntax-table))))
- (if (or (not arg) (= (prefix-numeric-value arg) 1)) (modify-syntax-entry ?\' "." table))
- (if (or (not arg) (= (prefix-numeric-value arg) 2)) (modify-syntax-entry ?\" "." table))
+ (if (or (not arg) (= (prefix-numeric-value arg) 1))
+ (modify-syntax-entry ?\' "." table))
+ (if (or (not arg) (= (prefix-numeric-value arg) 2))
+ (modify-syntax-entry ?\" "." table))
(set-syntax-table table)
(and (boundp 'font-lock-mode)
font-lock-mode
((looking-at ".*{")) ; nop
((setq space (1+ space))))
(forward-line)))
- (if (> jp (max unix win 3))
- (conf-javaprop-mode)
- (if (> colon (max equal space))
- (conf-colon-mode)
- (if (> space (max equal colon))
- (conf-space-mode)
- (if (or (> win unix)
- (and (= win unix) (eq system-type 'windows-nt)))
- (conf-windows-mode)
- (conf-unix-mode))))))
+ (cond
+ ((> jp (max unix win 3)) (conf-javaprop-mode))
+ ((> colon (max equal space)) (conf-colon-mode))
+ ((> space (max equal colon)) (conf-space-mode))
+ ((or (> win unix) (and (= win unix) (eq system-type 'windows-nt)))
+ (conf-windows-mode))
+ (t (conf-unix-mode))))
(kill-all-local-variables)
(use-local-map conf-mode-map)
(setq major-mode 'conf-mode
mode-name name)
+ (set (make-local-variable 'font-lock-defaults)
+ '(conf-font-lock-keywords nil t nil nil))
(set (make-local-variable 'comment-start) comment)
(set (make-local-variable 'comment-start-skip)
(concat (regexp-quote comment-start) "+\\s *"))
- (set (make-local-variable 'comment-use-syntax) t)
+ ;; Let newcomment.el decide this for himself.
+ ;; (set (make-local-variable 'comment-use-syntax) t)
(set (make-local-variable 'parse-sexp-ignore-comments) t)
(set (make-local-variable 'outline-regexp)
"[ \t]*\\(?:\\[\\|.+[ \t\n]*{\\)")
Comments start with `#'.
For details see `conf-mode'. Example:
-# Conf mode font-locks this right on Unix and with C-c C-u
+# Conf mode font-locks this right on Unix and with \\[conf-unix-mode]
\[Desktop Entry]
Encoding=UTF-8
Comments start with `;'.
For details see `conf-mode'. Example:
-; Conf mode font-locks this right on Windows and with C-c C-w
+; Conf mode font-locks this right on Windows and with \\[conf-windows-mode]
\[ExtShellFolderViews]
Default={5984FFE0-28D4-11CF-AE66-08002B2E1262}
between `/*' and `*/'.
For details see `conf-mode'. Example:
-# Conf mode font-locks this right with C-c C-j (Java properties)
+# Conf mode font-locks this right with \\[conf-javaprop-mode] (Java properties)
// another kind of comment
/* yet another */
For details see `conf-mode'. Example:
-# Conf mode font-locks this right with C-c C-s (space separated)
+# Conf mode font-locks this right with \\[conf-space-mode] (space separated)
image/jpeg jpeg jpg jpe
image/png png
\"Assignments\" are with `:'.
For details see `conf-mode'. Example:
-# Conf mode font-locks this right with C-c C-c (colon)
+# Conf mode font-locks this right with \\[conf-colon-mode] (colon)
<Multi_key> <exclam> <exclam> : \"\\241\" exclamdown
<Multi_key> <c> <slash> : \"\\242\" cent"
Comments start with `*%' and \"assignments\" are with `:'.
For details see `conf-mode'. Example:
-*% Conf mode font-locks this right with C-c C-p (PPD)
+*% Conf mode font-locks this right with \\[conf-ppd-mode] (PPD)
*DefaultTransfer: Null
*Transfer Null.Inverse: \"{ 1 exch sub }\""
Comments start with `!' and \"assignments\" are with `:'.
For details see `conf-mode'. Example:
-! Conf mode font-locks this right with C-c C-x (.Xdefaults)
+! Conf mode font-locks this right with \\[conf-xdefaults-mode] (.Xdefaults)
*background: gray99
*foreground: black"
(interactive)
(conf-colon-mode "!" conf-xdefaults-mode-syntax-table "Conf[Xdefaults]"))
-
-;; font lock support
-(if (boundp 'font-lock-defaults-alist)
- (add-to-list
- 'font-lock-defaults-alist
- (cons 'conf-mode
- (list 'conf-font-lock-keywords nil t nil nil))))
-
-
(provide 'conf-mode)
;; arch-tag: 0a3805b2-0371-4d3a-8498-8897116b2356