From a494c2981e58e18fc655389df2558bcdb422da02 Mon Sep 17 00:00:00 2001 From: noa Date: Tue, 17 Sep 2024 10:42:14 +0800 Subject: Remove unused indentation function --- emacs/init.el | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/emacs/init.el b/emacs/init.el index 1230fc4..c45e329 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -668,20 +668,6 @@ The misspelled word is taken from OVERLAY. WORD is the corrected word." (require 'elastic-table) (add-hook 'prog-mode-hook #'elastic-table-mode) -;; Previously i used a function to naïvely copy the whitespace from the line above. This is the way that vi, nano, and acme all implement auto-indentation. However, for now i'm experimenting with using the built-in indentation functions again. I'm leaving this defun here for posterity. - -;; (defun noa/naive-return-and-indent () -;; "Insert a newline and copy the indentation of the previous line, vi/nano style." -;; (interactive) -;; (open-line 1) -;; (let* ((start (progn (beginning-of-line) (point))) -;; (indent (progn (back-to-indentation) (point))) -;; (end (progn (end-of-line) (point))) -;; (whitespace (buffer-substring start indent))) -;; (delete-trailing-whitespace start end) -;; (beginning-of-line 2) -;; (insert whitespace))) - ;; We will only be trying to indent at the start of a line, and sometimes we will want to insert a standard tab character. We can also set this option to 'complete, which will run completion at point if the region is already indented. (setopt tab-always-indent nil) -- cgit 1.4.1-2-gfad0