unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Following links in *Help* do not add files to file-name-history
@ 2006-10-12 10:33 Slawomir Nowaczyk
  2006-10-12 14:52 ` Stefan Monnier
  2006-10-12 22:38 ` Richard Stallman
  0 siblings, 2 replies; 3+ messages in thread
From: Slawomir Nowaczyk @ 2006-10-12 10:33 UTC (permalink / raw)


Hello,

Following link to source file in *Help* buffers (like C-h f lambda TAB
RET) visits the file correctly, but does not add visited file to the
file-name-history.

I think it should.

The following patch seems to work for me:

********************************************************************************

--- EmacsCVS/lisp/help-mode.el      2006-08-11 12:45:35.727585600 +0200
+++ Emacs/lisp/help-mode.el  2006-10-12 12:31:13.512827200 +0200
@@ -157,6 +157,7 @@
                   (let ((location
                          (find-function-search-for-symbol fun nil file)))
                     (pop-to-buffer (car location))
+                     (add-to-history 'file-name-history (buffer-file-name (car location)))
                     (if (cdr location)
                         (goto-char (cdr location))
                       (message "Unable to find location in file"))))
@@ -169,6 +170,7 @@
                     (setq file (help-C-file-name var 'var)))
                   (let ((location (find-variable-noselect var file)))
                     (pop-to-buffer (car location))
+                     (add-to-history 'file-name-history (buffer-file-name (car location)))
                     (if (cdr location)
                       (goto-char (cdr location))
                       (message "Unable to find location in file"))))
@@ -183,6 +185,7 @@
                   (let ((location
                          (find-function-search-for-symbol fun 'defface file)))
                     (pop-to-buffer (car location))
+                     (add-to-history 'file-name-history (buffer-file-name (car location)))
                     (if (cdr location)
                         (goto-char (cdr location))
                       (message "Unable to find location in file"))))

********************************************************************************

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( slawomir.nowaczyk.847@student.lu.se )

There are 3 kinds of people:  those who can count & those who can't.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Following links in *Help* do not add files to file-name-history
  2006-10-12 10:33 Following links in *Help* do not add files to file-name-history Slawomir Nowaczyk
@ 2006-10-12 14:52 ` Stefan Monnier
  2006-10-12 22:38 ` Richard Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2006-10-12 14:52 UTC (permalink / raw)
  Cc: emacs-devel

>                      (pop-to-buffer (car location))
> +                     (add-to-history 'file-name-history (buffer-file-name (car location)))

pop-to-buffer selects the buffer, so you just need the `buffer-file-name'
variable rather than the function.


        Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Following links in *Help* do not add files to file-name-history
  2006-10-12 10:33 Following links in *Help* do not add files to file-name-history Slawomir Nowaczyk
  2006-10-12 14:52 ` Stefan Monnier
@ 2006-10-12 22:38 ` Richard Stallman
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2006-10-12 22:38 UTC (permalink / raw)
  Cc: emacs-devel

    Following link to source file in *Help* buffers (like C-h f lambda TAB
    RET) visits the file correctly, but does not add visited file to the
    file-name-history.

That seems correct to me.  file-name-history is the history list
of file names entered as argument.

It has no definition; I will give it one.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-10-12 22:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-12 10:33 Following links in *Help* do not add files to file-name-history Slawomir Nowaczyk
2006-10-12 14:52 ` Stefan Monnier
2006-10-12 22:38 ` Richard Stallman

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