Skip to content

Commit d3a2ebf

Browse files
author
Bozhidar Batsov
committed
Drop Emacs 23 support
1 parent 51c2028 commit d3a2ebf

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ or if you'd rather keep it in your dotfiles:
5151
(package-install 'clojure-mode))
5252
```
5353

54-
On Emacs 23 you will need to get [package.el](http://bit.ly/pkg-el23)
55-
yourself or install manually by placing `clojure-mode.el` on your `load-path`
56-
and `require`ing it.
57-
5854
### Extra font-locking
5955

6056
Prior to version 3.0 `clojure-mode` bundled **unreliable**

clojure-mode.el

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; clojure-mode.el --- Major mode for Clojure code
1+
;;; clojure-mode.el --- Major mode for Clojure code -*- lexical-binding: t; -*-
22

33
;; Copyright © 2007-2014 Jeffrey Chu, Lennart Staflin, Phil Hagelberg
44
;; Copyright © 2013-2014 Bozhidar Batsov
@@ -10,6 +10,7 @@
1010
;; URL: http://github.com/clojure-emacs/clojure-mode
1111
;; Version: 3.0.0-cvs
1212
;; Keywords: languages clojure clojurescript lisp
13+
;; Package-Requires: ((emacs "24.1"))
1314

1415
;; This file is not part of GNU Emacs.
1516

@@ -216,10 +217,6 @@ describing the last `clojure-load-file' or `clojure-compile-file' command.")
216217
(interactive)
217218
(message "clojure-mode (version %s)" clojure-mode-version))
218219

219-
;; For compatibility with Emacs < 24, derive conditionally
220-
(defalias 'clojure-parent-mode
221-
(if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
222-
223220
(defun clojure-space-for-delimiter-p (endp delim)
224221
"Prevent paredit from inserting useless spaces.
225222
See `paredit-space-for-delimiter-predicates' for the meaning of
@@ -274,7 +271,7 @@ ENDP and DELIMITER."
274271
'clojure-no-space-after-tag)))
275272

276273
;;;###autoload
277-
(define-derived-mode clojure-mode clojure-parent-mode "Clojure"
274+
(define-derived-mode clojure-mode prog-mode "Clojure"
278275
"Major mode for editing Clojure code.
279276
280277
\\{clojure-mode-map}"
@@ -290,8 +287,6 @@ ENDP and DELIMITER."
290287
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
291288
(setq-local indent-line-function 'clojure-indent-line)
292289
(setq-local lisp-indent-function 'clojure-indent-function)
293-
(when (< emacs-major-version 24)
294-
(setq-local forward-sexp-function 'clojure-forward-sexp))
295290
(setq-local lisp-doc-string-elt-property 'clojure-doc-string-elt)
296291
(setq-local inferior-lisp-program clojure-inf-lisp-command)
297292
(setq-local parse-sexp-ignore-comments t)
@@ -613,27 +608,6 @@ point) to check."
613608

614609

615610

616-
(defun clojure-forward-sexp (n)
617-
"Move forward across one balanced Clojure expression (sexp).
618-
619-
It treats record literals like #user.Foo[1] and #user.Foo{:size 1}
620-
as a single sexp so that CIDER will send them properly.
621-
622-
This behavior may not be intuitive when the user presses C-M-f, but
623-
since these are single objects this behavior is okay."
624-
(let ((dir (if (> n 0) 1 -1))
625-
(forward-sexp-function nil)) ; force the built-in version
626-
(while (not (zerop n))
627-
(forward-sexp dir)
628-
(when (save-excursion ; move back to see if we're in a record literal
629-
(and
630-
(condition-case nil
631-
(progn (backward-sexp) 't)
632-
('scan-error nil))
633-
(looking-at "#\\w")))
634-
(forward-sexp dir)) ; if so, jump over it
635-
(setq n (- n dir)))))
636-
637611
(defun clojure-indent-line ()
638612
"Indent current line as Clojure code."
639613
(if (clojure-in-docstring-p)

0 commit comments

Comments
 (0)