From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: how do I know that the buffer is narrowed Date: Thu, 01 Dec 2005 13:12:55 +0100 Organization: Organization?!? Message-ID: <85sltdf22g.fsf@lola.goethe.zz> References: <87vey9kcrk.fsf@thalassa.informatimago.com> <85oe41hgvq.fsf@lola.goethe.zz> <86mzjlt5nm.fsf@flame.pc> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1133442786 24873 80.91.229.2 (1 Dec 2005 13:13:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 1 Dec 2005 13:13:06 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 01 14:13:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EhoD2-0004z7-Gy for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Dec 2005 14:10:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EhoD1-0003LD-Iz for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Dec 2005 08:10:47 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!newsfeed.arcor.de!news.arcor.de!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:lwHbHnfsuSR0yCBSL1SCDqehWTk= Original-Lines: 25 Original-NNTP-Posting-Date: 01 Dec 2005 13:12:45 MET Original-NNTP-Posting-Host: 9764ee15.newsread4.arcor-online.net Original-X-Trace: DXC=VfS3Vb@U>dKndh]; 1CKbgL:ejgIfPPldDjW\KbG]kaMHFYk:AnJB[CMBV0V`Oh[IVO1_LiI6ENVaM3>5MOK`B`l2B Original-X-Complaints-To: usenet-abuse@arcor.de Original-Xref: shelby.stanford.edu gnu.emacs.help:135959 Original-To: help-gnu-emacs@gnu.org 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:31566 Archived-At: Giorgos Keramidas writes: > On Thu, 01 Dec 2005 00:10:01 +0100, David Kastrup wrote: >> bojohan+news@dd.chalmers.se (Johan Bockgård) writes: >>>> (defun narrowedp () >>>> (not (equal (list (point-min) (point-max)) >>>> (save-restriction (widen) (list (point-min) (point-max)))))) >>> >>> >>> (not (and (= (point-min) 1) >>> (= (point-max) (1+ (buffer-size))))) >> >> (<(-(point-max)(point-min))(buffer-size)) > > Pfeh! Is there any good reason to obfuscate the beautiful: > > (not (and (= (point-min) 1) > (= (point-max) (1+ (buffer-size))))) > > *and* remove all its spaces? :) It is impolite to let your parens do more work than necessary. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum