* bug#23520: 25.0.93; find-feature-regexp : mismatch between docstring and default value.
@ 2016-05-12 7:52 Nicolas Richard
2016-07-02 21:24 ` npostavs
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Richard @ 2016-05-12 7:52 UTC (permalink / raw)
To: 23520
Here's the current definition of find-feature-regexp :
(defcustom find-feature-regexp
(concat ";;; Code:")
"The regexp used by `xref-find-definitions' when searching for a feature definition.
Note it must contain a `%s' at the place where `format'
should insert the feature name."
;; We search for ";;; Code" rather than (feature '%s) because the
;; former is near the start of the code, and the latter is very
;; uninteresting. If the regexp is not found, just goes to
;; (point-min), which is acceptable in this case.
:type 'regexp
:group 'xref
:version "25.0")
The comment explains why there is no "%s" in the default value, but when
doing C-h v find-feature-regexp RET, it's puzzling to read "must contain
%s" and then the default value doesn't actually contain "%s".
In GNU Emacs 25.0.93.1 (i686-pc-linux-gnu, X toolkit, Xaw scroll bars)
of 2016-05-03 built on Aurora
Repository revision: c6077bfd297a8a0e4deaec217db17be630d98b9c
Windowing system distributor 'The X.Org Foundation', version 11.0.11702000
System Description: Ubuntu 15.10
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#23520: 25.0.93; find-feature-regexp : mismatch between docstring and default value.
2016-05-12 7:52 bug#23520: 25.0.93; find-feature-regexp : mismatch between docstring and default value Nicolas Richard
@ 2016-07-02 21:24 ` npostavs
2016-07-03 14:18 ` Nicolas Richard
0 siblings, 1 reply; 4+ messages in thread
From: npostavs @ 2016-07-02 21:24 UTC (permalink / raw)
To: Nicolas Richard; +Cc: 23520
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
tags 23520 patch
severity 23520 minor
quit
Nicolas Richard <youngfrog@members.fsf.org> writes:
> The comment explains why there is no "%s" in the default value, but when
> doing C-h v find-feature-regexp RET, it's puzzling to read "must contain
> %s" and then the default value doesn't actually contain "%s".
Right, so basically s/must/may?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1055 bytes --]
From 0c5d9afceeb2fc748aedc075560729dfd8f14b4e Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sat, 2 Jul 2016 17:17:55 -0400
Subject: [PATCH v1] Clarify docstring of find-feature-regexp
* lisp/emacs-lisp/find-func.el (find-feature-regexp): Explain that `%s'
is optional (Bug #23520).
---
lisp/emacs-lisp/find-func.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index d2e10ea..43bcb42 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -103,7 +103,7 @@ find-face-regexp
(defcustom find-feature-regexp
(concat ";;; Code:")
"The regexp used by `xref-find-definitions' when searching for a feature definition.
-Note it must contain a `%s' at the place where `format'
+Note it may contain up to one `%s' at the place where `format'
should insert the feature name."
;; We search for ";;; Code" rather than (feature '%s) because the
;; former is near the start of the code, and the latter is very
--
2.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#23520: 25.0.93; find-feature-regexp : mismatch between docstring and default value.
2016-07-02 21:24 ` npostavs
@ 2016-07-03 14:18 ` Nicolas Richard
2016-07-09 21:47 ` npostavs
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Richard @ 2016-07-03 14:18 UTC (permalink / raw)
To: npostavs; +Cc: 23520
npostavs@users.sourceforge.net writes:
>> The comment explains why there is no "%s" in the default value, but when
>> doing C-h v find-feature-regexp RET, it's puzzling to read "must contain
>> %s" and then the default value doesn't actually contain "%s".
>
> Right, so basically s/must/may?
Yes I think that would look better.
Nicolas.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#23520: 25.0.93; find-feature-regexp : mismatch between docstring and default value.
2016-07-03 14:18 ` Nicolas Richard
@ 2016-07-09 21:47 ` npostavs
0 siblings, 0 replies; 4+ messages in thread
From: npostavs @ 2016-07-09 21:47 UTC (permalink / raw)
To: Nicolas Richard; +Cc: 23520
close 23520 25.1
quit
Nicolas Richard <youngfrog@members.fsf.org> writes:
> npostavs@users.sourceforge.net writes:
>>> The comment explains why there is no "%s" in the default value, but when
>>> doing C-h v find-feature-regexp RET, it's puzzling to read "must contain
>>> %s" and then the default value doesn't actually contain "%s".
>>
>> Right, so basically s/must/may?
>
> Yes I think that would look better.
>
> Nicolas.
Done in 1b2d6a6f.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-09 21:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-12 7:52 bug#23520: 25.0.93; find-feature-regexp : mismatch between docstring and default value Nicolas Richard
2016-07-02 21:24 ` npostavs
2016-07-03 14:18 ` Nicolas Richard
2016-07-09 21:47 ` npostavs
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).