Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename some functions; remove mention of nxhtml until it's in ELPA.

  • Loading branch information...
commit d7bdec66b04028f6a73c76c723f5c1f92342e89c 1 parent ce49c61
@technomancy authored
View
4 starter-kit-bindings.el
@@ -29,7 +29,7 @@
(global-set-key "\C-\M-r" 'isearch-backward)
;; Jump to a definition in the current file. (This is awesome.)
-(global-set-key "\C-x\C-i" 'ido-goto-symbol)
+(global-set-key "\C-x\C-i" 'ido-imenu)
;; File finding
(global-set-key (kbd "C-x M-f") 'ido-find-file-other-window)
@@ -49,7 +49,7 @@
(define-key read-expression-map (kbd "TAB") 'lisp-complete-symbol)
(define-key lisp-mode-shared-map (kbd "RET") 'reindent-then-newline-and-indent)
(define-key lisp-mode-shared-map (kbd "C-\\") 'lisp-complete-symbol)
-(define-key lisp-mode-shared-map (kbd "C-c s") 'my-eval-and-replace)
+(define-key lisp-mode-shared-map (kbd "C-c s") 'eval-and-replace)
(define-key lisp-mode-shared-map (kbd "C-c v") 'eval-buffer)
;; Start eshell or switch to it if it's active.
View
29 starter-kit-defuns.el
@@ -2,9 +2,10 @@
;;
;; Part of the Emacs Starter Kit
-;; Network
-
(require 'thingatpt)
+(require 'imenu)
+
+;; Network
(defun view-url ()
"Open a new buffer containing the contents of URL."
@@ -17,15 +18,9 @@
(cond ((search-forward "<?xml" nil t) (xml-mode))
((search-forward "<html" nil t) (html-mode)))))
-(defun map-coords (lat lng)
- "Show a Yahoo map marked with the point LAT by LNG."
- (interactive "BLatitude: \nBLongitude")
- (browse-url (format "http://maps.yahoo.com/maps_result?mag=12&lat=%s&lon=%s"
- lat lng)))
-
;; Buffer-related
-(defun ido-goto-symbol ()
+(defun ido-imenu ()
"Update the imenu index and then use ido to select a symbol to navigate to."
(interactive)
(imenu--make-index-alist)
@@ -55,7 +50,7 @@
(position (cdr (assoc selected-symbol name-and-pos))))
(goto-char position))))
-(defun my-coding-hook ()
+(defun coding-hook ()
"Enable things that are convenient across all coding buffers."
(set (make-local-variable 'comment-auto-fill-only-comments) t)
(make-local-variable 'column-number-mode)
@@ -92,7 +87,7 @@
;; Other
-(defun my-eval-and-replace ()
+(defun eval-and-replace ()
"Replace the preceding sexp with its value."
(interactive)
(backward-kill-sexp)
@@ -102,10 +97,12 @@
(error (message "Invalid expression")
(insert (current-kill 0)))))
-(defun my-recompile-init ()
- "Byte-compile everything in ~/.emacs.d again."
+(defun recompile-init ()
+ "Byte-compile all your dotfiles again."
(interactive)
- (byte-recompile-directory (expand-file-name "~/.emacs.d") 0))
+ (byte-recompile-directory dotfiles-dir 0)
+ ;; TODO: remove elpa-to-submit once everything's submitted.
+ (byte-recompile-directory (concat dotfiles-dir "elpa-to-submit/" 0)))
(defun regen-autoloads ()
"Regenerate the autoload definitions file if necessary and load it."
@@ -146,9 +143,5 @@
(switch-to-buffer buffer)
(funcall function))))
-(if (eq window-system 'x)
- (defun handle-shift-selection (&rest args)
- "Fix a bug that occurs when caps-lock is remapped to ctrl in X."))
-
(provide 'starter-kit-defuns)
;;; starter-kit-defuns.el ends here
View
4 starter-kit-lisp.el
@@ -3,8 +3,8 @@
;; Part of the Emacs Starter Kit
(add-hook 'emacs-lisp-mode-hook 'eldoc-mode)
-(add-hook 'emacs-lisp-mode-hook 'my-coding-hook)
-(add-hook 'lisp-mode-hook 'my-coding-hook)
+(add-hook 'emacs-lisp-mode-hook 'coding-hook)
+(add-hook 'lisp-mode-hook 'coding-hook)
(add-hook 'emacs-lisp-mode-hook 'emacs-lisp-remove-elc-on-save)
View
4 starter-kit-misc.el
@@ -87,8 +87,8 @@
(add-to-list 'auto-mode-alist '("\\.js\\(on\\)?$" . js2-mode))
(add-to-list 'auto-mode-alist '("\\.xml$" . nxml-mode))
-(add-to-list 'auto-mode-alist '("\\.html$" . nxhtml-mode))
-(add-to-list 'auto-mode-alist '("\\.rhtml$" . nxhtml-mode))
+(add-to-list 'auto-mode-alist '("\\.html$" . html-mode))
+(add-to-list 'auto-mode-alist '("\\.rhtml$" . html-mode))
;; Cosmetics
View
2  starter-kit-ruby.el
@@ -30,7 +30,7 @@
(delete-region (point-min) (point-max))))))
(ad-activate 'ruby-do-run-w/compilation)))
-(add-hook 'ruby-mode-hook 'my-coding-hook)
+(add-hook 'ruby-mode-hook 'coding-hook)
;; TODO: set up ri
;; TODO: electric
Please sign in to comment.
Something went wrong with that request. Please try again.