diff options
| author | Katsumi Yamaoka | 2017-08-08 23:40:27 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2017-08-08 23:40:27 +0000 |
| commit | 2ef880cc75a393ee57c57930d34c9c4b516db4e4 (patch) | |
| tree | e2ffb364dc63e5ca4ab4bd6fa7ebd1e0efa5a1ef | |
| parent | 63b5a4a65eec5792b985c9d6be68424731bd478d (diff) | |
| download | emacs-2ef880cc75a393ee57c57930d34c9c4b516db4e4.tar.gz emacs-2ef880cc75a393ee57c57930d34c9c4b516db4e4.zip | |
Don't try to jump to non-existent part (bug#28013)
* lisp/gnus/gnus-art.el (gnus-article-edit-part): Don't try to jump to
the next part if there is the only one part in the article (bug#28013).
| -rw-r--r-- | lisp/gnus/gnus-art.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 3f384c65ece..ce0ff2ee8c0 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -5058,11 +5058,14 @@ and `gnus-mime-delete-part', and not provided at run-time normally." | |||
| 5058 | (gnus-article-edit-done)) | 5058 | (gnus-article-edit-done)) |
| 5059 | (gnus-configure-windows 'article) | 5059 | (gnus-configure-windows 'article) |
| 5060 | (sit-for 0) | 5060 | (sit-for 0) |
| 5061 | (when (and current-id (integerp gnus-auto-select-part)) | 5061 | (let ((handles (with-current-buffer gnus-article-buffer |
| 5062 | (gnus-article-jump-to-part | 5062 | gnus-article-mime-handle-alist))) |
| 5063 | (min (max (+ current-id gnus-auto-select-part) 1) | 5063 | ;; `handles' will be nil if there is the only one part |
| 5064 | (with-current-buffer gnus-article-buffer | 5064 | ;; in the article and is deleted. |
| 5065 | (length gnus-article-mime-handle-alist))))))) | 5065 | (when (and handles current-id (integerp gnus-auto-select-part)) |
| 5066 | (gnus-article-jump-to-part | ||
| 5067 | (min (max (+ current-id gnus-auto-select-part) 1) | ||
| 5068 | (length handles))))))) | ||
| 5066 | 5069 | ||
| 5067 | (defun gnus-mime-replace-part (file) | 5070 | (defun gnus-mime-replace-part (file) |
| 5068 | "Replace MIME part under point with an external body." | 5071 | "Replace MIME part under point with an external body." |