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

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

bug#38185: isearch-yank-word-or-char grabs periods at ends of words when


From: Juri Linkov
Subject: bug#38185: isearch-yank-word-or-char grabs periods at ends of words when used on man pages
Date: Sat, 16 Nov 2019 22:25:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> (isearch--yank-char-or-syntax '(?w) 'forward-word arg)
>
> so I guess this means that "." has word syntax in Man buffers, but ","
> doesn't?
>
> I guess that makes sense -- you can have stuff like "foo.bar" that
> should be considered a single "word", but I agree that it doesn't make
> much sense to have a terminating "." be part of a word.
>
> I'm not sure how to fix that, though -- switch isearch-yank-word-or-char
> to something like ffap instead of using syntax classes?

isearch-yank-word-or-char was intended to yank exactly the same text
as navigated by forward-word.

However, I can't reproduce this issue in Man buffers: forward-word
doesn't consider "." as part of a word.  Ah, this is because I fixed
this long ago in the init file ~/.emacs as:

  ;; Don't use `man-mode-syntax-table' that sets word syntax to `.', `_', `:'.
  (add-hook 'Man-mode-hook
            (lambda ()
              (set-syntax-table text-mode-syntax-table)))





reply via email to

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