Path: utzoo!utgpu!water!watmath!clyde!cbosgd!mandrill!hal!ncoast!axcess!allbery From: allbery@axcess.UUCP (Brandon S. Allbery) Newsgroups: comp.emacs Subject: Re: Is there a cleaner way to check for a narrowed buffer? Summary: Won't work: my region is from the beginning to the middle of the buffer! Keywords: GNU Emacs narrow-to-region Message-ID: <141@axcess.UUCP> Date: 24 Jan 88 12:37:47 GMT References: <138@axcess.UUCP> <2336@bloom-beacon.MIT.EDU> Organization: aXcess Company, Mentor, Ohio Lines: 22 In article <2336@bloom-beacon.MIT.EDU>, wolfgang@mgm.mit.edu (Wolfgang Rupprecht) writes: +--------------- | In article <138@axcess.UUCP> allbery@axcess.UUCP (Brandon S. Allbery) writes: | >I have a function which wants to narrow the current buffer to a region if | >it is not already narrowed. [...] but why isn't | >some special function provided ( (narrowp) or something ) to do this? | | (defun narowp () | "Return t if buffer is narrowed." | (/= 1 (point-min))) +--------------- Nice try, but if you've seen my Yacc/Bison mode for Emacs, you might notice that the first thing it does is narrow to the first two sections of a file (i.e. make the pure C code at the end of the file invisible). So (point-min) will return 1 regardless. -- ___ ________________, Brandon S. Allbery cbosgd \ ' \/ __ __, __, aXcess Company mandrill| __ | /__> <__ <__ 6615 Center St. #A1-105 !ncoast! / ` | \__. .__> .__> Mentor, OH 44060-4101 necntc | axcess!allbery \___/\________________. Moderator, comp.sources.misc hoptoad/