Mercurial > hg > xemacs-beta
comparison lisp/files.el @ 5473:ac37a5f7e5be
Merge with trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Thu, 17 Mar 2011 23:42:59 +0100 |
parents | 308d34e9f07d 4141aeddc55b |
children | 4dee0387b9de |
comparison
equal
deleted
inserted
replaced
5472:e79980ee5efe | 5473:ac37a5f7e5be |
---|---|
994 (interactive (list (read-file-name "Find file read-only: ") | 994 (interactive (list (read-file-name "Find file read-only: ") |
995 (and current-prefix-arg | 995 (and current-prefix-arg |
996 (read-coding-system "Coding system: ")) | 996 (read-coding-system "Coding system: ")) |
997 t)) | 997 t)) |
998 (let ((value (find-file filename codesys wildcards))) | 998 (let ((value (find-file filename codesys wildcards))) |
999 (mapcar #'(lambda (buffer) | 999 (mapc #'(lambda (buffer) |
1000 (set-symbol-value-in-buffer 'buffer-read-only t buffer)) | 1000 (set-symbol-value-in-buffer 'buffer-read-only t buffer)) |
1001 (if (listp value) value (list value))) | 1001 (if (listp value) value (list value))) |
1002 value)) | 1002 value)) |
1003 | 1003 |
1004 (defun find-file-read-only-other-window (filename &optional codesys wildcards) | 1004 (defun find-file-read-only-other-window (filename &optional codesys wildcards) |
1005 "Edit file FILENAME in another window but don't allow changes. | 1005 "Edit file FILENAME in another window but don't allow changes. |
1006 Like \\[find-file-other-window] but marks buffer as read-only. | 1006 Like \\[find-file-other-window] but marks buffer as read-only. |
4551 (while (consp file-arg-indices) | 4551 (while (consp file-arg-indices) |
4552 (let ((pair (nthcdr (car file-arg-indices) arguments))) | 4552 (let ((pair (nthcdr (car file-arg-indices) arguments))) |
4553 (and (car pair) | 4553 (and (car pair) |
4554 (string-match "\\`/:" (car pair)) | 4554 (string-match "\\`/:" (car pair)) |
4555 (setcar pair | 4555 (setcar pair |
4556 (if (= (length (car pair)) 2) | 4556 (if (eql (length (car pair)) 2) |
4557 "/" | 4557 "/" |
4558 (substring (car pair) 2))))) | 4558 (substring (car pair) 2))))) |
4559 (setq file-arg-indices (cdr file-arg-indices)))) | 4559 (setq file-arg-indices (cdr file-arg-indices)))) |
4560 (if (eq file-arg-indices 'identity) | 4560 (if (eq file-arg-indices 'identity) |
4561 (car arguments) | 4561 (car arguments) |