X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/ed7f1a6c5caaf4159125c08db5d18c5471fdd032..5c92e00da487df29752ec5dc21bc59fca2598626:/lisp/chistory.el diff --git a/lisp/chistory.el b/lisp/chistory.el index 09f6e205cd..3d10aff16e 100644 --- a/lisp/chistory.el +++ b/lisp/chistory.el @@ -1,6 +1,6 @@ ;;; chistory.el --- list command history -;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2014 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF @@ -121,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) @@ -132,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))