emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101195: Avoid using font-lock proper


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101195: Avoid using font-lock properties to indent in sh-get-indent-info.
Date: Thu, 26 Aug 2010 11:26:33 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101195
author: Daniel Colascione <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Thu 2010-08-26 11:26:33 -0400
message:
  Avoid using font-lock properties to indent in sh-get-indent-info.
  
  * progmodes/sh-script.el (sh-get-indent-info): Use syntax-ppss
  instead of inspecting font-lock properties (Bug#6916).
modified:
  lisp/ChangeLog
  lisp/progmodes/sh-script.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-08-26 13:46:19 +0000
+++ b/lisp/ChangeLog    2010-08-26 15:26:33 +0000
@@ -1,3 +1,8 @@
+2010-08-26  Daniel Colascione  <address@hidden>
+
+       * progmodes/sh-script.el (sh-get-indent-info): Use syntax-ppss
+       instead of inspecting font-lock properties (Bug#6916).
+
 2010-08-26  David Reitter  <address@hidden>
 
        * server.el (server-visit-files): Run pre-command-hook and

=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el       2010-05-14 21:21:12 +0000
+++ b/lisp/progmodes/sh-script.el       2010-08-26 15:26:33 +0000
@@ -2207,10 +2207,9 @@
       ;; Note: setting result to t means we are done and will return nil.
       ;;(This function never returns just t.)
       (cond
-       ((or (and (boundp 'font-lock-string-face) (not (bobp))
-                (eq (get-text-property (1- (point)) 'face)
-                    font-lock-string-face))
+       ((or (nth 3 (syntax-ppss (point)))
            (eq (get-text-property (point) 'face) sh-heredoc-face))
+       ;; String continuation -- don't indent
        (setq result t)
        (setq have-result t))
        ((looking-at "\\s-*#")          ; was (equal this-kw "#")


reply via email to

[Prev in Thread] Current Thread [Next in Thread]