all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: 946@emacsbugs.donarmstrong.com
Cc: Allan Gottlieb <gottlieb@nyu.edu>
Subject: bug#946: 23.0.60; html-mode regression ('' within a table)
Date: Thu, 18 Sep 2008 10:20:45 +0200	[thread overview]
Message-ID: <48D20F5D.3040209@gmx.at> (raw)

[-- 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))

             reply	other threads:[~2008-09-18  8:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18  8:20 martin rudalics [this message]
2008-09-18 13:00 ` bug#946: 23.0.60; html-mode regression ('' within a table) 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
  -- strict thread matches above, loose matches on Subject: below --
2008-09-09 13:35 Allan Gottlieb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48D20F5D.3040209@gmx.at \
    --to=rudalics@gmx.at \
    --cc=946@emacsbugs.donarmstrong.com \
    --cc=gottlieb@nyu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.