diff options
| author | Chong Yidong | 2012-09-07 16:58:31 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-09-07 16:58:31 +0800 |
| commit | e5c2edf79ba2b75a3572839fcb9de612f93ab630 (patch) | |
| tree | 97949328a6fba5bf022572d490a3212148f3bed8 /lisp/net | |
| parent | eddb36a7d58b99e43deadcc808347008fe8a8627 (diff) | |
| download | emacs-e5c2edf79ba2b75a3572839fcb9de612f93ab630.tar.gz emacs-e5c2edf79ba2b75a3572839fcb9de612f93ab630.zip | |
Add a utility function buffer-narrowed-p, and use it.
* lisp/subr.el (buffer-narrowed-p): New function.
* lisp/ses.el (ses-widen):
* lisp/simple.el (count-words--buffer-message):
* lisp/net/browse-url.el (browse-url-of-buffer): Use it
* lisp/simple.el (count-words-region): Don't signal an error if there
is a non-nil prefix arg and the mark is not set.
* doc/lispref/positions.texi (Narrowing): Document buffer-narrowed-p.
Diffstat (limited to 'lisp/net')
| -rw-r--r-- | lisp/net/browse-url.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 20d71215926..d1d33bfe566 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -743,7 +743,7 @@ narrowed." | |||
| 743 | (and buffer (set-buffer buffer)) | 743 | (and buffer (set-buffer buffer)) |
| 744 | (let ((file-name | 744 | (let ((file-name |
| 745 | ;; Ignore real name if restricted | 745 | ;; Ignore real name if restricted |
| 746 | (and (= (- (point-max) (point-min)) (buffer-size)) | 746 | (and (not (buffer-narrowed-p)) |
| 747 | (or buffer-file-name | 747 | (or buffer-file-name |
| 748 | (and (boundp 'dired-directory) dired-directory))))) | 748 | (and (boundp 'dired-directory) dired-directory))))) |
| 749 | (or file-name | 749 | (or file-name |