From: Vinicius Jose Latorre <viniciusjl@ig.com.br>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: [seano@cs.ucla.edu: patch: default argument for find-library]
Date: Wed, 31 Oct 2007 10:52:39 -0300 [thread overview]
Message-ID: <472888A7.9090705@ig.com.br> (raw)
In-Reply-To: <E1In8I0-0000RJ-BL@fencepost.gnu.org>
Richard Stallman wrote:
> Would someone please install this, then ack?
>
Done in trunk and emacs_22_branch.
> ------- Start of forwarded message -------
> X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY
> autolearn=failed version=3.1.0
> To: emacs-devel@gnu.org
> From: "Sean O'Rourke" <seano@cs.ucla.edu>
> Date: Mon, 22 Oct 2007 23:19:41 -0700
> MIME-Version: 1.0
> Content-Type: multipart/mixed; boundary="=-=-="
> Subject: patch: default argument for find-library
>
> - --=-=-=
>
> This patch uses the library name at point as the interactive
> default to `find-library' -- `find-variable' and `find-function'
> already have analogous defaults.
>
> /s
>
> 2007-10-22 Sean O'Rourke <sorourke@cs.ucsd.edu>
>
> * emacs-lisp/find-func.el (find-library): use library at
> point as default interactive argument.
>
>
> - --=-=-=
> Content-Type: text/x-patch
> Content-Disposition: attachment
>
> Index: find-func.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/find-func.el,v
> retrieving revision 1.82
> diff -p -u -w -r1.82 find-func.el
> - --- find-func.el 17 Oct 2007 23:49:00 -0000 1.82
> +++ find-func.el 23 Oct 2007 06:17:37 -0000
> @@ -192,11 +192,21 @@ TYPE should be nil to find a function, o
> (defun find-library (library)
> "Find the elisp source of LIBRARY."
> (interactive
> + (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
> - - (cons (or find-function-source-path load-path)
> - - (find-library-suffixes)))))
> + (completing-read (if def (format "Library name (default %s): " def)
> + "Library name: ")
> + 'locate-file-completion path nil nil nil def))))
> (let ((buf (find-file-noselect (find-library-name library))))
> (condition-case nil (switch-to-buffer buf) (error (pop-to-buffer buf)))))
>
>
> - --=-=-=
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
> - --=-=-=--
> ------- End of forwarded message -------
>
prev parent reply other threads:[~2007-10-31 13:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-31 7:47 [seano@cs.ucla.edu: patch: default argument for find-library] Richard Stallman
2007-10-31 13:52 ` Vinicius Jose Latorre [this message]
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=472888A7.9090705@ig.com.br \
--to=viniciusjl@ig.com.br \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
/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).