GNU bug report logs - #13017
24.2.90; minibuf-eldef-setup-minibuffer should append minibuf-eldef-update-minibuffer to post-command-hook

Previous Next

Package: emacs;

Reported by: Christopher Schmidt <christopher <at> ch.ristopher.com>

Date: Wed, 28 Nov 2012 00:13:02 UTC

Severity: minor

Tags: moreinfo, patch

Found in version 24.2.90

Done: Christopher Schmidt <ch <at> ristopher.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Christopher Schmidt <christopher <at> ch.ristopher.com>
To: 13017 <at> debbugs.gnu.org
Subject: bug#13017: 24.2.90; minibuf-eldef-setup-minibuffer should append minibuf-eldef-update-minibuffer to post-command-hook
Date: Wed, 28 Nov 2012 00:10:54 +0000 (GMT)
[Message part 1 (text/plain, inline)]
In minibuf-eldef-setup-minibuffer there is this form

    (add-hook 'post-command-hook #'minibuf-eldef-update-minibuffer nil t)

I think this is not correct.  The APPEND parameter of add-hook should be
t so all changes made to the minibuffer content by previous functions in
post-command-hook are taken into account by
minibuf-eldef-update-minibuffer.

Here is a patch for the trunk.
[minibuf-eldef.diff (text/x-diff, inline)]
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-11-27 16:40:04 +0000
+++ lisp/ChangeLog	2012-11-28 00:07:24 +0000
@@ -1,3 +1,8 @@
+2012-11-28  Christopher Schmidt  <christopher <at> ch.ristopher.com>
+
+	* minibuf-eldef.el (minibuf-eldef-setup-minibuffer): Append
+	minibuf-eldef-update-minibuffer to post-command-hook.  (Bug#)
+
 2012-11-27  Glenn Morris  <rgm <at> gnu.org>
 
 	* emacs-lisp/derived.el (derived-mode-make-docstring):

=== modified file 'lisp/minibuf-eldef.el'
--- lisp/minibuf-eldef.el	2012-11-07 20:43:38 +0000
+++ lisp/minibuf-eldef.el	2012-11-28 00:05:45 +0000
@@ -140,7 +140,7 @@
 	    (minibuffer-contents-no-properties))
       (setq minibuf-eldef-initial-buffer-length (point-max))
       (add-to-list 'minibuf-eldef-frobbed-minibufs (current-buffer))
-      (add-hook 'post-command-hook #'minibuf-eldef-update-minibuffer nil t))))
+      (add-hook 'post-command-hook #'minibuf-eldef-update-minibuffer t t))))
 
 ;; post-command-hook to swap prompts when necessary
 (defun minibuf-eldef-update-minibuffer ()

[Message part 3 (text/plain, inline)]
        Christopher

This bug report was last modified 11 years and 95 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.