all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Checking for core-symbols?
@ 2016-12-06 13:35 Andreas Röhler
  2016-12-06 14:24 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Röhler @ 2016-12-06 13:35 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

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



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

* Re: Checking for core-symbols?
  2016-12-06 13:35 Checking for core-symbols? Andreas Röhler
@ 2016-12-06 14:24 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2016-12-06 14:24 UTC (permalink / raw)
  To: help-gnu-emacs

> Question: what about preventing such things from inside eval?

You don't seem to realize the amazing variety of ways you can shoot
yourself in the foot.


        Stefan




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

end of thread, other threads:[~2016-12-06 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-06 13:35 Checking for core-symbols? Andreas Röhler
2016-12-06 14:24 ` Stefan Monnier

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.