From: Daniel Colascione <dan.colascione@gmail.com>
To: 6916@debbugs.gnu.org
Subject: bug#6916: Fwd: [PATCH] fix indent bug in sh-script
Date: Wed, 25 Aug 2010 22:16:55 -0700 [thread overview]
Message-ID: <4C75F8C7.4060201@gmail.com> (raw)
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)
next reply other threads:[~2010-08-26 5:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-26 5:16 Daniel Colascione [this message]
2010-08-26 15:26 ` bug#6916: Fwd: [PATCH] fix indent bug in sh-script Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C75F8C7.4060201@gmail.com \
--to=dan.colascione@gmail.com \
--cc=6916@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).