Mercurial > hg > xemacs-beta
comparison lisp/hyperbole/hibtypes.el @ 24:4103f0995bd7 r19-15b95
Import from CVS: tag r19-15b95
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:51:03 +0200 |
parents | 376386a54a3c |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
23:0edd3412f124 | 24:4103f0995bd7 |
---|---|
4 ;; SUMMARY: Hyperbole System Implicit Button Types. | 4 ;; SUMMARY: Hyperbole System Implicit Button Types. |
5 ;; USAGE: GNU Emacs Lisp Library | 5 ;; USAGE: GNU Emacs Lisp Library |
6 ;; KEYWORDS: extensions, hypermedia | 6 ;; KEYWORDS: extensions, hypermedia |
7 ;; | 7 ;; |
8 ;; AUTHOR: Bob Weiner | 8 ;; AUTHOR: Bob Weiner |
9 ;; ORG: Brown U. | 9 ;; ORG: InfoDock Associates |
10 ;; | |
11 ;; This file is part of Hyperbole. | |
12 ;; Available for use and distribution under the same terms as GNU Emacs. | |
13 ;; | |
14 ;; Copyright (C) 1991-1997 Free Software Foundation, Inc. | |
15 ;; Developed with support from Motorola Inc. | |
10 ;; | 16 ;; |
11 ;; ORIG-DATE: 19-Sep-91 at 20:45:31 | 17 ;; ORIG-DATE: 19-Sep-91 at 20:45:31 |
12 ;; LAST-MOD: 3-Nov-95 at 22:49:12 by Bob Weiner | 18 ;; LAST-MOD: 20-Feb-97 at 11:17:04 by Bob Weiner |
19 | |
13 ;;; ************************************************************************ | 20 ;;; ************************************************************************ |
14 ;;; Other required Elisp libraries | 21 ;;; Other required Elisp libraries |
15 ;;; ************************************************************************ | 22 ;;; ************************************************************************ |
16 | 23 |
17 (require 'hactypes) | 24 (require 'hactypes) |
19 ;;; ************************************************************************ | 26 ;;; ************************************************************************ |
20 ;;; Public implicit button types | 27 ;;; Public implicit button types |
21 ;;; ************************************************************************ | 28 ;;; ************************************************************************ |
22 | 29 |
23 (run-hooks 'hibtypes:begin-load-hook) | 30 (run-hooks 'hibtypes:begin-load-hook) |
31 | |
32 ;;; ======================================================================== | |
33 ;;; Use func-menu.el to jump to a function referred to in the same file in | |
34 ;;; which it is defined. Function references across files are handled | |
35 ;;; separately be clauses within the `hkey-alist' variable. | |
36 ;;; ======================================================================== | |
37 | |
38 (defib function-in-buffer () | |
39 "Return function name defined within this buffer that point is within or after, else nil. | |
40 This triggers only when the func-menu.el package has been loaded and the | |
41 current major mode is one handled by func-menu." | |
42 (if (and (boundp 'fume-function-name-regexp-alist) | |
43 (assq major-mode fume-function-name-regexp-alist) | |
44 (not (eq major-mode 'dired-mode)) | |
45 ;; Not sure if this is defined in early versions of Emacs. | |
46 (fboundp 'skip-syntax-backward)) | |
47 (save-excursion | |
48 (skip-syntax-backward "w_") | |
49 (if (looking-at "\\(\\sw\\|\\s_\\)+") | |
50 (let ((function-name (buffer-substring (point) (match-end 0))) | |
51 (start (point)) | |
52 (end (match-end 0)) | |
53 function-pos) | |
54 (if fume-funclist | |
55 nil | |
56 (fume-set-defaults) | |
57 (let ((fume-scanning-message nil)) | |
58 (fume-rescan-buffer))) | |
59 (setq function-pos (cdr-safe (assoc function-name fume-funclist))) | |
60 (if function-pos | |
61 (progn (ibut:label-set function-name start end) | |
62 (hact 'function-in-buffer function-name | |
63 function-pos)))))))) | |
24 | 64 |
25 ;;; ======================================================================== | 65 ;;; ======================================================================== |
26 ;;; Follows URLs by invoking a browser. | 66 ;;; Follows URLs by invoking a browser. |
27 ;;; ======================================================================== | 67 ;;; ======================================================================== |
28 | 68 |
39 ' ' or '*' character or which do not have an attached file." | 79 ' ' or '*' character or which do not have an attached file." |
40 (and (not (bolp)) | 80 (and (not (bolp)) |
41 buffer-file-name | 81 buffer-file-name |
42 (let ((chr (aref (buffer-name) 0))) | 82 (let ((chr (aref (buffer-name) 0))) |
43 (not (or (= chr ? ) (= chr ?*)))) | 83 (not (or (= chr ? ) (= chr ?*)))) |
84 ;; Force [PPG-sw-process-id], if defined, to take precedence. | |
85 (not (htype:names 'ibtypes 'ppg-sw-process)) | |
44 (let* ((ref-and-pos (hbut:label-p t "[" "]" t)) | 86 (let* ((ref-and-pos (hbut:label-p t "[" "]" t)) |
45 (ref (car ref-and-pos))) | 87 (ref (car ref-and-pos))) |
46 (and ref (= ?w (char-syntax (aref ref 0))) | 88 (and ref (= ?w (char-syntax (aref ref 0))) |
47 (progn (ibut:label-set ref-and-pos) | 89 (progn (ibut:label-set ref-and-pos) |
48 (hact 'annot-bib ref)))))) | 90 (hact 'annot-bib ref)))))) |
194 "Turns a Hyperbole e-mail list address into an implicit button which inserts Hyperbole environment information. | 236 "Turns a Hyperbole e-mail list address into an implicit button which inserts Hyperbole environment information. |
195 Useful when sending mail to a Hyperbole mail list. | 237 Useful when sending mail to a Hyperbole mail list. |
196 See also the documentation for `actypes::hyp-config'." | 238 See also the documentation for `actypes::hyp-config'." |
197 (if (memq major-mode (list hmail:composer hnews:composer)) | 239 (if (memq major-mode (list hmail:composer hnews:composer)) |
198 (let ((addr (find-tag-default))) | 240 (let ((addr (find-tag-default))) |
199 (cond ((set:member addr (list "hyperbole" "hyperbole@hub.ucsb.edu")) | 241 (cond ((set:member addr (list "hyperbole" "hyperbole@infodock.com")) |
200 (hact 'hyp-config)) | 242 (hact 'hyp-config)) |
201 ((set:member addr | 243 ((set:member addr |
202 (list "hyperbole-request" | 244 (list "hyperbole-request" |
203 "hyperbole-request@hub.ucsb.edu")) | 245 "hyperbole-request@infodock.com")) |
204 (hact 'hyp-request)) | 246 (hact 'hyp-request)) |
205 )))) | 247 )))) |
206 | 248 |
207 ;;; ======================================================================== | 249 ;;; ======================================================================== |
208 ;;; Makes source entries in Hyperbole reports selectable. | 250 ;;; Makes source entries in Hyperbole reports selectable. |
250 ;;; ======================================================================== | 292 ;;; ======================================================================== |
251 | 293 |
252 (defib pathname () | 294 (defib pathname () |
253 "Makes a delimited, valid pathname display the path entry. | 295 "Makes a delimited, valid pathname display the path entry. |
254 Also works for delimited and non-delimited ange-ftp and efs pathnames. | 296 Also works for delimited and non-delimited ange-ftp and efs pathnames. |
297 Emacs Lisp library files (filenames that end in .el and .elc) are looked up | |
298 using the load-path directory list. | |
299 | |
255 See `hpath:at-p' function documentation for possible delimiters. | 300 See `hpath:at-p' function documentation for possible delimiters. |
256 See `hpath:suffixes' variable documentation for suffixes that are added to or | 301 See `hpath:suffixes' variable documentation for suffixes that are added to or |
257 removed from pathname when searching for a valid match. | 302 removed from pathname when searching for a valid match. |
258 See `hpath:find' function documentation and `hpath:display-alist' and | 303 See `hpath:find' function documentation for special file display options." |
259 `hpath:find-alist' variable documentation for special file display options." | |
260 (let ((path (hpath:at-p))) | 304 (let ((path (hpath:at-p))) |
261 (if path | 305 (cond (path |
262 (progn (ibut:label-set path) | 306 (ibut:label-set path) |
263 (hact 'link-to-file path))))) | 307 (hact 'link-to-file path)) |
308 ((and (fboundp 'locate-file) | |
309 (setq path (or (hargs:delimited "\"" "\"") | |
310 ;; Filenames in Info docs | |
311 (hargs:delimited "\`" "\'") | |
312 ;; Filenames in TexInfo docs | |
313 (hargs:delimited "@file{" "}"))) | |
314 (string-match ".\\.el?c\\'" path)) | |
315 (ibut:label-set path) | |
316 (setq path (locate-file path load-path)) | |
317 (if path (hact 'link-to-file path)))))) | |
318 | |
264 | 319 |
265 ;;; ======================================================================== | 320 ;;; ======================================================================== |
266 ;;; Jumps to source line associated with debugger stack frame or breakpoint | 321 ;;; Jumps to source line associated with debugger stack frame or breakpoint |
267 ;;; lines. Supports gdb, dbx, and xdb. | 322 ;;; lines. Supports gdb, dbx, and xdb. |
268 ;;; ======================================================================== | 323 ;;; ======================================================================== |