@@ -905,7 +905,7 @@ strings"
905905 (beginning-of-line )
906906 (when (looking-at " ^\\ s +$" ) (point )))))
907907
908- (defvar-local scala-indent:cycle-indent-stack nil
908+ (defvar-local scala-indent:cycle-indent-stack ( list )
909909 " The automatically buffer local scala indent cycle stack.
910910
911911The stack is initialized as (left-margin, (current-indentation))
@@ -931,20 +931,21 @@ Will fail if INDENTATION is not an integer"
931931
932932 Modifies the stack in-place."
933933
934- (pop 'scala-indent:cycle-indent-stack ))
934+ (pop ( buffer-local-value 'scala-indent:cycle-indent-stack ( current-buffer )) ))
935935
936936(defun scala-indent:cycle-indent-stack-depth ()
937937 " The current depth of the \" scala-indent:cycle-indent-stack\" stack"
938938
939- (length 'scala-indent:cycle-indent-stack ))
939+ (length ( buffer-local-value 'scala-indent:cycle-indent-stack ( current-buffer )) ))
940940
941- (defun scala-indent:cycle-indent-stack-emptyp ()
941+
942+ (defun scala-indent:cycle-indent-stack-emptyp (x )
942943 " Check if the \" scala-indent:cycle-indent-stack\" is empty.
943944
944945Returns t if the \" scala-indent:cycle-indent-stack\" is empty,
945946nil otherwise."
946-
947- (eql (length 'scala-indent:cycle-indent-stack ) 0 ))
947+
948+ (= (length ( buffer-local-value 'scala-indent:cycle-indent-stack ( current-buffer )) ) 0 ))
948949
949950(defun scala-indent:cycle-indent-line (&optional strategy )
950951 " Cycle scala indentation using optionally passed STRATEGY.
@@ -955,7 +956,7 @@ the optionally passed STRATEGY. Indent to the top of
955956\" scala-indent:cycle-indent-stack\" when non-empty."
956957
957958 (interactive " *" )
958- (cond ((( scala-indent:cycle-indent-stack-emptyp) )
959+ (cond ((scala-indent:cycle-indent-stack-emptyp nil )
959960 (scala-indent:cycle-indent-stack-push (current-indentation ))
960961 (scala-indent:cycle-indent-stack-push 0 )
961962 (call-interactively 'scala-indent:strategy-indent-line t ))
0 commit comments