diff options
| author | Chong Yidong | 2007-04-15 17:25:36 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-04-15 17:25:36 +0000 |
| commit | c6578117a2fe34110ef43369f4a044fc9fce5370 (patch) | |
| tree | 120a5c8d4277ad263cae44fc5ae4bfe10d10fb02 | |
| parent | b9d88df0dcc8b2ac8127ed8dee007eb55c41f8ef (diff) | |
| download | emacs-c6578117a2fe34110ef43369f4a044fc9fce5370.tar.gz emacs-c6578117a2fe34110ef43369f4a044fc9fce5370.zip | |
Revert last change.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/mail/footnote.el | 20 |
2 files changed, 8 insertions, 22 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f8bb945213f..2f0006b5e57 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,13 +1,3 @@ | |||
| 1 | 2007-04-15 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * mail/footnote.el (footnote-current-style): New var. | ||
| 4 | (Footnote-index-to-string, Footnote-current-regexp) | ||
| 5 | (Footnote-cycle-style, Footnote-set-style): Use it instead of | ||
| 6 | footnote-style. | ||
| 7 | (footnote-mode): Make footnote-current style buffer-local instead | ||
| 8 | of footnote-style, and initialize it to footnote-style. | ||
| 9 | (footnote-style): Update docstring. | ||
| 10 | |||
| 11 | 2007-04-15 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | 1 | 2007-04-15 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> |
| 12 | 2 | ||
| 13 | * textmodes/bibtex.el (bibtex-field-list): Use functionp. | 3 | * textmodes/bibtex.el (bibtex-field-list): Use functionp. |
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index 2e10f1ec308..9e3a375c50d 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el | |||
| @@ -294,7 +294,7 @@ See footnote-han.el, footnote-greek.el and footnote-hebrew.el for more | |||
| 294 | exciting styles.") | 294 | exciting styles.") |
| 295 | 295 | ||
| 296 | (defcustom footnote-style 'numeric | 296 | (defcustom footnote-style 'numeric |
| 297 | "*Default style used for footnoting. | 297 | "*Style used for footnoting. |
| 298 | numeric == 1, 2, 3, ... | 298 | numeric == 1, 2, 3, ... |
| 299 | english-lower == a, b, c, ... | 299 | english-lower == a, b, c, ... |
| 300 | english-upper == A, B, C, ... | 300 | english-upper == A, B, C, ... |
| @@ -306,10 +306,6 @@ See also variables `footnote-start-tag' and `footnote-end-tag'." | |||
| 306 | footnote-style-alist)) | 306 | footnote-style-alist)) |
| 307 | :group 'footnote) | 307 | :group 'footnote) |
| 308 | 308 | ||
| 309 | (defvar footnote-current-style | ||
| 310 | "Style used for footnoting in the current buffer. | ||
| 311 | The possible values are the same as in `footnote-style'.") | ||
| 312 | |||
| 313 | ;;; Style utilities & functions | 309 | ;;; Style utilities & functions |
| 314 | (defun Footnote-style-p (style) | 310 | (defun Footnote-style-p (style) |
| 315 | "Return non-nil if style is a valid style known to footnote-mode." | 311 | "Return non-nil if style is a valid style known to footnote-mode." |
| @@ -318,14 +314,14 @@ The possible values are the same as in `footnote-style'.") | |||
| 318 | (defun Footnote-index-to-string (index) | 314 | (defun Footnote-index-to-string (index) |
| 319 | "Convert a binary index into a string to display as a footnote. | 315 | "Convert a binary index into a string to display as a footnote. |
| 320 | Conversion is done based upon the current selected style." | 316 | Conversion is done based upon the current selected style." |
| 321 | (let ((alist (if (Footnote-style-p footnote-current-style) | 317 | (let ((alist (if (Footnote-style-p footnote-style) |
| 322 | (assq footnote-current-style footnote-style-alist) | 318 | (assq footnote-style footnote-style-alist) |
| 323 | (nth 0 footnote-style-alist)))) | 319 | (nth 0 footnote-style-alist)))) |
| 324 | (funcall (nth 1 alist) index))) | 320 | (funcall (nth 1 alist) index))) |
| 325 | 321 | ||
| 326 | (defun Footnote-current-regexp () | 322 | (defun Footnote-current-regexp () |
| 327 | "Return the regexp of the index of the current style." | 323 | "Return the regexp of the index of the current style." |
| 328 | (concat (nth 2 (or (assq footnote-current-style footnote-style-alist) | 324 | (concat (nth 2 (or (assq footnote-style footnote-style-alist) |
| 329 | (nth 0 footnote-style-alist))) "*")) | 325 | (nth 0 footnote-style-alist))) "*")) |
| 330 | 326 | ||
| 331 | (defun Footnote-refresh-footnotes (&optional index-regexp) | 327 | (defun Footnote-refresh-footnotes (&optional index-regexp) |
| @@ -382,13 +378,13 @@ styles." | |||
| 382 | (defun Footnote-cycle-style () | 378 | (defun Footnote-cycle-style () |
| 383 | "Select next defined footnote style." | 379 | "Select next defined footnote style." |
| 384 | (interactive) | 380 | (interactive) |
| 385 | (let ((old (Footnote-assoc-index footnote-current-style footnote-style-alist)) | 381 | (let ((old (Footnote-assoc-index footnote-style footnote-style-alist)) |
| 386 | (max (length footnote-style-alist)) | 382 | (max (length footnote-style-alist)) |
| 387 | idx) | 383 | idx) |
| 388 | (setq idx (1+ old)) | 384 | (setq idx (1+ old)) |
| 389 | (when (>= idx max) | 385 | (when (>= idx max) |
| 390 | (setq idx 0)) | 386 | (setq idx 0)) |
| 391 | (setq footnote-current-style (car (nth idx footnote-style-alist))) | 387 | (setq footnote-style (car (nth idx footnote-style-alist))) |
| 392 | (Footnote-refresh-footnotes (nth 2 (nth old footnote-style-alist))))) | 388 | (Footnote-refresh-footnotes (nth 2 (nth old footnote-style-alist))))) |
| 393 | 389 | ||
| 394 | (defun Footnote-set-style (&optional style) | 390 | (defun Footnote-set-style (&optional style) |
| @@ -397,7 +393,7 @@ styles." | |||
| 397 | (list (intern (completing-read | 393 | (list (intern (completing-read |
| 398 | "Footnote Style: " | 394 | "Footnote Style: " |
| 399 | obarray #'Footnote-style-p 'require-match)))) | 395 | obarray #'Footnote-style-p 'require-match)))) |
| 400 | (setq footnote-current-style style)) | 396 | (setq footnote-style style)) |
| 401 | 397 | ||
| 402 | ;; Internal functions | 398 | ;; Internal functions |
| 403 | (defun Footnote-insert-numbered-footnote (arg &optional mousable) | 399 | (defun Footnote-insert-numbered-footnote (arg &optional mousable) |
| @@ -737,7 +733,7 @@ key binding | |||
| 737 | (> (prefix-numeric-value arg) 0))) | 733 | (> (prefix-numeric-value arg) 0))) |
| 738 | (when footnote-mode | 734 | (when footnote-mode |
| 739 | ;; (Footnote-setup-keybindings) | 735 | ;; (Footnote-setup-keybindings) |
| 740 | (set (make-local-variable 'footnote-current-style) footnote-style) | 736 | (make-local-variable 'footnote-style) |
| 741 | (if (fboundp 'force-mode-line-update) | 737 | (if (fboundp 'force-mode-line-update) |
| 742 | (force-mode-line-update) | 738 | (force-mode-line-update) |
| 743 | (set-buffer-modified-p (buffer-modified-p))) | 739 | (set-buffer-modified-p (buffer-modified-p))) |