unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 14390@debbugs.gnu.org
Subject: bug#14390: 24.3.50; (wrong-type-argument stringp t) from `read-regexp'
Date: Sun, 12 May 2013 02:17:05 +0300	[thread overview]
Message-ID: <874ne9qf7y.fsf@mail.jurta.org> (raw)
In-Reply-To: <5C8F1D9AC91F44D8B2802A79E962581C@us.oracle.com> (Drew Adams's message of "Sat, 11 May 2013 14:54:12 -0700")

> The problem is (find-tag-default-as-regexp), which will return `t' when
> TAG is nil.  `t' is not a valid suggestion: SUGGESTIONS must be a list
> of strings.

An empty string return value for the case when TAG is nil
was lost when copying this code from `read-regexp'
to `find-tag-default-as-regexp' in revno:111971.
It could be restored back with:

=== modified file 'lisp/subr.el'
--- lisp/subr.el	2013-04-27 23:07:46 +0000
+++ lisp/subr.el	2013-05-11 23:16:36 +0000
@@ -2715,7 +2715,7 @@ (defun find-tag-default-as-regexp ()
 		   (get major-mode 'find-tag-default-function)
 		   'find-tag-default))
 	 (tag (funcall tagf)))
-    (cond ((not tag))
+    (cond ((not tag) "")
 	  ((eq tagf 'find-tag-default)
 	   (format "\\_<%s\\_>" (regexp-quote tag)))
 	  (t (regexp-quote tag)))))

BTW, the same commit revno:111971 introduced the function
`hi-lock-read-regexp-defaults'.  I think this is a good thing,
and I propose to improve it by adding `read-regexp-defaults-or-tag'
and `read-regexp-defaults-or-history' as we were discussing a month ago.





  reply	other threads:[~2013-05-11 23:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-11 21:54 bug#14390: 24.3.50; (wrong-type-argument stringp t) from `read-regexp' Drew Adams
2013-05-11 23:17 ` Juri Linkov [this message]
2013-05-14 23:40   ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ne9qf7y.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=14390@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).