unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* new fboundp behavior weird
@ 2012-12-29 11:38 Thierry Volpiatto
  2012-12-29 12:35 ` Thierry Volpiatto
  2012-12-31  3:06 ` Stefan Monnier
  0 siblings, 2 replies; 11+ messages in thread
From: Thierry Volpiatto @ 2012-12-29 11:38 UTC (permalink / raw)
  To: emacs-devel

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.

--8<---------------cut here---------------start------------->8---
#'(lambda (symbol)
    (and (fboundp symbol)
	 (not (special-form-p symbol))))
--8<---------------cut here---------------end--------------->8---

(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.

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




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: new fboundp behavior weird
  2012-12-29 11:38 new fboundp behavior weird Thierry Volpiatto
@ 2012-12-29 12:35 ` Thierry Volpiatto
  2012-12-29 16:27   ` Drew Adams
  2012-12-29 16:32   ` Andreas Schwab
  2012-12-31  3:06 ` Stefan Monnier
  1 sibling, 2 replies; 11+ messages in thread
From: Thierry Volpiatto @ 2012-12-29 12:35 UTC (permalink / raw)
  To: emacs-devel

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 




^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: new fboundp behavior weird
  2012-12-29 12:35 ` Thierry Volpiatto
@ 2012-12-29 16:27   ` Drew Adams
  2012-12-29 17:41     ` Thierry Volpiatto
  2012-12-29 16:32   ` Andreas Schwab
  1 sibling, 1 reply; 11+ messages in thread
From: Drew Adams @ 2012-12-29 16:27 UTC (permalink / raw)
  To: 'Thierry Volpiatto', emacs-devel

> > the new behavior of fboundp seems really bad.
> > For example debug-on-entry fail on functions not already 
> > bound but have an alias.
> >
> > 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...

I'm probably misunderstanding, but that is reproducible on all Emacs versions
going back at least to Emacs 20.  And it looks like correct behavior, to me.

What am I missing?  Just what is the problem with the behavior you report?  And
are you sure it is not reproducible on the Emacs 24 branch?  (I don't have the
branch, but it is reproducible in Emacs 24.2.)

Symbol `foo' does have a function-cell definition: the symbol `bar'.  That
symbol `bar' has no function definition is immaterial to whether `foo' is
`fboundp'.  Perhaps you are looking for `functionp' instead of `fboundp'?




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: new fboundp behavior weird
  2012-12-29 12:35 ` Thierry Volpiatto
  2012-12-29 16:27   ` Drew Adams
@ 2012-12-29 16:32   ` Andreas Schwab
  1 sibling, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2012-12-29 16:32 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: emacs-devel

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> (fboundp 'foo)
> =>t
> (symbol-function 'foo)
> =>bar

I get the same in emacs 24.2.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: new fboundp behavior weird
  2012-12-29 16:27   ` Drew Adams
@ 2012-12-29 17:41     ` Thierry Volpiatto
  2012-12-29 20:56       ` Drew Adams
  0 siblings, 1 reply; 11+ messages in thread
From: Thierry Volpiatto @ 2012-12-29 17:41 UTC (permalink / raw)
  To: emacs-devel

"Drew Adams" <drew.adams@oracle.com> writes:

>> > the new behavior of fboundp seems really bad.
>> > For example debug-on-entry fail on functions not already 
>> > bound but have an alias.
>> >
>> > 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...
>
> I'm probably misunderstanding, but that is reproducible on all Emacs versions
> going back at least to Emacs 20.  And it looks like correct behavior, to me.
>
> What am I missing?  Just what is the problem with the behavior you report?  And
> are you sure it is not reproducible on the Emacs 24 branch?  (I don't have the
> branch, but it is reproducible in Emacs 24.2.)
>
> Symbol `foo' does have a function-cell definition: the symbol `bar'.  That
> symbol `bar' has no function definition is immaterial to whether `foo' is
> `fboundp'.  Perhaps you are looking for `functionp' instead of `fboundp'?
No, debug-on-entry is using `fboundp'.
 
You have to run this to reproduce:
emacs -Q
(defalias 'foo 'bar)
(setq debug-on-error t)
M-x debug-on-entry RET foo TAB
And then you get the error.

I know it is stupid to make such aliases, but some packages (DVC) use
such aliases on non--existing functions. 
(I guess the non--existing functions are build
during compilation if backend is available)

Anyway `debug-on-entry' should ignore this instead of sending error,
like it does on emacs-24 branch.

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




^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: new fboundp behavior weird
  2012-12-29 17:41     ` Thierry Volpiatto
@ 2012-12-29 20:56       ` Drew Adams
  2012-12-29 21:36         ` Thierry Volpiatto
  0 siblings, 1 reply; 11+ messages in thread
From: Drew Adams @ 2012-12-29 20:56 UTC (permalink / raw)
  To: 'Thierry Volpiatto', emacs-devel

> debug-on-entry is using `fboundp'.

I don't think the call to fboundp in debug-on-entry is a problem - it is only in
the `interactive' spec.  And (fboundp 'foo) correctly returns t.

The problem is perhaps due to Emacs 24's removal of this part of debug-on-entry
(from Emacs 23), which handles aliased functions:

;; The function is built-in or aliased to another function.
;; Create a wrapper in which we can add the debug call.
(fset function `(lambda (&rest debug-on-entry-args)
			,(interactive-form (symbol-function function))
			(apply ',(symbol-function function)
			       debug-on-entry-args)))

