From 0a1e8e4057a55ac2d17cc0cd073cc93eb7214ce8 Mon Sep 17 00:00:00 2001 From: Jan Ehrhardt Date: Fri, 10 Jan 2014 15:40:22 +0100 Subject: [PATCH 1/7] Use ruby-mode for Podfile A Podfile is used for CocoaPods to do a Bundler like dependency management in XCode projects. Similar to a Rakefile or a Gemfile the Podfile contains a dependency description in a Ruby based DSL. --- modules/prelude-ruby.el | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/prelude-ruby.el b/modules/prelude-ruby.el index 59cb841..e5792fb 100644 --- a/modules/prelude-ruby.el +++ b/modules/prelude-ruby.el @@ -48,6 +48,7 @@ (add-to-list 'auto-mode-alist '("Thorfile\\'" . ruby-mode)) (add-to-list 'auto-mode-alist '("Vagrantfile\\'" . ruby-mode)) (add-to-list 'auto-mode-alist '("\\.jbuilder\\'" . ruby-mode)) +(add-to-list 'auto-mode-alist '("Podfile\\'" . ruby-mode)) ;; We never want to edit Rubinius bytecode (add-to-list 'completion-ignored-extensions ".rbc") From 8e573e1eb80b562ebddf0e9153079adaed4d4f91 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont" Date: Sat, 11 Jan 2014 19:16:04 +0100 Subject: [PATCH 2/7] Factor the search engine installation to ease the future install of new ones. --- core/prelude-core.el | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/core/prelude-core.el b/core/prelude-core.el index 7ce5060..e40f1f1 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -71,21 +71,16 @@ PROMPT sets the `read-string prompt." (buffer-substring (region-beginning) (region-end)) (read-string prompt)))))) -(defun prelude-google () - "Googles a query or region if any." - (interactive) - (prelude-search "http://www.google.com/search?q=" "Google: ")) +(defmacro prelude-install-search-engine (search-engine-name search-engine-url search-engine-prompt) + "Given some information regarding a search engine, install the interactive command to search through them" + `(defun ,(intern (format "prelude-%s" search-engine-name)) () + ,(format "Search %s with a query or region if any." search-engine-name) + (interactive) + (prelude-search ,search-engine-url ,search-engine-prompt))) -(defun prelude-youtube () - "Search YouTube with a query or region if any." - (interactive) - (prelude-search "http://www.youtube.com/results?search_query=" - "Search YouTube: ")) - -(defun prelude-github () - "Search GitHub with a query or region if any." - (interactive) - (prelude-search "https://github.com/search?q=" "Search GitHub: ")) +(prelude-install-search-engine "google" "http://www.google.com/search?q=" "Google: ") +(prelude-install-search-engine "youtube" "http://www.youtube.com/results?search_query=" "Search YouTube: ") +(prelude-install-search-engine "github" "https://github.com/search?q=" "Search GitHub: ") (defun prelude-indent-rigidly-and-copy-to-clipboard (begin end arg) "Indent region between BEGIN and END by ARG columns and copy to clipboard." From 7cca7f718e273304627a476f55782cda658dac83 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont" Date: Sat, 11 Jan 2014 19:17:59 +0100 Subject: [PATCH 3/7] Add DuckDuckGo search engine in the default list. --- core/prelude-core.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/prelude-core.el b/core/prelude-core.el index e40f1f1..36b14d7 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -78,9 +78,10 @@ PROMPT sets the `read-string prompt." (interactive) (prelude-search ,search-engine-url ,search-engine-prompt))) -(prelude-install-search-engine "google" "http://www.google.com/search?q=" "Google: ") -(prelude-install-search-engine "youtube" "http://www.youtube.com/results?search_query=" "Search YouTube: ") -(prelude-install-search-engine "github" "https://github.com/search?q=" "Search GitHub: ") +(prelude-install-search-engine "google" "http://www.google.com/search?q=" "Google: ") +(prelude-install-search-engine "youtube" "http://www.youtube.com/results?search_query=" "Search YouTube: ") +(prelude-install-search-engine "github" "https://github.com/search?q=" "Search GitHub: ") +(prelude-install-search-engine "duckduckgo" "https://duckduckgo.com/?t=lm&q=" "Search DuckDuckGo: ") (defun prelude-indent-rigidly-and-copy-to-clipboard (begin end arg) "Indent region between BEGIN and END by ARG columns and copy to clipboard." From f83428f9f3d44d39fae45d39bb1633785ed75df3 Mon Sep 17 00:00:00 2001 From: "Antoine R. Dumont" Date: Sat, 11 Jan 2014 19:19:59 +0100 Subject: [PATCH 4/7] Add binding `C-c U` for DuckDuckGo search --- core/prelude-core.el | 1 + core/prelude-mode.el | 1 + 2 files changed, 2 insertions(+) diff --git a/core/prelude-core.el b/core/prelude-core.el index 36b14d7..fa630b3 100644 --- a/core/prelude-core.el +++ b/core/prelude-core.el @@ -401,6 +401,7 @@ Doesn't mess with special buffers." "Press to search in Google." "Press to search in GitHub." "Press to search in YouTube." + "Press to search in DuckDuckGo." "Press to rename the current buffer and file it's visiting." "Press to open a terminal in Emacs." "Press to kill all the buffers, but the active one." diff --git a/core/prelude-mode.el b/core/prelude-mode.el index 2258c0a..bd7a2ff 100644 --- a/core/prelude-mode.el +++ b/core/prelude-mode.el @@ -39,6 +39,7 @@ (define-key map (kbd "C-c g") 'prelude-google) (define-key map (kbd "C-c G") 'prelude-github) (define-key map (kbd "C-c y") 'prelude-youtube) + (define-key map (kbd "C-c U") 'prelude-duckduckgo) ;; mimic popular IDEs binding, note that it doesn't work in a terminal session (define-key map [(shift return)] 'prelude-smart-open-line) (define-key map (kbd "M-o") 'prelude-smart-open-line) From 430c9825cb69f847058842cd1b9e2b24eb2c94bc Mon Sep 17 00:00:00 2001 From: Jeremy Bi Date: Mon, 3 Feb 2014 09:53:24 +0800 Subject: [PATCH 5/7] web-mode is now compatible with minor modes --- modules/prelude-web.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/prelude-web.el b/modules/prelude-web.el index 234804e..0a0062b 100644 --- a/modules/prelude-web.el +++ b/modules/prelude-web.el @@ -49,8 +49,6 @@ (eval-after-load 'web-mode '(progn (defun prelude-web-mode-defaults () - ;; Disable whitespace-mode when using web-mode - (whitespace-mode -1) ;; Customizations (setq web-mode-markup-indent-offset 4) (setq web-mode-css-indent-offset 2) From 8a3e01cd32da8788804b14f4dd55d34a723f404b Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 6 Feb 2014 10:36:01 +0200 Subject: [PATCH 6/7] [Fix #484] Set OS X specific latex settings conditionally --- modules/prelude-latex.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/prelude-latex.el b/modules/prelude-latex.el index 9d8ec70..c4a9ba0 100644 --- a/modules/prelude-latex.el +++ b/modules/prelude-latex.el @@ -44,17 +44,17 @@ ;; use pdflatex (setq TeX-PDF-mode t) -(setq TeX-view-program-selection - '((output-dvi "DVI Viewer") - (output-pdf "PDF Viewer") - (output-html "HTML Viewer"))) +;; sensible defaults for OS X, other OSes should be covered out-of-the-box +(when (eq system-type 'darwin) + (setq TeX-view-program-selection + '((output-dvi "DVI Viewer") + (output-pdf "PDF Viewer") + (output-html "HTML Viewer"))) -;; this section is good for OS X only -;; TODO add sensible defaults for Linux/Windows -(setq TeX-view-program-list - '(("DVI Viewer" "open %o") - ("PDF Viewer" "open %o") - ("HTML Viewer" "open %o"))) + (setq TeX-view-program-list + '(("DVI Viewer" "open %o") + ("PDF Viewer" "open %o") + ("HTML Viewer" "open %o")))) (defun prelude-latex-mode-defaults () (turn-on-auto-fill) From 4e8003b9758bf70bedc5261afdd992da36572ad3 Mon Sep 17 00:00:00 2001 From: HANAI tohru Date: Sun, 2 Mar 2014 16:43:50 +0900 Subject: [PATCH 7/7] FIX: `coffee-mode` uses `coffee-tab-width` instead of `tab-width`. And recently it has removed `tab-width` dependency completely. --- modules/prelude-coffee.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prelude-coffee.el b/modules/prelude-coffee.el index 69e3c65..90d881d 100644 --- a/modules/prelude-coffee.el +++ b/modules/prelude-coffee.el @@ -40,7 +40,7 @@ "coffee-mode-defaults" ;; CoffeeScript uses two spaces. - (set (make-local-variable 'tab-width) 2) + (setq coffee-tab-width 2) ;; If you don't have js2-mode (setq coffee-js-mode 'javascript-mode)