diff options
| author | Jim Blandy | 1992-02-15 22:18:37 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-02-15 22:18:37 +0000 |
| commit | 36a8c287a8731587bec4810565df541176b86ce5 (patch) | |
| tree | f2b6665281767ad92fe76ec8b30a6b062cd9f909 /src | |
| parent | 35e46c62b9fa31f0b3ed4b237c9d92f3020af52e (diff) | |
| download | emacs-36a8c287a8731587bec4810565df541176b86ce5.tar.gz emacs-36a8c287a8731587bec4810565df541176b86ce5.zip | |
*** empty log message ***
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 12 | ||||
| -rw-r--r-- | src/fileio.c | 33 |
2 files changed, 39 insertions, 6 deletions
diff --git a/src/buffer.c b/src/buffer.c index 55d85f979ba..bbf0e297302 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -715,10 +715,10 @@ with `delete-process'.") | |||
| 715 | return Qt; | 715 | return Qt; |
| 716 | } | 716 | } |
| 717 | 717 | ||
| 718 | /* Put the element for buffer BUF at the front of buffer-alist. | 718 | /* Move the assoc for buffer BUF to the front of buffer-alist. Since |
| 719 | This is done when a buffer is selected "visibly". | 719 | we do this each time BUF is selected visibly, the more recently |
| 720 | It keeps buffer-alist in the order of recency of selection | 720 | selected buffers are always closer to the front of the list. This |
| 721 | so that other_buffer will return something nice. */ | 721 | means that other_buffer is more likely to choose a relevant buffer. */ |
| 722 | 722 | ||
| 723 | record_buffer (buf) | 723 | record_buffer (buf) |
| 724 | Lisp_Object buf; | 724 | Lisp_Object buf; |
| @@ -733,8 +733,8 @@ record_buffer (buf) | |||
| 733 | prev = link; | 733 | prev = link; |
| 734 | } | 734 | } |
| 735 | 735 | ||
| 736 | /* Effectively do Vbuffer_alist = Fdelq (link, Vbuffer_alist) | 736 | /* Effectively do Vbuffer_alist = Fdelq (link, Vbuffer_alist); |
| 737 | but cannot use Fdelq here it that allows quitting. */ | 737 | we cannot use Fdelq itself here because it allows quitting. */ |
| 738 | 738 | ||
| 739 | if (NILP (prev)) | 739 | if (NILP (prev)) |
| 740 | Vbuffer_alist = XCONS (Vbuffer_alist)->cdr; | 740 | Vbuffer_alist = XCONS (Vbuffer_alist)->cdr; |
diff --git a/src/fileio.c b/src/fileio.c index 42ac45b4e53..b12f48c625a 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1911,6 +1911,37 @@ Only the 12 low bits of MODE are used.") | |||
| 1911 | return Qnil; | 1911 | return Qnil; |
| 1912 | } | 1912 | } |
| 1913 | 1913 | ||
| 1914 | DEFUN ("set-umask", Fset_umask, Sset_umask, 1, 1, 0, | ||
| 1915 | "Select which permission bits to disable in newly created files.\n\ | ||
| 1916 | MASK should be an integer; if a permission's bit in MASK is 1,\n\ | ||
| 1917 | subsequently created files will not have that permission enabled.\n\ | ||
| 1918 | Only the low 9 bits are used.\n\ | ||
| 1919 | This setting is inherited by subprocesses.") | ||
| 1920 | (mask) | ||
| 1921 | Lisp_Object mask; | ||
| 1922 | { | ||
| 1923 | CHECK_NUMBER (mask, 0); | ||
| 1924 | |||
| 1925 | umask (XINT (mask) & 0777); | ||
| 1926 | |||
| 1927 | return Qnil; | ||
| 1928 | } | ||
| 1929 | |||
| 1930 | DEFUN ("umask", Fumask, Sumask, 0, 0, 0, | ||
| 1931 | "Return the current umask value.\n\ | ||
| 1932 | The umask value determines which permissions are enabled in newly\n\ | ||
| 1933 | created files. If a permission's bit in the umask is 1, subsequently\n\ | ||
| 1934 | created files will not have that permission enabled.") | ||
| 1935 | () | ||
| 1936 | { | ||
| 1937 | Lisp_Object mask; | ||
| 1938 | |||
| 1939 | XSET (mask, Lisp_Int, umask (0)); | ||
| 1940 | umask (XINT (mask)); | ||
| 1941 | |||
| 1942 | return mask; | ||
| 1943 | } | ||
| 1944 | |||
| 1914 | DEFUN ("file-newer-than-file-p", Ffile_newer_than_file_p, Sfile_newer_than_file_p, 2, 2, 0, | 1945 | DEFUN ("file-newer-than-file-p", Ffile_newer_than_file_p, Sfile_newer_than_file_p, 2, 2, 0, |
| 1915 | "Return t if file FILE1 is newer than file FILE2.\n\ | 1946 | "Return t if file FILE1 is newer than file FILE2.\n\ |
| 1916 | If FILE1 does not exist, the answer is nil;\n\ | 1947 | If FILE1 does not exist, the answer is nil;\n\ |
| @@ -2842,6 +2873,8 @@ nil means use format `var'. This variable is meaningful only on VMS."); | |||
| 2842 | defsubr (&Sfile_accessible_directory_p); | 2873 | defsubr (&Sfile_accessible_directory_p); |
| 2843 | defsubr (&Sfile_modes); | 2874 | defsubr (&Sfile_modes); |
| 2844 | defsubr (&Sset_file_modes); | 2875 | defsubr (&Sset_file_modes); |
| 2876 | defsubr (&Sset_umask); | ||
| 2877 | defsubr (&Sumask); | ||
| 2845 | defsubr (&Sfile_newer_than_file_p); | 2878 | defsubr (&Sfile_newer_than_file_p); |
| 2846 | defsubr (&Sinsert_file_contents); | 2879 | defsubr (&Sinsert_file_contents); |
| 2847 | defsubr (&Swrite_region); | 2880 | defsubr (&Swrite_region); |