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

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

bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info


From: Kevin Rodgers
Subject: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 17 May 2009 08:50:50 -0600
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)

Drew Adams wrote:
I don't know much about text-mode, but I wonder if even there it might
make sense for ' to have syntax class `punctuation' instead of
`word'. Probably the answer is "no", or that would already be the
case. ;-)
I see this in `text-mode.el':
 ;; We add `p' so that M-c on 'hello' leads to 'Hello'
 ;; rather than 'hello'.
 (modify-syntax-entry ?' "w p" st)
That explains why p was added, but not why ' should have syntax class
w at all.  Again, there probably is a good reason, but I don't know
what it is.  After changing the syntax to punctuation, M-c still seems
to act as desired on 'hello'.

FWIW, I've got this in my ~/.emacs:

(add-hook 'text-mode-hook
          (defun text-mode-punctuation-syntax ()
;; Change non-letter characters from word syntax to punctuation:
            (modify-syntax-entry ?\240 ".") ; NO-BREAK SPACE
            (modify-syntax-entry ?' ".")))  ; APOSTROPHE

--
Kevin Rodgers
Denver, Colorado, USA








reply via email to

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