summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-01-08 23:20:39 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-01-08 23:20:39 -0700
commit17959e71079c2a53cc49c25a554fbcb50ae5c929 (patch)
tree0716a725830371d3ef1b698391644510cef5f3c7
parentcd70ff25deeaeaea7d48becc67f9aa42411a790d (diff)
emacs: Add new config stuff
-rw-r--r--.config/emacs/init.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index bd4ac42..ef6d542 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -472,5 +472,14 @@ sh-script.el is broken."
(add-to-list 'load-path (concat user-emacs-directory "go-template-mode"))
(require 'go-template-mode))
+(defun hex2dec-region (beg end)
+ "Convert the region from hexadecimal to decimal."
+ (interactive "r")
+ (let ((hex-str (buffer-substring beg end)))
+ (delete-region beg end)
+ (insert (number-to-string (string-to-number hex-str 16)))))
+
;; Anything that gets magically appended ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(put 'upcase-region 'disabled nil)
+(put 'downcase-region 'disabled nil)