summaryrefslogtreecommitdiff
path: root/lisp/net/browse-url.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-09-07 16:58:31 +0800
committerChong Yidong <cyd@gnu.org>2012-09-07 16:58:31 +0800
commite5c2edf79ba2b75a3572839fcb9de612f93ab630 (patch)
tree97949328a6fba5bf022572d490a3212148f3bed8 /lisp/net/browse-url.el
parenteddb36a7d58b99e43deadcc808347008fe8a8627 (diff)
downloademacs-e5c2edf79ba2b75a3572839fcb9de612f93ab630.tar.gz
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/browse-url.el')
-rw-r--r--lisp/net/browse-url.el2
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."
(and buffer (set-buffer buffer))
(let ((file-name
;; Ignore real name if restricted
- (and (= (- (point-max) (point-min)) (buffer-size))
+ (and (not (buffer-narrowed-p))
(or buffer-file-name
(and (boundp 'dired-directory) dired-directory)))))
(or file-name