[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: how about a find-library-other-window command?
From: |
Drew Adams |
Subject: |
RE: how about a find-library-other-window command? |
Date: |
Wed, 20 Jun 2007 09:49:32 -0700 |
> How about a `find-library-other-window' command?
>
> Sure. Would you like to send a patch and change log entry?
> Please include a patch for etc/NEWS.
>
> The ideas for changing C-x 4 may be worth investigating,
> but please do this now.
Not sure if this is what you need. Can someone tell me the easiest way to
generate this on Windows (I have Cygwin `diff')? I downloaded the latest
version of NEWS.22 and find-func.el at
http://cvs.savannah.gnu.org/viewvc/emacs/emacs/, made some changes, used
`diff', and then copy+pasted the `diff' output here. Are there already
instructions for that somewhere? Where do I find the proper format and
content for a change-log entry?
----------------------8<--------------------------
2007-06-20 Drew Adams <address@hidden>
*find-func.el (find-library-other-frame)
(find-library-other-window): New commands.
----------------------8<--------------------------
diff -c c\:/drews-lisp-20/cvs-lisp/NEWS.22
c\:/drews-lisp-20/cvs-lisp/NEWS-patched.22
*** c:/drews-lisp-20/cvs-lisp/NEWS.22 Wed Jun 20 08:43:46 2007
--- c:/drews-lisp-20/cvs-lisp/NEWS-patched.22 Wed Jun 20 08:49:00 2007
***************
*** 1495,1500 ****
--- 1495,1506 ----
*** New option `ebnf-arrow-scale' which specify the arrow scale.
Values lower than 1.0, shrink the arrow.
Values greater than 1.0, expand the arrow.
+
+ ** find-func changes:
+
+ *** New commands `find-library-other-window' and
`find-library-other-frame'
+ Same as `find-library', except the library is visited in a different
+ window or frame, respectively.
* New Modes and Packages in Emacs 22.1
----------------------8<--------------------------
diff -c c\:/drews-lisp-20/cvs-lisp/find-func-CVS-2007-06-20.el
c\:/drews-lisp-20/cvs-lisp/find-func-patched-2007-06-20.el
*** c:/drews-lisp-20/cvs-lisp/find-func-CVS-2007-06-20.el Wed Jun 20
08:16:04 2007
--- c:/drews-lisp-20/cvs-lisp/find-func-patched-2007-06-20.el Wed Jun 20
08:41:22 2007
***************
*** 203,208 ****
--- 203,234 ----
(condition-case nil (switch-to-buffer buf) (error (pop-to-buffer
buf)))))
;;;###autoload
+ (defun find-library-other-window (library)
+ "Find the elisp source of LIBRARY in another window."
+ (interactive
+ (list
+ (completing-read "Library name: "
+ 'locate-file-completion
+ (cons (or find-function-source-path load-path)
+ (find-library-suffixes)))))
+ (let ((buf (find-file-noselect (find-library-name library))))
+ (condition-case nil (switch-to-buffer-other-window buf)
+ (error (pop-to-buffer buf)))))
+
+ ;;;###autoload
+ (defun find-library-other-frame (library)
+ "Find the elisp source of LIBRARY in another frame."
+ (interactive
+ (list
+ (completing-read "Library name: "
+ 'locate-file-completion
+ (cons (or find-function-source-path load-path)
+ (find-library-suffixes)))))
+ (let ((buf (find-file-noselect (find-library-name library))))
+ (condition-case nil (switch-to-buffer-other-frame buf)
+ (error (pop-to-buffer buf)))))
+
+ ;;;###autoload
(defun find-function-search-for-symbol (symbol type library)
"Search for SYMBOL's definition of type TYPE in LIBRARY.
Visit the library in a buffer, and return a cons cell (BUFFER . POSITION),
Re: how about a find-library-other-window command?, Davis Herring, 2007/06/19
Re: how about a find-library-other-window command?, Richard Stallman, 2007/06/20
Re: how about a find-library-other-window command?, Richard Stallman, 2007/06/20