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#' |
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)) |
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." |
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. |
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 |
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))) |
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)))) |