* bug#11051: 24.0.94; `widget-complete': Remove quote for `widget-complete-field'
@ 2012-03-20 16:46 Drew Adams
2012-03-20 16:50 ` Drew Adams
2012-03-21 2:16 ` Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Drew Adams @ 2012-03-20 16:46 UTC (permalink / raw)
To: 11051
This code in wid-edit.el is wrong:
(defun widget-complete ()
"Complete content of editable field from point.
When not inside a field, signal an error."
(interactive)
(let ((data (widget-completions-at-point)))
(cond
((functionp data) (funcall data))
((consp data)
(let ((completion-extra-properties (nth 3 data)))
(completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)
(plist-get completion-extra-properties
:predicate))))
((widget-field-find (point))
;; This defaulting used to be performed in widget-default-complete, but
;; it seems more appropriate here than in widget-default-completions.
(call-interactively 'widget-complete-field))
;;; WRONG - remove quote ^
(t
(error "Not in an editable field")))))
`widget-complete-field' is not a command. Its value is a command.
In GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600)
of 2012-03-19 on MARVIN
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.6) --no-opt --enable-checking --cflags
-ID:/devel/emacs/libs/libXpm-3.5.8/include
-ID:/devel/emacs/libs/libXpm-3.5.8/src
-ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
-ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
-ID:/devel/emacs/libs/giflib-4.1.4-1/include
-ID:/devel/emacs/libs/jpeg-6b-4/include
-ID:/devel/emacs/libs/tiff-3.8.2-1/include
-ID:/devel/emacs/libs/gnutls-3.0.9/include'
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#11051: 24.0.94; `widget-complete': Remove quote for `widget-complete-field'
2012-03-20 16:46 bug#11051: 24.0.94; `widget-complete': Remove quote for `widget-complete-field' Drew Adams
@ 2012-03-20 16:50 ` Drew Adams
2012-03-21 2:16 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2012-03-20 16:50 UTC (permalink / raw)
To: 11051
1. Here is the backtrace, BTW:
Debugger entered--Lisp error: (wrong-type-argument commandp
widget-complete-field)
* call-interactively(widget-complete-field)
* (cond ((functionp data) (funcall data)) ((consp data) (let
((completion-extra-properties (nth 3 data))) (completion-in-region (nth 0 data)
(nth 1 data) (nth 2 data) (plist-get completion-extra-properties :predicate))))
((widget-field-find (point)) (call-interactively (quote widget-complete-field)))
(t (error "Not in an editable field")))
* (let ((data (widget-completions-at-point))) (cond ((functionp data) (funcall
data)) ((consp data) (let ((completion-extra-properties (nth 3 data)))
(completion-in-region (nth 0 data) (nth 1 data) (nth 2 data) (plist-get
completion-extra-properties :predicate)))) ((widget-field-find (point))
(call-interactively (quote widget-complete-field))) (t (error "Not in an
editable field"))))
widget-complete()
* call-interactively(widget-complete nil nil)
2. But won't fixing this by removing the quote lead to an infloop:
`widget-complete' calling the command bound to `M-TAB', which invokes
`widget-complete'...?
Not sure the logic of this code is correct anymore, since it was last changed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#11051: 24.0.94; `widget-complete': Remove quote for `widget-complete-field'
2012-03-20 16:46 bug#11051: 24.0.94; `widget-complete': Remove quote for `widget-complete-field' Drew Adams
2012-03-20 16:50 ` Drew Adams
@ 2012-03-21 2:16 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2012-03-21 2:16 UTC (permalink / raw)
To: Drew Adams; +Cc: 11051-done
> `widget-complete-field' is not a command. Its value is a command.
Indeed, this was completely broken, and there doesn't seem to be much of
a fix. I just removed it: after all, the fact that it didn't work
hasn't seemed to cause much uproar; and with the new code there are
other ways to get similar results.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-21 2:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-20 16:46 bug#11051: 24.0.94; `widget-complete': Remove quote for `widget-complete-field' Drew Adams
2012-03-20 16:50 ` Drew Adams
2012-03-21 2:16 ` Stefan Monnier
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.