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: widen-one-level [was: Emacs's handling of line numbers] Date: Sun, 18 Apr 2010 19:04:28 -0700 Message-ID: References: <837ho6czb6.fsf@gnu.org> <8339yucbsg.fsf@gnu.org> <83wrw5bxkc.fsf@gnu.org><90D3EB66AA37491881EB2B26100925C2@us.oracle.com><7DAA22BBC7FD45D9996D3EE994E01C16@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1271642742 18046 80.91.229.12 (19 Apr 2010 02:05:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 19 Apr 2010 02:05:42 +0000 (UTC) To: "'Leo'" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 19 04:05:41 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gMm-0005zG-Gf for ged-emacs-devel@m.gmane.org; Mon, 19 Apr 2010 04:05:40 +0200 Original-Received: from localhost ([127.0.0.1]:36482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3gMm-0005UP-27 for ged-emacs-devel@m.gmane.org; Sun, 18 Apr 2010 22:05:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3gMh-0005UK-HP for emacs-devel@gnu.org; Sun, 18 Apr 2010 22:05:35 -0400 Original-Received: from [140.186.70.92] (port=39005 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3gMf-0005UC-Ap for emacs-devel@gnu.org; Sun, 18 Apr 2010 22:05:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3gMd-0004C2-Dv for emacs-devel@gnu.org; Sun, 18 Apr 2010 22:05:33 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:36059) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3gMd-0004Bo-5n for emacs-devel@gnu.org; Sun, 18 Apr 2010 22:05:31 -0400 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J25OfR031266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 19 Apr 2010 02:05:26 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o3J04taG006458; Mon, 19 Apr 2010 02:05:24 GMT Original-Received: from abhmt006.oracle.com by acsmt354.oracle.com with ESMTP id 185929811271642649; Sun, 18 Apr 2010 19:04:09 -0700 Original-Received: from dradamslap1 (/10.175.221.180) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 18 Apr 2010 19:04:09 -0700 X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcrfZBGwJ35qUljATpKJRYv9Fv4t+AAADujA In-Reply-To: X-Auth-Type: Internal IP X-Source-IP: rcsinet15.oracle.com [148.87.113.117] X-CT-RefId: str=0001.0A090201.4BCBBA67.0073:SCFMA4539811,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:123863 Archived-At: > > (defadvice narrow-to-region (before push-restriction-stack activate) > > (setq restriction-stack (cons (cons start end) > > restriction-stack)) > > (when (and (= start 1) (= end (1+ (buffer-size)))) > > (setq restriction-stack ()))) > > I also have something similar in my .emacs. I wonder if you > noticed this > problem. After advising narrow-to-region, preloaded functions such as > narrow-to-page narrow-to-defun still use the original narrow-to-region > ignoring the advice. Yes, I noticed that too. Presumably it's because `narrow-to-region' has its own byte code. At least that's my guess. `narrow-to-defun' is a lisp function, and it is byte-compiled, which presumably means the byte-code for `narrow-to-region' is inlined. Or something like that. Someone more knowledgable will no doubt enlighten us.