GNU bug report logs - #25517
print-format specifier mistaken as comment in inferior-octave-mode

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Tue, 24 Jan 2017 10:27:01 UTC

Severity: minor

Found in versions 25.1.91, 28.0

Full log


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

From: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
To: npostavs <at> users.sourceforge.net
Cc: 25517 <at> debbugs.gnu.org
Subject: Re: bug#25517: 25.1.91; print-format specifier mistaken as comment
Date: Wed, 25 Jan 2017 09:41:21 +0100

On 24.01.2017 23:49, npostavs <at> users.sourceforge.net wrote:
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>
>> On 24.01.2017 16:41, Noam Postavsky wrote:
>>> On Tue, Jan 24, 2017 at 10:35 AM, Andreas Röhler
>>> <andreas.roehler <at> easy-emacs.de> wrote:
>>>>> @@ -165,7 +165,7 @@ octave-mode-syntax-table
>>>>> -    (modify-syntax-entry ?\' "."  table)
>>>>> +    (modify-syntax-entry ?\' "\""  table)
>>>> Thanks. That should be a useful cure in octave-mode.
>>>>
>>>> A resp. fix seems needed in inferior-octave-mode-map.
>>> Huh? What do you think needs changing in inferior-octave-mode-map?
>>> That's a keymap? If you meant inferior-octave-mode-syntax-table, then
>>> it already inherits everything from octave-mode-syntax-table anyway.
>>>
>>> (defvar inferior-octave-mode-syntax-table
>>>     (let ((table (make-syntax-table octave-mode-syntax-table)))
>>>       table)
>>>     "Syntax table in use in `inferior-octave-mode' buffers.")
>> Okay, see. However, it's not gone - see attachment.
>> While correct at octave-mode.
> That's without the change though, right?

No, changed source according to your fix. Otherwise wouldn't expect it 
correct in plain octave-mode.

>
> I found out why octave-mode-syntax-table misses this setting:
> octave-mode uses a syntax-propertize-function to set the correct syntax
> for quotes, it looks like that's needed because of the way backslashes
> are handled.
>
> It's not so easy to apply octave-syntax-propertize-function to
> inferior-octave-mode to due prompts and output being in the buffer too.
> Kind of a similar problem as the multiple mode stuff.

Isn't there good old syntax-ppss at work, the universal source of bugs?

What about employing (parse-partial-sexp (line-beginning-position) 
(point)) instead?
This would reduce the number of fontify-bugs considerably.
Starting from pos of last prompt should be possible too.




This bug report was last modified 3 years and 8 days ago.

Previous Next


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