Mercurial > hg > xemacs-beta
comparison lisp/help.el @ 5368:ed74d2ca7082
Use ', not #', when a given symbol may not have a function binding at read time
2011-03-10 Aidan Kehoe <kehoea@parhasard.net>
* cmdloop.el (yes-or-no-p):
* cmdloop.el (y-or-n-p):
* descr-text.el (describe-char):
* diagnose.el (show-memory-usage):
* diagnose.el (show-object-memory-usage-stats):
* diagnose.el (show-mc-alloc-memory-usage):
* diagnose.el (show-gc-stats):
* faces.el (face-font-instance):
* gtk-font-menu.el (gtk-reset-device-font-menus):
* help.el (help-symbol-function-context-menu):
* help.el (help-symbol-variable-context-menu):
* help.el (help-symbol-function-and-variable-context-menu):
* help.el (help-find-source-or-scroll-up):
* help.el (help-mouse-find-source-or-track):
* help.el (temp-buffer-resize-mode):
* minibuf.el (mouse-read-file-name-1):
* obsolete.el (find-non-ascii-charset-string):
* obsolete.el (find-non-ascii-charset-region):
* occur.el (occur-engine):
* paragraphs.el (forward-paragraph):
* paragraphs.el (forward-sentence):
* select.el (activate-region-as-selection):
* select.el (select-make-extent-for-selection):
* simple.el (zmacs-make-extent-for-region):
Use quote, not function, for quoting symbols that may not be
fboundp at the point they are read (again, a style issue, since
Common Lisp throws an error on this, but we don't, and have no
plans to.)
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 10 Mar 2011 18:51:15 +0000 |
parents | f00192e1cd49 |
children | ac37a5f7e5be |
comparison
equal
deleted
inserted
replaced
5367:8b70d37ab80e | 5368:ed74d2ca7082 |
---|---|
1298 (help-symbol-run-function-1 last-popup-menu-event ex fun)))) | 1298 (help-symbol-run-function-1 last-popup-menu-event ex fun)))) |
1299 | 1299 |
1300 (defvar help-symbol-function-context-menu | 1300 (defvar help-symbol-function-context-menu |
1301 '(["View %_Documentation" (help-symbol-run-function 'describe-function)] | 1301 '(["View %_Documentation" (help-symbol-run-function 'describe-function)] |
1302 ["Find %_Function Source" (help-symbol-run-function 'find-function) | 1302 ["Find %_Function Source" (help-symbol-run-function 'find-function) |
1303 (fboundp #'find-function)] | 1303 (fboundp 'find-function)] |
1304 ["Find %_Tag" (help-symbol-run-function 'find-tag)] | 1304 ["Find %_Tag" (help-symbol-run-function 'find-tag)] |
1305 )) | 1305 )) |
1306 | 1306 |
1307 (defvar help-symbol-variable-context-menu | 1307 (defvar help-symbol-variable-context-menu |
1308 '(["View %_Documentation" (help-symbol-run-function 'describe-variable)] | 1308 '(["View %_Documentation" (help-symbol-run-function 'describe-variable)] |
1309 ["Find %_Variable Source" (help-symbol-run-function 'find-variable) | 1309 ["Find %_Variable Source" (help-symbol-run-function 'find-variable) |
1310 (fboundp #'find-variable)] | 1310 (fboundp 'find-variable)] |
1311 ["Find %_Tag" (help-symbol-run-function 'find-tag)] | 1311 ["Find %_Tag" (help-symbol-run-function 'find-tag)] |
1312 )) | 1312 )) |
1313 | 1313 |
1314 (defvar help-symbol-function-and-variable-context-menu | 1314 (defvar help-symbol-function-and-variable-context-menu |
1315 '(["View Function %_Documentation" (help-symbol-run-function | 1315 '(["View Function %_Documentation" (help-symbol-run-function |
1316 'describe-function)] | 1316 'describe-function)] |
1317 ["View Variable D%_ocumentation" (help-symbol-run-function | 1317 ["View Variable D%_ocumentation" (help-symbol-run-function |
1318 'describe-variable)] | 1318 'describe-variable)] |
1319 ["Find %_Function Source" (help-symbol-run-function 'find-function) | 1319 ["Find %_Function Source" (help-symbol-run-function 'find-function) |
1320 (fboundp #'find-function)] | 1320 (fboundp 'find-function)] |
1321 ["Find %_Variable Source" (help-symbol-run-function 'find-variable) | 1321 ["Find %_Variable Source" (help-symbol-run-function 'find-variable) |
1322 (fboundp #'find-variable)] | 1322 (fboundp 'find-variable)] |
1323 ["Find %_Tag" (help-symbol-run-function 'find-tag)] | 1323 ["Find %_Tag" (help-symbol-run-function 'find-tag)] |
1324 )) | 1324 )) |
1325 | 1325 |
1326 (defun frob-help-extents (buffer) | 1326 (defun frob-help-extents (buffer) |
1327 ;; Look through BUFFER, starting at the buffer's point and continuing | 1327 ;; Look through BUFFER, starting at the buffer's point and continuing |
1856 | 1856 |
1857 (defun help-find-source-or-scroll-up (&optional pos) | 1857 (defun help-find-source-or-scroll-up (&optional pos) |
1858 "Follow any cross reference to source code; if none, scroll up. " | 1858 "Follow any cross reference to source code; if none, scroll up. " |
1859 (interactive "d") | 1859 (interactive "d") |
1860 (let ((e (extent-at pos nil 'find-function-symbol))) | 1860 (let ((e (extent-at pos nil 'find-function-symbol))) |
1861 (if (and-fboundp #'find-function e) | 1861 (if (and-fboundp 'find-function e) |
1862 (with-fboundp #'find-function | 1862 (with-fboundp 'find-function |
1863 (find-function (extent-property e 'find-function-symbol))) | 1863 (find-function (extent-property e 'find-function-symbol))) |
1864 (setq e (extent-at pos nil 'find-variable-symbol)) | 1864 (setq e (extent-at pos nil 'find-variable-symbol)) |
1865 (if (and-fboundp #'find-variable e) | 1865 (if (and-fboundp 'find-variable e) |
1866 (with-fboundp #'find-variable | 1866 (with-fboundp 'find-variable |
1867 (find-variable (extent-property e 'find-variable-symbol))) | 1867 (find-variable (extent-property e 'find-variable-symbol))) |
1868 (scroll-up 1))))) | 1868 (scroll-up 1))))) |
1869 | 1869 |
1870 (defun help-mouse-find-source-or-track (event) | 1870 (defun help-mouse-find-source-or-track (event) |
1871 "Follow any cross reference to source code under the mouse; | 1871 "Follow any cross reference to source code under the mouse; |
1872 if none, call mouse-track. " | 1872 if none, call mouse-track. " |
1873 (interactive "e") | 1873 (interactive "e") |
1874 (mouse-set-point event) | 1874 (mouse-set-point event) |
1875 (let ((e (extent-at (point) nil 'find-function-symbol))) | 1875 (let ((e (extent-at (point) nil 'find-function-symbol))) |
1876 (if (and-fboundp #'find-function e) | 1876 (if (and-fboundp 'find-function e) |
1877 (with-fboundp #'find-function | 1877 (with-fboundp 'find-function |
1878 (find-function (extent-property e 'find-function-symbol))) | 1878 (find-function (extent-property e 'find-function-symbol))) |
1879 (setq e (extent-at (point) nil 'find-variable-symbol)) | 1879 (setq e (extent-at (point) nil 'find-variable-symbol)) |
1880 (if (and-fboundp #'find-variable e) | 1880 (if (and-fboundp 'find-variable e) |
1881 (with-fboundp #'find-variable | 1881 (with-fboundp 'find-variable |
1882 (find-variable (extent-property e 'find-variable-symbol))) | 1882 (find-variable (extent-property e 'find-variable-symbol))) |
1883 (mouse-track event))))) | 1883 (mouse-track event))))) |
1884 | 1884 |
1885 (define-minor-mode temp-buffer-resize-mode | 1885 (define-minor-mode temp-buffer-resize-mode |
1886 "Toggle the mode which makes windows smaller for temporary buffers. | 1886 "Toggle the mode which makes windows smaller for temporary buffers. |