all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#65620: void function edebug-after
@ 2023-08-30 12:57 Alan Mackenzie
  2023-08-30 23:09 ` Michael Heerdegen
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Mackenzie @ 2023-08-30 12:57 UTC (permalink / raw)
  To: 65620

Hello, Emacs.

On a recent master branch Emacs:
(i) emacs -Q
(ii) Insert the following into *scratch*:

(defmacro hash-if (condition then-form &rest else-forms)
  "A conditional compilation macro analogous to C's #if.
Evaluate CONDITION at macro-expansion time.  If it is non-nil,
expand the macro to THEN-FORM.  Otherwise expand it to ELSE-FORMS
enclosed in a `progn' form.  ELSE-FORMS may be empty."
  (declare (indent 2)
           (debug (form sexp &rest sexp)))
  (if (eval condition lexical-binding)
      then-form
    (cons 'progn else-forms)))

(defun foo (bar)
  (hash-if (< emacs-major-version 19)
      (car bar)
    (cons bar bar)))

(iii) Evaluate hash-if by putting point after it and doing C-x C-e.
(iv) Attempt to instrument foo for edebug by putting point inside foo and
  doing C-u C-M-x.  This throws the error: "Ignoring macroexpansion
  error: (void-function edebug-after)".  This attempt to evaluate
  edebug-after is a bug.

-- 
Alan Mackenzie (Nuremberg, Germany).





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

end of thread, other threads:[~2023-09-03  4:29 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-30 12:57 bug#65620: void function edebug-after Alan Mackenzie
2023-08-30 23:09 ` Michael Heerdegen
2023-08-31  7:55   ` Gerd Möllmann
2023-08-31  8:02     ` Gerd Möllmann
2023-08-31 13:50     ` Alan Mackenzie
2023-08-31 14:41       ` Gerd Möllmann
2023-09-01  9:23         ` Alan Mackenzie
2023-09-01 12:27           ` Gerd Möllmann
2023-09-01 21:27             ` Alan Mackenzie
2023-09-02  4:27               ` Gerd Möllmann
2023-09-02 13:10                 ` Alan Mackenzie
2023-09-02 13:15                   ` Gerd Möllmann
2023-09-02 13:57                     ` Alan Mackenzie
2023-09-03  4:29               ` Michael Heerdegen

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.