GNU bug report logs -
#10494
24.0.92; Syntax table and non-ASCII character interaction
Previous Next
Reported by: Aaron Ecay <aaronecay <at> gmail.com>
Date: Fri, 13 Jan 2012 08:42:01 UTC
Severity: wishlist
Tags: confirmed, notabug
Merged with 13129,
30815
Found in versions 24.0.92, 24.1, 25.1, 26.0.91
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #45 received at 10494 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: npostavs <at> users.sourceforge.net
>> Cc: 10494 <at> debbugs.gnu.org, aaronecay <at> gmail.com
>> Date: Sat, 13 Aug 2016 10:19:34 -0400
>>
>> >> (modify-syntax-entry ?’ "w" text-mode-syntax-table)
>> >> (defconst my-text-char-script-table
>> >> (let ((table (copy-sequence char-script-table)))
>> >> (aset table ?’ 'latin)
>> >> table))
>> >>
>> >> (defun my-text-mode-hook ()
>> >> (set (make-local-variable 'char-script-table)
>> >> my-text-char-script-table))
>> >> (add-hook 'text-mode-hook 'my-text-mode-hook)
>> >
>> > Are you sure nothing in text-mode will ever want to use \s_ in any
>> > regexp?
>>
>> Did you mean \> (word boundary) or \s. (punctation)? \s_ doesn't match
>> ’ regardless because its syntax class is punctuation, not symbol.
>
> Sorry, I guess I was thinking of \cl. It will not match ’, although
> it might be expected.
Which could be fixed by (modify-category-entry ?’ ?l).
I would suggest this additional docstring patch, because I was confused
at first as to what CATEGORY was supposed to be (I looked around a bit
for how to create some kind of "category object"):
diff --git i/src/category.c w/src/category.c
index 4397f66..31ac2ec 100644
--- i/src/category.c
+++ w/src/category.c
@@ -336,6 +336,7 @@ DEFUN ("modify-category-entry", Fmodify_category_entry,
the current buffer's category table.
CHARACTER can be either a single character or a cons representing the
lower and upper ends of an inclusive character range to modify.
+CATEGORY must be a category name (a character between ` ' and `~').
If optional fourth argument RESET is non-nil,
then delete CATEGORY from the category set instead of adding it. */)
(Lisp_Object character, Lisp_Object category, Lisp_Object table, Lisp_Object reset)
>
> Anyway, my point is that these char-tables should really be treated as
> read-only by Lisp applications.
Right, but I think this bug is about the user modifying stuff.
This bug report was last modified 7 years and 65 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.