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

Kevin Rodgers <[email protected]>
Newsgroups gmane.emacs.bugs,gmane.emacs.pretest.bugs
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.