[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode bc77e16 240/486: remove emacs 23 support
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode bc77e16 240/486: remove emacs 23 support |
Date: |
Sat, 7 Aug 2021 09:25:27 -0400 (EDT) |
branch: elpa/rust-mode
commit bc77e168478d0588b238f06c9c8301992b605044
Author: Tom Tromey <tom@tromey.com>
Commit: Tom Tromey <tom@tromey.com>
remove emacs 23 support
This removes the various Emacs 23 compatibility hacks.
Fixes #137.
Fixes #139.
This also obsoletes PR #141.
---
.travis.yml | 14 --------------
rust-mode-tests.el | 5 +++--
rust-mode.el | 16 ++++------------
3 files changed, 7 insertions(+), 28 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 04231a7..2b6e3fb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,16 +2,10 @@ language: generic
env:
matrix:
- - EMACS=emacs23
- EMACS=emacs24
- EMACS=emacs-snapshot
install:
- - if [ "$EMACS" = 'emacs23' ]; then
- sudo apt-get -qq update &&
- sudo apt-get -qq -f install &&
- sudo apt-get -qq install emacs23-gtk emacs23-el;
- fi
- if [ "$EMACS" = 'emacs24' ]; then
sudo add-apt-repository -y ppa:cassou/emacs &&
sudo apt-get -qq update &&
@@ -26,14 +20,6 @@ install:
sudo apt-get -qq install emacs-snapshot-el;
fi
-# Emacs 23 does not come with ERT. Download it and have emacs find it
-before_script:
- - if [ "$EMACS" = 'emacs23' ]; then
- curl -Os
https://raw.githubusercontent.com/ohler/ert/c619b56c5bc6a866e33787489545b87d79973205/lisp/emacs-lisp/ert.el
&&
- export EMACSLOADPATH=$(emacs -batch -eval "(princ (mapconcat 'identity
load-path \":\"))") &&
- export EMACSLOADPATH="$EMACSLOADPATH:$PWD";
- fi
-
script:
- ./run_rust_emacs_tests.sh
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index a99d36b..2c0431c 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -2524,8 +2524,9 @@ Fontification needs to include this whole string or none
of it.
;; no error--the tests will be skipped.
(require 'elec-pair nil t)
-;; The emacs 23 version of ERT does not have test skipping functionality. So
-;; don't even define these tests if elec-pair is not available.
+;; The emacs 23 and 24 versions of ERT do not have test skipping
+;; functionality. So don't even define these tests if elec-pair is
+;; not available.
(when (featurep 'elec-pair)
(defun test-electric-pair-insert (original point-pos char closer)
(let ((old-electric-pair-mode electric-pair-mode))
diff --git a/rust-mode.el b/rust-mode.el
index c770f61..42a1cfb 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -530,11 +530,7 @@ function or trait. When nil, where will be aligned with
fn or trait."
(defun rust-re-item-def (itype)
(concat (rust-re-word itype) "[[:space:]]+" (rust-re-grab rust-re-ident)))
-;; (See PR #42 -- this is just like `(regexp-opt words 'symbols)` from
-;; newer Emacs versions, but will work on Emacs 23.)
-(defun regexp-opt-symbols (words)
- (concat "\\_<" (regexp-opt words t) "\\_>"))
-(defconst rust-re-special-types (regexp-opt-symbols rust-special-types))
+(defconst rust-re-special-types (regexp-opt rust-special-types 'symbols))
(defun rust-path-font-lock-matcher (re-ident)
@@ -558,10 +554,10 @@ the desired identifiers), but does not match type
annotations \"foo::<\"."
(append
`(
;; Keywords proper
- (,(regexp-opt-symbols rust-mode-keywords) . font-lock-keyword-face)
+ (,(regexp-opt rust-mode-keywords 'symbols) . font-lock-keyword-face)
;; Special types
- (,(regexp-opt-symbols rust-special-types) . font-lock-type-face)
+ (,(regexp-opt rust-special-types 'symbols) . font-lock-type-face)
;; The unsafe keyword
("\\_<unsafe\\_>" . 'rust-unsafe-face)
@@ -1266,10 +1262,6 @@ This is written mainly to be used as
`end-of-defun-function' for Rust."
(interactive)
(setq-local rust-format-on-save nil))
-;; For compatibility with Emacs < 24, derive conditionally
-(defalias 'rust-parent-mode
- (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
-
(defvar rust-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "C-c C-f") 'rust-format-buffer)
@@ -1277,7 +1269,7 @@ This is written mainly to be used as
`end-of-defun-function' for Rust."
"Keymap for Rust major mode.")
;;;###autoload
-(define-derived-mode rust-mode rust-parent-mode "Rust"
+(define-derived-mode rust-mode prog-mode "Rust"
"Major mode for Rust code.
\\{rust-mode-map}"
- [nongnu] elpa/rust-mode 6bc1540 186/486: Support nested block comments, (continued)
- [nongnu] elpa/rust-mode 6bc1540 186/486: Support nested block comments, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 7baae9c 180/486: Merge pull request #78 from tromey/fix-issue-33, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c0e3878 183/486: Merge pull request #81 from MicahChalmer/fix-issue-80, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 75da3b0 189/486: Merge pull request #89 from MicahChalmer/fix-slow-angle-bracket-matching, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode a2e9f56 199/486: Merge pull request #84 from birkenfeld/compilation-note, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 92584c3 209/486: Fix the special case for the first line, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b76e803 208/486: Correctly indent where clauses, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 304ae4b 219/486: Change font-lock face for module names., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ae49380 221/486: Merge pull request #121 from fbergroth/integrate-rustfmt, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 315cc59 233/486: Re-indent on }, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode bc77e16 240/486: remove emacs 23 support,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 620d718 257/486: Fix #160, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode cffb950f2 258/486: [master] Remove redundant progn., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b3b0f78 259/486: Merge pull request #161 from Fanael/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ba5ff90 260/486: Merge pull request #159 from hotpxl/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f73f321 264/486: Merge pull request #163 from Wilfred/preserve_point_rustfmt, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode cc59c83 270/486: Recognize imenu items starting with "unsafe", ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode fba7714 271/486: Handle comments when indenting method chains, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 7b32066 032/486: rust-mode.el uses the 'cl macros, so it should actually require them, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 2e671d9 040/486: revisions to emacs compilation regexp, more readable and robust., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 1962971 044/486: Correct indent with trailing spaces/comments on previous line, ELPA Syncer, 2021/08/07