diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-08-11 04:51:22 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-08-11 04:51:22 +0200 |
commit | 3e54d15d6beda52264973ad05b34edd17b985b0e (patch) | |
tree | 46de5d021c56c690d4fa7786196e81b1424e8721 | |
parent | f4de99cb186b29b77e061acc25640ee8a16bf5c1 (diff) |
emacs: Use ‘x’ instead of ‘_’ in ‘mm-for-each’
Emacs will issue warnings if I actually use the ‘_’ variable since it’s
meant to be used for unused vars. I did not know that lol.
-rw-r--r-- | .config/emacs/config.org | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/.config/emacs/config.org b/.config/emacs/config.org index 67cec9e..1998211 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -187,7 +187,7 @@ make it just that little bit easier for me: "Execute BODY for each element of SEQUENCE. The variable ‘_’ is automatically set to the current subject of the iteration." (declare (indent defun)) - `(mapc (lambda (_) ,@body) ,sequence)) + `(mapc (lambda (x) ,@body) ,sequence)) #+END_SRC @@ -542,7 +542,7 @@ want this /everywhere/. (show-paren-mode -1) (mm-for-each (mapcar #'mm-mode-to-hook mm-highlight-matching-parenthesis-modes) - (add-hook _ #'show-paren-local-mode)) + (add-hook x #'show-paren-local-mode)) #+END_SRC @@ -571,9 +571,9 @@ display line numbers in certain modes. "A list of modes for which line numbers shouldn’t be displayed.") (mm-for-each (mapcar #'mm-mode-to-hook mm-enable-line-numbers-modes) - (add-hook _ #'display-line-numbers-mode)) + (add-hook x #'display-line-numbers-mode)) (mm-for-each (mapcar #'mm-mode-to-hook mm-disable-line-numbers-modes) - (add-hook _ (λ (display-line-numbers-mode -1)))) + (add-hook x (λ (display-line-numbers-mode -1)))) #+END_SRC @@ -790,8 +790,8 @@ with a custom function that reads a list of mode-specific indentation settings. "Apply the indentation settings specified by ‘mm-indentation-settings’." (interactive) (mm-for-each mm-indentation-settings - (let* ((mode (car _)) - (args (cdr _)) + (let* ((mode (car x)) + (args (cdr x)) (width (plist-get args :width)) (tabs (plist-get args :tabs)) (extra (plist-get args :extra-vars)) @@ -799,7 +799,7 @@ with a custom function that reads a list of mode-specific indentation settings. (λ (indent-tabs-mode (or tabs -1)) (setq-local tab-width width evil-shift-width width) - (mm-for-each extra (setq _ width))))) + (mm-for-each extra (setq x width))))) (add-hook (mm-mode-to-hook mode) callback 95) (add-hook (mm-mode-to-ts-mode mode) callback 95)))) |