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

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

[debbugs-tracker] bug#3312: closed (23.0.93; Use punctuation syntax for


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#3312: closed (23.0.93; Use punctuation syntax for apostrophe in Info)
Date: Sun, 18 Sep 2011 20:03:02 +0000

Your message dated Sun, 18 Sep 2011 22:57:08 +0300
with message-id <address@hidden>
and subject line Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe 
in Info
has caused the debbugs.gnu.org bug report #3312,
regarding 23.0.93; Use punctuation syntax for apostrophe in Info
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
3312: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3312
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 23.0.93; Use punctuation syntax for apostrophe in Info Date: Sat, 16 May 2009 15:02:51 -0700
I don't know if this would be appropriate for all Info manuals, but at
least for Emacs, Elisp, Eintr, and Efaq it makes sense, I think.
 
Apostrophe, or single quote, (') currently has word-constituent syntax
in Info, which it inherits from text-mode.
 
This means that if point is inside some `...'  string, and you use
`C-s C-w', you will pick up also the ' at the end as part of the
search string, which is typically not what you want.
 
If the syntax class for ' were `punctuation' instead of `word', then
you could more easily pick up key sequences, function names, and
variable names that are quoted: `C-x C-x' or `char-syntax', for
example.
 
Yes, you can today pick up everything, including the ` and the ', by
positioning the cursor on the `, but if you want just the quoted
content or some suffix of it, and not the quoting delimiters, you
get the ' too, which is not what you want.
 
If this makes sense for all Info manuals, then a simple fix would
presumably be to change this (in the definition of `info-mode'):
 
(set-syntax-table text-mode-syntax-table)
 
To this:
 
(set-syntax-table
  (copy-syntax-table text-mode-syntax-table))
(modify-syntax-entry ?' ".")
 
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'.
 
In GNU Emacs 23.0.93.1 (i386-mingw-nt5.1.2600)
 of 2009-05-02 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
 




--- End Message ---
--- Begin Message --- Subject: Re: bug#3312: 23.0.93; Use punctuation syntax for apostrophe in Info Date: Sun, 18 Sep 2011 22:57:08 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)
> Yes, it might be a good idea to change it in Info-mode, which is quite
> different from text-mode because of the extensive use of `...' and the
> fact that it's read-only.

Fixed and closed.


--- End Message ---

reply via email to

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