[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r107699: * lisp/progmodes/perl-mode.e
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r107699: * lisp/progmodes/perl-mode.el (perl-indent-line): Use `noindent' in strings. |
Date: |
Thu, 29 Mar 2012 23:13:04 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 107699
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2012-03-29 23:13:04 -0400
message:
* lisp/progmodes/perl-mode.el (perl-indent-line): Use `noindent' in strings.
(perl-calculate-indent): Return `noindent' in strings.
modified:
lisp/ChangeLog
lisp/progmodes/perl-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-03-29 14:00:00 +0000
+++ b/lisp/ChangeLog 2012-03-30 03:13:04 +0000
@@ -1,3 +1,8 @@
+2012-03-30 Stefan Monnier <address@hidden>
+
+ * progmodes/perl-mode.el (perl-indent-line): Use `noindent' in strings.
+ (perl-calculate-indent): Return `noindent' in strings.
+
2012-03-28 Sam Steingold <address@hidden>
* calendar/calendar.el (calendar-exit): Use `quit-windows-on'
=== modified file 'lisp/progmodes/perl-mode.el'
--- a/lisp/progmodes/perl-mode.el 2012-03-15 03:09:26 +0000
+++ b/lisp/progmodes/perl-mode.el 2012-03-30 03:13:04 +0000
@@ -378,7 +378,7 @@
;; we are: we have to go back to the beginning of this
;; "string" and count from there.
(condition-case nil
- (progn
+ (progn
;; Start after the first char since it doesn't have
;; paren-syntax (an alternative would be to let-bind
;; parse-sexp-lookup-properties).
@@ -415,17 +415,17 @@
;; s{...}{...}) we're right after the first arg, so we still have to
;; handle the second part.
(when (and twoargs close)
- ;; Skip whitespace and make sure that font-lock will
- ;; refontify the second part in the proper context.
- (put-text-property
- (point) (progn (forward-comment (point-max)) (point))
+ ;; Skip whitespace and make sure that font-lock will
+ ;; refontify the second part in the proper context.
+ (put-text-property
+ (point) (progn (forward-comment (point-max)) (point))
'syntax-multiline t)
- ;;
+ ;;
(when (< (point) limit)
- (put-text-property (point) (1+ (point))
- 'syntax-table
- (if (assoc (char-after)
- perl-quote-like-pairs)
+ (put-text-property (point) (1+ (point))
+ 'syntax-table
+ (if (assoc (char-after)
+ perl-quote-like-pairs)
;; Put an `e' in the cdr to mark this
;; char as "second arg starter".
(string-to-syntax "|e")
@@ -756,6 +756,7 @@
(setq shift-amt
(cond ((eq (char-after bof) ?=) 0)
((listp (setq indent (perl-calculate-indent bof))) indent)
+ ((eq 'noindent indent) indent)
((looking-at (or nochange perl-nochange)) 0)
(t
(skip-chars-forward " \t\f")
@@ -849,7 +850,7 @@
;; following_quotep minimum_paren-depth_this_scan)
;; Parsing stops if depth in parentheses becomes equal to third arg.
(setq containing-sexp (nth 1 state)))
- (cond ((nth 3 state) state) ; In a quoted string?
+ (cond ((nth 3 state) 'noindent) ; In a quoted string?
((null containing-sexp) ; Line is at top level.
(skip-chars-forward " \t\f")
(if (= (following-char) ?{)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r107699: * lisp/progmodes/perl-mode.el (perl-indent-line): Use `noindent' in strings.,
Stefan Monnier <=