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: Drew Adams
Subject: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info
Date: Sun, 17 May 2009 08:59:40 -0700

> > 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

Yes, but I wasn't sure that the changes should also be made to text-mode itself
(dunno). For now, I was thinking of having info-mode do `copy-syntax-table' and
then modify that copy.







reply via email to

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