]> code.delx.au - gnu-emacs-elpa/commitdiff
Merge commit 'fedf88552990afa269366dfa4c3f5af6d1cdb7c2' from context-coloring
authorJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Thu, 5 Feb 2015 17:35:25 +0000 (09:35 -0800)
committerJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Thu, 5 Feb 2015 17:36:30 +0000 (09:36 -0800)
packages/context-coloring/README.md
packages/context-coloring/scripts/download-dependencies.el

index 16b671ad5fdd1587629ed5c77529494e40c44b27..2db08b185022b388d4157fe92cf9d97e3a579810 100644 (file)
@@ -156,10 +156,15 @@ end
 print scopifier ARGF.read
 ```
 
+When a `--version` argument is passed, a scopifier should print its version
+number and exit. For installable scopifiers, this allows context-coloring to
+check for updates as needed.
+
 [linter]: http://jshint.com/about/
 [flycheck]: http://www.flycheck.org/
 [zenburn]: http://github.com/bbatsov/zenburn-emacs
 [point]: http://www.gnu.org/software/emacs/manual/html_node/elisp/Point.html
 [js2-mode]: https://github.com/mooz/js2-mode
 [node]: http://nodejs.org/download/
+[scopifier]: https://github.com/jacksonrayhamilton/scopifier
 [load path]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Libraries.html
index 37f243b96d8136eef10d3cdde24fb251e43742b0..54211cca1b0cd03e1be2add07dd7ffd59b33796b 100644 (file)
@@ -1,4 +1,4 @@
-;; -*- lexical-binding: t; -*-
+;;; scripts/download-dependencies.el --- Get files for development. -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2014-2015  Free Software Foundation, Inc.
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-(defconst directory (file-name-directory (or load-file-name buffer-file-name)))
+;; This script downloads some dependencies for development so they don't need to
+;; be version-controlled.
+
+;;; Code:
+
+(defconst directory (file-name-directory (or load-file-name buffer-file-name))
+  "This file's directory.")
 
 (defun resolve-path (path)
+  "Resolve a path relative to this file's directory."
   (expand-file-name path directory))
 
 (defun strip-headers ()
+  "Remove the http headers included in the output of
+`url-retrieve-synchronously'."
   (goto-char 1)
   (kill-paragraph 1) ; The headers are 1 paragraph. I hope.
   (kill-line)        ; A line separates the headers from the file's content.
   )
 
+;; Download any missing dependencies.
 (let ((files '("https://raw.githubusercontent.com/mooz/js2-mode/master/js2-mode.el"
                "https://raw.githubusercontent.com/rejeep/ert-async.el/master/ert-async.el")))
   (make-directory (resolve-path "../libraries") t)
@@ -38,3 +48,5 @@
         (with-current-buffer (url-retrieve-synchronously file)
           (strip-headers)
           (write-file destination))))))
+
+;;; download-dependencies.el ends here