summaryrefslogtreecommitdiff
path: root/dotfiles/.emacs.d/init.el
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2024-10-09 14:19:30 -0400
committerDavid Thompson <dthompson2@worcester.edu>2024-10-09 14:19:30 -0400
commit4a4503dbec3566ec78705564b6efa7f054214a77 (patch)
tree42cab8e42d3706bbccebfd6c8a57002ee6304a25 /dotfiles/.emacs.d/init.el
parent2c2a36b47d4cadc4d22592914c7fe3dfaea5f7e5 (diff)
emacs: Remove unneeded scheme-indent-function hack.
Diffstat (limited to 'dotfiles/.emacs.d/init.el')
-rw-r--r--dotfiles/.emacs.d/init.el53
1 files changed, 0 insertions, 53 deletions
diff --git a/dotfiles/.emacs.d/init.el b/dotfiles/.emacs.d/init.el
index 2b798eb..3e9a45e 100644
--- a/dotfiles/.emacs.d/init.el
+++ b/dotfiles/.emacs.d/init.el
@@ -318,59 +318,6 @@ might be bad."
;; One REPL per project, please!
(geiser-repl-per-project-p t)))
-;; Hacked to properly indent keywords. Thanks to mark_weaver.
-(defun scheme-indent-function (indent-point state)
- "Scheme mode function for the value of the variable `lisp-indent-function'.
-This behaves like the function `lisp-indent-function', except that:
-
-i) it checks for a non-nil value of the property `scheme-indent-function'
-\(or the deprecated `scheme-indent-hook'), rather than `lisp-indent-function'.
-
-ii) if that property specifies a function, it is called with three
-arguments (not two), the third argument being the default (i.e., current)
-indentation."
- (let ((normal-indent (current-column)))
- (goto-char (1+ (elt state 1)))
- (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
- (if (and (elt state 2)
- (not (looking-at "\\sw\\|\\s_")))
- ;; car of form doesn't seem to be a symbol
- (progn
- (if (not (> (save-excursion (forward-line 1) (point))
- calculate-lisp-indent-last-sexp))
- (progn (goto-char calculate-lisp-indent-last-sexp)
- (beginning-of-line)
- (parse-partial-sexp (point)
- calculate-lisp-indent-last-sexp 0 t)))
- ;; Indent under the list or under the first sexp on the same
- ;; line as calculate-lisp-indent-last-sexp. Note that first
- ;; thing on that line has to be complete sexp since we are
- ;; inside the innermost containing sexp.
- (backward-prefix-chars)
- (current-column))
- (let ((function (buffer-substring (point)
- (progn (forward-sexp 1) (point))))
- method)
- (setq method (or (get (intern-soft function) 'scheme-indent-function)
- (get (intern-soft function) 'scheme-indent-hook)))
- (cond ((or (eq method 'defun)
- (and (null method)
- (> (length function) 3)
- (string-match "\\`def" function)))
- (lisp-indent-defform state indent-point))
- ;; This next cond clause is the only change -mhw
- ((and (null method)
- (> (length function) 1)
- ; The '#' in '#:' seems to get lost, not sure why
- (string-match "\\`:" function))
- (let ((lisp-body-indent 1))
- (lisp-indent-defform state indent-point)))
- ((integerp method)
- (lisp-indent-specform method state
- indent-point normal-indent))
- (method
- (funcall method state indent-point normal-indent)))))))
-
;;;
;;; Ruby