unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Juang Dse <juangdse@gmail.com>
Cc: 46327@debbugs.gnu.org
Subject: bug#46327: 28.0.50; octave-mode: transpose-quotes taken as string-quotes
Date: Sun, 07 Feb 2021 14:06:47 +0100	[thread overview]
Message-ID: <87a6sg6n88.fsf@gnus.org> (raw)
In-Reply-To: <CAGEcx2Q8eOQ=ZtrHYmSGMfE0XiH=qP7mG6dFr3N7xggYUabjrw@mail.gmail.com> (Juang Dse's message of "Fri, 5 Feb 2021 15:02:50 +0100")

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





  reply	other threads:[~2021-02-07 13:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 14:02 bug#46327: 28.0.50; octave-mode: transpose-quotes taken as string-quotes Juang Dse
2021-02-07 13:06 ` Lars Ingebrigtsen [this message]
2021-02-07 14:04   ` Juang Dse
2021-02-07 14:11     ` Lars Ingebrigtsen
2021-02-07 14:48       ` Basil L. Contovounesios
2021-02-07 15:16         ` Juang Dse
2021-02-07 20:36         ` Lars Ingebrigtsen
2022-06-16 13:11           ` Lars Ingebrigtsen

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=87a6sg6n88.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=46327@debbugs.gnu.org \
    --cc=juangdse@gmail.com \
    /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).