emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/lua-mode c995c7a 103/468: Use beginning-of-defun-function


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode c995c7a 103/468: Use beginning-of-defun-function and end-of-defun-function variables
Date: Thu, 5 Aug 2021 04:58:16 -0400 (EDT)

branch: elpa/lua-mode
commit c995c7a32d5991dca7e2700f675617f15d12aef0
Author: Leonardo Etcheverry <leo@kalio.net>
Commit: Leonardo Etcheverry <leo@kalio.net>

    Use beginning-of-defun-function and end-of-defun-function variables
    instead of explicitly binding C-M-a and C-M-e. In addition to being
    cleaner, this gives us a working narrow-to-defun for free.
---
 lua-mode.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lua-mode.el b/lua-mode.el
index 46066ef..3c90f55 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -182,11 +182,7 @@ If the latter is nil, the keymap translates into 
`lua-mode-map' verbatim.")
             ;; backquote enables evaluating certain symbols by comma
             `(("}" . lua-electric-match)
               ("]" . lua-electric-match)
-              (")" . lua-electric-match)
-              ("C-M-a" . lua-beginning-of-proc)
-              ("C-M-e" . lua-end-of-proc)
-              ("C-M-<home>" . lua-beginning-of-proc)
-              ("C-M-<end>" . lua-end-of-proc)))
+              (")" . lua-electric-match)))
       (define-key result-map [menu-bar lua-mode] (cons "Lua" lua-mode-menu))
 
       ;; handle prefix-keyed bindings:
@@ -323,6 +319,9 @@ The following keys are bound:
     (setq mode-name "Lua")
     (setq comint-prompt-regexp lua-prompt-regexp)
     (make-local-variable 'lua-default-command-switches)
+    (set (make-local-variable 'beginning-of-defun-function)
+         'lua-beginning-of-proc)
+    (set (make-local-variable 'end-of-defun-function) 'lua-end-of-proc)
     (set (make-local-variable 'indent-line-function) 'lua-indent-line)
     (set (make-local-variable 'comment-start) lua-comment-start)
     (set (make-local-variable 'comment-start-skip) lua-comment-start-skip)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]