all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6916: Fwd: [PATCH] fix indent bug in sh-script
@ 2010-08-26  5:16 Daniel Colascione
  2010-08-26 15:26 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Colascione @ 2010-08-26  5:16 UTC (permalink / raw
  To: 6916

Modes should not inspect font-lock-controlled properties to control
indentation. This patch fixes one such problem in sh-script that caused
newline-and-indent to malfunction when invoked at the end of a line
ending in a string delimiter.

diff --git a/override/sh-script.el b/override/sh-script.el
index 610fa14..94973f0 100644
--- a/override/sh-script.el
+++ b/override/sh-script.el
@@ -2233,10 +2233,9 @@ STRING        This is ignored for the purposes of
calculating
       ;; 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)






^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#6916: Fwd: [PATCH] fix indent bug in sh-script
  2010-08-26  5:16 bug#6916: Fwd: [PATCH] fix indent bug in sh-script Daniel Colascione
@ 2010-08-26 15:26 ` Chong Yidong
  0 siblings, 0 replies; 2+ messages in thread
From: Chong Yidong @ 2010-08-26 15:26 UTC (permalink / raw
  To: Daniel Colascione; +Cc: 6916

Daniel Colascione <dan.colascione@gmail.com> writes:

> Modes should not inspect font-lock-controlled properties to control
> indentation. This patch fixes one such problem in sh-script that caused
> newline-and-indent to malfunction when invoked at the end of a line
> ending in a string delimiter.

Thanks, applied.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-26 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-26  5:16 bug#6916: Fwd: [PATCH] fix indent bug in sh-script Daniel Colascione
2010-08-26 15:26 ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.