Use more idiomatic lisp

Replace multiple calls to setq with a single call
master
Jacopo De Simoi 7 years ago
parent 7c688a675f
commit a002b15f52
  1. 54
      global.org

@ -108,10 +108,10 @@
** Mouseless ** Mouseless
Disable mouse interaction with emacs Disable mouse interaction with emacs
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq mouse-autoselect-window nil)
(mouse-wheel-mode -1) (mouse-wheel-mode -1)
(setq mouse-yank-at-point nil) (setq mouse-autoselect-window nil
(setq focus-follows-mouse nil) mouse-yank-at-point nil
focus-follows-mouse nil)
#+END_SRC #+END_SRC
*** TODO Find out what of the above is necessary given the disable-mouse mode below *** TODO Find out what of the above is necessary given the disable-mouse mode below
Use the ~disable-mouse~ package by Steve Purcell available at Use the ~disable-mouse~ package by Steve Purcell available at
@ -147,9 +147,8 @@
** Modeline ** Modeline
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq-default mode-line-modified '(:eval (if (buffer-modified-p) "●" "·"))) ;still needs some improvements, (setq-default mode-line-modified '(:eval (if (buffer-modified-p) "●" "·")) ;Still needs some improvements, does not report Readonly state
;does not report Readonly state mode-line-remote '(:eval (let ((s (format-mode-line "%@")))
(setq-default mode-line-remote '(:eval (let ((s (format-mode-line "%@")))
(cond (cond
((equal s "-") "·") ((equal s "@") "@") (t s))))) ((equal s "-") "·") ((equal s "@") "@") (t s)))))
@ -162,13 +161,29 @@
(status (cond ((equal s "-") "") ((equal s ":") "!") (t s)))) (status (cond ((equal s "-") "") ((equal s ":") "!") (t s))))
(concat "·" branch status))) (concat "·" branch status)))
face magit-branch-local)))) face magit-branch-local))))
(put 'wilder-buffer-vc-mode-line 'risky-local-variable t)
(defvar wilder-position (defvar wilder-position
'("[%p·%I] " )) '("[%p·%I] " ))
(put 'wilder-buffer-vc-mode-line 'risky-local-variable t)
(put 'wilder-position 'risky-local-variable t) (put 'wilder-position 'risky-local-variable t)
(defvar wilder/mode-line-modes
(let ((recursive-edit-help-echo "Recursive edit, type C-M-c to get out"))
(list (propertize "%[" 'help-echo recursive-edit-help-echo)
'("" mode-name)
'("" mode-line-process)
" "
'("" minor-mode-alist)
(propertize "%n" 'help-echo "mouse-2: Remove narrowing from buffer"
'mouse-face 'mode-line-highlight
'local-map (make-mode-line-mouse-map
'mouse-2 #'mode-line-widen))
(propertize "%]" 'help-echo recursive-edit-help-echo)
" "))
"Mode line construct for displaying major and minor modes.")
(put 'wilder/mode-line-modes 'risky-local-variable t)
(setq-default mode-line-format (setq-default mode-line-format
'("%e" '("%e"
mode-line-front-space mode-line-front-space
@ -177,8 +192,9 @@
mode-line-remote mode-line-remote
mode-line-frame-identification mode-line-frame-identification
wilder-buffer-vc-mode-line " " wilder-buffer-vc-mode-line " "
wilder-position " " wilder-position
mode-line-modes " "
wilder/mode-line-modes
mode-line-misc-info mode-line-misc-info
mode-line-end-spaces)) mode-line-end-spaces))
#+END_SRC #+END_SRC
@ -323,8 +339,8 @@
Tabs are evil; get rid of them Tabs are evil; get rid of them
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq c-basic-offset 4) (setq c-basic-offset 4)
(setq-default tab-width 4) (setq-default tab-width 4
(setq-default indent-tabs-mode nil) indent-tabs-mode nil)
#+END_SRC #+END_SRC
*** TODO Have a look at ws-trim.el *** TODO Have a look at ws-trim.el
It is conf'ble to avoid removing whitespace from lines that were not It is conf'ble to avoid removing whitespace from lines that were not
@ -454,10 +470,10 @@
(lambda () (lambda ()
(calendar-set-date-style 'european))) (calendar-set-date-style 'european)))
;; first day of the week is monday instead of sunday: ;; first day of the week is monday instead of sunday:
(setq calendar-week-start-day 1) (setq calendar-week-start-day 1
(setq calendar-location-name "Toronto, ON Canada") calendar-location-name "Toronto, ON Canada"
(setq calendar-latitude 43.7) calendar-latitude 43.7
(setq calendar-longitude -79.4) calendar-longitude -79.4)
#+END_SRC #+END_SRC
** Use system proxy ** Use system proxy
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -766,10 +782,10 @@
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(eval-after-load "reftex" (eval-after-load "reftex"
'(progn '(progn
(define-key reftex-mode-map (kbd "C-c [") nil) (setq reftex-cite-format "~\\cite{%l}"
(setq reftex-plug-into-AUCTeX (quote (t t nil t t))) reftex-plug-into-AUCTeX (quote (t t nil t t))
(setq reftex-insert-label-flags '(t t)) reftex-insert-label-flags '(t t)
(setq reftex-label-alist reftex-label-alist
'(("thm" ?t "thm:" "~\\ref{%s}" thm (regexp "theorems?")) '(("thm" ?t "thm:" "~\\ref{%s}" thm (regexp "theorems?"))
("lem" ?l "lem:" "~\\ref{%s}" lem (regexp "lemma{ta}?")) ("lem" ?l "lem:" "~\\ref{%s}" lem (regexp "lemma{ta}?"))
("prop" ?p "prp:" "~\\ref{%s}" prp (regexp "propositions?")) ("prop" ?p "prp:" "~\\ref{%s}" prp (regexp "propositions?"))

Loading…
Cancel
Save