diff options
| author | Stefan Monnier | 2017-12-25 23:32:24 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2017-12-25 23:32:24 -0500 |
| commit | 336932aaca77537bf0cf9d6d254827957166d6e9 (patch) | |
| tree | 2356f679c9e39ef35090ac7ef8059af0f5765daf | |
| parent | b7123e2a451961970c1a71c734f3ce607665ae6c (diff) | |
| download | emacs-336932aaca77537bf0cf9d6d254827957166d6e9.tar.gz emacs-336932aaca77537bf0cf9d6d254827957166d6e9.zip | |
* lisp/mail/footnote.el: Use lexical-binding
(footnote--renumber): Mark arg 'from' as unused.
(footnote-add-footnote, footnote-renumber-footnotes)
(footnote-back-to-message): Remove unused argument 'arg'.
| -rw-r--r-- | lisp/mail/footnote.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index 795b89649ed..2448211a238 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; footnote.el --- footnote support for message mode | 1 | ;;; footnote.el --- footnote support for message mode -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997, 2000-2017 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 2000-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -546,7 +546,7 @@ styles." | |||
| 546 | string 'footnote-number arg footnote-mouse-highlight t) | 546 | string 'footnote-number arg footnote-mouse-highlight t) |
| 547 | (propertize string 'footnote-number arg))))) | 547 | (propertize string 'footnote-number arg))))) |
| 548 | 548 | ||
| 549 | (defun footnote--renumber (from to pointer-alist text-alist) | 549 | (defun footnote--renumber (_from to pointer-alist text-alist) |
| 550 | "Renumber a single footnote." | 550 | "Renumber a single footnote." |
| 551 | (let* ((posn-list (cdr pointer-alist))) | 551 | (let* ((posn-list (cdr pointer-alist))) |
| 552 | (setcar pointer-alist to) | 552 | (setcar pointer-alist to) |
| @@ -782,14 +782,14 @@ footnote area, returns `point-max'." | |||
| 782 | (setq i (1+ i))) | 782 | (setq i (1+ i))) |
| 783 | rc))) | 783 | rc))) |
| 784 | 784 | ||
| 785 | (defun footnote-add-footnote (&optional arg) | 785 | (defun footnote-add-footnote () |
| 786 | "Add a numbered footnote. | 786 | "Add a numbered footnote. |
| 787 | The number the footnote receives is dependent upon the relative location | 787 | The number the footnote receives is dependent upon the relative location |
| 788 | of any other previously existing footnotes. | 788 | of any other previously existing footnotes. |
| 789 | If the variable `footnote-narrow-to-footnotes-when-editing' is set, | 789 | If the variable `footnote-narrow-to-footnotes-when-editing' is set, |
| 790 | the buffer is narrowed to the footnote body. The restriction is removed | 790 | the buffer is narrowed to the footnote body. The restriction is removed |
| 791 | by using `footnote-back-to-message'." | 791 | by using `footnote-back-to-message'." |
| 792 | (interactive "*P") | 792 | (interactive "*") |
| 793 | (let ((num | 793 | (let ((num |
| 794 | (if footnote-text-marker-alist | 794 | (if footnote-text-marker-alist |
| 795 | (if (< (point) (cl-cadar (last footnote-pointer-marker-alist))) | 795 | (if (< (point) (cl-cadar (last footnote-pointer-marker-alist))) |
| @@ -869,9 +869,9 @@ delete the footnote with that number." | |||
| 869 | (when (looking-back "\n\n" (- (point) 2)) | 869 | (when (looking-back "\n\n" (- (point) 2)) |
| 870 | (kill-line -1)))))))) | 870 | (kill-line -1)))))))) |
| 871 | 871 | ||
| 872 | (defun footnote-renumber-footnotes (&optional arg) | 872 | (defun footnote-renumber-footnotes () |
| 873 | "Renumber footnotes, starting from 1." | 873 | "Renumber footnotes, starting from 1." |
| 874 | (interactive "*P") | 874 | (interactive "*") |
| 875 | (save-excursion | 875 | (save-excursion |
| 876 | (let ((i 0) | 876 | (let ((i 0) |
| 877 | (notes (length footnote-pointer-marker-alist)) | 877 | (notes (length footnote-pointer-marker-alist)) |
| @@ -905,12 +905,12 @@ specified, jump to the text of that footnote." | |||
| 905 | (t | 905 | (t |
| 906 | (error "I don't see a footnote here"))))) | 906 | (error "I don't see a footnote here"))))) |
| 907 | 907 | ||
| 908 | (defun footnote-back-to-message (&optional arg) | 908 | (defun footnote-back-to-message () |
| 909 | "Move cursor back to footnote referent. | 909 | "Move cursor back to footnote referent. |
| 910 | If the cursor is not over the text of a footnote, point is not changed. | 910 | If the cursor is not over the text of a footnote, point is not changed. |
| 911 | If the buffer was narrowed due to `footnote-narrow-to-footnotes-when-editing' | 911 | If the buffer was narrowed due to `footnote-narrow-to-footnotes-when-editing' |
| 912 | being set it is automatically widened." | 912 | being set it is automatically widened." |
| 913 | (interactive "P") | 913 | (interactive) |
| 914 | (let ((note (footnote--text-under-cursor))) | 914 | (let ((note (footnote--text-under-cursor))) |
| 915 | (when note | 915 | (when note |
| 916 | (when footnote-narrow-to-footnotes-when-editing | 916 | (when footnote-narrow-to-footnotes-when-editing |