comparison lisp/help.el @ 4103:b4f4e0cc90f1

[xemacs-hg @ 2007-08-07 23:08:47 by aidan] Eliminate byte compiler warnings, give nicer errors in the absence of packages.
author aidan
date Tue, 07 Aug 2007 23:09:22 +0000
parents 959746c534f6
children 9fec7fedbf1b
comparison
equal deleted inserted replaced
4102:9856d458deda 4103:b4f4e0cc90f1
1291 (when ex 1291 (when ex
1292 (help-symbol-run-function-1 last-popup-menu-event ex fun)))) 1292 (help-symbol-run-function-1 last-popup-menu-event ex fun))))
1293 1293
1294 (defvar help-symbol-function-context-menu 1294 (defvar help-symbol-function-context-menu
1295 '(["View %_Documentation" (help-symbol-run-function 'describe-function)] 1295 '(["View %_Documentation" (help-symbol-run-function 'describe-function)]
1296 ["Find %_Function Source" (help-symbol-run-function 'find-function)] 1296 ["Find %_Function Source" (help-symbol-run-function 'find-function)
1297 (fboundp #'find-function)]
1297 ["Find %_Tag" (help-symbol-run-function 'find-tag)] 1298 ["Find %_Tag" (help-symbol-run-function 'find-tag)]
1298 )) 1299 ))
1299 1300
1300 (defvar help-symbol-variable-context-menu 1301 (defvar help-symbol-variable-context-menu
1301 '(["View %_Documentation" (help-symbol-run-function 'describe-variable)] 1302 '(["View %_Documentation" (help-symbol-run-function 'describe-variable)]
1302 ["Find %_Variable Source" (help-symbol-run-function 'find-variable)] 1303 ["Find %_Variable Source" (help-symbol-run-function 'find-variable)
1304 (fboundp #'find-variable)]
1303 ["Find %_Tag" (help-symbol-run-function 'find-tag)] 1305 ["Find %_Tag" (help-symbol-run-function 'find-tag)]
1304 )) 1306 ))
1305 1307
1306 (defvar help-symbol-function-and-variable-context-menu 1308 (defvar help-symbol-function-and-variable-context-menu
1307 '(["View Function %_Documentation" (help-symbol-run-function 1309 '(["View Function %_Documentation" (help-symbol-run-function
1308 'describe-function)] 1310 'describe-function)]
1309 ["View Variable D%_ocumentation" (help-symbol-run-function 1311 ["View Variable D%_ocumentation" (help-symbol-run-function
1310 'describe-variable)] 1312 'describe-variable)]
1311 ["Find %_Function Source" (help-symbol-run-function 'find-function)] 1313 ["Find %_Function Source" (help-symbol-run-function 'find-function)
1312 ["Find %_Variable Source" (help-symbol-run-function 'find-variable)] 1314 (fboundp #'find-function)]
1315 ["Find %_Variable Source" (help-symbol-run-function 'find-variable)
1316 (fboundp #'find-variable)]
1313 ["Find %_Tag" (help-symbol-run-function 'find-tag)] 1317 ["Find %_Tag" (help-symbol-run-function 'find-tag)]
1314 )) 1318 ))
1315 1319
1316 (defun frob-help-extents (buffer) 1320 (defun frob-help-extents (buffer)
1317 ;; Look through BUFFER, starting at the buffer's point and continuing 1321 ;; Look through BUFFER, starting at the buffer's point and continuing
1807 1811
1808 (defun help-find-source-or-scroll-up (&optional pos) 1812 (defun help-find-source-or-scroll-up (&optional pos)
1809 "Follow any cross reference to source code; if none, scroll up. " 1813 "Follow any cross reference to source code; if none, scroll up. "
1810 (interactive "d") 1814 (interactive "d")
1811 (let ((e (extent-at pos nil 'find-function-symbol))) 1815 (let ((e (extent-at pos nil 'find-function-symbol)))
1812 (if e 1816 (if (and-fboundp #'find-function e)
1813 (find-function (extent-property e 'find-function-symbol)) 1817 (with-fboundp #'find-function
1818 (find-function (extent-property e 'find-function-symbol)))
1814 (setq e (extent-at pos nil 'find-variable-symbol)) 1819 (setq e (extent-at pos nil 'find-variable-symbol))
1815 (if e 1820 (if (and-fboundp #'find-variable e)
1816 (find-variable (extent-property e 'find-variable-symbol)) 1821 (with-fboundp #'find-variable
1817 (view-scroll-lines-up 1))))) 1822 (find-variable (extent-property e 'find-variable-symbol)))
1823 (scroll-up 1)))))
1818 1824
1819 (defun help-mouse-find-source-or-track (event) 1825 (defun help-mouse-find-source-or-track (event)
1820 "Follow any cross reference to source code under the mouse; 1826 "Follow any cross reference to source code under the mouse;
1821 if none, call mouse-track. " 1827 if none, call mouse-track. "
1822 (interactive "e") 1828 (interactive "e")
1823 (mouse-set-point event) 1829 (mouse-set-point event)
1824 (let ((e (extent-at (point) nil 'find-function-symbol))) 1830 (let ((e (extent-at (point) nil 'find-function-symbol)))
1825 (if e 1831 (if (and-fboundp #'find-function e)
1826 (find-function (extent-property e 'find-function-symbol)) 1832 (with-fboundp #'find-function
1833 (find-function (extent-property e 'find-function-symbol)))
1827 (setq e (extent-at (point) nil 'find-variable-symbol)) 1834 (setq e (extent-at (point) nil 'find-variable-symbol))
1828 (if e 1835 (if (and-fboundp #'find-variable e)
1829 (find-variable (extent-property e 'find-variable-symbol)) 1836 (with-fboundp #'find-variable
1837 (find-variable (extent-property e 'find-variable-symbol)))
1830 (mouse-track event))))) 1838 (mouse-track event)))))
1831 1839
1832 ;;; help.el ends here 1840 ;;; help.el ends here