comparison lisp/hyper-apropos.el @ 430:a5df635868b2 r21-2-23

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