From 6f11c99ea3b412c5b86b2949702d9ea9808ff631 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Fri, 20 May 2022 19:11:44 -0400 Subject: [PATCH] Replace mapcar with dolist where appropriate --- global.org | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/global.org b/global.org index 76d9ecb..e0662c1 100644 --- a/global.org +++ b/global.org @@ -392,10 +392,8 @@ Finally, unbind the ~C-SPC~ to mark the point, as I am using LR-shift Note that I will use ~C-SPC~ as a hydra below to deal with parenthesis #+begin_src emacs-lisp - (mapcar - (lambda (ch) - (global-unset-key (kbd ch))) - '("C-c C-x" "C-x C-r" "C-z" "C-x f" "C-x C-f" "" "C-M-u" "C-M-d" "C-x o" "C-SPC")) + (dolist (ch '("C-c C-x" "C-x C-r" "C-z" "C-x f" "C-x C-f" "" "C-M-u" "C-M-d" "C-x o" "C-SPC")) + (global-unset-key (kbd ch))) #+end_src Change {up,down}-list @@ -928,13 +926,12 @@ (defun concat-newline (s) (concat s "\n")) - (mapcar (lambda (fun) - (advice-add fun :around + (dolist (fun '(org-tags-view org-todo-list)) + (advice-add fun :around (lambda (orig-fun &rest args) (advice-add #'buffer-string :filter-return #'concat-newline) (apply orig-fun args) (advice-remove #'buffer-string #'concat-newline)))) - '(org-tags-view org-todo-list)) #+end_src #+begin_src emacs-lisp (advice-add #'org-agenda--insert-overriding-header :filter-args @@ -1262,13 +1259,12 @@ grew accustomed to (e.g. ~" "<" "≥" "≤" "⇒" "∩" "∪" "∨" "∧" "×" "⊂" "⊃")) + (dolist (ch '("=" "≠" ">" "<" "≥" "≤" "⇒" "∩" "∪" "∨" "∧" "×" "⊂" "⊃")) + (define-key LaTeX-mode-map (kbd ch) 'insert-char-with-padding)) ;; Move around commands in the Right Way™ (modify-syntax-entry ?\\ "w" LaTeX-mode-syntax-table)