From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.help Subject: Checking for core-symbols? Date: Tue, 6 Dec 2016 14:35:27 +0100 Message-ID: <11cece5c-ef6d-532f-7aea-b2c36d8a2ea1@easy-emacs.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1481030812 30625 195.159.176.226 (6 Dec 2016 13:26:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Dec 2016 13:26:52 +0000 (UTC) User-Agent: MozillpoN„0 (X11; Linux i686; rv:45.0) Gecko/20100101 Icedove/45.4.0 To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 06 14:26:49 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEFlg-0007ME-KU for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Dec 2016 14:26:48 +0100 Original-Received: from localhost ([::1]:60064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEFlk-0003GK-GX for geh-help-gnu-emacs@m.gmane.org; Tue, 06 Dec 2016 08:26:52 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEFlG-0003D0-S9 for help-gnu-emacs@gnu.org; Tue, 06 Dec 2016 08:26:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEFlC-0008Do-Un for help-gnu-emacs@gnu.org; Tue, 06 Dec 2016 08:26:22 -0500 Original-Received: from mout.kundenserver.de ([212.227.126.187]:63395) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cEFlC-0008D5-K2 for help-gnu-emacs@gnu.org; Tue, 06 Dec 2016 08:26:18 -0500 Original-Received: from [192.168.178.35] ([77.12.18.234]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.167]) with ESMTPSA (Nemesis) id 0MAyoK-1cLuip1b2S-009wg7 for ; Tue, 06 Dec 2016 14:26:15 +0100 X-Provags-ID: V03:K0:BO+ok2ZSiRoKqjQQ1NEoHjT0UIqhEVIFLVK+T9K2axDpqQKTZKP 83SgAjtIAQzxvNidCLx1+AFjU3qFg8jj4a0/sGoJXcEWVb4ZUFCa/7fNtV1Zi8ch/A3Y/9f BWEIX+zUdRji4BBrT2SluFQpuAb7ENtWcBMR7icAgtugpMwxtlu+W7bqzODZBZLS0dDd9br TAMuyQv/acBNK/jSlkVXA== X-UI-Out-Filterresults: notjunk:1;V01:K0:pSXXF+1vpVA=:C8iJA8gcfaeLUbOrNtQCfd i+9bECW9ZAxHvSsONJ6lPBFfdrBfYQp085C4sOPBpEfLBqFOqFKUac9om+tpoG2OYr9dspPuZ fqp333hap3MYH/sV9DIic3ijW4tR8yAAfqIqC47UJVit7JDUq0IS3i6MmSiYHE+MKBxEidAp1 kAyI+dyEIdmtoJvb2ImqldbhmNwWV1hOu4GsoBZw8u01CgPtacoOPvcH+NjzZ4plFJOFO8pO7 J9UXciI5gCUFxeRkk279FgnMsxYYhJwAKKnm3kVS8c+xkKBARNhVx5Nt6oMJaWMIhHAm8eqT0 ih50lhYKkyNjT0BgwUxbor3Vov811dzwQFacdnmgzCob7ljWtv4jg9l88Z/mTrdq6WwcOaBkH 3bHEk1dQX8ovduaRFgVs+HQQjeexCssZdZ7RRmY/0i1jRHdu6gB9lSDPLtcxcfrOy/lUbcNfV XPPPieJbUCBNWRVW2LF0W95VHAS8E2UzCb8taqrQjw9d+ASo90IY0OpLBtBW4CKnIRpNM2ez0 PqJDb7agtovoYk3+JB1Wb7W3NcJ+Hr/LDQtaEYk7UzAzukWZ4e7aP+W1WPo0nEyJZo7IzWVF6 MEVQSRwZRbqOxvr2Dzr6iKFSd/M1kg1IrNKn+LJpedOdGMRfiNgjqOdDjnoIrS+GIXEsx0BJo Yc4erxVdpvRhYzcPOn6qyncsLI3D8cwxFz/Rr5h6zroPWbuusanAGqPq6pQCuy+qlFTqfHTfw Ko6id66/6Z+Uxajj X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.187 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111877 Archived-At: 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