emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/make-mode.el


From: Daniel Pfeiffer
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/make-mode.el
Date: Fri, 03 Jun 2005 04:42:33 -0400

Index: emacs/lisp/progmodes/make-mode.el
diff -c emacs/lisp/progmodes/make-mode.el:1.99 
emacs/lisp/progmodes/make-mode.el:1.100
*** emacs/lisp/progmodes/make-mode.el:1.99      Sun May 29 07:59:51 2005
--- emacs/lisp/progmodes/make-mode.el   Fri Jun  3 08:42:33 2005
***************
*** 111,117 ****
    '((t (:underline t)))
    "Face to use for additionally highlighting rule targets in Font-Lock mode."
    :group 'faces
!   :group 'makefile)
  
  (defface makefile-shell-face
    '((((class color) (background light)) (:background  "seashell1"))
--- 111,118 ----
    '((t (:underline t)))
    "Face to use for additionally highlighting rule targets in Font-Lock mode."
    :group 'faces
!   :group 'makefile
!   :version "22.1")
  
  (defface makefile-shell-face
    '((((class color) (background light)) (:background  "seashell1"))
***************
*** 119,125 ****
      (t (:reverse-video t)))
    "Face to use for additionally highlighting Shell commands in Font-Lock 
mode."
    :group 'faces
!   :group 'makefile)
  
  (defface makefile-makepp-perl-face
    '((((class color) (background light)) (:background  "LightBlue1")) ; Camel 
Book
--- 120,127 ----
      (t (:reverse-video t)))
    "Face to use for additionally highlighting Shell commands in Font-Lock 
mode."
    :group 'faces
!   :group 'makefile
!   :version "22.1")
  
  (defface makefile-makepp-perl-face
    '((((class color) (background light)) (:background  "LightBlue1")) ; Camel 
Book
***************
*** 127,133 ****
      (t (:reverse-video t)))
    "Face to use for additionally highlighting Perl code in Font-Lock mode."
    :group 'faces
!   :group 'makefile)
  
  (defcustom makefile-browser-buffer-name "*Macros and Targets*"
    "*Name of the macro- and target browser buffer."
--- 129,136 ----
      (t (:reverse-video t)))
    "Face to use for additionally highlighting Perl code in Font-Lock mode."
    :group 'faces
!   :group 'makefile
!   :version "22.1")
  
  (defcustom makefile-browser-buffer-name "*Macros and Targets*"
    "*Name of the macro- and target browser buffer."
***************
*** 262,267 ****
--- 265,275 ----
    "^ *\\(\\(?: 
*\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|
 *[^ \n$#:=]+\\)+?\\)[ \t]*\\(:\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ 
\t]*\\(.+\\)\\)?\\)"
    "Regex used to find dependency lines in a makefile.")
  
+ (defconst makefile-bsdmake-dependency-regex
+   (progn (string-match (regexp-quote "\\(:\\)") makefile-dependency-regex)
+        (replace-match "\\([:!]\\)" t t makefile-dependency-regex))
+   "Regex used to find dependency lines in a BSD makefile.")
+ 
  (defvar makefile-dependency-skip "^:"
    "Characters to skip to find a line that might be a dependency.")
  
***************
*** 269,274 ****
--- 277,292 ----
    "^\t[ \t]*\\(address@hidden)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)"
    "Regex used to highlight rule action lines in font lock mode.")
  
+ (defconst makefile-makepp-rule-action-regex
+   ;; Don't care about initial tab, but I don't know how to font-lock 
correctly without.
+   "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|address@hidden)[ 
\t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)"
+   "Regex used to highlight makepp rule action lines in font lock mode.")
+ 
+ (defconst makefile-bsdmake-rule-action-regex
+   (progn (string-match "-@" makefile-rule-action-regex)
+        (replace-match "-+@" t t makefile-rule-action-regex))
+   "Regex used to highlight BSD rule action lines in font lock mode.")
+ 
  ;; Note that the first and second subexpression is used by font lock.  Note
  ;; that if you change this regexp you might have to fix the imenu index in
  ;; makefile-imenu-generic-expression.
***************
*** 849,858 ****
  ;;;###autoload
  (define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile"
    "An adapted `makefile-mode' that knows about makepp."
!    (set (make-local-variable 'makefile-rule-action-regex)
!       ;; Don't care about initial tab, but I don't know how to font-lock 
correctly without.
!       "^\t[ \t]*\\(\\(?:\\(?:noecho\\|ignore[-_]error\\|address@hidden)[ 
\t]*\\)*\\)\\(\\(&\\S +\\)?\\(?:.*\\\\\n\\)*.*\\)")
! 
    (setq font-lock-defaults
        `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))
        imenu-generic-expression
--- 867,874 ----
  ;;;###autoload
  (define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile"
    "An adapted `makefile-mode' that knows about makepp."
!   (set (make-local-variable 'makefile-rule-action-regex)
!        makefile-makepp-rule-action-regex)
    (setq font-lock-defaults
        `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults))
        imenu-generic-expression
***************
*** 863,873 ****
  (define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile"
    "An adapted `makefile-mode' that knows about BSD make."
    (set (make-local-variable 'makefile-dependency-regex)
!        ;; Identical to default, except allows `!' instead of `:'.
!        "^ *\\(\\(?: 
*\\$\\(?:[({]\\(?:\\$\\(?:[({]\\(?:\\$\\(?:[^({]\\|.[^\n$#})]+?[})]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|[^\n$#)}]\\)+?[})]\\|[^({]\\)\\|
 *[^ \n$#:=]+\\)+?\\)[ \t]*\\([:!]\\)\\(?:[ \t]*$\\|[^=\n]\\(?:[^#\n]*?;[ 
\t]*\\(.+\\)\\)?\\)")
    (set (make-local-variable 'makefile-dependency-skip) "^:!")
    (set (make-local-variable 'makefile-rule-action-regex)
!        "^\t[ \t]*\\(address@hidden)[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)")
    (setq font-lock-defaults
        `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))))
  
--- 879,888 ----
  (define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile"
    "An adapted `makefile-mode' that knows about BSD make."
    (set (make-local-variable 'makefile-dependency-regex)
!        makefile-bsdmake-dependency-regex)
    (set (make-local-variable 'makefile-dependency-skip) "^:!")
    (set (make-local-variable 'makefile-rule-action-regex)
!        makefile-bsdmake-rule-action-regex)
    (setq font-lock-defaults
        `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults))))
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]