comparison lisp/mail/footnote.el @ 90813:e6fdae9180d4

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 698-710) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 216) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-196
author Miles Bader <miles@gnu.org>
date Tue, 24 Apr 2007 21:56:25 +0000
parents 95d0cdf160ea 8a6e5c01dde1
children f55f9811f5d7
comparison
equal deleted inserted replaced
90812:6137cc8ddf90 90813:e6fdae9180d4
265 (- n (car rom-low-pair)) 265 (- n (car rom-low-pair))
266 footnote-roman-list))))))) 266 footnote-roman-list)))))))
267 267
268 ;; Latin-1 268 ;; Latin-1
269 269
270 (defconst footnote-latin-regexp "¹²³ºª§¶" 270 (defconst footnote-latin-string "¹²³ºª§¶"
271 "String of Latin-1 footnoting characters.")
272
273 (defconst footnote-latin-regexp (concat "[" footnote-latin-string "]")
271 "Regexp for Latin-1 footnoting characters.") 274 "Regexp for Latin-1 footnoting characters.")
272 275
273 (defun Footnote-latin (n) 276 (defun Footnote-latin (n)
274 "Latin-1 footnote style. 277 "Latin-1 footnote style.
275 Use a range of Latin-1 non-ASCII characters for footnoting." 278 Use a range of Latin-1 non-ASCII characters for footnoting."
276 (string (aref footnote-latin-regexp 279 (string (aref footnote-latin-string
277 (mod (1- n) (length footnote-latin-regexp))))) 280 (mod (1- n) (length footnote-latin-string)))))
278 281
279 ;;; list of all footnote styles 282 ;;; list of all footnote styles
280 (defvar footnote-style-alist 283 (defvar footnote-style-alist
281 `((numeric Footnote-numeric ,footnote-numeric-regexp) 284 `((numeric Footnote-numeric ,footnote-numeric-regexp)
282 (english-lower Footnote-english-lower ,footnote-english-lower-regexp) 285 (english-lower Footnote-english-lower ,footnote-english-lower-regexp)
289 are available. 292 are available.
290 See footnote-han.el, footnote-greek.el and footnote-hebrew.el for more 293 See footnote-han.el, footnote-greek.el and footnote-hebrew.el for more
291 exciting styles.") 294 exciting styles.")
292 295
293 (defcustom footnote-style 'numeric 296 (defcustom footnote-style 'numeric
294 "*Style used for footnoting. 297 "*Default style used for footnoting.
295 numeric == 1, 2, 3, ... 298 numeric == 1, 2, 3, ...
296 english-lower == a, b, c, ... 299 english-lower == a, b, c, ...
297 english-upper == A, B, C, ... 300 english-upper == A, B, C, ...
298 roman-lower == i, ii, iii, iv, v, ... 301 roman-lower == i, ii, iii, iv, v, ...
299 roman-upper == I, II, III, IV, V, ... 302 roman-upper == I, II, III, IV, V, ...
300 latin == ¹ ² ³ º ª § ¶ 303 latin == ¹ ² ³ º ª § ¶
301 See also variables `footnote-start-tag' and `footnote-end-tag'." 304 See also variables `footnote-start-tag' and `footnote-end-tag'.
305
306 Customizing this variable has no effect on buffers already
307 displaying footnotes. You can change the style of existing
308 buffers using the command `Footnote-set-style'."
302 :type (cons 'choice (mapcar (lambda (x) (list 'const (car x))) 309 :type (cons 'choice (mapcar (lambda (x) (list 'const (car x)))
303 footnote-style-alist)) 310 footnote-style-alist))
304 :group 'footnote) 311 :group 'footnote)
305 312
306 ;;; Style utilities & functions 313 ;;; Style utilities & functions
652 (notes (length footnote-pointer-marker-alist)) 659 (notes (length footnote-pointer-marker-alist))
653 alist-ptr alist-txt) 660 alist-ptr alist-txt)
654 (while (< i notes) 661 (while (< i notes)
655 (setq alist-ptr (nth i footnote-pointer-marker-alist)) 662 (setq alist-ptr (nth i footnote-pointer-marker-alist))
656 (setq alist-txt (nth i footnote-text-marker-alist)) 663 (setq alist-txt (nth i footnote-text-marker-alist))
657 (unless (eq (1+ i) (car alist-ptr)) 664 (unless (= (1+ i) (car alist-ptr))
658 (Footnote-renumber (car alist-ptr) (1+ i) alist-ptr alist-txt)) 665 (Footnote-renumber (car alist-ptr) (1+ i) alist-ptr alist-txt))
659 (setq i (1+ i)))))) 666 (setq i (1+ i))))))
660 667
661 (defun Footnote-goto-footnote (&optional arg) 668 (defun Footnote-goto-footnote (&optional arg)
662 "Jump to the text of a footnote. 669 "Jump to the text of a footnote.