From: Kaushal Modi <kaushal.modi@gmail.com>
To: Artur Malabarba <bruce.connor.am@gmail.com>
Cc: Michael Heerdegen <michael_heerdegen@web.de>, 23038@debbugs.gnu.org
Subject: bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode)
Date: Fri, 18 Mar 2016 10:58:06 -0400 [thread overview]
Message-ID: <CAFyQvY2rB_e4ki9v9+8OEXrTYqF=CvYzqdNZJue1oorXLRL4DA@mail.gmail.com> (raw)
In-Reply-To: <CAAdUY-K6U5qT0nEiB8HJB3h9KhHEozk5hHXMuftJhgcxJhGWuw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2782 bytes --]
On Thu, Mar 17, 2016 at 11:53 PM, Artur Malabarba <bruce.connor.am@gmail.com
> wrote:
> Thanks Kaushal! It looks good to me.
Thanks! Here's a formatted patch (with indentation fixes too).
By mistake I created my last patch with an alias that did git format-patch
ignoring whitespace diffs. Below patch fixes this bug plus those
indentation changes.
From c06557b30dd8b81362c3970b5b9b54154dfabac9 Mon Sep 17 00:00:00 2001
From: Kaushal Modi <kaushal.modi@gmail.com>
Date: Fri, 18 Mar 2016 10:41:04 -0400
Subject: [PATCH] Fix an Isearch var to be a string (bug 23038)
* isearch.el (isearch--describe-regexp-mode): The `description' var needs
to always be a string. Added the missing default case for the cond
form that ensures that.
Before this bug fix, for the events when `regexp-function' and
`search-default-mode' both were nil, `description' also stayed nil.
So when `space-before' was non-nil, the "non-string" `description'
(with a value of nil) got passed as an argument to
`replace-regexp-in-string' (where a string was expected). That caused
the error described in debbugs # 23038.
---
lisp/isearch.el | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 988503e..48354d3 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2585,16 +2585,19 @@ isearch--describe-regexp-mode
(eq search-default-mode isearch-regexp))) "")
;; 2. Use the `isearch-message-prefix' set for
;; `regexp-function' if available.
- (regexp-function
- (and (symbolp regexp-function)
- (or (get regexp-function 'isearch-message-prefix)
- "")))
+ (regexp-function
+ (and (symbolp regexp-function)
+ (or (get regexp-function 'isearch-message-prefix)
+ "")))
;; 3. Else if `isearch-regexp' is non-nil, set description
;; to "regexp ".
- (isearch-regexp "regexp ")
- ;; 4. And finally, if we're in literal mode (and if the
- ;; default mode is also not literal), describe it.
- ((functionp search-default-mode) "literal "))))
+ (isearch-regexp "regexp ")
+ ;; 4. Else if we're in literal mode (and if the default
+ ;; mode is also not literal), describe it.
+ ((functionp search-default-mode) "literal ")
+ ;; 5. And finally, if none of the above is true, set the
+ ;; description to an empty string.
+ (t ""))))
(if space-before
;; Move space from the end to the beginning.
(replace-regexp-in-string "\\(.*\\) \\'" " \\1" description)
--
2.6.0.rc0.24.gec371ff
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 5410 bytes --]
next prev parent reply other threads:[~2016-03-18 14:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 14:07 bug#23038: 25.0.92; M-% from isearch broken (error in isearch--describe-regexp-mode) Michael Heerdegen
2016-03-17 14:25 ` Kaushal Modi
2016-03-18 3:53 ` Artur Malabarba
2016-03-18 14:58 ` Kaushal Modi [this message]
2016-03-18 15:08 ` Michael Heerdegen
2016-03-18 15:14 ` Kaushal Modi
2016-03-18 16:07 ` Stephen Berman
2016-03-18 16:15 ` Kaushal Modi
2016-03-18 16:29 ` Michael Heerdegen
2016-03-18 16:36 ` Michael Heerdegen
2016-03-18 16:39 ` Kaushal Modi
2016-03-18 21:15 ` Stephen Berman
2016-03-18 21:21 ` Michael Heerdegen
2016-03-20 15:38 ` Michael Heerdegen
2016-03-20 15:42 ` Kaushal Modi
2016-03-20 23:47 ` Michael Heerdegen
2016-03-21 0:09 ` Michael Heerdegen
2016-03-21 0:25 ` Kaushal Modi
2016-03-21 0:29 ` Michael Heerdegen
2016-03-21 2:41 ` Kaushal Modi
2016-03-22 0:14 ` Michael Heerdegen
2016-03-22 0:38 ` Kaushal Modi
2016-03-21 10:03 ` Andreas Schwab
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='CAFyQvY2rB_e4ki9v9+8OEXrTYqF=CvYzqdNZJue1oorXLRL4DA@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--cc=23038@debbugs.gnu.org \
--cc=bruce.connor.am@gmail.com \
--cc=michael_heerdegen@web.de \
/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.