all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Checking for core-symbols?
Date: Tue, 6 Dec 2016 14:35:27 +0100	[thread overview]
Message-ID: <11cece5c-ef6d-532f-7aea-b2c36d8a2ea1@easy-emacs.de> (raw)

Hi,

translated a library of math-symbols WRT convenient inserts by their name.
Basically went fine, howeverEmacs got unusable after evaluating the result.

The reason have been some symbols like "and" and "or", which occur in 
math but also in Emacs Lisp.
These got re-defined...

Question: what about preventing such things from inside eval?

The checker below was able to detect the conflicting stuff:

(defun not-permitted ()
   "Check if symbols are used as functions or special forms. "
   (interactive)
   (while
       (and
        (prog1
        (re-search-forward "(defun [^ ]+" nil t 1)
      (forward-char -1))
        (let ((erg (car (read-from-string (thing-at-point 'symbol)))))
      (not (or
            (special-form-p erg)
            (functionp erg)))))))

Maybe such option/utility exists?

Cheers,
Andreas



             reply	other threads:[~2016-12-06 13:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 13:35 Andreas Röhler [this message]
2016-12-06 14:24 ` Checking for core-symbols? 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

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

  git send-email \
    --in-reply-to=11cece5c-ef6d-532f-7aea-b2c36d8a2ea1@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=help-gnu-emacs@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 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.