Mercurial > emacs
comparison lisp/calc/calc-help.el @ 58551:c38bc6b76926
(Info-history): Declare it.
(calc-describe-key): Make calc-summary-indentation a local variable.
(calc-help-long-names): Move declaration to earlier in file.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Fri, 26 Nov 2004 22:37:54 +0000 |
parents | 0dd4932a3caa |
children | 8564d764ff4d |
comparison
equal
deleted
inserted
replaced
58550:938592e66a8e | 58551:c38bc6b76926 |
---|---|
2 | 2 |
3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004 | 3 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004 |
4 ;; Free Software Foundation, Inc. | 4 ;; Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: David Gillespie <daveg@synaptics.com> | 6 ;; Author: David Gillespie <daveg@synaptics.com> |
7 ;; Maintainers: D. Goel <deego@gnufans.org> | 7 ;; Maintainer: Jay Belanger <belanger@truman.edu> |
8 ;; Colin Walters <walters@debian.org> | |
9 | 8 |
10 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
11 | 10 |
12 ;; GNU Emacs is distributed in the hope that it will be useful, | 11 ;; GNU Emacs is distributed in the hope that it will be useful, |
13 ;; but WITHOUT ANY WARRANTY. No author or distributor | 12 ;; but WITHOUT ANY WARRANTY. No author or distributor |
137 | 136 |
138 (defun calc-describe-key-briefly (key) | 137 (defun calc-describe-key-briefly (key) |
139 (interactive "kDescribe key briefly: ") | 138 (interactive "kDescribe key briefly: ") |
140 (calc-describe-key key t)) | 139 (calc-describe-key key t)) |
141 | 140 |
141 (defvar Info-history) | |
142 | |
142 (defun calc-describe-key (key &optional briefly) | 143 (defun calc-describe-key (key &optional briefly) |
143 (interactive "kDescribe key: ") | 144 (interactive "kDescribe key: ") |
144 (let ((defn (if (eq (key-binding key) 'calc-dispatch) | 145 (let ((defn (if (eq (key-binding key) 'calc-dispatch) |
145 (let ((key2 (calc-read-key-sequence | 146 (let ((key2 (calc-read-key-sequence |
146 (format "Describe key briefly: %s-" | 147 (format "Describe key briefly: %s-" |
155 calc-help-map))) | 156 calc-help-map))) |
156 (setq key (concat key key2)) | 157 (setq key (concat key key2)) |
157 (lookup-key calc-help-map key2)) | 158 (lookup-key calc-help-map key2)) |
158 (key-binding key)))) | 159 (key-binding key)))) |
159 (inv nil) | 160 (inv nil) |
160 (hyp nil)) | 161 (hyp nil) |
162 calc-summary-indentation) | |
161 (while (or (equal key "I") (equal key "H")) | 163 (while (or (equal key "I") (equal key "H")) |
162 (if (equal key "I") | 164 (if (equal key "I") |
163 (setq inv (not inv)) | 165 (setq inv (not inv)) |
164 (setq hyp (not hyp))) | 166 (setq hyp (not hyp))) |
165 (setq key (read-key-sequence (format "Describe key%s:%s%s " | 167 (setq key (read-key-sequence (format "Describe key%s:%s%s " |
398 (search-forward "Summary of changes") | 400 (search-forward "Summary of changes") |
399 (forward-line -1) | 401 (forward-line -1) |
400 (delete-region (point-min) (point)) | 402 (delete-region (point-min) (point)) |
401 (goto-char (point-min)))) | 403 (goto-char (point-min)))) |
402 | 404 |
405 (defvar calc-help-long-names '((?b . "binary/business") | |
406 (?g . "graphics") | |
407 (?j . "selection") | |
408 (?k . "combinatorics/statistics") | |
409 (?u . "units/statistics"))) | |
410 | |
403 (defun calc-full-help () | 411 (defun calc-full-help () |
404 (interactive) | 412 (interactive) |
405 (with-output-to-temp-buffer "*Help*" | 413 (with-output-to-temp-buffer "*Help*" |
406 (princ (format "GNU Emacs Calculator version %s of %s.\n" | 414 (princ (format "GNU Emacs Calculator version %s of %s.\n" |
407 calc-version calc-version-date)) | 415 calc-version calc-version-date)) |
454 calc-shift-Y-prefix-help | 462 calc-shift-Y-prefix-help |
455 calc-shift-Z-prefix-help | 463 calc-shift-Z-prefix-help |
456 calc-z-prefix-help))) | 464 calc-z-prefix-help))) |
457 (print-help-return-message))) | 465 (print-help-return-message))) |
458 | 466 |
459 (defvar calc-help-long-names '((?b . "binary/business") | |
460 (?g . "graphics") | |
461 (?j . "selection") | |
462 (?k . "combinatorics/statistics") | |
463 (?u . "units/statistics"))) | |
464 | |
465 (defun calc-h-prefix-help () | 467 (defun calc-h-prefix-help () |
466 (interactive) | 468 (interactive) |
467 (calc-do-prefix-help | 469 (calc-do-prefix-help |
468 '("Help; Bindings; Info, Tutorial, Summary; News" | 470 '("Help; Bindings; Info, Tutorial, Summary; News" |
469 "describe: Key, C (briefly), Function, Variable") | 471 "describe: Key, C (briefly), Function, Variable") |