branch: elpa/julia-mode commit 96499ff031f67174a474fcc91b6b3574667bdd07 Author: Wilfred Hughes <m...@wilfred.me.uk> Commit: Yichao Yu <yyc1...@gmail.com>
Silence Emacs byte-compilation warnings. Solves the issue raised in JuliaLang/julia#10303. --- julia-mode.el | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/julia-mode.el b/julia-mode.el index d3d5a2a..9b10370 100644 --- a/julia-mode.el +++ b/julia-mode.el @@ -35,7 +35,10 @@ ;;; Code: -(require 'cl) ;; incf, decf, plusp +;; We can't use cl-lib whilst supporting Emacs 23 users who don't use +;; ELPA. +(with-no-warnings + (require 'cl)) ;; incf, decf, plusp (defvar julia-mode-hook nil) @@ -412,20 +415,20 @@ before point. Returns nil if we're not within nested parens." (when (>= point-offset 0) (move-to-column (+ (current-indentation) point-offset))))) +(defmacro julia--should-indent (from to) + "Assert that we indent text FROM producing text TO in `julia-mode'." + `(with-temp-buffer + (julia-mode) + (insert ,from) + (indent-region (point-min) (point-max)) + (should (equal (buffer-substring-no-properties (point-min) (point-max)) + ,to)))) + ;; Emacs 23.X doesn't include ert, so we ignore any errors that occur ;; when we define tests. (ignore-errors (require 'ert) - (defmacro julia--should-indent (from to) - "Assert that we indent text FROM producing text TO in `julia-mode'." - `(with-temp-buffer - (julia-mode) - (insert ,from) - (indent-region (point-min) (point-max)) - (should (equal (buffer-substring-no-properties (point-min) (point-max)) - ,to)))) - (ert-deftest julia--test-indent-if () "We should indent inside if bodies." (julia--should-indent