X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/114f9c96795aff3b51b9060d7c9c1b77debcc99a..64c4b6844f15f2b1256e0a94d4bf449a3d4b8a5a:/lisp/chistory.el diff --git a/lisp/chistory.el b/lisp/chistory.el index 3ce1d8dc3f..785e329165 100644 --- a/lisp/chistory.el +++ b/lisp/chistory.el @@ -1,10 +1,9 @@ ;;; chistory.el --- list command history -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2014 Free Software Foundation, Inc. ;; Author: K. Shane Hartman -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: convenience ;; This file is part of GNU Emacs. @@ -122,7 +121,9 @@ The buffer is left in Command History mode." (error "No command history") (command-history-mode))))) -(defvar command-history-map +(define-obsolete-variable-alias 'command-history-map + 'command-history-mode-map "24.1") +(defvar command-history-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map lisp-mode-shared-map) (suppress-keymap map) @@ -133,21 +134,11 @@ The buffer is left in Command History mode." map) "Keymap for `command-history-mode'.") -(defun command-history-mode () +(define-derived-mode command-history-mode fundamental-mode "Command History" "Major mode for listing and repeating recent commands. Keybindings: -\\{command-history-map}" - (interactive) - (Command-history-setup) - (setq major-mode 'command-history-mode) - (setq mode-name "Command History") - (use-local-map command-history-map) - (run-mode-hooks 'command-history-mode-hook)) - -(defun Command-history-setup () - (kill-all-local-variables) - (use-local-map command-history-map) +\\{command-history-mode-map}" (lisp-mode-variables nil) (set-syntax-table emacs-lisp-mode-syntax-table) (setq buffer-read-only t)) @@ -189,5 +180,4 @@ and runs the normal hook `command-history-hook'." (provide 'chistory) -;; arch-tag: c201a0cd-89f2-4d39-a532-4cb309391dbd ;;; chistory.el ends here