GNU bug report logs - #12222
24.2; error: sh-syntax-propertize-function: Beginning of buffer

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sat, 18 Aug 2012 12:08:03 UTC

Severity: normal

Found in version 24.2

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12222 in the body.
You can then email your comments to 12222 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12222; Package emacs. (Sat, 18 Aug 2012 12:08:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 18 Aug 2012 12:08:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.2; error: sh-syntax-propertize-function: Beginning of buffer
Date: Sat, 18 Aug 2012 20:07:21 +0800
1. Emacs -q
2. C-x C-f x.sh
3. C-c : and set the shell to sh
4. C-c (

the last step should fail with this message:

  sh-syntax-propertize-function: Beginning of buffer

This is a regression.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12222; Package emacs. (Sat, 18 Aug 2012 18:25:02 GMT) Full text and rfc822 format available.

Message #8 received at 12222 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: 12222 <at> debbugs.gnu.org
Subject: Re: bug#12222: 24.2;
	error: sh-syntax-propertize-function: Beginning of buffer
Date: Sat, 18 Aug 2012 14:24:28 -0400
> This is a regression.

A regression from what? It's the same in 24.1.
Even in 22.1 and 23.1, there is: "Error during redisplay: (beginning-of-buffer)"




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12222; Package emacs. (Sun, 19 Aug 2012 01:25:02 GMT) Full text and rfc822 format available.

Message #11 received at 12222 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 12222 <at> debbugs.gnu.org
Subject: Re: bug#12222: 24.2;
	error: sh-syntax-propertize-function: Beginning of buffer
Date: Sun, 19 Aug 2012 09:24:32 +0800
On 2012-08-19 02:24 +0800, Glenn Morris wrote:
> A regression from what? It's the same in 24.1.
> Even in 22.1 and 23.1, there is: "Error during redisplay: (beginning-of-buffer)"

I just redid the experiment in 22.1¹ and it seemed to work.

Leo

Footnotes: 
¹  (GNU Emacs 22.1.1 (mac-apple-darwin) of 2012-06-25 on b1028.apple.com)




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Wed, 29 Aug 2012 18:35:02 GMT) Full text and rfc822 format available.

Notification sent to Leo <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Wed, 29 Aug 2012 18:35:02 GMT) Full text and rfc822 format available.

Message #16 received at 12222-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo <sdl.web <at> gmail.com>
Cc: 12222-done <at> debbugs.gnu.org
Subject: Re: bug#12222: 24.2;
	error: sh-syntax-propertize-function: Beginning of buffer
Date: Wed, 29 Aug 2012 14:33:40 -0400
> 1. Emacs -q
> 2. C-x C-f x.sh
> 3. C-c : and set the shell to sh
> 4. C-c (
> the last step should fail with this message:
>   sh-syntax-propertize-function: Beginning of buffer

I installed the patch below into emacs-24 which should fix this problem.
Thanks,


        Stefan


=== modified file 'lisp/progmodes/sh-script.el'
--- lisp/progmodes/sh-script.el	2012-08-28 16:01:59 +0000
+++ lisp/progmodes/sh-script.el	2012-08-29 18:29:49 +0000
@@ -1062,7 +1062,8 @@
               (backward-char 1))
             (when (eq (char-before) ?|)
               (backward-char 1) t)))
-      (when (progn (backward-char 2)
+      (and (> (point) (1+ (point-min)))
+           (progn (backward-char 2)
                    (if (> start (line-end-position))
                        (put-text-property (point) (1+ start)
                                           'syntax-multiline t))





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 27 Sep 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 267 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.