prettify-symbols-mode in favor of pretty-lambdada

This commit is contained in:
Lars Tveito 2015-09-30 00:07:48 +02:00
parent 571fd39ef5
commit 42a85ab864

View File

@ -184,7 +184,6 @@
org ; Outline-based notes management and organizer org ; Outline-based notes management and organizer
paredit ; minor mode for editing parentheses paredit ; minor mode for editing parentheses
pdf-tools ; Emacs support library for PDF files. pdf-tools ; Emacs support library for PDF files.
pretty-lambdada ; the word `lambda' as the Greek letter.
projectile ; Manage and navigate projects in Emacs easily projectile ; Manage and navigate projects in Emacs easily
slime ; Superior Lisp Interaction Mode for Emacs slime ; Superior Lisp Interaction Mode for Emacs
try)) ; Try out Emacs packages try)) ; Try out Emacs packages
@ -235,7 +234,6 @@
ob-matlab ; org-babel matlab ob-matlab ; org-babel matlab
ox-latex ; the latex-exporter (from org) ox-latex ; the latex-exporter (from org)
ox-md ; Markdown exporter (from org) ox-md ; Markdown exporter (from org)
pretty-lambdada ; show 'lambda' as the greek letter.
recentf ; recently opened files recentf ; recently opened files
tex-mode)) ; TeX, LaTeX, and SliTeX mode commands tex-mode)) ; TeX, LaTeX, and SliTeX mode commands
(idle-require feature)) (idle-require feature))
@ -358,6 +356,7 @@
column-number-mode ; Show column number in mode line column-number-mode ; Show column number in mode line
global-company-mode ; Auto-completion everywhere global-company-mode ; Auto-completion everywhere
global-git-gutter-mode ; Show changes latest commit global-git-gutter-mode ; Show changes latest commit
global-prettify-symbols-mode ; Greek letters should look greek
delete-selection-mode ; Replace selected text delete-selection-mode ; Replace selected text
dirtrack-mode ; directory tracking in *shell* dirtrack-mode ; directory tracking in *shell*
recentf-mode ; Recently opened files recentf-mode ; Recently opened files
@ -439,6 +438,16 @@
(set-face-background (car p) (cdr p))) (set-face-background (car p) (cdr p)))
#+END_SRC #+END_SRC
New in Emacs 24.4 is the =prettify-symbols-mode=! It's neat.
#+BEGIN_SRC emacs-lisp
(setq-default prettify-symbols-alist '(("lambda" . ?λ)
("delta" . ?Δ)
("gamma" . ?Γ)
("phi" . ?φ)
("psi" . ?ψ)))
#+END_SRC
** PDF Tools ** PDF Tools
[[https://github.com/politza/pdf-tools][PDF Tools]] makes a huge improvement on the built-in [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Document-View.html][doc-view-mode]]; the only [[https://github.com/politza/pdf-tools][PDF Tools]] makes a huge improvement on the built-in [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Document-View.html][doc-view-mode]]; the only
@ -911,24 +920,18 @@
** Lisp ** Lisp
=Pretty-lambda= provides a customizable variable I use =Paredit= when editing lisp code, we enable this for all lisp-modes.
=pretty-lambda-auto-modes= that is a list of common lisp modes. Here we
can add some extra lisp-modes. We run the =pretty-lambda-for-modes=
function to activate =pretty-lambda-mode= in lisp modes.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(dolist (mode '(slime-repl-mode geiser-repl-mode ielm-mode clojure-mode (dolist (mode '(cider-repl-mode
cider-repl-mode)) clojure-mode
(add-to-list 'pretty-lambda-auto-modes mode)) ielm-mode
geiser-repl-mode
(pretty-lambda-for-modes) slime-repl-mode
#+END_SRC lisp-mode
emacs-lisp-mode
I use =Paredit= when editing lisp code, we enable this for all lisp-modes lisp-interaction-mode
in the =pretty-lambda-auto-modes= list. scheme-mode))
#+BEGIN_SRC emacs-lisp
(dolist (mode pretty-lambda-auto-modes)
;; add paredit-mode to all mode-hooks ;; add paredit-mode to all mode-hooks
(add-hook (intern (concat (symbol-name mode) "-hook")) 'paredit-mode)) (add-hook (intern (concat (symbol-name mode) "-hook")) 'paredit-mode))
#+END_SRC #+END_SRC