GNU bug report logs - #41864
28.0.50; funcall: attempting to call a macro does not always complain

Previous Next

Package: emacs;

Reported by: Nick Dokos <ndokos <at> gmail.com>

Date: Mon, 15 Jun 2020 02:22:01 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41864 in the body.
You can then email your comments to 41864 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Mon, 15 Jun 2020 02:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nick Dokos <ndokos <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 15 Jun 2020 02:22:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nick Dokos <ndokos <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; funcall: attempting to call a macro does not always complain
Date: Sun, 14 Jun 2020 22:20:58 -0400
----
The doc (info "(elisp) Calling functions") says:

     The argument FUNCTION must be either a Lisp function or a primitive
     function.  Special forms and macros are not allowed, because they
     make sense only when given the unevaluated argument expressions.
     ‘funcall’ cannot provide these because, as we saw above, it never
     knows them in the first place.

If I define a function, I can funcall it:

   (defun func/z () "z")
   (funcall (function func/z)) ==> "z"
   (funcall 'func/z) ==> "z"

If I attempt the same thing with a macro however, it does not always
fail:

    (defmacro mac/z () "z")
    (funcall 'mac/z) ==> fails with Invalid function: mac/z
    (funcall (function mac/z)) ==> "z"

Should it fail in the last case?

This was brought up in the following question in the  Emacs Stack Exchange:

    https://emacs.stackexchange.com/questions/59066/inconsistent-behavior-when-calling-funcall-with-a-macro/59075#59075


----


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13, cairo version 1.16.0)
 of 2020-04-23 built on pierrot.dokosmarshall.org
Repository revision: 188ec3f70402802597b988427b76010c069634a0
Repository branch: comint-send-input-timeout
Windowing system distributor 'Fedora Project', version 11.0.12006000
System Description: Fedora 31 (Thirty One)

Recent messages:
Created bookmark link.
Created bookmark-other-win link.
Loading /home/nick/elisp/ws.el (source)...done
Loading /home/nick/elisp/prompts.el (source)...done
Loading /home/nick/elisp/keydefs.el (source)...done
Loading /home/nick/elisp/colors.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Package cl is deprecated
Quit [2 times]
Type "q" in help window to delete it.

Configured using:
 'configure --with-imagemagick --with-ghostscript'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS GSETTINGS
GLIB NOTIFY INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ
M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES
THREADS LIBSYSTEMD PDUMPER LCMS2 GMP

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  TeX-PDF-mode: t
  shell-dirtrack-mode: t
  org-indent-mode: t
  display-time-mode: t
  cl-old-struct-compat-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/nick/elisp/config/helm-config hides /home/nick/.emacs.d/elpa/helm-20190924.1741/helm-config
/home/nick/elisp/iimage hides /usr/local/share/emacs/28.0.50/lisp/iimage
/home/nick/elisp/remember hides /usr/local/share/emacs/28.0.50/lisp/textmodes/remember
/home/nick/elisp/ruby-mode hides /usr/local/share/emacs/28.0.50/lisp/progmodes/ruby-mode
/home/nick/elisp/org-mode/lisp/ob-eshell hides /usr/local/share/emacs/28.0.50/lisp/org/ob-eshell
/home/nick/elisp/org-mode/lisp/ob-sqlite hides /usr/local/share/emacs/28.0.50/lisp/org/ob-sqlite
/home/nick/elisp/org-mode/lisp/ol-eshell hides /usr/local/share/emacs/28.0.50/lisp/org/ol-eshell
/home/nick/elisp/org-mode/lisp/org-entities hides /usr/local/share/emacs/28.0.50/lisp/org/org-entities
/home/nick/elisp/org-mode/lisp/ob-R hides /usr/local/share/emacs/28.0.50/lisp/org/ob-R
/home/nick/elisp/org-mode/lisp/ob-shen hides /usr/local/share/emacs/28.0.50/lisp/org/ob-shen
/home/nick/elisp/org-mode/lisp/org-mobile hides /usr/local/share/emacs/28.0.50/lisp/org/org-mobile
/home/nick/elisp/org-mode/lisp/ol-bibtex hides /usr/local/share/emacs/28.0.50/lisp/org/ol-bibtex
/home/nick/elisp/org-mode/lisp/ob-table hides /usr/local/share/emacs/28.0.50/lisp/org/ob-table
/home/nick/elisp/org-mode/lisp/ox-md hides /usr/local/share/emacs/28.0.50/lisp/org/ox-md
/home/nick/elisp/org-mode/lisp/ob-python hides /usr/local/share/emacs/28.0.50/lisp/org/ob-python
/home/nick/elisp/org-mode/lisp/ob-ruby hides /usr/local/share/emacs/28.0.50/lisp/org/ob-ruby
/home/nick/elisp/org-mode/lisp/ox-odt hides /usr/local/share/emacs/28.0.50/lisp/org/ox-odt
/home/nick/elisp/org-mode/lisp/ox-publish hides /usr/local/share/emacs/28.0.50/lisp/org/ox-publish
/home/nick/elisp/org-mode/lisp/ob-screen hides /usr/local/share/emacs/28.0.50/lisp/org/ob-screen
/home/nick/elisp/org-mode/lisp/org hides /usr/local/share/emacs/28.0.50/lisp/org/org
/home/nick/elisp/org-mode/lisp/ob-picolisp hides /usr/local/share/emacs/28.0.50/lisp/org/ob-picolisp
/home/nick/elisp/org-mode/lisp/org-element hides /usr/local/share/emacs/28.0.50/lisp/org/org-element
/home/nick/elisp/org-mode/lisp/ob-js hides /usr/local/share/emacs/28.0.50/lisp/org/ob-js
/home/nick/elisp/org-mode/lisp/ol-bbdb hides /usr/local/share/emacs/28.0.50/lisp/org/ol-bbdb
/home/nick/elisp/org-mode/lisp/ox-beamer hides /usr/local/share/emacs/28.0.50/lisp/org/ox-beamer
/home/nick/elisp/org-mode/lisp/ob-fortran hides /usr/local/share/emacs/28.0.50/lisp/org/ob-fortran
/home/nick/elisp/org-mode/lisp/ob-comint hides /usr/local/share/emacs/28.0.50/lisp/org/ob-comint
/home/nick/elisp/org-mode/lisp/ob-processing hides /usr/local/share/emacs/28.0.50/lisp/org/ob-processing
/home/nick/elisp/org-mode/lisp/ob-forth hides /usr/local/share/emacs/28.0.50/lisp/org/ob-forth
/home/nick/elisp/org-mode/lisp/ox-texinfo hides /usr/local/share/emacs/28.0.50/lisp/org/ox-texinfo
/home/nick/elisp/org-mode/lisp/ob-dot hides /usr/local/share/emacs/28.0.50/lisp/org/ob-dot
/home/nick/elisp/org-mode/lisp/org-keys hides /usr/local/share/emacs/28.0.50/lisp/org/org-keys
/home/nick/elisp/org-mode/lisp/org-duration hides /usr/local/share/emacs/28.0.50/lisp/org/org-duration
/home/nick/elisp/org-mode/lisp/org-mouse hides /usr/local/share/emacs/28.0.50/lisp/org/org-mouse
/home/nick/elisp/org-mode/lisp/ob-sql hides /usr/local/share/emacs/28.0.50/lisp/org/ob-sql
/home/nick/elisp/org-mode/lisp/ox-icalendar hides /usr/local/share/emacs/28.0.50/lisp/org/ox-icalendar
/home/nick/elisp/org-mode/lisp/org-indent hides /usr/local/share/emacs/28.0.50/lisp/org/org-indent
/home/nick/elisp/org-mode/lisp/org-protocol hides /usr/local/share/emacs/28.0.50/lisp/org/org-protocol
/home/nick/elisp/org-mode/lisp/ob-awk hides /usr/local/share/emacs/28.0.50/lisp/org/ob-awk
/home/nick/elisp/org-mode/lisp/ob-plantuml hides /usr/local/share/emacs/28.0.50/lisp/org/ob-plantuml
/home/nick/elisp/org-mode/lisp/ob-coq hides /usr/local/share/emacs/28.0.50/lisp/org/ob-coq
/home/nick/elisp/org-mode/lisp/ob-lua hides /usr/local/share/emacs/28.0.50/lisp/org/ob-lua
/home/nick/elisp/org-mode/lisp/ob-C hides /usr/local/share/emacs/28.0.50/lisp/org/ob-C
/home/nick/elisp/org-mode/lisp/ob-shell hides /usr/local/share/emacs/28.0.50/lisp/org/ob-shell
/home/nick/elisp/org-mode/lisp/org-colview hides /usr/local/share/emacs/28.0.50/lisp/org/org-colview
/home/nick/elisp/org-mode/lisp/org-clock hides /usr/local/share/emacs/28.0.50/lisp/org/org-clock
/home/nick/elisp/org-mode/lisp/ob-lilypond hides /usr/local/share/emacs/28.0.50/lisp/org/ob-lilypond
/home/nick/elisp/org-mode/lisp/ob-perl hides /usr/local/share/emacs/28.0.50/lisp/org/ob-perl
/home/nick/elisp/org-mode/lisp/ob-groovy hides /usr/local/share/emacs/28.0.50/lisp/org/ob-groovy
/home/nick/elisp/org-mode/lisp/ob-ebnf hides /usr/local/share/emacs/28.0.50/lisp/org/ob-ebnf
/home/nick/elisp/org-mode/lisp/org-plot hides /usr/local/share/emacs/28.0.50/lisp/org/org-plot
/home/nick/elisp/org-mode/lisp/ox-man hides /usr/local/share/emacs/28.0.50/lisp/org/ox-man
/home/nick/elisp/org-mode/lisp/ol-irc hides /usr/local/share/emacs/28.0.50/lisp/org/ol-irc
/home/nick/elisp/org-mode/lisp/ob-clojure hides /usr/local/share/emacs/28.0.50/lisp/org/ob-clojure
/home/nick/elisp/org-mode/lisp/org-list hides /usr/local/share/emacs/28.0.50/lisp/org/org-list
/home/nick/elisp/org-mode/lisp/org-crypt hides /usr/local/share/emacs/28.0.50/lisp/org/org-crypt
/home/nick/elisp/org-mode/lisp/ob-sass hides /usr/local/share/emacs/28.0.50/lisp/org/ob-sass
/home/nick/elisp/org-mode/lisp/ob-ref hides /usr/local/share/emacs/28.0.50/lisp/org/ob-ref
/home/nick/elisp/org-mode/lisp/org-agenda hides /usr/local/share/emacs/28.0.50/lisp/org/org-agenda
/home/nick/elisp/org-mode/lisp/ob-emacs-lisp hides /usr/local/share/emacs/28.0.50/lisp/org/ob-emacs-lisp
/home/nick/elisp/org-mode/lisp/org-src hides /usr/local/share/emacs/28.0.50/lisp/org/org-src
/home/nick/elisp/org-mode/lisp/ob-eval hides /usr/local/share/emacs/28.0.50/lisp/org/ob-eval
/home/nick/elisp/org-mode/lisp/org-num hides /usr/local/share/emacs/28.0.50/lisp/org/org-num
/home/nick/elisp/org-mode/lisp/org-ctags hides /usr/local/share/emacs/28.0.50/lisp/org/org-ctags
/home/nick/elisp/org-mode/lisp/ob-io hides /usr/local/share/emacs/28.0.50/lisp/org/ob-io
/home/nick/elisp/org-mode/lisp/ol-mhe hides /usr/local/share/emacs/28.0.50/lisp/org/ol-mhe
/home/nick/elisp/org-mode/lisp/org-pcomplete hides /usr/local/share/emacs/28.0.50/lisp/org/org-pcomplete
/home/nick/elisp/org-mode/lisp/ob-hledger hides /usr/local/share/emacs/28.0.50/lisp/org/ob-hledger
/home/nick/elisp/org-mode/lisp/ob-abc hides /usr/local/share/emacs/28.0.50/lisp/org/ob-abc
/home/nick/elisp/org-mode/lisp/org-footnote hides /usr/local/share/emacs/28.0.50/lisp/org/org-footnote
/home/nick/elisp/org-mode/lisp/ob-latex hides /usr/local/share/emacs/28.0.50/lisp/org/ob-latex
/home/nick/elisp/org-mode/lisp/ob-ocaml hides /usr/local/share/emacs/28.0.50/lisp/org/ob-ocaml
/home/nick/elisp/org-mode/lisp/ob-org hides /usr/local/share/emacs/28.0.50/lisp/org/ob-org
/home/nick/elisp/org-mode/lisp/ob-maxima hides /usr/local/share/emacs/28.0.50/lisp/org/ob-maxima
/home/nick/elisp/org-mode/lisp/ob-mscgen hides /usr/local/share/emacs/28.0.50/lisp/org/ob-mscgen
/home/nick/elisp/org-mode/lisp/org-faces hides /usr/local/share/emacs/28.0.50/lisp/org/org-faces
/home/nick/elisp/org-mode/lisp/ob-ditaa hides /usr/local/share/emacs/28.0.50/lisp/org/ob-ditaa
/home/nick/elisp/org-mode/lisp/ob-lob hides /usr/local/share/emacs/28.0.50/lisp/org/ob-lob
/home/nick/elisp/org-mode/lisp/ox-org hides /usr/local/share/emacs/28.0.50/lisp/org/ox-org
/home/nick/elisp/org-mode/lisp/ob-gnuplot hides /usr/local/share/emacs/28.0.50/lisp/org/ob-gnuplot
/home/nick/elisp/org-mode/lisp/org-habit hides /usr/local/share/emacs/28.0.50/lisp/org/org-habit
/home/nick/elisp/org-mode/lisp/ol-info hides /usr/local/share/emacs/28.0.50/lisp/org/ol-info
/home/nick/elisp/org-mode/lisp/org-capture hides /usr/local/share/emacs/28.0.50/lisp/org/org-capture
/home/nick/elisp/org-mode/lisp/ox-latex hides /usr/local/share/emacs/28.0.50/lisp/org/ox-latex
/home/nick/elisp/org-mode/lisp/org-macro hides /usr/local/share/emacs/28.0.50/lisp/org/org-macro
/home/nick/elisp/org-mode/lisp/ox-html hides /usr/local/share/emacs/28.0.50/lisp/org/ox-html
/home/nick/elisp/org-mode/lisp/org-tempo hides /usr/local/share/emacs/28.0.50/lisp/org/org-tempo
/home/nick/elisp/org-mode/lisp/ob-core hides /usr/local/share/emacs/28.0.50/lisp/org/ob-core
/home/nick/elisp/org-mode/lisp/ob-matlab hides /usr/local/share/emacs/28.0.50/lisp/org/ob-matlab
/home/nick/elisp/org-mode/lisp/org-archive hides /usr/local/share/emacs/28.0.50/lisp/org/org-archive
/home/nick/elisp/org-mode/lisp/org-id hides /usr/local/share/emacs/28.0.50/lisp/org/org-id
/home/nick/elisp/org-mode/lisp/ob-css hides /usr/local/share/emacs/28.0.50/lisp/org/ob-css
/home/nick/elisp/org-mode/lisp/ob-tangle hides /usr/local/share/emacs/28.0.50/lisp/org/ob-tangle
/home/nick/elisp/org-mode/lisp/ob-makefile hides /usr/local/share/emacs/28.0.50/lisp/org/ob-makefile
/home/nick/elisp/org-mode/lisp/ob-stan hides /usr/local/share/emacs/28.0.50/lisp/org/ob-stan
/home/nick/elisp/org-mode/lisp/org-datetree hides /usr/local/share/emacs/28.0.50/lisp/org/org-datetree
/home/nick/elisp/org-mode/lisp/ob-exp hides /usr/local/share/emacs/28.0.50/lisp/org/ob-exp
/home/nick/elisp/org-mode/lisp/ob-java hides /usr/local/share/emacs/28.0.50/lisp/org/ob-java
/home/nick/elisp/org-mode/lisp/org-timer hides /usr/local/share/emacs/28.0.50/lisp/org/org-timer
/home/nick/elisp/org-mode/lisp/ob-octave hides /usr/local/share/emacs/28.0.50/lisp/org/ob-octave
/home/nick/elisp/org-mode/lisp/org-lint hides /usr/local/share/emacs/28.0.50/lisp/org/org-lint
/home/nick/elisp/org-mode/lisp/ob-asymptote hides /usr/local/share/emacs/28.0.50/lisp/org/ob-asymptote
/home/nick/elisp/org-mode/lisp/org-inlinetask hides /usr/local/share/emacs/28.0.50/lisp/org/org-inlinetask
/home/nick/elisp/org-mode/lisp/org-attach hides /usr/local/share/emacs/28.0.50/lisp/org/org-attach
/home/nick/elisp/org-mode/lisp/org-loaddefs hides /usr/local/share/emacs/28.0.50/lisp/org/org-loaddefs
/home/nick/elisp/org-mode/lisp/ox-ascii hides /usr/local/share/emacs/28.0.50/lisp/org/ox-ascii
/home/nick/elisp/org-mode/lisp/org-feed hides /usr/local/share/emacs/28.0.50/lisp/org/org-feed
/home/nick/elisp/org-mode/lisp/org-version hides /usr/local/share/emacs/28.0.50/lisp/org/org-version
/home/nick/elisp/org-mode/lisp/org-attach-git hides /usr/local/share/emacs/28.0.50/lisp/org/org-attach-git
/home/nick/elisp/org-mode/lisp/ob-J hides /usr/local/share/emacs/28.0.50/lisp/org/ob-J
/home/nick/elisp/org-mode/lisp/org-macs hides /usr/local/share/emacs/28.0.50/lisp/org/org-macs
/home/nick/elisp/org-mode/lisp/ob-lisp hides /usr/local/share/emacs/28.0.50/lisp/org/ob-lisp
/home/nick/elisp/org-mode/lisp/ol-w3m hides /usr/local/share/emacs/28.0.50/lisp/org/ol-w3m
/home/nick/elisp/org-mode/lisp/ox hides /usr/local/share/emacs/28.0.50/lisp/org/ox
/home/nick/elisp/org-mode/lisp/ob hides /usr/local/share/emacs/28.0.50/lisp/org/ob
/home/nick/elisp/org-mode/lisp/ob-vala hides /usr/local/share/emacs/28.0.50/lisp/org/ob-vala
/home/nick/elisp/org-mode/lisp/org-table hides /usr/local/share/emacs/28.0.50/lisp/org/org-table
/home/nick/elisp/org-mode/lisp/org-compat hides /usr/local/share/emacs/28.0.50/lisp/org/org-compat
/home/nick/elisp/org-mode/lisp/ob-ledger hides /usr/local/share/emacs/28.0.50/lisp/org/ob-ledger
/home/nick/elisp/org-mode/lisp/ol-eww hides /usr/local/share/emacs/28.0.50/lisp/org/ol-eww
/home/nick/elisp/org-mode/lisp/org-goto hides /usr/local/share/emacs/28.0.50/lisp/org/org-goto
/home/nick/elisp/org-mode/lisp/ol-gnus hides /usr/local/share/emacs/28.0.50/lisp/org/ol-gnus
/home/nick/elisp/org-mode/lisp/ob-sed hides /usr/local/share/emacs/28.0.50/lisp/org/ob-sed
/home/nick/elisp/org-mode/lisp/ol hides /usr/local/share/emacs/28.0.50/lisp/org/ol
/home/nick/elisp/org-mode/lisp/ob-haskell hides /usr/local/share/emacs/28.0.50/lisp/org/ob-haskell
/home/nick/elisp/org-mode/lisp/org-install hides /usr/local/share/emacs/28.0.50/lisp/org/org-install
/home/nick/elisp/org-mode/lisp/ob-calc hides /usr/local/share/emacs/28.0.50/lisp/org/ob-calc
/home/nick/elisp/org-mode/lisp/ol-docview hides /usr/local/share/emacs/28.0.50/lisp/org/ol-docview
/home/nick/elisp/org-mode/lisp/ob-scheme hides /usr/local/share/emacs/28.0.50/lisp/org/ob-scheme
/home/nick/elisp/org-mode/lisp/ol-rmail hides /usr/local/share/emacs/28.0.50/lisp/org/ol-rmail
/home/nick/elisp/cal-html hides /usr/local/share/emacs/28.0.50/lisp/calendar/cal-html

Features:
(shadow sort mail-extr cl-extra cl-print mailalias hsmail emacsbug
bmkp-config bookmark+ bookmark+-key dired-x bookmark+-1 bookmark+-bmu
bookmark+-lit bookmark server ndk/utils mh-e mh-compat mh-buffers
mh-loaddefs py-utils dates java-class-doc-config gnuplot-config htmlize
info-config lilypond-config python-config python tramp-sh tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat ls-lisp
ido-config ido xcscope-config auctex-config preview prv-emacs tex-buf
latex latex-flymake flymake-proc flymake warnings tex-ispell tex-style
tex dbus network-stream nsm boxquote-config boxquote rect diary-config
cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew holidays
hol-loaddefs gnorb-config gnorb gnorb-org gnorb-bbdb gnorb-registry
gnus-registry registry eieio-base gnorb-gnus gnorb-utils org-attach
gnus-art mm-uu mml2015 mm-view mml-smime nngnorb org-id bbdb-config
bbdb-message sendmail bbdb-gnus bbdb-mua bbdb-com crm bbdb bbdb-site
timezone bbdb-loaddefs octave-config pandoc-config pandoc-mode
filesets-config filesets org-screenshot slime-config slime compile etags
fileloop xref project arc-mode archive-mode pp hyperspec org-sml-config
ob-haskell ob-js ob-clojure ob-sml org-config org-tempo tempo
org-capture ox-taskjuggler ox-s5 ox-rss ox-koma-letter ox-groff
ox-freemind ox-deck cl ox-confluence pcase ox-texinfo ox-org ox-odt
rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse
nxml-ns nxml-enc xmltok nxml-util ox-md ox-man ox-icalendar ox-html
table ox-beamer ox-latex ox-ascii ox-publish ox ob-sql ob-sqlite
ob-shell shell ob-scheme geiser-impl help-fns radix-tree help-mode
geiser-custom geiser-base geiser ob-ruby ob-R ob-python ob-plantuml
ob-org ob-octave ob-maxima ob-lisp ob-lilypond ob-latex ob-gnuplot
ob-dot ob-ditaa ob-calc calc-store calc-trail calc-ext calc
calc-loaddefs calc-macs ob-asymptote iimage org-man org-mouse image-file
org-indent vc-git vc-hg diff-mode org-element avl-tree generator ol-eww
eww mm-url thingatpt url-queue ol-rmail ol-mhe ol-irc ol-info ol-gnus
nnir gnus-sum url url-proxy url-privacy url-expand url-methods
url-history mailcap shr url-cookie url-domsuf url-util svg xml dom
gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source
utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int gnus-range message
rmc puny rfc822 mml mml-sec epa derived epg epg-config mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
gnus-win gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045
ietf-drums text-property-search mail-utils mm-util mail-prsvr wid-edit
ol-docview doc-view jka-compr image-mode exif dired dired-loaddefs
ol-bibtex bibtex ol-bbdb ol-w3m org-agenda org-refile appt diary-lib
diary-loaddefs url-config org ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-macro org-footnote org-src ob-comint org-pcomplete pcomplete comint
ansi-color ring org-list org-faces org-entities time-date noutline
outline easy-mmode org-version ob-emacs-lisp ob-core ob-eval org-table
ol org-keys org-compat advice org-macs org-loaddefs format-spec
find-func cal-menu calendar cal-loaddefs constants-config time cus-start
cus-load smtpmail-config smime dig ldap edmacro kmacro gnus-config
experimental tex-site helm-easymenu kotl-autoloads gh-common marshal
eieio-compat slime-autoloads info package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process emacs)

Memory information:
((conses 16 471107 62507)
 (symbols 48 44418 1)
 (strings 32 157197 3290)
 (string-bytes 1 5186995)
 (vectors 16 58703)
 (vector-slots 8 701793 33832)
 (floats 8 868 191)
 (intervals 56 585 0)
 (buffers 992 20))

-- 
Nick




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Sat, 17 Oct 2020 11:03:02 GMT) Full text and rfc822 format available.

