comparison yahtml.el @ 190:3db120d6b7d1 dev

Calculation of indentation depth revised. (included again after merge conflict)
author yuuji@gentei.org
date Sat, 17 Dec 2011 13:02:40 +0900
parents 8abdd3cc87d0
children af2098da767b
comparison
equal deleted inserted replaced
189:8abdd3cc87d0 190:3db120d6b7d1
1 ;;; -*- Emacs-Lisp -*- 1 ;;; -*- Emacs-Lisp -*-
2 ;;; (c) 1994-2011 by HIROSE Yuuji [yuuji(@)yatex.org] 2 ;;; (c) 1994-2011 by HIROSE Yuuji [yuuji(@)yatex.org]
3 ;;; Last modified Mon May 16 15:49:38 2011 on firestorm 3 ;;; Last modified Sat Dec 17 13:00:34 2011 on firestorm
4 ;;; $Id$ 4 ;;; $Id$
5 5
6 (defconst yahtml-revision-number "1.74.2" 6 (defconst yahtml-revision-number "1.74.2"
7 "Revision number of running yahtml.el") 7 "Revision number of running yahtml.el")
8 8
248 (defvar yahtml:img-default-alt-format "%xx%y(%sbytes)" 248 (defvar yahtml:img-default-alt-format "%xx%y(%sbytes)"
249 "*Default format of img entity's ALT attributes. 249 "*Default format of img entity's ALT attributes.
250 %x: width, %y: height, %s: size in bytes, %c: first comment string, 250 %x: width, %y: height, %s: size in bytes, %c: first comment string,
251 %f: filename") 251 %f: filename")
252 252
253 (defvar yahtml-faithful-to-htmllint nil) 253 (defvar yahtml-faithful-to-htmllint (not yahtml-always-/li)
254 "*Non-nil doesn't put space after opening tags.")
255
254 (defvar yahtml-error-line-regexp 256 (defvar yahtml-error-line-regexp
255 "^\\(.*\\)(\\([0-9]+\\)):\\|^line \\([0-9]+\\)" 257 "^\\(.*\\)(\\([0-9]+\\)):\\|^line \\([0-9]+\\)"
256 "*Regexp of error position which is produced by lint program.") 258 "*Regexp of error position which is produced by lint program.")
257 259
258 (defvar yahtml-translate-hyphens-when-comment-region t 260 (defvar yahtml-translate-hyphens-when-comment-region t
2507 (YaTeX-reindent indent))) 2509 (YaTeX-reindent indent)))
2508 (and (bolp) (skip-chars-forward " \t"))) 2510 (and (bolp) (skip-chars-forward " \t")))
2509 (yahtml-indent-line-real)))) 2511 (yahtml-indent-line-real))))
2510 2512
2511 (defun yahtml-this-indent () 2513 (defun yahtml-this-indent ()
2512 (let ((envs "[uod]l\\|table\\|[ht][rhd0-6]\\|select\\|blockquote\\|center\\|menu\\|dir\\|font") 2514 (let ((envs "[uod]l\\|table\\|[ht][rhd0-6]\\|select\\|blockquote\\|center\\|menu\\|dir\\|d[td]\\|li")
2513 (itemizing-envs "^\\([uod]l\\|menu\\|dir\\)$") 2515 (itemizing-envs "^\\([uod]l\\|menu\\|dir\\|li\\|d[td]\\)$")
2514 (itms "<\\(dt\\|dd\\|li\\|t[rdh]\\|option\\)\\b") 2516 (itms "<\\(dt\\|dd\\|li\\|t[rdh]\\|option\\)\\b")
2515 (excludes 2517 (excludes
2516 "\\(a\\|p\\|span\\|code\\|tt\\|em\\|u\\|i\\|big\\|small\\|font\\)\\b") 2518 "\\b\\(a\\|p\\|span\\|code\\|tt\\|em\\|u\\|i\\|big\\|small\\|font\\)\\b")
2517 inenv p col peol (case-fold-search t)) 2519 inenv p col peol (case-fold-search t))
2518 (save-excursion 2520 (save-excursion
2519 (beginning-of-line) 2521 (beginning-of-line)
2520 (setq inenv (or (yahtml-inner-environment-but excludes t) 2522 (setq inenv (or (yahtml-inner-environment-but excludes t)
2521 "html") 2523 "html")

yatex.org