From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: how to add button to emacs that play a elisp code Date: Sun, 14 Sep 2014 20:11:29 +0200 Organization: Aioe.org NNTP Server Message-ID: <87r3zehy26.fsf@debian.uxu> References: <04dd6007-693a-4e56-9e2a-e930e51a9563@googlegroups.com> <21521.22678.640570.26495@mail.eng.it> <21521.24551.904371.551048@mail.eng.it> <21521.37886.262510.961741@mail.eng.it> <87vbotx3ht.fsf@debian.uxu> <87ioktn2qp.fsf@kuiper.lan.informatimago.com> <87d2b1vh2w.fsf@debian.uxu> <878ulnmcqb.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1410718528 26084 80.91.229.3 (14 Sep 2014 18:15:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Sep 2014 18:15:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Sep 14 20:15:21 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XTEKX-0007qT-MX for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Sep 2014 20:15:21 +0200 Original-Received: from localhost ([::1]:55652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTEKX-0001ba-42 for geh-help-gnu-emacs@m.gmane.org; Sun, 14 Sep 2014 14:15:21 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 79 Original-NNTP-Posting-Host: P0uMB9BthHuWo8+BJXB4Mw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:UUtruUyTWVvc+bE4XQqc5Aew4gg= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:207608 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:99882 Archived-At: "Pascal J. Bourguignon" writes: > No. That's the point. I'm using clhs definition of > same(2), since elisp info doesn't provide a glossary. (Hint. This message will be more pleasant to read in Emacs-Lisp mode because of the `font-lock-constant-face' and `font-lock-comment-face'.) ;; Here are the ways I know of to determine equality. ;; I didn't include = as that doesn't work on lists ;; (if I had, I might as well have included ;; `string-equal'/`string='). ;; Feel free to provide any additional ways that may ;; exist. ;; When I wrote "same", I did it informally. Even so, ;; I appreciate defining that according to the ;; scientific method. ;; OK: ;; 1. evaluation (list 1 2 3) ; (1 2 3) '(1 2 3) ; (1 2 3) (setq ll (list 1 2 3)) (setq lq '(1 2 3)) ;; 2. eq (eq ll lq) ; nil; but, on the other hand: (eq (list 1 2 3) (list 1 2 3)) ; nil (eq '(1 2 3) '(1 2 3)) ; nil ;; 3. eql (eql ll lq) ; nil; but, again: (eql (list 1 2 3) (list 1 2 3)) ; nil (eql '(1 2 3) '(1 2 3)) ; nil ;; 4. equal (equal ll lq) ; t (equal (list 1 2 3) (list 1 2 3)) ; t (equal '(1 2 3) '(1 2 3)) ; t (equal (list 1 2 3) '(1 2 3)) ; t ;; Fallout: ;; It is the same according to evaluation. It is not ;; the same according to `eq' and `eql'; on the other ;; hand those don't report the same even for identical ;; data, which humans intuitively consider the same. ;; It is the same according to `equal' (which also ;; report the same for identical data; i.e., is closer ;; than `eq' and `eql' to the way humans think). ;; Conclusion: ;; 1. According to the computer, it is not always the ;; same, but as often, it is. ;; 2. It is the same when using methods that (in other ;; cases as well) correspond more closely to the ;; way humans think. ;; 3. Because I used the word like a human, one would ;; think I used it correctly because of (2). But, ;; because I used it in the context of computers, ;; because of (1), I'll settle for a draw. ;; :) -- underground experts united