emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: goto-line trouble with narrowing


From: Kevin Rodgers
Subject: Re: goto-line trouble with narrowing
Date: Mon, 30 Jan 2006 11:48:11 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

> goto-line already takes a prefix arg to mean a different buffer,
> which is useful in the resulting *Shell Command Output* buffer, so I
> guess I need to roll my own goto-line-in-narrowed-buffer command that
> just omits the call to (widen).  :-(

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))))

Thanks,
--
Kevin Rodgers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]