/[emacs]/emacs/lisp/progmodes/cperl-mode.el
ViewVC logotype

Diff of /emacs/lisp/progmodes/cperl-mode.el

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

revision 1.42 by monnier, Sun Feb 23 01:42:24 2003 UTC revision 1.43 by monnier, Sun Feb 23 02:19:02 2003 UTC
# Line 69  Line 69 
69    
70  ;; Some macros are needed for `defcustom'  ;; Some macros are needed for `defcustom'
71  (eval-when-compile  (eval-when-compile
72      (condition-case nil
73          (require 'man)
74        (error nil))
75    (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version))    (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version))
76    (defvar cperl-can-font-lock    (defvar cperl-can-font-lock
77      (or cperl-xemacs-p      (or cperl-xemacs-p
# Line 120  Line 123 
123          `(goto-line (string-to-int (elt ,elt 1))))          `(goto-line (string-to-int (elt ,elt 1))))
124      ;;)      ;;)
125      (defmacro cperl-etags-goto-tag-location (elt)      (defmacro cperl-etags-goto-tag-location (elt)
126        `(etags-goto-tag-location ,elt)))        `(etags-goto-tag-location ,elt))))
   (autoload 'tmm-prompt "tmm"))  
127    
128  (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version))  (defconst cperl-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version))
129    
# Line 321  Can be overwritten by `cperl-hairy' if n Line 323  Can be overwritten by `cperl-hairy' if n
323    :type '(choice (const null) boolean)    :type '(choice (const null) boolean)
324    :group 'cperl-affected-by-hairy)    :group 'cperl-affected-by-hairy)
325    
326    (defcustom cperl-electric-backspace-untabify t
327      "*Not-nil means electric-backspace will untabify in CPerl."
328      :type 'boolean
329      :group 'cperl-autoinsert-details)
330    
331  (defcustom cperl-hairy nil  (defcustom cperl-hairy nil
332    "*Not-nil means most of the bells and whistles are enabled in CPerl.    "*Not-nil means most of the bells and whistles are enabled in CPerl.
333  Affects: `cperl-font-lock', `cperl-electric-lbrace-space',  Affects: `cperl-font-lock', `cperl-electric-lbrace-space',
# Line 335  Affects: `cperl-font-lock', `cperl-elect Line 342  Affects: `cperl-font-lock', `cperl-elect
342    :type 'integer    :type 'integer
343    :group 'cperl-indentation-details)    :group 'cperl-indentation-details)
344    
345  (defcustom cperl-vc-header-alist '((SCCS "$sccs = '%W\%' ;")  (defcustom cperl-vc-header-alist '((SCCS "($sccs) = ('%W\%' =~ /(\\d+(\\.\\d+)+)/) ;")
346                                     (RCS "$rcs = ' $Id\$ ' ;"))                                     (RCS "($rcs) = (' $Id\$ ' =~ /(\\d+(\\.\\d+)+)/) ;"))
347    "*What to use as `vc-header-alist' in CPerl."    "*What to use as `vc-header-alist' in CPerl."
348    :type '(repeat (list symbol string))    :type '(repeat (list symbol string))
349    :group 'cperl)    :group 'cperl)
# Line 1128  the faces: please specify bold, italic, Line 1135  the faces: please specify bold, italic,
1135  ;;;          ["Add tags for Perl files in (sub)directories"  ;;;          ["Add tags for Perl files in (sub)directories"
1136  ;;;           (cperl-etags t 'recursive) t])  ;;;           (cperl-etags t 'recursive) t])
1137  ;;;; cperl-write-tags (&optional file erase recurse dir inbuffer)  ;;;; cperl-write-tags (&optional file erase recurse dir inbuffer)
1138              ["Create tags for current file" (cperl-write-tags nil t) t]             ["Create tags for current file" (cperl-write-tags nil t) t]
1139              ["Add tags for current file" (cperl-write-tags) t]             ["Add tags for current file" (cperl-write-tags) t]
1140              ["Create tags for Perl files in directory"             ["Create tags for Perl files in directory"
1141               (cperl-write-tags nil t nil t) t]              (cperl-write-tags nil t nil t) t]
1142              ["Add tags for Perl files in directory"             ["Add tags for Perl files in directory"
1143               (cperl-write-tags nil nil nil t) t]              (cperl-write-tags nil nil nil t) t]
1144              ["Create tags for Perl files in (sub)directories"             ["Create tags for Perl files in (sub)directories"
1145               (cperl-write-tags nil t t t) t]              (cperl-write-tags nil t t t) t]
1146              ["Add tags for Perl files in (sub)directories"             ["Add tags for Perl files in (sub)directories"
1147               (cperl-write-tags nil nil t t) t]))              (cperl-write-tags nil nil t t) t]))
1148            ("Perl docs"           ("Perl docs"
1149             ["Define word at point" imenu-go-find-at-position            ["Define word at point" imenu-go-find-at-position
1150              (fboundp 'imenu-go-find-at-position)]             (fboundp 'imenu-go-find-at-position)]
1151             ["Help on function" cperl-info-on-command t]            ["Help on function" cperl-info-on-command t]
1152             ["Help on function at point" cperl-info-on-current-command t]            ["Help on function at point" cperl-info-on-current-command t]
1153             ["Help on symbol at point" cperl-get-help t]            ["Help on symbol at point" cperl-get-help t]
1154             ["Perldoc" cperl-perldoc t]            ["Perldoc" cperl-perldoc t]
1155             ["Perldoc on word at point" cperl-perldoc-at-point t]            ["Perldoc on word at point" cperl-perldoc-at-point t]
1156             ["View manpage of POD in this file" cperl-pod-to-manpage t]            ["View manpage of POD in this file" cperl-build-manpage t]
1157             ["Auto-help on" cperl-lazy-install            ["Auto-help on" cperl-lazy-install
1158              (and (fboundp 'run-with-idle-timer)             (and (fboundp 'run-with-idle-timer)
1159                   (not cperl-lazy-installed))]                  (not cperl-lazy-installed))]
1160             ["Auto-help off" (eval '(cperl-lazy-unstall))            ["Auto-help off" cperl-lazy-unstall
1161              (and (fboundp 'run-with-idle-timer)             (and (fboundp 'run-with-idle-timer)
1162                   cperl-lazy-installed)])                  cperl-lazy-installed)])
1163            ("Toggle..."           ("Toggle..."
1164             ["Auto newline" cperl-toggle-auto-newline t]            ["Auto newline" cperl-toggle-auto-newline t]
1165             ["Electric parens" cperl-toggle-electric t]            ["Electric parens" cperl-toggle-electric t]
1166             ["Electric keywords" cperl-toggle-abbrev t]            ["Electric keywords" cperl-toggle-abbrev t]
1167             ["Fix whitespace on indent" cperl-toggle-construct-fix t]            ["Fix whitespace on indent" cperl-toggle-construct-fix t]
1168             ["Auto fill" auto-fill-mode t])            ["Auto-help on Perl constructs" cperl-toggle-autohelp t]
1169            ("Indent styles..."            ["Auto fill" auto-fill-mode t])
1170             ["CPerl" (cperl-set-style "CPerl") t]           ("Indent styles..."
1171             ["PerlStyle" (cperl-set-style "PerlStyle") t]            ["CPerl" (cperl-set-style "CPerl") t]
1172             ["GNU" (cperl-set-style "GNU") t]            ["PerlStyle" (cperl-set-style "PerlStyle") t]
1173             ["C++" (cperl-set-style "C++") t]            ["GNU" (cperl-set-style "GNU") t]
1174             ["FSF" (cperl-set-style "FSF") t]            ["C++" (cperl-set-style "C++") t]
1175             ["BSD" (cperl-set-style "BSD") t]            ["FSF" (cperl-set-style "FSF") t]
1176             ["Whitesmith" (cperl-set-style "Whitesmith") t]            ["BSD" (cperl-set-style "BSD") t]
1177             ["Current" (cperl-set-style "Current") t]            ["Whitesmith" (cperl-set-style "Whitesmith") t]
1178             ["Memorized" (cperl-set-style-back) cperl-old-style])            ["Current" (cperl-set-style "Current") t]
1179            ("Micro-docs"            ["Memorized" (cperl-set-style-back) cperl-old-style])
1180             ["Tips" (describe-variable 'cperl-tips) t]           ("Micro-docs"
1181             ["Problems" (describe-variable 'cperl-problems) t]            ["Tips" (describe-variable 'cperl-tips) t]
1182             ["Speed" (describe-variable 'cperl-speed) t]            ["Problems" (describe-variable 'cperl-problems) t]
1183             ["Praise" (describe-variable 'cperl-praise) t]            ["Speed" (describe-variable 'cperl-speed) t]
1184             ["Faces" (describe-variable 'cperl-tips-faces) t]            ["Praise" (describe-variable 'cperl-praise) t]
1185             ["CPerl mode" (describe-function 'cperl-mode) t]            ["Faces" (describe-variable 'cperl-tips-faces) t]
1186             ["CPerl version"            ["CPerl mode" (describe-function 'cperl-mode) t]
1187              (message "The version of master-file for this CPerl is %s-emacs"            ["CPerl version"
1188                       cperl-version) t]))))             (message "The version of master-file for this CPerl is %s-Emacs"
1189                        cperl-version) t]))))
1190    (error nil))    (error nil))
1191    
1192  (autoload 'c-macro-expand "cmacexp"  (autoload 'c-macro-expand "cmacexp"
# Line 1469  or as help on variables `cperl-tips', `c Line 1477  or as help on variables `cperl-tips', `c
1477    (make-local-variable 'comment-start-skip)    (make-local-variable 'comment-start-skip)
1478    (setq comment-start-skip "#+ *")    (setq comment-start-skip "#+ *")
1479    (make-local-variable 'defun-prompt-regexp)    (make-local-variable 'defun-prompt-regexp)
1480    (setq defun-prompt-regexp "^[ \t]*sub[ \t]+\\([^ \t\n{(;]+\\)[ \t]*")    (setq defun-prompt-regexp "^[ \t]*sub[ \t]+\\([^ \t\n{(;]+\\)\\([ \t]*([^()]*)[ \t]*\\)?[ \t]*")
1481    (make-local-variable 'comment-indent-function)    (make-local-variable 'comment-indent-function)
1482    (setq comment-indent-function 'cperl-comment-indent)    (setq comment-indent-function 'cperl-comment-indent)
1483    (make-local-variable 'parse-sexp-ignore-comments)    (make-local-variable 'parse-sexp-ignore-comments)
# Line 1692  char is \"{\", insert extra newline befo Line 1700  char is \"{\", insert extra newline befo
1700                      (save-excursion                      (save-excursion
1701                        (up-list (- (prefix-numeric-value arg)))                        (up-list (- (prefix-numeric-value arg)))
1702                        ;;(cperl-after-block-p (point-min))                        ;;(cperl-after-block-p (point-min))
1703                        (cperl-after-expr-p nil "{;)"))                        (or (cperl-after-expr-p nil "{;)")
1704                              ;; after sub, else, continue
1705                              (cperl-after-block-p nil 'pre)))
1706                    (error nil))))                    (error nil))))
1707            ;; Just insert the guy            ;; Just insert the guy
1708            (self-insert-command (prefix-numeric-value arg))            (self-insert-command (prefix-numeric-value arg))
# Line 1772  char is \"{\", insert extra newline befo Line 1782  char is \"{\", insert extra newline befo
1782                  (goto-char pos)))))                  (goto-char pos)))))
1783    
1784  (defun cperl-electric-paren (arg)  (defun cperl-electric-paren (arg)
1785    "Insert a matching pair of parentheses."    "Insert an opening parenthesis or a matching pair of parentheses.
1786    See `cperl-electric-parens'."
1787    (interactive "P")    (interactive "P")
1788    (let ((beg (save-excursion (beginning-of-line) (point)))    (let ((beg (save-excursion (beginning-of-line) (point)))
1789          (other-end (if (and cperl-electric-parens-mark          (other-end (if (and cperl-electric-parens-mark
# Line 1807  char is \"{\", insert extra newline befo Line 1818  char is \"{\", insert extra newline befo
1818    
1819  (defun cperl-electric-rparen (arg)  (defun cperl-electric-rparen (arg)
1820    "Insert a matching pair of parentheses if marking is active.    "Insert a matching pair of parentheses if marking is active.
1821  If not, or if we are not at the end of marking range, would self-insert."  If not, or if we are not at the end of marking range, would self-insert.
1822    Affected by `cperl-electric-parens'."
1823    (interactive "P")    (interactive "P")
1824    (let ((beg (save-excursion (beginning-of-line) (point)))    (let ((beg (save-excursion (beginning-of-line) (point)))
1825          (other-end (if (and cperl-electric-parens-mark          (other-end (if (and cperl-electric-parens-mark
# Line 1867  to nil." Line 1879  to nil."
1879                                     (not (eq (get-text-property (point)                                     (not (eq (get-text-property (point)
1880                                                                 'syntax-type)                                                                 'syntax-type)
1881                                              'pod))))))                                              'pod))))))
1882             (save-excursion (forward-sexp -1)
1883                             (not (memq (following-char) (append "$@%&*" nil))))
1884           (progn           (progn
1885             (and (eq (preceding-char) ?y)             (and (eq (preceding-char) ?y)
1886                  (progn                  ; "foreachmy"                  (progn                  ; "foreachmy"
# Line 1896  to nil." Line 1910  to nil."
1910                               (if my                               (if my
1911                                   (forward-char 1)                                   (forward-char 1)
1912                                 (delete-char 1)))                                 (delete-char 1)))
1913               (search-backward ")"))               (search-backward ")")
1914                 (if (eq last-command-char ?\()
1915                     (progn                 ; Avoid "if (())"
1916                       (delete-backward-char 1)
1917                       (delete-backward-char -1))))
1918             (if delete             (if delete
1919                 (cperl-putback-char cperl-del-back-ch))                 (cperl-putback-char cperl-del-back-ch))
1920             (if cperl-message-electric-keyword             (if cperl-message-electric-keyword
# Line 2185  If in POD, insert appropriate lines." Line 2203  If in POD, insert appropriate lines."
2203        (self-insert-command (prefix-numeric-value arg)))))        (self-insert-command (prefix-numeric-value arg)))))
2204    
2205  (defun cperl-electric-backspace (arg)  (defun cperl-electric-backspace (arg)
2206    "Backspace-untabify, or remove the whitespace around the point inserted    "Backspace, or remove the whitespace around the point inserted by an electric
2207  by an electric key."  key.  Will untabify if `cperl-electric-backspace-untabify' is non-nil."
2208    (interactive "p")    (interactive "p")
2209    (if (and cperl-auto-newline    (if (and cperl-auto-newline
2210             (memq last-command '(cperl-electric-semi             (memq last-command '(cperl-electric-semi
# Line 2210  by an electric key." Line 2228  by an electric key."
2228            (setq p (point))            (setq p (point))
2229            (skip-chars-backward " \t\n")            (skip-chars-backward " \t\n")
2230            (delete-region (point) p))            (delete-region (point) p))
2231        (backward-delete-char-untabify arg))))        (if cperl-electric-backspace-untabify
2232              (backward-delete-char-untabify arg)
2233            (delete-backward-char arg)))))
2234    
2235  (defun cperl-inside-parens-p ()  (defun cperl-inside-parens-p ()
2236    (condition-case ()    (condition-case ()
# Line 2370  Returns nil if line starts inside a stri Line 2390  Returns nil if line starts inside a stri
2390    
2391  Will not correct the indentation for labels, but will correct it for braces  Will not correct the indentation for labels, but will correct it for braces
2392  and closing parentheses and brackets."  and closing parentheses and brackets."
2393      (cperl-update-syntaxification (point) (point))
2394    (save-excursion    (save-excursion
2395      (if (or      (if (or
2396           (and (memq (get-text-property (point) 'syntax-type)           (and (memq (get-text-property (point) 'syntax-type)
# Line 2467  and closing parentheses and brackets." Line 2488  and closing parentheses and brackets."
2488                                     (progn                                     (progn
2489                                       (forward-sexp -1)                                       (forward-sexp -1)
2490                                       (skip-chars-backward " \t")                                       (skip-chars-backward " \t")
2491                                       (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:"))))                                       (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:")))
2492                                  (get-text-property (point) 'first-format-line))
2493                            (progn                            (progn
2494                              (if (and parse-data                              (if (and parse-data
2495                                       (not (eq char-after ?\C-j)))                                       (not (eq char-after ?\C-j)))
# Line 2545  and closing parentheses and brackets." Line 2567  and closing parentheses and brackets."
2567                                      (append (if is-block " ;{" " ,;{") '(nil)))                                      (append (if is-block " ;{" " ,;{") '(nil)))
2568                                (and (eq (preceding-char) ?\})                                (and (eq (preceding-char) ?\})
2569                                     (cperl-after-block-and-statement-beg                                     (cperl-after-block-and-statement-beg
2570                                      containing-sexp))))                                      containing-sexp))
2571                                  (get-text-property (point) 'first-format-line)))
2572                       ;; This line is continuation of preceding line's statement;                       ;; This line is continuation of preceding line's statement;
2573                       ;; indent  `cperl-continued-statement-offset'  more than the                       ;; indent  `cperl-continued-statement-offset'  more than the
2574                       ;; previous line of the statement.                       ;; previous line of the statement.
# Line 2586  and closing parentheses and brackets." Line 2609  and closing parentheses and brackets."
2609                        (forward-char 1)                        (forward-char 1)
2610                        (setq old-indent (current-indentation))                        (setq old-indent (current-indentation))
2611                        (let ((colon-line-end 0))                        (let ((colon-line-end 0))
2612                          (while (progn (skip-chars-forward " \t\n")                          (while
2613                                        (looking-at "#\\|[a-zA-Z0-9_$]*:[^:]"))                              (progn (skip-chars-forward " \t\n")
2614                                       (looking-at "#\\|[a-zA-Z0-9_$]*:[^:]\\|=[a-zA-Z]"))
2615                            ;; Skip over comments and labels following openbrace.                            ;; Skip over comments and labels following openbrace.
2616                            (cond ((= (following-char) ?\#)                            (cond ((= (following-char) ?\#)
2617                                   (forward-line 1))                                   (forward-line 1))
2618                                    ((= (following-char) ?\=)
2619                                     (goto-char
2620                                      (or (next-single-property-change (point) 'in-pod)
2621                                          (point-max)))) ; do not loop if no syntaxification
2622                                  ;; label:                                  ;; label:
2623                                  (t                                  (t
2624                                   (save-excursion (end-of-line)                                   (save-excursion (end-of-line)
# Line 3050  Returns true if comment is found." Line 3078  Returns true if comment is found."
3078  ;;              The body is marked `syntax-type' ==> `here-doc'  ;;              The body is marked `syntax-type' ==> `here-doc'
3079  ;;              The delimiter is marked `syntax-type' ==> `here-doc-delim'  ;;              The delimiter is marked `syntax-type' ==> `here-doc-delim'
3080  ;;      c) FORMATs:  ;;      c) FORMATs:
3081  ;;              After-initial-line--to-end is marked `syntax-type' ==> `format'  ;;              First line (to =) marked `first-format-line' ==> t
3082    ;;              After-this--to-end is marked `syntax-type' ==> `format'
3083  ;;      d) 'Q'uoted string:  ;;      d) 'Q'uoted string:
3084  ;;              part between markers inclusive is marked `syntax-type' ==> `string'  ;;              part between markers inclusive is marked `syntax-type' ==> `string'
3085  ;;              part between `q' and the first marker is marked `syntax-type' ==> `prestring'  ;;              part between `q' and the first marker is marked `syntax-type' ==> `prestring'
# Line 3147  the sections using `cperl-pod-head-face' Line 3176  the sections using `cperl-pod-head-face'
3176             "\\([^\"'`\n]*\\)"           ; 3 + 1             "\\([^\"'`\n]*\\)"           ; 3 + 1
3177             "\\3"             "\\3"
3178             "\\|"             "\\|"
3179             ;; Second variant: Identifier or \ID or empty             ;; Second variant: Identifier or \ID (same as 'ID') or empty
3180             "\\\\?\\(\\([a-zA-Z_][a-zA-Z_0-9]*\\)?\\)" ; 4 + 1, 5 + 1             "\\\\?\\(\\([a-zA-Z_][a-zA-Z_0-9]*\\)?\\)" ; 4 + 1, 5 + 1
3181             ;; Do not have <<= or << 30 or <<30 or << $blah.             ;; Do not have <<= or << 30 or <<30 or << $blah.
3182             ;; "\\([^= \t0-9$@%&]\\|[ \t]+[^ \t\n0-9$@%&]\\)" ; 6 + 1             ;; "\\([^= \t0-9$@%&]\\|[ \t]+[^ \t\n0-9$@%&]\\)" ; 6 + 1
# Line 3178  the sections using `cperl-pod-head-face' Line 3207  the sections using `cperl-pod-head-face'
3207                  "__\\(END\\|DATA\\)__"                  "__\\(END\\|DATA\\)__"
3208                  ;; 1+6+2+1+1+2+1+1+1=16 extra () before this:                  ;; 1+6+2+1+1+2+1+1+1=16 extra () before this:
3209                  "\\|"                  "\\|"
3210                  "\\\\\\(['`\"]\\)")                  "\\\\\\(['`\"($]\\)")
3211               ""))))               ""))))
3212      (unwind-protect      (unwind-protect
3213          (progn          (progn
# Line 3195  the sections using `cperl-pod-head-face' Line 3224  the sections using `cperl-pod-head-face'
3224                                                    cperl-postpone t                                                    cperl-postpone t
3225                                                    syntax-subtype t                                                    syntax-subtype t
3226                                                    rear-nonsticky t                                                    rear-nonsticky t
3227                                                      here-doc-group t
3228                                                      first-format-line t
3229                                                    indentable t))                                                    indentable t))
3230              ;; Need to remove face as well...              ;; Need to remove face as well...
3231              (goto-char min)              (goto-char min)
# Line 3239  the sections using `cperl-pod-head-face' Line 3270  the sections using `cperl-pod-head-face'
3270                            max e '(syntax-type t in-pod t syntax-table t                            max e '(syntax-type t in-pod t syntax-table t
3271                                                cperl-postpone t                                                cperl-postpone t
3272                                                syntax-subtype t                                                syntax-subtype t
3273                                                  here-doc-group t
3274                                                rear-nonsticky t                                                rear-nonsticky t
3275                                                  first-format-line t
3276                                                indentable t))                                                indentable t))
3277                           (setq tmpend tb)))                           (setq tmpend tb)))
3278                    (put-text-property b e 'in-pod t)                    (put-text-property b e 'in-pod t)
# Line 3287  the sections using `cperl-pod-head-face' Line 3320  the sections using `cperl-pod-head-face'
3320                 ;;"<<"                 ;;"<<"
3321                 ;;  "\\("                        ; 1 + 1                 ;;  "\\("                        ; 1 + 1
3322                 ;;  ;; First variant "BLAH" or just ``.                 ;;  ;; First variant "BLAH" or just ``.
3323                   ;;     "[ \t]*"                  ; Yes, whitespace is allowed!
3324                 ;;     "\\([\"'`]\\)"    ; 2 + 1                 ;;     "\\([\"'`]\\)"    ; 2 + 1
3325                 ;;     "\\([^\"'`\n]*\\)"        ; 3 + 1                 ;;     "\\([^\"'`\n]*\\)"        ; 3 + 1
3326                 ;;     "\\3"                 ;;     "\\3"
# Line 3328  the sections using `cperl-pod-head-face' Line 3362  the sections using `cperl-pod-head-face'
3362                    (setq b (point))                    (setq b (point))
3363                    ;; We do not search to max, since we may be called from                    ;; We do not search to max, since we may be called from
3364                    ;; some hook of fontification, and max is random                    ;; some hook of fontification, and max is random
3365                    (cond ((re-search-forward (concat "^" qtag "$")                    (or (and (re-search-forward (concat "^" qtag "$")
3366                                              stop-point 'toend)                                                stop-point 'toend)
3367                           (if cperl-pod-here-fontify                             (eq (following-char) ?\n))
3368                               (progn                      (progn              ; Pretend we matched at the end
3369                                 ;; Highlight the ending delimiter                        (goto-char (point-max))
3370                                 (cperl-postpone-fontification (match-beginning 0) (match-end 0)                        (re-search-forward "\\'")
3371                                                               'face font-lock-constant-face)                        (message "End of here-document `%s' not found." tag)
3372                                 (cperl-put-do-not-fontify b (match-end 0) t)                        (or (car err-l) (setcar err-l b))))
3373                                 ;; Highlight the HERE-DOC                    (if cperl-pod-here-fontify
3374                                 (cperl-postpone-fontification b (match-beginning 0)                        (progn
3375                                                               'face here-face)))                          ;; Highlight the ending delimiter
3376                           (setq e1 (cperl-1+ (match-end 0)))                          (cperl-postpone-fontification (match-beginning 0) (match-end 0)
3377                           (put-text-property b (match-beginning 0)                                                        'face font-lock-constant-face)
3378                                              'syntax-type 'here-doc)                          (cperl-put-do-not-fontify b (match-end 0) t)
3379                           (put-text-property (match-beginning 0) e1                          ;; Highlight the HERE-DOC
3380                                              'syntax-type 'here-doc-delim)                          (cperl-postpone-fontification b (match-beginning 0)
3381                           (put-text-property b e1                                                        'face here-face)))
3382                                              'here-doc-group t)                    (setq e1 (cperl-1+ (match-end 0)))
3383                           (cperl-commentify b e1 nil)                    (put-text-property b (match-beginning 0)
3384                           (cperl-put-do-not-fontify b (match-end 0) t)                                       'syntax-type 'here-doc)
3385                           (if (> e1 max)                    (put-text-property (match-beginning 0) e1
3386                               (setq tmpend tb)))                                       'syntax-type 'here-doc-delim)
3387                          (t (message "End of here-document `%s' not found." tag)                    (put-text-property b e1
3388                             (or (car err-l) (setcar err-l b))))))                                       'here-doc-group t)
3389                      (cperl-commentify b e1 nil)
3390                      (cperl-put-do-not-fontify b (match-end 0) t)
3391                      (if (> e1 max)
3392                          (setq tmpend tb))))
3393                 ;; format                 ;; format
3394                 ((match-beginning 8)                 ((match-beginning 8)
3395                  ;; 1+6=7 extra () before this:                  ;; 1+6=7 extra () before this:
# Line 3363  the sections using `cperl-pod-head-face' Line 3401  the sections using `cperl-pod-head-face'
3401                               "")                               "")
3402                        tb (match-beginning 0))                        tb (match-beginning 0))
3403                  (setq argument nil)                  (setq argument nil)
3404                    (put-text-property (save-excursion
3405                                         (beginning-of-line)
3406                                         (point))
3407                                       b 'first-format-line 't)
3408                  (if cperl-pod-here-fontify                  (if cperl-pod-here-fontify
3409                      (while (and (eq (forward-line) 0)                      (while (and (eq (forward-line) 0)
3410                                  (not (looking-at "^[.;]$")))                                  (not (looking-at "^[.;]$")))
# Line 3415  the sections using `cperl-pod-head-face' Line 3457  the sections using `cperl-pod-head-face'
3457                        bb (char-after (1- (match-beginning b1))) ; tmp holder                        bb (char-after (1- (match-beginning b1))) ; tmp holder
3458                        ;; bb == "Not a stringy"                        ;; bb == "Not a stringy"
3459                        bb (if (eq b1 10) ; user variables/whatever                        bb (if (eq b1 10) ; user variables/whatever
3460                               (or                               (and (memq bb (append "$@%*#_:-&>" nil)) ; $#y)
3461                                (memq bb '(?\$ ?\@ ?\% ?\* ?\#)) ; $#y                                    (cond ((eq bb ?-) (eq c ?s)) ; -s file test
3462                                (and (eq bb ?-) (eq c ?s)) ; -s file test                                          ((eq bb ?\:) ; $opt::s
3463                                (and (eq bb ?\&)                                           (eq (char-after
3464                                     (not (eq (char-after ; &&m/blah/                                                (- (match-beginning b1) 2))
3465                                               (- (match-beginning b1) 2))                                               ?\:))
3466                                              ?\&))))                                          ((eq bb ?\>) ; $foo->s
3467                                             (eq (char-after
3468                                                  (- (match-beginning b1) 2))
3469                                                 ?\-))
3470                                            ((eq bb ?\&)
3471                                             (not (eq (char-after   ; &&m/blah/
3472                                                       (- (match-beginning b1) 2))
3473                                                      ?\&)))
3474                                            (t t)))
3475                             ;; <file> or <$file>                             ;; <file> or <$file>
3476                             (and (eq c ?\<)                             (and (eq c ?\<)
3477                                  ;; Do not stringify <FH>, <$fh> :                                  ;; Do not stringify <FH>, <$fh> :
# Line 3434  the sections using `cperl-pod-head-face' Line 3484  the sections using `cperl-pod-head-face'
3484                  (or bb                  (or bb
3485                      (if (eq b1 11)      ; bare /blah/ or ?blah? or <foo>                      (if (eq b1 11)      ; bare /blah/ or ?blah? or <foo>
3486                          (setq argument ""                          (setq argument ""
3487                                  b1 nil
3488                                bb        ; Not a regexp?                                bb        ; Not a regexp?
3489                                (progn                                (progn
3490                                  (not                                  (not
# Line 3472  the sections using `cperl-pod-head-face' Line 3523  the sections using `cperl-pod-head-face'
3523                                            (looking-at "\\s|")))))))                                            (looking-at "\\s|")))))))
3524                                b (1- b))                                b (1- b))
3525                        ;; s y tr m                        ;; s y tr m
3526                        ;; Check for $a->y                        ;; Check for $a -> y
3527                        (if (and (eq (preceding-char) ?>)                        (setq b1 (preceding-char)
3528                                 (eq (char-after (- (point) 2)) ?-))                              go (point))
3529                          (if (and (eq b1 ?>)
3530                                   (eq (char-after (- go 2)) ?-))
3531                            ;; Not a regexp                            ;; Not a regexp
3532                            (setq bb t))))                            (setq bb t))))
3533                  (or bb (setq state (parse-partial-sexp                  (or bb (setq state (parse-partial-sexp
3534                                      state-point b nil nil state)                                      state-point b nil nil state)
3535                               state-point b))                               state-point b))
3536                    (setq bb (or bb (nth 3 state) (nth 4 state)))
3537                  (goto-char b)                  (goto-char b)
3538                  (if (or bb (nth 3 state) (nth 4 state))                  (or bb
3539                        (progn
3540                          (if (looking-at "[ \t\n\f]+\\(#[^\n]*\n[ \t\n\f]*\\)+")
3541                              (goto-char (match-end 0))
3542                            (skip-chars-forward " \t\n\f"))
3543                          (cond ((and (eq (following-char) ?\})
3544                                      (eq b1 ?\{))
3545                                 ;; Check for $a[23]->{ s }, @{s} and *{s::foo}
3546                                 (goto-char (1- go))
3547                                 (skip-chars-backward " \t\n\f")
3548                                 (if (memq (preceding-char) (append "$@%&*" nil))
3549                                     (setq bb t) ; @{y}
3550                                   (condition-case nil
3551                                       (forward-sexp -1)
3552                                     (error nil)))
3553                                 (if (or bb
3554                                         (looking-at ; $foo -> {s}
3555                                          "[$@]\\$*\\([a-zA-Z0-9_:]+\\|[^{]\\)\\([ \t\n]*->\\)?[ \t\n]*{")
3556                                         (and ; $foo[12] -> {s}
3557                                          (memq (following-char) '(?\{ ?\[))
3558                                          (progn
3559                                            (forward-sexp 1)
3560                                            (looking-at "\\([ \t\n]*->\\)?[ \t\n]*{"))))
3561                                     (setq bb t)
3562                                   (goto-char b)))
3563                                ((and (eq (following-char) ?=)
3564                                      (eq (char-after (1+ (point))) ?\>))
3565                                 ;; Check for { foo => 1, s => 2 }
3566                                 ;; Apparently s=> is never a substitution...
3567                                 (setq bb t))
3568                                ((and (eq (following-char) ?:)
3569                                      (eq b1 ?\{) ; Check for $ { s::bar }
3570                                      (looking-at "::[a-zA-Z0-9_:]*[ \t\n\f]*}")
3571                                      (progn
3572                                        (goto-char (1- go))
3573                                        (skip-chars-backward " \t\n\f")
3574                                        (memq (preceding-char)
3575                                              (append "$@%&*" nil))))
3576                                 (setq bb t)))))
3577                    (if bb
3578                      (goto-char i)                      (goto-char i)
3579                    ;; Skip whitespace and comments...                    ;; Skip whitespace and comments...
3580                    (if (looking-at "[ \t\n\f]+\\(#[^\n]*\n[ \t\n\f]*\\)+")                    (if (looking-at "[ \t\n\f]+\\(#[^\n]*\n[ \t\n\f]*\\)+")
# Line 3703  the sections using `cperl-pod-head-face' Line 3796  the sections using `cperl-pod-head-face'
3796                    (cperl-commentify b bb nil)                    (cperl-commentify b bb nil)
3797                    (setq end t))                    (setq end t))
3798                  (goto-char bb))                  (goto-char bb))
3799                 ((match-beginning 17)    ; "\\\\\\(['`\"]\\)"                 ((match-beginning 17)    ; "\\\\\\(['`\"($]\\)"
3800                    ;; Trailing backslash ==> non-quoting outside string/comment
3801                  (setq bb (match-end 0)                  (setq bb (match-end 0)
3802                        b (match-beginning 0))                        b (match-beginning 0))
3803                  (goto-char b)                  (goto-char b)
# Line 3752  the sections using `cperl-pod-head-face' Line 3846  the sections using `cperl-pod-head-face'
3846              (if (< p (point)) (goto-char p))              (if (< p (point)) (goto-char p))
3847              (setq stop t)))))))              (setq stop t)))))))
3848    
3849  (defun cperl-after-block-p (lim)  (defun cperl-after-block-p (lim &optional pre-block)
3850      "Return true if the preceeding } ends a block or a following { starts one.
3851    Would not look before LIM.  If PRE-BLOCK is nil checks preceeding }.
3852    otherwise following {."
3853    ;; We suppose that the preceding char is }.    ;; We suppose that the preceding char is }.
3854    (save-excursion    (save-excursion
3855      (condition-case nil      (condition-case nil
3856          (progn          (progn
3857            (forward-sexp -1)            (or pre-block (forward-sexp -1))
3858            (cperl-backward-to-noncomment lim)            (cperl-backward-to-noncomment lim)
3859            (or (eq (point) lim)            (or (eq (point) lim)
3860                (eq (preceding-char) ?\) ) ; if () {}    sub f () {}                (eq (preceding-char) ?\) ) ; if () {}    sub f () {}
3861                (if (eq (char-syntax (preceding-char)) ?w) ; else {}                (if (eq (char-syntax (preceding-char)) ?w) ; else {}
3862                    (save-excursion                    (save-excursion
3863                      (forward-sexp -1)                      (forward-sexp -1)
3864                      (or (looking-at "\\(else\\|grep\\|map\\|BEGIN\\|END\\|CHECK\\|INIT\\)\\>")                      (or (looking-at "\\(else\\|continue\\|grep\\|map\\|BEGIN\\|END\\|CHECK\\|INIT\\)\\>")
3865                          ;; sub f {}                          ;; sub f {}
3866                          (progn                          (progn
3867                            (cperl-backward-to-noncomment lim)                            (cperl-backward-to-noncomment lim)
# Line 3781  TEST is the expression to evaluate at th Line 3878  TEST is the expression to evaluate at th
3878  CHARS is a string that contains good characters to have before us (however,  CHARS is a string that contains good characters to have before us (however,
3879  `}' is treated \"smartly\" if it is not in the list)."  `}' is treated \"smartly\" if it is not in the list)."
3880    (let ((lim (or lim (point-min)))    (let ((lim (or lim (point-min)))
3881          stop p)          stop p pr)
3882        (cperl-update-syntaxification (point) (point))
3883      (save-excursion      (save-excursion
3884        (while (and (not stop) (> (point) lim))        (while (and (not stop) (> (point) lim))
3885          (skip-chars-backward " \t\n\f" lim)          (skip-chars-backward " \t\n\f" lim)
3886          (setq p (point))          (setq p (point))
3887          (beginning-of-line)          (beginning-of-line)
3888            ;;(memq (setq pr (get-text-property (point) 'syntax-type))
3889            ;;      '(pod here-doc here-doc-delim))
3890            (if (get-text-property (point) 'here-doc-group)
3891                (progn
3892                  (goto-char
3893                   (previous-single-property-change (point) 'here-doc-group))
3894                  (beginning-of-line 0)))
3895            (if (get-text-property (point) 'in-pod)
3896                (progn
3897                  (goto-char
3898                   (previous-single-property-change (point) 'in-pod))
3899                  (beginning-of-line 0)))
3900          (if (looking-at "^[ \t]*\\(#\\|$\\)") nil ; Only comment, skip          (if (looking-at "^[ \t]*\\(#\\|$\\)") nil ; Only comment, skip
3901            ;; Else: last iteration, or a label            ;; Else: last iteration, or a label
3902            (cperl-to-comment-or-eol)            (cperl-to-comment-or-eol)     ; Will not move past "." after a format
3903            (skip-chars-backward " \t")            (skip-chars-backward " \t")
3904            (if (< p (point)) (goto-char p))            (if (< p (point)) (goto-char p))
3905            (setq p (point))            (setq p (point))
# Line 3808  CHARS is a string that contains good cha Line 3918  CHARS is a string that contains good cha
3918              (if test (eval test)              (if test (eval test)
3919                (or (memq (preceding-char) (append (or chars "{;") nil))                (or (memq (preceding-char) (append (or chars "{;") nil))
3920                    (and (eq (preceding-char) ?\})                    (and (eq (preceding-char) ?\})
3921                         (cperl-after-block-p lim)))))))))                         (cperl-after-block-p lim))
3922                      (and (eq (following-char) ?.) ; in format: see comment above
3923                           (eq (get-text-property (point) 'syntax-type)
3924                               'format)))))))))
3925    
3926  (defun cperl-backward-to-start-of-continued-exp (lim)  (defun cperl-backward-to-start-of-continued-exp (lim)
3927    (if (memq (preceding-char) (append ")]}\"'`" nil))    (if (memq (preceding-char) (append ")]}\"'`" nil))
# Line 3931  Returns some position at the last line." Line 4044  Returns some position at the last line."
4044          (if (looking-at          (if (looking-at
4045               "[ \t]*\\<for\\(each\\)?[ \t]+\\(my\\|local\\|our\\)[ \t]*\\$[_a-zA-Z0-9]+\\(\t*\\|[ \t][ \t]+\\)[^ \t\n#]")               "[ \t]*\\<for\\(each\\)?[ \t]+\\(my\\|local\\|our\\)[ \t]*\\$[_a-zA-Z0-9]+\\(\t*\\|[ \t][ \t]+\\)[^ \t\n#]")
4046              (progn              (progn
4047                (forward-word 3)                (forward-sexp 3)
4048                (delete-horizontal-space)                (delete-horizontal-space)
4049                (insert                (insert
4050                 (make-string cperl-indent-region-fix-constructs ?\ ))                 (make-string cperl-indent-region-fix-constructs ?\ ))
# Line 5394  in subdirectories too." Line 5507  in subdirectories too."
5507             (if (cperl-val 'cperl-electric-parens) "" "not ")))             (if (cperl-val 'cperl-electric-parens) "" "not ")))
5508    
5509  (defun cperl-toggle-autohelp ()  (defun cperl-toggle-autohelp ()
5510    "Toggle the state of automatic help message in CPerl mode.    "Toggle the state of Auto-Help on Perl constructs (put in the message area).
5511  See `cperl-lazy-help-time' too."  Delay of auto-help controlled by `cperl-lazy-help-time'."
5512    (interactive)    (interactive)
5513    (if (fboundp 'run-with-idle-timer)    (if (fboundp 'run-with-idle-timer)
5514        (progn        (progn
5515          (if cperl-lazy-installed          (if cperl-lazy-installed
5516              (eval '(cperl-lazy-unstall))              (cperl-lazy-unstall)
5517            (cperl-lazy-install))            (cperl-lazy-install))
5518          (message "Perl help messages will %sbe automatically shown now."          (message "Perl help messages will %sbe automatically shown now."
5519                   (if cperl-lazy-installed "" "not ")))                   (if cperl-lazy-installed "" "not ")))
# Line 6131  than a line.  Your contribution to updat Line 6244  than a line.  Your contribution to updat
6244  (defvar cperl-short-docs 'please-ignore-this-line  (defvar cperl-short-docs 'please-ignore-this-line
6245    ;; Perl4 version was written by Johan Vromans (jvromans@squirrel.nl)    ;; Perl4 version was written by Johan Vromans (jvromans@squirrel.nl)
6246    "# based on '@(#)@ perl-descr.el 1.9 - describe-perl-symbol' [Perl 5]    "# based on '@(#)@ perl-descr.el 1.9 - describe-perl-symbol' [Perl 5]
6247    ...     Range (list context); flip/flop [no flop when flip] (scalar context).
6248  ! ...   Logical negation.  ! ...   Logical negation.
6249  ... != ...      Numeric inequality.  ... != ...      Numeric inequality.
6250  ... !~ ...      Search pattern, substitution, or translation (negated).  ... !~ ...      Search pattern, substitution, or translation (negated).
6251  $!      In numeric context: errno.  In a string context: error string.  $!      In numeric context: errno.  In a string context: error string.
6252  $\"     The separator which joins elements of arrays interpolated in strings.  $\"     The separator which joins elements of arrays interpolated in strings.
6253  $#      The output format for printed numbers.  Initial value is %.15g or close.  $#      The output format for printed numbers.  Default is %.15g or close.
6254  $$      Process number of this script.  Changes in the fork()ed child process.  $$      Process number of this script.  Changes in the fork()ed child process.
6255  $%      The current page number of the currently selected output channel.  $%      The current page number of the currently selected output channel.
6256    
# Line 6163  $,     The output field separator for the pr Line 6277  $,     The output field separator for the pr
6277  $-      The number of lines left on the page.  $-      The number of lines left on the page.
6278  $.      The current input line number of the last filehandle that was read.  $.      The current input line number of the last filehandle that was read.
6279  $/      The input record separator, newline by default.  $/      The input record separator, newline by default.
6280  $0      Name of the file containing the perl script being executed.  May be set.  $0      Name of the file containing the current perl script (read/write).
6281  $:     String may be broken after these characters to fill ^-lines in a format.  $:     String may be broken after these characters to fill ^-lines in a format.
6282  $;      Subscript separator for multi-dim array emulation.  Default \"\\034\".  $;      Subscript separator for multi-dim array emulation.  Default \"\\034\".
6283  $<      The real uid of this process.  $<      The real uid of this process.
# Line 6240  $~     The name of the current report format Line 6354  $~     The name of the current report format
6354  -x      File is executable by effective uid.  -x      File is executable by effective uid.
6355  -z      File has zero size.  -z      File has zero size.
6356  .       Concatenate strings.  .       Concatenate strings.
6357  ..      Alternation, also range operator.  ..      Range (list context); flip/flop (scalar context) operator.
6358  .=      Concatenate assignment strings  .=      Concatenate assignment strings
6359  ... / ...       Division.       /PATTERN/ioxsmg Pattern match  ... / ...       Division.       /PATTERN/ioxsmg Pattern match
6360  ... /= ...      Division assignment.  ... /= ...      Division assignment.
6361  /PATTERN/ioxsmg Pattern match.  /PATTERN/ioxsmg Pattern match.
6362  ... < ...       Numeric less than.      <pattern>       Glob.   See <NAME>, <> as well.  ... < ...    Numeric less than. <pattern>       Glob.   See <NAME>, <> as well.
6363  <NAME>  Reads line from filehandle NAME (a bareword or dollar-bareword).  <NAME>  Reads line from filehandle NAME (a bareword or dollar-bareword).
6364  <pattern>       Glob (Unless pattern is bareword/dollar-bareword - see <NAME>).  <pattern>       Glob (Unless pattern is bareword/dollar-bareword - see <NAME>).
6365  <>      Reads line from union of files in @ARGV (= command line) and STDIN.  <>      Reads line from union of files in @ARGV (= command line) and STDIN.
# Line 6263  $~     The name of the current report format Line 6377  $~     The name of the current report format
6377  ?PATTERN?       One-time pattern match.  ?PATTERN?       One-time pattern match.
6378  @ARGV   Command line arguments (not including the command name - see $0).  @ARGV   Command line arguments (not including the command name - see $0).
6379  @INC    List of places to look for perl scripts during do/include/use.  @INC    List of places to look for perl scripts during do/include/use.
6380  @_      Parameter array for subroutines.  Also used by split unless in array context.  @_    Parameter array for subroutines; result of split() unless in list context.
6381  \\  Creates reference to what follows, like \$var, or quotes non-\w in strings.  \\  Creates reference to what follows, like \$var, or quotes non-\w in strings.
6382  \\0     Octal char, e.g. \\033.  \\0     Octal char, e.g. \\033.
6383  \\E     Case modification terminator.  See \\Q, \\L, and \\U.  \\E     Case modification terminator.  See \\Q, \\L, and \\U.
# Line 6969  We suppose that the regexp is scanned al Line 7083  We suppose that the regexp is scanned al
7083                   default-entry)                   default-entry)
7084               input))))               input))))
7085    (require 'man)    (require 'man)
7086    (let* ((is-func (and    (let* ((case-fold-search nil)
7087             (is-func (and
7088                     (string-match "^[a-z]+$" word)                     (string-match "^[a-z]+$" word)
7089                     (string-match (concat "^" word "\\>")                     (string-match (concat "^" word "\\>")
7090                                   (documentation-property                                   (documentation-property
7091                                    'cperl-short-docs                                    'cperl-short-docs
7092                                    'variable-documentation))))                                    'variable-documentation))))
7093           (manual-program (if is-func "perldoc -f" "perldoc")))           (manual-program (if is-func "perldoc -f" "perldoc")))
7094      (Man-getpage-in-background word)))      (cond
7095         (cperl-xemacs-p
7096          (let ((Manual-program "perldoc")
7097                (Manual-switches (if is-func (list "-f"))))
7098            (manual-entry word)))
7099         (t
7100          (Man-getpage-in-background word)))))
7101    
7102  (defun cperl-perldoc-at-point ()  (defun cperl-perldoc-at-point ()
7103    "Run a `perldoc' on the word around point."    "Run a `perldoc' on the word around point."
# Line 7006  We suppose that the regexp is scanned al Line 7127  We suppose that the regexp is scanned al
7127                          (format (cperl-pod2man-build-command) pod2man-args))                          (format (cperl-pod2man-build-command) pod2man-args))
7128           'Man-bgproc-sentinel)))))           'Man-bgproc-sentinel)))))
7129    
7130    ;;; Updated version by him too
7131    (defun cperl-build-manpage ()
7132      "Create a virtual manpage in Emacs from the POD in the file."
7133      (interactive)
7134      (require 'man)
7135      (cond
7136       (cperl-xemacs-p
7137        (let ((Manual-program "perldoc"))
7138          (manual-entry buffer-file-name)))
7139       (t
7140        (let* ((manual-program "perldoc"))
7141          (Man-getpage-in-background buffer-file-name)))))
7142    
7143  (defun cperl-pod2man-build-command ()  (defun cperl-pod2man-build-command ()
7144    "Builds the entire background manpage and cleaning command."    "Builds the entire background manpage and cleaning command."
7145    (let ((command (concat pod2man-program " %s 2>/dev/null"))    (let ((command (concat pod2man-program " %s 2>/dev/null"))
# Line 7024  We suppose that the regexp is scanned al Line 7158  We suppose that the regexp is scanned al
7158      command))      command))
7159    
7160  (defun cperl-lazy-install ())           ; Avoid a warning  (defun cperl-lazy-install ())           ; Avoid a warning
7161    (defun cperl-lazy-unstall ())           ; Avoid a warning
7162    
7163  (if (fboundp 'run-with-idle-timer)  (if (fboundp 'run-with-idle-timer)
7164      (progn      (progn
# Line 7034  We suppose that the regexp is scanned al Line 7169  We suppose that the regexp is scanned al
7169          "Non-nil means that the lazy-help handlers are installed now.")          "Non-nil means that the lazy-help handlers are installed now.")
7170    
7171        (defun cperl-lazy-install ()        (defun cperl-lazy-install ()
7172            "Switches on Auto-Help on Perl constructs (put in the message area).
7173    Delay of auto-help controlled by `cperl-lazy-help-time'."
7174          (interactive)          (interactive)
7175          (make-variable-buffer-local 'cperl-help-shown)          (make-variable-buffer-local 'cperl-help-shown)
7176          (if (and (cperl-val 'cperl-lazy-help-time)          (if (and (cperl-val 'cperl-lazy-help-time)
# Line 7047  We suppose that the regexp is scanned al Line 7184  We suppose that the regexp is scanned al
7184                (setq cperl-lazy-installed t))))                (setq cperl-lazy-installed t))))
7185    
7186        (defun cperl-lazy-unstall ()        (defun cperl-lazy-unstall ()
7187            "Switches off Auto-Help on Perl constructs (put in the message area).
7188    Delay of auto-help controlled by `cperl-lazy-help-time'."
7189          (interactive)          (interactive)
7190          (remove-hook 'post-command-hook 'cperl-lazy-hook)          (remove-hook 'post-command-hook 'cperl-lazy-hook)
7191          (cancel-function-timers 'cperl-get-help-defer)          (cancel-function-timers 'cperl-get-help-defer)
# Line 7123  We suppose that the regexp is scanned al Line 7262  We suppose that the regexp is scanned al
7262            (cperl-fontify-syntaxically to)))))            (cperl-fontify-syntaxically to)))))
7263    
7264  (defvar cperl-version  (defvar cperl-version
7265    (let ((v  "Revision: 4.35"))    (let ((v  "Revision: 5.0"))
7266      (string-match ":\\s *\\([0-9.]+\\)" v)      (string-match ":\\s *\\([0-9.]+\\)" v)
7267      (substring v (match-beginning 1) (match-end 1)))      (substring v (match-beginning 1) (match-end 1)))
7268    "Version of IZ-supported CPerl package this file is based on.")    "Version of IZ-supported CPerl package this file is based on.")

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

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