Updated scheme section + small fix in package

This commit is contained in:
larstvei 2014-01-15 11:50:40 +01:00
parent 7f6b377f0c
commit f27cbe0aa2
3 changed files with 12 additions and 8 deletions

View File

@ -21,8 +21,9 @@ tangled, and the tangled file is compiled."
(let* ((local-pkg-desc (or (assq package package-alist)
(assq package package--builtins)))
(newest-pkg-desc (assq package package-archive-contents)))
(version-list-= (package-desc-vers (cdr local-pkg-desc))
(package-desc-vers (cdr newest-pkg-desc))))))
(and local-pkg-desc newest-pkg-desc
(version-list-= (package-desc-vers (cdr local-pkg-desc))
(package-desc-vers (cdr newest-pkg-desc)))))))
(defun upgrade-or-install-package (package)
"Unless the newest available version of PACKAGE is installed
@ -356,7 +357,7 @@ LANGUAGES (cyclic) list."
(when (executable-find ispell-program-name)
ad-do-it))
(dolist (mode '(slime-repl-mode inferior-lisp-mode inferior-scheme-mode))
(dolist (mode '(slime-repl-mode geiser-repl-mode))
(add-to-list 'pretty-lambda-auto-modes mode))
(pretty-lambda-for-modes)
@ -383,6 +384,7 @@ LANGUAGES (cyclic) list."
(add-hook 'geiser-repl-mode-hook 'ac-geiser-setup)
(eval-after-load "auto-complete"
'(add-to-list 'ac-modes 'geiser-repl-mode))
(setq geiser-active-implementations '(racket))
(defun c-setup ()
(local-set-key (kbd "C-c C-c") 'compile))

View File

@ -62,8 +62,9 @@
(let* ((local-pkg-desc (or (assq package package-alist)
(assq package package--builtins)))
(newest-pkg-desc (assq package package-archive-contents)))
(version-list-= (package-desc-vers (cdr local-pkg-desc))
(package-desc-vers (cdr newest-pkg-desc))))))
(and local-pkg-desc newest-pkg-desc
(version-list-= (package-desc-vers (cdr local-pkg-desc))
(package-desc-vers (cdr newest-pkg-desc)))))))
#+END_SRC
Let's write a function to install a package if it is not installed or
@ -682,7 +683,7 @@
function to activate =pretty-lambda-mode= in lisp modes.
#+BEGIN_SRC emacs-lisp :tangle yes
(dolist (mode '(slime-repl-mode inferior-lisp-mode inferior-scheme-mode))
(dolist (mode '(slime-repl-mode geiser-repl-mode))
(add-to-list 'pretty-lambda-auto-modes mode))
(pretty-lambda-for-modes)
@ -740,14 +741,15 @@
*** Scheme
[[http://www.nongnu.org/geiser/][Geiser]] provides features similar to Slime for Scheme editing. Everything
works pretty much out of the box, the only thing we need to add is the
auto completion.
works pretty much out of the box, we only need to add auto completion,
and specify which scheme-interpreter we prefer.
#+BEGIN_SRC emacs-lisp :tangle yes
(add-hook 'geiser-mode-hook 'ac-geiser-setup)
(add-hook 'geiser-repl-mode-hook 'ac-geiser-setup)
(eval-after-load "auto-complete"
'(add-to-list 'ac-modes 'geiser-repl-mode))
(setq geiser-active-implementations '(racket))
#+END_SRC
** Java and C

BIN
init.pdf

Binary file not shown.