all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#946: 23.0.60; html-mode regression ('' within a table)
@ 2008-09-18  8:20 martin rudalics
  2008-09-18 13:00 ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: martin rudalics @ 2008-09-18  8:20 UTC (permalink / raw
  To: 946; +Cc: Allan Gottlieb

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

 > 1. Create the following 3 line file /tmp/x.html
 >
 > <table>
 >   <tr><td>'9'</td></tr>
 > </table>
 >
 > 2. invoke emacs -Q /tmp/x.html
 >
 > 3. C-x h   to mark the buffer
 >
 > 4. C-M-\   to indent the buffer
 >
 > 5. The indentation is not changed (correct), but the message
 >    Unclosed tag <>
 >    is generated (wrong).
 >
 > 6. This does not occur with emacs 22.2 and does not occur if
 >    the three characters '9' are replaced with 9 or '9 but does occur if
 >    they are replaced with 9'

This happens because `backward-sexp' calls `backward-prefix-chars' which
skips the "'".  Could you please try the attached patch.

Thank you, martin

[-- Attachment #2: 946.diff --]
[-- Type: text/plain, Size: 1613 bytes --]

*** textmodes/sgml-mode.el.~1.136.~	2008-07-05 06:26:11.000000000 +0200
--- textmodes/sgml-mode.el	2008-09-18 10:07:18.000000000 +0200
***************
*** 784,790 ****
                    (with-syntax-table sgml-tag-syntax-table
                      (up-list -1)
                      (when (sgml-skip-tag-forward 1)
!                       (backward-sexp 1)
                        (forward-char 2)
                        t))))
                 (clones (get-char-property (point) 'text-clones)))
--- 784,790 ----
                    (with-syntax-table sgml-tag-syntax-table
                      (up-list -1)
                      (when (sgml-skip-tag-forward 1)
! 		      (goto-char (or (scan-sexps (point) -1) (point-min)))
                        (forward-char 2)
                        t))))
                 (clones (get-char-property (point) 'text-clones)))
***************
*** 1223,1229 ****
                  (with-syntax-table sgml-tag-syntax-table
                    (goto-char tag-end)
                    (condition-case nil
!                       (backward-sexp)
                      (scan-error
                       ;; This > isn't really the end of a tag. Skip it.
                       (goto-char (1- tag-end))
--- 1223,1229 ----
                  (with-syntax-table sgml-tag-syntax-table
                    (goto-char tag-end)
                    (condition-case nil
! 		      (goto-char (or (scan-sexps (point) -1) (point-min)))
                      (scan-error
                       ;; This > isn't really the end of a tag. Skip it.
                       (goto-char (1- tag-end))

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-09-21 12:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <48D63700.3060801@gmx.at>
2008-09-09 13:35 ` bug#946: 23.0.60; html-mode regression ('' within a table) Allan Gottlieb
2008-09-21 12:10   ` bug#946: marked as done (23.0.60; html-mode regression ('' within a table)) Emacs bug Tracking System
2008-09-18  8:20 bug#946: 23.0.60; html-mode regression ('' within a table) martin rudalics
2008-09-18 13:00 ` Stefan Monnier
2008-09-18 13:25   ` martin rudalics
2008-09-18 21:11     ` Stefan Monnier
2008-09-18 22:21       ` martin rudalics
2008-09-19  1:35         ` Stefan Monnier
2008-09-19  6:30           ` martin rudalics

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.