unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Matt Armstrong <matt@rfc20.org>
To: emacs-devel@gnu.org
Subject: Addressing confusion over uninterned symbols
Date: Mon, 12 Apr 2021 15:20:07 -0700	[thread overview]
Message-ID: <87tuob402w.fsf@rfc20.org> (raw)

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

             reply	other threads:[~2021-04-12 22:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 22:20 Matt Armstrong [this message]
2021-04-14 23:06 ` Addressing confusion over uninterned symbols Matt Armstrong
2021-04-14 23:16   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tuob402w.fsf@rfc20.org \
    --to=matt@rfc20.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).