From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: DocView AutoFitting via "doc-view-autofit-mode" Date: Mon, 2 Apr 2012 11:37:27 -0700 Message-ID: <471DCFCA4EBC4643BDE6B942ADCF2ED8@us.oracle.com> References: <4F764EBB.5030102@googlemail.com> <87sjgnbxth.fsf@thinkpad.tsdh.de> <4F79E8D5.8080701@googlemail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1333391864 16143 80.91.229.3 (2 Apr 2012 18:37:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2012 18:37:44 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Moritz Maxeiner'" , "'Tassilo Horn'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 02 20:37:43 2012 Return-path: Envelope-to: ged-emacs-devel@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 1SEm8M-0008VF-JF for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2012 20:37:42 +0200 Original-Received: from localhost ([::1]:33093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEm8L-0004lS-Sj for ged-emacs-devel@m.gmane.org; Mon, 02 Apr 2012 14:37:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEm8I-0004kk-B5 for emacs-devel@gnu.org; Mon, 02 Apr 2012 14:37:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEm8G-0007Il-Gr for emacs-devel@gnu.org; Mon, 02 Apr 2012 14:37:37 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:25731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEm8G-0007Id-A8 for emacs-devel@gnu.org; Mon, 02 Apr 2012 14:37:36 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q32IbVD9009605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 2 Apr 2012 18:37:31 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q32IbTeE003120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Apr 2012 18:37:30 GMT Original-Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q32IbSj1011843; Mon, 2 Apr 2012 13:37:28 -0500 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 02 Apr 2012 11:37:28 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <4F79E8D5.8080701@googlemail.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 thread-index: Ac0Q+kucqTgjIT8xRCCAqH3YFrLNvwAAxgSA X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-CT-RefId: str=0001.0A090201.4F79F1EC.005D,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:149297 Archived-At: > > Compare symbols with `eq' > > Done, but any specific reason for that? `equal's doc-string > states that symbols must match exactly, > so in the specific event of symbols, don't equal and eq > behave the same? My take on this minor part of your post: 1. Yes, for a symbol, equal and eq act the same. (Depending on the implementation there could be a teeny tiny difference in performance.) 2. I use eq for symbol comparison if either (a) the code is sure that both args are symbols or (b) I want it to behave as if it were sure (e.g. raise an error if either is not a symbol). #2 means that the source code indicates my intention. If a human reader sees eq then s?he knows that the code is expecting a symbol and will raise an error if the expectation is not satisfied. If s?he sees equal she can expect that (a) the code might not be sure to receive symbols as both args and (b) the code wants to return non-nil for any two equal objects. IOW, my use of equal vs eq for expected symbol args is more about what happens if either of the args is for some reason _not_ a symbol.