diff options
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/cc-fonts.el | 4 | ||||
-rw-r--r-- | lisp/progmodes/compile.el | 13 | ||||
-rw-r--r-- | lisp/progmodes/cwarn.el | 4 | ||||
-rw-r--r-- | lisp/progmodes/ebrowse.el | 14 | ||||
-rw-r--r-- | lisp/progmodes/flymake.el | 4 | ||||
-rw-r--r-- | lisp/progmodes/glasses.el | 4 | ||||
-rw-r--r-- | lisp/progmodes/hideif.el | 4 | ||||
-rw-r--r-- | lisp/progmodes/idlw-help.el | 5 | ||||
-rw-r--r-- | lisp/progmodes/sh-script.el | 13 | ||||
-rw-r--r-- | lisp/progmodes/tcl.el | 56 | ||||
-rw-r--r-- | lisp/progmodes/vhdl-mode.el | 15 |
11 files changed, 101 insertions, 35 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index c5bbfaf86dd..8ca47af91f4 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1,6 +1,6 @@ ;;; cc-fonts.el --- font lock support for CC Mode -;; Copyright (C) 2002, 03 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. ;; Authors: 2003- Alan Mackenzie ;; 2002- Martin Stjernholm @@ -194,7 +194,7 @@ (unless (c-face-name-p c-invalid-face-name) (defconst c-invalid-face 'c-invalid-face) ; Necessary in Emacs 19. (defface c-invalid-face - '((((class color) (background light)) (:foreground "red")) + '((((class color) (background light)) (:foreground "red1")) (((class color)) (:foreground "hotpink")) (t (:inverse-video t))) "Face used to highlight invalid syntax." diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index bafc901d3d1..6df76e21472 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1,7 +1,7 @@ ;;; compile.el --- run compiler as inferior of Emacs, parse error messages ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2001, 2003, 2004 Free Software Foundation, Inc. +;; 2001, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Authors: Roland McGrath <roland@gnu.org>, ;; Daniel Pfeiffer <occitan@esperanto.org> @@ -464,6 +464,8 @@ starting the compilation process.") (defface compilation-info-face '((((class color) (min-colors 16) (background light)) (:foreground "Green3" :weight bold)) + (((class color) (min-colors 88) (background dark)) + (:foreground "Green1" :weight bold)) (((class color) (min-colors 16) (background dark)) (:foreground "Green" :weight bold)) (((class color)) (:foreground "green" :weight bold)) @@ -1233,6 +1235,10 @@ Optional argument MINOR indicates this is called from (make-local-variable 'compilation-messages-start) (make-local-variable 'compilation-error-screen-columns) (make-local-variable 'overlay-arrow-position) + (set (make-local-variable 'overlay-arrow-string) "=>") + (setq next-error-overlay-arrow-position nil) + (add-hook 'kill-buffer-hook + (lambda () (setq next-error-overlay-arrow-position nil)) nil t) ;; Note that compilation-next-error-function is for interfacing ;; with the next-error function in simple.el, and it's only ;; coincidentally named similarly to compilation-next-error. @@ -1641,8 +1647,9 @@ and overlay is highlighted between MK and END-MK." (numberp next-error-highlight))) (delete-overlay compilation-highlight-overlay)))))) (when (and (eq next-error-highlight 'fringe-arrow)) - (set (make-local-variable 'overlay-arrow-position) - (copy-marker (line-beginning-position)))))) + (setq next-error-overlay-arrow-position + (copy-marker (line-beginning-position)))))) + (defun compilation-find-file (marker filename dir &rest formats) "Find a buffer for file FILENAME. diff --git a/lisp/progmodes/cwarn.el b/lisp/progmodes/cwarn.el index b16381cd2c7..9dfd4dd9e26 100644 --- a/lisp/progmodes/cwarn.el +++ b/lisp/progmodes/cwarn.el @@ -1,6 +1,6 @@ ;;; cwarn.el --- highlight suspicious C and C++ constructions -;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc. ;; Author: Anders Lindgren <andersl@andersl.com> ;; Keywords: c, languages, faces @@ -193,7 +193,7 @@ be included in the variable `cwarn-configuration'. By default C and C++ modes are included. With ARG, turn CWarn mode on if and only if arg is positive." - nil cwarn-mode-text nil + :group 'cwarn :lighter cwarn-mode-text (cwarn-font-lock-keywords cwarn-mode) (if font-lock-mode (font-lock-fontify-buffer))) diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index bf11ea28514..ac8ab28d92a 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -1,6 +1,6 @@ ;;; ebrowse.el --- Emacs C++ class browser & tags facility -;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 +;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002, 2005 ;; Free Software Foundation Inc. ;; Author: Gerd Moellmann <gerd@gnu.org> @@ -158,13 +158,15 @@ This space is used to display markers." (defface ebrowse-tree-mark-face - '((t (:foreground "red"))) + '((((min-colors 88)) (:foreground "red1")) + (t (:foreground "red"))) "*The face used for the mark character in the tree." :group 'ebrowse-faces) (defface ebrowse-root-class-face - '((t (:weight bold :foreground "blue"))) + '((((min-colors 88)) (:weight bold :foreground "blue1")) + (t (:weight bold :foreground "blue"))) "*The face used for root classes in the tree." :group 'ebrowse-faces) @@ -182,7 +184,8 @@ This space is used to display markers." (defface ebrowse-member-attribute-face - '((t (:foreground "red"))) + '((((min-colors 88)) (:foreground "red1")) + (t (:foreground "red"))) "*Face used to display member attributes." :group 'ebrowse-faces) @@ -194,7 +197,8 @@ This space is used to display markers." (defface ebrowse-progress-face - '((t (:background "blue"))) + '((((min-colors 88)) (:background "blue1")) + (t (:background "blue"))) "*Face for progress indicator." :group 'ebrowse-faces) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 70150111a86..7067ddca21c 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -964,7 +964,7 @@ Convert it to flymake internal format." (if (consp file) (setq file (car file))) (if (consp line) (setq line (car line))) (if (consp col) (setq col (car col))) - + (when (not (functionp line)) (setq converted-list (cons (list regexp file line col) converted-list))))) converted-list)) @@ -1508,7 +1508,7 @@ Return first 'INCLUDE-DIRS/REL-FILE-NAME' that exists, or just REL-FILE-NAME if "Minor mode to do on-the-fly syntax checking. When called interactively, toggles the minor mode. With arg, turn Flymake mode on if and only if arg is positive." - :lighter flymake-mode-line + :group 'flymake :lighter flymake-mode-line (if flymake-mode (if (flymake-can-syntax-check-file (buffer-file-name)) (flymake-mode-on) diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index dea40b8db19..7aff14ec608 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el @@ -1,6 +1,6 @@ ;;; glasses.el --- make cantReadThis readable -;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2005 Free Software Foundation, Inc. ;; Author: Milan Zamazal <pdm@zamazal.org> ;; Maintainer: Milan Zamazal <pdm@zamazal.org> @@ -251,7 +251,7 @@ recognized according to the current value of the variable `glasses-separator'." "Minor mode for making identifiers likeThis readable. When this mode is active, it tries to add virtual separators (like underscores) at places they belong to." - nil " o^o" nil + :group 'glasses :lighter " o^o" (save-excursion (save-restriction (widen) diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index da6b6f772b6..23031c5bcda 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -1,6 +1,6 @@ ;;; hideif.el --- hides selected code within ifdef -;; Copyright (C) 1988,1994,2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1988, 1994, 2001, 2002, 2005 Free Software Foundation, Inc. ;; Author: Daniel LaLiberte <liberte@holonexus.org> ;; Maintainer: FSF @@ -197,7 +197,7 @@ how the hiding is done: After `show-ifdefs', read-only status is restored to previous value. \\{hide-ifdef-mode-map}" - nil " Ifdef" nil + :group 'hide-ifdef :lighter " Ifdef" (if hide-ifdef-mode (progn ;; inherit global values diff --git a/lisp/progmodes/idlw-help.el b/lisp/progmodes/idlw-help.el index 28f61b6cbcc..e3da5508342 100644 --- a/lisp/progmodes/idlw-help.el +++ b/lisp/progmodes/idlw-help.el @@ -1,7 +1,7 @@ ;;; idlw-help.el --- HTML Help code for IDLWAVE ;; Copyright (c) 2000 Carsten Dominik ;; Copyright (c) 2001, 2002 J.D. Smith -;; Copyright (c) 2003,2004 Free Software Foundation +;; Copyright (c) 2003,2004,2005 Free Software Foundation ;; ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> ;; Carsten Dominik <dominik@astro.uva.nl> @@ -183,7 +183,8 @@ support." :type 'string) (defface idlwave-help-link-face - '((((class color)) (:foreground "Blue")) + '((((min-colors 88) (class color)) (:foreground "Blue1")) + (((class color)) (:foreground "Blue")) (t (:weight bold))) "Face for highlighting links into IDLWAVE online help." :group 'idlwave-online-help) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 6e8062deb34..2fc917c89c6 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -574,7 +574,7 @@ documents - you must insert literal tabs by hand.") ;; but it *did* have an asterisk in the docstring! (defcustom sh-builtins '((bash sh-append posix - "." "alias" "bg" "bind" "builtin" "compgen" "complete" + "." "alias" "bg" "bind" "builtin" "caller" "compgen" "complete" "declare" "dirs" "disown" "enable" "fc" "fg" "help" "history" "jobs" "kill" "let" "local" "popd" "printf" "pushd" "shopt" "source" "suspend" "typeset" "unalias") @@ -779,7 +779,10 @@ See `sh-feature'.") ;; Font-Lock support (defface sh-heredoc-face - '((((class color) + '((((min-colors 88) (class color) + (background dark)) + (:foreground "yellow1" :weight bold)) + (((class color) (background dark)) (:foreground "yellow" :weight bold)) (((class color) @@ -791,6 +794,10 @@ See `sh-feature'.") :group 'sh-indentation) (defvar sh-heredoc-face 'sh-heredoc-face) +(defface sh-escaped-newline '((t :inherit font-lock-string-face)) + "Face used for (non-escaped) backslash at end of a line in Shell-script mode." + :group 'sh-script + :version "22.1") (defvar sh-font-lock-keywords '((csh sh-append shell @@ -815,7 +822,7 @@ See `sh-feature'.") ;; The next entry is only used for defining the others (shell sh-append executable-font-lock-keywords ;; Using font-lock-string-face here confuses sh-get-indent-info. - ("\\\\$" 0 font-lock-warning-face) + ("\\(^\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\\\)$" 3 'sh-escaped-newline) ("\\\\[^A-Za-z0-9]" 0 font-lock-string-face) ("\\${?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\|[$*_]\\)" 1 font-lock-variable-name-face)) diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 4dba6b61a56..95cfbb15196 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -1,6 +1,7 @@ ;;; tcl.el --- Tcl code editing commands for Emacs -;; Copyright (C) 1994,98,1999,2000,01,02,2003,2004 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +;; Free Software Foundation, Inc. ;; Maintainer: FSF ;; Author: Tom Tromey <tromey@redhat.com> @@ -41,6 +42,7 @@ ;; * tcl-typeword-list is similar, but uses font-lock-type-face. ;; * tcl-keyword-list is a list of keywords. I've generally used this ;; for flow-control words. Eg I add "unwind_protect" to this list. +;; * tcl-builtin-list lists commands to be given font-lock-builtin-face. ;; * tcl-type-alist can be used to minimally customize indentation ;; according to context. @@ -192,6 +194,11 @@ inferior Tcl to load that file. The filename will be appropriately quoted for Tcl." :type 'string) +(defface tcl-escaped-newline '((t :inherit font-lock-string-face)) + "Face used for (non-escaped) backslash at end of a line in Tcl mode." + :group 'tcl + :version "22.1") + ;; ;; Keymaps, abbrevs, syntax tables. ;; @@ -371,6 +378,21 @@ Call `tcl-set-font-lock-keywords' after changing this list.") Default list includes some TclX keywords. Call `tcl-set-font-lock-keywords' after changing this list.") +(defvar tcl-builtin-list + '("after" "append" "array" "bgerror" "binary" "catch" "cd" "clock" + "close" "concat" "console" "dde" "encoding" "eof" "exec" "expr" + "fblocked" "fconfigure" "fcopy" "file" "fileevent" "flush" + "format" "gets" "glob" "history" "incr" "info" "interp" "join" + "lappend" "lindex" "linsert" "list" "llength" "load" "lrange" + "lreplace" "lsort" "namespace" "open" "package" "pid" "puts" "pwd" + "read" "regexp" "registry" "regsub" "rename" "scan" "seek" "set" + "socket" "source" "split" "string" "subst" "tell" "time" "trace" + "unknown" "unset" "vwait") + "List of Tcl commands. Used only for highlighting. +Call `tcl-set-font-lock-keywords' after changing this list. +This list excludes those commands already found in `tcl-proc-list' and +`tcl-keyword-list'.") + (defvar tcl-font-lock-keywords nil "Keywords to highlight for Tcl. See variable `font-lock-keywords'. This variable is generally set from `tcl-proc-regexp', @@ -466,14 +488,30 @@ Uses variables `tcl-proc-regexp' and `tcl-keyword-list'." "\\(\\s-\\|$\\)") 2 'font-lock-type-face) + (list (concat "\\_<" (regexp-opt tcl-builtin-list t) "\\_>") + 1 'font-lock-builtin-face) + + ;; When variable names are enclosed in {} braces, any + ;; character can be used. Otherwise just letters, digits, + ;; underscores. Variable names can be prefixed with any + ;; number of "namespace::" qualifiers. A leading "::" refers + ;; to the global namespace. + '("\\${\\([^}]+\\)}" 1 font-lock-variable-name-face) + '("\\$\\(\\(?:::\\)?\\(?:[[:alnum:]_]+::\\)*[[:alnum:]_]+\\)" + 1 font-lock-variable-name-face) + '("\\(?:\\s-\\|^\\|\\[\\)set\\s-+{\\([^}]+\\)}" + 1 font-lock-variable-name-face keep) + '("\\(?:\\s-\\|^\\|\\[\\)set\\s-+\\(\\(?:::\\)?\ +\\(?:[[:alnum:]_]+::\\)*[[:alnum:]_]+\\)" + 1 font-lock-variable-name-face keep) + + '("\\(^\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\\\)$" 3 'tcl-escaped-newline) + ;; Keywords. Only recognized if surrounded by whitespace. ;; FIXME consider using "not word or symbol", not ;; "whitespace". - (cons (concat "\\(\\s-\\|^\\)" - ;; FIXME Use regexp-quote? - (regexp-opt tcl-keyword-list t) - "\\(\\s-\\|$\\)") - 2)))) + (cons (concat "\\_<" (regexp-opt tcl-keyword-list t) "\\_>") + 1)))) (if tcl-proc-regexp () @@ -544,8 +582,8 @@ Commands: (set (make-local-variable 'font-lock-defaults) '(tcl-font-lock-keywords nil nil nil beginning-of-defun - (font-lock-syntactic-keywords . tcl-font-lock-syntactic-keywords) - (parse-sexp-lookup-properties . t))) + (font-lock-syntactic-keywords . tcl-font-lock-syntactic-keywords) + (parse-sexp-lookup-properties . t))) (set (make-local-variable 'imenu-generic-expression) tcl-imenu-generic-expression) @@ -1507,5 +1545,5 @@ The first line is assumed to look like \"#!.../program ...\"." (provide 'tcl) -;;; arch-tag: 8a032554-c3ef-422e-b84c-acec0522179d +;; arch-tag: 8a032554-c3ef-422e-b84c-acec0522179d ;;; tcl.el ends here diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 7e30a816e15..914c6725cc7 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -12593,7 +12593,9 @@ This does background highlighting of translate-off regions.") 'vhdl-highlight-faces 'font-lock-variable-name-face 'custom-face) (defface vhdl-font-lock-prompt-face - '((((class color) (background light)) (:foreground "Red" :bold t)) + '((((min-colors 88) (class color) (background light)) + (:foreground "Red1" :bold t)) + (((class color) (background light)) (:foreground "Red" :bold t)) (((class color) (background dark)) (:foreground "Pink" :bold t)) (t (:inverse-video t))) "Font lock mode face used to highlight prompts." @@ -12634,6 +12636,8 @@ This does background highlighting of translate-off regions.") (defface vhdl-font-lock-reserved-words-face '((((class color) (background light)) (:foreground "Orange" :bold t)) + (((min-colors 88) (class color) (background dark)) + (:foreground "Yellow1" :bold t)) (((class color) (background dark)) (:foreground "Yellow" :bold t)) (t ())) "Font lock mode face used to highlight additional reserved words." @@ -14975,7 +14979,8 @@ expansion function)." :group 'speedbar-faces) (defface vhdl-speedbar-architecture-face - '((((class color) (background light)) (:foreground "Blue")) + '((((min-colors 88) (class color) (background light)) (:foreground "Blue1")) + (((class color) (background light)) (:foreground "Blue")) (((class color) (background dark)) (:foreground "LightSkyBlue"))) "Face used for displaying architecture names." :group 'speedbar-faces) @@ -15000,6 +15005,7 @@ expansion function)." (defface vhdl-speedbar-instantiation-face '((((class color) (background light)) (:foreground "Brown")) + (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1")) (((class color) (background dark)) (:foreground "Yellow"))) "Face used for displaying instantiation names." :group 'speedbar-faces) @@ -15017,7 +15023,9 @@ expansion function)." :group 'speedbar-faces) (defface vhdl-speedbar-architecture-selected-face - '((((class color) (background light)) (:foreground "Blue" :underline t)) + '((((min-colors 88) (class color) (background light)) (:foreground "Blue1" :underline t)) + (((min-colors 88) (class color) (background light)) (:foreground "Blue1" :underline t)) + (((class color) (background light)) (:foreground "Blue" :underline t)) (((class color) (background dark)) (:foreground "LightSkyBlue" :underline t))) "Face used for displaying architecture names." :group 'speedbar-faces) @@ -15036,6 +15044,7 @@ expansion function)." (defface vhdl-speedbar-instantiation-selected-face '((((class color) (background light)) (:foreground "Brown" :underline t)) + (((min-colors 88) (class color) (background dark)) (:foreground "Yellow1" :underline t)) (((class color) (background dark)) (:foreground "Yellow" :underline t))) "Face used for displaying instantiation names." :group 'speedbar-faces) |