[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bold and underline faces
- From: Shiro Takeda <zbc08106@xxxxxxxxxxxxxxx>
- Date: 07 Jan 2002 13:07:55 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 02518
こんにちはたけだといいます.
w3m と emacs-w3m 使わせてもらっています.開発者のみなさんどうもありが
とうございます.
ひとつ要望なのですが,もしよかったら聞いてください.
いまの emacs-w3m は html file の中の bold や underline の指定を表示す
るのに Emacs の bold と underline face を使うようになっていますよね?
要望というのは,これを w3m 独自の bold と underline face をつくってそ
れを使うようにできないかということです.
もちろん変えるとなんかマズイことあるんでしたら今のままでもかまいません
が.
さっき CVS からとってきた w3m.el にたいする patch をつくってみたのでい
ちお添付しときます.
これは,ただ w3m-bold-face と w3m-underline-face という face を定義し
て,bold,underline の代わりにそれを使うように直しただけです.
*** c:/TMP/w3m.el.org Mon Jan 7 11:54:46 2002
--- c:/TMP/w3m.el Mon Jan 7 11:54:46 2002
***************
*** 477,482 ****
--- 477,496 ----
"Face used to highlight the current url in \"about://history/\"."
:group 'w3m-face)
+ (defface w3m-bold-face
+ '((((class color) (background light)) (:foreground "black" :bold t))
+ (((class color) (background dark)) (:foreground "white" :bold t))
+ (t (:bold t)))
+ "Face used to fontify bold faces."
+ :group 'w3m-face)
+
+ (defface w3m-underline-face
+ '((((class color) (background light)) (:foreground "black" :underline t))
+ (((class color) (background dark)) (:foreground "white" :underline t))
+ (t (:underline t)))
+ "Face used to fontify underline faces."
+ :group 'w3m-face)
+
(defcustom w3m-mode-hook nil
"*Hook run before `w3m-mode' called."
:group 'w3m
***************
*** 1691,1697 ****
(delete-region start (match-end 0))
(when (search-forward "</b>" nil t)
(delete-region (match-beginning 0) (match-end 0))
! (w3m-add-text-properties start (match-beginning 0) '(face bold))))))
(defun w3m-fontify-underline ()
"Fontify underline characters in this buffer which contains half-dumped data."
--- 1705,1711 ----
(delete-region start (match-end 0))
(when (search-forward "</b>" nil t)
(delete-region (match-beginning 0) (match-end 0))
! (w3m-add-text-properties start (match-beginning 0) '(face w3m-bold-face))))))
(defun w3m-fontify-underline ()
"Fontify underline characters in this buffer which contains half-dumped data."
***************
*** 1702,1708 ****
(when (search-forward "</u>" nil t)
(delete-region (match-beginning 0) (match-end 0))
(w3m-add-text-properties start (match-beginning 0)
! '(face underline))))))
(defsubst w3m-decode-anchor-string (str)
;; FIXME: This is a quite ad-hoc function to process encoded URL
--- 1716,1722 ----
(when (search-forward "</u>" nil t)
(delete-region (match-beginning 0) (match-end 0))
(w3m-add-text-properties start (match-beginning 0)
! '(face w3m-underline-face))))))
(defsubst w3m-decode-anchor-string (str)
;; FIXME: This is a quite ad-hoc function to process encoded URL
--
たけだしろう
<zbc08106@park.zero.ad.jp>
<http://park.zero.ad.jp/~zbc08106/>