/[emacs]/emacs/lisp/help.el
ViewVC logotype

Diff of /emacs/lisp/help.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.264 by jurta, Tue Apr 27 06:35:25 2004 UTC revision 1.264.2.1 by miles, Sat Sep 4 12:01:07 2004 UTC
# Line 237  C-w Display information on absence of wa Line 237  C-w Display information on absence of wa
237  (defun function-called-at-point ()  (defun function-called-at-point ()
238    "Return a function around point or else called by the list containing point.    "Return a function around point or else called by the list containing point.
239  If that doesn't give a function, return nil."  If that doesn't give a function, return nil."
240    (with-syntax-table emacs-lisp-mode-syntax-table    (or (with-syntax-table emacs-lisp-mode-syntax-table
241      (or (condition-case ()          (or (condition-case ()
242              (save-excursion                  (save-excursion
243                (or (not (zerop (skip-syntax-backward "_w")))                    (or (not (zerop (skip-syntax-backward "_w")))
244                    (eq (char-syntax (following-char)) ?w)                        (eq (char-syntax (following-char)) ?w)
245                    (eq (char-syntax (following-char)) ?_)                        (eq (char-syntax (following-char)) ?_)
246                    (forward-sexp -1))                        (forward-sexp -1))
247                (skip-chars-forward "'")                    (skip-chars-forward "'")
248                (let ((obj (read (current-buffer))))                    (let ((obj (read (current-buffer))))
249                  (and (symbolp obj) (fboundp obj) obj)))                      (and (symbolp obj) (fboundp obj) obj)))
250            (error nil))                (error nil))
251          (condition-case ()              (condition-case ()
252              (save-excursion                  (save-excursion
253                (save-restriction                    (save-restriction
254                  (narrow-to-region (max (point-min)                      (narrow-to-region (max (point-min)
255                                         (- (point) 1000)) (point-max))                                             (- (point) 1000)) (point-max))
256                  ;; Move up to surrounding paren, then after the open.                      ;; Move up to surrounding paren, then after the open.
257                  (backward-up-list 1)                      (backward-up-list 1)
258                  (forward-char 1)                      (forward-char 1)
259                  ;; If there is space here, this is probably something                      ;; If there is space here, this is probably something
260                  ;; other than a real Lisp function call, so ignore it.                      ;; other than a real Lisp function call, so ignore it.
261                  (if (looking-at "[ \t]")                      (if (looking-at "[ \t]")
262                      (error "Probably not a Lisp function call"))                          (error "Probably not a Lisp function call"))
263                  (let ((obj (read (current-buffer))))                      (let ((obj (read (current-buffer))))
264                    (and (symbolp obj) (fboundp obj) obj))))                        (and (symbolp obj) (fboundp obj) obj))))
265            (error nil)))))                (error nil))))
266          (let* ((str (find-tag-default))
267                 (obj (if str (read str))))
268            (and (symbolp obj) (fboundp obj) obj))))
269    
270    
271  ;;; `User' help functions  ;;; `User' help functions
# Line 428  We put that list in a buffer, and displa Line 431  We put that list in a buffer, and displa
431  The optional argument PREFIX, if non-nil, should be a key sequence;  The optional argument PREFIX, if non-nil, should be a key sequence;
432  then we display only bindings that start with that prefix.  then we display only bindings that start with that prefix.
433  The optional argument BUFFER specifies which buffer's bindings  The optional argument BUFFER specifies which buffer's bindings
434  to display (default, the current buffer)."  to display (default, the current buffer).  BUFFER can be a buffer
435    or a buffer name."
436    (interactive)    (interactive)
437    (or buffer (setq buffer (current-buffer)))    (or buffer (setq buffer (current-buffer)))
438    (help-setup-xref (list #'describe-bindings prefix buffer) (interactive-p))    (help-setup-xref (list #'describe-bindings prefix buffer) (interactive-p))

Legend:
Removed from v.1.264  
changed lines
  Added in v.1.264.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26