Message #8 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Nick Dokos <ndokos <at> gmail.com>
Cc: 41864 <at> debbugs.gnu.org
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does
 not always complain
Date: Sat, 17 Oct 2020 13:02:02 +0200
Nick Dokos <ndokos <at> gmail.com> writes:

> If I attempt the same thing with a macro however, it does not always
> fail:
>
>     (defmacro mac/z () "z")
>     (funcall 'mac/z) ==> fails with Invalid function: mac/z
>     (funcall (function mac/z)) ==> "z"
>
> Should it fail in the last case?

That is indeed pretty odd.

(eq 'mac/z (function mac/z))
=> t

Does anybody here understand what's happening here?  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Sat, 17 Oct 2020 12:51:01 GMT) Full text and rfc822 format available.

Message #11 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Nick Dokos <ndokos <at> gmail.com>
Cc: 41864 <at> debbugs.gnu.org
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does
 not always complain
Date: Sat, 17 Oct 2020 14:50:35 +0200
On Jun 14 2020, Nick Dokos wrote:

> If I attempt the same thing with a macro however, it does not always
> fail:
>
>     (defmacro mac/z () "z")
>     (funcall 'mac/z) ==> fails with Invalid function: mac/z
>     (funcall (function mac/z)) ==> "z"
>
> Should it fail in the last case?

Worksforme.

ELISP> (defmacro mac/z () "z")
mac/z
ELISP> (funcall (function mac/z))
*** Eval error ***  Invalid function: mac/z

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Sat, 17 Oct 2020 14:13:01 GMT) Full text and rfc822 format available.

Message #14 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>, Nick Dokos <ndokos <at> gmail.com>
Cc: 41864 <at> debbugs.gnu.org
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does not
 always complain
Date: Sat, 17 Oct 2020 14:11:53 +0000
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> Worksforme.
>
> ELISP> (defmacro mac/z () "z")
> mac/z
> ELISP> (funcall (function mac/z))
> *** Eval error ***  Invalid function: mac/z

I see the same in IELM, but not in *scratch*.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Sat, 17 Oct 2020 18:09:01 GMT) Full text and rfc822 format available.

Message #17 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: Nick Dokos <ndokos <at> gmail.com>, 41864 <at> debbugs.gnu.org
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does
 not always complain
Date: Sat, 17 Oct 2020 20:08:46 +0200
On Okt 17 2020, Stefan Kangas wrote:

> Andreas Schwab <schwab <at> linux-m68k.org> writes:
>
>> Worksforme.
>>
>> ELISP> (defmacro mac/z () "z")
>> mac/z
>> ELISP> (funcall (function mac/z))
>> *** Eval error ***  Invalid function: mac/z
>
> I see the same in IELM, but not in *scratch*.

ELISP> (macroexpand-all (eval-sexp-add-defvars (elisp--eval-defun-1 (macroexpand '(funcall (function mac/z))))))
(progn "z")

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Sun, 18 Oct 2020 07:59:02 GMT) Full text and rfc822 format available.

Message #20 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Nick Dokos <ndokos <at> gmail.com>, 41864 <at> debbugs.gnu.org,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does
 not always complain
Date: Sun, 18 Oct 2020 09:57:53 +0200
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> ELISP> (macroexpand-all (eval-sexp-add-defvars (elisp--eval-defun-1
> (macroexpand '(funcall (function mac/z))))))
> (progn "z")

And

(macroexpand-all (eval-sexp-add-defvars (elisp--eval-defun-1 (macroexpand '(funcall 'mac/z)))))
=> (funcall 'mac/z)                                         

Which is what the bug reporter is wondering about.  The doc string says

--
Like ‘quote’, but preferred for objects which are functions.
--

And it's not quite like `quote', as the examples show us, and the
documentation should mention this.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Sun, 18 Oct 2020 08:53:02 GMT) Full text and rfc822 format available.

Message #23 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Nick Dokos <ndokos <at> gmail.com>, 41864 <at> debbugs.gnu.org,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does
 not always complain
Date: Sun, 18 Oct 2020 10:52:45 +0200
On Okt 18 2020, Lars Ingebrigtsen wrote:

> Andreas Schwab <schwab <at> linux-m68k.org> writes:
>
>> ELISP> (macroexpand-all (eval-sexp-add-defvars (elisp--eval-defun-1
>> (macroexpand '(funcall (function mac/z))))))
>> (progn "z")
>
> And
>
> (macroexpand-all (eval-sexp-add-defvars (elisp--eval-defun-1 (macroexpand '(funcall 'mac/z)))))
> => (funcall 'mac/z)                                         
>
> Which is what the bug reporter is wondering about.

And what do you get when you eval that?

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Sun, 18 Oct 2020 09:04:01 GMT) Full text and rfc822 format available.

Message #26 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Nick Dokos <ndokos <at> gmail.com>, 41864 <at> debbugs.gnu.org,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does
 not always complain
Date: Sun, 18 Oct 2020 11:03:18 +0200
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> And what do you get when you eval that?

An error.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Sun, 18 Oct 2020 09:35:02 GMT) Full text and rfc822 format available.

Message #29 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Nick Dokos <ndokos <at> gmail.com>, 41864 <at> debbugs.gnu.org,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does
 not always complain
Date: Sun, 18 Oct 2020 11:34:32 +0200
On Okt 18 2020, Lars Ingebrigtsen wrote:

> Andreas Schwab <schwab <at> linux-m68k.org> writes:
>
>> And what do you get when you eval that?
>
> An error.

So eveything works as expected.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Sun, 18 Oct 2020 09:46:01 GMT) Full text and rfc822 format available.

Message #32 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Nick Dokos <ndokos <at> gmail.com>, 41864 <at> debbugs.gnu.org,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does
 not always complain
Date: Sun, 18 Oct 2020 11:45:34 +0200
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> So eveything works as expected.

Your expectations are unexpected.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Sun, 18 Oct 2020 09:52:02 GMT) Full text and rfc822 format available.

Message #35 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Nick Dokos <ndokos <at> gmail.com>, 41864 <at> debbugs.gnu.org,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does
 not always complain
Date: Sun, 18 Oct 2020 11:51:18 +0200
On Okt 18 2020, Lars Ingebrigtsen wrote:

> Andreas Schwab <schwab <at> linux-m68k.org> writes:
>
>> So eveything works as expected.
>
> Your expectations are unexpected.

In which way?

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41864; Package emacs. (Mon, 19 Oct 2020 08:20:01 GMT) Full text and rfc822 format available.

Message #38 received at 41864 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Nick Dokos <ndokos <at> gmail.com>, 41864 <at> debbugs.gnu.org,
 Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#41864: 28.0.50; funcall: attempting to call a macro does
 not always complain
Date: Mon, 19 Oct 2020 10:19:24 +0200
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> On Okt 18 2020, Lars Ingebrigtsen wrote:
>
>> Andreas Schwab <schwab <at> linux-m68k.org> writes:
>>
>>> So eveything works as expected.
>>
>> Your expectations are unexpected.
>
> In which way?

In that the `function' doc string doesn't mention anything about this.
I've now amended it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 19 Oct 2020 08:26:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 41864 <at> debbugs.gnu.org and Nick Dokos <ndokos <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 19 Oct 2020 08:26:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 16 Nov 2020 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 154 days ago.

Previous Next


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