File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -603,8 +603,16 @@ This is was done due to the problem reported here:
603
603
(beginning-of-line )
604
604
(if (looking-at-p " \\ s-*;\\ s-*$" ) 0 '+ )))
605
605
606
+ ; ;; We silence all byte-compiler warnings when creating the `syntax'
607
+ ; ;; variable binding in this function. Emacs will normally warn us
608
+ ; ;; that `c-syntactic-context' is unbound. The variable comes from CC
609
+ ; ;; Mode and it is only bound dynamically when calling certain
610
+ ; ;; indentation functions. See the documentation in section "8.1.1
611
+ ; ;; Custom Brace Hanging" of the CC Mode manual for more information,
612
+ ; ;; along with an explanation of why we do not simply bind the
613
+ ; ;; variable to a value in order to appease the compiler warning.
606
614
(defun php-unindent-closure ()
607
- (let ((syntax (mapcar 'car c-syntactic-context)))
615
+ (let ((syntax (with-no-warnings ( mapcar 'car c-syntactic-context) )))
608
616
(if (and (member 'arglist-cont-nonempty syntax)
609
617
(or
610
618
(member 'statement-block-intro syntax)
You can’t perform that action at this time.
0 commit comments