From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.devel Subject: Re: goto-line trouble with narrowing Date: Mon, 30 Jan 2006 20:57:30 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1138651134 8245 80.91.229.2 (30 Jan 2006 19:58:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2006 19:58:54 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 30 20:58:50 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F3fAh-00085G-A0 for ged-emacs-devel@m.gmane.org; Mon, 30 Jan 2006 20:58:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F3fDf-0003Kg-JY for ged-emacs-devel@m.gmane.org; Mon, 30 Jan 2006 15:01:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F3fDG-0003HS-Q3 for emacs-devel@gnu.org; Mon, 30 Jan 2006 15:01:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F3fDE-0003GN-Tb for emacs-devel@gnu.org; Mon, 30 Jan 2006 15:01:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F3fDE-0003GK-PG for emacs-devel@gnu.org; Mon, 30 Jan 2006 15:01:20 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1F3fBa-0000jq-PV for emacs-devel@gnu.org; Mon, 30 Jan 2006 14:59:39 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1F3f9y-0007tQ-NR for emacs-devel@gnu.org; Mon, 30 Jan 2006 20:58:00 +0100 Original-Received: from linus002.dd.chalmers.se ([129.16.117.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Jan 2006 20:57:58 +0100 Original-Received: from bojohan+news by linus002.dd.chalmers.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 30 Jan 2006 20:57:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-To: emacs-devel@gnu.org Original-Lines: 22 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: linus002.dd.chalmers.se Mail-Copies-To: never User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:lyln9fmlWXqgNvKqkr3P0auYn/Q= 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:49789 Archived-At: Kevin Rodgers writes: > OK, can anyone explain why this doesn't work: > > (eval-when-compile > (require 'cl-macs)) ; flet > > (defun goto-line-in-narrowed-buffer (&rest args) > "Like `goto-line', but count from line 1 of the accessible part of > the buffer." > (interactive) > (flet ((widen () t)) > (if (interactive-p) > (let ((prefix-arg current-prefix-arg)) > (call-interactively 'goto-line)) > (apply 'goto-line args)))) (byte-compile (lambda () (widen))) => #[nil "~\207" [] 1] -- Johan Bockgård