/[emacs]/emacs/lisp/progmodes/sh-script.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/sh-script.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.132 by rms, Mon Sep 22 15:39:47 2003 UTC revision 1.133 by gm, Thu Sep 25 02:01:18 2003 UTC
# Line 572  documents - you must insert literal tabs Line 572  documents - you must insert literal tabs
572    '((bash sh-append posix    '((bash sh-append posix
573            "." "alias" "bg" "bind" "builtin" "compgen" "complete"            "." "alias" "bg" "bind" "builtin" "compgen" "complete"
574            "declare" "dirs" "disown" "enable" "fc" "fg" "help" "history"            "declare" "dirs" "disown" "enable" "fc" "fg" "help" "history"
575            "jobs" "kill" "let" "local" "popd" "printf" "pushd" "source"            "jobs" "kill" "let" "local" "popd" "printf" "pushd" "shopt"
576            "suspend" "typeset" "unalias")            "source" "suspend" "typeset" "unalias")
577    
578      ;; The next entry is only used for defining the others      ;; The next entry is only used for defining the others
579      (bourne sh-append shell      (bourne sh-append shell
# Line 796  See `sh-feature'.") Line 796  See `sh-feature'.")
796    
797  (defvar sh-font-lock-keywords  (defvar sh-font-lock-keywords
798    '((csh sh-append shell    '((csh sh-append shell
799           '("\\${?[#?]?\\([A-Za-z_][A-Za-z0-9_]*\\|0\\)" 1           ("\\${?[#?]?\\([A-Za-z_][A-Za-z0-9_]*\\|0\\)" 1
800             font-lock-variable-name-face))            font-lock-variable-name-face))
801    
802      (es sh-append executable-font-lock-keywords      (es sh-append executable-font-lock-keywords
803          '("\\$#?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\)" 1          ("\\$#?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\)" 1
804            font-lock-variable-name-face))           font-lock-variable-name-face))
805    
806      (rc sh-append es)      (rc sh-append es)
807    
808      (sh sh-append shell      (sh sh-append shell
809          ;; Variable names.          ;; Variable names.
810          '("\\$\\({#?\\)?\\([A-Za-z_][A-Za-z0-9_]*\\|[-#?@!]\\)" 2          ("\\$\\({#?\\)?\\([A-Za-z_][A-Za-z0-9_]*\\|[-#?@!]\\)" 2
811            font-lock-variable-name-face)            font-lock-variable-name-face)
812          ;; Function names.          ;; Function names.
813          '("^\\(\\sw+\\)[ \t]*(" 1 font-lock-function-name-face)          ("^\\(\\sw+\\)[ \t]*(" 1 font-lock-function-name-face)
814          '("\\<\\(function\\)\\>[ \t]*\\(\\sw+\\)?"          ("\\<\\(function\\)\\>[ \t]*\\(\\sw+\\)?"
815            (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)))            (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)))
816    
817      ;; The next entry is only used for defining the others      ;; The next entry is only used for defining the others
818      (shell sh-append executable-font-lock-keywords      (shell sh-append executable-font-lock-keywords
819             ;; Using font-lock-string-face here confuses sh-get-indent-info.             ;; Using font-lock-string-face here confuses sh-get-indent-info.
820             '("\\\\$" 0 font-lock-warning-face)             ("\\\\$" 0 font-lock-warning-face)
821             '("\\\\[^A-Za-z0-9]" 0 font-lock-string-face)             ("\\\\[^A-Za-z0-9]" 0 font-lock-string-face)
822             '("\\${?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\|[$*_]\\)" 1             ("\\${?\\([A-Za-z_][A-Za-z0-9_]*\\|[0-9]+\\|[$*_]\\)" 1
823               font-lock-variable-name-face))               font-lock-variable-name-face))
824      (rpm sh-append rpm2      (rpm sh-append rpm2
825           '("%{?\\(\\sw+\\)"  1 font-lock-keyword-face))           ("%{?\\(\\sw+\\)"  1 font-lock-keyword-face))
826      (rpm2 sh-append shell      (rpm2 sh-append shell
827            '("^\\(\\sw+\\):"  1 font-lock-variable-name-face)))            ("^\\(\\sw+\\):"  1 font-lock-variable-name-face)))
828    "Default expressions to highlight in Shell Script modes.  See `sh-feature'.")    "Default expressions to highlight in Shell Script modes.  See `sh-feature'.")
829    
830  (defvar sh-font-lock-keywords-1  (defvar sh-font-lock-keywords-1
# Line 1568  in ALIST." Line 1568  in ALIST."
1568                      (setq val                      (setq val
1569                            (apply 'sh-append                            (apply 'sh-append
1570                                   (let ((sh-shell (car (cdr val))))                                   (let ((sh-shell (car (cdr val))))
1571                                     (sh-feature alist))                                     (if (assq sh-shell alist)
1572                                           (sh-feature alist)
1573                                         (eval sh-shell)))
1574                                   (cddr val)))))                                   (cddr val)))))
1575          (if function          (if function
1576              (nconc alist              (nconc alist

Legend:
Removed from v.1.132  
changed lines
  Added in v.1.133

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26