Anonymous avatar Anonymous committed 747a782

* Typopunct now only on autoload
* Added emacs-lisp-mode.el helper file.

Comments (0)

Files changed (3)


+(setq my-emacs-lisp-open-line-list '(
+                                    if
+                                    when
+                                    unless
+                                    defun
+                                    defmacro
+                                    defvar
+                                    defcustom
+                                    let
+                                    let*
+                                    ))
+(defun my-emacs-lisp-open-line ()
+  "Opens a new line if the point is at the closing parens of
+function on `my-emacs-lisp-open-line-list'."
+  (interactive)
+  (open-next-line)
+  (when (save-excursion
+          (forward-char)
+          (backward-sexp)
+          (member (car (sexp-at-point)) my-emacs-lisp-open-line-list))
+    (newline)
+    (indent-according-to-mode)
+    (previous-line)))
+(defun my-emacs-lisp-init ()
+  (define-key emacs-lisp-mode-map (kbd "RET") 'my-emacs-lisp-open-line)
+  )
+(add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-init)
 (defun init-text-based-modes ()
-  (progn (my-buffer-face-mode-variable)
-         (setq cursor-type 'bar)
-         (setq indent-tabs-mode t)
-         (turn-on-visual-line-mode)
-         (require 'typopunct)
-         (typopunct-change-language 'english)
-         (typopunct-mode 1)))
+  (my-buffer-face-mode-variable)
+  (setq cursor-type 'bar)
+  (setq indent-tabs-mode t)
+  (turn-on-visual-line-mode))
 ;; ... but not in Org tables
 (set-face-attribute 'org-table nil :inherit 'fixed-pitch)
 (load "files/undo-tree")
 (load "files/expand-region")
+(load "files/emacs-lisp-mode")
 ;; vendor
 (vendor 'smex)
 (vendor 'yasnippet)
 (vendor 'haskell-mode)
-(vendor 'typopunct)
+(vendor 'typopunct 'typopunct-change-language 'typopunct-mode)
 (vendor 'wc-mode)
 (vendor 'ace-jump-mode)
 (vendor 'revbufs)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.