Indenting in a PHP chunk jumps point to the start of the chunk rather than actually indenting.

Bug #610646 reported by nurikabe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nXhtml
Fix Committed
Medium
Unassigned

Bug Description

Just upgraded to the latest bzr pull and noticed this.

Revision history for this message
lborgman (lennart-borgman) wrote :

Hi nurikabe, thanks for this bug report too.

I think I need an example though. Please start from

  M-x emacs-Q-nxhtml

or similar.

Changed in nxhtml:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
nurikabe (nurikabe) wrote :

Please ignore this. I can't reproduce now that I've pulled a more recent version.

Revision history for this message
lborgman (lennart-borgman) wrote :

Thanks. I am a bit scared for the new version since I have totally rewritten the indentation code again. (To make it easier to adopt to a change I think is necessary in Emacs later on.)

So I am really glad for testing of indentation.

Changed in nxhtml:
status: Incomplete → In Progress
Changed in nxhtml:
status: In Progress → Fix Committed
Revision history for this message
nurikabe (nurikabe) wrote :
Download full text (3.3 KiB)

Seeing this again with the latest update. See the attached sample. I get the following backtrace first; thereafter the chunk jumping occurs.

  (if (mumamo-fun-eq this-line-major1 main-major) (let (... ...) (mumamo-msgindent " In main major mode") (forward-line 0) (skip-chars-backward " \n
\f") (forward-line 0) (if ... ... ... ...) (mumamo-msgindent " In main major mode B") (setq last-parent-major-indent ...)) (mumamo-msgindent " In sub major mode") (let (... ... ind-zero ... ind-on-first-sub-line) (save-restriction ... ... ... ...)))
  (cond (template-indent-abs (setq want-indent ...)) (leaving-submode (mumamo-msgindent " leaving last-parent-major-indent=%s" last-parent-major-indent) (if ... ... ... ...)) (entering-submode (setq this-line-indent-major ...) (mumamo-msgindent " this-line-indent-major=%s, major-mode=%s this0=%s" this-line-indent-major major-mode this-line-major0) (mumamo-msgindent " mumamo-submode-indent-offset=%s" mumamo-submode-indent-offset) (unless ... ...) (setq want-indent ...) (unless ... ...) (when ... ...) (if want-indent ... ...) (mumamo-msgindent " enter sub.want-indent=%s, curr=%s, last-main=%s" want-indent ... last-parent-major-indent)) (t (setq this-line-indent-major ...) (mumamo-msgindent " this-line-indent-major=%s" this-line-indent-major) (unless ... ...) (if ... ... ... ...)))
  (let* ((start-point ...) (prev-line-chunk0 ...) (prev-line-chunk2 ...) (prev-line-chunk3 ...) (prev-line-major0 ...) (prev-line-major1 ...) (prev-line-major2 ...) (prev-line-major3 ...) (prev-depth0 ...) (prev-depth2 ...) (prev-depth3 ...) (this-line-chunks ...) (this-line-chunk0 ...) (this-line-chunk2 ...) (this-line-chunk3 ...) (this-line-major0 ...) (this-line-major1 ...) (this-line-major2 ...) (this-line-major3 ...) (this-depth0 ...) (this-depth2 ...) (this-depth3 ...) this-line-indent-major major-indent-line-function (main-major ...) (old-indent ...) (next-entering-submode ...) (entering-submode ...) (leaving-submode ...) want-indent want-indent-major got-indent (here-on-line ...) this-pending-undo-list (n1-while 0) (n2-while 0) (n3-while 0) (this-line-indentor-chunk ...) (this-line-indentor-prev ...) (this-line-is-indentor ...) (this-template-shift ...) (prev-template-indentor ...) (prev-template-shift-rec ...) (template-shift ...) (template-indent-abs ...)) (when template-shift (unless template-indent-abs)) (when (and leaving-submode entering-submode) (message "Do not know how to indent here (both leaving and entering sub chunks)")) (when (or leaving-submode entering-submode) (unless last-parent-major-indent ...)) (mumamo-msgindent " leaving-submode=%s, entering-submode=%s" leaving-submode entering-submode) (when template-indent-abs (setq entering-submode nil) (setq leaving-submode nil)) (cond (template-indent-abs ...) (leaving-submode ... ...) (entering-submode ... ... ... ... ... ... ... ... ...) (t ... ... ... ...)) (when want-indent (indent-line-to want-indent) (when want-indent-major ...)) (goto-char here-on-line) (list this-line-chunks last-parent-major-indent next-entering-submode))
  mumamo-indent-line-function-1(nil nil nil)
  (let ((here ...) fontification-functions rng-nxml-auto-validate-flag (before-text ...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.