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

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

bug#358: dabbrev-abbrev-char-regexp


From: Noam Postavsky
Subject: bug#358: dabbrev-abbrev-char-regexp
Date: Thu, 23 Mar 2017 14:28:26 -0400

tag 358 patch
quit

I propose the following patch to bring the documentation in line with
the code: (I don't know if the behaviour makes sense, but it seems
nobody complained about it)

--- i/lisp/dabbrev.el
+++ w/lisp/dabbrev.el
@@ -191,23 +191,21 @@ dabbrev-abbrev-char-regexp
 This regexp will be surrounded with \\\\( ... \\\\) when actually used.

 Set this variable to \"\\\\sw\" if you want ordinary words or
-\"\\\\sw\\\\|\\\\s_\" if you want symbols (including characters whose
-syntax is \"symbol\" as well as those whose syntax is \"word\".
-
-The value nil has a special meaning: the abbreviation is from point to
-previous word-start, but the search is for symbols.
-
-For instance, if you are programming in Lisp, `yes-or-no-p' is a symbol,
-while `yes', `or', `no' and `p' are considered words.  If this
-variable is nil, then expanding `yes-or-no-' looks for a symbol
-starting with or containing `no-'.  If you set this variable to
-\"\\\\sw\\\\|\\\\s_\", that expansion looks for a symbol starting with
-`yes-or-no-'.  Finally, if you set this variable to \"\\\\sw\", then
-expanding `yes-or-no-' signals an error because `-' is not part of a word;
-but expanding `yes-or-no' looks for a word starting with `no'.
-
-The recommended value is nil, which will make dabbrev default to
-using \"\\\\sw\\\\|\\\\s_\"."
+\"\\\\sw\\\\|\\\\s_\" if you want symbols (including characters
+whose syntax is \"symbol\" as well as those whose syntax is
+\"word\").  The abbreviation is from point to the start of the
+previous sequence of characters matching this variable.
+
+The default value of nil is equivalent to \"\\\\sw\\\\|\\\\s_\".
+
+For instance, if you are programming in Lisp, `yes-or-no-p' is a
+symbol, while `yes', `or', `no' and `p' are considered words.  If
+this variable is nil or \"\\\\sw\\\\|\\\\s_\", then expanding
+`yes-or-no-' looks for a symbol starting with `yes-or-no-'.  If
+you set this variable to \"\\\\sw\", that expansion looks for a
+word prefixed with `no-' (e.g., it would match `no-problem', but
+not `no-problem-found').  If expanding `yes-or-no' it would look
+for a word starting with `no' (e.g. `normal')."
   :type '(choice (const nil)
          regexp)
   :group 'dabbrev)





reply via email to

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