Merge pull request #785 from k1-hedayati/improvments

Some bug fixes and improvments
This commit is contained in:
Bozhidar Batsov 2015-01-17 19:52:28 +02:00
commit 9ac7ccbea8
6 changed files with 13 additions and 16 deletions

View file

@ -181,16 +181,6 @@ point reaches the beginning or end of the buffer, stop there."
'display '(left-fringe right-triangle))
'modification-hooks '(prelude-todo-ov-evaporate)))
(defun prelude-copy-file-name-to-clipboard ()
"Copy the current buffer file name to the clipboard."
(interactive)
(let ((filename (if (equal major-mode 'dired-mode)
default-directory
(buffer-file-name))))
(when filename
(kill-new filename)
(message "Copied buffer file name '%s' to the clipboard." filename))))
(defun prelude-get-positions-of-line-or-region ()
"Return positions (beg . end) of the current line
or region."

View file

@ -87,8 +87,7 @@
("Files"
["Open with..." prelude-open-with]
["Delete file and buffer" prelude-delete-file-and-buffer]
["Rename buffer and file" prelude-rename-buffer-and-file]
["Copy file name to clipboard" prelude-copy-file-name-to-clipboard])
["Rename buffer and file" prelude-rename-buffer-and-file])
("Buffers"
["Clean up buffer or region" prelude-cleanup-buffer-or-region]

View file

@ -52,7 +52,6 @@
diff-hl
diminish
easy-kill
elisp-slime-nav
epl
expand-region
flycheck
@ -68,7 +67,6 @@
magit
move-text
operate-on-number
rainbow-mode
smartparens
smartrep
undo-tree
@ -76,6 +74,9 @@
zenburn-theme)
"A list of packages to ensure are installed at launch.")
(when (version<= "24.4" emacs-version)
(add-to-list 'prelude-packages '(magit-filenotify)))
(defun prelude-packages-installed-p ()
"Check if all packages in `prelude-packages' are installed."
(every #'package-installed-p prelude-packages))
@ -152,6 +153,9 @@ PACKAGE is installed only if not already present. The file is opened in MODE."
("\\.pp\\'" puppet-mode puppet-mode)
("\\.php\\'" php-mode php-mode)
("\\.proto\\'" protobuf-mode protobuf-mode)
("\\.pyd\\'" cython-mode cython-mode)
("\\.pyi\\'" cython-mode cython-mode)
("\\.pyx\\'" cython-mode cython-mode)
("PKGBUILD\\'" pkgbuild-mode pkgbuild-mode)
("\\.rs\\'" rust-mode rust-mode)
("\\.sass\\'" sass-mode sass-mode)

View file

@ -35,6 +35,8 @@
(require 'prelude-lisp)
(prelude-require-packages '(elisp-slime-nav rainbow-mode))
(defun prelude-recompile-elc-on-save ()
"Recompile your elc when saving an elisp file."
(add-hook 'after-save-hook

View file

@ -32,8 +32,6 @@
;;; Code:
(prelude-require-packages '(guru-mode))
(defun prelude-local-comment-auto-fill ()
(set (make-local-variable 'comment-auto-fill-only-comments) t))
@ -84,6 +82,9 @@ This functions should be added to the hooks of major modes for programming."
(add-hook 'prog-mode-hook (lambda ()
(run-hooks 'prelude-prog-mode-hook)))
(when (version<= "24.4" emacs-version)
(add-hook 'magit-status-mode-hook (lambda () (magit-filenotify-mode 1))))
;; enable on-the-fly syntax checking
(if (fboundp 'global-flycheck-mode)
(global-flycheck-mode +1)

View file

@ -89,6 +89,7 @@
(subword-mode +1)
(anaconda-mode)
(eldoc-mode)
(which-function-mode -1)
(setq-local electric-layout-rules
'((?: . (lambda ()
(and (zerop (first (syntax-ppss)))