Replace mapcar with dolist where appropriate

master
Jacopo De Simoi 4 years ago
parent c34b2c10d0
commit 6f11c99ea3
  1. 29
      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" "<M-f4>" "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" "<M-f4>" "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. ~<el TAB~) )is implemented by
~org-tempo~, so I need to require that as well.
#+begin_src emacs-lisp
(mapcar (lambda (structure-template)
(add-to-list 'org-structure-template-alist
structure-template))
'(("el" . "src emacs-lisp")
("sh" . "src sh")
("ss" . "src scheme")
("py" . "src python")))
(dolist (structure-template '(("el" . "src emacs-lisp")
("sh" . "src sh")
("ss" . "src scheme")
("py" . "src python")))
(add-to-list 'org-structure-template-alist structure-template))
(require 'org-tempo)
#+end_src
Fontify src blocks
@ -1656,9 +1652,8 @@
("C-x n c" . narrow-between-comments)
("C-S-v" . backward-paragraph)))
(mapcar (lambda (ch)
(define-key LaTeX-mode-map (kbd ch) 'insert-char-with-padding))
'("=" "≠" ">" "<" "≥" "≤" "⇒" "∩" "∪" "∨" "∧" "×" "⊂" "⊃"))
(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)

Loading…
Cancel
Save