[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: debug performance problem

From: Richard Stallman
Subject: Re: debug performance problem
Date: Fri, 14 Dec 2001 23:37:14 -0700 (MST)

Does this replacement function run faster?  I think it ought to.

(defun debugger-make-xrefs (&optional buffer)
  "Create cross-references in the debugger buffer."
  (interactive "b")
    (set-buffer (or buffer (current-buffer)))
    (goto-char (point-min))
    (let ((buffer-read-only nil))
      (while (progn
               (skip-syntax-forward "^w_")
               (not (eobp)))
        (let* ((beg (point))
               (end (progn (skip-syntax-forward "w_") (point)))
               (sym (intern-soft (buffer-substring-no-properties
                                  beg end)))
               (file (and sym (symbol-file sym))))
          (when file
            (goto-char beg)
            ;; help-xref-button needs to operate on something matched
            ;; by a regexp, so set that up for it.
            (re-search-forward "\\(\\(\\sw\\|\\s_\\)+\\)")
            (help-xref-button 1 'help-function-def sym file)))))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]