From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: goto-line trouble with narrowing
Date: Tue, 31 Jan 2006 12:53:41 -0700 [thread overview]
Message-ID: <drof87$9gd$1@sea.gmane.org> (raw)
In-Reply-To: <yoijvew132vp.fsf@linus002.dd.chalmers.se>
Johan Bockgård wrote:
> Kevin Rodgers <ihs_4664@yahoo.com> 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]
Thanks Johan, but you'll have to fill me in on a few details
since I can't read Emacs Lisp byte code. Nor do I understand
why your example is relevant; isn't this what `flet' sets `widen's
symbol binding to:
(byte-compile (lambda () t)) => #[nil "\300\207" [t] 1]
--
Kevin Rodgers
next prev parent reply other threads:[~2006-01-31 19:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-26 17:01 goto-line trouble with narrowing Robert J. Chassell
2006-01-27 22:32 ` Richard M. Stallman
2006-01-28 19:14 ` Robert J. Chassell
2006-01-30 0:56 ` Richard M. Stallman
2006-01-30 16:57 ` Kevin Rodgers
2006-01-30 18:48 ` Kevin Rodgers
2006-01-30 19:57 ` Johan Bockgård
2006-01-31 19:53 ` Kevin Rodgers [this message]
2006-02-01 7:52 ` Johan Bockgård
2006-01-30 22:31 ` Lennart Borgman
2006-01-31 18:06 ` Richard M. Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='drof87$9gd$1@sea.gmane.org' \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).