all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: 13154@debbugs.gnu.org
Subject: bug#13154: 24.3.50; emacs_backtrace.txt (different one)
Date: Fri, 14 Dec 2012 07:25:31 -0800	[thread overview]
Message-ID: <19E7C0932A0E4AF6B1112555E90966E3@us.oracle.com> (raw)
In-Reply-To: <838v91nkgn.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]

> > * I found an occurrence in my version of 
> > `describe-function', which is based on the vanilla
> > Emacs 22 version in this respect.  It has to work for 22+,
> > and 22 does not have macro `with-help-window'.
> 
> We are looking for Lisp code that would show calls to some primitives,
> wherein we could look for potential bugs on the C level.  Does the
> body of Lisp code inside save-excursion in the first occurrence call
> any primitives, or any functions at all?  If so, can you show that
> body?

The code is attached.  Clearly the body calls "any functions at all".  HTH.

[-- Attachment #2: throw-helpfns.el --]
[-- Type: application/octet-stream, Size: 2263 bytes --]

;; REPLACE ORIGINAL in `help-fns.el':
;;
;; 1. Preferred candidate is `symbol-nearest-point'.
;; 2. With a prefix argument, candidates are commands only.
;; 3. No no-function message if not called interactively.
;;
;;;###autoload
(defun describe-function (function &optional commandp)
  "Display the full documentation of FUNCTION (a symbol).
FUNCTION names an Emacs Lisp function, possibly a user command.
With a prefix argument, candidates are commands (interactive) only.
Default candidate is: preferably the `symbol-nearest-point', or else
the innermost function call surrounding point
\(`function-called-at-point').
Return the description that was displayed, as a string."
  (interactive
   (let ((fn                            (or (and (fboundp 'symbol-nearest-point)
                                                 (symbol-nearest-point))
                                            (function-called-at-point)))
         (enable-recursive-minibuffers  t)
         (completion-annotate-function  (lambda (fn)
                                          (and (commandp (intern-soft fn))  "  (command)")))
         val)
     (setq val  (completing-read (if current-prefix-arg "Describe command: " "Describe function: ")
                                 obarray (if current-prefix-arg 'commandp 'fboundp) t nil nil
                                 (and fn  (symbol-name fn))))
     (list (if (equal val "") fn (intern val)) current-prefix-arg)))
  (if (not function)
      (when (interactive-p) (message "You did not specify a function"))
    (unless (or (not commandp)  (commandp function))
      (error "Not a defined Emacs command (interactive function): `%s'" function))
    ;;$$$  (unless (fboundp function) (error "Not a defined Emacs function: `%s'" function))
    (help-setup-xref (list #'describe-function function) (interactive-p))
    (save-excursion
      (with-output-to-temp-buffer (help-buffer)
        (prin1 function)
        ;; Use " is " instead of ": " so it is easier to get the function name using `forward-sexp'.
        (princ " is ")
        (describe-function-1 function)
        (print-help-return-message)
        (with-current-buffer standard-output (buffer-string)))))) ; Return help text.

  parent reply	other threads:[~2012-12-14 15:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12  5:04 bug#13154: 24.3.50; emacs_backtrace.txt (different one) Drew Adams
2012-12-12 16:54 ` Eli Zaretskii
2012-12-12 17:06   ` Drew Adams
2012-12-12 18:52     ` Eli Zaretskii
2012-12-13 10:29       ` martin rudalics
2012-12-13 17:08         ` Eli Zaretskii
2012-12-13 21:16           ` Drew Adams
2012-12-14  7:47             ` Eli Zaretskii
2012-12-14 10:26               ` martin rudalics
2012-12-14 15:51                 ` Drew Adams
2012-12-14 16:13                   ` martin rudalics
2012-12-14 16:18                     ` Drew Adams
2012-12-14 16:35                       ` martin rudalics
2012-12-14 16:46                         ` Drew Adams
2013-02-23  1:13                           ` Glenn Morris
2014-02-10  4:36                             ` Lars Ingebrigtsen
2012-12-14 15:25               ` Drew Adams [this message]
2012-12-14 16:13                 ` martin rudalics
2012-12-14 16:18                   ` Drew Adams
2012-12-14 10:24           ` martin rudalics
2012-12-14 15:27             ` Drew Adams

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19E7C0932A0E4AF6B1112555E90966E3@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=13154@debbugs.gnu.org \
    --cc=eliz@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.