Now on revision 107454. ------------------------------------------------------------ revno: 107454 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-02-27 23:33:01 -0800 message: NEWS markup diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-02-26 09:52:09 +0000 +++ etc/NEWS 2012-02-28 07:33:01 +0000 @@ -1426,8 +1426,8 @@ both non-nil. Interactively, TRASH defaults to t, unless a prefix argument is supplied (see Trash changes, above). -FIXME -** New functions files-equal-p, file-subdir-of-p that [do something] ++++ +** New file predicate functions: files-equal-p, file-subdir-of-p. +++ ** Tool-bars can display separators. ------------------------------------------------------------ revno: 107453 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-02-27 23:30:20 -0800 message: * doc/lispref/makefile.w32-in (srcs): Remove locals.texi. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-02-28 04:17:54 +0000 +++ doc/lispref/ChangeLog 2012-02-28 07:30:20 +0000 @@ -5,6 +5,7 @@ Remove menu entry. * errors.texi, maps.texi: Adjust node pointers. * internals.texi (Buffer Internals): Remove cross-refs to locals.texi. + * makefile.w32-in (srcs): * Makefile.in (srcs): Remove locals.texi. * frames.texi (Mouse Position): Fix cross-ref. === modified file 'doc/lispref/makefile.w32-in' --- doc/lispref/makefile.w32-in 2012-01-27 21:03:56 +0000 +++ doc/lispref/makefile.w32-in 2012-02-28 07:30:20 +0000 @@ -1,6 +1,6 @@ # -*- Makefile -*- for the GNU Emacs Lisp Reference Manual. -# Copyright (C) 2003-2012 Free Software Foundation, Inc. +# Copyright (C) 2003-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -72,7 +72,6 @@ $(srcdir)/keymaps.texi \ $(srcdir)/lists.texi \ $(srcdir)/loading.texi \ - $(srcdir)/locals.texi \ $(srcdir)/macros.texi \ $(srcdir)/maps.texi \ $(srcdir)/markers.texi \ ------------------------------------------------------------ revno: 107452 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-02-27 20:17:54 -0800 message: ChangeLog for previous change diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-02-28 04:01:56 +0000 +++ doc/lispref/ChangeLog 2012-02-28 04:17:54 +0000 @@ -1,5 +1,12 @@ 2012-02-28 Glenn Morris + * locals.texi: Remove file. + * elisp.texi, vol1.texi, vol2.texi: Don't include locals.texi. + Remove menu entry. + * errors.texi, maps.texi: Adjust node pointers. + * internals.texi (Buffer Internals): Remove cross-refs to locals.texi. + * Makefile.in (srcs): Remove locals.texi. + * frames.texi (Mouse Position): Fix cross-ref. 2012-02-27 Chong Yidong ------------------------------------------------------------ revno: 107451 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-02-27 20:17:02 -0800 message: Remove lispref/locals.texi Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00702.html * doc/lispref/locals.texi: Remove file. * doc/lispref/elisp.texi, doc/lispref/vol1.texi, doc/lispref/vol2.texi: Don't include locals.texi. Remove menu entry. * doc/lispref/errors.texi, doc/lispref/maps.texi: Adjust node pointers. * doc/lispref/internals.texi (Buffer Internals): Remove cross-refs to locals.texi. * doc/lispref/Makefile.in (srcs): Remove locals.texi. * admin/FOR-RELEASE: Related markup. diff: === modified file 'admin/FOR-RELEASE' --- admin/FOR-RELEASE 2012-02-27 07:26:13 +0000 +++ admin/FOR-RELEASE 2012-02-28 04:17:02 +0000 @@ -208,7 +208,6 @@ keymaps.texi cyd lists.texi cyd loading.texi cyd -locals.texi macros.texi cyd maps.texi markers.texi === modified file 'doc/lispref/Makefile.in' --- doc/lispref/Makefile.in 2012-01-25 21:42:37 +0000 +++ doc/lispref/Makefile.in 2012-02-28 04:17:02 +0000 @@ -1,6 +1,6 @@ # Makefile for the GNU Emacs Lisp Reference Manual. -# Copyright (C) 1990-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1990-1996, 1998-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -70,7 +70,6 @@ $(srcdir)/keymaps.texi \ $(srcdir)/lists.texi \ $(srcdir)/loading.texi \ - $(srcdir)/locals.texi \ $(srcdir)/macros.texi \ $(srcdir)/maps.texi \ $(srcdir)/markers.texi \ === modified file 'doc/lispref/elisp.texi' --- doc/lispref/elisp.texi 2012-02-25 20:59:46 +0000 +++ doc/lispref/elisp.texi 2012-02-28 04:17:02 +0000 @@ -44,8 +44,7 @@ This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@* corresponding to Emacs version @value{EMACSVER}. -Copyright @copyright{} 1990-1996, 1998-2012 Free Software -Foundation, Inc. +Copyright @copyright{} 1990-1996, 1998-2012 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document @@ -171,8 +170,6 @@ * GNU Emacs Internals:: Building and dumping Emacs; internal data structures. * Standard Errors:: List of main error symbols. -* Standard Buffer-Local Variables:: - List of variables buffer-local in all buffers. * Standard Keymaps:: List of standard keymaps. * Standard Hooks:: List of standard hook variables. @@ -1512,7 +1509,6 @@ @include tips.texi @include internals.texi @include errors.texi -@include locals.texi @include maps.texi @include hooks.texi === modified file 'doc/lispref/errors.texi' --- doc/lispref/errors.texi 2012-02-25 20:59:46 +0000 +++ doc/lispref/errors.texi 2012-02-28 04:17:02 +0000 @@ -3,7 +3,7 @@ @c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/errors -@node Standard Errors, Standard Buffer-Local Variables, GNU Emacs Internals, Top +@node Standard Errors, Standard Keymaps, GNU Emacs Internals, Top @appendix Standard Errors @cindex standard errors === modified file 'doc/lispref/internals.texi' --- doc/lispref/internals.texi 2012-01-19 07:21:25 +0000 +++ doc/lispref/internals.texi 2012-02-28 04:17:02 +0000 @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1993, 1998-1999, 2001-2012 Free Software Foundation, Inc. +@c Copyright (C) 1990-1993, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/internals @node GNU Emacs Internals, Standard Errors, Tips, Top @@ -1011,8 +1011,7 @@ buffer-local (@pxref{Buffer-Local Variables}), whose corresponding variable names have the additional prefix @code{buffer-} and have underscores replaced with dashes. For instance, @code{undo_list} -stores the value of @code{buffer-undo-list}. @xref{Standard -Buffer-Local Variables}. +stores the value of @code{buffer-undo-list}. @item mark The mark for the buffer. The mark is a marker, hence it is also @@ -1095,7 +1094,6 @@ buffer-local (@pxref{Buffer-Local Variables}), whose corresponding variable names have underscores replaced with dashes. For instance, @code{mode_line_format} stores the value of @code{mode-line-format}. -@xref{Standard Buffer-Local Variables}. @item last_selected_window This is the last window that was selected with this buffer in it, or @code{nil} === removed file 'doc/lispref/locals.texi' --- doc/lispref/locals.texi 2012-01-19 07:21:25 +0000 +++ doc/lispref/locals.texi 1970-01-01 00:00:00 +0000 @@ -1,217 +0,0 @@ -@c -*-texinfo-*- -@c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. -@c See the file elisp.texi for copying conditions. -@setfilename ../../info/locals -@node Standard Buffer-Local Variables, Standard Keymaps, Standard Errors, Top -@appendix Buffer-Local Variables -@c The title "Standard Buffer-Local Variables" is too long for -@c smallbook. --rjc 30mar92 -@cindex buffer-local variables, general-purpose -@cindex standard buffer-local variables - - The table below lists the general-purpose Emacs variables that -automatically become buffer-local in each buffer. Most become -buffer-local only when set; a few of them are always local in every -buffer. Many Lisp packages define such variables for their internal -use, but we don't try to list them all here. - - Every buffer-specific minor mode defines a buffer-local variable -named @samp{@var{modename}-mode}. @xref{Minor Mode Conventions}. -Minor mode variables will not be listed here. - -@table @code -@item auto-fill-function -@xref{Auto Filling}. - -@item buffer-auto-save-file-format -@xref{Format Conversion}. - -@item buffer-auto-save-file-name -@xref{Auto-Saving}. - -@item buffer-backed-up -@xref{Making Backups}. - -@item buffer-display-count -@xref{Buffers and Windows}. - -@item buffer-display-table -@xref{Active Display Table}. - -@item buffer-display-time -@xref{Buffers and Windows}. - -@item buffer-file-coding-system -@xref{Encoding and I/O}. - -@item buffer-file-format -@xref{Format Conversion}. - -@item buffer-file-name -@xref{Buffer File Name}. - -@item buffer-file-number -@xref{Buffer File Name}. - -@item buffer-file-truename -@xref{Buffer File Name}. - -@item buffer-file-type -@xref{MS-DOS File Types}. - -@item buffer-invisibility-spec -@xref{Invisible Text}. - -@item buffer-offer-save -@xref{Killing Buffers}. - -@item buffer-save-without-query -@xref{Killing Buffers}. - -@item buffer-read-only -@xref{Read Only Buffers}. - -@item buffer-saved-size -@xref{Auto-Saving}. - -@item buffer-undo-list -@xref{Undo}. - -@item cache-long-line-scans -@xref{Truncation}. - -@item case-fold-search -@xref{Searching and Case}. - -@item comment-column -@xref{Comments,,, emacs, The GNU Emacs Manual}. - -@item ctl-arrow -@xref{Usual Display}. - -@item cursor-in-non-selected-windows -@xref{Basic Windows}. - -@item cursor-type -@xref{Cursor Parameters}. - -@item default-directory -@xref{File Name Expansion}. - -@item defun-prompt-regexp -@xref{List Motion}. - -@item desktop-save-buffer -@xref{Desktop Save Mode}. - -@item enable-multibyte-characters -@ref{Text Representations}. - -@item fill-column -@xref{Margins}. - -@item fill-prefix -@xref{Margins}. - -@item font-lock-defaults -@xref{Font Lock Basics}. - -@item fringe-cursor-alist -@xref{Fringe Cursors}. - -@item fringe-indicator-alist -@xref{Fringe Indicators}. - -@item fringes-outside-margins -@xref{Fringes}. - -@item goal-column -@xref{Moving Point,,, emacs, The GNU Emacs Manual}. - -@item header-line-format -@xref{Header Lines}. - -@item indicate-buffer-boundaries -@xref{Usual Display}. - -@item indicate-empty-lines -@xref{Usual Display}. - -@item left-fringe-width -@xref{Fringe Size/Pos}. - -@item left-margin -@xref{Margins}. - -@item left-margin-width -@xref{Display Margins}. - -@item line-spacing -@xref{Line Height}. - -@item local-abbrev-table -@xref{Standard Abbrev Tables}. - -@item major-mode -@xref{Mode Help}. - -@item mark-active -@xref{The Mark}. - -@item mark-ring -@xref{The Mark}. - -@item mode-line-buffer-identification -@xref{Mode Line Variables}. - -@item mode-line-format -@xref{Mode Line Data}. - -@item mode-line-modified -@xref{Mode Line Variables}. - -@item mode-line-process -@xref{Mode Line Variables}. - -@item mode-name -@xref{Mode Line Variables}. - -@item point-before-scroll -Used for communication between mouse commands and scroll-bar commands. - -@item right-fringe-width -@xref{Fringe Size/Pos}. - -@item right-margin-width -@xref{Display Margins}. - -@item save-buffer-coding-system -@xref{Encoding and I/O}. - -@item scroll-bar-width -@xref{Scroll Bars}. - -@item scroll-down-aggressively -@itemx scroll-up-aggressively -@xref{Textual Scrolling}. - -@item selective-display -@itemx selective-display-ellipses -@xref{Selective Display}. - -@item tab-width -@xref{Usual Display}. - -@item truncate-lines -@xref{Truncation}. - -@item vertical-scroll-bar -@xref{Scroll Bars}. - -@item window-size-fixed -@xref{Resizing Windows}. - -@item write-contents-functions -@xref{Saving Buffers}. -@end table === modified file 'doc/lispref/maps.texi' --- doc/lispref/maps.texi 2012-01-19 07:21:25 +0000 +++ doc/lispref/maps.texi 2012-02-28 04:17:02 +0000 @@ -3,7 +3,7 @@ @c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/maps -@node Standard Keymaps, Standard Hooks, Standard Buffer-Local Variables, Top +@node Standard Keymaps, Standard Hooks, Standard Errors, Top @appendix Standard Keymaps @cindex standard keymaps === modified file 'doc/lispref/vol1.texi' --- doc/lispref/vol1.texi 2012-02-25 20:59:46 +0000 +++ doc/lispref/vol1.texi 2012-02-28 04:17:02 +0000 @@ -188,8 +188,6 @@ * GNU Emacs Internals:: Building and dumping Emacs; internal data structures. * Standard Errors:: List of main error symbols. -* Standard Buffer-Local Variables:: - List of variables buffer-local in all buffers. * Standard Keymaps:: List of standard keymaps. * Standard Hooks:: List of standard hook variables. @@ -1532,7 +1530,6 @@ @c include tips.texi @c include internals.texi @c include errors.texi -@c include locals.texi @c include maps.texi @c include hooks.texi === modified file 'doc/lispref/vol2.texi' --- doc/lispref/vol2.texi 2012-02-25 20:59:46 +0000 +++ doc/lispref/vol2.texi 2012-02-28 04:17:02 +0000 @@ -187,8 +187,6 @@ * GNU Emacs Internals:: Building and dumping Emacs; internal data structures. * Standard Errors:: List of main error symbols. -* Standard Buffer-Local Variables:: - List of variables buffer-local in all buffers. * Standard Keymaps:: List of standard keymaps. * Standard Hooks:: List of standard hook variables. @@ -1531,7 +1529,6 @@ @include tips.texi @include internals.texi @include errors.texi -@include locals.texi @include maps.texi @include hooks.texi ------------------------------------------------------------ revno: 107450 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-02-27 20:09:54 -0800 message: Add ignore patterns for pdftex intermediate files diff: === modified file '.bzrignore' --- .bzrignore 2012-01-16 17:04:28 +0000 +++ .bzrignore 2012-02-28 04:09:54 +0000 @@ -35,6 +35,21 @@ TAGS TAGS-LISP cxxdefs.h +# Intermediate files when making pdf versions of the manuals. +*.aux +*.cp +*.fn +*.fns +*.ky +*.pg +*.toc +*.tp +*.vr +doc/**/*.pdf +doc/**/*.log +!doc/lispintro/cons-*.pdf +!doc/lispintro/drawers.pdf +!doc/lispinfo/lambda-*.pdf info/* admin/unidata/unidata.txt build-aux/compile ------------------------------------------------------------ revno: 107449 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-02-27 20:01:56 -0800 message: * doc/lispref/frames.texi (Mouse Position): Fix cross-ref. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-02-27 07:26:13 +0000 +++ doc/lispref/ChangeLog 2012-02-28 04:01:56 +0000 @@ -1,3 +1,7 @@ +2012-02-28 Glenn Morris + + * frames.texi (Mouse Position): Fix cross-ref. + 2012-02-27 Chong Yidong * buffers.texi (Creating Buffers): Clarify that === modified file 'doc/lispref/frames.texi' --- doc/lispref/frames.texi 2012-01-28 04:26:33 +0000 +++ doc/lispref/frames.texi 2012-02-28 04:01:56 +0000 @@ -1,7 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 -@c Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../../info/frames @node Frames, Positions, Windows, Top @@ -1709,7 +1708,7 @@ @var{frame} omitted or @code{nil} means the selected frame. This is useful when @code{make-pointer-invisible} is set to @code{t}: it allows to know if the pointer has been hidden. -@xref{Mouse Avoidance,,,emacs}. +@xref{Mouse Avoidance,,,emacs, The Emacs Manual}. @end defun @need 3000 ------------------------------------------------------------ revno: 107448 committer: Glenn Morris branch nick: trunk timestamp: Mon 2012-02-27 14:59:12 -0500 message: Auto-commit of generated files. diff: === modified file 'autogen/configure' --- autogen/configure 2012-02-09 07:48:22 +0000 +++ autogen/configure 2012-02-27 19:59:12 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for emacs 24.0.93. +# Generated by GNU Autoconf 2.65 for emacs 24.0.94. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -549,8 +549,8 @@ # Identity of this package. PACKAGE_NAME='emacs' PACKAGE_TARNAME='emacs' -PACKAGE_VERSION='24.0.93' -PACKAGE_STRING='emacs 24.0.93' +PACKAGE_VERSION='24.0.94' +PACKAGE_STRING='emacs 24.0.94' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1887,7 +1887,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures emacs 24.0.93 to adapt to many kinds of systems. +\`configure' configures emacs 24.0.94 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1961,7 +1961,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of emacs 24.0.93:";; + short | recursive ) echo "Configuration of emacs 24.0.94:";; esac cat <<\_ACEOF @@ -2124,7 +2124,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -emacs configure 24.0.93 +emacs configure 24.0.94 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2846,7 +2846,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by emacs $as_me 24.0.93, which was +It was created by emacs $as_me 24.0.94, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -3679,7 +3679,7 @@ # Define the identity of the package. PACKAGE='emacs' - VERSION='24.0.93' + VERSION='24.0.94' cat >>confdefs.h <<_ACEOF @@ -23156,7 +23156,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by emacs $as_me 24.0.93, which was +This file was extended by emacs $as_me 24.0.94, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23222,7 +23222,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -emacs config.status 24.0.93 +emacs config.status 24.0.94 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" ------------------------------------------------------------ revno: 107447 fixes bug(s): http://debbugs.gnu.org/9146 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-02-27 21:14:36 +0800 message: Fix M-x in Viper mode. * lisp/emulation/viper-cmd.el (viper-intercept-ESC-key): Fix key-binding lookup for ESC key. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-02-27 03:20:00 +0000 +++ lisp/ChangeLog 2012-02-27 13:14:36 +0000 @@ -1,5 +1,8 @@ 2012-02-27 Chong Yidong + * emulation/viper-cmd.el (viper-intercept-ESC-key): Fix + key-binding lookup for ESC key (Bug#9146). + * font-lock.el (font-lock-specified-p): Rename from font-lock-spec-present. Callers changed. === modified file 'lisp/emulation/viper-cmd.el' --- lisp/emulation/viper-cmd.el 2012-01-19 07:21:25 +0000 +++ lisp/emulation/viper-cmd.el 2012-02-27 13:14:36 +0000 @@ -1086,8 +1086,17 @@ (defun viper-intercept-ESC-key () "Function that implements ESC key in Viper emulation of Vi." (interactive) - (let ((cmd (or (key-binding (viper-envelop-ESC-key)) - (lambda () (interactive) (error "Viper bell"))))) + ;; `key-binding' needs to be called in a context where Viper's + ;; minor-mode map(s) have been temporarily disabled so the ESC + ;; binding to viper-intercept-ESC-key doesn't hide the binding we're + ;; looking for (Bug#9146): + (let* ((event (viper-envelop-ESC-key)) + (cmd (cond ((equal event viper-ESC-key) + 'viper-intercept-ESC-key) + ((let ((emulation-mode-map-alists nil)) + (key-binding event))) + (t + (error "Viper bell"))))) ;; call the actual function to execute ESC (if no other symbols followed) ;; or the key bound to the ESC sequence (if the sequence was issued ------------------------------------------------------------ revno: 107446 committer: Chong Yidong branch nick: trunk timestamp: Mon 2012-02-27 15:26:13 +0800 message: More updates for Buffers and Files chapters of Lisp manual. * doc/emacs/buffers.texi (Creating Buffers): Clarify that generate-new-buffer uses generate-new-buffer-names. (Killing Buffers): Remove bogus example duplicating buffer-live-p. * doc/emacs/files.texi (Directory Names): Index entry for file name abbreviations. (Relative File Names, File Name Expansion): Refer to it. (Locating Files): Move locate-user-emacs-file documentation to Standard File Names. (Standard File Names): Add locate-user-emacs-file; update examples. diff: === modified file 'admin/FOR-RELEASE' --- admin/FOR-RELEASE 2012-02-25 20:59:46 +0000 +++ admin/FOR-RELEASE 2012-02-27 07:26:13 +0000 @@ -185,7 +185,7 @@ anti.texi back.texi backups.texi cyd -buffers.texi +buffers.texi cyd commands.texi cyd compile.texi cyd control.texi cyd === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-02-26 09:41:13 +0000 +++ doc/lispref/ChangeLog 2012-02-27 07:26:13 +0000 @@ -1,3 +1,15 @@ +2012-02-27 Chong Yidong + + * buffers.texi (Creating Buffers): Clarify that + generate-new-buffer uses generate-new-buffer-names. + (Killing Buffers): Remove bogus example duplicating buffer-live-p. + + * files.texi (Directory Names): Index entry for file name abbreviations. + (Relative File Names, File Name Expansion): Refer to it. + (Locating Files): Move locate-user-emacs-file documentation to + Standard File Names. + (Standard File Names): Add locate-user-emacs-file; update examples. + 2012-02-26 Michael Albinus * files.texi (Magic File Names): Add files-equal-p and file-subdir-of-p. === modified file 'doc/lispref/buffers.texi' --- doc/lispref/buffers.texi 2012-01-19 07:21:25 +0000 +++ doc/lispref/buffers.texi 2012-02-27 07:26:13 +0000 @@ -417,7 +417,7 @@ visited in the current buffer, or @code{nil} if no file is visited. It is a permanent local, unaffected by @code{kill-all-local-variables}. @xref{Truenames}, and -@ref{Definition of abbreviate-file-name}. +@ref{abbreviate-file-name}. @end defvar @defvar buffer-file-number @@ -502,9 +502,8 @@ last file modification time, after which @code{visited-file-modtime} returns zero. -@c Wordy to avoid overfull hbox. --rjc 16mar92 -When the function @code{set-visited-file-name} is called interactively, it -prompts for @var{filename} in the minibuffer. +When the function @code{set-visited-file-name} is called +interactively, it prompts for @var{filename} in the minibuffer. @end deffn @defvar list-buffers-directory @@ -913,7 +912,7 @@ This command switches to the last buffer in the local buffer list of the selected frame. More precisely, it calls the function @code{switch-to-buffer} (@pxref{Switching Buffers}), to display the -buffer returned by @code{last-buffer}, see above, in the selected +buffer returned by @code{last-buffer} (see above), in the selected window. @end deffn @@ -959,11 +958,12 @@ @defun generate-new-buffer name This function returns a newly created, empty buffer, but does not make -it current. If there is no buffer named @var{name}, then that is the -name of the new buffer. If that name is in use, this function adds -suffixes of the form @samp{<@var{n}>} to @var{name}, where @var{n} is an -integer. It tries successive integers starting with 2 until it finds an -available name. +it current. The name of the buffer is generated by passing @var{name} +to the function @code{generate-new-buffer-name} (@pxref{Buffer +Names}). Thus, if there is no buffer named @var{name}, then that is +the name of the new buffer; if that name is in use, a suffix of the +form @samp{<@var{n}>}, where @var{n} is an integer, is appended to +@var{name}. An error is signaled if @var{name} is not a string. @@ -985,9 +985,6 @@ The major mode for the new buffer is set to Fundamental mode. The default value of the variable @code{major-mode} is handled at a higher level. @xref{Auto Major Mode}. - -See the related function @code{generate-new-buffer-name} in @ref{Buffer -Names}. @end defun @node Killing Buffers @@ -1005,25 +1002,26 @@ distinct according to @code{eq} although both are dead. If you kill a buffer that is current or displayed in a window, Emacs -automatically selects or displays some other buffer instead. This means -that killing a buffer can in general change the current buffer. -Therefore, when you kill a buffer, you should also take the precautions +automatically selects or displays some other buffer instead. This +means that killing a buffer can change the current buffer. Therefore, +when you kill a buffer, you should also take the precautions associated with changing the current buffer (unless you happen to know that the buffer being killed isn't current). @xref{Current Buffer}. If you kill a buffer that is the base buffer of one or more indirect -buffers, the indirect buffers are automatically killed as well. - - The @code{buffer-name} of a killed buffer is @code{nil}. You can use -this feature to test whether a buffer has been killed: - -@example -@group -(defun buffer-killed-p (buffer) - "Return t if BUFFER is killed." - (not (buffer-name buffer))) -@end group -@end example +@iftex +buffers, +@end iftex +@ifnottex +buffers (@pxref{Indirect Buffers}), +@end ifnottex +the indirect buffers are automatically killed as well. + +@cindex live buffer + The @code{buffer-name} of a buffer is @code{nil} if, and only if, +the buffer is killed. A buffer that has not been killed is called a +@dfn{live} buffer. To test whether a buffer is live or killed, use +the function @code{buffer-live-p} (see below). @deffn Command kill-buffer &optional buffer-or-name This function kills the buffer @var{buffer-or-name}, freeing all its @@ -1032,9 +1030,8 @@ buffer. Any processes that have this buffer as the @code{process-buffer} are -sent the @code{SIGHUP} signal, which normally causes them to terminate. -(The basic meaning of @code{SIGHUP} is that a dialup line has been -disconnected.) @xref{Signals to Processes}. +sent the @code{SIGHUP} (``hangup'') signal, which normally causes them +to terminate. @xref{Signals to Processes}. If the buffer is visiting a file and contains unsaved changes, @code{kill-buffer} asks the user to confirm before the buffer is killed. @@ -1099,8 +1096,8 @@ @end defvar @defun buffer-live-p object -This function returns @code{t} if @var{object} is a buffer which has -not been killed, @code{nil} otherwise. +This function returns @code{t} if @var{object} is a live buffer (a +buffer which has not been killed), @code{nil} otherwise. @end defun @node Indirect Buffers === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2012-02-26 09:41:13 +0000 +++ doc/lispref/files.texi 2012-02-27 07:26:13 +0000 @@ -1360,8 +1360,10 @@ This section explains how to search for a file in a list of directories (a @dfn{path}), or for an executable file in the standard -list of executable file directories, or for an Emacs-specific user -configuration file. +list of executable file directories. + + To search for a user-specific configuration file, @xref{Standard +File Names}, for the @code{locate-user-emacs-file} function. @defun locate-file filename path &optional suffixes predicate This function searches for a file whose name is @var{filename} in a @@ -1408,32 +1410,6 @@ @code{exec-suffixes} (@pxref{Subprocess Creation}). @end defun -@defun locate-user-emacs-file base-name &optional old-name -This function returns an absolute file name for an Emacs-specific -configuration or data file. The argument @file{base-name} should be a -relative file name. The return value is the absolute name of a file -in the directory specified by @code{user-emacs-directory}; if that -directory does not exist, this function creates it. - -If the optional argument @var{old-name} is non-@code{nil}, it -specifies a file in the user's home directory, -@file{~/@var{old-name}}. If such a file exists, the return value is -the absolute name of that file, instead of the file specified by -@var{base-name}. This argument is intended to be used by Emacs -packages to provide backward compatibility. For instance, prior to -the introduction of @code{user-emacs-directory}, the abbrev file was -located in @file{~/.abbrev_defs}, so the definition of -@code{abbrev-file-name} is - -@example -(defcustom abbrev-file-name - (locate-user-emacs-file "abbrev_defs" ".abbrev_defs") - "Default name of file from which to read abbrevs." - @dots{} - :type 'file) -@end example -@end defun - @node Changing Files @section Changing File Names and Attributes @c @cindex renaming files Duplicates rename-file @@ -1880,14 +1856,15 @@ All the directories in the file system form a tree starting at the root directory. A file name can specify all the directory names -starting from the root of the tree; then it is called an @dfn{absolute} -file name. Or it can specify the position of the file in the tree -relative to a default directory; then it is called a @dfn{relative} file -name. On Unix and GNU/Linux, an absolute file name starts with a slash -or a tilde (@samp{~}), and a relative one does not. On MS-DOS and -MS-Windows, an absolute file name starts with a slash or a backslash, or -with a drive specification @samp{@var{x}:/}, where @var{x} is the -@dfn{drive letter}. +starting from the root of the tree; then it is called an +@dfn{absolute} file name. Or it can specify the position of the file +in the tree relative to a default directory; then it is called a +@dfn{relative} file name. On Unix and GNU/Linux, an absolute file +name starts with a @samp{/} or a @samp{~} +(@pxref{abbreviate-file-name}), and a relative one does not. On +MS-DOS and MS-Windows, an absolute file name starts with a slash or a +backslash, or with a drive specification @samp{@var{x}:/}, where +@var{x} is the @dfn{drive letter}. @defun file-name-absolute-p filename This function returns @code{t} if file @var{filename} is an absolute @@ -2023,8 +2000,10 @@ To convert a directory name to its abbreviation, use this function: +@cindex file name abbreviations +@cindex abbreviated file names @defun abbreviate-file-name filename -@anchor{Definition of abbreviate-file-name} +@anchor{abbreviate-file-name} This function returns an abbreviated form of @var{filename}. It applies the abbreviations specified in @code{directory-abbrev-alist} (@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}), @@ -2042,11 +2021,15 @@ @subsection Functions that Expand Filenames @cindex expansion of file names - @dfn{Expansion} of a file name means converting a relative file name -to an absolute one. Since this is done relative to a default directory, -you must specify the default directory name as well as the file name to -be expanded. Expansion also simplifies file names by eliminating -redundancies such as @file{./} and @file{@var{name}/../}. + @dfn{Expanding} a file name means converting a relative file name to +an absolute one. Since this is done relative to a default directory, +you must specify the default directory name as well as the file name +to be expanded. It also involves expanding abbreviations like +@file{~/} +@ifnottex +(@pxref{abbreviate-file-name}), +@end ifnottex +and eliminating redundancies like @file{./} and @file{@var{name}/../}. @defun expand-file-name filename &optional directory This function converts @var{filename} to an absolute file name. If @@ -2411,50 +2394,61 @@ @node Standard File Names @subsection Standard File Names - Most of the file names used in Lisp programs are entered by the user. -But occasionally a Lisp program needs to specify a standard file name -for a particular use---typically, to hold customization information -about each user. For example, abbrev definitions are stored (by -default) in the file @file{~/.abbrev_defs}; the @code{completion} -package stores completions in the file @file{~/.completions}. These are -two of the many standard file names used by parts of Emacs for certain -purposes. - - Various operating systems have their own conventions for valid file -names and for which file names to use for user profile data. A Lisp -program which reads a file using a standard file name ought to use, on -each type of system, a file name suitable for that system. The function -@code{convert-standard-filename} makes this easy to do. + Sometimes, an Emacs Lisp program needs to specify a standard file +name for a particular use---typically, to hold configuration data +specified by the current user. Usually, such files should be located +in the directory specified by @code{user-emacs-directory}, which is +@file{~/.emacs.d} by default (@pxref{Init File}). For example, abbrev +definitions are stored by default in @file{~/.emacs.d/abbrev_defs}. +The easiest way to specify such a file name is to use the function +@code{locate-user-emacs-file}. + +@defun locate-user-emacs-file base-name &optional old-name +This function returns an absolute file name for an Emacs-specific +configuration or data file. The argument @file{base-name} should be a +relative file name. The return value is the absolute name of a file +in the directory specified by @code{user-emacs-directory}; if that +directory does not exist, this function creates it. + +If the optional argument @var{old-name} is non-@code{nil}, it +specifies a file in the user's home directory, +@file{~/@var{old-name}}. If such a file exists, the return value is +the absolute name of that file, instead of the file specified by +@var{base-name}. This argument is intended to be used by Emacs +packages to provide backward compatibility. For instance, prior to +the introduction of @code{user-emacs-directory}, the abbrev file was +located in @file{~/.abbrev_defs}. Here is the definition of +@code{abbrev-file-name}: + +@example +(defcustom abbrev-file-name + (locate-user-emacs-file "abbrev_defs" ".abbrev_defs") + "Default name of file from which to read abbrevs." + @dots{} + :type 'file) +@end example +@end defun + + A lower-level function for standardizing file names, which +@code{locate-user-emacs-file} uses as a subroutine, is +@code{convert-standard-filename}. @defun convert-standard-filename filename -This function alters the file name @var{filename} to fit the conventions -of the operating system in use, and returns the result as a new string. +This function returns a file name based on @var{filename}, which fits +the conventions of the current operating system. + +On GNU and Unix systems, this simply returns @var{filename}. On other +operating systems, it may enforce system-specific file name +conventions; for example, on MS-DOS this function performs a variety +of changes to enforce MS-DOS file name limitations, including +converting any leading @samp{.} to @samp{_} and truncating to three +characters after the @samp{.}. + +The recommended way to use this function is to specify a name which +fits the conventions of GNU and Unix systems, and pass it to +@code{convert-standard-filename}. @end defun - The recommended way to specify a standard file name in a Lisp program -is to choose a name which fits the conventions of GNU and Unix systems, -usually with a nondirectory part that starts with a period, and pass it -to @code{convert-standard-filename} instead of using it directly. Here -is an example from the @code{completion} package: - -@example -(defvar save-completions-file-name - (convert-standard-filename "~/.completions") - "*The file name to save completions to.") -@end example - - On GNU and Unix systems, and on some other systems as well, -@code{convert-standard-filename} returns its argument unchanged. On -some other systems, it alters the name to fit the system's conventions. - - For example, on MS-DOS the alterations made by this function include -converting a leading @samp{.} to @samp{_}, converting a @samp{_} in the -middle of the name to @samp{.} if there is no other @samp{.}, inserting -a @samp{.} after eight characters if there is none, and truncating to -three characters after the @samp{.}. (It makes other changes as well.) -Thus, @file{.abbrev_defs} becomes @file{_abbrev.def}, and -@file{.completions} becomes @file{_complet.ion}. - @node Contents of Directories @section Contents of Directories @cindex directory-oriented functions