When editing a PHP file with PHP code and HTML markup in Emacs, I continue to get the warning:
Warning (php-indent):
Indentation fails badly with mixed HTML and PHP.
Look for an Emacs Lisp library that supports "multiple
major modes" like mumamo, mmm-mode or multi-mode.
which pops up at the bottom of my wiindow and takes up half of my editing screen. How do I turn this off?
I know there are various "add-ons" and modes that you can add to make Emacs format PHP + HTML nicely but I just want to turn the warning off. How can I do so?
EDIT:
Here is a portion of the php-mode.el
file where the above error seems to be coming from:
(defvar php-completion-table nil
"Obarray of tag names defined in current tags table and functions know to PHP.")
(defvar php-warned-bad-indent nil)
(make-variable-buffer-local 'php-warned-bad-indent)
;; Do it but tell it is not good if html tags in buffer.
(defun php-check-html-for-indentation ()
(let ((html-tag-re "</?\\sw+.*?>")
(here (point)))
(if (not (or (re-search-forward html-tag-re (line-end-position) t)
(re-search-backward html-tag-re (line-beginning-position) t)))
t
(goto-char here)
(setq php-warned-bad-indent t)
(lwarn 'php-indent :warning
"\n\t%s\n\t%s\n\t%s\n"
"Indentation fails badly with mixed HTML and PHP."
"Look for an Emacs Lisp library that supports \"multiple"
"major modes\" like mumamo, mmm-mode or multi-mode.")
nil)))
(defun php-cautious-indent-region (start end &optional quiet)
(if (or php-warned-bad-indent
(php-check-html-for-indentation))
(funcall 'c-indent-region start end quiet)))
(defun php-cautious-indent-line ()
(if (or php-warned-bad-indent
(php-check-html-for-indentation))
(funcall 'c-indent-line)))