help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: making curly apostrophe part of a word


From: Kevin Rodgers
Subject: Re: making curly apostrophe part of a word
Date: Tue, 10 Sep 2013 21:39:22 -0600
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20

On 9/6/13 4:37 AM, Andreas Röhler wrote:
Am 06.09.2013 11:58, schrieb Eric Abrahamsen:
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
Am 06.09.2013 04:47, schrieb Eric Abrahamsen:
In certain modes (actually just certain files) I'd like the `’'
character to be treated the same as a `'' character with respect to word
movement: ie I'd like M-f to skip over the entirety of both "don't" and
"don’t". I'm editing externally-created files, and don't have the
liberty of changing this.

I thought this would do it:

(modify-syntax-entry ?’ "w")


Works for me in current buffer. `forward-word' passes as expected.
Which command fails for you?

`forward-word' fails... Hang on, I'll do the emacs -Q dance and see
what's going on. This was originally in an html-mode buffer, but I don't
see why that would matter as long as no third argument was passed to
`modify-syntax-entry'.

It affects the current buffer only, not the mode in other buffers when done that
way - maybe that's it?

Not according to its doc string:

        The syntax is changed only for table SYNTAX-TABLE, which defaults to
         the current buffer's syntax table.

Different buffers in the same major mode usually share the same syntax table.

--
Kevin Rodgers
Denver, Colorado, USA




reply via email to

[Prev in Thread] Current Thread [Next in Thread]