Malabarba / names

A Namespace implementation for Emacs-Lisp
250 stars 19 forks source link

"Edebug: names-edebug-anon0", etc., messages #35

Open greg-minshall opened 3 years ago

greg-minshall commented 3 years ago

hi. i get this line, and also "...-anon1", printed on stderr with the following (not necessarily exemplary) script:

#!/usr/bin/emacs --script
;; path to names
(let ((default-directory "~/.emacs.d/straight/build/"))
  (normal-top-level-add-subdirs-to-load-path))

(eval-when-compile (require 'names))
;;;###autoload
(define-namespace qbo-convert:

(defun x ()
  (push a b))
)

the output:

Edebug: names-edebug-anon0
Edebug: names-edebug-anon1

i appear to be running 20151201.0. (hmm...) cheers.

greg-minshall commented 3 years ago

i suppose this might be from these lines in names.el

      (let ((it (names--get-edebug-spec function))
            (names--verbose (eq function 'push)))

but, as the help string for push says

This is morally equivalent to (setf PLACE (cons NEWELT PLACE)),
except that PLACE is evaluated only once (after NEWELT).

presumably, one can substitute the latter for the former (assuming evaluating PLACE has no side-effects).