From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83323 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?R=FCdiger?= Sonderfeld Newsgroups: gmane.emacs.gnus.general Subject: [PATCH 1/2] shr: Add support for custom bullet in unordered lists. Date: Fri, 14 Jun 2013 21:19:35 +0200 Message-ID: <2586612.Gclln5ticU@descartes> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1371237706 4401 80.91.229.3 (14 Jun 2013 19:21:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Jun 2013 19:21:46 +0000 (UTC) Cc: larsi@gnus.org To: ding@gnus.org Original-X-From: ding-owner+M31588@lists.math.uh.edu Fri Jun 14 21:21:43 2013 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UnZZ4-0005FC-Cn for ding-account@gmane.org; Fri, 14 Jun 2013 21:21:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1UnZXK-0005HL-AA; Fri, 14 Jun 2013 14:19:50 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1UnZXI-0005H8-I9 for ding@lists.math.uh.edu; Fri, 14 Jun 2013 14:19:48 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1UnZXE-00073m-O3 for ding@lists.math.uh.edu; Fri, 14 Jun 2013 14:19:46 -0500 Original-Received: from ptmx.org ([178.63.28.110]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1UnZXC-00086h-Nk; Fri, 14 Jun 2013 21:19:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ptmx.org (Postfix) with ESMTP id 3DA84216D5; Fri, 14 Jun 2013 21:19:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at ptmx.org Original-Received: from ptmx.org ([127.0.0.1]) by localhost (ptmx.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fs8++zkw2JNs; Fri, 14 Jun 2013 21:19:40 +0200 (CEST) Original-Received: from descartes.localnet (chello080108246092.7.14.vie.surfer.at [80.108.246.92]) by ptmx.org (Postfix) with ESMTPSA id 7E8C420CE4; Fri, 14 Jun 2013 21:19:40 +0200 (CEST) User-Agent: KMail/4.10.3 (Linux/3.8.0-23-generic; KDE/4.10.3; x86_64; ; ) X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83323 Archived-At: * lisp/shr.el (shr-bullet): New custom variable. (shr-tag-li): Support custom bullet in unordered lists. Signed-off-by: R=C3=BCdiger Sonderfeld --- lisp/shr.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/shr.el b/lisp/shr.el index c93357e..48dfc5a 100644 --- a/lisp/shr.el +++ b/lisp/shr.el @@ -83,6 +83,14 @@ (defcustom shr-width fill-column =09=09 (const :tag "Use the width of the window" nil)) :group 'shr) =20 +(defcustom shr-bullet "* " + "Bullet used for unordered lists. +Alternative suggestions are: +- \"=E2=97=89 \" +- \"=E2=80=A2 \"" + :type 'string + :group 'shr) + (defvar shr-content-function nil "If bound, this should be a function that will return the content. This is used for cid: URLs, and the function is called with the @@ -1094,7 +1102,7 @@ (defun shr-tag-li (cont) =09 (prog1 =09=09 (format "%d " shr-list-mode) =09=09(setq shr-list-mode (1+ shr-list-mode))) -=09 "* ")) +=09 shr-bullet)) =09 (shr-indentation (+ shr-indentation (length bullet)))) (insert bullet) (shr-generic cont))) --=20 1.8.3.1