;;; help.el --- help commands for Emacs
;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 2002,
-;; 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+;; 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: help, internal
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
((<= version 18)
(setq version (format "%d" version)))
((> version emacs-major-version)
- (error "No news about emacs %d (yet)" version))))
+ (error "No news about Emacs %d (yet)" version))))
(let* ((vn (if (stringp version)
(string-to-number version)
version))
"Where is command: ")
obarray 'commandp t))
(list (if (equal val "") fn (intern val)) current-prefix-arg)))
+ (unless definition (error "No command"))
(let ((func (indirect-function definition))
(defs nil)
(standard-output (if insert (current-buffer) t)))
(list
key
(prefix-numeric-value current-prefix-arg)
- ;; If KEY is a down-event, read and discard the
+ ;; If KEY is a down-event, read and include the
;; corresponding up-event. Note that there are also
;; down-events on scroll bars and mode lines: the actual
;; event then is in the second element of the vector.
(cond
((= 0 (length i))
nil)
- ((eq (aref i 0) ?\ )
+ ((eq (aref i 0) ?\s)
(substring i 1))
(t
i))))
"Return a minor mode symbol from its indicator on the modeline."
;; remove first space if existed
(if (and (< 0 (length indicator))
- (eq (aref indicator 0) ?\ ))
+ (eq (aref indicator 0) ?\s))
(setq indicator (substring indicator 1)))
(let ((minor-modes minor-mode-alist)
result)
;; remove first space if existed
(if (and (stringp anindicator)
(> (length anindicator) 0)
- (eq (aref anindicator 0) ?\ ))
+ (eq (aref anindicator 0) ?\s))
(setq anindicator (substring anindicator 1)))
(if (equal indicator anindicator)
(setq result minor-mode
(remove-hook 'temp-buffer-show-hook 'resize-temp-buffer-window)))
(defun resize-temp-buffer-window ()
- "Resize the current window to fit its contents.
+ "Resize the selected window to fit its contents.
Will not make it higher than `temp-buffer-max-height' nor smaller than
`window-min-height'. Do nothing if it is the only window on its frame, if it
is not as wide as the frame or if some of the window's contents are scrolled
out of view."
(unless (or (one-window-p 'nomini)
(not (pos-visible-in-window-p (point-min)))
- (/= (frame-width) (window-width)))
+ (not (window-full-width-p)))
(fit-window-to-buffer
(selected-window)
(if (functionp temp-buffer-max-height)