Dunno.  Whatever the cause, the debugger does not show a frame for bar - it
seems to treat foo as if it were bar.

> (defalias 'foo 'bar)
> (setq debug-on-error t)
> M-x debug-on-entry RET foo TAB
> And then you get the error.

Yes, evalling (foo) using C-x C-e raises the error, in both 24.2 and trunk:

Debugger entered--Lisp error: (void-function foo)
  (foo)
  eval((foo) nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)

But in Emacs 23 (and prior) that does not happen.  Instead, this:

Debugger entered--Lisp error: (void-function bar)
* bar()
* apply(bar nil)
* foo()
  eval((foo))
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)

I agree that there is a bug, presumably in the debugger.  I don't think there is
a problem with fboundp, however.  (fboundp 'foo) correctly returns t.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: new fboundp behavior weird
  2012-12-29 20:56       ` Drew Adams
@ 2012-12-29 21:36         ` Thierry Volpiatto
  2012-12-30 10:25           ` Vitalie Spinu
  0 siblings, 1 reply; 11+ messages in thread
From: Thierry Volpiatto @ 2012-12-29 21:36 UTC (permalink / raw)
  To: emacs-devel

"Drew Adams" <drew.adams@oracle.com> writes:

>> debug-on-entry is using `fboundp'.
>
> I don't think the call to fboundp in debug-on-entry is a problem - it is only in
> the `interactive' spec.  And (fboundp 'foo) correctly returns t.
Don't think so, the problem IMO comes from here:

(defalias 'toto 'titi)

(debugger-special-form-p 'toto) ; Used in 24.2
=>nil ; OK

(special-form-p 'toto) ; Used in 24.3
=>
Debugger entered--Lisp error: (void-function toto)
  indirect-function(toto)
  (setq object (indirect-function object))
  (if (and (symbolp object) (fboundp object)) (setq object (indirect-function object)))
  special-form-p(toto)
  eval((special-form-p (quote toto)) nil)
  eval-last-sexp-1(t)
  eval-last-sexp(t)
  eval-print-last-sexp()
  call-interactively(eval-print-last-sexp nil nil)


> The problem is perhaps due to Emacs 24's removal of this part of debug-on-entry
> (from Emacs 23), which handles aliased functions:
>
> ;; The function is built-in or aliased to another function.
> ;; Create a wrapper in which we can add the debug call.
> (fset function `(lambda (&rest debug-on-entry-args)
> 			,(interactive-form (symbol-function function))
> 			(apply ',(symbol-function function)
> 			       debug-on-entry-args)))
>
> Dunno.  Whatever the cause, the debugger does not show a frame for bar - it
> seems to treat foo as if it were bar.
>
>> (defalias 'foo 'bar)
>> (setq debug-on-error t)
>> M-x debug-on-entry RET foo TAB
>> And then you get the error.
>
> Yes, evalling (foo) using C-x C-e raises the error, in both 24.2 and trunk:
>
> Debugger entered--Lisp error: (void-function foo)
>   (foo)
>   eval((foo) nil)
>   eval-last-sexp-1(nil)
>   eval-last-sexp(nil)
>   call-interactively(eval-last-sexp nil nil)
>
> But in Emacs 23 (and prior) that does not happen.  Instead, this:
>
> Debugger entered--Lisp error: (void-function bar)
> * bar()
> * apply(bar nil)
> * foo()
>   eval((foo))
>   eval-last-sexp-1(nil)
>   eval-last-sexp(nil)
>   call-interactively(eval-last-sexp nil nil)
>
> I agree that there is a bug, presumably in the debugger.  I don't think there is
> a problem with fboundp, however.  (fboundp 'foo) correctly returns t.
>
>
>

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




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: new fboundp behavior weird
  2012-12-29 21:36         ` Thierry Volpiatto
@ 2012-12-30 10:25           ` Vitalie Spinu
  2012-12-30 11:57             ` Vitalie Spinu
  0 siblings, 1 reply; 11+ messages in thread
From: Vitalie Spinu @ 2012-12-30 10:25 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: emacs-devel

  >> Thierry Volpiatto <thierry.volpiatto@gmail.com>
  >> on Sat, 29 Dec 2012 22:36:16 +0100 wrote:

[...]


  TV> (defalias 'toto 'titi)

  TV> (debugger-special-form-p 'toto) ; Used in 24.2
  TV> =>nil ; OK

  TV> (special-form-p 'toto) ; Used in 24.3
  TV> =>
  TV> Debugger entered--Lisp error: (void-function toto)
  TV>   indirect-function(toto)
  TV>   (setq object (indirect-function object))
  TV>   (if (and (symbolp object) (fboundp object)) (setq object (indirect-function object)))

Interesting. This part from emacs 24.2 debugger-special-form-p is
apparently missing:
           
       (subrp (symbol-function symbol))

Does that mean that emacs 24.3 has special forms that are not built-in?

    Vitalie



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: new fboundp behavior weird
  2012-12-30 10:25           ` Vitalie Spinu
@ 2012-12-30 11:57             ` Vitalie Spinu
  0 siblings, 0 replies; 11+ messages in thread
From: Vitalie Spinu @ 2012-12-30 11:57 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]

  >> Vitalie Spinu <spinuvit@gmail.com>
  >> on Sun, 30 Dec 2012 11:25:25 +0100 wrote:

  >> Thierry Volpiatto <thierry.volpiatto@gmail.com>
  >> on Sat, 29 Dec 2012 22:36:16 +0100 wrote:

  VS> [...]

  TV> (defalias 'toto 'titi)

  TV> (debugger-special-form-p 'toto) ; Used in 24.2
  TV> =>nil ; OK

  TV> (special-form-p 'toto) ; Used in 24.3
  TV> =>
  TV> Debugger entered--Lisp error: (void-function toto)
  TV> indirect-function(toto)
  TV> (setq object (indirect-function object))
  TV> (if (and (symbolp object) (fboundp object)) (setq object (indirect-function object)))

  VS> Interesting. This part from emacs 24.2 debugger-special-form-p is
  VS> apparently missing:

  VS>        (subrp (symbol-function symbol))

  VS> Does that mean that emacs 24.3 has special forms that are not built-in?

Well, not really. I have just checked the trunk; indirect-function call
misses 'no-error argument. It probably should be:



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-diff, Size: 516 bytes --]

Modified   lisp/subr.el
diff --git a/lisp/subr.el b/lisp/subr.el
index 1e50903..3b27e7b 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2805,7 +2805,7 @@ Otherwise, return nil."
 (defun special-form-p (object)
   "Non-nil if and only if OBJECT is a special form."
   (if (and (symbolp object) (fboundp object))
-      (setq object (indirect-function object)))
+      (setq object (indirect-function object 'no-error)))
   (and (subrp object) (eq (cdr (subr-arity object)) 'unevalled)))
 
 (defun field-at-pos (pos)

[-- Attachment #3: Type: text/plain, Size: 157 bytes --]


This fixes the problem.


A slightly off topic naive question. Why is the function cell void by
default and not nil? Is this useful for anything?

Vitalie


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: new fboundp behavior weird
  2012-12-29 11:38 new fboundp behavior weird Thierry Volpiatto
  2012-12-29 12:35 ` Thierry Volpiatto
@ 2012-12-31  3:06 ` Stefan Monnier
  2012-12-31  6:51   ` Thierry Volpiatto
  1 sibling, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2012-12-31  3:06 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: emacs-devel

> the new behavior of fboundp seems really bad.

It's got nothing to do with fboundp.  Please use M-x report-emacs-bug
when you bump into problems.

> special-form-p: function xxx is void.

Fixed by the patch below,


        Stefan


=== modified file 'lisp/subr.el'
--- lisp/subr.el	2012-12-10 12:08:02 +0000
+++ lisp/subr.el	2012-12-31 03:03:46 +0000
@@ -2805,7 +2805,7 @@
 (defun special-form-p (object)
   "Non-nil if and only if OBJECT is a special form."
   (if (and (symbolp object) (fboundp object))
-      (setq object (indirect-function object)))
+      (setq object (indirect-function object t)))
   (and (subrp object) (eq (cdr (subr-arity object)) 'unevalled)))
 
 (defun field-at-pos (pos)




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: new fboundp behavior weird
  2012-12-31  3:06 ` Stefan Monnier
@ 2012-12-31  6:51   ` Thierry Volpiatto
  0 siblings, 0 replies; 11+ messages in thread
From: Thierry Volpiatto @ 2012-12-31  6:51 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> the new behavior of fboundp seems really bad.
>
> It's got nothing to do with fboundp.
I realized this afterward, thanks for the fix.

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




^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-12-31  6:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-29 11:38 new fboundp behavior weird Thierry Volpiatto
2012-12-29 12:35 ` Thierry Volpiatto
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

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).