[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/kotlin-mode 4e9da8b409 2/5: Address linter warnings.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/kotlin-mode 4e9da8b409 2/5: Address linter warnings. |
Date: |
Mon, 23 Jan 2023 15:00:07 -0500 (EST) |
branch: elpa/kotlin-mode
commit 4e9da8b4095d481d3505a157aab3fc5ed81c8c9c
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>
Address linter warnings.
---
.dir-locals.el | 3 ++-
kotlin-mode-indent.el | 4 ----
kotlin-mode-lexer.el | 2 --
kotlin-mode.el | 12 +++++++++++-
4 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/.dir-locals.el b/.dir-locals.el
index ffd8cc1382..b3fb854d9c 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -4,4 +4,5 @@
(fill-column . 80)
(tab-width . 8)
(sentence-end-double-space . t)
- (emacs-lisp-docstring-fill-column . 75))))
+ (emacs-lisp-docstring-fill-column . 75)
+ (elisp-lint-indent-specs .
((kotlin-mode--save-mark-and-excursion . 0))))))
diff --git a/kotlin-mode-indent.el b/kotlin-mode-indent.el
index 0ca7802ad8..9501ebdd25 100644
--- a/kotlin-mode-indent.el
+++ b/kotlin-mode-indent.el
@@ -3,10 +3,6 @@
;; Copyright (C) 2019 taku0
;; Authors: taku0 (http://github.com/taku0)
-;; Keywords: languages
-;; Package-Requires: ((emacs "24.3"))
-;; Version: 0.0.1
-;; URL: https://github.com/Emacs-Kotlin-Mode-Maintainers/kotlin-mode
;; This file is not part of GNU Emacs.
diff --git a/kotlin-mode-lexer.el b/kotlin-mode-lexer.el
index c19e999bc4..cf1b56d595 100644
--- a/kotlin-mode-lexer.el
+++ b/kotlin-mode-lexer.el
@@ -5,8 +5,6 @@
;; Author: Shodai Yokoyama (quantumcars@gmail.com)
;; taku0 (http://github.com/taku0)
-;; Keywords: languages
-;; Package-Requires: ((emacs "24.3"))
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
diff --git a/kotlin-mode.el b/kotlin-mode.el
index eedbb35954..cdaec8ad8f 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -93,10 +93,20 @@ START and END define region within current buffer."
(interactive)
(kotlin-do-and-repl-focus 'kotlin-send-buffer))
+(defmacro kotlin-mode--save-mark-and-excursion (&rest body)
+ "Polyfill of `save-mark-and-excursion' for <25.1.
+
+For argument BODY, see `save-mark-and-excursion'."
+ (declare (indent 0) (debug t))
+ (let ((save-mark-and-excursion (if (fboundp 'save-mark-and-excursion)
+ #'save-mark-and-excursion
+ #'save-excursion)))
+ (cons save-mark-and-excursion body)))
+
(defun kotlin-send-block ()
"Send block to Kotlin interpreter."
(interactive)
- (save-mark-and-excursion
+ (kotlin-mode--save-mark-and-excursion
(mark-paragraph)
(kotlin-send-region (region-beginning) (region-end))))