From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Case Newsgroups: gmane.emacs.help Subject: Tutorial question re conventions or usage ?? Date: Tue, 01 May 2007 13:44:18 -0400 Message-ID: <1178041458.3157.37.camel@CASE> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1178041453 31771 80.91.229.12 (1 May 2007 17:44:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 1 May 2007 17:44:13 +0000 (UTC) To: EMACS List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 01 19:44:12 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HiwOY-0006GQ-3s for geh-help-gnu-emacs@m.gmane.org; Tue, 01 May 2007 19:44:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HiwUr-0004Aa-K6 for geh-help-gnu-emacs@m.gmane.org; Tue, 01 May 2007 13:50:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HiwUg-0004AH-Q2 for help-gnu-emacs@gnu.org; Tue, 01 May 2007 13:50:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HiwUg-0004A5-Aa for help-gnu-emacs@gnu.org; Tue, 01 May 2007 13:50:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HiwUg-0004A2-7s for help-gnu-emacs@gnu.org; Tue, 01 May 2007 13:50:30 -0400 Original-Received: from smtp103.rog.mail.re2.yahoo.com ([206.190.36.81]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HiwOL-0004a4-SL for help-gnu-emacs@gnu.org; Tue, 01 May 2007 13:43:58 -0400 Original-Received: (qmail 12013 invoked from network); 1 May 2007 17:43:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:Subject:From:To:Content-Type:Date:Message-Id:Mime-Version:X-Mailer:Content-Transfer-Encoding; b=rhQXWqkPkGeZ4tnFs+0rSOJd0dtr+gXE9MGcSY/gMeNQJPz47meQldAkfhBSDdtgSWGXw6b7OkzAg1Nd5CqNvWv/UJaNQt6znMLFkw9c+ASSPP0BhVPmJHkKJoHAZJoj1IgkNyIWwSD3I7LQba52fOaFz8huCHCO/DujvPNR89I= ; Original-Received: from unknown (HELO ?192.168.1.4?) (billlinux@rogers.com@74.104.51.86 with plain) by smtp103.rog.mail.re2.yahoo.com with SMTP; 1 May 2007 17:43:57 -0000 X-YMail-OSG: yRJa.uYVM1lK9NKYCMQWGS8tq1anbl6JtNTFnC7T3Hm1HRj29aCrv9ftCDP__izQdw-- X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) X-detected-kernel: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:43442 Archived-At: Hi; I am working my way through the Lisp tutorial. I have come across the following example for the 'beginning-of-buffer' function: I can understand the Lisp in this code; the question is about normal practises when writing similar code. ... (if (> (buffer-size) 10000) ;; Avoid overflow for large buffer sizes! (* (prefix-numeric-value arg) (/ (buffer-size) 10)) (/ (+ 10 (* (buffer-size) (prefix-numeric-value arg))) ... In this code the writer has reduced the numbers by a factor of 10 in order, it seems, to get the user to supply a one digit prefix that none-the-less ends up being a percentage. Is this a convention in emacs or the writer's one time personal choice? It seems intuitive to me (and easier to follow the code) if it had been written as a percentage from the beginning and doing any factoring by 100. Should I always be looking for ways to make prefix numbers a single digit? Does it matter? Is there any gain or loss by using a longer or short prefix digits? -- Regards Bill