From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Introduce eldoc support in minibuffer
Date: Sun, 03 Jul 2011 08:03:51 +0200 [thread overview]
Message-ID: <87aacv529k.fsf@gmail.com> (raw)
In-Reply-To: 87hb743quv.fsf@gmail.com
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> It's not hard to do, just create a help function for isearch and bind it
> in isearch map.
This is the code of anything.el adapted for isearch:
#+BEGIN_SRC lisp
(defun isearch-help-internal (bufname insert-content-fn)
(save-window-excursion
(switch-to-buffer (get-buffer-create bufname))
(delete-other-windows)
(erase-buffer)
(funcall insert-content-fn)
(setq mode-line-format "%b (SPC,C-v:NextPage b,M-v:PrevPage other:Exit)")
(setq cursor-type nil)
(goto-char 1)
(isearch-help-event-loop)))
(defun isearch-help-event-loop ()
(ignore-errors
(catch 'exit-isearch-help
(loop for event = (read-key) do
(case event
((?\C-v ? ) (scroll-up))
((?\M-v ?b) (scroll-down))
(t (throw 'exit-isearch-help (isearch-update))))))))
(defun isearch-help ()
(interactive)
(isearch-help-internal
" *Isearch Help*"
(lambda ()
(insert (substitute-command-keys isearch-help-message)))))
(defvar isearch-help-message "\\{isearch-mode-map}")
(define-key isearch-mode-map (kbd "C-?") 'isearch-help)
#+END_SRC
Improve isearch-help-message as needed, and provide a minimal help in
mode-line:
C-?: Help, C-s: Do_this, C-r: Do_that etc...
--
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
next prev parent reply other threads:[~2011-07-03 6:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-01 15:39 Introduce eldoc support in minibuffer Thierry Volpiatto
2011-07-02 18:34 ` Thierry Volpiatto
2011-07-02 22:47 ` Dan Nicolaescu
2011-07-03 4:55 ` Thierry Volpiatto
2011-07-03 6:03 ` Thierry Volpiatto [this message]
2011-07-05 14:41 ` Dan Nicolaescu
2011-07-05 17:51 ` Thierry Volpiatto
2011-07-06 15:25 ` Dan Nicolaescu
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=87aacv529k.fsf@gmail.com \
--to=thierry.volpiatto@gmail.com \
--cc=emacs-devel@gnu.org \
/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).