emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new fboundp behavior weird


From: Thierry Volpiatto
Subject: Re: new fboundp behavior weird
Date: Sat, 29 Dec 2012 13:35:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Thierry Volpiatto <address@hidden> writes:

> Hi,
> the new behavior of fboundp seems really bad.
> For example debug-on-entry fail on functions not already bound but have
> an alias.
> something like:
>
> special-form-p: function xxx is void.
>
> #'(lambda (symbol)
>     (and (fboundp symbol)
>        (not (special-form-p symbol))))
>
> (fboundp symbol)
> => t
> (symbol-function symbol)
> => the function linked to symbol.
>
> So in this case fboundp is unable to protect the call to special-form-p.
>
> I guess the problem comes from here, but didn't digg more.
> I will try to setup a recipe to reproduce ASAP.
>
> NOTE: This is reproductible only on the trunk, not emacs-24 branch which
> is working fine.
To reproduce:
emacs -Q
(defalias 'foo 'bar)
(setq debug-on-error t)
M-x debug-on-entry RET foo TAB

NOTE:
(fboundp 'foo)
=>t
(symbol-function 'foo)
=>bar
So a fix using in addition of `fboundp' `symbol-function' would not
work.  i.e `symbol-function' is not returning nil. 
Anyway `fboundp' is used in so many places...

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (void-function foo)
  signal(void-function (foo))
  completion--some(#[257 "
[...]

" [1 ("foo") ([zeroflag esh-arg x-pointer-coffee-mug beng viper-util 
Buffer-menu-this-window vc-display-status debugger-previous-window 
verilog-mode-indent occur-mode-hook dired-faces Buffer-menu-mode-width erc-log 
comment-search-backward docs org-archive nnir center-region 
x-dnd-handle-moz-url ediff-merg nnmail-files gnus-article-highlight cal-html 
texinfo showhide-fringe erc-mode-line-and-header icomplete begpt 
lisp-font-lock-syntactic-face-function gnus-score-expire 
x-dnd-get-drop-width-height regexp-history isearch-update ebnf-production 
vc-backend-subdirectory-name vc-stay-local-p custom-faces em-script VICAR 
mouse-yank-at-point org-export-pdf search-documentation ebrowse xscheme Zs 
message-buffers x-select-text ps-print-printer ob-R fill-delete-prefix ...]) 
#[257 "\300!\205\n\301!?\207" [fboundp special-form-p] 3 "\n\n(fn SYMBOL)"] (3) 
completion-styles-alist] 6 "\n\n(fn STYLE)"] (basic partial-completion emacs22))
  completion--nth-completion(1 "foo" [zeroflag esh-arg x-pointer-coffee-mug 
beng viper-util Buffer-menu-this-window vc-display-status 
debugger-previous-window verilog-mode-indent occur-mode-hook dired-faces 
Buffer-menu-mode-width erc-log comment-search-backward docs org-archive nnir 
center-region x-dnd-handle-moz-url ediff-merg nnmail-files 
gnus-article-highlight cal-html texinfo showhide-fringe 
erc-mode-line-and-header icomplete begpt lisp-font-lock-syntactic-face-function 
gnus-score-expire x-dnd-get-drop-width-height regexp-history isearch-update 
ebnf-production vc-backend-subdirectory-name vc-stay-local-p custom-faces 
em-script VICAR mouse-yank-at-point org-export-pdf search-documentation ebrowse 
xscheme Zs message-buffers x-select-text ps-print-printer ob-R 
fill-delete-prefix ...] #[257 "\300!\205\n\301!?\207" [fboundp special-form-p] 
3 "\n\n(fn SYMBOL)"] 3 (metadata))
  completion-try-completion("foo" [zeroflag esh-arg x-pointer-coffee-mug beng 
viper-util Buffer-menu-this-window vc-display-status debugger-previous-window 
verilog-mode-indent occur-mode-hook dired-faces Buffer-menu-mode-width erc-log 
comment-search-backward docs org-archive nnir center-region 
x-dnd-handle-moz-url ediff-merg nnmail-files gnus-article-highlight cal-html 
texinfo showhide-fringe erc-mode-line-and-header icomplete begpt 
lisp-font-lock-syntactic-face-function gnus-score-expire 
x-dnd-get-drop-width-height regexp-history isearch-update ebnf-production 
vc-backend-subdirectory-name vc-stay-local-p custom-faces em-script VICAR 
mouse-yank-at-point org-export-pdf search-documentation ebrowse xscheme Zs 
message-buffers x-select-text ps-print-printer ob-R fill-delete-prefix ...] 
#[257 "\300!\205\n\301!?\207" [fboundp special-form-p] 3 "\n\n(fn SYMBOL)"] 3 
(metadata))
  completion--do-completion()
  minibuffer-complete()
  call-interactively(minibuffer-complete nil nil)
  read-from-minibuffer("Debug on entry to function: " nil (keymap (10 . 
minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap 
(menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" 
minibuffer-complete :help "Complete as far as possible") (space menu-item 
"Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 
menu-item "List Completions" minibuffer-completion-help :help "Display all 
possible completions") "Minibuf")) (27 keymap (118 . switch-to-completions)) 
(prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . 
minibuffer-complete-word) (9 . minibuffer-complete) keymap (menu-bar keymap 
(minibuf "Minibuf" keymap (previous menu-item "Previous History Item" 
previous-history-element :help "Put previous minibuffer history element in the 
minibuffer") (next menu-item "Next History Item" next-history-element :help 
"Put next minibuffer history element in the minibuffer") (isearch-backward 
menu-item "Isearch History Backward" isearch-backward :help "Incrementally 
search minibuffer history backward") (isearch-forward menu-item "Isearch 
History Forward" isearch-forward :help "Incrementally search minibuffer history 
forward") (return menu-item "Enter" exit-minibuffer :key-sequence "" :help 
"Terminate input and exit minibuffer") (quit menu-item "Quit" 
abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . 
exit-minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (C-tab . 
file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . 
previous-history-element) (up . previous-history-element) (prior . 
previous-history-element) (XF86Forward . next-history-element) (down . 
next-history-element) (next . next-history-element) (27 keymap (114 . 
previous-matching-history-element) (115 . next-matching-history-element) (112 . 
previous-history-element) (110 . next-history-element))) nil nil "nil" nil)
  completing-read-default("Debug on entry to function: " [zeroflag esh-arg 
x-pointer-coffee-mug beng viper-util Buffer-menu-this-window vc-display-status 
debugger-previous-window verilog-mode-indent occur-mode-hook dired-faces 
Buffer-menu-mode-width erc-log comment-search-backward docs org-archive nnir 
center-region x-dnd-handle-moz-url ediff-merg nnmail-files 
gnus-article-highlight cal-html texinfo showhide-fringe 
erc-mode-line-and-header icomplete begpt lisp-font-lock-syntactic-face-function 
gnus-score-expire x-dnd-get-drop-width-height regexp-history isearch-update 
ebnf-production vc-backend-subdirectory-name vc-stay-local-p custom-faces 
em-script VICAR mouse-yank-at-point org-export-pdf search-documentation ebrowse 
xscheme Zs message-buffers x-select-text ps-print-printer ob-R 
fill-delete-prefix ...] #[257 "\300!\205\n\301!?\207" [fboundp special-form-p] 
3 "\n\n(fn SYMBOL)"] t nil nil "nil" nil)
  completing-read("Debug on entry to function: " [zeroflag esh-arg 
x-pointer-coffee-mug beng viper-util Buffer-menu-this-window vc-display-status 
debugger-previous-window verilog-mode-indent occur-mode-hook dired-faces 
Buffer-menu-mode-width erc-log comment-search-backward docs org-archive nnir 
center-region x-dnd-handle-moz-url ediff-merg nnmail-files 
gnus-article-highlight cal-html texinfo showhide-fringe 
erc-mode-line-and-header icomplete begpt lisp-font-lock-syntactic-face-function 
gnus-score-expire x-dnd-get-drop-width-height regexp-history isearch-update 
ebnf-production vc-backend-subdirectory-name vc-stay-local-p custom-faces 
em-script VICAR mouse-yank-at-point org-export-pdf search-documentation ebrowse 
xscheme Zs message-buffers x-select-text ps-print-printer ob-R 
fill-delete-prefix ...] #[257 "\300!\205\n\301!?\207" [fboundp special-form-p] 
3 "\n\n(fn SYMBOL)"] t nil nil "nil")
  byte-code("
[...]

" [obarray function-called-at-point nil special-form-p completing-read format 
"Debug on entry to function (default %s): " "Debug on entry to function: " 
#[257 "\300!\205\n\301!?\207" [fboundp special-form-p] 3 "\n\n(fn SYMBOL)"] t 
symbol-name "" intern] 11)
  call-interactively(debug-on-entry record nil)
  command-execute(debug-on-entry record)
  execute-extended-command(nil "debug-on-entry")
  call-interactively(execute-extended-command nil nil)
--8<---------------cut here---------------end--------------->8---

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]