all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: new fboundp behavior weird
Date: Sat, 29 Dec 2012 13:35:47 +0100	[thread overview]
Message-ID: <87d2xtm3x8.fsf@gmail.com> (raw)
In-Reply-To: 87mwwxhyve.fsf@gmail.com

Thierry Volpiatto <thierry.volpiatto@gmail.com> 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	other threads:[~2012-12-29 12:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-29 11:38 new fboundp behavior weird Thierry Volpiatto
2012-12-29 12:35 ` Thierry Volpiatto [this message]
2012-12-29 16:27   ` Drew Adams
2012-12-29 17:41     ` Thierry Volpiatto
2012-12-29 20:56       ` Drew Adams
2012-12-29 21:36         ` Thierry Volpiatto
2012-12-30 10:25           ` Vitalie Spinu
2012-12-30 11:57             ` Vitalie Spinu
2012-12-29 16:32   ` Andreas Schwab
2012-12-31  3:06 ` Stefan Monnier
2012-12-31  6:51   ` Thierry Volpiatto

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=87d2xtm3x8.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 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.