Mercurial > hg > xemacs-beta
comparison lisp/apropos.el @ 398:74fd4e045ea6 r21-2-29
Import from CVS: tag r21-2-29
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:13:30 +0200 |
parents | 8626e4521993 |
children | de805c49cfc1 |
comparison
equal
deleted
inserted
replaced
397:f4aeb21a5bad | 398:74fd4e045ea6 |
---|---|
2 | 2 |
3 ;; Copyright (C) 1989, 1994, 1995 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1989, 1994, 1995 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Joe Wells <jbw@bigbird.bu.edu> | 5 ;; Author: Joe Wells <jbw@bigbird.bu.edu> |
6 ;; Rewritten: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389 | 6 ;; Rewritten: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389 |
7 ;; Maintainer: SL Baur <steve@altair.xemacs.org> | 7 ;; Maintainer: SL Baur <steve@xemacs.org> |
8 ;; Keywords: help | 8 ;; Keywords: help |
9 | 9 |
10 ;; This file is part of XEmacs. | 10 ;; This file is part of XEmacs. |
11 | 11 |
12 ;; XEmacs is free software; you can redistribute it and/or modify it | 12 ;; XEmacs is free software; you can redistribute it and/or modify it |
105 | 105 |
106 | 106 |
107 (defvar apropos-mode-map | 107 (defvar apropos-mode-map |
108 (let ((map (make-sparse-keymap))) | 108 (let ((map (make-sparse-keymap))) |
109 (define-key map [(control m)] 'apropos-follow) | 109 (define-key map [(control m)] 'apropos-follow) |
110 (define-key map [return] 'apropos-follow) | |
110 (define-key map [(button2up)] 'apropos-mouse-follow) | 111 (define-key map [(button2up)] 'apropos-mouse-follow) |
111 (define-key map [(button2)] 'undefined) | 112 (define-key map [(button2)] 'undefined) |
112 map) | 113 map) |
113 "Keymap used in Apropos mode.") | 114 "Keymap used in Apropos mode.") |
114 | 115 |
375 | 376 |
376 ;; Finds all documentation related to APROPOS-REGEXP in internal-doc-file-name. | 377 ;; Finds all documentation related to APROPOS-REGEXP in internal-doc-file-name. |
377 | 378 |
378 (defun apropos-documentation-check-doc-file () | 379 (defun apropos-documentation-check-doc-file () |
379 (let (type symbol (sepa 2) sepb beg end) | 380 (let (type symbol (sepa 2) sepb beg end) |
380 (princ ?\^_) | 381 (insert ?\^_) |
381 (backward-char) | 382 (backward-char) |
382 (insert-file-contents (concat doc-directory internal-doc-file-name)) | 383 (insert-file-contents (concat doc-directory internal-doc-file-name)) |
383 (forward-char) | 384 (forward-char) |
384 (while (save-excursion | 385 (while (save-excursion |
385 (setq sepb (search-forward "\^_")) | 386 (setq sepb (search-forward "\^_")) |
506 (with-current-buffer standard-output | 507 (with-current-buffer standard-output |
507 (run-hooks 'apropos-mode-hook) | 508 (run-hooks 'apropos-mode-hook) |
508 (let ((p apropos-accumulator) | 509 (let ((p apropos-accumulator) |
509 (old-buffer (current-buffer)) | 510 (old-buffer (current-buffer)) |
510 symbol item point1 point2) | 511 symbol item point1 point2) |
512 ;; Mostly useless but to provide better keymap | |
513 ;; explanation. help-mode-map will be used instead. | |
514 (use-local-map apropos-mode-map) | |
511 ;; XEmacs change from (if window-system | 515 ;; XEmacs change from (if window-system |
512 (if (device-on-window-system-p) | 516 (if (device-on-window-system-p) |
513 (progn | 517 (progn |
514 (princ "If you move the mouse over text that changes color,\n") | 518 (princ "If you move the mouse over text that changes color,\n") |
515 (princ (substitute-command-keys | 519 (princ (substitute-command-keys |
573 (if (eval `(or ,@(cdr apropos-item))) | 577 (if (eval `(or ,@(cdr apropos-item))) |
574 (car apropos-item) | 578 (car apropos-item) |
575 apropos-item)) | 579 apropos-item)) |
576 (if apropos-symbol-face | 580 (if apropos-symbol-face |
577 (put-text-property point1 point2 'face apropos-symbol-face)) | 581 (put-text-property point1 point2 'face apropos-symbol-face)) |
582 ;; Add text-property on symbol, too. | |
583 (put-text-property point1 point2 'keymap apropos-mode-map) | |
578 (apropos-print-doc 'describe-function 1 | 584 (apropos-print-doc 'describe-function 1 |
579 (if (commandp symbol) | 585 (if (commandp symbol) |
580 "Command" | 586 "Command" |
581 (if (apropos-macrop symbol) | 587 (if (apropos-macrop symbol) |
582 "Macro" | 588 "Macro" |