From: Stefan Kangas Date: Sun, 6 Nov 2022 14:40:19 +0000 (+0100) Subject: Prefer defvar-keymap in octave.el X-Git-Tag: emacs-29.0.90~1616^2~258 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9c0b90e6a927c95993a97069b28dc58c5b045e53;p=emacs.git Prefer defvar-keymap in octave.el * lisp/progmodes/octave.el (octave-mode-map): Prefer defvar-keymap. --- diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 18b98991692..bce5bc3ba7f 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -1,6 +1,6 @@ ;;; octave.el --- editing octave source files under emacs -*- lexical-binding: t; -*- -;; Copyright (C) 1997, 2001-2022 Free Software Foundation, Inc. +;; Copyright (C) 1997-2022 Free Software Foundation, Inc. ;; Author: Kurt Hornik ;; John Eaton @@ -65,43 +65,39 @@ The string `function' and its name are given by the first and third parenthetical grouping.") -(defvar octave-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "\M-." 'octave-find-definition) - (define-key map "\M-\C-j" 'octave-indent-new-comment-line) - (define-key map "\C-c\C-p" 'octave-previous-code-line) - (define-key map "\C-c\C-n" 'octave-next-code-line) - (define-key map "\C-c\C-a" 'octave-beginning-of-line) - (define-key map "\C-c\C-e" 'octave-end-of-line) - (define-key map [remap down-list] 'smie-down-list) - (define-key map "\C-c\M-\C-h" 'octave-mark-block) - (define-key map "\C-c]" 'smie-close-block) - (define-key map "\C-c/" 'smie-close-block) - (define-key map "\C-c;" 'octave-update-function-file-comment) - (define-key map "\C-hd" 'octave-help) - (define-key map "\C-ha" 'octave-lookfor) - (define-key map "\C-c\C-l" 'octave-source-file) - (define-key map "\C-c\C-f" 'octave-insert-defun) - (define-key map "\C-c\C-il" 'octave-send-line) - (define-key map "\C-c\C-ib" 'octave-send-block) - (define-key map "\C-c\C-if" 'octave-send-defun) - (define-key map "\C-c\C-ir" 'octave-send-region) - (define-key map "\C-c\C-ia" 'octave-send-buffer) - (define-key map "\C-c\C-is" 'octave-show-process-buffer) - (define-key map "\C-c\C-iq" 'octave-hide-process-buffer) - (define-key map "\C-c\C-ik" 'octave-kill-process) - (define-key map "\C-c\C-i\C-l" 'octave-send-line) - (define-key map "\C-c\C-i\C-b" 'octave-send-block) - (define-key map "\C-c\C-i\C-f" 'octave-send-defun) - (define-key map "\C-c\C-i\C-r" 'octave-send-region) - (define-key map "\C-c\C-i\C-a" 'octave-send-buffer) - (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) - (define-key map "\C-c\C-i\C-q" 'octave-hide-process-buffer) - (define-key map "\C-c\C-i\C-k" 'octave-kill-process) - map) - "Keymap used in Octave mode.") - - +(defvar-keymap octave-mode-map + :doc "Keymap used in Octave mode." + "M-." #'octave-find-definition + "C-M-j" #'octave-indent-new-comment-line + "C-c C-p" #'octave-previous-code-line + "C-c C-n" #'octave-next-code-line + "C-c C-a" #'octave-beginning-of-line + "C-c C-e" #'octave-end-of-line + " " #'smie-down-list + "C-c C-M-h" #'octave-mark-block + "C-c ]" #'smie-close-block + "C-c /" #'smie-close-block + "C-c ;" #'octave-update-function-file-comment + "C-h d" #'octave-help + "C-h a" #'octave-lookfor + "C-c C-l" #'octave-source-file + "C-c C-f" #'octave-insert-defun + "C-c C-i l" #'octave-send-line + "C-c C-i b" #'octave-send-block + "C-c C-i f" #'octave-send-defun + "C-c C-i r" #'octave-send-region + "C-c C-i a" #'octave-send-buffer + "C-c C-i s" #'octave-show-process-buffer + "C-c C-i q" #'octave-hide-process-buffer + "C-c C-i k" #'octave-kill-process + "C-c C-i C-l" #'octave-send-line + "C-c C-i C-b" #'octave-send-block + "C-c C-i C-f" #'octave-send-defun + "C-c C-i C-r" #'octave-send-region + "C-c C-i C-a" #'octave-send-buffer + "C-c C-i C-s" #'octave-show-process-buffer + "C-c C-i C-q" #'octave-hide-process-buffer + "C-c C-i C-k" #'octave-kill-process) (easy-menu-define octave-mode-menu octave-mode-map "Menu for Octave mode."