From: rearman Date: Mon, 29 Jul 2024 19:02:03 +0000 (-0400) Subject: PLEASE let me use tabs X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=259829386fc7a1402b689d46b1252798d838cafc;p=emacsinit.git PLEASE let me use tabs --- diff --git a/init.el b/init.el index ea4fd86..20c48d5 100644 --- a/init.el +++ b/init.el @@ -28,9 +28,9 @@ (require 're-org) (require 're-org-defuns))) +(add-to-list 'auto-mode-alist '("\\.keymap\\'" . c-mode)) (add-hook 'c-mode-hook (lambda () (require 're-c-style))) -;; Damper bespokeniŋs (setq-default indicate-empty-lines t fill-column 80 cursor-type 'bar @@ -44,6 +44,7 @@ (delete-selection-mode t) ;; (global-sedit-mouse-mode t) (global-acme-mouse-mode t) + (setq disabled-command-function nil save-interprogram-paste-before-kill t confirm-kill-processes nil @@ -51,6 +52,7 @@ ;; Damper wayfindiŋ (windmove-default-keybindings 'control) + (setq windmove-wrap-around t windmove-create-window t) @@ -60,20 +62,20 @@ (setq recentf-max-menu-items 20) ;; Dired + (setq dired-listing-switches "-al" dired-vc-rename-file t dired-auto-revert-buffer t dired-hide-details-hide-symlink-targets nil) (add-hook 'dired-mode-hook - (lambda () + (lambda nil (dired-hide-details-mode t) (keymap-set dired-mode-map "RET" #'dired-find-alternate-file))) ;; Bookmarks (setq bookmark-save-flag 1) -;; Damperliŋ Bespokeniŋs (setq ring-bell-function 'ignore use-short-answers t use-file-dialog nil @@ -89,7 +91,6 @@ (set-scroll-bar-mode 'left) (setq frame-title-format "Poor Man's LispM") -;; Pretty-Printiŋ (setq prettify-symbols-alist '(("lambda" . 955) ("delta" . 120517) @@ -104,20 +105,20 @@ (defvaralias 'c-basic-offset 'tab-width) (defvaralias 'cperl-indent-level 'tab-width) -(advice-add 'indent-to :around - (lambda (orig-fun column &rest args) - (when (eq indent-tabs-mode 'only) - (setq column (* tab-width (round column tab-width)))) - (apply orig-fun column args))) +(add-hook 'prog-mode-hook + (lambda nil (keymap-local-set "" #'tab-to-tab-stop))) -;; Clamp-matchiŋ (setq show-paren-delay 0 show-paren-style 'expression) -(set-face-attribute 'show-paren-match nil - :foreground 'unspecified - :background 'unspecified - :underline t) +(set-face-attribute 'show-paren-match + nil + :foreground + 'unspecified + :background + 'unspecified + :underline + t) ;; Help (setq apropos-do-all t) @@ -134,11 +135,11 @@ (add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) ;; Draftwieldiŋ + (setq vc-make-backup-files t backup-by-copying t backup-directory-alist `((".*" . "~/emacs-backups/"))) -;; Backups (setq delete-old-versions t kept-new-versions 5 kept-old-versions 5) diff --git a/re/re-c-style.el b/re/re-c-style.el index d8c7733..a260fb9 100644 --- a/re/re-c-style.el +++ b/re/re-c-style.el @@ -7,22 +7,23 @@ (defun re/c-lineup-arglist-tabs-only (ignored) "Line up argument lists by tabs, not spaces. Stolen from https://kernel.org/doc/html/v4.10/process/coding-style.html" (let* ((anchor (c-langelem-pos c-syntactic-element)) - (column (c-langelem-2nd-pos c-syntactic-element)) - (offset (- (1+ column) anchor)) - (steps (floor offset c-basic-offset))) + (column (c-langelem-2nd-pos c-syntactic-element)) + (offset (- (1+ column) anchor)) + (steps (floor offset c-basic-offset))) (* (max steps 1) c-basic-offset))) (add-hook 'c-mode-common-hook - (lambda () - (c-add-style "linux-tabs-only" - '("linux" (c-offsets-alist (arglist-cont-nonempty c-lineup-gcc-asm-reg re/c-lineup-arglist-tabs-only)))))) + (lambda () + (c-add-style "linux-tabs-only" + '("linux" (c-offsets-alist (arglist-cont-nonempty c-lineup-gcc-asm-reg re/c-lineup-arglist-tabs-only)))))) (add-hook 'c-mode-hook - (lambda () - (setq indent-tabs-mode t) - (setq show-trailing-whitespace t) - (setq c-backspace-function 'backward-delete-char) - (c-set-style "linux-tabs-only"))) + (lambda () + (setq indent-tabs-mode t) + (setq show-trailing-whitespace t) + (setq c-backspace-function 'backward-delete-char) + (keymap-local-set "" #'tab-to-tab-stop) + (c-set-style "linux-tabs-only"))) (provide 're-c-style) ;;; re-c-style.el ends here