diff options
| author | Juri Linkov <juri@linkov.net> | 2020-09-24 21:52:22 +0300 |
|---|---|---|
| committer | Juri Linkov <juri@linkov.net> | 2020-09-24 21:52:22 +0300 |
| commit | 4bc4d19bd16735f9ee79b2e736eeab59d57070d7 (patch) | |
| tree | 595ef9556876f22c998bab8848d1b00e4a619b48 | |
| parent | 9bf9f699b130e35e4ca57301db1f614682b4f762 (diff) | |
| download | emacs-4bc4d19bd16735f9ee79b2e736eeab59d57070d7.tar.gz | |
* lisp/simple.el (goto-line-read-args): More relevant default line number.
| -rw-r--r-- | lisp/simple.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 7cb71530b36..6bc41961eba 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1259,7 +1259,11 @@ that uses or sets the mark." ;; In a narrowed buffer. (if relative " relative" " absolute")) buffer-prompt) - (list default (line-number-at-pos)) + (list default (if (or relative (= (point-min) 1)) + (line-number-at-pos) + (save-restriction + (widen) + (line-number-at-pos)))) 'goto-line-history) buffer)))) |
