[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46327: 28.0.50; octave-mode: transpose-quotes taken as string-quotes
From: |
Lars Ingebrigtsen |
Subject: |
bug#46327: 28.0.50; octave-mode: transpose-quotes taken as string-quotes |
Date: |
Sun, 07 Feb 2021 14:06:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Juang Dse <juangdse@gmail.com> writes:
> octave-mode takes the transpose sign (') for a string quote, and
> indents incorrectly.
>
> This can be seen by the two lines
> ---------------
> x = [2 2]'
> disp(x)
> ---------------
> and using indent-for-tab-command (TAB) for the 2nd line.
This is due to the following patch:
commit 9e68413c7f0a7f71e1cee923ace7282d14c2e686
Author: Noam Postavsky <npostavs@users.sourceforge.net>
AuthorDate: Mon Aug 24 17:33:49 2020 +0200
Fix inferior octave single-quote font lock
* lisp/progmodes/octave.el (octave-mode-syntax-table): Fix
fontification of single quotes in inferior octave mode (bug#25517).
It looks like the problem is that octave-mode-syntax-table sets single
quotes as punctuation even though GNU Octave's manual says single quotes
are string syntax [1].
[1]:
https://www.gnu.org/software/octave/doc/interpreter/String-Objects.html
And, indeed, that link says:
"A character string in Octave consists of a sequence of characters
enclosed in either double-quote or single-quote marks."
But the ' character is also a transposition operator? I don't know
Octave at all -- this seems like a rather ambiguous syntax?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no