[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#2270: [PATCH] bug#2270, RE: 23.0.90; find-library:... (2) other-wind
From: |
Drew Adams |
Subject: |
bug#2270: [PATCH] bug#2270, RE: 23.0.90; find-library:... (2) other-window version |
Date: |
Wed, 24 Oct 2012 10:41:59 -0700 |
> Sent: Tuesday, February 10, 2009 6:27 PM
>
> > 2. Please add this command (or equivalent), after adjusting its doc
> > string also to explain what LIBRARY is:
>
> After the release, maybe.
Clearly, that upcoming release was many moon ago.
I repeat my suggestion to add command `find-library-other-window'.
I also suggest that it be bound by default to `C-x 4 l'.
I've used this command & key forever, and wouldn't be without it.
(And I rarely have a need anymore for same-window `find-library'.)
---
(defun find-library-other-window (library)
"Find the Emacs-Lisp source of LIBRARY in another window."
(interactive
(progn
(require 'find-func)
(let* ((path (cons (or find-function-source-path load-path)
(find-library-suffixes)))
(def (if (eq (function-called-at-point) 'require)
(save-excursion (backward-up-list)
(forward-char)
(backward-sexp -2)
(thing-at-point 'symbol))
(thing-at-point 'symbol))))
(when def (setq def (and (locate-file-completion def path 'test)
def)))
(list (completing-read "Library name: " 'locate-file-completion
path nil nil nil def)))))
(let ((buf (find-file-noselect (find-library-name library))))
(pop-to-buffer buf 'other-window)))
- bug#2270: [PATCH] bug#2270, RE: 23.0.90; find-library:... (2) other-window version,
Drew Adams <=