all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
@ 2020-06-15  2:20 Nick Dokos
  2020-10-17 11:02 ` Lars Ingebrigtsen
  2020-10-17 12:50 ` Andreas Schwab
  0 siblings, 2 replies; 12+ messages in thread
From: Nick Dokos @ 2020-06-15  2:20 UTC (permalink / raw)
  To: 41864


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





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-06-15  2:20 bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain Nick Dokos
@ 2020-10-17 11:02 ` Lars Ingebrigtsen
  2020-10-17 12:50 ` Andreas Schwab
  1 sibling, 0 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-17 11:02 UTC (permalink / raw)
  To: Nick Dokos; +Cc: 41864

Nick Dokos <ndokos@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





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-06-15  2:20 bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain Nick Dokos
  2020-10-17 11:02 ` Lars Ingebrigtsen
@ 2020-10-17 12:50 ` Andreas Schwab
  2020-10-17 14:11   ` Stefan Kangas
  1 sibling, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2020-10-17 12:50 UTC (permalink / raw)
  To: Nick Dokos; +Cc: 41864

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@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-10-17 12:50 ` Andreas Schwab
@ 2020-10-17 14:11   ` Stefan Kangas
  2020-10-17 18:08     ` Andreas Schwab
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Kangas @ 2020-10-17 14:11 UTC (permalink / raw)
  To: Andreas Schwab, Nick Dokos; +Cc: 41864

Andreas Schwab <schwab@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*.





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-10-17 14:11   ` Stefan Kangas
@ 2020-10-17 18:08     ` Andreas Schwab
  2020-10-18  7:57       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2020-10-17 18:08 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Nick Dokos, 41864

On Okt 17 2020, Stefan Kangas wrote:

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





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-10-17 18:08     ` Andreas Schwab
@ 2020-10-18  7:57       ` Lars Ingebrigtsen
  2020-10-18  8:52         ` Andreas Schwab
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-18  7:57 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Nick Dokos, 41864, Stefan Kangas

Andreas Schwab <schwab@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





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-10-18  7:57       ` Lars Ingebrigtsen
@ 2020-10-18  8:52         ` Andreas Schwab
  2020-10-18  9:03           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2020-10-18  8:52 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Nick Dokos, 41864, Stefan Kangas

On Okt 18 2020, Lars Ingebrigtsen wrote:

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





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-10-18  8:52         ` Andreas Schwab
@ 2020-10-18  9:03           ` Lars Ingebrigtsen
  2020-10-18  9:34             ` Andreas Schwab
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-18  9:03 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Nick Dokos, 41864, Stefan Kangas

Andreas Schwab <schwab@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





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-10-18  9:03           ` Lars Ingebrigtsen
@ 2020-10-18  9:34             ` Andreas Schwab
  2020-10-18  9:45               ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2020-10-18  9:34 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Nick Dokos, 41864, Stefan Kangas

On Okt 18 2020, Lars Ingebrigtsen wrote:

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

So eveything works as expected.

Andreas.

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





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-10-18  9:34             ` Andreas Schwab
@ 2020-10-18  9:45               ` Lars Ingebrigtsen
  2020-10-18  9:51                 ` Andreas Schwab
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-18  9:45 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Nick Dokos, 41864, Stefan Kangas

Andreas Schwab <schwab@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





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-10-18  9:45               ` Lars Ingebrigtsen
@ 2020-10-18  9:51                 ` Andreas Schwab
  2020-10-19  8:19                   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2020-10-18  9:51 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Nick Dokos, 41864, Stefan Kangas

On Okt 18 2020, Lars Ingebrigtsen wrote:

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

In which way?

Andreas.

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





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

* bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain
  2020-10-18  9:51                 ` Andreas Schwab
@ 2020-10-19  8:19                   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-19  8:19 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Nick Dokos, 41864, Stefan Kangas

Andreas Schwab <schwab@linux-m68k.org> writes:

> On Okt 18 2020, Lars Ingebrigtsen wrote:
>
>> Andreas Schwab <schwab@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





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

end of thread, other threads:[~2020-10-19  8:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-15  2:20 bug#41864: 28.0.50; funcall: attempting to call a macro does not always complain Nick Dokos
2020-10-17 11:02 ` Lars Ingebrigtsen
2020-10-17 12:50 ` Andreas Schwab
2020-10-17 14:11   ` Stefan Kangas
2020-10-17 18:08     ` Andreas Schwab
2020-10-18  7:57       ` Lars Ingebrigtsen
2020-10-18  8:52         ` Andreas Schwab
2020-10-18  9:03           ` Lars Ingebrigtsen
2020-10-18  9:34             ` Andreas Schwab
2020-10-18  9:45               ` Lars Ingebrigtsen
2020-10-18  9:51                 ` Andreas Schwab
2020-10-19  8:19                   ` Lars Ingebrigtsen

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.