fixed a couple of oversights

This commit is contained in:
Bozhidar Batsov 2011-10-10 17:50:23 +03:00
parent 6351407b07
commit 313056af7a
2 changed files with 15 additions and 16 deletions

View file

@ -97,7 +97,7 @@ to markdown blockquote rules (useful to copy snippets to StackOverflow, Assembla
"Copy the selected code region to the clipboard, indented according "Copy the selected code region to the clipboard, indented according
to markdown blockquote rules. Useful to add snippets under bullet points." to markdown blockquote rules. Useful to add snippets under bullet points."
(interactive "r") (interactive "r")
(indent-rigidly-and-copy-to-clipboard begin end 6)) (prelude-indent-rigidly-and-copy-to-clipboard begin end 6))
(defun prelude-insert-empty-line () (defun prelude-insert-empty-line ()
"Insert an empty line after the current line and positon "Insert an empty line after the current line and positon
@ -158,7 +158,7 @@ the curson at its beginning, according to the current mode."
(indent-region (region-beginning) (region-end)) (indent-region (region-beginning) (region-end))
(message "Indented selected region.")) (message "Indented selected region."))
(progn (progn
(indent-buffer) (prelude-indent-buffer)
(message "Indented buffer."))))) (message "Indented buffer.")))))
(defun prelude-annotate-todo () (defun prelude-annotate-todo ()
@ -401,9 +401,8 @@ there's a region, all lines that region covers will be duplicated."
(defun prelude-swap-windows () (defun prelude-swap-windows ()
"If you have 2 windows, it swaps them." "If you have 2 windows, it swaps them."
(interactive) (interactive)
(cond ((/= (count-windows) 2) (if (/= (count-windows) 2)
(message "You need exactly 2 windows to do this.")) (message "You need exactly 2 windows to do this.")
(t
(let* ((w1 (first (window-list))) (let* ((w1 (first (window-list)))
(w2 (second (window-list))) (w2 (second (window-list)))
(b1 (window-buffer w1)) (b1 (window-buffer w1))
@ -413,7 +412,7 @@ there's a region, all lines that region covers will be duplicated."
(set-window-buffer w1 b2) (set-window-buffer w1 b2)
(set-window-buffer w2 b1) (set-window-buffer w2 b1)
(set-window-start w1 s2) (set-window-start w1 s2)
(set-window-start w2 s1)))) (set-window-start w2 s1)))
(other-window 1)) (other-window 1))
(provide 'prelude-core) (provide 'prelude-core)

View file

@ -62,7 +62,7 @@
;; Indentation help ;; Indentation help
(global-set-key (kbd "C-x ^") 'join-line) (global-set-key (kbd "C-x ^") 'join-line)
(global-set-key (kbd "C-M-\\") 'indent-region-or-buffer) (global-set-key (kbd "C-M-\\") 'prelude-indent-region-or-buffer)
;; Start proced in a similar manner to dired ;; Start proced in a similar manner to dired
(global-set-key (kbd "C-x p") 'proced) (global-set-key (kbd "C-x p") 'proced)