summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in10
-rwxr-xr-xbuild-ins.in10
-rw-r--r--src/buffer.c12
-rw-r--r--src/fileio.c33
4 files changed, 49 insertions, 16 deletions
diff --git a/Makefile.in b/Makefile.in
index ec62fa31aa3..20e4300dc52 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -23,7 +23,7 @@ SHELL = /bin/sh
# already, the `install' targets will move or copy it there. The
# default definitions for the variables below are expressed in terms
# of this one, so you may not need to change them.
-LIBROOT=/u/src/emacs/19.0
+LIBROOT=/usr/local/emacs
# This is where the `install' make target should place the binaries
# people will want to run directly (like etags and Emacs itself).
@@ -34,19 +34,19 @@ INSTALLBIN=/usr/local/bin
# elisp files should go under DATADIR (below), since both elisp source
# and compiled elisp are completely portable, but it's traditional to
# give the lisp files their own subdirectory.
-LISPPATH=/u/src/emacs/19.0/lisp
+LISPPATH=/usr/local/emacs/local-lisp:/usr/local/emacs/lisp
# Emacs will look here for its architecture-independent files (like
# the tutorial and the zippy database).
-DATADIR=/u/src/emacs/19.0/share-lib
+DATADIR=/usr/local/emacs/share-lib
# Emacs will look here for its architecture-dependent files, like
# executables for its utilities.
-LIBDIR=/u/src/emacs/19.0/arch-lib
+LIBDIR=/usr/local/emacs/arch-lib
# The locking directory, where the Emacs locking code keeps track of
# which files are currently being edited.
-LOCKDIR=/u/src/emacs/19.0/lock
+LOCKDIR=/usr/local/emacs/lock
# This is where the `install' make target should place the man pages
# for the binaries it installs.
diff --git a/build-ins.in b/build-ins.in
index f2a952b6a0b..275a46b6f08 100755
--- a/build-ins.in
+++ b/build-ins.in
@@ -7,27 +7,27 @@
# libaries. The default definitions for the variables below are
# expressed in terms of this one, so you may not need to change them.
# set LIBROOT=/usr/local/lib/emacs-19.0
-LIBROOT=/u/src/emacs/19.0
+LIBROOT=/usr/local/emacs
# Emacs will search this path to find its elisp files. This should be
# a colon-separated list of directories. Strictly speaking, all the
# elisp files should go under DATADIR (below), since both elisp source
# and compiled elisp are completely portable, but it's traditional to
# give the lisp files their own subdirectory.
-LISPPATH=/u/src/emacs/19.0/lisp
+LISPPATH=/usr/local/emacs/local-lisp:/usr/local/emacs/lisp
# Emacs will look here for its architecture-independent files (like
# the tutorial and the zippy database).
-DATADIR=/u/src/emacs/19.0/share-lib
+DATADIR=/usr/local/emacs/share-lib
# Emacs will look here for its architecture-dependent files, like
# executables for its utilities.
-LIBDIR=/u/src/emacs/19.0/arch-lib
+LIBDIR=/usr/local/emacs/arch-lib
# The locking directory, where the Emacs locking code keeps track of
# which files are currently being edited.
# set LOCKDIR=${LIBROOT}/lock
-LOCKDIR=/u/src/emacs/19.0/lock
+LOCKDIR=/usr/local/emacs/lock
# This is where build-install should place the binaries people will
# want to run directly (like etags and Emacs itself).
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'.")
return Qt;
}
-/* Put the element for buffer BUF at the front of buffer-alist.
- This is done when a buffer is selected "visibly".
- It keeps buffer-alist in the order of recency of selection
- so that other_buffer will return something nice. */
+/* Move the assoc for buffer BUF to the front of buffer-alist. Since
+ we do this each time BUF is selected visibly, the more recently
+ selected buffers are always closer to the front of the list. This
+ means that other_buffer is more likely to choose a relevant buffer. */
record_buffer (buf)
Lisp_Object buf;
@@ -733,8 +733,8 @@ record_buffer (buf)
prev = link;
}
- /* Effectively do Vbuffer_alist = Fdelq (link, Vbuffer_alist)
- but cannot use Fdelq here it that allows quitting. */
+ /* Effectively do Vbuffer_alist = Fdelq (link, Vbuffer_alist);
+ we cannot use Fdelq itself here because it allows quitting. */
if (NILP (prev))
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.")
return Qnil;
}
+DEFUN ("set-umask", Fset_umask, Sset_umask, 1, 1, 0,
+ "Select which permission bits to disable in newly created files.\n\
+MASK should be an integer; if a permission's bit in MASK is 1,\n\
+subsequently created files will not have that permission enabled.\n\
+Only the low 9 bits are used.\n\
+This setting is inherited by subprocesses.")
+ (mask)
+ Lisp_Object mask;
+{
+ CHECK_NUMBER (mask, 0);
+
+ umask (XINT (mask) & 0777);
+
+ return Qnil;
+}
+
+DEFUN ("umask", Fumask, Sumask, 0, 0, 0,
+ "Return the current umask value.\n\
+The umask value determines which permissions are enabled in newly\n\
+created files. If a permission's bit in the umask is 1, subsequently\n\
+created files will not have that permission enabled.")
+ ()
+{
+ Lisp_Object mask;
+
+ XSET (mask, Lisp_Int, umask (0));
+ umask (XINT (mask));
+
+ return mask;
+}
+
DEFUN ("file-newer-than-file-p", Ffile_newer_than_file_p, Sfile_newer_than_file_p, 2, 2, 0,
"Return t if file FILE1 is newer than file FILE2.\n\
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.");
defsubr (&Sfile_accessible_directory_p);
defsubr (&Sfile_modes);
defsubr (&Sset_file_modes);
+ defsubr (&Sset_umask);
+ defsubr (&Sumask);
defsubr (&Sfile_newer_than_file_p);
defsubr (&Sinsert_file_contents);
defsubr (&Swrite_region);