* PHP/HTML indentation @ 2007-07-30 11:07 vincent.marguerit 2007-07-30 11:46 ` Lennart Borgman (gmail) [not found] ` <mailman.4121.1185795982.32220.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 5+ messages in thread From: vincent.marguerit @ 2007-07-30 11:07 UTC (permalink / raw) To: help-gnu-emacs Hello, I have a big PHP file with some HTML inside ans sometimes the auto indentation with the TAB key does not work ! And I have no specific message in the buffer *Message* Does anyone what I should do to make it work again ? Thanks, Vincent. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PHP/HTML indentation 2007-07-30 11:07 PHP/HTML indentation vincent.marguerit @ 2007-07-30 11:46 ` Lennart Borgman (gmail) [not found] ` <mailman.4121.1185795982.32220.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 5+ messages in thread From: Lennart Borgman (gmail) @ 2007-07-30 11:46 UTC (permalink / raw) To: vincent.marguerit; +Cc: help-gnu-emacs vincent.marguerit@gmail.com wrote: > Hello, > > I have a big PHP file with some HTML inside ans sometimes the auto > indentation with the TAB key does not work ! > And I have no specific message in the buffer *Message* > > Does anyone what I should do to make it work again ? Please give more information. What version of Emacs are you using? Are you using a php-mode? Which? ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.4121.1185795982.32220.help-gnu-emacs@gnu.org>]
* Re: PHP/HTML indentation [not found] ` <mailman.4121.1185795982.32220.help-gnu-emacs@gnu.org> @ 2007-07-30 12:38 ` vincent.marguerit 2007-07-30 13:42 ` Lennart Borgman (gmail) [not found] ` <mailman.4125.1185802953.32220.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 5+ messages in thread From: vincent.marguerit @ 2007-07-30 12:38 UTC (permalink / raw) To: help-gnu-emacs On 30 juil, 12:46, "Lennart Borgman (gmail)" <lennart.borg...@gmail.com> wrote: > vincent.margue...@gmail.com wrote: > > Hello, > > > I have a big PHP file with some HTML inside ans sometimes the auto > > indentation with the TAB key does not work ! > > And I have no specific message in the buffer *Message* > > > Does anyone what I should do to make it work again ? > > Please give more information. What version of Emacs are you using? Are > you using a php-mode? Which? My version of Emacs is 22.1, I use php-mode version 1.2.0 with this is in .emacs file: (add-hook 'text-mode-hook 'iso-accents-mode) (set-terminal-coding-system 'latin-1) (set-keyboard-coding-system 'latin-1) (set-language-environment 'latin-1) (set-foreground-color "wheat") (set-background-color "DarkSlateGray") (set-cursor-color "white") (menu-bar-mode -1) (scroll-bar-mode -1) (global-font-lock-mode 1) (require 'php-mode) (add-hook 'php-mode-user-hook 'turn-on-font-lock) (add-hook 'php-mode-user-hook '(lambda () (define-abbrev php-mode-abbrev-table "ex" "extends"))) The file for which the indentation does not work anymore is global_display.inc.php, I have put it here: http://boxfly.free.fr/test/php/global_display.inc.phps If I go to line 5 and press TAB key, it will auto indent. But if I go to line 522 in the function dis_end_main(), the indentation does not work anymore. I work under Mac OS X. Thanks for your help, Vincent. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: PHP/HTML indentation 2007-07-30 12:38 ` vincent.marguerit @ 2007-07-30 13:42 ` Lennart Borgman (gmail) [not found] ` <mailman.4125.1185802953.32220.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 5+ messages in thread From: Lennart Borgman (gmail) @ 2007-07-30 13:42 UTC (permalink / raw) To: vincent.marguerit; +Cc: help-gnu-emacs vincent.marguerit@gmail.com wrote: > My version of Emacs is 22.1, I use php-mode version 1.2.0 with this is > in .emacs file: Unfortunately there are several php-modes out there. You have to tell us the author too. > (global-font-lock-mode 1) > (require 'php-mode) > (add-hook 'php-mode-user-hook 'turn-on-font-lock) Font lock is on by default in Emacs 22. > The file for which the indentation does not work anymore is > global_display.inc.php, I have put it here: > http://boxfly.free.fr/test/php/global_display.inc.phps > > If I go to line 5 and press TAB key, it will auto indent. But if I go > to line 522 in the function dis_end_main(), the indentation does not > work anymore. Thanks, but what code to you have on that line? It looks to me that this is the empty line here: function dis_end_main() { echo " Anyway, indentation works for me here with the version of php-mode I have. I have the version that comes with nXhtml. ** Important: In your case you have just php code and then indentation works ok. In the case where the code mixes XHTML and PHP it is different, see nXhtml. > I work under Mac OS X. > > Thanks for your help, > Vincent. > > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <mailman.4125.1185802953.32220.help-gnu-emacs@gnu.org>]
* Re: PHP/HTML indentation [not found] ` <mailman.4125.1185802953.32220.help-gnu-emacs@gnu.org> @ 2007-07-30 15:55 ` vincent.marguerit 0 siblings, 0 replies; 5+ messages in thread From: vincent.marguerit @ 2007-07-30 15:55 UTC (permalink / raw) To: help-gnu-emacs On 30 juil, 14:42, "Lennart Borgman (gmail)" <lennart.borg...@gmail.com> wrote: > vincent.margue...@gmail.com wrote: > > My version of Emacs is 22.1, I use php-mode version 1.2.0 with this is > > in .emacs file: > > Unfortunately there are several php-modes out there. You have to tell us > the author too. > > > (global-font-lock-mode 1) > > (require 'php-mode) > > (add-hook 'php-mode-user-hook 'turn-on-font-lock) > > Font lock is on by default in Emacs 22. > > > The file for which the indentation does not work anymore is > > global_display.inc.php, I have put it here: > >http://boxfly.free.fr/test/php/global_display.inc.phps > > > If I go to line 5 and press TAB key, it will auto indent. But if I go > > to line 522 in the function dis_end_main(), the indentation does not > > work anymore. > > Thanks, but what code to you have on that line? It looks to me that this > is the empty line here: > > function dis_end_main() { > > echo " > > Anyway, indentation works for me here with the version of php-mode I > have. I have the version that comes with nXhtml. > > ** Important: In your case you have just php code and then indentation > works ok. In the case where the code mixes XHTML and PHP it is > different, see nXhtml. > > > I work under Mac OS X. > > > Thanks for your help, > > Vincent. > > > _______________________________________________ > > help-gnu-emacs mailing list > > help-gnu-em...@gnu.org > >http://lists.gnu.org/mailman/listinfo/help-gnu-emacs I have also a error message which is: http://boxfly.free.fr/test/php/emacs-php-fails.jpg And if I choose "y" I have a mumamo error which is a bit long: Do you want to do that now? (y or n) mumamo-turn-on-actions: Symbol's value as variable is void: mlinks- mode backtrace() (let ((standard-output standard-output)) (backtrace)) (let ((standard-output ...)) (let (...) (backtrace)) (with-current- buffer standard-output (prog1 ... ...))) (with-output-to-string (backtrace)) (let ((msg2 ...) (bt ...) (start ...)) (apply (quote message) msg2 lwarn-type args) (message "%s" bt) (with-current-buffer "*Messages*" (goto-char ...) (backward-char) (put-text-property start ... ... ...)) (apply (quote message) msg2 lwarn-type args) (run- with-idle-timer 1 nil (quote mumamo-show-report-message)) (when mumamo- display-error-stop (apply ... msg2 lwarn-type args))) mumamo-display-error(mumamo-turn-on-actions "%s" "Symbol's value as variable is void: mlinks-mode") (condition-case err (progn (mumamo-msgfntfy "mumamo-turn-on- actions") (unless mumamo-current-chunk-family ...) (if ... ... ... ... ... ... ...) (mumamo-get-chunk-at ...) (mumamo-set- major-from-overlay) (add-hook ... ... nil t) (setq mumamo-mode-major- mode major-mode)) (quit (setq mumamo-mode nil)) (error (setq mumamo- mode nil) (mumamo-display-error ... "%s" ...))) mumamo-turn-on-actions() (progn (setq mumamo-main-major-mode major-mode) (mumamo-turn-on- actions) (run-hooks (quote mumamo-mode-on-hook))) (if mumamo-mode (progn (setq mumamo-main-major-mode major-mode) (mumamo-turn-on-actions) (run-hooks ...)) (mumamo-turn-off-actions) (run-hooks (quote mumamo-mode-off-hook))) (let (mumamo-mode--called) (unless (or ... ...) (setq mumamo- explicitly-turned-on-off t)) (if mumamo-mode (progn ... ... ...) (mumamo-turn-off-actions) (run-hooks ...))) (if (or (boundp ...) mumamo-set-major-running (boundp ...)) nil (let (mumamo-mode--called) (unless ... ...) (if mumamo-mode ... ... ...))) (unless (or (boundp ...) mumamo-set-major-running (boundp ...)) (let (mumamo-mode--called) (unless ... ...) (if mumamo-mode ... ... ...))) mumamo-mode(1) (if (not (y-or-n-p ...)) (message "Did not do indentation, but You can try again if you want") (message "") (mumamo-mode 1) (run-with- idle-timer 0 nil (quote message) "Multiple Major Modes is now on, please try to indent again.")) (if (featurep (quote mumamo)) (if (not ...) (message "Did not do indentation, but You can try again if you want") (message "") (mumamo- mode 1) (run-with-idle-timer 0 nil ... "Multiple Major Modes is now on, please try to indent again.")) (lwarn (quote php-indent) :warning (concat " Indentation fails badly with mixed HTML/PHP." " You can get it working by using mumamo-mode," " but I can not find it in your Emacs load path!"))) (if (not (or ... ...)) t (goto-char here) (setq php-warned-bad- indent t) (require (quote mumamo) nil t) (if (featurep ...) (if ... ... ... ... ...) (lwarn ... :warning ...)) nil) (let ((html-tag-re "</[a-z]+>") (here ...)) (if (not ...) t (goto- char here) (setq php-warned-bad-indent t) (require ... nil t) (if ... ... ...) nil)) php-check-html-for-indenation() (or php-warned-bad-indent (and (featurep ...) mumamo-mode) (php- check-html-for-indenation)) (if (or php-warned-bad-indent (and ... mumamo-mode) (php-check-html- for-indenation)) (funcall (quote c-indent-line))) php-cautious-indent-line() #[nil " \302>\203) So I tried different php-mode.el files but with all the time the same result. I even tried this small one: http://www.ontosys.com/src/php-mode.el But still the same result. I have found a way which is not at all funny, I put functions I work on at the beginning of the file and then the indentation works normally. For exemple, for the function dis_end_main() which is at the end of the file the indentation does not work anymore, but if I cut/paste it at the beginning of the file the indentation works ! I don't what I should do :( Thanks for your help, Vincent. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-30 15:55 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-07-30 11:07 PHP/HTML indentation vincent.marguerit 2007-07-30 11:46 ` Lennart Borgman (gmail) [not found] ` <mailman.4121.1185795982.32220.help-gnu-emacs@gnu.org> 2007-07-30 12:38 ` vincent.marguerit 2007-07-30 13:42 ` Lennart Borgman (gmail) [not found] ` <mailman.4125.1185802953.32220.help-gnu-emacs@gnu.org> 2007-07-30 15:55 ` vincent.marguerit
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.