X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/36e988461fed452432d3a921355b0e00b87fd82b..2699a55464f7b43171c7b0e64d095640904e9e21:/lisp/emacs-lisp/helper.el?ds=sidebyside diff --git a/lisp/emacs-lisp/helper.el b/lisp/emacs-lisp/helper.el index d2f7100fe1..6a59742932 100644 --- a/lisp/emacs-lisp/helper.el +++ b/lisp/emacs-lisp/helper.el @@ -1,17 +1,19 @@ ;;; helper.el --- utility help package supporting help in electric modes -;; Copyright (C) 1985 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, +;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF ;; Keywords: help +;; Package: emacs ;; This file is part of GNU Emacs. -;; GNU Emacs is free software; you can redistribute it and/or modify +;; 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) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,9 +21,9 @@ ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; along with GNU Emacs. If not, see . + +;;; Commentary: ;;; Code: @@ -74,8 +76,8 @@ "Delete scrolls back. Other keys %s" "Type anything to %s")) blurb) - (setq continue (read-char)) - (cond ((and (memq continue '(?\ ?\C-v)) (< state 2)) + (setq continue (read-event)) + (cond ((and (memq continue '(?\s ?\C-v)) (< state 2)) (scroll-up)) ((= continue ?\C-l) (recenter)) @@ -117,10 +119,9 @@ (defun Helper-describe-mode () "Describe the current mode." (interactive) - (let ((name mode-name) + (let ((name (format-mode-line mode-name)) (documentation (documentation major-mode))) - (save-excursion - (set-buffer (get-buffer-create "*Help*")) + (with-current-buffer (get-buffer-create "*Help*") (setq buffer-read-only nil) (erase-buffer) (insert name " Mode\n" documentation) @@ -155,4 +156,5 @@ (provide 'helper) +;; arch-tag: a0984577-d3e9-4124-ae0d-c46fe740f6a9 ;;; helper.el ends here