From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#358: dabbrev-abbrev-char-regexp Date: Thu, 23 Mar 2017 14:28:26 -0400 Message-ID: References: <1212586214.22521.1256711185@webmail.messagingengine.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1490293768 21816 195.159.176.226 (23 Mar 2017 18:29:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Mar 2017 18:29:28 +0000 (UTC) To: 358@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 23 19:29:19 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cr7Tx-0003l6-TA for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Mar 2017 19:29:10 +0100 Original-Received: from localhost ([::1]:57945 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cr7U3-0002fK-FH for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Mar 2017 14:29:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cr7Tu-0002e6-Td for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 14:29:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cr7Tq-0004rv-SV for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 14:29:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43052) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cr7Tq-0004rl-PP for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 14:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cr7Tq-0004Xb-Ec for bug-gnu-emacs@gnu.org; Thu, 23 Mar 2017 14:29:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <1212586214.22521.1256711185@webmail.messagingengine.com> Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Mar 2017 18:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 358 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 358-submit@debbugs.gnu.org id=B358.149029371417410 (code B ref 358); Thu, 23 Mar 2017 18:29:02 +0000 Original-Received: (at 358) by debbugs.gnu.org; 23 Mar 2017 18:28:34 +0000 Original-Received: from localhost ([127.0.0.1]:41249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cr7TO-0004Wj-25 for submit@debbugs.gnu.org; Thu, 23 Mar 2017 14:28:34 -0400 Original-Received: from mail-ot0-f169.google.com ([74.125.82.169]:33674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cr7TM-0004WS-H9 for 358@debbugs.gnu.org; Thu, 23 Mar 2017 14:28:32 -0400 Original-Received: by mail-ot0-f169.google.com with SMTP id a12so123727906ota.0 for <358@debbugs.gnu.org>; Thu, 23 Mar 2017 11:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=caxxNI4vUlaqB3UZYs7BiipX+d+ioXBP0zQzP9JKP+A=; b=XNinFaRZuwa+0bEQ+KrRKTL2n5EcoIHFbGWDn1bspqODM9o1FHxT0g8+uY/NamCN2I 22m4suqBCrXnZo5UDdLYBJ9qX2umuTJRUMYgGJuhvFj+0yvvu3WapNODtEJ2bRWIFroz ftny8YEwx+N7t0Z49DNrotcpJrN8ROlPCr+jqgcpXxgiEyGuAVR1lSZMOFCyqx1DphJb tEnajftnqoN04nr3+zjkqBfscDPdoGY8krW/nBphaYklImOXWM7MAoipD9QC0bGK3zgd 04EDXKVjSzCLlW9PZWbYMciqHkdfgrOrahxgYPh863/WJzJqSy3FdKPxQ9giP9LIZYZY 9aiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=caxxNI4vUlaqB3UZYs7BiipX+d+ioXBP0zQzP9JKP+A=; b=GGC6XIVPYe8GChiNJYSyb8ojsT+YCKcXDm2uV76OXhKDMZTYoZGX2fZYjnAcT6/Nfk 0VxkOGkqxPbEkv5GoJhX7lnRThuCHqdROO4NF1oiywu0SGiTKr3aGuIyK52OxkTzHwnh vBLjpCHqNL+qKLbj9qtMuyDN07s9GUBDZrDL+Mna0LBndTT8asjEzW+U2VfEpDLwGZFI 1cHVmnQYAAUqWLwf2d1XpYLpYG1CWjIbti/MJVsKP3jG3E83YjrGe8y0+m97T+M+RqOf o+khLipwGLjGNFJZckLe/Jinx5ZifwgVCKSzRela8IRolF9Iirn3klEPbxBaPAfCK/6M tlkw== X-Gm-Message-State: AFeK/H2V+O7Z1nQbBJW3QCU0Uq3f4/vhK01yVhZfBxMCwAQKrOUVZU6VmQWbixK2/oT2i+PyHLehvceHZTyBrg== X-Received: by 10.157.54.161 with SMTP id h30mr2008373otc.30.1490293706680; Thu, 23 Mar 2017 11:28:26 -0700 (PDT) Original-Received: by 10.157.80.172 with HTTP; Thu, 23 Mar 2017 11:28:26 -0700 (PDT) X-Google-Sender-Auth: AXSDVvto6710JmLFvqx1bFUNUPA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130849 Archived-At: 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)