unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Addressing confusion over uninterned symbols
@ 2021-04-12 22:20 Matt Armstrong
  2021-04-14 23:06 ` Matt Armstrong
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Armstrong @ 2021-04-12 22:20 UTC (permalink / raw)
  To: emacs-devel

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

Recently I came to realize that I have been routinely confused by Emacs
macros that don't use 'gensym' or some equivalent.  I have long taken a
liking to running commands like emacs-lisp-macroexpand to debug my use
of macros, but tend to get confused when the macros use merely
'make-symbol' instead of 'gensym'.  I regularly run into situations
where the uninterned symbols introduced by the macros aren't distinct
from my own code.  I also tend to expand macros and edebug the result,
which often breaks unless `print-gensym' and `print-circle' are set,
which is inconvenient and annoying.

So, two questions.

First, would patches to switch some of the lower level Emacs macros to
'gensym' be welcome?  I'm thinking of those in macroexp.el itself.  Or,
are there reasons for those macros to continue to use plain old
'make-symbol'?

Second, is there any interest in the package I wrote to effectively call
hack a call to 'gensym' on behalf of all macros that don't appear to
have done so themselves, where needed.  I called it 'hacroexp' and I now
use 'hacroexp-1' instead of 'emacs-lisp-macroexpand', and am generally
happy with the result.  See attached:


[-- Attachment #2: hacroexp.el --]
[-- Type: application/emacs-lisp, Size: 10450 bytes --]

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

end of thread, other threads:[~2021-04-14 23:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 22:20 Addressing confusion over uninterned symbols Matt Armstrong
2021-04-14 23:06 ` Matt Armstrong
2021-04-14 23:16   ` Stefan Monnier

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