Mercurial > hg > xemacs-beta
comparison lisp/hyper-apropos.el @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | 8e84bee8ddd0 |
children | 8626e4521993 |
comparison
equal
deleted
inserted
replaced
370:bd866891f083 | 371:cc15677e0335 |
---|---|
479 (message "Sorry, nothing to describe.") | 479 (message "Sorry, nothing to describe.") |
480 (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode)) | 480 (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode)) |
481 (setq hyper-apropos-prev-wconfig (current-window-configuration))) | 481 (setq hyper-apropos-prev-wconfig (current-window-configuration))) |
482 (hyper-apropos-get-doc symbol t nil this-ref-buffer))) | 482 (hyper-apropos-get-doc symbol t nil this-ref-buffer))) |
483 | 483 |
484 ;;;###autoload | |
485 (defun hyper-where-is (symbol) | 484 (defun hyper-where-is (symbol) |
486 "Print message listing key sequences that invoke specified command." | 485 "Print message listing key sequences that invoke specified command." |
487 (interactive (list (hyper-apropos-read-function-symbol "Where is function"))) | 486 (interactive (list (hyper-apropos-read-function-symbol "Where is function"))) |
488 (if (null symbol) | 487 (if (null symbol) |
489 (message "Sorry, nothing to describe.") | 488 (message "Sorry, nothing to describe.") |
1078 (beginning-of-line) | 1077 (beginning-of-line) |
1079 (if (looking-at hyper-apropos-junk-regexp) | 1078 (if (looking-at hyper-apropos-junk-regexp) |
1080 nil | 1079 nil |
1081 (forward-char 3) | 1080 (forward-char 3) |
1082 (read (point-marker)))) | 1081 (read (point-marker)))) |
1083 ;; What's this? This ends up in the same symbol already described. | |
1084 ;; ((and | |
1085 ;; (eq major-mode 'hyper-apropos-help-mode) | |
1086 ;; (> (point) (point-min))) | |
1087 ;; (save-excursion | |
1088 ;; (goto-char (point-min)) | |
1089 ;; (hyper-apropos-this-symbol))) | |
1090 (t | 1082 (t |
1091 (let* ((st (progn | 1083 (let* ((st (progn |
1092 (skip-syntax-backward "w_") | 1084 (skip-syntax-backward "w_") |
1093 ;; !@(*$^%%# stupid backquote implementation!!! | 1085 ;; !@(*$^%%# stupid backquote implementation!!! |
1094 (skip-chars-forward "`") | 1086 (skip-chars-forward "`") |
1127 (defun hyper-apropos-set-variable (var val &optional this-ref-buffer) | 1119 (defun hyper-apropos-set-variable (var val &optional this-ref-buffer) |
1128 "Interactively set the variable on the current line." | 1120 "Interactively set the variable on the current line." |
1129 (interactive | 1121 (interactive |
1130 (let ((var (hyper-apropos-this-symbol))) | 1122 (let ((var (hyper-apropos-this-symbol))) |
1131 (or (and var (boundp var)) | 1123 (or (and var (boundp var)) |
1124 (and (setq var (and (eq major-mode 'hyper-apropos-help-mode) | |
1125 (save-excursion | |
1126 (goto-char (point-min)) | |
1127 (hyper-apropos-this-symbol)))) | |
1128 (boundp var)) | |
1132 (setq var nil)) | 1129 (setq var nil)) |
1133 (list var (hyper-apropos-read-variable-value var)))) | 1130 (list var (hyper-apropos-read-variable-value var)))) |
1134 (and var | 1131 (and var |
1135 (boundp var) | 1132 (boundp var) |
1136 (progn | 1133 (progn |
1176 (error nil))))))) | 1173 (error nil))))))) |
1177 | 1174 |
1178 (defun hyper-apropos-customize-variable () | 1175 (defun hyper-apropos-customize-variable () |
1179 (interactive) | 1176 (interactive) |
1180 (let ((var (hyper-apropos-this-symbol))) | 1177 (let ((var (hyper-apropos-this-symbol))) |
1181 (and | 1178 (customize-variable var))) |
1182 (or (and var (boundp var)) | |
1183 (setq var nil)) | |
1184 (customize-variable var)))) | |
1185 | 1179 |
1186 ;; ---------------------------------------------------------------------- ;; | 1180 ;; ---------------------------------------------------------------------- ;; |
1187 | 1181 |
1188 (defun hyper-apropos-find-tag (&optional tag-name) | 1182 (defun hyper-apropos-find-tag (&optional tag-name) |
1189 "Find the tag for the symbol on the current line in other window. In | 1183 "Find the tag for the symbol on the current line in other window. In |
1201 "Find the function for the symbol on the current line in other | 1195 "Find the function for the symbol on the current line in other |
1202 window. (See also `find-function'.)" | 1196 window. (See also `find-function'.)" |
1203 (interactive | 1197 (interactive |
1204 (let ((fn (hyper-apropos-this-symbol))) | 1198 (let ((fn (hyper-apropos-this-symbol))) |
1205 (or (fboundp fn) | 1199 (or (fboundp fn) |
1200 (and (setq fn (and (eq major-mode 'hyper-apropos-help-mode) | |
1201 (save-excursion | |
1202 (goto-char (point-min)) | |
1203 (hyper-apropos-this-symbol)))) | |
1204 (fboundp fn)) | |
1206 (setq fn nil)) | 1205 (setq fn nil)) |
1207 (list fn))) | 1206 (list fn))) |
1208 (if fn | 1207 (if fn |
1209 (find-function-other-window fn))) | 1208 (find-function-other-window fn))) |
1210 | 1209 |
1256 | 1255 |
1257 ;;;###autoload | 1256 ;;;###autoload |
1258 (defun hyper-apropos-popup-menu (event) | 1257 (defun hyper-apropos-popup-menu (event) |
1259 (interactive "e") | 1258 (interactive "e") |
1260 (mouse-set-point event) | 1259 (mouse-set-point event) |
1261 (let* ((sym (hyper-apropos-this-symbol)) | 1260 (let* ((sym (or (hyper-apropos-this-symbol) |
1261 (and (eq major-mode 'hyper-apropos-help-mode) | |
1262 (save-excursion | |
1263 (goto-char (point-min)) | |
1264 (hyper-apropos-this-symbol))))) | |
1262 (notjunk (not (null sym))) | 1265 (notjunk (not (null sym))) |
1263 (command-p (if (commandp sym) t)) | 1266 (command-p (if (commandp sym) t)) |
1264 (variable-p (and sym (boundp sym))) | 1267 (variable-p (and sym (boundp sym))) |
1265 (customizable-p (and variable-p | 1268 (customizable-p (and variable-p |
1266 (get sym 'custom-type) | 1269 (get sym 'custom-type) |