From: "Drew Adams" <drew.adams@oracle.com>
To: "'Jambunathan K'" <kjambunathan@gmail.com>
Cc: 13687@debbugs.gnu.org
Subject: bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el(read-regexp): Let-bind `default' to the first
Date: Sat, 9 Mar 2013 09:14:41 -0800 [thread overview]
Message-ID: <778E2A4E7CBA425C994F7678C2E690CE@us.oracle.com> (raw)
In-Reply-To: <87vc90se5a.fsf@gmail.com>
> > Do you at least see why your *Messages* logged `exit-minibuffer'?
>
> ,---- In `read-regexp'
> | + (let ((user-defaults (read-regexp-defaults)))
> | + (unless (eq user-defaults t)
> | + (setq defaults user-defaults)
> | + (message "cmd: %s defaults: %S" this-command defaults)))
> | +
> `----
>
> cmd: exit-minibuffer defaults: nil
>
> > Your code checks only (eq user-defaults t). When
> > `user-defaults' is nil, this returns nil.
>
> The cmd is `exit-minibuffer'. That corresponds to RET in minibuffer
> map. I have no other explanation.
>
> Btw, your explanation is *totally* off the mark. It talks about
> defaults in my snippet and not the cmd.
NOW I suppose I AM dealing with a dead horse. But in hopes of helping and at
the risk of being told once more to f___ off, let me try once more:
+(defun read-regexp-defaults ()
+ (if (not read-regexp-user-defaults) t
+ (let ((user-default (assoc this-command read-regexp-user-defaults)))
+ (pcase user-default
+ (`(,cmd ,(and (pred functionp) getter))
+ (funcall getter))
+ (`nil nil)
+ (_ t)))))
Don't you think that that will return nil when `this-command' =
`exit-minibuffer', since `exit-minibuffer' is not in your value of alist
`read-regexp-user-defaults'?
And if it returns nil, don't you think that the following will then print `cmd:
exit-minibuffer defaults: nil'?
+ (let ((user-defaults (read-regexp-defaults)))
+ (unless (eq user-defaults t)
+ (setq defaults user-defaults)
+ (message "cmd: %s defaults: %S" this-command defaults)))
If this doesn't help, I give up and lie down next to your dead horse.
next prev parent reply other threads:[~2013-03-09 17:14 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1UA5QC-0006Vm-Qb@vcs.savannah.gnu.org>
[not found] ` <877glsyecw.fsf@gmail.com>
2013-02-28 18:12 ` bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el (read-regexp): Let-bind `default' to the first Juri Linkov
2013-03-03 9:31 ` Juri Linkov
2013-03-06 18:00 ` Jambunathan K
2013-03-08 13:02 ` Jambunathan K
2013-03-08 15:29 ` bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el(read-regexp): " Drew Adams
2013-03-08 16:53 ` Jambunathan K
2013-03-08 17:10 ` Drew Adams
2013-03-08 17:27 ` Jambunathan K
2013-03-08 17:28 ` Juri Linkov
2013-03-08 18:16 ` Drew Adams
2013-03-08 18:30 ` Jambunathan K
2013-03-08 18:53 ` Drew Adams
2013-03-08 19:03 ` Jambunathan K
2013-03-08 21:08 ` Drew Adams
2013-03-09 8:47 ` Jambunathan K
2013-03-09 15:08 ` Drew Adams
2013-03-09 16:21 ` Jambunathan K
2013-03-09 16:37 ` Drew Adams
2013-03-09 16:59 ` Jambunathan K
2013-03-09 17:14 ` Drew Adams [this message]
2013-03-09 17:25 ` Jambunathan K
2013-03-09 17:55 ` Drew Adams
2013-03-10 18:28 ` Juri Linkov
2013-03-18 7:24 ` Jambunathan K
2013-03-04 5:46 ` bug#13687: /srv/bzr/emacs/trunk r111878: * lisp/replace.el (read-regexp): " Jambunathan K
2013-03-04 9:28 ` Juri Linkov
2013-03-06 18:03 ` Jambunathan K
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=778E2A4E7CBA425C994F7678C2E690CE@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=13687@debbugs.gnu.org \
--cc=kjambunathan@gmail.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.