comparison lisp/hyper-apropos.el @ 359:8e84bee8ddd0 r21-1-9

Import from CVS: tag r21-1-9
author cvs
date Mon, 13 Aug 2007 10:57:55 +0200
parents f2b5d7006b0a
children cc15677e0335
comparison
equal deleted inserted replaced
358:fed6e0f6a03a 359:8e84bee8ddd0
1078 (beginning-of-line) 1078 (beginning-of-line)
1079 (if (looking-at hyper-apropos-junk-regexp) 1079 (if (looking-at hyper-apropos-junk-regexp)
1080 nil 1080 nil
1081 (forward-char 3) 1081 (forward-char 3)
1082 (read (point-marker)))) 1082 (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)))
1083 (t 1090 (t
1084 (let* ((st (progn 1091 (let* ((st (progn
1085 (skip-syntax-backward "w_") 1092 (skip-syntax-backward "w_")
1086 ;; !@(*$^%%# stupid backquote implementation!!! 1093 ;; !@(*$^%%# stupid backquote implementation!!!
1087 (skip-chars-forward "`") 1094 (skip-chars-forward "`")
1120 (defun hyper-apropos-set-variable (var val &optional this-ref-buffer) 1127 (defun hyper-apropos-set-variable (var val &optional this-ref-buffer)
1121 "Interactively set the variable on the current line." 1128 "Interactively set the variable on the current line."
1122 (interactive 1129 (interactive
1123 (let ((var (hyper-apropos-this-symbol))) 1130 (let ((var (hyper-apropos-this-symbol)))
1124 (or (and var (boundp var)) 1131 (or (and var (boundp var))
1125 (and (setq var (and (eq major-mode 'hyper-apropos-help-mode)
1126 (save-excursion
1127 (goto-char (point-min))
1128 (hyper-apropos-this-symbol))))
1129 (boundp var))
1130 (setq var nil)) 1132 (setq var nil))
1131 (list var (hyper-apropos-read-variable-value var)))) 1133 (list var (hyper-apropos-read-variable-value var))))
1132 (and var 1134 (and var
1133 (boundp var) 1135 (boundp var)
1134 (progn 1136 (progn
1174 (error nil))))))) 1176 (error nil)))))))
1175 1177
1176 (defun hyper-apropos-customize-variable () 1178 (defun hyper-apropos-customize-variable ()
1177 (interactive) 1179 (interactive)
1178 (let ((var (hyper-apropos-this-symbol))) 1180 (let ((var (hyper-apropos-this-symbol)))
1179 (customize-variable var))) 1181 (and
1182 (or (and var (boundp var))
1183 (setq var nil))
1184 (customize-variable var))))
1180 1185
1181 ;; ---------------------------------------------------------------------- ;; 1186 ;; ---------------------------------------------------------------------- ;;
1182 1187
1183 (defun hyper-apropos-find-tag (&optional tag-name) 1188 (defun hyper-apropos-find-tag (&optional tag-name)
1184 "Find the tag for the symbol on the current line in other window. In 1189 "Find the tag for the symbol on the current line in other window. In
1196 "Find the function for the symbol on the current line in other 1201 "Find the function for the symbol on the current line in other
1197 window. (See also `find-function'.)" 1202 window. (See also `find-function'.)"
1198 (interactive 1203 (interactive
1199 (let ((fn (hyper-apropos-this-symbol))) 1204 (let ((fn (hyper-apropos-this-symbol)))
1200 (or (fboundp fn) 1205 (or (fboundp fn)
1201 (and (setq fn (and (eq major-mode 'hyper-apropos-help-mode)
1202 (save-excursion
1203 (goto-char (point-min))
1204 (hyper-apropos-this-symbol))))
1205 (fboundp fn))
1206 (setq fn nil)) 1206 (setq fn nil))
1207 (list fn))) 1207 (list fn)))
1208 (if fn 1208 (if fn
1209 (find-function-other-window fn))) 1209 (find-function-other-window fn)))
1210 1210
1256 1256
1257 ;;;###autoload 1257 ;;;###autoload
1258 (defun hyper-apropos-popup-menu (event) 1258 (defun hyper-apropos-popup-menu (event)
1259 (interactive "e") 1259 (interactive "e")
1260 (mouse-set-point event) 1260 (mouse-set-point event)
1261 (let* ((sym (or (hyper-apropos-this-symbol) 1261 (let* ((sym (hyper-apropos-this-symbol))
1262 (and (eq major-mode 'hyper-apropos-help-mode)
1263 (save-excursion
1264 (goto-char (point-min))
1265 (hyper-apropos-this-symbol)))))
1266 (notjunk (not (null sym))) 1262 (notjunk (not (null sym)))
1267 (command-p (if (commandp sym) t)) 1263 (command-p (if (commandp sym) t))
1268 (variable-p (and sym (boundp sym))) 1264 (variable-p (and sym (boundp sym)))
1269 (customizable-p (and variable-p 1265 (customizable-p (and variable-p
1270 (get sym 'custom-type) 1266 (get sym 'custom-type)