• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/progmodes/

Lines Matching +defs:font +defs:lock +defs:variable +defs:name +defs:face

45 ;; If you use font-lock feature of this mode, it is advisable to use
46 ;; either lazy-lock-mode or fast-lock-mode. I prefer lazy-lock.
50 ;; functions definitions and packages, arrays, hashes, and variable
51 ;; definitions. If you do not see all these faces, your font-lock does
54 ;; This mode supports font-lock, imenu and mode-compile. In the
55 ;; hairy version font-lock is on, but you should activate imenu
62 ;;; Font lock bugs as of v4.32:
83 (defvar cperl-can-font-lock
88 (if cperl-can-font-lock
89 (require 'font-lock))
92 (defvar font-lock-background-mode) ; not in Emacs
93 (defvar font-lock-display-type) ; ditto
96 (defmacro defgroup (name val doc &rest arr)
98 (or (fboundp 'custom-declare-variable)
99 (defmacro defcustom (name val doc &rest arr)
100 (` (defvar (, name) (, val) (, doc)))))
101 (or (and (fboundp 'custom-declare-variable)
110 ((fboundp 'valid-color-name-p) (` (valid-color-name-p (, col))))
112 ((fboundp 'x-valid-color-name-p) (` (x-valid-color-name-p (, col))))
114 (defmacro cperl-is-face (arg) ; Takes quoted arg
115 (cond ((fboundp 'find-face)
116 (` (find-face (, arg))))
117 (;;(and (fboundp 'face-list)
118 ;; (face-list))
119 (fboundp 'face-list)
120 (` (member (, arg) (and (fboundp 'face-list)
121 (face-list)))))
124 (defmacro cperl-make-face (arg descr) ; Takes unquoted arg
125 (cond ((fboundp 'make-face)
126 (` (make-face (quote (, arg)))))
129 (defmacro cperl-force-face (arg descr) ; Takes unquoted arg
131 (or (cperl-is-face (quote (, arg)))
132 (cperl-make-face (, arg) (, descr)))
157 (defvar cperl-can-font-lock
196 :link '(custom-group-link :tag "Font Lock Faces group" font-lock-faces)
238 (put 'cperl-indent-level 'safe-local-variable 'integerp)
289 Insertion after colons requires both this variable and
312 (defcustom cperl-font-lock nil
313 "*Non-nil (and non-null) means CPerl buffers will use `font-lock-mode'.
377 Affects: `cperl-font-lock', `cperl-electric-lbrace-space',
406 (make-obsolete-variable
440 (defcustom cperl-pod-face 'font-lock-comment-face
442 :type 'face
445 (defcustom cperl-pod-head-face 'font-lock-variable-name-face
448 :type 'face
451 (defcustom cperl-here-face 'font-lock-string-face
453 :type 'face
456 ;;; Some double-evaluation happened with font-locks... Needed with 21.2...
457 (defvar cperl-singly-quote-face cperl-xemacs-p)
459 (defcustom cperl-invalid-face 'underline
461 :type 'face
465 (defcustom cperl-pod-here-fontify '(featurep 'font-lock)
478 Note that that variable is only read at initialization time for
479 the variable `cperl-font-lock-keywords-2', so changing it after you've
608 (defcustom cperl-syntaxify-by-font-lock
609 (and cperl-can-font-lock
611 "*Non-nil means that CPerl uses `font-lock's routines for syntaxification."
629 (defcustom cperl-ps-print-face-properties
630 '((font-lock-keyword-face nil nil bold shadow)
631 (font-lock-variable-name-face nil nil bold)
632 (font-lock-function-name-face nil nil bold italic box)
633 (font-lock-constant-face nil "LightGray" bold)
634 (cperl-array-face nil "LightGray" bold underline)
635 (cperl-hash-face nil "LightGray" bold italic underline)
636 (font-lock-comment-face nil "LightGray" italic)
637 (font-lock-string-face nil nil italic underline)
638 (cperl-nonoverridable-face nil nil italic underline)
639 (font-lock-type-face nil nil underline)
640 (font-lock-warning-face nil "LightGray" bold italic box)
642 "List given as an argument to `ps-extend-face-list' in `cperl-ps-print'."
654 (defface cperl-nonoverridable-face
664 "Font Lock mode face used non-overridable keywords and modifiers of regexps."
667 (defface cperl-array-face
677 "Font Lock mode face used to highlight array names."
680 (defface cperl-hash-face
690 "Font Lock mode face used to highlight hash names."
710 Get support packages choose-color.el (or font-lock-extra.el before
713 later you should use choose-color.el *instead* of font-lock-extra.el
765 See documentation of a variable `cperl-problems-old-emaxen' for the
779 of interaction of `font-lock' and syntaxification may be not cleaned
845 5) and functions (by the full name - with package);
853 comparing to font-lock - basically, different
933 variable to nil (if it is set to t).
943 variable to nil (if it is set to t). This will disable
954 `cperl-array-face' Array names
955 `cperl-hash-face' Hash names
956 `font-lock-comment-face' Comments, PODs and whatever is considered
958 `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of
960 `font-lock-warning-face' Special-cased m// and s//foo/,
961 `font-lock-function-name-face' _ as a target of a file tests, file tests,
965 `font-lock-keyword-face' Control flow switch constructs, declarators
966 `cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen
967 `font-lock-string-face' Strings, qw() constructs, RExen, POD sections,
971 `font-lock-type-face' Overridable keywords
972 `font-lock-variable-name-face' Variable declarations, indirect array and
985 `font-lock-string-face' \"Normal\" stuff and non-0-length constructs
986 `font-lock-constant-face': Delimiters
987 `font-lock-warning-face' Special-cased m// and s//foo/,
991 `cperl-nonoverridable-face' Modifiers, as gism in m/REx/gism
992 `font-lock-type-face' POSIX classes inside charclasses,
995 `font-lock-keyword-face' Capturing parens, and |
996 `font-lock-function-name-face' Special symbols: $ ^ . [ ] [^ ] (?{ }) (??{ })
997 `font-lock-builtin-face' \"Remaining\" 0-length constructs, executable
999 `font-lock-variable-name-face' Interpolated constructs, embedded code
1000 `font-lock-comment-face' Embedded comments
1035 (defsubst cperl-enable-font-lock ()
1036 cperl-can-font-lock)
1053 'lazy-lock)
1058 (if (and post cperl-syntaxify-by-font-lock)
1115 (if (fboundp 'ps-extend-face-list)
1116 (defmacro cperl-ps-extend-face-list (arg)
1117 `(ps-extend-face-list ,arg))
1118 (defmacro cperl-ps-extend-face-list (arg)
1119 `(error "This version of Emacs has no `ps-extend-face-list'")))
1120 ;; Calling `cperl-enable-font-lock' below doesn't compile on XEmacs,
1305 (fboundp 'ps-extend-face-list)]
1310 ["Debug errors in delayed fontification" cperl-emulate-lazy-lock t]
1370 ["Tips" (describe-variable 'cperl-tips) t]
1371 ["Problems" (describe-variable 'cperl-problems) t]
1372 ["Speed" (describe-variable 'cperl-speed) t]
1373 ["Praise" (describe-variable 'cperl-praise) t]
1374 ["Faces" (describe-variable 'cperl-tips-faces) t]
1397 ;;; Is incorporated in `cperl-imenu--function-name-regexp-perl'
1400 ;;; near mentioned above variable(s)...
1405 of attributes (if present), or end of the name or prototype (whatever is
1408 "\\(" ; n+1=name-group
1409 cperl-white-and-comment-rex ; n+2=pre-name
1410 "\\(::[a-zA-Z_0-9:']+\\|[a-zA-Z_'][a-zA-Z_0-9:']*\\)" ; n+3=name
1411 "\\)" ; END n+1=name-group
1424 "\\(\\sw\\|_\\)+" ; attr-name
1438 ;;;; Was: 2=sub|package; now 2=package-group, 5=package-name 8=sub-name (+3)
1439 (defvar cperl-imenu--function-name-regexp-perl
1443 "\\(" ; 3 = package-name-group
1444 cperl-white-and-comment-rex ; 4 = pre-package-name
1445 "\\([a-zA-Z_0-9:']+\\)\\)?\\)" ; 5 = package-name
1448 (cperl-after-sub-regexp 'named nil) ; 8=name 11=proto 14=attr-start
1456 (concat cperl-imenu--function-name-regexp-perl "\\|" "\\`"))
1505 (defvar cperl-font-lock-multiline-start nil)
1506 (defvar cperl-font-lock-multiline nil)
1508 (defvar cperl-font-locking nil)
1552 it will not do any expansion. See also help on variable
1579 Setting the variable `cperl-font-lock' to t switches on font-lock-mode
1596 `cperl-info-on-command', which one is which is controlled by variable
1605 This is regulated by variable `cperl-lazy-help-time'. Default with
1615 `cperl-pod-face', `cperl-pod-head-face' control processing of POD and
1629 Insertion after colons requires both this variable and
1669 `cperl-extra-newline-before-brace'), and how reflow-logic should treat \"continuation\" blocks of else/elsif/continue, controlled by the same variable,
1677 Turning on CPerl mode calls the hooks in the variable `cperl-mode-hook'
1699 (setq mode-name "CPerl")
1728 (make-local-variable 'cperl-font-lock-multiline-start)
1729 (make-local-variable 'cperl-font-locking)
1730 (make-local-variable 'outline-regexp)
1731 ;; (setq outline-regexp imenu-example--function-name-regexp-perl)
1733 (make-local-variable 'outline-level)
1735 (make-local-variable 'paragraph-start)
1737 (make-local-variable 'paragraph-separate)
1739 (make-local-variable 'paragraph-ignore-fill-prefix)
1743 (make-local-variable 'paren-backwards-message)
1745 (make-local-variable 'indent-line-function)
1747 (make-local-variable 'require-final-newline)
1749 (make-local-variable 'comment-start)
1751 (make-local-variable 'comment-end)
1753 (make-local-variable 'comment-column)
1755 (make-local-variable 'comment-start-skip)
1757 (make-local-variable 'defun-prompt-regexp)
1759 ;;; (cperl-after-sub-regexp 'named nil) ; 8=name 11=proto 14=attr-start
1768 (make-local-variable 'comment-indent-function)
1772 (make-local-variable 'fill-paragraph-function)
1774 (make-local-variable 'parse-sexp-ignore-comments)
1776 (make-local-variable 'indent-region-function)
1779 (make-local-variable 'imenu-create-index-function)
1782 (make-local-variable 'imenu-sort-function)
1784 (make-local-variable 'vc-rcs-header)
1786 (make-local-variable 'vc-sccs-header)
1789 (make-local-variable 'vc-header-alist)
1794 (make-local-variable 'compilation-error-regexp-alist-alist)
1801 (make-local-variable 'compilation-error-regexp-alist)
1804 (make-local-variable 'compilation-error-regexp-alist)
1808 (make-local-variable 'font-lock-defaults)
1809 (setq font-lock-defaults
1812 '(cperl-font-lock-keywords-2 nil nil ((?_ . "w"))))
1814 '((cperl-font-lock-keywords
1815 cperl-font-lock-keywords-1
1816 cperl-font-lock-keywords-2) nil nil ((?_ . "w"))))
1818 '((cperl-load-font-lock-keywords
1819 cperl-load-font-lock-keywords-1
1820 cperl-load-font-lock-keywords-2) nil nil ((?_ . "w"))))))
1821 (make-local-variable 'cperl-syntax-state)
1825 (make-local-variable 'parse-sexp-lookup-properties)
1826 ;; Do not introduce variable if not needed, we check it!
1828 ;; Fix broken font-lock:
1829 (or (boundp 'font-lock-unfontify-region-function)
1830 (set 'font-lock-unfontify-region-function
1831 'font-lock-default-unfontify-region))
1832 (unless cperl-xemacs-p ; Our: just a plug for wrong font-lock
1833 (make-local-variable 'font-lock-unfontify-region-function)
1834 (set 'font-lock-unfontify-region-function ; not present with old Emacs
1835 'cperl-font-lock-unfontify-region-function))
1836 (make-local-variable 'cperl-syntax-done-to)
1838 (make-local-variable 'font-lock-syntactic-keywords)
1839 (setq font-lock-syntactic-keywords
1840 (if cperl-syntaxify-by-font-lock
1842 ;; unless font-lock-syntactic-keywords, font-lock (pre-22.1)
1844 ;; to make font-lock think that font-lock-syntactic-keywords
1847 (if (boundp 'font-lock-multiline) ; Newer font-lock; use its facilities
1849 (setq cperl-font-lock-multiline t) ; Not localized...
1850 (set (make-local-variable 'font-lock-multiline) t))
1851 (make-local-variable 'font-lock-fontify-region-function)
1852 (set 'font-lock-fontify-region-function ; not present with old Emacs
1853 'cperl-font-lock-fontify-region-function))
1854 (make-local-variable 'font-lock-fontify-region-function)
1855 (set 'font-lock-fontify-region-function ; not present with old Emacs
1856 'cperl-font-lock-fontify-region-function)
1857 (make-local-variable 'cperl-old-style)
1859 (set (make-local-variable 'normal-auto-fill-function)
1869 (if (cperl-enable-font-lock)
1870 (if (cperl-val 'cperl-font-lock)
1872 (font-lock-mode 1))))
1873 (set (make-local-variable 'facemenu-add-face-function)
1874 'cperl-facemenu-add-face-function) ; XXXX What this guy is for???
1885 (or cperl-syntaxify-by-font-lock
1897 (concat "perl " ;;(file-name-nondirectory
1901 (buffer-file-name)))
2276 head1 notlast name p really-delete over)
2310 (setq name (file-name-sans-extension
2311 (file-name-nondirectory (buffer-file-name)))
2313 (insert " NAME\n\n" name
3371 (or cperl-font-locking
3445 (put-text-property bb e 'face (if string 'font-lock-string-face
3446 'font-lock-comment-face)))))
3478 message). ARGUMENT should be the name of the construct (used in error
3598 (defvar font-lock-string-face)
3599 ;;(defvar font-lock-reference-face)
3600 (defvar font-lock-constant-face)
3603 (if cperl-syntaxify-by-font-lock
3629 ;;; (value: 0 in //o, 1 if "interpolated variable" is whole-REx, t otherwise).
3667 (defvar cperl-nonoverridable-face)
3668 (defvar font-lock-variable-name-face)
3669 (defvar font-lock-function-name-face)
3670 (defvar font-lock-keyword-face)
3671 (defvar font-lock-builtin-face)
3672 (defvar font-lock-type-face)
3673 (defvar font-lock-comment-face)
3674 (defvar font-lock-warning-face)
3689 ;; No space between name and paren allowed...
3690 "\\(\\sw+\\)" ; 3=name
3695 'face font-lock-constant-face))
3698 'face font-lock-constant-face)
3730 b-fname e-fname 'face ; a REx, so do it here
3732 font-lock-function-name-face
3733 font-lock-variable-name-face)))))
3748 'face font-lock-warning-face))))
3754 the sections using `cperl-pod-head-face', `cperl-pod-face',
3755 `cperl-here-face'."
3762 face head-face here-face b e bb tag qtag b1 e1 argument i c tail tb
3767 (cperl-font-locking t)
3777 ;; Somehow font-lock may be not loaded yet...
3779 (font-lock-string-face (if (boundp 'font-lock-string-face)
3780 font-lock-string-face
3781 'font-lock-string-face))
3782 (my-cperl-delimiters-face (if (boundp 'font-lock-constant-face)
3783 font-lock-constant-face
3784 'font-lock-constant-face))
3785 (my-cperl-REx-spec-char-face ; [] ^.$ and wrapper-of ({})
3786 (if (boundp 'font-lock-function-name-face)
3787 font-lock-function-name-face
3788 'font-lock-function-name-face))
3789 (font-lock-variable-name-face ; interpolated vars and ({})-code
3790 (if (boundp 'font-lock-variable-name-face)
3791 font-lock-variable-name-face
3792 'font-lock-variable-name-face))
3793 (font-lock-function-name-face ; used in `cperl-find-sub-attrs'
3794 (if (boundp 'font-lock-function-name-face)
3795 font-lock-function-name-face
3796 'font-lock-function-name-face))
3797 (font-lock-constant-face ; used in `cperl-find-sub-attrs'
3798 (if (boundp 'font-lock-constant-face)
3799 font-lock-constant-face
3800 'font-lock-constant-face))
3801 (my-cperl-REx-0length-face ; 0-length, (?:)etc, non-literal \
3802 (if (boundp 'font-lock-builtin-face)
3803 font-lock-builtin-face
3804 'font-lock-builtin-face))
3805 (font-lock-comment-face
3806 (if (boundp 'font-lock-comment-face)
3807 font-lock-comment-face
3808 'font-lock-comment-face))
3809 (font-lock-warning-face
3810 (if (boundp 'font-lock-warning-face)
3811 font-lock-warning-face
3812 'font-lock-warning-face))
3813 (my-cperl-REx-ctl-face ; (|)
3814 (if (boundp 'font-lock-keyword-face)
3815 font-lock-keyword-face
3816 'font-lock-keyword-face))
3817 (my-cperl-REx-modifiers-face ; //gims
3818 (if (boundp 'cperl-nonoverridable-face)
3819 cperl-nonoverridable-face
3820 'cperl-nonoverridable-face))
3821 (my-cperl-REx-length1-face ; length=1 escaped chars, POSIX classes
3822 (if (boundp 'font-lock-type-face)
3823 font-lock-type-face
3824 'font-lock-type-face))
3863 "\\(::[a-zA-Z_:'0-9]*\\|[a-zA-Z_'][a-zA-Z_:'0-9]*\\)\\)?" ; name
3889 (setq face cperl-pod-face
3890 head-face cperl-pod-head-face
3891 here-face cperl-here-face))
3904 ;; Need to remove face as well...
3995 (cperl-postpone-fontification b (point) 'face face t))
4004 (cperl-postpone-fontification (point) e 'face face t)
4011 'face head-face))
4019 'face head-face))))
4089 b1 e1 'face my-cperl-delimiters-face)
4112 'face my-cperl-delimiters-face)
4116 'face here-face)))
4144 name (if (match-beginning 8) ; 7 + 1
4171 'face font-lock-string-face)
4182 'face font-lock-string-face)
4185 (message "End of format `%s' not found." name)
4408 e1 (point) 'face my-cperl-REx-modifiers-face)))
4426 b e 'face font-lock-warning-face)
4435 b (cperl-1+ b) 'face my-cperl-delimiters-face)
4437 (1- e) e 'face my-cperl-delimiters-face)))
4472 "\\|" ; 6= 0-length, 7: name, 8,9:code, 10:group
4531 'face
4541 my-cperl-REx-0length-face
4542 my-cperl-REx-ctl-face)
4543 font-lock-warning-face))
4544 (error font-lock-warning-face)))
4546 my-cperl-REx-ctl-face)
4558 font-lock-variable-name-face)
4559 my-cperl-REx-spec-char-face))
4561 my-cperl-REx-spec-char-face)
4564 my-cperl-REx-ctl-face
4565 my-cperl-REx-0length-face))
4566 (t my-cperl-REx-0length-face)))
4578 ;; Generic: \non-alnum (1), \alnum (1+face)
4583 (- (point) 2) (- (point) 1) 'face
4586 font-lock-warning-face
4587 my-cperl-REx-0length-face))
4597 (1- (point)) (point) 'face
4600 'my-cperl-REx-spec-char-face
4602 'my-cperl-REx-0length-face
4603 'my-cperl-REx-ctl-face))))) ; )|
4629 'face my-cperl-REx-length1-face))))
4702 'face my-cperl-REx-spec-char-face)
4704 (1- (point)) (point) 'face
4705 my-cperl-REx-spec-char-face)
4709 'face my-cperl-REx-0length-face))
4713 'face my-cperl-REx-length1-face)
4731 'face font-lock-warning-face))
4746 'face font-lock-variable-name-face)
4749 'face my-cperl-REx-spec-char-face)
4752 'face my-cperl-REx-spec-char-face)
4784 'face font-lock-comment-face))))))
4791 (1- e1) e1 'face my-cperl-delimiters-face)
4795 b1 (1+ b1) 'face my-cperl-delimiters-face)
4804 ;; "\\([a-zA-Z_:'0-9]+\\)\\)?" ; name ;14
4866 ;; I do not understand what this is doing here. It breaks font-locking
4867 ;; because it resets the syntax-table from font-lock-syntax-table to
5017 ;; May be after $, @, $# etc of a variable
5538 (defun cperl-imenu-addback (lst &optional isback name)
5544 (or name
5545 (setq name "+++BACK+++"))
5551 (setcdr elt (cons (cons name lst)
5553 (cperl-imenu-addback (cdr elt) t name))))
5563 (prev-pos 0) is-pack index index1 name (end-range 0) package)
5569 (or regexp cperl-imenu--function-name-regexp-perl)
5571 ;; 2=package-group, 5=package-name 8=sub-name
5574 (match-beginning 5) ; package name
5599 (setq name (buffer-substring (match-beginning 5)
5601 name (progn
5602 (set-text-properties 0 (length name) nil name)
5603 name)
5604 package (concat name "::")
5605 name (concat "package " name))
5607 (setq name "package;" package ""))
5616 ;; Skip this function name if it is a prototype declaration.
5619 (setq name
5621 (set-text-properties 0 (length name) nil name))
5625 ((string-match "[:']" name)
5629 (setq name (concat package name) meth t)))
5630 (setq index (cons name marker))
5637 (setq name (buffer-substring (match-beginning 17) (match-end 17))
5640 (set-text-properties 0 (length name) nil name)
5641 (setq name (concat (make-string
5644 name)
5645 index (cons name marker))
5646 (setq index1 (cons (concat "=" name) (cdr index)))
5658 (let ((lst index-pack-alist) hier-list pack elt group name)
5661 (setq elt (car lst) lst (cdr lst) name (substring (car elt) 8))
5662 (if (assoc name hier-list) nil
5663 (setq hier-list (cons (cons name (cdr elt)) hier-list))))
5710 ;;;; 2=package-group, 5=package-name 8=sub-name 16=head-level
5730 (if (boundp 'font-lock-multiline)
5731 (setq cperl-font-lock-multiline t))
5734 (add-hook 'font-lock-mode-hook
5745 (defvar cperl-font-lock-keywords-1 nil
5747 (defvar cperl-font-lock-keywords nil
5749 (defvar cperl-font-lock-keywords-2 nil
5752 (defun cperl-load-font-lock-keywords ()
5754 cperl-font-lock-keywords)
5756 (defun cperl-load-font-lock-keywords-1 ()
5758 cperl-font-lock-keywords-1)
5760 (defun cperl-load-font-lock-keywords-2 ()
5762 cperl-font-lock-keywords-2)
5766 (or (boundp 'font-lock-constant-face)
5767 (cperl-force-face font-lock-constant-face
5769 (or (boundp 'font-lock-warning-face)
5770 (cperl-force-face font-lock-warning-face
5772 ;;(setq font-lock-constant-face 'font-lock-constant-face)
5778 (require 'font-lock)
5779 (and (fboundp 'font-lock-fontify-anchored-keywords)
5780 (featurep 'font-lock-extra)
5781 (message "You have an obsolete package `font-lock-extra'. Install `choose-color'."))
5782 (let (t-font-lock-keywords t-font-lock-keywords-1 font-lock-anchored)
5783 (if (fboundp 'font-lock-fontify-anchored-keywords)
5784 (setq font-lock-anchored t))
5786 t-font-lock-keywords
5788 `("[ \t]+$" 0 ',cperl-invalid-face t)
5822 ;; "link" "listen" "localtime" "lock" "log" "lstat" "lt"
5845 "f\\(ileno\\|cntl\\|lock\\|or\\(k\\|mline\\)\\)\\|"
5848 "\\(uid\\|ent\\|nam\\)\\|grp\\)\\|host\\(by\\(addr\\|name\\)\\|"
5849 "ent\\)\\|s\\(erv\\(by\\(port\\|name\\)\\|ent\\)\\|"
5850 "ock\\(name\\|opt\\)\\)\\|c\\|login\\|net\\(by\\(addr\\|name\\)\\|"
5858 "\\(k\\|e\\)\\|dir\\)\\|set\\|cv\\|verse\\|f\\|winddir\\|name"
5869 "\\)\\>") 2 'font-lock-type-face)
5895 "\\)\\>") 2 'cperl-nonoverridable-face)
5901 font-lock-function-name-face keep) ; Not very good, triggers at "[a-z]"
5907 "\\([^ \n\t{;()]+\\)" ; 2=name (assume non-anonymous)
5913 2 (if cperl-font-lock-multiline
5915 'font-lock-function-name-face
5916 'font-lock-variable-name-face)
5917 ;; need to manually set 'multiline' for older font-locks
5925 'font-lock-function-name-face
5926 'font-lock-variable-name-face))))
5928 2 font-lock-function-name-face)
5930 1 font-lock-function-name-face)
5931 (cond ((featurep 'font-lock-extra)
5933 (2 font-lock-string-face t)
5935 (font-lock-anchored
5937 (2 font-lock-string-face t)
5940 (1 font-lock-string-face t))))
5942 2 font-lock-string-face t)))
5944 font-lock-string-face t)
5946 font-lock-constant-face) ; labels
5948 2 font-lock-constant-face)
5950 ;;; '("[$*]{?\\(\\sw+\\)" 1 font-lock-variable-name-face)
5952 ;;; (2 (cons font-lock-variable-name-face '(underline))))
5953 (cond ((featurep 'font-lock-extra)
5955 (3 font-lock-variable-name-face)
5958 (1 font-lock-variable-name-face)
5961 (font-lock-anchored
5968 (5 (, (if cperl-font-lock-multiline
5969 'font-lock-variable-name-face
5970 '(progn (setq cperl-font-lock-multiline-start
5972 'font-lock-variable-name-face))))
5978 ;; Bug in font-lock: limit is used not only to limit
5981 (, (if cperl-font-lock-multiline
5996 (, (if cperl-font-lock-multiline
6000 ;; so cperl-font-lock-multiline-start is nil
6001 (if (or (not cperl-font-lock-multiline-start)
6003 cperl-font-lock-multiline-start
6007 (1+ cperl-font-lock-multiline-start) (point)
6009 (setq cperl-font-lock-multiline-start nil))))
6010 (3 font-lock-variable-name-face)))))
6012 3 font-lock-variable-name-face)))
6014 4 font-lock-variable-name-face)
6016 '("\\(?:^\\|[^smywqrx$]\\)\\(!\\)" 1 font-lock-negation-char-face)
6017 '("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)))
6019 t-font-lock-keywords-1
6020 (and (fboundp 'turn-on-font-lock) ; Check for newer font-lock
6030 'cperl-hash-face
6031 'cperl-array-face)
6037 'cperl-hash-face
6038 'cperl-array-face) ; arrays and hashes
6039 font-lock-variable-name-face) ; Just to put something
6042 (1 cperl-array-face)
6043 (2 font-lock-variable-name-face))
6045 (1 cperl-hash-face)
6046 (2 font-lock-variable-name-face))
6050 ;;(3 font-lock-function-name-face t t)
6053 ;; font-lock-function-name-face 'default) nil t))
6056 (setq t-font-lock-keywords-1
6057 (append t-font-lock-keywords-1
6059 font-lock-variable-name-face)))))
6060 (setq cperl-font-lock-keywords-1
6061 (if cperl-syntaxify-by-font-lock
6063 t-font-lock-keywords)
6064 t-font-lock-keywords)
6065 cperl-font-lock-keywords cperl-font-lock-keywords-1
6066 cperl-font-lock-keywords-2 (append
6067 cperl-font-lock-keywords-1
6068 t-font-lock-keywords-1)))
6070 (if (or (featurep 'choose-color) (featurep 'font-lock-extra))
6072 '(font-lock-require-faces
6075 (list 'font-lock-comment-face
6081 (list 'font-lock-string-face
6087 (list 'font-lock-function-name-face
6099 (list 'font-lock-variable-name-face
6105 (list 'font-lock-type-face
6111 (list 'font-lock-warning-face
6119 (list 'font-lock-constant-face
6125 (list 'cperl-nonoverridable-face
6132 (list 'cperl-array-face
6139 (list 'cperl-hash-face
6153 ;; ((fboundp 'valid-color-name-p) 'valid-color-name-p)
6155 ;; (t 'x-valid-color-name-p))))
6156 (cperl-force-face font-lock-constant-face
6158 (cperl-force-face font-lock-variable-name-face
6159 "Face for variable names")
6160 (cperl-force-face font-lock-type-face
6162 (cperl-force-face cperl-nonoverridable-face
6164 (cperl-force-face font-lock-warning-face
6166 (cperl-force-face font-lock-comment-face
6168 (cperl-force-face font-lock-function-name-face
6170 (cperl-force-face cperl-hash-face
6172 (cperl-force-face cperl-array-face
6174 ;;(defvar font-lock-constant-face 'font-lock-constant-face)
6175 ;;(defvar font-lock-variable-name-face 'font-lock-variable-name-face)
6176 ;;(or (boundp 'font-lock-type-face)
6177 ;; (defconst font-lock-type-face
6178 ;; 'font-lock-type-face
6180 ;;(or (boundp 'cperl-nonoverridable-face)
6181 ;; (defconst cperl-nonoverridable-face
6182 ;; 'cperl-nonoverridable-face
6185 ;; (or (boundp 'font-lock-comment-face)
6186 ;; (defconst font-lock-comment-face
6187 ;; 'font-lock-comment-face
6189 ;; (or (boundp 'font-lock-keyword-face)
6190 ;; (defconst font-lock-keyword-face
6191 ;; 'font-lock-keyword-face
6193 ;; (or (boundp 'font-lock-function-name-face)
6194 ;; (defconst font-lock-function-name-face
6195 ;; 'font-lock-function-name-face
6198 (not (cperl-is-face 'cperl-array-face))
6199 (cperl-is-face 'font-lock-emphasized-face))
6200 (copy-face 'font-lock-emphasized-face 'cperl-array-face))
6202 (not (cperl-is-face 'cperl-hash-face))
6203 (cperl-is-face 'font-lock-other-emphasized-face))
6204 (copy-face 'font-lock-other-emphasized-face 'cperl-hash-face))
6206 (not (cperl-is-face 'cperl-nonoverridable-face))
6207 (cperl-is-face 'font-lock-other-type-face))
6208 (copy-face 'font-lock-other-type-face 'cperl-nonoverridable-face))
6209 ;;(or (boundp 'cperl-hash-face)
6210 ;; (defconst cperl-hash-face
6211 ;; 'cperl-hash-face
6213 ;;(or (boundp 'cperl-array-face)
6214 ;; (defconst cperl-array-face
6215 ;; 'cperl-array-face
6219 (if (boundp 'font-lock-background-mode)
6220 font-lock-background-mode
6222 (face-list (and (fboundp 'face-list) (face-list))))
6223 ;;;; (fset 'cperl-is-face
6224 ;;;; (cond ((fboundp 'find-face)
6225 ;;;; (symbol-function 'find-face))
6226 ;;;; (face-list
6227 ;;;; (function (lambda (face) (member face face-list))))
6229 ;;;; (function (lambda (face) (boundp face))))))
6231 (if (and (boundp 'font-lock-display-type)
6232 (eq font-lock-display-type 'grayscale))
6236 (and (not (cperl-is-face 'font-lock-constant-face))
6237 (cperl-is-face 'font-lock-reference-face)
6238 (copy-face 'font-lock-reference-face 'font-lock-constant-face))
6239 (if (cperl-is-face 'font-lock-type-face) nil
6240 (copy-face 'default 'font-lock-type-face)
6243 (set-face-foreground 'font-lock-type-face
6248 (set-face-foreground 'font-lock-type-face
6253 (set-face-background 'font-lock-type-face "gray90"))))
6254 (if (cperl-is-face 'cperl-nonoverridable-face)
6256 (copy-face 'font-lock-type-face 'cperl-nonoverridable-face)
6259 (set-face-foreground 'cperl-nonoverridable-face
6264 (set-face-foreground 'cperl-nonoverridable-face
6268 ;;; (if (cperl-is-face 'font-lock-other-emphasized-face) nil
6269 ;;; (copy-face 'bold-italic 'font-lock-other-emphasized-face)
6272 ;;; (set-face-background 'font-lock-other-emphasized-face
6279 ;;; (set-face-background 'font-lock-other-emphasized-face
6285 ;;; (t (set-face-background 'font-lock-other-emphasized-face "gray90"))))
6286 ;;; (if (cperl-is-face 'font-lock-emphasized-face) nil
6287 ;;; (copy-face 'bold 'font-lock-emphasized-face)
6290 ;;; (set-face-background 'font-lock-emphasized-face
6295 ;;; (set-face-background 'font-lock-emphasized-face
6301 ;;; (t (set-face-background 'font-lock-emphasized-face "gray90"))))
6302 (if (cperl-is-face 'font-lock-variable-name-face) nil
6303 (copy-face 'italic 'font-lock-variable-name-face))
6304 (if (cperl-is-face 'font-lock-constant-face) nil
6305 (copy-face 'italic 'font-lock-constant-face))))
6314 ;; font-lock-variable-name-face
6315 ;; font-lock-constant-face
6316 (append '(cperl-array-face cperl-hash-face)
6319 ;; font-lock-constant-face
6320 (append '(cperl-nonoverridable-face cperl-hash-face)
6323 ;; font-lock-type-face
6324 (append '(cperl-array-face cperl-hash-face underline cperl-nonoverridable-face)
6327 (defvar ps-print-face-extension-alist)
6332 to the file FILE. If FILE is nil, prompts for a file name.
6334 Style of printout regulated by the variable `cperl-ps-print-face-properties'."
6339 (concat (buffer-file-name) ".ps")
6340 nil nil 'file-name-history)))
6343 (require 'ps-print) ; To get ps-print-face-extension-alist
6345 (ps-print-face-extension-alist ps-print-face-extension-alist))
6346 (cperl-ps-extend-face-list cperl-ps-print-face-properties)
6356 ;;; (append '(font-lock-emphasized-face
6357 ;;; cperl-array-face
6358 ;;; font-lock-keyword-face
6359 ;;; font-lock-variable-name-face
6360 ;;; font-lock-constant-face
6361 ;;; font-lock-reference-face
6362 ;;; font-lock-other-emphasized-face
6363 ;;; cperl-hash-face)
6366 ;;; (append '(cperl-nonoverridable-face
6367 ;;; font-lock-constant-face
6368 ;;; font-lock-reference-face
6369 ;;; font-lock-other-emphasized-face
6370 ;;; cperl-hash-face)
6373 ;;; (append '(font-lock-emphasized-face
6374 ;;; cperl-array-face
6375 ;;; font-lock-other-emphasized-face
6376 ;;; cperl-hash-face
6377 ;;; cperl-nonoverridable-face font-lock-type-face)
6379 ;;; (cons 'font-lock-type-face ps-underlined-faces))
6382 (if (cperl-enable-font-lock) (cperl-windowed-init))
6599 (lambda (name)
6600 (cons name (eval name))))
6646 (make-local-variable 'window-min-height)
6757 (defun cperl-imenu-info-imenu-name ()
6768 imenu-extract-index-name-function
6776 imenu-extract-index-name-function
6777 'cperl-imenu-info-imenu-name)
6854 ;; 1=fullname 2=package? 3=name 4=proto? 5=attrs? (VERY APPROX!)
6862 (or files (setq files (list buffer-file-name)))
6867 "sub wanted {push @ARGV, $File::Find::name if /\\.[pP][Llm]$/}
6941 rescan requested by `font-lock'. ACTUAL is the range actually resyntaxified;
6947 (setq arg (if (eq cperl-syntaxify-by-font-lock
6950 (setq cperl-syntaxify-by-font-lock arg)
6965 (make-local-variable 'parse-sexp-lookup-properties)
6966 ;; Do not introduce variable if not needed, we check it!
6972 (prev-pos 0) index index1 name package prefix)
6991 (setq index (imenu-example--name-and-position))
6992 (setq name (buffer-substring (match-beginning 3) (match-end 3)))
6993 (if (and prefix (string-match (concat "^" prefix) name))
6994 (setq name (substring name (length prefix))))
6995 (cond ((string-match "::" name) nil)
6997 (setq index1 (cons (concat package "::" name) (cdr index)))
6999 (setcar index name)
7003 (setq index (imenu-example--name-and-position))
7048 ;; After name now...
7073 ;; Need to insert the name without package as well
7123 (setq file (if dir default-directory (buffer-file-name)))
7127 (let ((tags-file-name "TAGS")
7132 ((file-exists-p tags-file-name)
7135 (visit-tags-table-buffer tags-file-name)))
7136 (t (set-buffer (find-file-noselect tags-file-name))))
7214 (let (type pack name pos line chunk ord cons1 file str info fileind)
7229 name (buffer-substring (match-beginning 2) (match-end 2))
7239 ;; Make new member of hierarchy name ==> file ==> pos if needed
7240 (if (setq cons1 (assoc name (nth ord cperl-hierarchy)))
7244 ;; First occurrence of the name, start alist
7245 (setq cons1 (cons name (list (cons fileind (vector file info)))))
7262 (let ((remover (function (lambda (elt) ; (name (file1...) (file2..))
7266 pack name cons1 to l1 l2 l3 l4 b)
7271 (or tags-file-name
7275 (set-buffer (get-file-buffer tags-file-name))
7394 (defun cperl-list-fold (list name limit)
7404 (setq list1 (cons (cons name
7409 (nreverse (cons (cons name
7413 (defun cperl-menu-to-keymap (menu &optional name)
7532 '("[$@%*&][0-9a-zA-Z_:]+\\([ \t]*[[{]\\)?" ; Usual variable
7533 "[$@]\\^[a-zA-Z]" ; Special variable
7534 "[$@][^ \n\t]" ; Special variable
7613 (or (memq (get-text-property (point) 'face)
7614 '(font-lock-comment-face font-lock-string-face))
7714 $ARGV The name of the current file used with <> .
7718 $^ The name of the current top-of-page format.
7727 $^O The operating system name under which this copy of Perl was built.
7731 $^X The name under which perl was invoked (argv[0] in C-speech).
7734 $~ The name of the current report format.
7804 @ARGV Command line arguments (not including the command name - see $0).
7936 my VAR or my (VAR1,...) Introduces a lexical variable ($VAR, @ARR, or %HASH).
7937 our VAR or our (VAR1,...) Lexically enable a global variable ($V, @A, or %H).
8075 tie VAR, PACKAGE, LIST Hide an object behind a simple Perl variable.
8079 untie VAR Unlink an object from a simple Perl variable.
8103 'variable-documentation))
8154 "\\|" ; Embedded variable
8446 ;; May be after $, @, $# etc of a variable
8619 'variable-documentation))))
8636 "*File name for `pod2man'."
8645 (let* ((pod2man-args (concat buffer-file-name " | nroff -man "))
8646 (bufname (concat "Man " buffer-file-name))
8666 (manual-entry buffer-file-name)))
8669 (Man-getpage-in-background buffer-file-name)))))
8691 Skips RExes consisting of one interpolated variable.
8814 (defun cperl-facemenu-add-face-function (face end)
8815 "A callback to process user-initiated font-change requests.
8822 (setq facemenu-end-add-face (if (eq face 'bold-italic) ">>" ">"))
8823 (cdr (or (assq face '((bold . "B<")
8828 face))))
8861 (defun cperl-emulate-lazy-lock (&optional window-size)
8862 "Emulate `lazy-lock' without `condition-case', so `debug-on-error' works.
8876 ;; Why needed??? With older font-locks???
8877 (set (make-local-variable 'font-lock-cache-position) (make-marker))
8884 (font-lock-fontify-region (min p pos) (max p pos))
8904 (make-local-variable 'cperl-help-shown)
8934 ;;; Plug for wrong font-lock:
8936 (defun cperl-font-lock-unfontify-region-function (beg end)
8940 deactivate-mark buffer-file-name buffer-file-truename)
8941 (remove-text-properties beg end '(face nil))
8945 (defun cperl-font-lock-fontify-region-function (beg end loudly)
8947 Newer `font-lock's can do it themselves.
8971 (font-lock-default-fontify-region beg end loudly))
8980 (if (eq cperl-syntaxify-by-font-lock 'backtrace)
9002 (if (memq cperl-syntaxify-by-font-lock '(backtrace message))
9035 ;; We should have been informed about changes by `font-lock'. Since it
9042 cperl-syntaxify-by-font-lock