Mercurial > emacs
comparison lisp/files.el @ 11563:63215d2a1e3f
(toggle-read-only, rename-uniquely): Use force-mode-line-update.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 25 Apr 1995 22:22:21 +0000 |
parents | 03aaf11843d1 |
children | d18ae33bb3b6 |
comparison
equal
deleted
inserted
replaced
11562:8ff50a0715e1 | 11563:63215d2a1e3f |
---|---|
1834 (interactive "P") | 1834 (interactive "P") |
1835 (setq buffer-read-only | 1835 (setq buffer-read-only |
1836 (if (null arg) | 1836 (if (null arg) |
1837 (not buffer-read-only) | 1837 (not buffer-read-only) |
1838 (> (prefix-numeric-value arg) 0))) | 1838 (> (prefix-numeric-value arg) 0))) |
1839 ;; Force mode-line redisplay | 1839 (force-mode-line-update)) |
1840 (set-buffer-modified-p (buffer-modified-p))) | |
1841 | 1840 |
1842 (defun insert-file (filename) | 1841 (defun insert-file (filename) |
1843 "Insert contents of file FILENAME into buffer after point. | 1842 "Insert contents of file FILENAME into buffer after point. |
1844 Set mark after the inserted text. | 1843 Set mark after the inserted text. |
1845 | 1844 |
1894 (buffer-name))) | 1893 (buffer-name))) |
1895 (new-buf (generate-new-buffer base-name)) | 1894 (new-buf (generate-new-buffer base-name)) |
1896 (name (buffer-name new-buf))) | 1895 (name (buffer-name new-buf))) |
1897 (kill-buffer new-buf) | 1896 (kill-buffer new-buf) |
1898 (rename-buffer name) | 1897 (rename-buffer name) |
1899 (set-buffer-modified-p (buffer-modified-p))))) ; force mode line update | 1898 (force-mode-line-update)))) |
1900 | 1899 |
1901 (defun make-directory (dir &optional parents) | 1900 (defun make-directory (dir &optional parents) |
1902 "Create the directory DIR and any nonexistent parent dirs. | 1901 "Create the directory DIR and any nonexistent parent dirs. |
1903 Interactively, the default choice of directory to create | 1902 Interactively, the default choice of directory to create |
1904 is the current default directory for file names. | 1903 is the current default directory for file names. |