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

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

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

revision 1.45 by monnier, Tue Nov 12 21:03:37 2002 UTC revision 1.46 by lektu, Tue Feb 4 13:24:35 2003 UTC
# Line 96  Line 96 
96  ;;     /{/; while (<${glob_me}>)  ;;     /{/; while (<${glob_me}>)
97  ;; but a simpler solution is to add a space between the $ and the {:  ;; but a simpler solution is to add a space between the $ and the {:
98  ;;     while (<$ {glob_me}>)  ;;     while (<$ {glob_me}>)
99  ;;  ;;
100  ;; Problem 7 is even worse, but this 'fix' does work :-(  ;; Problem 7 is even worse, but this 'fix' does work :-(
101  ;;     $DB'stop#'  ;;     $DB'stop#'
102  ;;         [$DB'line#'  ;;         [$DB'line#'
# Line 337  The expansion is entirely correct becaus Line 337  The expansion is entirely correct becaus
337                      (put-text-property                      (put-text-property
338                       (point) (progn (forward-comment (point-max)) (point))                       (point) (progn (forward-comment (point-max)) (point))
339                       'font-lock-multiline t)                       'font-lock-multiline t)
340                      ;;                      ;;
341                      (unless                      (unless
342                          (save-excursion                          (save-excursion
343                            (let* ((char2 (char-after))                            (let* ((char2 (char-after))
# Line 365  The expansion is entirely correct becaus Line 365  The expansion is entirely correct becaus
365              ;;    ;; FIXME: `end' is accessed via dyn-scoping.              ;;    ;; FIXME: `end' is accessed via dyn-scoping.
366              ;;    pos (min end (1- (point))) nil '(nil))              ;;    pos (min end (1- (point))) nil '(nil))
367              ;;   nil)))))))              ;;   nil)))))))
368            
369    
370  (defcustom perl-indent-level 4  (defcustom perl-indent-level 4
371    "*Indentation of Perl statements with respect to containing block."    "*Indentation of Perl statements with respect to containing block."
# Line 435  Variables controlling indentation style: Line 435  Variables controlling indentation style:
435      regardless of where in the line point is when the TAB command is used.      regardless of where in the line point is when the TAB command is used.
436   `perl-tab-to-comment'   `perl-tab-to-comment'
437      Non-nil means that for lines which don't need indenting, TAB will      Non-nil means that for lines which don't need indenting, TAB will
438      either delete an empty comment, indent an existing comment, move      either delete an empty comment, indent an existing comment, move
439      to end-of-line, or if at end-of-line already, create a new comment.      to end-of-line, or if at end-of-line already, create a new comment.
440   `perl-nochange'   `perl-nochange'
441      Lines starting with this regular expression are not auto-indented.      Lines starting with this regular expression are not auto-indented.
# Line 535  If at end-of-line, and not in a comment Line 535  If at end-of-line, and not in a comment
535                  (or (/= last-command-char ?:)                  (or (/= last-command-char ?:)
536                      ;; Colon is special only after a label ....                      ;; Colon is special only after a label ....
537                      (looking-at "\\s-*\\(\\w\\|\\s_\\)+$"))                      (looking-at "\\s-*\\(\\w\\|\\s_\\)+$"))
538                  (let ((pps (parse-partial-sexp                  (let ((pps (parse-partial-sexp
539                              (perl-beginning-of-function) insertpos)))                              (perl-beginning-of-function) insertpos)))
540                    (not (or (nth 3 pps) (nth 4 pps) (nth 5 pps))))))                    (not (or (nth 3 pps) (nth 4 pps) (nth 5 pps))))))
541           (progn                         ; must insert, indent, delete           (progn                         ; must insert, indent, delete
# Line 622  possible action from the following list: Line 622  possible action from the following list:
622    
623  (defun perl-indent-line (&optional nochange parse-start)  (defun perl-indent-line (&optional nochange parse-start)
624    "Indent current line as Perl code.    "Indent current line as Perl code.
625  Return the amount the indentation  Return the amount the indentation
626  changed by, or (parse-state) if line starts in a quoted string."  changed by, or (parse-state) if line starts in a quoted string."
627    (let ((case-fold-search nil)    (let ((case-fold-search nil)
628          (pos (- (point-max) (point)))          (pos (- (point-max) (point)))
# Line 850  Optional argument PARSE-START should be Line 850  Optional argument PARSE-START should be
850        (while (< (point) (marker-position last-mark))        (while (< (point) (marker-position last-mark))
851          (setq delta (perl-indent-line nil (marker-position bof-mark)))          (setq delta (perl-indent-line nil (marker-position bof-mark)))
852          (if (numberp delta)             ; unquoted start-of-line?          (if (numberp delta)             ; unquoted start-of-line?
853              (progn              (progn
854                (if (eolp)                (if (eolp)
855                    (delete-horizontal-space))                    (delete-horizontal-space))
856                (setq lsexp-mark (point-marker))))                (setq lsexp-mark (point-marker))))

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

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