diff options
author | Chong Yidong <cyd@gnu.org> | 2012-09-07 16:58:31 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-09-07 16:58:31 +0800 |
commit | e5c2edf79ba2b75a3572839fcb9de612f93ab630 (patch) | |
tree | 97949328a6fba5bf022572d490a3212148f3bed8 /lisp/net/browse-url.el | |
parent | eddb36a7d58b99e43deadcc808347008fe8a8627 (diff) | |
download | emacs-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.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." (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 |