Skip to content

Commit 042bf99

Browse files
author
Victor Oliveira Nascimento
committed
chore(cleanup): remove Emacs 24 hack not supported anymore
Since we are only building for 25+ we can remove this now.
1 parent 6f61e04 commit 042bf99

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

elixir-smie.el

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -28,45 +28,6 @@
2828
(require 'smie) ; Simple minded indentation engine
2929
(require 'cl-lib) ; `cl-flet'
3030

31-
;; HACK: Patch for Emacs 24.3 smie that fix
32-
;; https://github.com/elixir-editors/emacs-elixir/issues/107.
33-
;;
34-
;; defadvice is used to change the behavior only for elixir-mode.
35-
;; Definition of advice is a definition of corresponding function
36-
;; in Emacs 24.4.
37-
(when (and (= 24 emacs-major-version)
38-
(= 3 emacs-minor-version))
39-
(defadvice smie-rule-parent (around elixir-mode-patch activate)
40-
(if (not (eq major-mode 'elixir-mode))
41-
(progn ad-do-it)
42-
(setq ad-return-value
43-
(save-excursion
44-
(goto-char (cadr (smie-indent--parent)))
45-
(cons 'column
46-
(+ (or offset 0)
47-
(smie-indent-virtual)))))))
48-
49-
(defadvice smie-indent-comment (around elixir-mode-patch activate)
50-
(if (not (eq major-mode 'elixir-mode))
51-
(progn ad-do-it)
52-
(setq ad-return-value
53-
(and (smie-indent--bolp)
54-
(let ((pos (point)))
55-
(save-excursion
56-
(beginning-of-line)
57-
(and (re-search-forward comment-start-skip (line-end-position) t)
58-
(eq pos (or (match-end 1) (match-beginning 0))))))
59-
(save-excursion
60-
(forward-comment (point-max))
61-
(skip-chars-forward " \t\r\n")
62-
(unless
63-
(save-excursion
64-
(let ((next (funcall smie-forward-token-function)))
65-
(or (if (zerop (length next))
66-
(or (eobp) (eq (car (syntax-after (point))) 5)))
67-
(rassoc next smie-closer-alist))))
68-
(smie-indent-calculate))))))))
69-
7031
;; In Emacs 27, ppss became a structure and has proper accessors.
7132

7233
(defalias 'elixir-ppss-depth

0 commit comments

Comments
 (0)