about summary refs log tree commit diff stats
path: root/lisp/acdw.el
diff options
context:
space:
mode:
authorCase Duckworth2021-09-08 08:01:53 -0500
committerCase Duckworth2021-09-08 08:01:53 -0500
commit71507e81f74c449d732abcf0073808302552da81 (patch)
tree2b84b604cf9121285256cfe4e6d4bb6db9659006 /lisp/acdw.el
parentMake acdw.el package-lint compliant (diff)
downloademacs-71507e81f74c449d732abcf0073808302552da81.tar.gz
emacs-71507e81f74c449d732abcf0073808302552da81.zip
Add goto-{last|first}-row
Diffstat (limited to 'lisp/acdw.el')
-rw-r--r--lisp/acdw.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 4f91e24..cdd4110 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -104,6 +104,21 @@ FILENAME and CONFIRM are passed directly to `write-file'."
104 (write-file filename confirm)) 104 (write-file filename confirm))
105 (switch-to-buffer buf))) 105 (switch-to-buffer buf)))
106 106
107;; https://old.reddit.com/r/emacs/comments/pjwkts
108(defun acdw/goto-last-row ()
109 "Move point to last row of buffer, but save the column."
110 (interactive)
111 (let ((col (current-column)))
112 (goto-char (point-max))
113 (move-to-column col t)))
114
115(defun acdw/goto-first-row ()
116 "Move point to first row of buffer, but save the column."
117 (interactive)
118 (let ((col (current-column)))
119 (goto-char (point-min))
120 (move-to-column col t)))
121
107(defun dos2unix (buffer) 122(defun dos2unix (buffer)
108 "Replace \r\n with \n in BUFFER." 123 "Replace \r\n with \n in BUFFER."
109 (interactive "*b") 124 (interactive "*b")