Mercurial > emacs
comparison lisp/pcvs-util.el @ 72244:63a604af4b8e
(cvs-get-buffer-create): Obey `noreuse' even if `name'
doesn't look like a file name.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 02 Aug 2006 14:14:19 +0000 |
parents | 2b77fa42947f |
children | e3694f1cb928 858cb33ae39d |
comparison
equal
deleted
inserted
replaced
72243:0fc019770d97 | 72244:63a604af4b8e |
---|---|
124 If the NAME looks like an absolute file name, the buffer will be created | 124 If the NAME looks like an absolute file name, the buffer will be created |
125 with `create-file-buffer' and will probably get another name than NAME. | 125 with `create-file-buffer' and will probably get another name than NAME. |
126 In such a case, the search for another buffer with the same name doesn't | 126 In such a case, the search for another buffer with the same name doesn't |
127 use the buffer name but the buffer's `list-buffers-directory' variable. | 127 use the buffer name but the buffer's `list-buffers-directory' variable. |
128 If NOREUSE is non-nil, always return a new buffer." | 128 If NOREUSE is non-nil, always return a new buffer." |
129 (or (and (not (file-name-absolute-p name)) (get-buffer-create name)) | 129 (or (and (not (file-name-absolute-p name)) |
130 (if noreuse (generate-new-buffer name) | |
131 (get-buffer-create name))) | |
130 (unless noreuse | 132 (unless noreuse |
131 (dolist (buf (buffer-list)) | 133 (dolist (buf (buffer-list)) |
132 (with-current-buffer buf | 134 (with-current-buffer buf |
133 (when (equal name list-buffers-directory) | 135 (when (equal name list-buffers-directory) |
134 (return buf))))) | 136 (return buf))))) |