diff --git a/ChangeLog b/ChangeLog index a1b9a9ca7df..ca3bcff5a8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,64 @@ +2012-04-21 Paul Eggert + + Sync from gnulib version 4f11d6bebc3098c64ffde27079ab0d0cecfd0cdc + dated 2011-10-07. Regenerating from current gnulib would be a + pervasive change, and currently the trunk isn't open to such changes. + * configure.in (WARN_CFLAGS): Remove; no longer needed now + that gnulib does it. + * lib/gnulib.mk, m4/gl-comp.m4: Regenerate. + +2012-04-21 Andreas Schwab + + * m4/gl-comp.m4: Update. (Bug#11285) + +2012-04-20 Ludovic Courtès + + * configure.in: Don't use the -R option (Bug#11251). + +2012-04-18 Paul Eggert + + configure: new option --enable-gcc-warnings (Bug#11207) + I have been using this change for many months in my private copy + of Emacs, and have used it to find several bugs. It's mature + enough to publish now. + * Makefile.in (GNULIB_MODULES): Add warnings, manywarnings. + * configure.in: Support --enable-gcc-warnings, in the style of + other GNU packages such as coreutils. + (C_WARNINGS_SWITCH): Remove, replacing with... + (WARN_CFLAGS, GNULIB_WARN_CFLAGS): New variable. + (PKG_CHECK_MODULES, C_SWITCH_X_SITE): Use -isystem rather than -I, + when including system files with GCC. + * etc/NEWS: Mention --enable-gcc-warnings. + * INSTALL (DETAILED BUILDING AND INSTALLATION): Likewise. + * lib/Makefile.am (AM_CFLAGS): New macro. + * m4/manywarnings.m4, m4/warnings.m4: New files, from gnulib. + +2012-04-17 Dmitry Antipov + + * configure.in (AC_CHECK_FUNCS): + Add getpwent, endpwent, getgrent, endgrent. (Bug#7900) + +2012-04-16 Glenn Morris + + * configure.in (NS_HAVE_NSINTEGER): Remove unnecessary variable. + + * configure.in: Remove X libs workaround for old autoconf. + +2012-04-12 Ken Brown + + * configure.in: Warn that Cygwin 1.5 is unsupported. (Bug#10398) + +2012-04-11 Glenn Morris + + * configure.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM. + +2012-04-10 Glenn Morris + + * configure.in: Conditionally generate admin/unidata/Makefile. + 2012-04-09 Teodor Zlatanov - * info/dir (File): - * Makefile.in: Add emacs-gnutls to the info directory and the - INFO_FILES target. + * info/dir, Makefile.in (INFO_FILES): Add emacs-gnutls manual. 2012-04-09 Glenn Morris @@ -2298,7 +2354,7 @@ 2010-03-12 Eli Zaretskii - These changes remove termcap.c from the build on Posix platforms. + These changes remove termcap.c from the build on POSIX platforms. * configure.in : Remove termcap.h. * configure: Regenerated. diff --git a/INSTALL b/INSTALL index 1e0844879cb..1df686ae636 100644 --- a/INSTALL +++ b/INSTALL @@ -317,6 +317,12 @@ Use --with-wide-int to implement Emacs values with the type 'long long', even on hosts where a narrower type would do. With this option, on a typical 32-bit host, Emacs integers have 62 bits instead of 30. +Use --enable-gcc-warnings to enable compile-time checks that warn +about possibly-questionable C code. This is intended for developers +and is useful with GNU-compatible compilers. On a recent GNU system +there should be no warnings; on older and on non-GNU systems the +generated warnings may still be useful. + The `--prefix=PREFIXDIR' option specifies where the installation process should put emacs and its data files. This defaults to `/usr/local'. - Emacs (and the other utilities users run) go in PREFIXDIR/bin diff --git a/Makefile.in b/Makefile.in index 8851384162b..1746412dfa5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -336,8 +336,9 @@ GNULIB_MODULES = \ careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \ dup2 \ filemode getloadavg getopt-gnu ignore-value intprops lstat \ - mktime pthread_sigmask readlink \ - socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat + manywarnings mktime pthread_sigmask readlink \ + socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat \ + warnings GNULIB_TOOL_FLAGS = \ --avoid=msvc-inval --avoid=msvc-nothrow \ --avoid=raise --avoid=threadlib \ diff --git a/admin/ChangeLog b/admin/ChangeLog index ac2323c77d0..a3a756bde64 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,10 @@ +2012-04-10 Glenn Morris + + * bzrmerge.el (bzrmerge-skip-regexp): Add "from trunk". + + * unidata/Makefile.in: Add FSF copyright. + Make it use autoconf features, and work for out-of-tree builds. + 2012-04-07 Eli Zaretskii * unidata/README: diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index f1bfa35a2b8..ad427397524 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE @@ -53,12 +53,17 @@ pt-br Rodrigo Real ru Alex Ott sk Miroslav Vaško +** For a major release, add a "New in Emacs XX" section to faq.texi. + ** Remove temporary +++/--- lines in NEWS. ** Try to reorder NEWS: most important things first, related items together. ** Consider bumping customize-changed-options-previous-release. +** cusver-check from admin.el cam help find new defcustoms missing +:version tags. + * BUGS ** Check for modes which bind M-s that conflicts with a new global binding M-s @@ -155,13 +160,8 @@ mini.texi rgm misc.texi cyd modes.texi cyd msdog.texi rgm (can't actually test any of it though) - It was not obvious to me that the following is true (it could well be though): - - Emacs on Windows automatically determines your default printer and - sets the variable `printer-name' to that printer's name. - msdog-xtra.texi rgm (can't actually test any of it though) -mule.texi +mule.texi rgm (not 100% sure about "Fontsets") m-x.texi cyd package.texi cyd picture-xtra.texi rgm @@ -182,7 +182,7 @@ xresources.texi cyd abbrevs.texi rgm advice.texi cyd -anti.texi +anti.texi rgm back.texi rgm backups.texi cyd buffers.texi cyd @@ -211,7 +211,7 @@ loading.texi cyd macros.texi cyd maps.texi rgm markers.texi rgm -minibuf.texi +minibuf.texi rgm modes.texi cyd nonascii.texi cyd numbers.texi cyd @@ -219,7 +219,7 @@ objects.texi cyd os.texi cyd package.texi rgm positions.texi cyd -processes.texi +processes.texi rgm searching.texi rgm sequences.texi cyd streams.texi cyd diff --git a/admin/bzrmerge.el b/admin/bzrmerge.el index cb63d5b16ba..0c72c8b5c93 100644 --- a/admin/bzrmerge.el +++ b/admin/bzrmerge.el @@ -1,9 +1,9 @@ ;;; bzrmerge.el --- help merge one Emacs bzr branch to another -;; Copyright (C) 2010-2012 Free Software Foundation, Inc. +;; Copyright (C) 2010-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier -;; Keywords: +;; Keywords: maint ;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ (require 'cl)) ; assert (defvar bzrmerge-skip-regexp - "back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version" + "back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version\\|from trunk" "Regexp matching logs of revisions that might be skipped. `bzrmerge-missing' will ask you if it should skip any matches.") diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in index c890dad8903..ecbd0490246 100644 --- a/admin/unidata/Makefile.in +++ b/admin/unidata/Makefile.in @@ -1,4 +1,7 @@ # Makefile -- Makefile to generate character property tables. + +# Copyright (C) 2012 Free Software Foundation, Inc. + # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # National Institute of Advanced Industrial Science and Technology (AIST) # Registration Number H13PRO009 @@ -18,25 +21,33 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . +SHELL = /bin/sh -EMACS = ../../src/emacs -DSTDIR = ../../lisp/international -RUNEMACS = ${EMACS} -Q -batch +srcdir = @srcdir@ +abs_builddir = @abs_builddir@ +top_srcdir = @top_srcdir@ +abs_top_builddir = @abs_top_builddir@ + +EMACS = ${abs_top_builddir}/src/emacs +DSTDIR = ${top_srcdir}/lisp/international +emacs = ${EMACS} -batch --no-site-file --no-site-lisp all: ${DSTDIR}/charprop.el .el.elc: - ${RUNEMACS} -batch -f batch-byte-compile $< + ${emacs} -f batch-byte-compile $< -unidata.txt: UnicodeData.txt - sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < UnicodeData.txt > $@ +unidata.txt: ${srcdir}/UnicodeData.txt + sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < ${srcdir}/UnicodeData.txt > $@ -${DSTDIR}/charprop.el: unidata-gen.elc unidata.txt - ELC=`/bin/pwd`/unidata-gen.elc; \ - DATADIR=`/bin/pwd`; \ - DATA=unidata.txt; \ - cd ${DSTDIR}; \ - ${RUNEMACS} -batch --load $${ELC} -f unidata-gen-files $${DATADIR} $${DATA} +${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.elc unidata.txt + cd ${DSTDIR} && ${emacs} -l ${srcdir}/unidata-gen \ + -f unidata-gen-files ${srcdir} ${abs_builddir}/unidata.txt + +## Like the above, but generate in PWD rather than lisp/international. +charprop.el: ${srcdir}/unidata-gen.elc unidata.txt + ${emacs} -l ${srcdir}/unidata-gen \ + -f unidata-gen-files ${srcdir} unidata.txt install: charprop.el cp charprop.el ${DSTDIR} @@ -46,4 +57,9 @@ clean: if test -f charprop.el; then \ rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \ fi - rm -f charprop.el unidata-gen.elc unidata.txt + rm -f charprop.el ${srcdir}/unidata-gen.elc unidata.txt + +distclean: clean + -rm -f ./Makefile + +maintainer-clean: distclean diff --git a/autogen/Makefile.in b/autogen/Makefile.in index 4ade989d095..d395a17bef9 100644 --- a/autogen/Makefile.in +++ b/autogen/Makefile.in @@ -70,9 +70,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/gnulib-common.m4 \ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \ $(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/md5.m4 \ - $(top_srcdir)/m4/mktime.m4 $(top_srcdir)/m4/multiarch.m4 \ - $(top_srcdir)/m4/nocrash.m4 $(top_srcdir)/m4/pathmax.m4 \ + $(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/manywarnings.m4 \ + $(top_srcdir)/m4/md5.m4 $(top_srcdir)/m4/mktime.m4 \ + $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nocrash.m4 \ + $(top_srcdir)/m4/pathmax.m4 \ $(top_srcdir)/m4/pthread_sigmask.m4 \ $(top_srcdir)/m4/readlink.m4 $(top_srcdir)/m4/sha1.m4 \ $(top_srcdir)/m4/sha256.m4 $(top_srcdir)/m4/sha512.m4 \ @@ -88,7 +89,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/symlink.m4 $(top_srcdir)/m4/sys_stat_h.m4 \ $(top_srcdir)/m4/time_h.m4 $(top_srcdir)/m4/time_r.m4 \ $(top_srcdir)/m4/tm_gmtoff.m4 $(top_srcdir)/m4/unistd_h.m4 \ - $(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/configure.in + $(top_srcdir)/m4/warnings.m4 $(top_srcdir)/m4/wchar_t.m4 \ + $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -152,8 +154,6 @@ CYGWIN_OBJ = @CYGWIN_OBJ@ C_SWITCH_MACHINE = @C_SWITCH_MACHINE@ C_SWITCH_SYSTEM = @C_SWITCH_SYSTEM@ C_SWITCH_X_SITE = @C_SWITCH_X_SITE@ -C_SWITCH_X_SYSTEM = @C_SWITCH_X_SYSTEM@ -C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DBUS_OBJ = @DBUS_OBJ@ @@ -329,9 +329,11 @@ GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ GNULIB_VSCANF = @GNULIB_VSCANF@ GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ +GNULIB_WARN_CFLAGS = @GNULIB_WARN_CFLAGS@ GNULIB_WCTOMB = @GNULIB_WCTOMB@ GNULIB_WRITE = @GNULIB_WRITE@ GNULIB__EXIT = @GNULIB__EXIT@ +GNUSTEP_CFLAGS = @GNUSTEP_CFLAGS@ GNU_OBJC_CFLAGS = @GNU_OBJC_CFLAGS@ GREP = @GREP@ GSETTINGS_CFLAGS = @GSETTINGS_CFLAGS@ @@ -695,7 +697,9 @@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VERSION = @VERSION@ VMLIMIT_OBJ = @VMLIMIT_OBJ@ +WARN_CFLAGS = @WARN_CFLAGS@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ +WERROR_CFLAGS = @WERROR_CFLAGS@ WIDGET_OBJ = @WIDGET_OBJ@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ XFT_CFLAGS = @XFT_CFLAGS@ @@ -814,6 +818,7 @@ MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t getopt.h \ stdio.h-t stdlib.h stdlib.h-t sys/stat.h sys/stat.h-t time.h \ time.h-t unistd.h unistd.h-t noinst_LIBRARIES = libgnu.a +AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src libgnu_a_SOURCES = allocator.c careadlinkat.c md5.c sha1.c sha256.c \ sha512.c dtoastr.c filemode.c $(am__append_1) strftime.c diff --git a/autogen/aclocal.m4 b/autogen/aclocal.m4 index 5fd9650b86b..f74fb730dc9 100644 --- a/autogen/aclocal.m4 +++ b/autogen/aclocal.m4 @@ -999,6 +999,7 @@ m4_include([m4/inttypes.m4]) m4_include([m4/largefile.m4]) m4_include([m4/longlong.m4]) m4_include([m4/lstat.m4]) +m4_include([m4/manywarnings.m4]) m4_include([m4/md5.m4]) m4_include([m4/mktime.m4]) m4_include([m4/multiarch.m4]) @@ -1032,4 +1033,5 @@ m4_include([m4/time_h.m4]) m4_include([m4/time_r.m4]) m4_include([m4/tm_gmtoff.m4]) m4_include([m4/unistd_h.m4]) +m4_include([m4/warnings.m4]) m4_include([m4/wchar_t.m4]) diff --git a/autogen/config.in b/autogen/config.in index e93bd7f325c..1082e150fc6 100644 --- a/autogen/config.in +++ b/autogen/config.in @@ -95,6 +95,9 @@ along with GNU Emacs. If not, see . */ /* Define to make the limit macros in visible. */ #undef GL_TRIGGER_STDC_LIMIT_MACROS +/* enable some gnulib portability checks */ +#undef GNULIB_PORTCHECK + /* Define to 1 if you want to use the GNU memory allocator. */ #undef GNU_MALLOC @@ -203,6 +206,12 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the 'dup2' function. */ #undef HAVE_DUP2 +/* Define to 1 if you have the `endgrent' function. */ +#undef HAVE_ENDGRENT + +/* Define to 1 if you have the `endpwent' function. */ +#undef HAVE_ENDPWENT + /* Define to 1 if you have the `euidaccess' function. */ #undef HAVE_EUIDACCESS @@ -254,6 +263,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the `getdomainname' function. */ #undef HAVE_GETDOMAINNAME +/* Define to 1 if you have the `getgrent' function. */ +#undef HAVE_GETGRENT + /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME @@ -278,6 +290,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the `getpt' function. */ #undef HAVE_GETPT +/* Define to 1 if you have the `getpwent' function. */ +#undef HAVE_GETPWENT + /* Define to 1 if you have the `getrlimit' function. */ #undef HAVE_GETRLIMIT @@ -1163,6 +1178,9 @@ along with GNU Emacs. If not, see . */ /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS +/* enable compile-time and run-time bounds-checking, and some warnings */ +#undef _FORTIFY_SOURCE + /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE @@ -1270,6 +1288,9 @@ along with GNU Emacs. If not, see . */ # define __GNUC_STDC_INLINE__ 1 #endif +/* Define to 1 if the compiler is checking for lint. */ +#undef lint + /* Define to a type if does not define. */ #undef mbstate_t diff --git a/autogen/configure b/autogen/configure index 26b13d971f7..0d9d1abdaa4 100755 --- a/autogen/configure +++ b/autogen/configure @@ -1087,7 +1087,7 @@ ns_appdir S_FILE M_FILE X_TOOLKIT_TYPE -C_SWITCH_X_SYSTEM +GNUSTEP_CFLAGS C_SWITCH_X_SITE LD_SWITCH_X_SITE gameuser @@ -1185,7 +1185,9 @@ CANNOT_DUMP HAVE_MAKEINFO GZIP_PROG INSTALL_INFO -C_WARNINGS_SWITCH +GNULIB_WARN_CFLAGS +WARN_CFLAGS +WERROR_CFLAGS RANLIB ARFLAGS AR @@ -1334,6 +1336,7 @@ enable_profiling enable_autodepend enable_dependency_tracking enable_largefile +enable_gcc_warnings with_x ' ac_precious_vars='build_alias @@ -1995,6 +1998,7 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files + --enable-gcc-warnings turn on lots of GCC warnings (for developers) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -7064,12 +7068,50 @@ else test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" fi -### Use -Wdeclaration-after-statement if the compiler supports it -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5 -$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; } -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wdeclaration-after-statement" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +# Check whether --enable-gcc-warnings was given. +if test "${enable_gcc_warnings+set}" = set; then : + enableval=$enable_gcc_warnings; case $enableval in + yes|no) ;; + *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;; + esac + gl_gcc_warnings=$enableval +else + gl_gcc_warnings=no + +fi + + +# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found]) +# ------------------------------------------------ +# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND. +# Otherwise, run RUN-IF-NOT-FOUND. + + +# When compiling with GCC, prefer -isystem to -I when including system +# include files, to avoid generating useless diagnostics for the files. +if test "$gl_gcc_warnings" != yes; then + isystem='-I' +else + isystem='-isystem ' + + # This, $nw, is the list of warnings we disable. + nw= + + case $with_x_toolkit in + lucid | athena | motif) + # Old toolkits mishandle 'const'. + nw="$nw -Wwrite-strings" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5 +$as_echo_n "checking whether C compiler handles -Werror... " >&6; } +if test "${gl_cv_warn_c__Werror+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7081,27 +7123,69 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - has_option=yes + gl_cv_warn_c__Werror=yes else - has_option=no + gl_cv_warn_c__Werror=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 -$as_echo "$has_option" >&6; } -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS + CFLAGS="$gl_save_compiler_FLAGS" -### Use -Wold-style-definition if the compiler supports it -# This can be removed when conversion to standard C is finished. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 -$as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wold-style-definition" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5 +$as_echo "$gl_cv_warn_c__Werror" >&6; } +if test "x$gl_cv_warn_c__Werror" = x""yes; then : + as_fn_append WERROR_CFLAGS " -Werror" +fi + + ;; + esac + + + nw="$nw -Waggregate-return" # anachronistic + nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h) + nw="$nw -Wc++-compat" # We don't care about C++ compilers + nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib + nw="$nw -Wtraditional" # Warns on #elif which we use often + nw="$nw -Wcast-qual" # Too many warnings for now + nw="$nw -Wconversion" # Too many warnings for now + nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings + nw="$nw -Wsign-conversion" # Too many warnings for now + nw="$nw -Woverlength-strings" # Not a problem these days + nw="$nw -Wtraditional-conversion" # Too many warnings for now + nw="$nw -Wpadded" # Our structs are not padded + nw="$nw -Wredundant-decls" # We regularly (re)declare getenv etc. + nw="$nw -Wlogical-op" # any use of fwrite provokes this + nw="$nw -Wformat-nonliteral" # Emacs does this a lot + nw="$nw -Wvla" # warnings in gettext.h + nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ + nw="$nw -Wswitch-enum" # Too many warnings for now + nw="$nw -Wswitch-default" # Too many warnings for now + nw="$nw -Wfloat-equal" # e.g., ftoastr.c + nw="$nw -Winline" # e.g., dispnew.c's inlining of row_equal_p + + # Emacs doesn't care about shadowing; see + # . + nw="$nw -Wshadow" + + # The following lines should be removable at some point. + nw="$nw -Wstack-protector" + nw="$nw -Wstrict-overflow" + nw="$nw -Wsuggest-attribute=const" + nw="$nw -Wsuggest-attribute=pure" + + + + if test -n "$GCC"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5 +$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; } + if test "${gl_cv_cc_nomfi_supported+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7113,26 +7197,186 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - has_option=yes + gl_cv_cc_nomfi_supported=yes else - has_option=no + gl_cv_cc_nomfi_supported=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" + CFLAGS="$gl_save_CFLAGS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 -$as_echo "$has_option" >&6; } -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS -### Use -Wimplicit-function-declaration if the compiler supports it -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5 -$as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; } -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wimplicit-function-declaration" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5 +$as_echo "$gl_cv_cc_nomfi_supported" >&6; } + + if test "$gl_cv_cc_nomfi_supported" = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5 +$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; } + if test "${gl_cv_cc_nomfi_needed+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +void f (void) + { + typedef struct { int a; int b; } s_t; + s_t s1 = { 0, }; + } + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_nomfi_needed=no +else + gl_cv_cc_nomfi_needed=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5 +$as_echo "$gl_cv_cc_nomfi_needed" >&6; } + fi + fi + + gl_manywarn_set= + for gl_manywarn_item in \ + -Wall \ + -W \ + -Wformat-y2k \ + -Wformat-nonliteral \ + -Wformat-security \ + -Winit-self \ + -Wmissing-include-dirs \ + -Wswitch-default \ + -Wswitch-enum \ + -Wunused \ + -Wunknown-pragmas \ + -Wstrict-aliasing \ + -Wstrict-overflow \ + -Wsystem-headers \ + -Wfloat-equal \ + -Wtraditional \ + -Wtraditional-conversion \ + -Wdeclaration-after-statement \ + -Wundef \ + -Wshadow \ + -Wunsafe-loop-optimizations \ + -Wpointer-arith \ + -Wbad-function-cast \ + -Wc++-compat \ + -Wcast-qual \ + -Wcast-align \ + -Wwrite-strings \ + -Wconversion \ + -Wsign-conversion \ + -Wlogical-op \ + -Waggregate-return \ + -Wstrict-prototypes \ + -Wold-style-definition \ + -Wmissing-prototypes \ + -Wmissing-declarations \ + -Wmissing-noreturn \ + -Wmissing-format-attribute \ + -Wpacked \ + -Wpadded \ + -Wredundant-decls \ + -Wnested-externs \ + -Wunreachable-code \ + -Winline \ + -Winvalid-pch \ + -Wlong-long \ + -Wvla \ + -Wvolatile-register-var \ + -Wdisabled-optimization \ + -Wstack-protector \ + -Woverlength-strings \ + -Wbuiltin-macro-redefined \ + -Wmudflap \ + -Wpacked-bitfield-compat \ + -Wsync-nand \ + ; do + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + # The following are not documented in the manual but are included in + # output from gcc --help=warnings. + for gl_manywarn_item in \ + -Wattributes \ + -Wcoverage-mismatch \ + -Wmultichar \ + -Wunused-macros \ + ; do + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + # More warnings from gcc 4.6.2 --help=warnings. + for gl_manywarn_item in \ + -Wabi \ + -Wcpp \ + -Wdeprecated \ + -Wdeprecated-declarations \ + -Wdiv-by-zero \ + -Wdouble-promotion \ + -Wendif-labels \ + -Wextra \ + -Wformat-contains-nul \ + -Wformat-extra-args \ + -Wformat-zero-length \ + -Wformat=2 \ + -Wmultichar \ + -Wnormalized=nfc \ + -Woverflow \ + -Wpointer-to-int-cast \ + -Wpragmas \ + -Wsuggest-attribute=const \ + -Wsuggest-attribute=noreturn \ + -Wsuggest-attribute=pure \ + -Wtrampolines \ + ; do + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + + # Disable the missing-field-initializers warning if needed + if test "$gl_cv_cc_nomfi_needed" = yes; then + gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" + fi + + ws=$gl_manywarn_set + + + gl_warn_set= + set x $ws; shift + for gl_warn_item + do + case " $nw " in + *" $gl_warn_item "*) + ;; + *) + gl_warn_set="$gl_warn_set $gl_warn_item" + ;; + esac + done + ws=$gl_warn_set + + for w in $ws; do + as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5 +$as_echo_n "checking whether C compiler handles $w... " >&6; } +if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS $w" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -7144,20 +7388,368 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - has_option=yes + eval "$as_gl_Warn=yes" else - has_option=no + eval "$as_gl_Warn=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 -$as_echo "$has_option" >&6; } -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS + CFLAGS="$gl_save_compiler_FLAGS" +fi +eval ac_res=\$$as_gl_Warn + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +eval as_val=\$$as_gl_Warn + if test "x$as_val" = x""yes; then : + as_fn_append WARN_CFLAGS " $w" +fi + + done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5 +$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; } +if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wno-missing-field-initializers" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__Wno_missing_field_initializers=yes +else + gl_cv_warn_c__Wno_missing_field_initializers=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5 +$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; } +if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers" +fi + # We need this one + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5 +$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; } +if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wno-sign-compare" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__Wno_sign_compare=yes +else + gl_cv_warn_c__Wno_sign_compare=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5 +$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; } +if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-sign-compare" +fi + # Too many warnings for now + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5 +$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; } +if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wno-type-limits" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__Wno_type_limits=yes +else + gl_cv_warn_c__Wno_type_limits=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5 +$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; } +if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-type-limits" +fi + # Too many warnings for now + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5 +$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; } +if test "${gl_cv_warn_c__Wno_switch+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wno-switch" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__Wno_switch=yes +else + gl_cv_warn_c__Wno_switch=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5 +$as_echo "$gl_cv_warn_c__Wno_switch" >&6; } +if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-switch" +fi + # Too many warnings for now + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5 +$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; } +if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wno-unused-parameter" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__Wno_unused_parameter=yes +else + gl_cv_warn_c__Wno_unused_parameter=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5 +$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; } +if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-unused-parameter" +fi + # Too many warnings for now + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5 +$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; } +if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wno-format-nonliteral" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__Wno_format_nonliteral=yes +else + gl_cv_warn_c__Wno_format_nonliteral=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5 +$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; } +if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-format-nonliteral" +fi + + + # In spite of excluding -Wlogical-op above, it is enabled, as of + # gcc 4.5.0 20090517. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5 +$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; } +if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wno-logical-op" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__Wno_logical_op=yes +else + gl_cv_warn_c__Wno_logical_op=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5 +$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; } +if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then : + as_fn_append WARN_CFLAGS " -Wno-logical-op" +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5 +$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; } +if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fdiagnostics-show-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__fdiagnostics_show_option=yes +else + gl_cv_warn_c__fdiagnostics_show_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5 +$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; } +if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then : + as_fn_append WARN_CFLAGS " -fdiagnostics-show-option" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5 +$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; } +if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_compiler_FLAGS="$CFLAGS" + CFLAGS="$CFLAGS -funit-at-a-time" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_warn_c__funit_at_a_time=yes +else + gl_cv_warn_c__funit_at_a_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_compiler_FLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5 +$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; } +if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then : + as_fn_append WARN_CFLAGS " -funit-at-a-time" +fi + + + + + +$as_echo "#define lint 1" >>confdefs.h + + +$as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h + + +$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h + + + # We use a slightly smaller set of warning options for lib/. + # Remove the following and save the result in GNULIB_WARN_CFLAGS. + nw= + nw="$nw -Wunused-macros" + + + gl_warn_set= + set x $WARN_CFLAGS; shift + for gl_warn_item + do + case " $nw " in + *" $gl_warn_item "*) + ;; + *) + gl_warn_set="$gl_warn_set $gl_warn_item" + ;; + esac + done + GNULIB_WARN_CFLAGS=$gl_warn_set + + +fi @@ -8316,8 +8908,13 @@ $as_echo_n "checking for $ALSA_MODULES... " >&6; } if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 && ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` && ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then - - ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"` ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5 $as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; } @@ -9656,15 +10253,6 @@ else window_system=x11 fi -## Workaround for bug in autoconf <= 2.62. -## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html -## No need to do anything special for these standard directories. -if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then - - x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` - -fi - LD_SWITCH_X_SITE_AUX= LD_SWITCH_X_SITE_AUX_RPATH= if test "${x_libraries}" != NONE; then @@ -9698,7 +10286,7 @@ fi if test "${x_includes}" != NONE && test -n "${x_includes}"; then - C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` + C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"` fi if test x"${x_includes}" = x; then @@ -9803,7 +10391,6 @@ else fi - NS_HAVE_NSINTEGER=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9821,8 +10408,10 @@ else ns_have_nsinteger=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ns_have_nsinteger = no; then - NS_HAVE_NSINTEGER=no + if test $ns_have_nsinteger = yes; then + +$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h + fi fi @@ -10752,8 +11341,13 @@ $as_echo_n "checking for $RSVG_MODULE... " >&6; } if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 && RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` && RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then - - RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"` RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5 $as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; } @@ -10859,8 +11453,13 @@ $as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; } if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 && IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` && IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then - - IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"` IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5 $as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; } @@ -10978,8 +11577,13 @@ $as_echo_n "checking for $GTK_MODULES... " >&6; } if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 && GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` && GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then - - GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } @@ -11081,8 +11685,13 @@ $as_echo_n "checking for $GTK_MODULES... " >&6; } if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 && GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` && GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then - - GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"` GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5 $as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; } @@ -11276,8 +11885,13 @@ $as_echo_n "checking for dbus-1 >= 1.0... " >&6; } if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 && DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` && DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then - - DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"` DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5 $as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; } @@ -11386,8 +12000,13 @@ $as_echo_n "checking for gio-2.0 >= 2.26... " >&6; } if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 && GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` && GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then - - GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"` GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5 $as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; } @@ -11484,8 +12103,13 @@ $as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; } if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 && GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` && GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then - - GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"` GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5 $as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; } @@ -11660,8 +12284,13 @@ $as_echo_n "checking for gnutls >= 2.6.6... " >&6; } if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 && LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` && LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then - - LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"` LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5 $as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; } @@ -12307,8 +12936,13 @@ $as_echo_n "checking for fontconfig >= 2.2.0... " >&6; } if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 && FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` && FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then - - FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"` FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5 $as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; } @@ -12402,8 +13036,13 @@ $as_echo_n "checking for xft >= 0.13.0... " >&6; } if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 && XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` && XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then - - XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"` XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5 $as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; } @@ -12606,8 +13245,13 @@ $as_echo_n "checking for freetype2... " >&6; } if $PKG_CONFIG --exists "freetype2" 2>&5 && FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` && FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then - - FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"` FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5 $as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; } @@ -12703,8 +13347,13 @@ $as_echo_n "checking for libotf... " >&6; } if $PKG_CONFIG --exists "libotf" 2>&5 && LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` && LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then - - LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"` LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5 $as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; } @@ -12848,8 +13497,13 @@ $as_echo_n "checking for m17n-flt... " >&6; } if $PKG_CONFIG --exists "m17n-flt" 2>&5 && M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` && M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then - - M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"` M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5 $as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; } @@ -13413,7 +14067,7 @@ fi -C_SWITCH_X_SYSTEM= +GNUSTEP_CFLAGS= ### Use NeXTstep API to implement GUI. if test "${HAVE_NS}" = "yes"; then @@ -13430,15 +14084,10 @@ $as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h # See also .m.o rule in Makefile.in */ # FIXME: are all these flags really needed? Document here why. */ - C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" + GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" ## Extra CFLAGS applied to src/*.m files. GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" fi - if test "${NS_HAVE_NSINTEGER}" = "yes"; then - -$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h - - fi # We also have mouse menus. HAVE_MENUS=yes OTHER_FILES=ns-app @@ -13568,8 +14217,13 @@ $as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; } if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 && LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` && LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then - - LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"` LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5 $as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; } @@ -13967,6 +14621,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \ sendto recvfrom getsockopt setsockopt getsockname getpeername \ gai_strerror mkstemp getline getdelim mremap fsync sync \ difftime mempcpy mblen mbrlen posix_memalign \ +getpwent endpwent getgrent endgrent \ cfmakeraw cfsetspeed copysign __executable_start do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -22211,7 +22866,7 @@ case "$opsys" in ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM ## had different values in configure (in ac_link) and src/Makefile.in. ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. - gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; + gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;; *) LD_SWITCH_SYSTEM_TEMACS= ;; esac @@ -22410,6 +23065,14 @@ to run if these resources are not installed." echo fi +if test "${opsys}" = "cygwin"; then + case `uname -r` in + 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5 +$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;} + echo + ;; + esac +fi # Remove any trailing slashes in these variables. test "${prefix}" != NONE && @@ -22430,6 +23093,16 @@ if test -f $srcdir/${opt_makefile}.in; then fi + +opt_makefile=admin/unidata/Makefile + +if test -f $srcdir/${opt_makefile}.in; then + SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" + ac_config_files="$ac_config_files admin/unidata/Makefile" + +fi + + SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` @@ -23259,6 +23932,7 @@ do "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;; + "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;; "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;; "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; diff --git a/configure.in b/configure.in index 14a80622cd9..c9592921e75 100644 --- a/configure.in +++ b/configure.in @@ -686,47 +686,121 @@ else test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" fi -### Use -Wdeclaration-after-statement if the compiler supports it -AC_MSG_CHECKING([whether gcc understands -Wdeclaration-after-statement]) -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wdeclaration-after-statement" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" -fi -AC_MSG_RESULT($has_option) -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS +AC_ARG_ENABLE([gcc-warnings], + [AS_HELP_STRING([--enable-gcc-warnings], + [turn on lots of GCC warnings (for developers)])], + [case $enableval in + yes|no) ;; + *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;; + esac + gl_gcc_warnings=$enableval], + [gl_gcc_warnings=no] +) -### Use -Wold-style-definition if the compiler supports it -# This can be removed when conversion to standard C is finished. -AC_MSG_CHECKING([whether gcc understands -Wold-style-definition]) -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wold-style-definition" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" -fi -AC_MSG_RESULT($has_option) -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS +# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found]) +# ------------------------------------------------ +# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND. +# Otherwise, run RUN-IF-NOT-FOUND. +AC_DEFUN([gl_GCC_VERSION_IFELSE], + [AC_PREPROC_IFELSE( + [AC_LANG_PROGRAM( + [[ +#if ($1) < __GNUC__ || (($1) == __GNUC__ && ($2) <= __GNUC_MINOR__) +/* ok */ +#else +# error "your version of gcc is older than $1.$2" +#endif + ]]), + ], [$3], [$4]) + ] +) -### Use -Wimplicit-function-declaration if the compiler supports it -AC_MSG_CHECKING([whether gcc understands -Wimplicit-function-declaration]) -SAVE_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Wimplicit-function-declaration" -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], has_option=yes, has_option=no) -if test $has_option = yes; then - C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH" -fi -AC_MSG_RESULT($has_option) -CFLAGS="$SAVE_CFLAGS" -unset has_option -unset SAVE_CFLAGS +# When compiling with GCC, prefer -isystem to -I when including system +# include files, to avoid generating useless diagnostics for the files. +if test "$gl_gcc_warnings" != yes; then + isystem='-I' +else + isystem='-isystem ' + + # This, $nw, is the list of warnings we disable. + nw= + + case $with_x_toolkit in + lucid | athena | motif) + # Old toolkits mishandle 'const'. + nw="$nw -Wwrite-strings" + ;; + *) + gl_WARN_ADD([-Werror], [WERROR_CFLAGS]) + ;; + esac + AC_SUBST([WERROR_CFLAGS]) + + nw="$nw -Waggregate-return" # anachronistic + nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h) + nw="$nw -Wc++-compat" # We don't care about C++ compilers + nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib + nw="$nw -Wtraditional" # Warns on #elif which we use often + nw="$nw -Wcast-qual" # Too many warnings for now + nw="$nw -Wconversion" # Too many warnings for now + nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings + nw="$nw -Wsign-conversion" # Too many warnings for now + nw="$nw -Woverlength-strings" # Not a problem these days + nw="$nw -Wtraditional-conversion" # Too many warnings for now + nw="$nw -Wpadded" # Our structs are not padded + nw="$nw -Wredundant-decls" # We regularly (re)declare getenv etc. + nw="$nw -Wlogical-op" # any use of fwrite provokes this + nw="$nw -Wformat-nonliteral" # Emacs does this a lot + nw="$nw -Wvla" # warnings in gettext.h + nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__ + nw="$nw -Wswitch-enum" # Too many warnings for now + nw="$nw -Wswitch-default" # Too many warnings for now + nw="$nw -Wfloat-equal" # e.g., ftoastr.c + nw="$nw -Winline" # e.g., dispnew.c's inlining of row_equal_p + + # Emacs doesn't care about shadowing; see + # . + nw="$nw -Wshadow" + + # The following lines should be removable at some point. + nw="$nw -Wstack-protector" + nw="$nw -Wstrict-overflow" + nw="$nw -Wsuggest-attribute=const" + nw="$nw -Wsuggest-attribute=pure" + + gl_MANYWARN_ALL_GCC([ws]) + gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw]) + for w in $ws; do + gl_WARN_ADD([$w]) + done + gl_WARN_ADD([-Wno-missing-field-initializers]) # We need this one + gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now + gl_WARN_ADD([-Wno-type-limits]) # Too many warnings for now + gl_WARN_ADD([-Wno-switch]) # Too many warnings for now + gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now + gl_WARN_ADD([-Wno-format-nonliteral]) + + # In spite of excluding -Wlogical-op above, it is enabled, as of + # gcc 4.5.0 20090517. + gl_WARN_ADD([-Wno-logical-op]) + + gl_WARN_ADD([-fdiagnostics-show-option]) + gl_WARN_ADD([-funit-at-a-time]) + + AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) + AC_DEFINE([_FORTIFY_SOURCE], [2], + [enable compile-time and run-time bounds-checking, and some warnings]) + AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) + + # We use a slightly smaller set of warning options for lib/. + # Remove the following and save the result in GNULIB_WARN_CFLAGS. + nw= + nw="$nw -Wunused-macros" + + gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw]) + AC_SUBST([GNULIB_WARN_CFLAGS]) +fi -AC_SUBST(C_WARNINGS_SWITCH) #### Some other nice autoconf tests. @@ -1127,8 +1201,13 @@ AC_DEFUN([PKG_CHECK_MODULES], [ if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD && $1_CFLAGS=`$PKG_CONFIG --cflags "$2" 2>&AS_MESSAGE_LOG_FD` && $1_LIBS=`$PKG_CONFIG --libs "$2" 2>&AS_MESSAGE_LOG_FD`; then - - $1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e 's,///*,/,g'` + edit_cflags=" + s,///*,/,g + s/^/ / + s/ -I/ $isystem/g + s/^ // + " + $1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"` $1_LIBS=`AS_ECHO(["$$1_LIBS"]) | sed -e 's,///*,/,g'` AC_MSG_RESULT([yes CFLAGS='$$1_CFLAGS' LIBS='$$1_LIBS']) succeeded=yes @@ -1421,15 +1500,6 @@ else window_system=x11 fi -## Workaround for bug in autoconf <= 2.62. -## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html -## No need to do anything special for these standard directories. -if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then - - x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'` - -fi - LD_SWITCH_X_SITE_AUX= LD_SWITCH_X_SITE_AUX_RPATH= if test "${x_libraries}" != NONE; then @@ -1463,7 +1533,7 @@ AC_SUBST(LD_SWITCH_X_SITE_AUX) AC_SUBST(LD_SWITCH_X_SITE_AUX_RPATH) if test "${x_includes}" != NONE && test -n "${x_includes}"; then - C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` + C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"` fi if test x"${x_includes}" = x; then @@ -1550,13 +1620,12 @@ fail; AC_CHECK_HEADER([AppKit/AppKit.h], [HAVE_NS=yes], [AC_MSG_ERROR([`--with-ns' was specified, but the include files are missing or cannot be compiled.])]) - NS_HAVE_NSINTEGER=yes AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [NSInteger i;])], ns_have_nsinteger=yes, ns_have_nsinteger=no) - if test $ns_have_nsinteger = no; then - NS_HAVE_NSINTEGER=no + if test $ns_have_nsinteger = yes; then + AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) fi fi AC_SUBST(TEMACS_LDFLAGS2) @@ -2589,7 +2658,7 @@ AC_SUBST(LIBGPM) dnl Check for malloc/malloc.h on darwin AC_CHECK_HEADER(malloc/malloc.h, [AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the header file.])]) -C_SWITCH_X_SYSTEM= +GNUSTEP_CFLAGS= ### Use NeXTstep API to implement GUI. if test "${HAVE_NS}" = "yes"; then AC_DEFINE(HAVE_NS, 1, [Define to 1 if you are using the NeXTstep API, either GNUstep or Cocoa on Mac OS X.]) @@ -2600,15 +2669,10 @@ if test "${HAVE_NS}" = "yes"; then AC_DEFINE(NS_IMPL_GNUSTEP, 1, [Define to 1 if you are using NS windowing under GNUstep.]) # See also .m.o rule in Makefile.in */ # FIXME: are all these flags really needed? Document here why. */ - dnl FIXME this should be renamed to GNUSTEP_CFLAGS, and only - dnl used in src/Makefile.in. - C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" + GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" ## Extra CFLAGS applied to src/*.m files. GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE" fi - if test "${NS_HAVE_NSINTEGER}" = "yes"; then - AC_DEFINE(NS_HAVE_NSINTEGER, 1, [Define to 1 if `NSInteger' is defined.]) - fi # We also have mouse menus. HAVE_MENUS=yes OTHER_FILES=ns-app @@ -2751,6 +2815,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm \ sendto recvfrom getsockopt setsockopt getsockname getpeername \ gai_strerror mkstemp getline getdelim mremap fsync sync \ difftime mempcpy mblen mbrlen posix_memalign \ +getpwent endpwent getgrent endgrent \ cfmakeraw cfsetspeed copysign __executable_start) dnl Cannot use AC_CHECK_FUNCS @@ -3222,7 +3287,7 @@ AC_SUBST(gameuser) ## end of LIBX_BASE, but nothing ever set it. AC_SUBST(LD_SWITCH_X_SITE) AC_SUBST(C_SWITCH_X_SITE) -AC_SUBST(C_SWITCH_X_SYSTEM) +AC_SUBST(GNUSTEP_CFLAGS) AC_SUBST(CFLAGS) ## Used in lwlib/Makefile.in. AC_SUBST(X_TOOLKIT_TYPE) @@ -3443,7 +3508,7 @@ case "$opsys" in ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM ## had different values in configure (in ac_link) and src/Makefile.in. ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS. - gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;; + gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;; *) LD_SWITCH_SYSTEM_TEMACS= ;; esac @@ -3802,6 +3867,13 @@ to run if these resources are not installed." echo fi +if test "${opsys}" = "cygwin"; then + case `uname -r` in + 1.5.*) AC_MSG_WARN([[building Emacs on Cygwin 1.5 is not supported.]]) + echo + ;; + esac +fi # Remove any trailing slashes in these variables. [test "${prefix}" != NONE && @@ -3834,6 +3906,16 @@ if test -f $srcdir/${opt_makefile}.in; then AC_CONFIG_FILES([test/automated/Makefile]) fi + +dnl admin/ may or may not be present. +opt_makefile=admin/unidata/Makefile + +if test -f $srcdir/${opt_makefile}.in; then + SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile" + AC_CONFIG_FILES([admin/unidata/Makefile]) +fi + + SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'` AC_SUBST(SUBDIR_MAKEFILES_IN) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 549b677c4f2..63ccb880d40 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,85 @@ +2012-04-15 Chong Yidong + + * misc.texi (emacsclient Options): More clarifications. + +2012-04-15 Glenn Morris + + * msdog.texi (Windows Printing): It doesn't set printer-name. + + * mule.texi (Language Environments): Move font info to "Fontsets". + (Fontsets): Move intlfonts etc here from "Language Environments". + Copyedits. + (Defining Fontsets, Modifying Fontsets, Undisplayable Characters) + (Unibyte Mode, Charsets, Bidirectional Editing): Copyedits. + +2012-04-15 Chong Yidong + + * glossary.texi (Glossary): Standardize on "text terminal" + terminology. All callers changed. + + * misc.texi (emacsclient Options): Document "client frame" concept + and its effect on C-x C-c more carefully. + +2012-04-15 Glenn Morris + + * frames.texi (Scroll Bars): + * glossary.texi (Glossary): Use consistent case for "X Window System". + + * mule.texi (Select Input Method, Coding Systems): + State command names in kbd tables. + (Recognize Coding): Add cross-ref. + (Output Coding): Don't mention message mode in particular. + (Text Coding, Communication Coding, File Name Coding, Terminal Coding): + Copyedits. + +2012-04-14 Glenn Morris + + * mule.texi (Select Input Method, Coding Systems, Recognize Coding): + Copyedits. + (Coding Systems): Mac OS X apparently uses newlines for EOL. + (Recognize Coding): Remove old auto-coding-regexp-alist example. + auto-coding-functions does not override coding: tags. + Remove rmail-decode-mime-charset; it no longer has any effect. + +2012-04-14 Chong Yidong + + * custom.texi (Creating Custom Themes): Add reference to Custom + Themes node in Lisp manual. + +2012-04-14 Glenn Morris + + * mule.texi (International): Copyedits. + (International Chars): Update C-x = example output. + (Disabling Multibyte): Rename from "Enabling Multibyte". + Clarify what "unibyte: t" does, and mode-line description. + (Unibyte Mode): Update for "Disabling Multibyte" node name change. + Use Texinfo recommended convention for quotes+punctuation. + (Language Environments): Copyedits. + (Input Methods): Copyedits. Use "^" for the postfix example, + because it is less confusing inside Info's `quotes'. + + * custom.texi (Specifying File Variables): Fix "unibyte" description. + Update for "Disabling Multibyte" node name change. + * emacs.texi: Update for "Disabling Multibyte" node name change. + + * abbrevs.texi, arevert-xtra.texi, buffers.texi, building.texi: + * cmdargs.texi, custom.texi, entering.texi, files.texi, frames.texi: + * glossary.texi, help.texi, macos.texi, maintaining.texi, mini.texi: + * misc.texi, package.texi, programs.texi, screen.texi, search.texi: + * sending.texi, text.texi, trouble.texi: + Use @file for buffers, per the Texinfo manual. + + * entering.texi (Entering Emacs): + Do not mention initial-buffer-choice = t. + + * misc.texi (Gnus Startup): Use @env for environment variables. + + * Makefile.in: Replace non-portable use of $< in ordinary rules. + +2012-04-12 Glenn Morris + + * ack.texi (Acknowledgments): Don't mention obsolete mailpost.el. + 2012-04-07 Glenn Morris * emacsver.texi (EMACSVER): Bump version to 24.1.50. diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in index 2ed265ecd70..b25f6dbe490 100644 --- a/doc/emacs/Makefile.in +++ b/doc/emacs/Makefile.in @@ -1,6 +1,6 @@ #### Makefile for the Emacs Manual -# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -127,31 +127,31 @@ ps: emacs.ps # Note that all the Info targets build the Info files in srcdir. # There is no provision for Info files to exist in the build directory. # In a distribution of Emacs, the Info files should be up to date. - +# Note: "<" is not portable in ordinary make rules. $(infodir)/emacs: ${EMACSSOURCES} $(mkinfodir) - $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $< + $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ ${srcdir}/emacs.texi emacs.dvi: ${EMACSSOURCES} - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi emacs.ps: emacs.dvi - $(DVIPS) -o $@ $< + $(DVIPS) -o $@ emacs.dvi emacs.pdf: ${EMACSSOURCES} - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs.texi emacs.html: ${EMACSSOURCES} - $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $< + $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs.texi emacs-xtra.dvi: $(EMACS_XTRA) - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-xtra.texi emacs-xtra.ps: emacs-xtra.dvi - $(DVIPS) -o $@ $< + $(DVIPS) -o $@ emacs-xtra.dvi emacs-xtra.pdf: $(EMACS_XTRA) - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-xtra.texi .PHONY: mostlyclean clean distclean maintainer-clean infoclean diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi index f3b272c359d..a8a34e62c1f 100644 --- a/doc/emacs/abbrevs.texi +++ b/doc/emacs/abbrevs.texi @@ -261,12 +261,12 @@ expands to itself, and save it to your abbrev file. @kbd{M-x edit-abbrevs} allows you to add, change or kill abbrev definitions by editing a list of them in an Emacs buffer. The list has the same format described above. The buffer of abbrevs is called -@samp{*Abbrevs*}, and is in Edit-Abbrevs mode. Type @kbd{C-c C-c} in +@file{*Abbrevs*}, and is in Edit-Abbrevs mode. Type @kbd{C-c C-c} in this buffer to install the abbrev definitions as specified in the buffer---and delete any abbrev definitions not listed. The command @code{edit-abbrevs} is actually the same as -@code{list-abbrevs} except that it selects the buffer @samp{*Abbrevs*} +@code{list-abbrevs} except that it selects the buffer @file{*Abbrevs*} whereas @code{list-abbrevs} merely displays it in another window. @node Saving Abbrevs diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index be01b05fe19..51f6d70bd90 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -251,10 +251,6 @@ color manipulation. He also made various contributions to Gnus. Vivek Dasmohapatra wrote @file{htmlfontify.el}, to convert a buffer or source tree to HTML. -@item -Gary Delp wrote @file{mailpost.el}, an interface between RMAIL and the -@file{/usr/uci/post} mailer. - @item Matthieu Devin wrote @file{delsel.el}, a package to make newly-typed text replace the current selection. @@ -694,8 +690,8 @@ directory-local variables; and the @code{info-finder} feature that creates a virtual Info manual of package keywords. @item -Kroly L@H{o}rentey wrote the ``multi-terminal'' code, which allows Emacs to -run on graphical and text-only terminals simultaneously. +Kroly L@H{o}rentey wrote the ``multi-terminal'' code, which allows +Emacs to run on graphical and text terminals simultaneously. @item Martin Lorentzon wrote @file{vc-annotate.el}, support for version diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi index 4032c0b9882..55d7646542d 100644 --- a/doc/emacs/arevert-xtra.texi +++ b/doc/emacs/arevert-xtra.texi @@ -93,8 +93,8 @@ deleting or changing marks or flags will mark it modified again. Remote Dired buffers are not auto-reverted (because it may be slow). Neither are Dired buffers for which you used shell wildcards or file -arguments to list only some of the files. @samp{*Find*} and -@samp{*Locate*} buffers do not auto-revert either. +arguments to list only some of the files. @file{*Find*} and +@file{*Locate*} buffers do not auto-revert either. @c FIXME? This should be in the elisp manual? @node Supporting additional buffers diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 3e768ab54d7..5ad48eb48ef 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -372,7 +372,7 @@ the text in the region. @xref{Mark}, for a description of the region. On most keyboards, @key{DEL} is labeled @key{Backspace}, but we refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} with the @key{Delete} key; we will discuss @key{Delete} momentarily.) -On some text-only terminals, Emacs may not recognize the @key{DEL} key +On some text terminals, Emacs may not recognize the @key{DEL} key properly. @xref{DEL Does Not Delete}, if you encounter this problem. The @key{delete} (@code{delete-forward-char}) command deletes in the @@ -530,7 +530,7 @@ too long to fit in the window, and Emacs displays it as two or more @dfn{continuation}, and the long logical line is called a @dfn{continued line}. On a graphical display, Emacs indicates line wrapping with small bent arrows in the left and right window fringes. -On a text-only terminal, Emacs indicates line wrapping by displaying a +On a text terminal, Emacs indicates line wrapping by displaying a @samp{\} character at the right margin. Most commands that act on lines act on logical lines, not screen @@ -545,9 +545,9 @@ and up, respectively, by one screen line (@pxref{Moving Point}). continuing them. This means that every logical line occupies a single screen line; if it is longer than the width of the window, the rest of the line is not displayed. On a graphical display, a truncated line -is indicated by a small straight arrow in the right fringe; on a -text-only terminal, it is indicated by a @samp{$} character in the -right margin. @xref{Line Truncation}. +is indicated by a small straight arrow in the right fringe; on a text +terminal, it is indicated by a @samp{$} character in the right margin. +@xref{Line Truncation}. By default, continued lines are wrapped at the right window edge. Since the wrapping may occur in the middle of a word, continued lines diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index d0ec1103580..d2783bcb0ba 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi @@ -11,7 +11,7 @@ the file's text. Each time you invoke Dired, a buffer is used to hold the directory listing. If you send a message with @kbd{C-x m}, a buffer is used to hold the text of the message. When you ask for a -command's documentation, that appears in a buffer named @samp{*Help*}. +command's documentation, that appears in a buffer named @file{*Help*}. Each buffer has a unique name, which can be of any length. When a buffer is displayed in a window, its name is shown in the mode line @@ -19,7 +19,7 @@ buffer is displayed in a window, its name is shown in the mode line matters in buffer names. Most buffers are made by visiting files, and their names are derived from the files' names; however, you can also create an empty buffer with any name you want. A newly started Emacs -has several buffers, including one named @samp{*scratch*}, which can +has several buffers, including one named @file{*scratch*}, which can be used for evaluating Lisp expressions and is not associated with any file (@pxref{Lisp Interaction}). @@ -198,7 +198,7 @@ CRM Buffer Size Mode File @end smallexample @noindent -The buffer @samp{*Help*} was made by a help request (@pxref{Help}); it +The buffer @file{*Help*} was made by a help request (@pxref{Help}); it is not visiting any file. The buffer @code{src} was made by Dired on the directory @file{~/cvs/emacs/src/}. You can list only buffers that are visiting files by giving the command a prefix argument, as in @@ -248,9 +248,9 @@ happens and no renaming is done. @kbd{M-x rename-uniquely} renames the current buffer to a similar name with a numeric suffix added to make it both different and unique. This command does not need an argument. It is useful for creating -multiple shell buffers: if you rename the @samp{*shell*} buffer, then +multiple shell buffers: if you rename the @file{*shell*} buffer, then do @kbd{M-x shell} again, it makes a new shell buffer named -@samp{*shell*}; meanwhile, the old shell buffer continues to exist +@file{*shell*}; meanwhile, the old shell buffer continues to exist under its new name. This method is also good for mail buffers, compilation buffers, and most Emacs features that create special buffers with particular names. (With some of these features, such as @@ -354,7 +354,7 @@ operations on buffers, through an interface similar to Dired @findex buffer-menu @findex buffer-menu-other-window To use the buffer menu, type @kbd{C-x C-b} and switch to the window -displaying the @samp{*Buffer List*} buffer. You can also type +displaying the @file{*Buffer List*} buffer. You can also type @kbd{M-x buffer-menu} to open the buffer menu in the selected window. Alternatively, the command @kbd{M-x buffer-menu-other-window} opens the buffer menu in another window, and selects that window. @@ -409,11 +409,11 @@ Quit the buffer menu---immediately display the most recent formerly visible buffer in its place. @item @key{RET} @itemx f -Immediately select this line's buffer in place of the @samp{*Buffer +Immediately select this line's buffer in place of the @file{*Buffer List*} buffer. @item o Immediately select this line's buffer in another window as if by -@kbd{C-x 4 b}, leaving @samp{*Buffer List*} visible. +@kbd{C-x 4 b}, leaving @file{*Buffer List*} visible. @item C-o Immediately display this line's buffer in another window, but don't select the window. @@ -422,7 +422,7 @@ Immediately select this line's buffer in a full-screen window. @item 2 Immediately set up two windows, with this line's buffer selected in one, and the previously current buffer (aside from the buffer -@samp{*Buffer List*}) displayed in the other. +@file{*Buffer List*}) displayed in the other. @item b Bury the buffer listed on this line. @item m @@ -448,19 +448,19 @@ the inclusion of such buffers in the buffer list. suitable buffer, and turn on Buffer Menu mode in it. Everything else described above is implemented by the special commands provided in Buffer Menu mode. One consequence of this is that you can switch from -the @samp{*Buffer List*} buffer to another Emacs buffer, and edit -there. You can reselect the @samp{*Buffer List*} buffer later, to +the @file{*Buffer List*} buffer to another Emacs buffer, and edit +there. You can reselect the @file{*Buffer List*} buffer later, to perform the operations already requested, or you can kill it, or pay no further attention to it. - Normally, the buffer @samp{*Buffer List*} is not updated + Normally, the buffer @file{*Buffer List*} is not updated automatically when buffers are created and killed; its contents are just text. If you have created, deleted or renamed buffers, the way -to update @samp{*Buffer List*} to show what you have done is to type +to update @file{*Buffer List*} to show what you have done is to type @kbd{g} (@code{revert-buffer}). You can make this happen regularly every @code{auto-revert-interval} seconds if you enable Auto Revert mode in this buffer, as long as it is not marked modified. Global -Auto Revert mode applies to the @samp{*Buffer List*} buffer only if +Auto Revert mode applies to the @file{*Buffer List*} buffer only if @code{global-auto-revert-non-file-buffers} is non-@code{nil}. @iftex @inforef{Autorevert,, emacs-xtra}, for details. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 2f977c7d923..fef7d2b2828 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -44,7 +44,7 @@ messages and show you where the errors occurred. @table @kbd @item M-x compile Run a compiler asynchronously under Emacs, with error messages going to -the @samp{*compilation*} buffer. +the @file{*compilation*} buffer. @item M-x recompile Invoke a compiler with the same command as in the last invocation of @kbd{M-x compile}. @@ -57,7 +57,7 @@ Kill the running compilation subprocess. compile}. This reads a shell command line using the minibuffer, and then executes the command by running a shell as a subprocess (or @dfn{inferior process}) of Emacs. The output is inserted in a buffer -named @samp{*compilation*}. The current buffer's default directory is +named @file{*compilation*}. The current buffer's default directory is used as the working directory for the execution of the command; normally, therefore, compilation takes place in this directory. @@ -72,19 +72,19 @@ specified is automatically stored in the variable type @kbd{M-x compile}. A file can also specify a file-local value for @code{compile-command} (@pxref{File Variables}). - Starting a compilation displays the @samp{*compilation*} buffer in + Starting a compilation displays the @file{*compilation*} buffer in another window but does not select it. While the compilation is running, the word @samp{run} is shown in the major mode indicator for -the @samp{*compilation*} buffer, and the word @samp{Compiling} appears -in all mode lines. You do not have to keep the @samp{*compilation*} +the @file{*compilation*} buffer, and the word @samp{Compiling} appears +in all mode lines. You do not have to keep the @file{*compilation*} buffer visible while compilation is running; it continues in any case. When the compilation ends, for whatever reason, the mode line of the -@samp{*compilation*} buffer changes to say @samp{exit} (followed by +@file{*compilation*} buffer changes to say @samp{exit} (followed by the exit code: @samp{[0]} for a normal exit), or @samp{signal} (if a signal terminated the process). If you want to watch the compilation transcript as it appears, -switch to the @samp{*compilation*} buffer and move point to the end of +switch to the @file{*compilation*} buffer and move point to the end of the buffer. When point is at the end, new compilation output is inserted above point, which remains at the end. Otherwise, point remains fixed while compilation output is added at the end of the @@ -93,7 +93,7 @@ buffer. @cindex compilation buffer, keeping point at end @vindex compilation-scroll-output If you change the variable @code{compilation-scroll-output} to a -non-@code{nil} value, the @samp{*compilation*} buffer scrolls +non-@code{nil} value, the @file{*compilation*} buffer scrolls automatically to follow the output. If the value is @code{first-error}, scrolling stops when the first error appears, leaving point at that error. For any other non-@code{nil} value, @@ -103,22 +103,22 @@ scrolling continues until there is no more output. To rerun the last compilation with the same command, type @kbd{M-x recompile}. This reuses the compilation command from the last invocation of @kbd{M-x compile}. It also reuses the -@samp{*compilation*} buffer and starts the compilation in its default +@file{*compilation*} buffer and starts the compilation in its default directory, which is the directory in which the previous compilation was started. @findex kill-compilation Starting a new compilation also kills any compilation already -running in @samp{*compilation*}, as the buffer can only handle one +running in @file{*compilation*}, as the buffer can only handle one compilation at any time. However, @kbd{M-x compile} asks for confirmation before actually killing a compilation that is running. You can also kill the compilation process with @kbd{M-x kill-compilation}. To run two compilations at once, start the first one, then rename -the @samp{*compilation*} buffer (perhaps using @code{rename-uniquely}; +the @file{*compilation*} buffer (perhaps using @code{rename-uniquely}; @pxref{Misc Buffer}), then switch buffers and start the other -compilation. This will create a new @samp{*compilation*} buffer. +compilation. This will create a new @file{*compilation*} buffer. @vindex compilation-environment You can control the environment passed to the compilation command @@ -133,7 +133,7 @@ variable settings override the usual ones. @cindex Compilation mode @cindex mode, Compilation @cindex locus - The @samp{*compilation*} buffer uses a major mode called Compilation + The @file{*compilation*} buffer uses a major mode called Compilation mode. Compilation mode turns each error message in the buffer into a hyperlink; you can move point to it and type @key{RET}, or click on it with the mouse (@pxref{Mouse References}), to visit the @dfn{locus} of @@ -145,10 +145,10 @@ position in a file where that error occurred. If you change the variable @code{compilation-auto-jump-to-first-error} to a non-@code{nil} value, Emacs automatically visits the locus of the first error message that -appears in the @samp{*compilation*} buffer. +appears in the @file{*compilation*} buffer. Compilation mode provides the following additional commands. These -commands can also be used in @samp{*grep*} buffers, where the +commands can also be used in @file{*grep*} buffers, where the hyperlinks are search matches rather than error messages (@pxref{Grep Searching}). @@ -190,7 +190,7 @@ mode buffer. The first time you invoke it after a compilation, it visits the locus of the first error message. Each subsequent @w{@kbd{C-x `}} visits the next error, in a similar fashion. If you visit a specific error with @key{RET} or a mouse click in the -@samp{*compilation*} buffer, subsequent @w{@kbd{C-x `}} commands +@file{*compilation*} buffer, subsequent @w{@kbd{C-x `}} commands advance from there. When @w{@kbd{C-x `}} finds no more error messages to visit, it signals an error. @w{@kbd{C-u C-x `}} starts again from the beginning of the compilation buffer, and visits the first locus. @@ -199,8 +199,8 @@ the beginning of the compilation buffer, and visits the first locus. through errors in the opposite direction. The @code{next-error} and @code{previous-error} commands don't just -act on the errors or matches listed in @samp{*compilation*} and -@samp{*grep*} buffers; they also know how to iterate through error or +act on the errors or matches listed in @file{*compilation*} and +@file{*grep*} buffers; they also know how to iterate through error or match lists produced by other commands, such as @kbd{M-x occur} (@pxref{Other Repeating Search}). If you are already in a buffer containing error messages or matches, those are the ones that are @@ -224,16 +224,16 @@ highlights the relevant source line. The duration of this highlight is determined by the variable @code{next-error-highlight}. @vindex compilation-context-lines - If the @samp{*compilation*} buffer is shown in a window with a left + If the @file{*compilation*} buffer is shown in a window with a left fringe (@pxref{Fringes}), the locus-visiting commands put an arrow in the fringe, pointing to the current error message. If the window has -no left fringe, such as on a text-only terminal, these commands scroll -the window so that the current message is at the top of the window. -If you change the variable @code{compilation-context-lines} to an -integer value @var{n}, these commands scroll the window so that the -current error message is @var{n} lines from the top, whether or not -there is a fringe; the default value, @code{nil}, gives the behavior -described above. +no left fringe, such as on a text terminal, these commands scroll the +window so that the current message is at the top of the window. If +you change the variable @code{compilation-context-lines} to an integer +value @var{n}, these commands scroll the window so that the current +error message is @var{n} lines from the top, whether or not there is a +fringe; the default value, @code{nil}, gives the behavior described +above. @vindex compilation-error-regexp-alist @vindex grep-regexp-alist @@ -276,7 +276,7 @@ Names}). command, but specifies the option for a noninteractive shell. This means, in particular, that the shell should start with no prompt. If you find your usual shell prompt making an unsightly appearance in the -@samp{*compilation*} buffer, it means you have made a mistake in your +@file{*compilation*} buffer, it means you have made a mistake in your shell's init file by setting the prompt unconditionally. (This init file may be named @file{.bashrc}, @file{.profile}, @file{.cshrc}, @file{.shrc}, etc., depending on what shell you use.) The shell init @@ -339,14 +339,14 @@ mode (@pxref{Compilation Mode}). @item M-x grep @itemx M-x lgrep Run @command{grep} asynchronously under Emacs, listing matching lines in -the buffer named @samp{*grep*}. +the buffer named @file{*grep*}. @item M-x grep-find @itemx M-x find-grep @itemx M-x rgrep Run @command{grep} via @code{find}, and collect output in the -@samp{*grep*} buffer. +@file{*grep*} buffer. @item M-x zrgrep -Run @code{zgrep} and collect output in the @samp{*grep*} buffer. +Run @code{zgrep} and collect output in the @file{*grep*} buffer. @item M-x kill-grep Kill the running @command{grep} subprocess. @end table @@ -369,7 +369,7 @@ can chain @command{grep} commands, like this: grep -nH -e foo *.el | grep bar | grep toto @end example - The output from @command{grep} goes in the @samp{*grep*} buffer. You + The output from @command{grep} goes in the @file{*grep*} buffer. You can find the corresponding lines in the original files using @w{@kbd{C-x `}}, @key{RET}, and so forth, just like compilation errors. @@ -572,12 +572,12 @@ for special commands that can be used in the GUD interaction buffer. As you debug a program, Emacs displays the relevant source files by visiting them in Emacs buffers, with an arrow in the left fringe -indicating the current execution line. (On a text-only terminal, the -arrow appears as @samp{=>}, overlaid on the first two text columns.) -Moving point in such a buffer does not move the arrow. You are free -to edit these source files, but note that inserting or deleting lines -will throw off the arrow's positioning, as Emacs has no way to figure -out which edited source line corresponds to the line reported by the +indicating the current execution line. (On a text terminal, the arrow +appears as @samp{=>}, overlaid on the first two text columns.) Moving +point in such a buffer does not move the arrow. You are free to edit +these source files, but note that inserting or deleting lines will +throw off the arrow's positioning, as Emacs has no way to figure out +which edited source line corresponds to the line reported by the debugger subprocess. To update this information, you typically have to recompile and restart the program. @@ -936,7 +936,7 @@ already exists there, the click removes it. A @kbd{C-Mouse-1} click enables or disables an existing breakpoint; a breakpoint that is disabled, but not unset, is indicated by a gray dot. - On a text-only terminal, or when fringes are disabled, enabled + On a text terminal, or when fringes are disabled, enabled breakpoints are indicated with a @samp{B} character in the left margin of the window. Disabled breakpoints are indicated with @samp{b}. (The margin is only displayed if a breakpoint is present.) @@ -1079,9 +1079,9 @@ debugger}. @findex gdb-frames-select On graphical displays, the selected stack frame is indicated by an -arrow in the fringe. On text-only terminals, or when fringes are -disabled, the selected stack frame is displayed in reverse contrast. -To select a stack frame, move point in its line and type @key{RET} +arrow in the fringe. On text terminals, or when fringes are disabled, +the selected stack frame is displayed in reverse contrast. To select +a stack frame, move point in its line and type @key{RET} (@code{gdb-frames-select}), or click @kbd{Mouse-2} on it. Doing so also updates the Locals buffer @ifnottex @@ -1506,14 +1506,14 @@ commands are used; its default is @code{t}. @section Lisp Interaction Buffers @findex lisp-interaction-mode - When Emacs starts up, it contains a buffer named @samp{*scratch*}, + When Emacs starts up, it contains a buffer named @file{*scratch*}, which is provided for evaluating Emacs Lisp expressions interactively. Its major mode is Lisp Interaction mode. You can also enable Lisp Interaction mode by typing @kbd{M-x lisp-interaction-mode}. @findex eval-print-last-sexp @kindex C-j @r{(Lisp Interaction mode)} - In the @samp{*scratch*} buffer, and other Lisp Interaction mode + In the @file{*scratch*} buffer, and other Lisp Interaction mode buffers, @kbd{C-j} (@code{eval-print-last-sexp}) evaluates the Lisp expression before point, and inserts the value at point. Thus, as you type expressions into the buffer followed by @kbd{C-j} after each @@ -1522,7 +1522,7 @@ expressions and their values. All other commands in Lisp Interaction mode are the same as in Emacs Lisp mode. @vindex initial-scratch-message - At startup, the @samp{*scratch*} buffer contains a short message, in + At startup, the @file{*scratch*} buffer contains a short message, in the form of a Lisp comment, that explains what it is for. This message is controlled by the variable @code{initial-scratch-message}, which should be either a string, or @code{nil} (which means to @@ -1533,7 +1533,7 @@ suppress the message). interactively is to use Inferior Emacs Lisp mode, which provides an interface rather like Shell mode (@pxref{Shell Mode}) for evaluating Emacs Lisp expressions. Type @kbd{M-x ielm} to create an -@samp{*ielm*} buffer which uses this mode. For more information, see +@file{*ielm*} buffer which uses this mode. For more information, see that command's documentation. @node External Lisp @@ -1555,13 +1555,13 @@ whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}. evaluated. To begin an external Lisp session, type @kbd{M-x run-lisp}. This runs the program named @command{lisp}, and sets it up so that both input and output go through an Emacs buffer named -@samp{*inferior-lisp*}. To change the name of the Lisp program run by +@file{*inferior-lisp*}. To change the name of the Lisp program run by @kbd{M-x run-lisp}, change the variable @code{inferior-lisp-program}. - The major mode for the @samp{*lisp*} buffer is Inferior Lisp mode, + The major mode for the @file{*lisp*} buffer is Inferior Lisp mode, which combines the characteristics of Lisp mode and Shell mode (@pxref{Shell Mode}). To send input to the Lisp session, go to the -end of the @samp{*lisp*} buffer and type the input, followed by +end of the @file{*lisp*} buffer and type the input, followed by @key{RET}. Terminal output from the Lisp session is automatically inserted in the buffer. @@ -1572,7 +1572,7 @@ inserted in the buffer. buffer to a Lisp session that you had started with @kbd{M-x run-lisp}. The expression sent is the top-level Lisp expression at or following point. The resulting value goes as usual into the -@samp{*inferior-lisp*} buffer. Note that the effect of @kbd{C-M-x} in +@file{*inferior-lisp*} buffer. Note that the effect of @kbd{C-M-x} in Lisp mode is thus very similar to its effect in Emacs Lisp mode (@pxref{Lisp Eval}), except that the expression is sent to a different Lisp environment instead of being evaluated in Emacs. @@ -1587,4 +1587,4 @@ to a Scheme subprocess, are very similar. Scheme source files are edited in Scheme mode, which can be explicitly enabled with @kbd{M-x scheme-mode}. You can initiate a Scheme session by typing @kbd{M-x run-scheme} (the buffer for interacting with Scheme is named -@samp{*scheme*}), and send expressions to it by typing @kbd{C-M-x}. +@file{*scheme*}), and send expressions to it by typing @kbd{C-M-x}. diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 00730cc6510..4c6d6ef7bad 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -157,7 +157,7 @@ Evaluate Lisp expression @var{expression}. @item --insert=@var{file} @opindex --insert @cindex insert file contents, command-line argument -Insert the contents of @var{file} into the @samp{*scratch*} buffer +Insert the contents of @var{file} into the @file{*scratch*} buffer (@pxref{Lisp Interaction}). This is like what @kbd{M-x insert-file} does (@pxref{Misc File Ops}). @@ -849,8 +849,8 @@ emacs -ms coral -cr 'slate blue' & You can reverse the foreground and background colors through the @samp{-rv} option or with the X resource @samp{reverseVideo}. - The @samp{-fg}, @samp{-bg}, and @samp{-rv} options function on -text-only terminals as well as on graphical displays. + The @samp{-fg}, @samp{-bg}, and @samp{-rv} options function on text +terminals as well as on graphical displays. @node Window Size X @appendixsec Options for Window Size and Position diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi index f2a71b045f8..3285b65e57b 100644 --- a/doc/emacs/commands.texi +++ b/doc/emacs/commands.texi @@ -62,7 +62,7 @@ starting with @key{ESC}. Thus, you can enter @kbd{M-a} by typing C-a}. Unlike @key{Meta}, @key{ESC} is entered as a separate character. You don't hold down @key{ESC} while typing the next character; instead, press @key{ESC} and release it, then enter the -next character. This feature is useful on certain text-only terminals +next character. This feature is useful on certain text terminals where the @key{Meta} key does not function reliably. @cindex keys stolen by window manager diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index a00423a5826..72b4961e209 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -561,7 +561,7 @@ format of a theme file and how to make one. @vindex custom-theme-directory @cindex color scheme Type @kbd{M-x customize-themes} to switch to a buffer named -@samp{*Custom Themes*}, which lists the Custom themes that Emacs knows +@file{*Custom Themes*}, which lists the Custom themes that Emacs knows about. By default, Emacs looks for theme files in two locations: the directory specified by the variable @code{custom-theme-directory} (which defaults to @file{~/.emacs.d/}), and a directory named @@ -580,11 +580,11 @@ add the directory name to the list variable @code{custom-theme-directory} has the special meaning of the value of the variable @code{custom-theme-directory}, while @code{t} stands for the built-in theme directory @file{etc/themes}. The themes listed in -the @samp{*Custom Themes*} buffer are those found in the directories +the @file{*Custom Themes*} buffer are those found in the directories specified by @code{custom-theme-load-path}. @kindex C-x C-s @r{(Custom Themes buffer)} - In the @samp{*Custom Themes*} buffer, you can activate the checkbox + In the @file{*Custom Themes*} buffer, you can activate the checkbox next to a Custom theme to enable or disable the theme for the current Emacs session. When a Custom theme is enabled, all of its settings (variables and faces) take effect in the Emacs session. To apply the @@ -608,7 +608,7 @@ always considered safe. Setting or saving Custom themes actually works by customizing the variable @code{custom-enabled-themes}. The value of this variable is a list of Custom theme names (as Lisp symbols, e.g.@: @code{tango}). -Instead of using the @samp{*Custom Themes*} buffer to set +Instead of using the @file{*Custom Themes*} buffer to set @code{custom-enabled-themes}, you can customize the variable using the usual customization interface, e.g.@: with @kbd{M-x customize-option}. Note that Custom themes are not allowed to set @@ -635,7 +635,7 @@ type @kbd{M-x disable-theme}. @findex describe-theme To see a description of a Custom theme, type @kbd{?} on its line in -the @samp{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} +the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme} anywhere in Emacs and enter the theme name in the minibuffer. @node Creating Custom Themes @@ -645,12 +645,12 @@ anywhere in Emacs and enter the theme name in the minibuffer. @findex customize-create-theme You can define a Custom theme using an interface similar to the customization buffer, by typing @kbd{M-x customize-create-theme}. -This switches to a buffer named @samp{*Custom Theme*}. It also offers +This switches to a buffer named @file{*Custom Theme*}. It also offers to insert some common Emacs faces into the theme (a convenience, since Custom themes are often used to customize faces). If you answer no, the theme will initially contain no settings. - Near the top of the @samp{*Custom Theme*} buffer are editable fields + Near the top of the @file{*Custom Theme*} buffer are editable fields where you can enter the theme's name and description. The name can be anything except @samp{user}. The description is the one that will be shown when you invoke @kbd{M-x describe-theme} for the theme. Its @@ -673,7 +673,7 @@ theme, uncheck the checkbox next to its name. @file{@var{name}-theme.el} where @var{name} is the theme name, in the directory named by @code{custom-theme-directory}. - From the @samp{*Custom Theme*} buffer, you can view and edit an + From the @file{*Custom Theme*} buffer, you can view and edit an existing Custom theme by activating the @samp{[Visit Theme]} button and specifying the theme name. You can also add the settings of another theme into the buffer, using the @samp{[Merge Theme]} button. @@ -683,10 +683,9 @@ the @samp{[Merge Theme]} button and specifying the special theme named A theme file is simply an Emacs Lisp source file, and loading the Custom theme works by loading the Lisp file. Therefore, you can edit -a theme file directly instead of using the @samp{*Custom Theme*} -buffer. -@c Add link to the relevant Emacs Lisp Reference manual node, once -@c that is written. +a theme file directly instead of using the @file{*Custom Theme*} +buffer. @xref{Custom Themes,,, elisp, The Emacs Lisp Reference +Manual}, for details. @node Variables @section Variables @@ -809,7 +808,7 @@ can set any variable with a Lisp expression like this: @noindent To execute such an expression, type @kbd{M-:} (@code{eval-expression}) and enter the expression in the minibuffer (@pxref{Lisp Eval}). -Alternatively, go to the @samp{*scratch*} buffer, type in the +Alternatively, go to the @file{*scratch*} buffer, type in the expression, and then type @kbd{C-j} (@pxref{Lisp Interaction}). Setting variables, like all means of customizing Emacs except where @@ -1163,8 +1162,8 @@ returned by that expression is ignored). conversion of this file. @xref{Coding Systems}. @item -@code{unibyte} says to visit the file in a unibyte buffer, if the -value is @code{t}. @xref{Enabling Multibyte}. +@code{unibyte} says to load or compile a file of Emacs Lisp in unibyte +mode, if the value is @code{t}. @xref{Disabling Multibyte}. @end itemize @noindent diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 54dbc0a78e1..da33d352698 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -286,8 +286,8 @@ scrolling whenever point moves off the left or right edge of the screen. To disable automatic horizontal scrolling, set the variable @code{auto-hscroll-mode} to @code{nil}. Note that when the automatic horizontal scrolling is turned off, if point moves off the edge of the -screen, the cursor disappears to indicate that. (On text-only -terminals, the cursor is left at the edge instead.) +screen, the cursor disappears to indicate that. (On text terminals, +the cursor is left at the edge instead.) @vindex hscroll-margin The variable @code{hscroll-margin} controls how close point can get @@ -479,9 +479,9 @@ prompts for a regular expression, and displays only faces with names matching that regular expression (@pxref{Regexps}). It's possible for a given face to look different in different -frames. For instance, some text-only terminals do not support all -face attributes, particularly font, height, and width, and some -support a limited range of colors. +frames. For instance, some text terminals do not support all face +attributes, particularly font, height, and width, and some support a +limited range of colors. @cindex background color @cindex default face @@ -529,13 +529,13 @@ or an @dfn{RGB triplet}. @samp{medium sea green}. To view a list of color names, type @kbd{M-x list-colors-display}. To control the order in which colors are shown, customize @code{list-colors-sort}. If you run this command on a -graphical display, it shows the full range of color names known to Emacs -(these are the standard X11 color names, defined in X's @file{rgb.txt} -file). If you run the command on a text-only terminal, it shows only a -small subset of colors that can be safely displayed on such terminals. -However, Emacs understands X11 color names even on text-only terminals; -if a face is given a color specified by an X11 color name, it is -displayed using the closest-matching terminal color. +graphical display, it shows the full range of color names known to +Emacs (these are the standard X11 color names, defined in X's +@file{rgb.txt} file). If you run the command on a text terminal, it +shows only a small subset of colors that can be safely displayed on +such terminals. However, Emacs understands X11 color names even on +text terminals; if a face is given a color specified by an X11 color +name, it is displayed using the closest-matching terminal color. An RGB triplet is a string of the form @samp{#RRGGBB}. Each of the R, G, and B components is a hexadecimal number specifying the @@ -651,8 +651,8 @@ at the top of a window just as the mode line appears at the bottom. Most windows do not have a header line---only some special modes, such Info mode, create one. @item vertical-border -This face is used for the vertical divider between windows on -text-only terminals. +This face is used for the vertical divider between windows on text +terminals. @item minibuffer-prompt @cindex @code{minibuffer-prompt} face @vindex minibuffer-prompt-properties @@ -679,9 +679,9 @@ This face determines the color of the mouse pointer. @end table The following faces likewise control the appearance of parts of the -Emacs frame, but only on text-only terminals, or when Emacs is built -on X with no toolkit support. (For all other cases, the appearance of -the respective frame elements is determined by system-wide settings.) +Emacs frame, but only on text terminals, or when Emacs is built on X +with no toolkit support. (For all other cases, the appearance of the +respective frame elements is determined by system-wide settings.) @table @code @item scroll-bar @@ -1453,9 +1453,9 @@ global-hl-line-mode} enables or disables the same mode globally. Emacs can display long lines by @dfn{truncation}. This means that all the characters that do not fit in the width of the screen or window do not appear at all. On graphical displays, a small straight arrow in -the fringe indicates truncation at either end of the line. On -text-only terminals, this is indicated with @samp{$} signs in the -leftmost and/or rightmost columns. +the fringe indicates truncation at either end of the line. On text +terminals, this is indicated with @samp{$} signs in the leftmost +and/or rightmost columns. @vindex truncate-lines @findex toggle-truncate-lines @@ -1577,7 +1577,7 @@ of an overline above the text, including the height of the overline itself, in pixels; the default is 2. @findex tty-suppress-bold-inverse-default-colors - On some text-only terminals, bold face and inverse video together -result in text that is hard to read. Call the function + On some text terminals, bold face and inverse video together result +in text that is hard to read. Call the function @code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} argument to suppress the effect of bold-face in this case. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 152fa73edea..25e5bb2af0d 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -511,12 +511,12 @@ Frames and Graphical Displays * Tooltips:: Displaying information at the current mouse position. * Mouse Avoidance:: Moving the mouse pointer out of the way. * Non-Window Terminals:: Multiple frames on terminals that show only one. -* Text-Only Mouse:: Using the mouse in text-only terminals. +* Text-Only Mouse:: Using the mouse in text terminals. International Character Set Support * International Chars:: Basic concepts of multibyte characters. -* Enabling Multibyte:: Controlling whether to use multibyte characters. +* Disabling Multibyte:: Controlling whether to use multibyte characters. * Language Environments:: Setting things up for the language you use. * Input Methods:: Entering text characters not on your keyboard. * Select Input Method:: Specifying your choice of input methods. diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi index ba7f3132b6b..3ec51ddfb60 100644 --- a/doc/emacs/entering.texi +++ b/doc/emacs/entering.texi @@ -63,7 +63,7 @@ certain Lisp files, where to put the initial frame, and so forth. If the variable @code{inhibit-startup-screen} is non-@code{nil}, Emacs does not display the startup screen. In that case, if one or more files were specified on the command line, Emacs simply displays -those files; otherwise, it displays a buffer named @samp{*scratch*}, +those files; otherwise, it displays a buffer named @file{*scratch*}, which can be used to evaluate Emacs Lisp expressions interactively. @xref{Lisp Interaction}. You can set the variable @code{inhibit-startup-screen} using the Customize facility @@ -77,9 +77,13 @@ information about @file{site-start.el}.} by setting the variable @code{initial-buffer-choice} to a non-@code{nil} value. (In that case, even if you specify one or more files on the command line, Emacs opens but does not display them.) -The value of @code{initial-buffer-choice} can be either the name of -the desired file or directory, or @code{t}, which means to display the -@samp{*scratch*} buffer. +The value of @code{initial-buffer-choice} should be the name of +the desired file or directory. +@ignore +@c I do not think this should be mentioned. AFAICS it is just a dodge +@c around inhibit-startup-screen not being settable on a site-wide basis. +or @code{t}, which means to display the @file{*scratch*} buffer. +@end ignore @node Exiting, Basic, Entering Emacs, Top @section Exiting Emacs @@ -144,14 +148,14 @@ stopping the program temporarily and returning control to the parent process (usually a shell); in most shells, you can resume Emacs after suspending it with the shell command @command{%emacs}. - Text-only terminals usually listen for certain special characters -whose meaning is to kill or suspend the program you are running. -@b{This terminal feature is turned off while you are in Emacs.} The -meanings of @kbd{C-z} and @kbd{C-x C-c} as keys in Emacs were inspired -by the use of @kbd{C-z} and @kbd{C-c} on several operating systems as -the characters for stopping or killing a program, but that is their -only relationship with the operating system. You can customize these -keys to run any commands of your choice (@pxref{Keymaps}). + Text terminals usually listen for certain special characters whose +meaning is to kill or suspend the program you are running. @b{This +terminal feature is turned off while you are in Emacs.} The meanings +of @kbd{C-z} and @kbd{C-x C-c} as keys in Emacs were inspired by the +use of @kbd{C-z} and @kbd{C-c} on several operating systems as the +characters for stopping or killing a program, but that is their only +relationship with the operating system. You can customize these keys +to run any commands of your choice (@pxref{Keymaps}). @ifnottex @lowersections diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index b0d4e130c67..10ba9ed1fa6 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -976,7 +976,7 @@ are not visiting files are auto-saved only if you request it explicitly; when they are auto-saved, the auto-save file name is made by appending @samp{#} to the front and rear of buffer name, then adding digits and letters at the end for uniqueness. For -example, the @samp{*mail*} buffer in which you compose messages to be +example, the @file{*mail*} buffer in which you compose messages to be sent might be auto-saved in a file named @file{#*mail*#704juu}. Auto-save file names are made this way unless you reprogram parts of Emacs to do something different (the functions @code{make-auto-save-file-name} and @@ -1245,7 +1245,7 @@ for more information about using the Trash. @vindex diff-switches The command @kbd{M-x diff} prompts for two file names, using the minibuffer, and displays the differences between the two files in a -buffer named @samp{*diff*}. This works by running the @command{diff} +buffer named @file{*diff*}. This works by running the @command{diff} program, using options taken from the variable @code{diff-switches}. The value of @code{diff-switches} should be a string; the default is @code{"-c"} to specify a context diff. @xref{Top,, Diff, diff, @@ -1853,7 +1853,7 @@ When typing a file name in the minibuffer, @kbd{C-@key{tab}} (@code{file-cache-minibuffer-complete}) completes it using the file name cache. If you repeat @kbd{C-@key{tab}}, that cycles through the possible completions of what you had originally typed. (However, note -that the @kbd{C-@key{tab}} character cannot be typed on most text-only +that the @kbd{C-@key{tab}} character cannot be typed on most text terminals.) The file name cache does not fill up automatically. Instead, you diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi index 16feb939b33..85fac2b146b 100644 --- a/doc/emacs/fixit.texi +++ b/doc/emacs/fixit.texi @@ -57,9 +57,9 @@ Undo one entry in the current buffer's undo records (@code{undo}). @kbd{C-x u})@footnote{Aside from @kbd{C-/}, the @code{undo} command is also bound to @kbd{C-x u} because that is more straightforward for beginners to remember: @samp{u} stands for ``undo''. It is also bound -to @kbd{C-_} because typing @kbd{C-/} on some text-only terminals -actually enters @kbd{C-_}.}. This undoes the most recent change in -the buffer, and moves point back to where it was before that change. +to @kbd{C-_} because typing @kbd{C-/} on some text terminals actually +enters @kbd{C-_}.}. This undoes the most recent change in the buffer, +and moves point back to where it was before that change. Consecutive repetitions of @kbd{C-/} (or its aliases) undo earlier and earlier changes in the current buffer. If all the recorded diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 4cfaffdadb8..9e9909e8bca 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -27,13 +27,12 @@ displays (@pxref{Exiting}). To close just the selected frame, type This chapter describes Emacs features specific to graphical displays (particularly mouse commands), and features for managing multiple -frames. On text-only terminals, many of these features are -unavailable. However, it is still possible to create multiple -``frames'' on text-only terminals; such frames are displayed one at a -time, filling the entire terminal screen (@pxref{Non-Window -Terminals}). It is also possible to use the mouse on some text-only -terminals (@pxref{Text-Only Mouse}, for doing so on GNU and Unix -systems; and +frames. On text terminals, many of these features are unavailable. +However, it is still possible to create multiple ``frames'' on text +terminals; such frames are displayed one at a time, filling the entire +terminal screen (@pxref{Non-Window Terminals}). It is also possible +to use the mouse on some text terminals (@pxref{Text-Only Mouse}, for +doing so on GNU and Unix systems; and @iftex @pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}, @end iftex @@ -62,7 +61,7 @@ for doing so on MS-DOS). * Tooltips:: Displaying information at the current mouse position. * Mouse Avoidance:: Preventing the mouse pointer from obscuring text. * Non-Window Terminals:: Multiple frames on terminals that show only one. -* Text-Only Mouse:: Using the mouse in text-only terminals. +* Text-Only Mouse:: Using the mouse in text terminals. @end menu @node Mouse Commands @@ -257,7 +256,7 @@ highlighting. @key{RET}, or by clicking either @kbd{Mouse-1} or @kbd{Mouse-2} on the button. For example, in a Dired buffer, each file name is a button; activating it causes Emacs to visit that file (@pxref{Dired}). In a -@samp{*Compilation*} buffer, each error message is a button, and +@file{*Compilation*} buffer, each error message is a button, and activating it visits the source code for that error (@pxref{Compilation}). @@ -465,9 +464,9 @@ the ordinary, interactive frames are deleted. In this case, @kbd{C-x The @kbd{C-x 5 1} (@code{delete-other-frames}) command deletes all other frames on the current terminal (this terminal refers to either a -graphical display, or a text-only terminal; @pxref{Non-Window -Terminals}). If the Emacs session has frames open on other graphical -displays or text terminals, those are not deleted. +graphical display, or a text terminal; @pxref{Non-Window Terminals}). +If the Emacs session has frames open on other graphical displays or +text terminals, those are not deleted. @vindex focus-follows-mouse The @kbd{C-x 5 o} (@code{other-frame}) command selects the next @@ -908,7 +907,7 @@ scroll bars on the right side of windows), @code{left} (put them on the left), or @code{nil} (disable scroll bars). By default, Emacs puts scroll bars on the right if it was compiled with GTK+ support on the X Window System, and on MS-Windows or Mac OS; Emacs puts scroll -bars on the left if compiled on the X Window system without GTK+ +bars on the left if compiled on the X Window System without GTK+ support (following the old convention for X applications). @vindex scroll-bar-width @@ -953,7 +952,7 @@ the use of menu bars at startup, customize the variable @code{menu-bar-mode}. @kindex C-Mouse-3 @r{(when menu bar is disabled)} - Expert users often turn off the menu bar, especially on text-only + Expert users often turn off the menu bar, especially on text terminals, where this makes one additional line available for text. If the menu bar is off, you can still pop up a menu of its contents with @kbd{C-Mouse-3} on a display which supports pop-up menus. @@ -1112,9 +1111,9 @@ raises the frame. @node Non-Window Terminals @section Non-Window Terminals -@cindex text-only terminal +@cindex text terminal - On a text-only terminal, Emacs can display only one Emacs frame at a + On a text terminal, Emacs can display only one Emacs frame at a time. However, you can still create multiple Emacs frames, and switch between them. Switching frames on these terminals is much like switching between different window configurations. @@ -1139,11 +1138,11 @@ to select a frame according to its name. The name you specify appears in the mode line when the frame is selected. @node Text-Only Mouse -@section Using a Mouse in Text-only Terminals +@section Using a Mouse in Text Terminals @cindex mouse support @cindex terminal emulators, mouse support -Some text-only terminals support mouse clicks in the terminal window. +Some text terminals support mouse clicks in the terminal window. @cindex xterm In a terminal emulator which is compatible with @command{xterm}, you diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index f4ea4f30cd5..44c59eea668 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -181,7 +181,7 @@ Emacs supports a number of character sets, each of which represents a particular alphabet or script. @xref{International}. @item Character Terminal -@xref{Glossary - Text-only Terminal}. +@xref{Glossary - Text Terminal}. @item Click Event A click event is the kind of input event (q.v.@:) generated when you @@ -193,7 +193,7 @@ press a mouse button and release it without moving the mouse. @item Clipboard A clipboard is a buffer provided by the window system for transferring -text between applications. On the X Window system, the clipboard is +text between applications. On the X Window System, the clipboard is provided in addition to the primary selection (q.v.@:); on MS-Windows and Mac, the clipboard is used @emph{instead} of the primary selection. @xref{Clipboard}. @@ -421,7 +421,7 @@ tell it to. @xref{Bugs}. The echo area is the bottom line of the screen, used for echoing the arguments to commands, for asking questions, and showing brief messages (including error messages). The messages are stored in the buffer -@samp{*Messages*} so you can review them later. @xref{Echo Area}. +@file{*Messages*} so you can review them later. @xref{Echo Area}. @item Echoing Echoing is acknowledging the receipt of input events by displaying @@ -1329,12 +1329,12 @@ Data consisting of written human language (as opposed to programs), or following the stylistic conventions of human language. @end itemize -@anchor{Glossary - Text-only Terminal} -@item Text-only Terminal -A text-only terminal is a display that is limited to displaying text in -character units. Such a terminal cannot control individual pixels it -displays. Emacs supports a subset of display features on text-only -terminals. +@anchor{Glossary - Text Terminal} +@item Text Terminal +A text terminal, or character terminal, is a display that is limited +to displaying text in character units. Such a terminal cannot control +individual pixels it displays. Emacs supports a subset of display +features on text terminals. @item Text Properties Text properties are annotations recorded for particular characters in @@ -1384,7 +1384,7 @@ displaying it. @xref{Continuation Lines,Truncation}, and @ref{Glossary - Continuation Line}. @item TTY -@xref{Glossary - Text-only Terminal}. +@xref{Glossary - Text Terminal}. @item Undoing Undoing means making your previous editing go in reverse, bringing diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index 84da0a9a681..eef38136583 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi @@ -102,7 +102,7 @@ to (@code{describe-key-briefly}). Here @kbd{c} stands for Display the commands and variables whose documentation matches @var{topics} (@code{apropos-documentation}). @item C-h e -Display the @code{*Messages*} buffer +Display the @file{*Messages*} buffer (@code{view-echo-area-messages}). @item C-h f @var{function} @key{RET} Display documentation on the Lisp function named @var{function} @@ -168,7 +168,7 @@ programming language you are editing (@code{info-lookup-symbol}). @item C-h . Display the help message for a special text area, if point is in one (@code{display-local-help}). (These include, for example, links in -@samp{*Help*} buffers.) +@file{*Help*} buffers.) @end table @node Key Help @@ -519,7 +519,7 @@ use @kbd{C-h c} to find out what they do. @findex view-echo-area-messages To review recent echo area messages, use @kbd{C-h e} (@code{view-echo-area-messages}). This displays the buffer -@code{*Messages*}, where those messages are kept. +@file{*Messages*}, where those messages are kept. @kindex C-h m @findex describe-mode diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index 10293fe7747..695f8f9c6c3 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -142,7 +142,7 @@ Emacs open a file. A typical reason for this would be a user double-clicking a file in the Finder application. By default, Emacs responds to this event by opening a new frame and visiting the file in that frame (@code{ns-find-file}). As an exception, if the selected -buffer is the @samp{*scratch*} buffer, Emacs visits the file in the +buffer is the @file{*scratch*} buffer, Emacs visits the file in the selected frame. You can change how Emacs responds to a @code{ns-open-file} event by diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index e812c9112df..9d56b3bdc6e 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -477,7 +477,7 @@ If every work file in the VC fileset is unchanged, do nothing. @item If every work file in the VC fileset has been modified, commit the -changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the +changes. To do this, Emacs pops up a @file{*vc-log*} buffer; type the desired log entry for the new revision, followed by @kbd{C-c C-c} to commit. @xref{Log Buffer}. @@ -530,7 +530,7 @@ so that you can begin to edit it. @item If each file is locked by you and contains changes, commit the -changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the +changes. To do this, Emacs pops up a @file{*vc-log*} buffer; type the desired log entry for the new revision, followed by @kbd{C-c C-c} to commit (@pxref{Log Buffer}). @@ -588,7 +588,7 @@ they use the concept of ``checking out'' individual files. @cindex C-c C-c @r{(Log Edit mode)} @findex log-edit-done When you tell VC to commit a change, it pops up a buffer named -@samp{*vc-log*}. In this buffer, you should write a @dfn{log entry} +@file{*vc-log*}. In this buffer, you should write a @dfn{log entry} describing the changes you have made (@pxref{Why Version Control?}). After you are done, type @kbd{C-c C-c} (@code{log-edit-done}) to exit the buffer and commit the change, together with your log entry. @@ -596,12 +596,12 @@ the buffer and commit the change, together with your log entry. @cindex Log Edit mode @cindex mode, Log Edit @vindex vc-log-mode-hook - The major mode for the @samp{*vc-log*} buffer is Log Edit mode, a + The major mode for the @file{*vc-log*} buffer is Log Edit mode, a variant of Text mode (@pxref{Text Mode}). On entering Log Edit mode, Emacs runs the hooks @code{text-mode-hook} and @code{vc-log-mode-hook} (@pxref{Hooks}). - In the @samp{*vc-log*} buffer, you can write one or more @dfn{header + In the @file{*vc-log*} buffer, you can write one or more @dfn{header lines}, specifying additional information to be supplied to the version control system. Each header line must occupy a single line at the top of the buffer; the first line that is not a header line is @@ -626,7 +626,7 @@ support it, the header is treated as part of the log entry. @findex log-edit-show-files @kindex C-c C-d @r{(Log Edit mode)} @findex log-edit-show-diff - While in the @samp{*vc-log*} buffer, the ``current VC fileset'' is + While in the @file{*vc-log*} buffer, the ``current VC fileset'' is considered to be the fileset that will be committed if you type @w{@kbd{C-c C-c}}. To view a list of the files in the VC fileset, type @w{@kbd{C-c C-f}} (@code{log-edit-show-files}). To view a diff @@ -639,7 +639,7 @@ started editing (@pxref{Old Revisions}), type @kbd{C-c C-d} If the VC fileset includes one or more @file{ChangeLog} files (@pxref{Change Log}), type @kbd{C-c C-a} (@code{log-edit-insert-changelog}) to pull the relevant entries into -the @samp{*vc-log*} buffer. If the topmost item in each +the @file{*vc-log*} buffer. If the topmost item in each @file{ChangeLog} was made under your user name on the current date, this command searches that item for entries matching the file(s) to be committed, and inserts them. @@ -652,7 +652,7 @@ Edit buffer. To abort a commit, just @strong{don't} type @kbd{C-c C-c} in that buffer. You can switch buffers and do other editing. As long as you don't try to make another commit, the entry you were editing remains -in the @samp{*vc-log*} buffer, and you can go back to that buffer at +in the @file{*vc-log*} buffer, and you can go back to that buffer at any time to complete the commit. @kindex M-n @r{(Log Edit mode)} @@ -904,10 +904,10 @@ Display the changes that will be sent by the next push operation @kindex C-x v l @findex vc-print-log The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer -named @samp{*vc-change-log*}, showing the history of changes made to +named @file{*vc-change-log*}, showing the history of changes made to the current file, including who made the changes, the dates, and the log entry for each change (these are the same log entries you would -enter via the @samp{*vc-log*} buffer; @pxref{Log Buffer}). Point is +enter via the @file{*vc-log*} buffer; @pxref{Log Buffer}). Point is centered at the revision of the file currently being visited. With a prefix argument, the command prompts for the revision to center on, and the maximum number of revisions to display. @@ -919,7 +919,7 @@ file listed on the current line. @findex vc-print-root-log @findex log-view-toggle-entry-display @kbd{C-x v L} (@code{vc-print-root-log}) displays a -@samp{*vc-change-log*} buffer showing the history of the entire +@file{*vc-change-log*} buffer showing the history of the entire version-controlled directory tree (RCS, SCCS, and CVS do not support this feature). With a prefix argument, the command prompts for the maximum number of revisions to display. @@ -927,7 +927,7 @@ maximum number of revisions to display. The @kbd{C-x v L} history is shown in a compact form, usually showing only the first line of each log entry. However, you can type @key{RET} (@code{log-view-toggle-entry-display}) in the -@samp{*vc-change-log*} buffer to reveal the entire log entry for the +@file{*vc-change-log*} buffer to reveal the entire log entry for the revision at point. A second @key{RET} hides it again. On a decentralized version control system, the @kbd{C-x v I} @@ -942,7 +942,7 @@ specific repository. Similarly, @kbd{C-x v O} another repository, the next time you run the ``push'' command; with a prefix argument, it prompts for a specific destination repository. - In the @samp{*vc-change-log*} buffer, you can use the following keys + In the @file{*vc-change-log*} buffer, you can use the following keys to move between the logs of revisions and of files, and to examine and compare past revisions (@pxref{Old Revisions}): @@ -993,11 +993,11 @@ revision at point. @vindex vc-log-show-limit Because fetching many log entries can be slow, the -@samp{*vc-change-log*} buffer displays no more than 2000 revisions by +@file{*vc-change-log*} buffer displays no more than 2000 revisions by default. The variable @code{vc-log-show-limit} specifies this limit; if you set the value to zero, that removes the limit. You can also increase the number of revisions shown in an existing -@samp{*vc-change-log*} buffer by clicking on the @samp{Show 2X +@file{*vc-change-log*} buffer by clicking on the @samp{Show 2X entries} or @samp{Show unlimited entries} buttons at the end of the buffer. However, RCS, SCCS, and CVS do not support this feature. @@ -1045,7 +1045,7 @@ it is used to specify multi-file VC filesets for commands like To use the VC Directory buffer, type @kbd{C-x v d} (@code{vc-dir}). This reads a directory name using the minibuffer, and switches to a VC Directory buffer for that directory. By default, the buffer is named -@samp{*vc-dir*}. Its contents are described +@file{*vc-dir*}. Its contents are described @iftex below. @end iftex diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index e20d5a347cd..e498516ae7f 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -197,7 +197,7 @@ set the variable @code{enable-recursive-minibuffers} to @code{t}. @findex minibuffer-inactive-mode When not active, the minibuffer is in @code{minibuffer-inactive-mode}, -and clicking @kbd{Mouse-1} there shows the @samp{*Messages*} buffer. +and clicking @kbd{Mouse-1} there shows the @file{*Messages*} buffer. If you use a dedicated frame for minibuffers, Emacs also recognizes certain keys there, for example @kbd{n} to make a new frame. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 84b9d6ee03b..50b68767991 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -92,7 +92,7 @@ file named @file{.newsrc} in your home directory which lists your Usenet newsgroups and subscriptions (this file is not unique to Gnus; it is used by many other newsreader programs). It then tries to contact the system's default news server, which is typically specified -by the @samp{NNTPSERVER} environment variable. +by the @env{NNTPSERVER} environment variable. If your system does not have a default news server, or if you wish to use Gnus for reading email, then before invoking @kbd{M-x gnus} you @@ -507,7 +507,7 @@ minibuffer and executes it as a shell command, in a subshell made just for that command. Standard input for the command comes from the null device. If the shell command produces any output, the output appears either in the echo area (if it is short), or in an Emacs buffer named -@samp{*Shell Command Output*}, displayed in another window (if the +@file{*Shell Command Output*}, displayed in another window (if the output is long). For instance, one way to decompress a file named @file{foo.gz} is to @@ -554,7 +554,7 @@ old region and replaces it with the output from the shell command. see what keys are in the buffer. If the buffer contains a GnuPG key, type @kbd{C-x h M-| gpg @key{RET}} to feed the entire buffer contents to @command{gpg}. This will output the list of keys to the -@samp{*Shell Command Output*} buffer. +@file{*Shell Command Output*} buffer. @vindex shell-file-name The above commands use the shell specified by the variable @@ -577,7 +577,7 @@ inserted into a buffer of that name. @findex shell To run a subshell interactively, type @kbd{M-x shell}. This creates -(or reuses) a buffer named @samp{*shell*}, and runs a shell subprocess +(or reuses) a buffer named @file{*shell*}, and runs a shell subprocess with input coming from and output going to that buffer. That is to say, any terminal output from the subshell goes into the buffer, advancing point, and any terminal input for the subshell comes from @@ -600,8 +600,8 @@ easier to distinguish input lines from the shell output. To make multiple subshells, invoke @kbd{M-x shell} with a prefix argument (e.g. @kbd{C-u M-x shell}). Then the command will read a buffer name, and create (or reuse) a subshell in that buffer. You can -also rename the @samp{*shell*} buffer using @kbd{M-x rename-uniquely}, -then create a new @samp{*shell*} buffer using plain @kbd{M-x shell}. +also rename the @file{*shell*} buffer using @kbd{M-x rename-uniquely}, +then create a new @file{*shell*} buffer using plain @kbd{M-x shell}. Subshells in different buffers run independently and in parallel. @vindex explicit-shell-file-name @@ -1183,7 +1183,7 @@ underlying shell, of course. @findex term To run a subshell in a terminal emulator, use @kbd{M-x term}. This -creates (or reuses) a buffer named @samp{*terminal*}, and runs a +creates (or reuses) a buffer named @file{*terminal*}, and runs a subshell with input coming from your keyboard, and output going to that buffer. @@ -1212,7 +1212,7 @@ serial port. @xref{Serial Terminal}. The file name used to load the subshell is determined the same way as for Shell mode. To make multiple terminal emulators, rename the -buffer @samp{*terminal*} to something different using @kbd{M-x +buffer @file{*terminal*} to something different using @kbd{M-x rename-uniquely}, just as with Shell mode. Unlike Shell mode, Term mode does not track the current directory by @@ -1405,7 +1405,7 @@ signaled.) Currently, this feature is mainly useful for developers. the shell command @samp{emacsclient @var{file}}, where @var{file} is a file name. This connects to an Emacs server, and tells that Emacs process to visit @var{file} in one of its existing frames---either a -graphical frame, or one in a text-only terminal (@pxref{Frames}). You +graphical frame, or one in a text terminal (@pxref{Frames}). You can then select that frame to begin editing. If there is no Emacs server, the @command{emacsclient} program halts @@ -1415,12 +1415,12 @@ Server})---then Emacs opens a frame on the terminal in which you called @command{emacsclient}. You can also force @command{emacsclient} to open a new frame on a -graphical display, or on a text-only terminal, using the @samp{-c} and +graphical display, or on a text terminal, using the @samp{-c} and @samp{-t} options. @xref{emacsclient Options}. - If you are running on a single text-only terminal, you can switch -between @command{emacsclient}'s shell and the Emacs server using one -of two methods: (i) run the Emacs server and @command{emacsclient} on + If you are running on a single text terminal, you can switch between +@command{emacsclient}'s shell and the Emacs server using one of two +methods: (i) run the Emacs server and @command{emacsclient} on different virtual terminals, and switch to the Emacs server's virtual terminal after calling @command{emacsclient}; or (ii) call @command{emacsclient} from within the Emacs server itself, using Shell @@ -1502,16 +1502,24 @@ The environment variable @env{ALTERNATE_EDITOR} has the same effect as the @samp{-a} option. If both are present, the latter takes precedence. +@cindex client frame @item -c -Create a new graphical frame, instead of using an existing Emacs -frame. Emacs can create a graphical frame even if it was started in a -text-only terminal, provided it is able to connect to a graphical -display. If Emacs is unable to connect to a graphical display, and on -systems, such as MS-Windows (@pxref{Windows Startup, emacsclient}), -where it cannot create graphical frames when started from a text-only -terminal, it creates a new text-only terminal frame (@pxref{Frames}). -If you omit a filename argument while supplying the @samp{-c} option, -the new frame displays the @samp{*scratch*} buffer (@pxref{Buffers}). +Create a new graphical @dfn{client frame}, instead of using an +existing Emacs frame. If you omit a filename argument while supplying +the @samp{-c} option, the new frame displays the @file{*scratch*} +buffer (@pxref{Buffers}). See below for the special behavior of +@kbd{C-x C-c} in a client frame. + +If Emacs is unable to create a new graphical frame (e.g.@: if it is +unable to connect to the X server), it tries to create a text terminal +client frame, as though you had supplied the @samp{-t} option instead +(see below). + +On MS-Windows, a single Emacs session cannot display frames on both +graphical and text terminals, nor on multiple text terminals. Thus, +if the Emacs server is running on a text terminal, the @samp{-c} +option, like the @samp{-t} option, creates a new frame in the server's +current text terminal. @xref{Windows Startup}. @item -F @var{alist} @itemx --frame-parameters=@var{alist} @@ -1593,28 +1601,46 @@ server it finds. (This option is not supported on MS-Windows.) @item -t @itemx --tty @itemx -nw -Create a new Emacs frame on the current text-only terminal, instead of -using an existing Emacs frame. Emacs can open a text-only terminal -even if it was started in another text-only terminal, or on a -graphical display. On systems, such as MS-Windows, where this is -impossible, Emacs will create a new frame, either GUI or text-only, on -the same terminal where it was started (@pxref{Windows Startup, -emacsclient}). If you omit a filename argument while supplying this -option, the new frame displays the @samp{*scratch*} buffer. -@xref{Buffers}. +Create a new client frame on the current text terminal, instead of +using an existing Emacs frame. This is similar to the @samp{-c} +option, above, except that it creates a text terminal frame +(@pxref{Non-Window Terminals}). If you omit a filename argument while +supplying this option, the new frame displays the @file{*scratch*} +buffer (@pxref{Buffers}). See below for the special behavior of +@kbd{C-x C-c} in a client frame. + +On MS-Windows, a single Emacs session cannot display frames on both +graphical and text terminals, nor on multiple text terminals. Thus, +if the Emacs server is using the graphical display, @samp{-t} behaves +like @samp{-c} (see above); whereas if the Emacs server is running on +a text terminal, it creates a new frame in its current text terminal. +@xref{Windows Startup}. @end table - If you type @kbd{C-x C-c} (@code{save-buffers-kill-terminal}) in an -Emacs frame created with @command{emacsclient}, via the @samp{-c} or -@samp{-t} options, Emacs deletes the frame instead of killing the -Emacs process itself. On a text-only terminal frame created with the -@samp{-t} option, this returns control to the terminal. Emacs also -marks all the server buffers for the client as finished, as though you -had typed @kbd{C-x #} in all of them. + The new graphical or text terminal frames created by the @samp{-c} +or @samp{-t} options are considered @dfn{client frames}. Any new +frame that you create from a client frame is also considered a client +frame. If you type @kbd{C-x C-c} (@code{save-buffers-kill-terminal}) +in a client frame, that command does not kill the Emacs session as it +normally does (@pxref{Exiting}). Instead, Emacs deletes the client +frame; furthermore, if the client frame has an @command{emacsclient} +waiting to regain control (i.e.@: if you did not supply the @samp{-n} +option), Emacs deletes all other frames of the same client, and marks +the client's server buffers as finished, as though you had typed +@kbd{C-x #} in all of them. If it so happens that there are no +remaining frames after the client frame(s) are deleted, the Emacs +session exits. - When Emacs is started as a daemon, all frames are considered client -frames, so @kbd{C-x C-c} will never kill Emacs. To kill the Emacs -process, type @kbd{M-x kill-emacs}. + As an exception, when Emacs is started as a daemon, all frames are +considered client frames, and @kbd{C-x C-c} never kills Emacs. To +kill a daemon session, type @kbd{M-x kill-emacs}. + + Note that the @samp{-t} and @samp{-n} options are contradictory: +@samp{-t} says to take control of the current text terminal to create +a new client frame, while @samp{-n} says not to take control of the +text terminal. If you supply both options, Emacs visits the specified +files(s) in an existing frame rather than a new client frame, negating +the effect of @samp{-t}. @node Printing, Sorting, Emacs Server, Top @section Printing Hard Copies @@ -1868,7 +1894,7 @@ init file (@pxref{Init File}), followed by @code{(pr-update-menus)}. This function replaces the usual printing commands in the menu bar with a @samp{Printing} submenu that contains various printing options. You can also type @kbd{M-x pr-interface RET}; this creates a -@samp{*Printing Interface*} buffer, similar to a customization buffer, +@file{*Printing Interface*} buffer, similar to a customization buffer, where you can set the printing options. After selecting what and how to print, you start the print job using the @samp{Print} button (click @kbd{mouse-2} on it, or move point over it and type @kbd{RET}). For @@ -2482,7 +2508,7 @@ encrypted in a simple monoalphabetic substitution cipher. @findex dissociated-press @kbd{M-x dissociated-press} scrambles the text in the current Emacs buffer, word by word or character by character, writing its output to -a buffer named @samp{*Dissociation*}. A positive argument tells it to +a buffer named @file{*Dissociation*}. A positive argument tells it to operate character by character, and specifies the number of overlap characters. A negative argument tells it to operate word by word, and specifies the number of overlap words. Dissociated Press produces diff --git a/doc/emacs/msdog-xtra.texi b/doc/emacs/msdog-xtra.texi index 2191d799a2b..af8882a1fd4 100644 --- a/doc/emacs/msdog-xtra.texi +++ b/doc/emacs/msdog-xtra.texi @@ -247,7 +247,7 @@ begins at the top of the character cell. @cindex frames on MS-DOS The MS-DOS terminal can only display a single frame at a time. The -Emacs frame facilities work on MS-DOS much as they do on text-only +Emacs frame facilities work on MS-DOS much as they do on text terminals @iftex (@pxref{Frames,,,emacs, the Emacs Manual}). diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index af948f113a4..96a919cfaf8 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi @@ -121,8 +121,8 @@ Emacs will always create a new text-mode frame in the same created only if the server runs in a GUI session. Similarly, if you invoke @command{emacsclient} with the @option{-t} option, Emacs will create a GUI frame if the server runs in a GUI session, or a text-mode -frame when the session runs in text-only mode in a @dfn{Command -Prompt} window. @xref{emacsclient Options}. +frame when the session runs in text mode in a @dfn{Command Prompt} +window. @xref{emacsclient Options}. @node Text and Binary @section Text Files and Binary Files @@ -729,9 +729,9 @@ Posix-style @code{lpr} program is unavailable. The same Emacs variables control printing on all systems, but in some cases they have different default values on MS-DOS and MS-Windows. - Emacs on Windows automatically determines your default printer and -sets the variable @code{printer-name} to that printer's name. But in -some rare cases this can fail, or you may wish to use a different + Emacs on MS Windows attempts to determine your default printer +automatically (using the function @code{default-printer-name}). +But in some rare cases this can fail, or you may wish to use a different printer from within Emacs. The rest of this section explains how to tell Emacs which printer to use. diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index aeaec2c502e..df2d687114b 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -41,7 +41,7 @@ including European and Vietnamese variants of the Latin alphabet, as well as Cyrillic, Devanagari (for Hindi and Marathi), Ethiopic, Greek, Han (for Chinese and Japanese), Hangul (for Korean), Hebrew, IPA, Kannada, Lao, Malayalam, Tamil, Thai, Tibetan, and Vietnamese scripts. -Emacs also supports various encodings of these characters used by +Emacs also supports various encodings of these characters that are used by other internationalized software, such as word processors and mailers. Emacs allows editing text with international characters by supporting @@ -60,7 +60,7 @@ for each command; see @ref{Text Coding}. @item You can display non-@acronym{ASCII} characters encoded by the various scripts. This works by using appropriate fonts on graphics displays -(@pxref{Defining Fontsets}), and by sending special codes to text-only +(@pxref{Defining Fontsets}), and by sending special codes to text displays (@pxref{Terminal Coding}). If some characters are displayed incorrectly, refer to @ref{Undisplayable Characters}, which describes possible problems and explains how to solve them. @@ -74,14 +74,14 @@ others. @item You can insert non-@acronym{ASCII} characters or search for them. To do that, you can specify an input method (@pxref{Select Input Method}) suitable -for your language, or use the default input method set up when you set +for your language, or use the default input method set up when you chose your language environment. If your keyboard can produce non-@acronym{ASCII} characters, you can select an appropriate keyboard coding system (@pxref{Terminal Coding}), and Emacs will accept those characters. Latin-1 characters can also be input by using the @kbd{C-x 8} prefix, see @ref{Unibyte Mode}. -On the X Window System, your locale should be set to an appropriate +With the X Window System, your locale should be set to an appropriate value to make sure Emacs interprets keyboard input correctly; see @ref{Language Environments, locales}. @end itemize @@ -90,7 +90,7 @@ value to make sure Emacs interprets keyboard input correctly; see @menu * International Chars:: Basic concepts of multibyte characters. -* Enabling Multibyte:: Controlling whether to use multibyte characters. +* Disabling Multibyte:: Controlling whether to use multibyte characters. * Language Environments:: Setting things up for the language you use. * Input Methods:: Entering text characters not on your keyboard. * Select Input Method:: Specifying your choice of input methods. @@ -210,7 +210,7 @@ What keys to type to input the character in the current input method @item If you are running Emacs on a graphical display, the font name and -glyph code for the character. If you are running Emacs on a text-only +glyph code for the character. If you are running Emacs on a text terminal, the code(s) sent to the terminal. @item @@ -224,29 +224,30 @@ faces used to display the character, and any overlays containing it in a buffer whose coding system is @code{utf-8-unix}: @smallexample - character: @`A (192, #o300, #xc0) -preferred charset: unicode (Unicode (ISO10646)) - code point: 0xC0 - syntax: w which means: word - category: j:Japanese l:Latin v:Vietnamese - buffer code: #xC3 #x80 - file code: not encodable by coding system undecided-unix - display: by this font (glyph code) + position: 1 of 1 (0%), column: 0 + character: @`A (displayed as @`A) (codepoint 192, #o300, #xc0) + preferred charset: unicode (Unicode (ISO10646)) +code point in charset: 0xC0 + syntax: w which means: word + category: .:Base, L:Left-to-right (strong), + j:Japanese, l:Latin, v:Viet + buffer code: #xC3 #x80 + file code: not encodable by coding system undecided-unix + display: by this font (glyph code) xft:-unknown-DejaVu Sans Mono-normal-normal- normal-*-13-*-*-*-m-0-iso10646-1 (#x82) Character code properties: customize what to show name: LATIN CAPITAL LETTER A WITH GRAVE + old-name: LATIN CAPITAL LETTER A GRAVE general-category: Lu (Letter, Uppercase) decomposition: (65 768) ('A' '`') - old-name: LATIN CAPITAL LETTER A GRAVE - -There are text properties here: - auto-composed t @end smallexample -@node Enabling Multibyte -@section Enabling Multibyte Characters +@c FIXME? Does this section even belong in the user manual? +@c Seems more appropriate to the lispref? +@node Disabling Multibyte +@section Disabling Multibyte Characters By default, Emacs starts in multibyte mode: it stores the contents of buffers and strings using an internal encoding that represents @@ -275,32 +276,48 @@ Coding}. Unlike @code{find-file-literally}, finding a file as @samp{raw-text} doesn't disable format conversion, uncompression, or auto mode selection. +@c Not a single file in Emacs uses this feature. Is it really worth +@c mentioning in the _user_ manual? Also, this duplicates somewhat +@c "Loading Non-ASCII" from the lispref. @cindex Lisp files, and multibyte operation @cindex multibyte operation, and Lisp files @cindex unibyte operation, and Lisp files @cindex init file, and non-@acronym{ASCII} characters Emacs normally loads Lisp files as multibyte. This includes the Emacs initialization -file, @file{.emacs}, and the initialization files of Emacs packages +file, @file{.emacs}, and the initialization files of packages such as Gnus. However, you can specify unibyte loading for a -particular Lisp file, by putting @w{@samp{-*-unibyte: t;-*-}} in a -comment on the first line (@pxref{File Variables}). Then that file is -always loaded as unibyte text. The motivation for these conventions -is that it is more reliable to always load any particular Lisp file in -the same way. However, you can load a Lisp file as unibyte, on any -one occasion, by typing @kbd{C-x @key{RET} c raw-text @key{RET}} -immediately before loading it. +particular Lisp file, by adding an entry @samp{unibyte: t} in a file +local variables section (@pxref{File Variables}). Then that file is +always loaded as unibyte text. Note that this does not represent a +real @code{unibyte} variable, rather it just acts as an indicator +to Emacs in the same way as @code{coding} does (@pxref{Specify Coding}). +@ignore +@c I don't see the point of this statement: +The motivation for these conventions is that it is more reliable to +always load any particular Lisp file in the same way. +@end ignore +Note also that this feature only applies to @emph{loading} Lisp files +for evaluation, not to visiting them for editing. You can also load a +Lisp file as unibyte, on any one occasion, by typing @kbd{C-x +@key{RET} c raw-text @key{RET}} immediately before loading it. - The mode line indicates whether multibyte character support is -enabled in the current buffer. If it is, there are two or more -characters (most often two dashes) near the beginning of the mode -line, before the indication of the visited file's end-of-line -convention (colon, backslash, etc.). When multibyte characters -are not enabled, nothing precedes the colon except a single dash. -@xref{Mode Line}, for more details about this. +@c See http://debbugs.gnu.org/11226 for lack of unibyte tooltip. +@vindex enable-multibyte-characters +The buffer-local variable @code{enable-multibyte-characters} is +non-@code{nil} in multibyte buffers, and @code{nil} in unibyte ones. +The mode line also indicates whether a buffer is multibyte or not. +@xref{Mode Line}. With a graphical display, in a multibyte buffer, +the portion of the mode line that indicates the character set has a +tooltip that (amongst other things) says that the buffer is multibyte. +In a unibyte buffer, the character set indicator is absent. Thus, in +a unibyte buffer (when using a graphical display) there is normally +nothing before the indication of the visited file's end-of-line +convention (colon, backslash, etc.), unless you are using an input +method. @findex toggle-enable-multibyte-characters -You can turn on multibyte support in a specific buffer by invoking the +You can turn off multibyte support in a specific buffer by invoking the command @code{toggle-enable-multibyte-characters} in that buffer. @node Language Environments @@ -309,8 +326,8 @@ command @code{toggle-enable-multibyte-characters} in that buffer. All supported character sets are supported in Emacs buffers whenever multibyte characters are enabled; there is no need to select a -particular language in order to display its characters in an Emacs -buffer. However, it is important to select a @dfn{language +particular language in order to display its characters. +However, it is important to select a @dfn{language environment} in order to set various defaults. Roughly speaking, the language environment represents a choice of preferred script rather than a choice of language. @@ -327,7 +344,8 @@ language environment also specifies a default input method. @code{current-language-environment} or use the command @kbd{M-x set-language-environment}. It makes no difference which buffer is current when you use this command, because the effects apply globally -to the Emacs session. The supported language environments include: +to the Emacs session. The supported language environments +(see the variable @code{language-info-alist}) include: @cindex Euro sign @cindex UTF-8 @@ -347,21 +365,8 @@ UTF-8), Ukrainian, Vietnamese, Welsh, and Windows-1255 (for a setup which prefers Cyrillic characters and files encoded in Windows-1255). @end quotation -@cindex fonts for various scripts -@cindex Intlfonts package, installation To display the script(s) used by your language environment on a -graphical display, you need to have a suitable font. If some of the -characters appear as empty boxes or hex codes, you should install the -GNU Intlfonts package, which includes fonts for most supported -scripts.@footnote{If you run Emacs on X, you need to inform the X -server about the location of the newly installed fonts with the -following commands: - -@example - xset fp+ /usr/local/share/emacs/fonts - xset fp rehash -@end example -} +graphical display, you need to have suitable fonts. @xref{Fontsets}, for more details about setting up your fonts. @findex set-locale-environment @@ -370,22 +375,25 @@ following commands: @cindex locales Some operating systems let you specify the character-set locale you are using by setting the locale environment variables @env{LC_ALL}, -@env{LC_CTYPE}, or @env{LANG}.@footnote{If more than one of these is +@env{LC_CTYPE}, or @env{LANG}. (If more than one of these is set, the first one that is nonempty specifies your locale for this -purpose.} During startup, Emacs looks up your character-set locale's +purpose.) During startup, Emacs looks up your character-set locale's name in the system locale alias table, matches its canonical name against entries in the value of the variables -@code{locale-charset-language-names} and @code{locale-language-names}, +@code{locale-charset-language-names} and @code{locale-language-names} +(the former overrides the latter), and selects the corresponding language environment if a match is found. -(The former variable overrides the latter.) It also adjusts the display +It also adjusts the display table and terminal coding system, the locale coding system, the preferred coding system as needed for the locale, and---last but not least---the way Emacs decodes non-@acronym{ASCII} characters sent by your keyboard. +@c This seems unlikely, doesn't it? If you modify the @env{LC_ALL}, @env{LC_CTYPE}, or @env{LANG} -environment variables while running Emacs, you may want to invoke the -@code{set-locale-environment} function afterwards to readjust the -language environment from the new locale. +environment variables while running Emacs (by using @kbd{M-x setenv}), +you may want to invoke the @code{set-locale-environment} +function afterwards to readjust the language environment from the new +locale. @vindex locale-preferred-coding-systems The @code{set-locale-environment} function normally uses the preferred @@ -421,7 +429,7 @@ this command describes the chosen language environment. language environment. The hook functions can test for a specific language environment by checking the variable @code{current-language-environment}. This hook is where you should -put non-default settings for specific language environment, such as +put non-default settings for specific language environments, such as coding systems for keyboard input and terminal output, the default input method, etc. @@ -441,7 +449,7 @@ for that key. @cindex input methods An @dfn{input method} is a kind of character conversion designed specifically for interactive input. In Emacs, typically each language -has its own input method; sometimes several languages which use the same +has its own input method; sometimes several languages that use the same characters can share one input method. A few languages support several input methods. @@ -454,14 +462,14 @@ work this way. characters into one letter. Many European input methods use composition to produce a single non-@acronym{ASCII} letter from a sequence that consists of a letter followed by accent characters (or vice versa). For example, some -methods convert the sequence @kbd{a'} into a single accented letter. +methods convert the sequence @kbd{o ^} into a single accented letter. These input methods have no special commands of their own; all they do is compose sequences of printing characters. The input methods for syllabic scripts typically use mapping followed by composition. The input methods for Thai and Korean work this way. First, letters are mapped into symbols for particular sounds or tone -marks; then, sequences of these which make up a whole syllable are +marks; then, sequences of these that make up a whole syllable are mapped into one syllable sign. Chinese and Japanese require more complex methods. In Chinese input @@ -471,7 +479,8 @@ portions of the character (input methods @code{chinese-4corner} and @code{chinese-sw}, and others). One input sequence typically corresponds to many possible Chinese characters. You select the one you mean using keys such as @kbd{C-f}, @kbd{C-b}, @kbd{C-n}, -@kbd{C-p}, and digits, which have special meanings in this situation. +@kbd{C-p} (or the arrow keys), and digits, which have special meanings +in this situation. The possible characters are conceptually arranged in several rows, with each row holding up to 10 alternatives. Normally, Emacs displays @@ -485,8 +494,8 @@ the alternatives in the current row. As you do this, Emacs highlights the current alternative with a special color; type @code{C-@key{SPC}} to select the current alternative and use it as input. The alternatives in the row are also numbered; the number appears before -the alternative. Typing a digit @var{n} selects the @var{n}th -alternative of the current row and uses it as input. +the alternative. Typing a number selects the associated alternative +of the current row and uses it as input. @key{TAB} in these Chinese input methods displays a buffer showing all the possible characters at once; then clicking @kbd{Mouse-2} on @@ -505,15 +514,15 @@ the alternatives. Sometimes it is useful to cut off input method processing so that the characters you have just entered will not combine with subsequent characters. For example, in input method @code{latin-1-postfix}, the -sequence @kbd{e '} combines to form an @samp{e} with an accent. What if +sequence @kbd{o ^} combines to form an @samp{o} with an accent. What if you want to enter them as separate characters? One way is to type the accent twice; this is a special feature for -entering the separate letter and accent. For example, @kbd{e ' '} gives -you the two characters @samp{e'}. Another way is to type another letter -after the @kbd{e}---something that won't combine with that---and -immediately delete it. For example, you could type @kbd{e e @key{DEL} -'} to get separate @samp{e} and @samp{'}. +entering the separate letter and accent. For example, @kbd{o ^ ^} gives +you the two characters @samp{o^}. Another way is to type another letter +after the @kbd{o}---something that won't combine with that---and +immediately delete it. For example, you could type @kbd{o o @key{DEL} +^} to get separate @samp{o} and @samp{^}. Another method, more general but not quite as easy to type, is to use @kbd{C-\ C-\} between two characters to stop them from combining. This @@ -542,7 +551,7 @@ possible characters to type next is displayed in the echo area (but not when you are in the minibuffer). Another facility for typing characters not on your keyboard is by -using the @kbd{C-x 8 @key{RET}} (@code{ucs-insert}) to insert a single +using @kbd{C-x 8 @key{RET}} (@code{ucs-insert}) to insert a single character based on its Unicode name or code-point; see @ref{Inserting Text}. @@ -551,10 +560,10 @@ Text}. @table @kbd @item C-\ -Enable or disable use of the selected input method. +Enable or disable use of the selected input method (@code{toggle-input-method}). @item C-x @key{RET} C-\ @var{method} @key{RET} -Select a new input method for the current buffer. +Select a new input method for the current buffer (@code{set-input-method}). @item C-h I @var{method} @key{RET} @itemx C-h C-\ @var{method} @key{RET} @@ -588,7 +597,7 @@ turn off the input method temporarily. To do this, type @kbd{C-\} @kbd{C-\} again. If you type @kbd{C-\} and you have not yet selected an input method, -it prompts for you to specify one. This has the same effect as using +it prompts you to specify one. This has the same effect as using @kbd{C-x @key{RET} C-\} to specify an input method. When invoked with a numeric argument, as in @kbd{C-u C-\}, @@ -631,7 +640,7 @@ automatically. For example: @end lisp @noindent -This activates the input method ``german-prefix'' automatically in the +This automatically activates the input method ``german-prefix'' in Text mode. @findex quail-set-keyboard-layout @@ -645,7 +654,7 @@ the command @kbd{M-x quail-set-keyboard-layout}. You can use the command @kbd{M-x quail-show-key} to show what key (or key sequence) to type in order to input the character following point, using the selected keyboard layout. The command @kbd{C-u C-x =} also -shows that information in addition to the other information about the +shows that information, in addition to other information about the character. @findex list-input-methods @@ -685,11 +694,12 @@ system; for example, to visit a file encoded in codepage 850, type In addition to converting various representations of non-@acronym{ASCII} characters, a coding system can perform end-of-line conversion. Emacs handles three different conventions for how to separate lines in a file: -newline, carriage-return linefeed, and just carriage-return. +newline (``unix''), carriage-return linefeed (``dos''), and just +carriage-return (``mac''). @table @kbd @item C-h C @var{coding} @key{RET} -Describe coding system @var{coding}. +Describe coding system @var{coding} (@code{describe-coding-system}). @item C-h C @key{RET} Describe the coding systems currently in use. @@ -725,27 +735,27 @@ end-of-line conversion to be decided based on the contents of each file. For example, if the file appears to use the sequence carriage-return linefeed to separate lines, DOS end-of-line conversion will be used. - Each of the listed coding systems has three variants which specify + Each of the listed coding systems has three variants, which specify exactly what to do for end-of-line conversion: @table @code @item @dots{}-unix Don't do any end-of-line conversion; assume the file uses newline to separate lines. (This is the convention normally used -on Unix and GNU systems.) +on Unix and GNU systems, and Mac OS X.) @item @dots{}-dos Assume the file uses carriage-return linefeed to separate lines, and do the appropriate conversion. (This is the convention normally used on Microsoft systems.@footnote{It is also specified for MIME @samp{text/*} bodies and in other network transport contexts. It is different -from the SGML reference syntax record-start/record-end format which +from the SGML reference syntax record-start/record-end format, which Emacs doesn't support directly.}) @item @dots{}-mac Assume the file uses carriage-return to separate lines, and do the -appropriate conversion. (This is the convention normally used on the -Macintosh system.) +appropriate conversion. (This was the convention used on the +Macintosh system prior to OS X.) @end table These variant coding systems are omitted from the @@ -763,7 +773,7 @@ be deduced from the text itself. @cindex @code{raw-text}, coding system The coding system @code{raw-text} is good for a file which is mainly -@acronym{ASCII} text, but may contain byte values above 127 which are +@acronym{ASCII} text, but may contain byte values above 127 that are not meant to encode non-@acronym{ASCII} characters. With @code{raw-text}, Emacs copies those byte values unchanged, and sets @code{enable-multibyte-characters} to @code{nil} in the current buffer @@ -880,37 +890,47 @@ the buffer. The default value of @code{inhibit-iso-escape-detection} is @code{nil}. We recommend that you not change it permanently, only for -one specific operation. That's because many Emacs Lisp source files +one specific operation. That's because some Emacs Lisp source files in the Emacs distribution contain non-@acronym{ASCII} characters encoded in the coding system @code{iso-2022-7bit}, and they won't be decoded correctly when you visit those files if you suppress the escape sequence detection. +@c I count a grand total of 3 such files, so is the above really true? @vindex auto-coding-alist @vindex auto-coding-regexp-alist -@vindex auto-coding-functions - The variables @code{auto-coding-alist}, -@code{auto-coding-regexp-alist} and @code{auto-coding-functions} are + The variables @code{auto-coding-alist} and +@code{auto-coding-regexp-alist} are the strongest way to specify the coding system for certain patterns of -file names, or for files containing certain patterns; these variables -even override @samp{-*-coding:-*-} tags in the file itself. Emacs +file names, or for files containing certain patterns, respectively. +These variables even override @samp{-*-coding:-*-} tags in the file +itself (@pxref{Specify Coding}). For example, Emacs uses @code{auto-coding-alist} for tar and archive files, to prevent it from being confused by a @samp{-*-coding:-*-} tag in a member of the archive and thinking it applies to the archive file as a whole. +@ignore +@c This describes old-style BABYL files, which are no longer relevant. Likewise, Emacs uses @code{auto-coding-regexp-alist} to ensure that RMAIL files, whose names in general don't match any particular -pattern, are decoded correctly. One of the builtin -@code{auto-coding-functions} detects the encoding for XML files. +pattern, are decoded correctly. +@end ignore +@vindex auto-coding-functions + Another way to specify a coding system is with the variable +@code{auto-coding-functions}. For example, one of the builtin +@code{auto-coding-functions} detects the encoding for XML files. +Unlike the previous two, this variable does not override any +@samp{-*-coding:-*-} tag. + +@c FIXME? This seems somewhat out of place. Move to the Rmail section? @vindex rmail-decode-mime-charset @vindex rmail-file-coding-system When you get new mail in Rmail, each message is translated automatically from the coding system it is written in, as if it were a separate file. This uses the priority list of coding systems that you have specified. If a MIME message specifies a character set, Rmail -obeys that specification, unless @code{rmail-decode-mime-charset} is -@code{nil}. For reading and saving Rmail files themselves, Emacs uses -the coding system specified by the variable +obeys that specification. For reading and saving Rmail files +themselves, Emacs uses the coding system specified by the variable @code{rmail-file-coding-system}. The default value is @code{nil}, which means that Rmail files are not translated (they are read and written in the Emacs internal character code). @@ -969,6 +989,7 @@ and asks you to choose one of those coding systems. If you insert the unsuitable characters in a mail message, Emacs behaves a bit differently. It additionally checks whether the +@c What determines this? most-preferred coding system is recommended for use in MIME messages; if not, Emacs tells you that the most-preferred coding system is not recommended and prompts you for another coding system. This is so you @@ -977,17 +998,22 @@ recipient's mail software will have difficulty decoding. (You can still use an unsuitable coding system if you type its name in response to the question.) +@c It seems that select-message-coding-system does this. +@c Both sendmail.el and smptmail.el call it; i.e. smtpmail.el still +@c obeys sendmail-coding-system. @vindex sendmail-coding-system - When you send a message with Message mode (@pxref{Sending Mail}), + When you send a mail message (@pxref{Sending Mail}), Emacs has four different ways to determine the coding system to use for encoding the message text. It tries the buffer's own value of @code{buffer-file-coding-system}, if that is non-@code{nil}. Otherwise, it uses the value of @code{sendmail-coding-system}, if that is non-@code{nil}. The third way is to use the default coding system for new files, which is controlled by your choice of language +@c i.e., default-sendmail-coding-system environment, if that is non-@code{nil}. If all of these three values are @code{nil}, Emacs encodes outgoing mail using the Latin-1 coding system. +@c FIXME? Where does the Latin-1 default come in? @node Text Coding @section Specifying a Coding System for File Text @@ -998,8 +1024,8 @@ one: @table @kbd @item C-x @key{RET} f @var{coding} @key{RET} -Use coding system @var{coding} to save or revisit the visited file in -the current buffer (@code{set-buffer-file-coding-system}) +Use coding system @var{coding} to save or revisit the file in +the current buffer (@code{set-buffer-file-coding-system}). @item C-x @key{RET} c @var{coding} @key{RET} Specify coding system @var{coding} for the immediately following @@ -1029,8 +1055,8 @@ buffer. You can also use this command to specify the end-of-line conversion (@pxref{Coding Systems, end-of-line conversion}) for encoding the current buffer. For example, @kbd{C-x @key{RET} f dos @key{RET}} will -cause Emacs to save the current buffer's text with DOS-style CRLF line -endings. +cause Emacs to save the current buffer's text with DOS-style +carriage-return linefeed line endings. @kindex C-x RET c @findex universal-coding-system-argument @@ -1118,7 +1144,7 @@ coding system for the next selection made in Emacs or read by Emacs. The variable @code{x-select-request-type} specifies the data type to request from the X Window System for receiving text selections from other applications. If the value is @code{nil} (the default), Emacs -tries @code{COMPOUND_TEXT} and @code{UTF8_STRING}, in this order, and +tries @code{UTF8_STRING} and @code{COMPOUND_TEXT}, in this order, and uses various heuristics to choose the more appropriate of the two results; if none of these succeed, Emacs falls back on @code{STRING}. If the value of @code{x-select-request-type} is one of the symbols @@ -1150,8 +1176,8 @@ current language environment. The variable @code{locale-coding-system} specifies a coding system to use when encoding and decoding system strings such as system error messages and @code{format-time-string} formats and time stamps. That -coding system is also used for decoding non-@acronym{ASCII} keyboard input on X -Window systems. You should choose a coding system that is compatible +coding system is also used for decoding non-@acronym{ASCII} keyboard +input on the X Window System. You should choose a coding system that is compatible with the underlying system's text representation, which is normally specified by one of the environment variables @env{LC_ALL}, @env{LC_CTYPE}, and @env{LANG}. (The first one, in the order @@ -1164,27 +1190,29 @@ the text representation.) @table @kbd @item C-x @key{RET} F @var{coding} @key{RET} Use coding system @var{coding} for encoding and decoding file -@emph{names} (@code{set-file-name-coding-system}). +names (@code{set-file-name-coding-system}). @end table -@vindex file-name-coding-system -@cindex file names with non-@acronym{ASCII} characters - The variable @code{file-name-coding-system} specifies a coding -system to use for encoding file names. It has no effect on reading -and writing the @emph{contents} of files. - @findex set-file-name-coding-system @kindex C-x @key{RET} F - If you set the variable to a coding system name (as a Lisp symbol or -a string), Emacs encodes file names using that coding system for all -file operations. This makes it possible to use non-@acronym{ASCII} -characters in file names---or, at least, those non-@acronym{ASCII} -characters which the specified coding system can encode. Use @kbd{C-x -@key{RET} F} (@code{set-file-name-coding-system}) to specify this -interactively. +@cindex file names with non-@acronym{ASCII} characters + The command @kbd{C-x @key{RET} F} (@code{set-file-name-coding-system}) +specifies a coding system to use for encoding file @emph{names}. It +has no effect on reading and writing the @emph{contents} of files. + +@vindex file-name-coding-system + In fact, all this command does is set the value of the variable +@code{file-name-coding-system}. If you set the variable to a coding +system name (as a Lisp symbol or a string), Emacs encodes file names +using that coding system for all file operations. This makes it +possible to use non-@acronym{ASCII} characters in file names---or, at +least, those non-@acronym{ASCII} characters that the specified coding +system can encode. If @code{file-name-coding-system} is @code{nil}, Emacs uses a -default coding system determined by the selected language environment. +default coding system determined by the selected language environment, +and stored in the @code{default-file-name-coding-system} variable. +@c FIXME? Is this correct? What is the "default language environment"? In the default language environment, non-@acronym{ASCII} characters in file names are not encoded specially; they appear in the file system using the internal Emacs representation. @@ -1195,7 +1223,7 @@ result if you have already visited files whose names were encoded using the earlier coding system and cannot be encoded (or are encoded differently) under the new coding system. If you try to save one of these buffers under the visited file name, saving may use the wrong file -name, or it may get an error. If such a problem happens, use @kbd{C-x +name, or it may encounter an error. If such a problem happens, use @kbd{C-x C-w} to specify a new file name for that buffer. @findex recode-file-name @@ -1208,13 +1236,13 @@ system, and the coding system to which you wish to convert. @section Coding Systems for Terminal I/O @table @kbd -@item C-x @key{RET} k @var{coding} @key{RET} -Use coding system @var{coding} for keyboard input -(@code{set-keyboard-coding-system}). - @item C-x @key{RET} t @var{coding} @key{RET} Use coding system @var{coding} for terminal output (@code{set-terminal-coding-system}). + +@item C-x @key{RET} k @var{coding} @key{RET} +Use coding system @var{coding} for keyboard input +(@code{set-keyboard-coding-system}). @end table @kindex C-x RET t @@ -1237,8 +1265,8 @@ your locale specification (@pxref{Language Environments}). @kindex C-x RET k @findex set-keyboard-coding-system @vindex keyboard-coding-system - The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system}) -or the variable @code{keyboard-coding-system} specifies the coding + The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system}), +or the variable @code{keyboard-coding-system}, specifies the coding system for keyboard input. Character-code translation of keyboard input is useful for terminals with keys that send non-@acronym{ASCII} graphic characters---for example, some terminals designed for ISO @@ -1273,30 +1301,49 @@ non-graphic characters. A font typically defines shapes for a single alphabet or script. Therefore, displaying the entire range of scripts that Emacs supports requires a collection of many fonts. In Emacs, such a collection is -called a @dfn{fontset}. A fontset is defined by a list of font specs, +called a @dfn{fontset}. A fontset is defined by a list of font specifications, each assigned to handle a range of character codes, and may fall back -on another fontset for characters which are not covered by the fonts +on another fontset for characters that are not covered by the fonts it specifies. +@cindex fonts for various scripts +@cindex Intlfonts package, installation Each fontset has a name, like a font. However, while fonts are stored in the system and the available font names are defined by the system, fontsets are defined within Emacs itself. Once you have defined a fontset, you can use it within Emacs by specifying its name, anywhere that you could use a single font. Of course, Emacs fontsets -can use only the fonts that the system supports; if certain characters -appear on the screen as hollow boxes, this means that the fontset in -use for them has no font for those characters.@footnote{The Emacs -installation instructions have information on additional font -support.} +can use only the fonts that the system supports. If some characters +appear on the screen as empty boxes or hex codes, this means that the +fontset in use for them has no font for those characters. In this +case, or if the characters are shown, but not as well as you would +like, you may need to install extra fonts. Your operating system may +have optional fonts that you can install; or you can install the GNU +Intlfonts package, which includes fonts for most supported +scripts.@footnote{If you run Emacs on X, you may need to inform the X +server about the location of the newly installed fonts with commands +such as: +@c FIXME? I feel like this may be out of date. +@c Eg the intlfonts tarfile is ~ 10 years old. + +@example + xset fp+ /usr/local/share/emacs/fonts + xset fp rehash +@end example +} Emacs creates three fontsets automatically: the @dfn{standard fontset}, the @dfn{startup fontset} and the @dfn{default fontset}. +@c FIXME? The doc of *standard*-fontset-spec says: +@c "You have the biggest chance to display international characters +@c with correct glyphs by using the *standard* fontset." (my emphasis) The default fontset is most likely to have fonts for a wide variety of -non-@acronym{ASCII} characters and is the default fallback for the +non-@acronym{ASCII} characters, and is the default fallback for the other two fontsets, and if you set a default font rather than fontset. -However it does not specify font family names, so results can be +However, it does not specify font family names, so results can be somewhat random if you use it directly. You can specify use of a -specific fontset with the @samp{-fn} option. For example, +particular fontset by starting Emacs with the @samp{-fn} option. +For example, @example emacs -fn fontset-standard @@ -1335,10 +1382,12 @@ of @code{standard-fontset-spec}. This fontset's name is @noindent or just @samp{fontset-standard} for short. - On GNUstep and Mac, fontset-standard is created using the value of -@code{ns-standard-fontset-spec}, and on Windows it is + On GNUstep and Mac OS X, the standard fontset is created using the value of +@code{ns-standard-fontset-spec}, and on MS Windows it is created using the value of @code{w32-standard-fontset-spec}. +@c FIXME? How does one access these, or do anything with them? +@c Does it matter? Bold, italic, and bold-italic variants of the standard fontset are created automatically. Their names have @samp{bold} instead of @samp{medium}, or @samp{i} instead of @samp{r}, or both. @@ -1353,8 +1402,15 @@ started. This is the @dfn{startup fontset} and its name is @var{charset_encoding} field with @samp{startup}, then using the resulting string to specify a fontset. - For instance, if you start Emacs this way, + For instance, if you start Emacs with a font of this form, +@c FIXME? I think this is a little misleading, because you cannot (?) +@c actually specify a font with wildcards, it has to be a complete spec. +@c Also, an X font specification of this form hasn't (?) been +@c mentioned before now, and is somewhat obsolete these days. +@c People are more likely to use a form like +@c emacs -fn "DejaVu Sans Mono-12" +@c How does any of this apply in that case? @example emacs -fn "*courier-medium-r-normal--14-140-*-iso8859-1" @end example @@ -1367,8 +1423,8 @@ window frame: -*-courier-medium-r-normal-*-14-140-*-*-*-*-fontset-startup @end example - The startup fontset will use the font that you specify or a variant -with a different registry and encoding for all the characters which + The startup fontset will use the font that you specify, or a variant +with a different registry and encoding, for all the characters that are supported by that font, and fallback on @samp{fontset-default} for other characters. @@ -1376,7 +1432,8 @@ other characters. just like an actual font name. But be careful not to specify a fontset name in a wildcard resource like @samp{Emacs*Font}---that wildcard specification matches various other resources, such as for menus, and -menus cannot handle fontsets. +@c FIXME is this still true? +menus cannot handle fontsets. @xref{X Resources}. You can specify additional fontsets using X resources named @samp{Fontset-@var{n}}, where @var{n} is an integer starting from 0. @@ -1387,7 +1444,8 @@ The resource value should have this form: @end smallexample @noindent -@var{fontpattern} should have the form of a standard X font name, except +@var{fontpattern} should have the form of a standard X font name (see +the previous fontset-startup example), except for the last two fields. They should have the form @samp{fontset-@var{alias}}. @@ -1409,7 +1467,7 @@ that describe the character set. For the @acronym{ASCII} character font, In addition, when several consecutive fields are wildcards, Emacs collapses them into a single wildcard. This is to prevent use of auto-scaled fonts. Fonts made by scaling larger fonts are not usable -for editing, and scaling a smaller font is not useful because it is +for editing, and scaling a smaller font is not also useful, because it is better to use the smaller font in its own size, which is what Emacs does. @@ -1435,8 +1493,8 @@ and the font specification for Chinese GB2312 characters would be this: You may not have any Chinese font matching the above font specification. Most X distributions include only Chinese fonts that -have @samp{song ti} or @samp{fangsong ti} in @var{family} field. In -such a case, @samp{Fontset-@var{n}} can be specified as below: +have @samp{song ti} or @samp{fangsong ti} in the @var{family} field. In +such a case, @samp{Fontset-@var{n}} can be specified as: @smallexample Emacs.Fontset-0: -*-fixed-medium-r-normal-*-24-*-*-*-*-*-fontset-24,\ @@ -1470,8 +1528,8 @@ script. Fontsets can be modified using the function @code{set-fontset-font}, specifying a character, a charset, a script, or a range of characters -to modify the font for, and a font-spec for the font to be used. Some -examples are: +to modify the font for, and a font specification for the font to be +used. Some examples are: @example ;; Use Liberation Mono for latin-3 charset. @@ -1498,10 +1556,10 @@ examples are: @node Undisplayable Characters @section Undisplayable Characters - There may be a some non-@acronym{ASCII} characters that your terminal cannot -display. Most text-only terminals support just a single character -set (use the variable @code{default-terminal-coding-system} -(@pxref{Terminal Coding}) to tell Emacs which one); characters which + There may be some non-@acronym{ASCII} characters that your +terminal cannot display. Most text terminals support just a single +character set (use the variable @code{default-terminal-coding-system} +to tell Emacs which one, @ref{Terminal Coding}); characters that can't be encoded in that coding system are displayed as @samp{?} by default. @@ -1533,17 +1591,15 @@ the range 0240 to 0377 octal (160 to 255 decimal) to handle the accented letters and punctuation needed by various European languages (and some non-European ones). Note that Emacs considers bytes with codes in this range as raw bytes, not as characters, even in a unibyte -session, i.e.@: if you disable multibyte characters. However, Emacs +buffer, i.e.@: if you disable multibyte characters. However, Emacs can still handle these character codes as if they belonged to @emph{one} of the single-byte character sets at a time. To specify @emph{which} of these codes to use, invoke @kbd{M-x set-language-environment} and specify a suitable language environment such as @samp{Latin-@var{n}}. - For more information about unibyte operation, see @ref{Enabling -Multibyte}. Note particularly that you probably want to ensure that -your initialization files are read as unibyte if they contain -non-@acronym{ASCII} characters. + For more information about unibyte operation, see +@ref{Disabling Multibyte}. @vindex unibyte-display-via-language-environment Emacs can also display bytes in the range 160 to 255 as readable @@ -1562,8 +1618,8 @@ them as raw bytes, not as characters. set, Emacs can display these characters as @acronym{ASCII} sequences which at least give you a clear idea of what the characters are. To do this, load the library @code{iso-ascii}. Similar libraries for other -Latin-@var{n} character sets could be implemented, but we don't have -them yet. +Latin-@var{n} character sets could be implemented, but have not been +so far. @findex standard-display-8bit @cindex 8-bit display @@ -1587,9 +1643,9 @@ If your keyboard can generate character codes 128 (decimal) and up, representing non-@acronym{ASCII} characters, you can type those character codes directly. -On a graphical display, you should not need to do anything special to use -these keys; they should simply work. On a text-only terminal, you -should use the command @code{M-x set-keyboard-coding-system} or the +On a graphical display, you should not need to do anything special to +use these keys; they should simply work. On a text terminal, you +should use the command @code{M-x set-keyboard-coding-system} or customize the variable @code{keyboard-coding-system} to specify which coding system your keyboard uses (@pxref{Terminal Coding}). Enabling this feature will probably require you to use @kbd{ESC} to type Meta characters; @@ -1613,7 +1669,7 @@ a key sequence is allowed. library is loaded, the @key{ALT} modifier key, if the keyboard has one, serves the same purpose as @kbd{C-x 8}: use @key{ALT} together with an accent character to modify the following letter. In addition, -if the keyboard has keys for the Latin-1 ``dead accent characters,'' +if the keyboard has keys for the Latin-1 ``dead accent characters'', they too are defined to compose with the following character, once @code{iso-transl} is loaded. @@ -1657,8 +1713,9 @@ internal representation within Emacs. @findex list-character-sets @kbd{M-x list-character-sets} displays a list of all supported charsets. The list gives the names of charsets and additional -information to identity each charset (see -@url{http://www.itscj.ipsj.or.jp/ISO-IR/} for details). In this list, +information to identity each charset; see the +@url{http://www.itscj.ipsj.or.jp/ISO-IR/, International Register of +Coded Character Sets} for more details. In this list, charsets are divided into two categories: @dfn{normal charsets} are listed first, followed by @dfn{supplementary charsets}. A supplementary charset is one that is used to define another charset @@ -1678,8 +1735,8 @@ Chars}). Hebrew, whose natural ordering of horizontal text for display is from right to left. However, digits and Latin text embedded in these scripts are still displayed left to right. It is also not uncommon to -have small portions of text in Arabic or Hebrew embedded in otherwise -Latin document, e.g., as comments and strings in a program source +have small portions of text in Arabic or Hebrew embedded in an otherwise +Latin document; e.g., as comments and strings in a program source file. For these reasons, text that uses these scripts is actually @dfn{bidirectional}: a mixture of runs of left-to-right and right-to-left characters. @@ -1707,6 +1764,7 @@ directionality when they are displayed. The default value is Each paragraph of bidirectional text can have its own @dfn{base direction}, either right-to-left or left-to-right. (Paragraph +@c paragraph-separate etc have no influence on this? boundaries are empty lines, i.e.@: lines consisting entirely of whitespace characters.) Text in left-to-right paragraphs begins at the left margin of the window and is truncated or continued when it @@ -1743,5 +1801,5 @@ commands move point in the logical order, so the cursor will sometimes jump when point traverses reordered bidirectional text. Similarly, a highlighted region covering a contiguous range of character positions may look discontinuous if the region spans reordered text. This is -normal and similar to behavior of other programs that support +normal and similar to the behavior of other programs that support bidirectional text. diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index 91b25cfa00e..4435590536f 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -14,7 +14,7 @@ Emacs includes a facility that lets you easily download and install separate Emacs Lisp program, sometimes including other components such as an Info manual. - @kbd{M-x list-packages} brings up a buffer named @samp{*Packages*} + @kbd{M-x list-packages} brings up a buffer named @file{*Packages*} with a list of all packages. You can install or uninstall packages via this buffer. @xref{Package Menu}. diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 8217400663f..5f7abcf3881 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1130,7 +1130,7 @@ prompts for a topic, with completion (@pxref{Completion}), and runs the @command{man} program to format the corresponding man page. If the system permits, it runs @command{man} asynchronously, so that you can keep on editing while the page is being formatted. The result -goes in a buffer named @samp{*Man @var{topic}*}. These buffers use a +goes in a buffer named @file{*Man @var{topic}*}. These buffers use a special major mode, Man mode, that facilitates scrolling and jumping to other manual pages. For details, type @kbd{C-h m} while in a Man mode buffer. @@ -1165,7 +1165,7 @@ command. Unlike @kbd{M-x man}, it does not run any external programs to format and display the man pages; the formatting is done by Emacs, so it works on systems such as MS-Windows where the @command{man} program may be unavailable. It prompts for a man page, and displays -it in a buffer named @samp{*WoMan @var{section} @var{topic}}. +it in a buffer named @file{*WoMan @var{section} @var{topic}}. @kbd{M-x woman} computes the completion list for manpages the first time you invoke the command. With a numeric argument, it recomputes @@ -1705,7 +1705,7 @@ inserted on that line, and any @samp{\} there is deleted. @cindex preprocessor highlighting @findex cpp-highlight-buffer Highlight parts of the text according to its preprocessor conditionals. -This command displays another buffer named @samp{*CPP Edit*}, which +This command displays another buffer named @file{*CPP Edit*}, which serves as a graphic menu for selecting how to display particular kinds of conditionals and their contents. After changing various settings, click on @samp{[A]pply these settings} (or go to that buffer and type diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index fe3222e198f..fbea52523ba 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi @@ -8,12 +8,12 @@ @cindex frame On a graphical display, such as on GNU/Linux using the X Window -System, Emacs occupies a ``graphical window''. On a text-only -terminal, Emacs occupies the entire terminal screen. We will use the -term @dfn{frame} to mean a graphical window or terminal screen -occupied by Emacs. Emacs behaves very similarly on both kinds of -frames. It normally starts out with just one frame, but you can -create additional frames if you wish (@pxref{Frames}). +System, Emacs occupies a ``graphical window''. On a text terminal, +Emacs occupies the entire terminal screen. We will use the term +@dfn{frame} to mean a graphical window or terminal screen occupied by +Emacs. Emacs behaves very similarly on both kinds of frames. It +normally starts out with just one frame, but you can create additional +frames if you wish (@pxref{Frames}). Each frame consists of several distinct regions. At the top of the frame is a @dfn{menu bar}, which allows you to access commands via a @@ -131,15 +131,15 @@ Commands that take a long time often display messages ending in progress has been made, as a percentage), and add @samp{done} when they are finished. -@cindex @samp{*Messages*} buffer +@cindex @file{*Messages*} buffer @cindex saved echo area messages @cindex messages saved from echo area @vindex message-log-max Informative echo area messages are saved in a special buffer named -@samp{*Messages*}. (We have not explained buffers yet; see +@file{*Messages*}. (We have not explained buffers yet; see @ref{Buffers}, for more information about them.) If you miss a message that appeared briefly on the screen, you can switch to the -@samp{*Messages*} buffer to see it again. The @samp{*Messages*} +@file{*Messages*} buffer to see it again. The @file{*Messages*} buffer is limited to a certain number of lines, specified by the variable @code{message-log-max}. (We have not explained variables either; see @ref{Variables}, for more information about them.) Beyond @@ -178,7 +178,7 @@ unselected windows, in order to make it stand out. @end example @noindent -On a text-only terminal, this text is followed by a series of dashes +On a text terminal, this text is followed by a series of dashes extending to the right edge of the window. These dashes are omitted on a graphical display. @@ -195,7 +195,7 @@ means no conversion whatsoever, and is usually used for files containing non-textual data. Other characters represent various @dfn{coding systems}---for example, @samp{1} represents ISO Latin-1. - On a text-only terminal, @var{cs} is preceded by two additional + On a text terminal, @var{cs} is preceded by two additional characters that describe the coding systems for keyboard input and terminal output. Furthermore, if you are using an input method, @var{cs} is preceded by a string that identifies the input method @@ -228,7 +228,7 @@ However, if the default-directory for the current buffer is on a remote machine, @samp{@@} is displayed instead (@pxref{File Names}). @var{fr} gives the selected frame name (@pxref{Frames}). It appears -only on text-only terminals. The initial frame's name is @samp{F1}. +only on text terminals. The initial frame's name is @samp{F1}. @var{buf} is the name of the buffer displayed in the window. Usually, this is the same as the name of a file you are editing. @@ -307,13 +307,12 @@ You can then navigate the menus with the arrow keys. To activate a selected menu item, press @key{RET}; to cancel menu navigation, press @key{ESC}. - On a text-only terminal, you can use the menu bar by typing -@kbd{M-`} or @key{F10} (these run the command @code{tmm-menubar}). -This lets you select a menu item with the keyboard. A provisional -choice appears in the echo area. You can use the up and down arrow -keys to move through the menu to different items, and then you can -type @key{RET} to select the item. Each menu item is also designated -by a letter or digit (usually the initial of some word in the item's -name). This letter or digit is separated from the item name by -@samp{=>}. You can type the item's letter or digit to select the -item. + On a text terminal, you can use the menu bar by typing @kbd{M-`} or +@key{F10} (these run the command @code{tmm-menubar}). This lets you +select a menu item with the keyboard. A provisional choice appears in +the echo area. You can use the up and down arrow keys to move through +the menu to different items, and then you can type @key{RET} to select +the item. Each menu item is also designated by a letter or digit +(usually the initial of some word in the item's name). This letter or +digit is separated from the item name by @samp{=>}. You can type the +item's letter or digit to select the item. diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 877e291ff36..38f00f03532 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1308,7 +1308,7 @@ displayed before and after each matching line. @kindex RET @r{(Occur mode)} @kindex o @r{(Occur mode)} @kindex C-o @r{(Occur mode)} -In the @samp{*Occur*} buffer, you can click on each entry, or move +In the @file{*Occur*} buffer, you can click on each entry, or move point there and type @key{RET}, to visit the corresponding position in the buffer that was searched. @kbd{o} and @kbd{C-o} display the match in another window; @kbd{C-o} does not select it. Alternatively, you @@ -1317,7 +1317,7 @@ occurrences one by one (@pxref{Compilation Mode}). @cindex Occur Edit mode @cindex mode, Occur Edit -Typing @kbd{e} in the @samp{*Occur*} buffer switches to Occur Edit +Typing @kbd{e} in the @file{*Occur*} buffer switches to Occur Edit mode, in which edits made to the entries are also applied to the text in the originating buffer. Type @kbd{C-c C-c} to return to Occur mode. diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 5e80eb10824..bf2b41cdbe0 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -12,7 +12,7 @@ @kindex C-x m @findex compose-mail To send an email message from Emacs, type @kbd{C-x m}. This -switches to a buffer named @samp{*unsent mail*}, where you can edit +switches to a buffer named @file{*unsent mail*}, where you can edit the text and headers of the message. When done, type @kbd{C-c C-s} or @kbd{C-c C-c} to send it. @@ -306,7 +306,7 @@ completion, and inserts its definition at point. @cindex Message mode @cindex mode, Message - The default major mode for the @samp{*mail*} buffer is called + The default major mode for the @file{*mail*} buffer is called Message mode. It behaves like Text mode in many ways, but provides several additional commands on the @kbd{C-c} prefix, which make editing a message more convenient. diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 5363da7d649..e56b00e2723 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -1548,7 +1548,7 @@ text that belongs inside. Afterward, use the command @kbd{C-c @}} point, and inserts two newlines to start a new paragraph. It outputs a message in the echo area if any mismatch is found. @kbd{M-x tex-validate-region} checks a region, paragraph by paragraph. The -errors are listed in an @samp{*Occur*} buffer; you can use the usual +errors are listed in an @file{*Occur*} buffer; you can use the usual Occur mode commands in that buffer, such as @kbd{C-c C-c}, to visit a particular mismatch (@pxref{Other Repeating Search}). @@ -1694,7 +1694,7 @@ name with @samp{*} in the command string. For example, @findex tex-recenter-output-buffer @kindex C-c C-l @r{(@TeX{} mode)} The terminal output from @TeX{}, including any error messages, -appears in a buffer called @samp{*tex-shell*}. If @TeX{} gets an +appears in a buffer called @file{*tex-shell*}. If @TeX{} gets an error, you can switch to this buffer and feed it input (this works as in Shell mode; @pxref{Interactive Shell}). Without switching to this buffer you can scroll it so that its last line is visible by typing diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 1b3f1419af4..b118295ab1a 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -172,20 +172,19 @@ used to delete forwards. If this key deletes backward in Emacs, that too suggests Emacs got the wrong information---but in the opposite sense. - On a text-only terminal, if you find that @key{Backspace} prompts -for a Help command, like @kbd{Control-h}, instead of deleting a -character, it means that key is actually sending the @key{BS} -character. Emacs ought to be treating @key{BS} as @key{DEL}, but it -isn't. + On a text terminal, if you find that @key{Backspace} prompts for a +Help command, like @kbd{Control-h}, instead of deleting a character, +it means that key is actually sending the @key{BS} character. Emacs +ought to be treating @key{BS} as @key{DEL}, but it isn't. @findex normal-erase-is-backspace-mode In all of those cases, the immediate remedy is the same: use the command @kbd{M-x normal-erase-is-backspace-mode}. This toggles between the two modes that Emacs supports for handling @key{DEL}, so if Emacs starts in the wrong mode, this should switch to the right -mode. On a text-only terminal, if you want to ask for help when -@key{BS} is treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also -work, if it sends character code 127. +mode. On a text terminal, if you want to ask for help when @key{BS} +is treated as @key{DEL}, use @key{F1}; @kbd{C-?} may also work, if it +sends character code 127. To fix the problem in every Emacs session, put one of the following lines into your initialization file (@pxref{Init File}). For the @@ -327,8 +326,8 @@ not make a backup of its old contents. @node Emergency Escape @subsection Emergency Escape - On text-only terminals, the @dfn{emergency escape} feature suspends -Emacs immediately if you type @kbd{C-g} a second time before Emacs can + On text terminals, the @dfn{emergency escape} feature suspends Emacs +immediately if you type @kbd{C-g} a second time before Emacs can actually respond to the first one by quitting. This is so you can always get out of GNU Emacs no matter how badly it might be hung. When things are working properly, Emacs recognizes and handles the @@ -636,7 +635,7 @@ Emacs, so you will have to report the bug somewhere else. The type of machine you are using, and the operating system name and version number (again, automatically included by @kbd{M-x report-emacs-bug}). @kbd{M-x emacs-version @key{RET}} provides this -information too. Copy its output from the @samp{*Messages*} buffer, +information too. Copy its output from the @file{*Messages*} buffer, so that you get it all and get it accurately. @item @@ -699,7 +698,7 @@ The way to collect the terminal output is to execute the Lisp expression @end example @noindent -using @kbd{M-:} or from the @samp{*scratch*} buffer just after +using @kbd{M-:} or from the @file{*scratch*} buffer just after starting Emacs. From then on, Emacs copies all terminal output to the specified termscript file as well, until the Emacs process is killed. If the problem happens when Emacs starts up, put this expression into @@ -725,10 +724,10 @@ Alternatively, use the @command{locale} command, if your system has it, to display your locale settings. You can use the @kbd{M-!} command to execute these commands from -Emacs, and then copy the output from the @samp{*Messages*} buffer into +Emacs, and then copy the output from the @file{*Messages*} buffer into the bug report. Alternatively, @kbd{M-x getenv @key{RET} LC_ALL @key{RET}} will display the value of @code{LC_ALL} in the echo area, and -you can copy its output from the @samp{*Messages*} buffer. +you can copy its output from the @file{*Messages*} buffer. @item A description of what behavior you observe that you believe is @@ -761,7 +760,7 @@ important to report the precise text of the error message, and a backtrace showing how the Lisp program in Emacs arrived at the error. To get the error message text accurately, copy it from the -@samp{*Messages*} buffer into the bug report. Copy all of it, not just +@file{*Messages*} buffer into the bug report. Copy all of it, not just part. @findex toggle-debug-on-error diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index 3733eed3eca..ee0f0027454 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi @@ -36,8 +36,8 @@ has its own value of point. At any time, one Emacs window is the @dfn{selected window}; the buffer this window is displaying is the current buffer. On graphical displays, the point is indicated by a solid blinking cursor in the -selected window, and by a hollow box in non-selected windows. On -text-only terminals, the cursor is drawn only in the selected window. +selected window, and by a hollow box in non-selected windows. On text +terminals, the cursor is drawn only in the selected window. @xref{Cursor Display}. Commands to move point affect the value of point for the selected diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index adac111f5f9..d9ebf07952c 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog @@ -1,3 +1,7 @@ +2012-04-14 Glenn Morris + + * Makefile.in: Replace non-portable use of $< in ordinary rules. + 2012-02-28 Glenn Morris * emacs-lisp-intro.texi: Standardize possessive apostrophe usage. diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in index fa9a0a4037c..c638dd6135f 100644 --- a/doc/lispintro/Makefile.in +++ b/doc/lispintro/Makefile.in @@ -1,6 +1,6 @@ #### Makefile for the Emacs Lisp Introduction manual -# Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -48,21 +48,22 @@ ps: emacs-lisp-intro.ps # The file name eintr must fit within 5 characters, to allow for # -NN extensions to fit into DOS 8+3 limits without clashing. +# Note: "<" is not portable in ordinary make rules. ${infodir}/eintr: ${srcdir}/emacs-lisp-intro.texi $(mkinfodir) - $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $< + $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi emacs-lisp-intro.dvi: ${srcdir}/emacs-lisp-intro.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi emacs-lisp-intro.ps: emacs-lisp-intro.dvi - $(DVIPS) -o $@ $< + $(DVIPS) -o $@ emacs-lisp-intro.dvi emacs-lisp-intro.pdf: ${srcdir}/emacs-lisp-intro.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-lisp-intro.texi emacs-lisp-intro.html: ${srcdir}/emacs-lisp-intro.texi - $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $< + $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ ${srcdir}/emacs-lisp-intro.texi .PHONY: mostlyclean clean distclean maintainer-clean infoclean diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 81558bbd248..cc5660653f6 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,133 @@ +2012-04-20 Chong Yidong + + * processes.texi (Asynchronous Processes): Mention nil argument to + start-process. + +2012-04-20 Glenn Morris + + * minibuf.texi (Basic Completion): No need to describe obarrays here. + Don't mention obsolete `nospace' argument of all-completions. + (Minibuffer Completion, Completion Commands, Reading File Names) + (Completion Variables): Copyedits. + (Completion Commands): Mention parent keymaps. + Remove obsolete minibuffer-local-filename-must-match-map. + (High-Level Completion): Remove read-variable's almost + word-for-word duplication of read-command. + * elisp.texi, vol1.texi, vol2.texi, minibuf.texi (Completion): + Update "High-Level Completion" description. + + * minibuf.texi (Minibuffers): + * elisp.texi, vol1.texi, vol2.texi: Fix minibuffer subsection order. + + * minibuf.texi: Standardize metasyntactic variables ("history", etc). + Use Texinfo-recommended form of quote+punctuation. + (Intro to Minibuffers): First minibuffer is #1, not #0. + Mention minibuffer-inactive-mode. + (Text from Minibuffer): Copyedits. + (Minibuffer History, Programmed Completion): Fix @var usage. + (Object from Minibuffer): Remove overly pedantic para. + (Minibuffer History): Copyedits. Add face-name-history. + (Initial Input, Yes-or-No Queries, Multiple Queries) + (Minibuffer Windows, Minibuffer Misc): Copyedits. + (Yes-or-No Queries): Tweak example. + (Minibuffer Commands): Add next-complete-history-element. + (Minibuffer Misc): Mention minibuffer-message-timeout, and + minibuffer-inactive-mode. + + * processes.texi (Serial Ports, Byte Packing, Bindat Spec) + (Bindat Functions): Copyedits. + +2012-04-20 Christopher Schmidt + + * files.texi (Saving Buffers): Document `visit and `visit-save' + values of require-final-newline. + +2012-04-20 Glenn Morris + + * processes.texi (Output from Processes, Filter Functions): + Mention waiting-for-user-input-p. + (Sentinels, Query Before Exit, System Processes, Transaction Queues): + (Network Servers, Datagrams, Network Processes, Network Options) + (Network Feature Testing, Serial Ports): Copyedits. + (Network): Add encrypted network overview paragraph. + Cross-reference the Emacs-GnuTLS manual. Use @acronym. + +2012-04-20 Chong Yidong + + * help.texi (Keys in Documentation): Mention :advertised-binding. + + * keymaps.texi (Menu Bar): Move most of the :advertised-binding + description to help.texi. + +2012-04-20 Glenn Morris + + * processes.texi (Process Information, Input to Processes) + (Signals to Processes, Output from Processes, Process Buffers) + (Filter Functions, Decoding Output): Copyedits. + (Accepting Output): Discourage use of `millisec' argument. + +2012-04-15 Glenn Morris + + * processes.texi (Processes, Subprocess Creation, Shell Arguments): + (Synchronous Processes, Asynchronous Processes, Deleting Processes): + Copyedits. + (Subprocess Creation): Discourage modifying exec-path directly. + (Synchronous Processes, Asynchronous Processes): + Update some example output. + (Process Information): Fix typo. + (Bindat Spec): Use Texinfo-recommended form of quote+punctuation. + +2012-04-15 Glenn Morris + + * anti.texi (Antinews): Copyedits. Don't @dfn anything here. + open-network-stream does exist in Emacs 23, but is simpler. + +2012-04-15 Chong Yidong + + * customize.texi (Custom Themes): Also document load-theme etc. + +2012-04-14 Chong Yidong + + * customize.texi (Applying Customizations): + (Custom Themes): New nodes. + + * display.texi (Defining Faces): Reference custom-set-faces. + + * modes.texi (Defining Minor Modes, Defining Minor Modes): + * os.texi (Startup Summary): Copyedits. + +2012-04-14 Glenn Morris + + * loading.texi (Loading Non-ASCII): "unibyte:" can also be at the end. + + * strings.texi (Case Tables): + * objects.texi (General Escape Syntax): + * keymaps.texi (Key Sequences): Use @acronym with "ASCII". + + * buffers.texi, compile.texi, customize.texi, debugging.texi: + * display.texi, edebug.texi, eval.texi, help.texi, intro.texi: + * keymaps.texi, minibuf.texi, modes.texi, os.texi, processes.texi: + * text.texi: Use @file for buffers, per the Texinfo manual. + + * compile.texi (Compiler Errors): Add missing space in buffer name. + +2012-04-14 Chong Yidong + + * processes.texi (Query Before Exit): Remove obsolete function + process-kill-without-query (Bug#11190). + +2012-04-14 Glenn Morris + + * files.texi, frames.texi, loading.texi, os.texi, processes.texi: + Use @env for environment variables. + + * Makefile.in: Replace non-portable use of $< in ordinary rules. + +2012-04-12 Jari Aalto + + * processes.texi (Synchronous Processes): Mention + `default-directory' (bug#7515). + 2012-04-09 Chong Yidong * customize.texi (Variable Definitions): Remove user-variable-p. diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in index 5094a3f8ab6..10ec236eaee 100644 --- a/doc/lispref/Makefile.in +++ b/doc/lispref/Makefile.in @@ -106,21 +106,22 @@ html: elisp.html pdf: elisp.pdf ps: elisp.ps +## Note: "<" is not portable in ordinary make rules. $(infodir)/elisp: $(srcs) $(mkinfodir) - $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $< + $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $(srcdir)/elisp.texi elisp.dvi: $(srcs) - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi elisp.html: $(srcs) - $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $< + $(MAKEINFO) $(MAKEINFO_OPTS) --html -o $@ $(srcdir)/elisp.texi elisp.ps: elisp.dvi - $(DVIPS) -o $@ $< + $(DVIPS) -o $@ elisp.dvi elisp.pdf: $(srcs) - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) $(srcdir)/elisp.texi .PHONY: mostlyclean clean distclean maintainer-clean infoclean diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi index a64e8a0bd51..ada58c1c9e4 100644 --- a/doc/lispref/abbrevs.texi +++ b/doc/lispref/abbrevs.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1994, 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/abbrevs @node Abbrevs, Processes, Syntax Tables, Top @chapter Abbrevs and Abbrev Expansion @cindex abbrev diff --git a/doc/lispref/advice.texi b/doc/lispref/advice.texi index a2f59b2ddc9..23f3d6d95c3 100644 --- a/doc/lispref/advice.texi +++ b/doc/lispref/advice.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/advising @node Advising Functions, Debugging, Byte Compilation, Top @chapter Advising Emacs Lisp Functions @cindex advising functions diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi index 0e3c9eadeae..59f8f91c855 100644 --- a/doc/lispref/anti.texi +++ b/doc/lispref/anti.texi @@ -65,9 +65,9 @@ Emacs windows now have most of their internal state hidden from Lisp. Internal windows are no longer visible to Lisp; functions such as @code{window-parent}, window parameters related to window arrangement, and window-local buffer lists have all been removed. Functions for -resizing windows can delete windows if when they become too small. +resizing windows can delete windows if they become too small. -The @dfn{action function} feature for controlling buffer display has +The ``action function'' feature for controlling buffer display has been removed, including @code{display-buffer-overriding-action} and related variables, as well as the @var{action} argument to @code{display-buffer} and other functions. The way to @@ -80,7 +80,7 @@ variables. The standard completion interface has been simplified, eliminating the @code{completion-extra-properties} variable, the @code{metadata} action flag for completion functions, and the concept of -@dfn{completion categories}. Lisp programmers may now find the choice +``completion categories''. Lisp programmers may now find the choice of methods for tuning completion less bewildering, but if a package finds the streamlined interface insufficient for its needs, it must implement its own specialized completion feature. @@ -123,17 +123,19 @@ an additional @var{cache} entry in their definitions, like this: The @var{cache} entry is used internally by Emacs to record equivalent keyboard key sequences for invoking the same command; Lisp programs should never use it. +@c Not really NEWS-worthy then... @item -The @code{open-network-stream} function has been removed, and so has -the @code{gnutls} library. Lisp programs that want an encrypted -network connection must now call external utilities such as -@command{starttls} or @command{gnutls-cli}. +The @code{gnutls} library has been removed, and the function +@code{open-network-stream} correspondingly simplified. +Lisp programs that want an encrypted network connection must now call +external utilities such as @command{starttls} or @command{gnutls-cli}. @item Tool bars can no longer display separators, which frees up several pixels of space on each graphical frame. @item -Many other functions and variables have been eliminated. +As part of the ongoing quest for simplicity, many other functions and +variables have been eliminated. @end itemize diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index a1c5f20f28c..01dff70a5a4 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1999, 2001-2012 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/backups @node Backups and Auto-Saving, Buffers, Files, Top @chapter Backups and Auto-Saving @cindex backups and auto-saving diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 125a886ecb2..844b6423a52 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/buffers @node Buffers, Windows, Backups and Auto-Saving, Top @chapter Buffers @cindex buffer @@ -863,7 +862,7 @@ a buffer visible in any window on any visible frame, except as a last resort. If @var{visible-ok} is non-@code{nil}, then it does not matter whether a buffer is displayed somewhere or not. -If no suitable buffer exists, the buffer @samp{*scratch*} is returned +If no suitable buffer exists, the buffer @file{*scratch*} is returned (and created, if necessary). @end defun @@ -874,7 +873,7 @@ selected frame's buffer list. The argument @var{visible-ok} is handled as with @code{other-buffer}, see above. If no suitable buffer can be found, the buffer -@samp{*scratch*} is returned. +@file{*scratch*} is returned. @end defun @deffn Command bury-buffer &optional buffer-or-name diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 95039d36b7e..bf26d83b7bf 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/commands @node Command Loop, Keymaps, Minibuffers, Top @chapter Command Loop @cindex editor command loop diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 90d038c29d6..ead75942b24 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/compile @node Byte Compilation, Advising Functions, Loading, Top @chapter Byte Compilation @cindex byte compilation @@ -92,7 +91,7 @@ the @code{byte-compile} function. You can compile a whole file with Sometimes, the byte compiler produces warning and/or error messages (@pxref{Compiler Errors}, for details). These messages are recorded -in a buffer called @samp{*Compile-Log*}, which uses Compilation mode. +in a buffer called @file{*Compile-Log*}, which uses Compilation mode. @xref{Compilation Mode,,,emacs, The GNU Emacs Manual}. @cindex macro compilation @@ -443,14 +442,14 @@ to what @code{eval-when-compile} does. @cindex compiler errors Byte compilation outputs all errors and warnings into the buffer -@samp{*Compile-Log*}. The messages include file names and line +@file{*Compile-Log*}. The messages include file names and line numbers that identify the location of the problem. The usual Emacs commands for operating on compiler diagnostics work properly on these messages. When an error is due to invalid syntax in the program, the byte compiler might get confused about the errors' exact location. One way -to investigate is to switch to the buffer @w{@samp{*Compiler Input*}}. +to investigate is to switch to the buffer @w{@file{ *Compiler Input*}}. (This buffer name starts with a space, so it does not show up in @kbd{M-x list-buffers}.) This buffer contains the program being compiled, and point shows how far the byte compiler was able to read; @@ -602,7 +601,7 @@ the stack. @deffn Command disassemble object &optional buffer-or-name This command displays the disassembled code for @var{object}. In interactive use, or if @var{buffer-or-name} is @code{nil} or omitted, -the output goes in a buffer named @samp{*Disassemble*}. If +the output goes in a buffer named @file{*Disassemble*}. If @var{buffer-or-name} is non-@code{nil}, it must be a buffer or the name of an existing buffer. Then the output goes there, at point, and point is left before the output. diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 8c45a1a4faf..aa24291d892 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 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/control @node Control Structures, Variables, Evaluation, Top @chapter Control Structures @cindex special forms for control structures diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index d86aea24fbc..04b3cdd11f0 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1,23 +1,27 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1997-2012 Free Software Foundation, Inc. +@c Copyright (C) 1997-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/customize @node Customization, Loading, Macros, Top -@chapter Writing Customization Definitions +@chapter Customization Settings -@cindex customization definitions - This chapter describes how to declare user options for customization, -and also customization groups for classifying them. We use the term -@dfn{customization item} to include both kinds of customization -definitions---as well as face definitions (@pxref{Defining Faces}). +@cindex customization item + This chapter describes how to declare customizable variables and +customization groups for classifying them. We use the term +@dfn{customization item} to include customizable variables, +customization groups, as well as faces. + + @xref{Defining Faces}, for the @code{defface} macro, which is used +for declaring customizable faces. @menu -* Common Keywords:: Common keyword arguments for all kinds of - customization declarations. -* Group Definitions:: Writing customization group definitions. -* Variable Definitions:: Declaring user options. -* Customization Types:: Specifying the type of a user option. +* Common Keywords:: Common keyword arguments for all kinds of + customization declarations. +* Group Definitions:: Writing customization group definitions. +* Variable Definitions:: Declaring user options. +* Customization Types:: Specifying the type of a user option. +* Applying Customizations:: Functions to apply customization settings. +* Custom Themes:: Writing Custom themes. @end menu @node Common Keywords @@ -306,7 +310,7 @@ individual types for a description of how to use @code{:options}. @item :set @var{setfunction} @kindex set@r{, @code{defcustom} keyword} Specify @var{setfunction} as the way to change the value of this -option when using the Customize user interface. The function +option when using the Customize interface. The function @var{setfunction} should take two arguments, a symbol (the option name) and the new value, and should do whatever is necessary to update the value properly for this option (which may not mean simply setting @@ -588,7 +592,7 @@ The value must be a coding-system name, and you can do completion with @item color The value must be a valid color name. The widget provides completion for color names, as well as a sample and a button for selecting a -color name from a list of color names shown in a @samp{*Colors*} +color name from a list of color names shown in a @file{*Colors*} buffer. @end table @@ -1242,3 +1246,168 @@ the inferior widgets will convert @emph{their} inferior widgets. If the data structure is itself recursive, this conversion is an infinite recursion. The @code{lazy} widget prevents the recursion: it convert its @code{:type} argument only when needed. + +@node Applying Customizations +@section Applying Customizations + +The following functions are responsible for installing the user's +customization settings for variables and faces, respectively. When +the user invokes @samp{Save for future sessions} in the Customize +interface, that takes effect by writing a @code{custom-set-variables} +and/or a @code{custom-set-faces} form into the custom file, to be +evaluated the next time Emacs starts up. + +@defun custom-set-variables &rest args +This function installs the variable customizations specified by +@var{args}. Each argument in @var{args} should have the form + +@example +(@var{var} @var{expression} [@var{now} [@var{request} [@var{comment}]]]) +@end example + +@noindent +@var{var} is a variable name (a symbol), and @var{expression} is an +expression which evaluates to the desired customized value. + +If the @code{defcustom} form for @var{var} has been evaluated prior to +this @code{custom-set-variables} call, @var{expression} is immediately +evaluated, and the variable's value is set to the result. Otherwise, +@var{expression} is stored into the variable's @code{saved-value} +property, to be evaluated when the relevant @code{defcustom} is called +(usually when the library defining that variable is loaded into +Emacs). + +The @var{now}, @var{request}, and @var{comment} entries are for +internal use only, and may be omitted. @var{now}, if non-@code{nil}, +means to set the variable's value now, even if the variable's +@code{defcustom} form has not been evaluated. @var{request} is a list +of features to be loaded immediately (@pxref{Named Features}). +@var{comment} is a string describing the customization. +@end defun + +@defun custom-set-faces &rest args +This function installs the face customizations specified by +@var{args}. Each argument in @var{args} should have the form + +@example +(@var{face} @var{spec} [@var{now} [@var{comment}]]) +@end example + +@noindent +@var{face} is a face name (a symbol), and @var{spec} is the customized +face specification for that face (@pxref{Defining Faces}). + +The @var{now} and @var{comment} entries are for internal use only, and +may be omitted. @var{now}, if non-@code{nil}, means to install the +face specification now, even if the @code{defface} form has not been +evaluated. @var{comment} is a string describing the customization. +@end defun + +@node Custom Themes +@section Custom Themes + + @dfn{Custom themes} are collections of settings that can be enabled +or disabled as a unit. @xref{Custom Themes,,, emacs, The GNU Emacs +Manual}. Each Custom theme is defined by an Emacs Lisp source file, +which should follow the conventions described in this section. +(Instead of writing a Custom theme by hand, you can also create one +using a Customize-like interface; @pxref{Creating Custom Themes,,, +emacs, The GNU Emacs Manual}.) + + A Custom theme file should be named @file{@var{foo}-theme.el}, where +@var{foo} is the theme name. The first Lisp form in the file should +be a call to @code{deftheme}, and the last form should be a call to +@code{provide-theme}. + +@defmac deftheme theme &optional doc +This macro declares @var{theme} (a symbol) as the name of a Custom +theme. The optional argument @var{doc} should be a string describing +the theme; this is the description shown when the user invokes the +@code{describe-theme} command or types @kbd{?} in the @samp{*Custom +Themes*} buffer. + +Two special theme names are disallowed: @code{user} is a ``dummy'' +theme which stores the user's direct customization settings, and +@code{changed} is a ``dummy'' theme which stores changes made outside +of the Customize system. If you specify either of these as the +@var{theme} argument, @code{deftheme} signals an error. +@end defmac + +@defmac provide-theme theme +This macro declares that the theme named @var{theme} has been fully +specified. +@end defmac + + In between @code{deftheme} and @code{provide-theme} are Lisp forms +specifying the theme settings: usually a call to +@code{custom-theme-set-variables} and/or a call to +@code{custom-theme-set-faces}. + +@defun custom-theme-set-variables theme &rest args +This function specifies the Custom theme @var{theme}'s variable +settings. @var{theme} should be a symbol. Each argument in +@var{args} should be a list of the form + +@example +(@var{var} @var{expression} [@var{now} [@var{request} [@var{comment}]]]) +@end example + +@noindent +where the list entries have the same meanings as in +@code{custom-set-variables}. @xref{Applying Customizations}. +@end defun + +@defun custom-theme-set-faces theme &rest args +This function specifies the Custom theme @var{theme}'s face settings. +@var{theme} should be a symbol. Each argument in @var{args} should be +a list of the form + +@example +(@var{face} @var{spec} [@var{now} [@var{comment}]]) +@end example + +@noindent +where the list entries have the same meanings as in +@code{custom-set-faces}. @xref{Applying Customizations}. +@end defun + + In theory, a theme file can also contain other Lisp forms, which +would be evaluated when loading the theme, but that is ``bad form''. +To protect against loading themes containing malicious code, Emacs +displays the source file and asks for confirmation from the user +before loading any non-built-in theme for the first time. + + The following functions are useful for programmatically enabling and +disabling Custom themes: + +@defun custom-theme-p theme +This function return a non-@code{nil} value if @var{theme} (a symbol) +is the name of a Custom theme (i.e.@: a Custom theme which has been +loaded into Emacs, whether or not the theme is enabled). Otherwise, +it returns @code{nil}. +@end defun + +@deffn Command load-theme theme &optional no-confirm no-enable +This function loads the Custom theme named @var{theme} from its source +file, looking for the source file in the directories specified by the +variable @code{custom-theme-load-path}. @xref{Custom Themes,,, emacs, +The GNU Emacs Manual}. It also @dfn{enables} the theme, causing its +variable and face settings to take effect. + +If the optional argument @var{no-confirm} is non-@code{nil}, this +skips prompting the user for confirmation before loading the theme. + +If the optional argument @var{no-enable} is non-@code{nil}, the theme +is loaded but not enabled. +@end deffn + +@deffn Command enable-theme theme +This function enables the Custom theme named @var{theme}. It signals +an error if no such theme has been loaded. +@end deffn + +@deffn Command disable-theme theme +This function disables the Custom theme named @var{theme}. The theme +remains loaded, so that a subsequent call to @code{enable-theme} will +re-enable it. +@end deffn diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 6e7d0078e07..3c446b07f60 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/debugging @node Debugging, Read and Print, Advising Functions, Top @chapter Debugging Lisp Programs @@ -303,7 +302,7 @@ an implicit @code{progn} (@pxref{Sequencing}). @subsection Using the Debugger When the debugger is entered, it displays the previously selected -buffer in one window and a buffer named @samp{*Backtrace*} in another +buffer in one window and a buffer named @file{*Backtrace*} in another window. The backtrace buffer contains one line for each level of Lisp function execution currently going on. At the beginning of this buffer is a message describing the reason that the debugger was invoked (such @@ -412,7 +411,7 @@ the variable values within the debugger. @item R Like @kbd{e}, but also save the result of evaluation in the -buffer @samp{*Debugger-record*}. +buffer @file{*Debugger-record*}. @item q Terminate the program being debugged; return to top-level Emacs @@ -450,7 +449,7 @@ to invoke the debugger. @defun debug &rest debugger-args This function enters the debugger. It switches buffers to a buffer -named @samp{*Backtrace*} (or @samp{*Backtrace*<2>} if it is the second +named @file{*Backtrace*} (or @file{*Backtrace*<2>} if it is the second recursive entry to the debugger, etc.), and fills it with information about the stack of Lisp function calls. It then enters a recursive edit, showing the backtrace buffer in Debugger mode. @@ -461,7 +460,7 @@ buffer and returns to whatever called @code{debug}. This is the only way the function @code{debug} can return to its caller. The use of the @var{debugger-args} is that @code{debug} displays the -rest of its arguments at the top of the @samp{*Backtrace*} buffer, so +rest of its arguments at the top of the @file{*Backtrace*} buffer, so that the user can see them. Except as described below, this is the @emph{only} way these arguments are used. @@ -560,7 +559,7 @@ of @code{debug} (@pxref{Invoking the Debugger}). @cindex call stack This function prints a trace of Lisp function calls currently active. This is the function used by @code{debug} to fill up the -@samp{*Backtrace*} buffer. It is written in C, since it must have access +@file{*Backtrace*} buffer. It is written in C, since it must have access to the stack to determine which function calls are active. The return value is always @code{nil}. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 8382c2a1555..0113ae86358 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/display @node Display, System Interface, Processes, Top @chapter Emacs Display @@ -268,7 +267,7 @@ objects for its format specifications, like in the @code{format} function (@pxref{Formatting Strings}). The resulting formatted string is displayed in the echo area; if it contains @code{face} text properties, it is displayed with the specified faces (@pxref{Faces}). -The string is also added to the @samp{*Messages*} buffer, but without +The string is also added to the @file{*Messages*} buffer, but without text properties (@pxref{Logging Messages}). In batch mode, the message is printed to the standard error stream, @@ -341,7 +340,7 @@ buffer is used, the window used to display it. If @var{message} is a string, then the optional argument @var{buffer-name} is the name of the buffer used to display it when a -pop-up buffer is used, defaulting to @samp{*Message*}. In the case +pop-up buffer is used, defaulting to @file{*Message*}. In the case where @var{message} is a string and displayed in the echo area, it is not specified whether the contents are inserted into the buffer anyway. @@ -474,16 +473,16 @@ this macro this way: @end defmac @node Logging Messages -@subsection Logging Messages in @samp{*Messages*} +@subsection Logging Messages in @file{*Messages*} @cindex logging echo-area messages Almost all the messages displayed in the echo area are also recorded -in the @samp{*Messages*} buffer so that the user can refer back to +in the @file{*Messages*} buffer so that the user can refer back to them. This includes all the messages that are output with @code{message}. @defopt message-log-max -This variable specifies how many lines to keep in the @samp{*Messages*} +This variable specifies how many lines to keep in the @file{*Messages*} buffer. The value @code{t} means there is no limit on how many lines to keep. The value @code{nil} disables message logging entirely. Here's how to display a message and prevent it from being logged: @@ -494,7 +493,7 @@ how to display a message and prevent it from being logged: @end example @end defopt - To make @samp{*Messages*} more convenient for the user, the logging + To make @file{*Messages*} more convenient for the user, the logging facility combines successive identical messages. It also combines successive related messages for the sake of two cases: question followed by answer, and a series of progress messages. @@ -624,7 +623,7 @@ and @var{type} as the warning type. @var{level} should be the severity level, with @code{:warning} being the default. @var{buffer-name}, if non-@code{nil}, specifies the name of the buffer -for logging the warning. By default, it is @samp{*Warnings*}. +for logging the warning. By default, it is @file{*Warnings*}. @end defun @defun lwarn type level message &rest args @@ -1885,7 +1884,7 @@ in all frames. But you can also assign a face name a special set of attributes in one frame (@pxref{Attribute Functions}). @menu -* Defining Faces:: How to define a face with @code{defface}. +* Defining Faces:: How to define a face. * Face Attributes:: What is in a face? * Attribute Functions:: Functions to examine and set face attributes. * Displaying Faces:: How Emacs combines the faces specified for a character. @@ -1904,22 +1903,17 @@ attributes in one frame (@pxref{Attribute Functions}). @node Defining Faces @subsection Defining Faces - The way to define a new face is with @code{defface}. This creates a -kind of customization item which the user can customize using the -Customization buffer (@pxref{Customization}). - - People are sometimes tempted to create variables whose values specify -which faces to use (for example, Font-Lock does this). In the vast -majority of cases, this is not necessary, and simply using faces -directly is preferable. + The @code{defface} macro defines a face and specifies its default +appearance. The user can subsequently customize the face using the +Customize interface (@pxref{Customization}). @defmac defface face spec doc [keyword value]@dots{} -This declares @var{face} as a customizable face whose default +This macro declares @var{face} as a customizable face whose default attributes are given by @var{spec}. You should not quote the symbol @var{face}, and it should not end in @samp{-face} (that would be -redundant). The argument @var{doc} specifies the face documentation. -The keywords you can use in @code{defface} are the same as in -@code{defgroup} and @code{defcustom} (@pxref{Common Keywords}). +redundant). The argument @var{doc} is a documentation string for the +face. The additional @var{keyword} arguments have the same meanings +as in @code{defgroup} and @code{defcustom} (@pxref{Common Keywords}). When @code{defface} executes, it defines the face according to @var{spec}, then uses any customizations that were read from the @@ -1930,12 +1924,14 @@ Lisp mode (@code{eval-defun}), a special feature of @code{eval-defun} overrides any customizations of the face. This way, the face reflects exactly what the @code{defface} says. -The purpose of @var{spec} is to specify how the face should appear on -different kinds of terminals. It should be an alist whose elements -have the form @code{(@var{display} @var{atts})}. @var{display} -specifies a class of terminals (see below), while @var{atts} is a -property list of face attributes and their values, specifying the -appearance of the face on matching terminals +@cindex face specification +The @var{spec} argument is a @dfn{face specification}, which states +how the face should appear on different kinds of terminals. It should +be an alist whose elements each have the form @code{(@var{display} +@var{atts})}. @var{display} specifies a class of terminals (see +below), while @var{atts} is a property list of face attributes and +their values, specifying the appearance of the face on matching +terminals @iftex (see the next section for details about face attributes). @end iftex @@ -2022,14 +2018,22 @@ frame must match one of the @var{value}s specified for it in :group 'basic-faces) @end example - Internally, @code{defface} uses the symbol property -@code{face-defface-spec} to record the specified face attributes. The -attributes saved by the user with the customization buffer are -recorded in the symbol property @code{saved-face}; the attributes -customized by the user for the current session, but not saved, are -recorded in the symbol property @code{customized-face}. The -documentation string is recorded in the symbol property -@code{face-documentation}. + Internally, Emacs stores the face's default specification in its +@code{face-defface-spec} symbol property (@pxref{Property Lists}). +The @code{saved-face} property stores the face specification saved by +the user, using the customization buffer; the @code{customized-face} +property stores the face specification customized for the current +session, but not saved; and the @code{theme-face} property stores an +alist associating the active customization settings and Custom themes +with their specifications for that face. The face's documentation +string is stored in the @code{face-documentation} property. But +normally you should not try to set any of these properties directly. +@xref{Applying Customizations}, for the @code{custom-set-faces} +function, which is used to apply customized face settings. + + People are sometimes tempted to create variables whose values +specify a face to use. In the vast majority of cases, this is not +necessary; it is preferable to simply use faces directly. @defopt frame-background-mode This option, if non-@code{nil}, specifies the background type to use for @@ -2752,7 +2756,7 @@ For text matching a search command. @itemx warning @itemx success For text concerning errors, warnings, or successes. For example, -these are used for messages in @samp{*Compilation*} buffers. +these are used for messages in @file{*Compilation*} buffers. @end table @node Font Selection diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 245aaf94c6d..9d50f5fb31f 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -622,7 +622,7 @@ back to the stop point in the source code buffer from any buffer using saved outside window configuration---so that even if you turn saving back @emph{on}, the current window configuration remains unchanged when you next exit Edebug (by continuing the program). However, the -automatic redisplay of @samp{*edebug*} and @samp{*edebug-trace*} may +automatic redisplay of @file{*edebug*} and @file{*edebug-trace*} may conflict with the buffers you wish to see unless you have enough windows open. @@ -661,18 +661,18 @@ lexically bound symbols created by the following constructs in @node Eval List @subsection Evaluation List Buffer - You can use the @dfn{evaluation list buffer}, called @samp{*edebug*}, to + You can use the @dfn{evaluation list buffer}, called @file{*edebug*}, to evaluate expressions interactively. You can also set up the @dfn{evaluation list} of expressions to be evaluated automatically each time Edebug updates the display. @table @kbd @item E -Switch to the evaluation list buffer @samp{*edebug*} +Switch to the evaluation list buffer @file{*edebug*} (@code{edebug-visit-eval-list}). @end table - In the @samp{*edebug*} buffer you can use the commands of Lisp + In the @file{*edebug*} buffer you can use the commands of Lisp Interaction mode (@pxref{Lisp Interaction,,, emacs, The GNU Emacs Manual}) as well as these special commands: @@ -699,7 +699,7 @@ Switch back to the source code buffer at the current stop point @end table You can evaluate expressions in the evaluation list window with -@kbd{C-j} or @kbd{C-x C-e}, just as you would in @samp{*scratch*}; +@kbd{C-j} or @kbd{C-x C-e}, just as you would in @file{*scratch*}; but they are evaluated in the context outside of Edebug. The expressions you enter interactively (and their results) are lost @@ -758,8 +758,8 @@ the expression at a suitable place, insert a new comment line, then type @kbd{C-c C-u}. You need not insert dashes in the comment line---its contents don't matter. -After selecting @samp{*edebug*}, you can return to the source code -buffer with @kbd{C-c C-w}. The @samp{*edebug*} buffer is killed when +After selecting @file{*edebug*}, you can return to the source code +buffer with @kbd{C-c C-w}. The @file{*edebug*} buffer is killed when you continue execution, and recreated next time it is needed. @node Printing in Edebug @@ -819,7 +819,7 @@ for details. @cindex trace buffer Edebug can record an execution trace, storing it in a buffer named -@samp{*edebug-trace*}. This is a log of function calls and returns, +@file{*edebug-trace*}. This is a log of function calls and returns, showing the function names and their arguments and values. To enable trace recording, set @code{edebug-trace} to a non-@code{nil} value. @@ -1567,7 +1567,7 @@ The default value is @code{step}. @defopt edebug-trace If this is non-@code{nil}, trace each function entry and exit. -Tracing output is displayed in a buffer named @samp{*edebug-trace*}, one +Tracing output is displayed in a buffer named @file{*edebug-trace*}, one function entry or exit per line, indented by the recursion level. Also see @code{edebug-tracing}, in @ref{Trace Buffer}. diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index dc835347235..4319d5eddda 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -123,7 +123,7 @@ Cover art by Etienne Suvasa. * Functions:: A function is a Lisp program that can be invoked from other functions. * Macros:: Macros are a way to extend the Lisp language. -* Customization:: Writing customization declarations. +* Customization:: Making variables and faces customizable. * Loading:: Reading files of Lisp code into Lisp. * Byte Compilation:: Compilation makes programs run faster. @@ -500,6 +500,8 @@ Writing Customization Definitions * Group Definitions:: Writing customization group definitions. * Variable Definitions:: Declaring user options. * Customization Types:: Specifying the type of a user option. +* Applying Customizations:: Functions to apply customization settings. +* Custom Themes:: Writing Custom themes. Customization Types @@ -635,8 +637,8 @@ Minibuffers * Multiple Queries:: Asking a series of similar questions. * Reading a Password:: Reading a password from the terminal. * Minibuffer Commands:: Commands used as key bindings in minibuffers. -* Minibuffer Contents:: How such commands access the minibuffer text. * Minibuffer Windows:: Operating on the special minibuffer windows. +* Minibuffer Contents:: How such commands access the minibuffer text. * Recursive Mini:: Whether recursive entry to minibuffer is allowed. * Minibuffer Misc:: Various customization hooks and variables. @@ -646,7 +648,7 @@ Completion * Minibuffer Completion:: Invoking the minibuffer with completion. * Completion Commands:: Minibuffer commands that do completion. * High-Level Completion:: Convenient special cases of completion - (reading buffer name, file name, etc.). + (reading buffer names, variable names, etc.). * Reading File Names:: Using completion to read file names and shell commands. * Completion Variables:: Variables controlling completion behavior. @@ -1295,7 +1297,7 @@ Overlays Faces -* Defining Faces:: How to define a face with @code{defface}. +* Defining Faces:: How to define a face. * Face Attributes:: What is in a face? * Attribute Functions:: Functions to examine and set face attributes. * Displaying Faces:: How Emacs combines the faces specified for diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi index 76ab8b235f5..8e73535d781 100644 --- a/doc/lispref/errors.texi +++ b/doc/lispref/errors.texi @@ -2,7 +2,6 @@ @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/errors @node Standard Errors, Standard Keymaps, GNU Emacs Internals, Top @appendix Standard Errors @cindex standard errors diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi index 429d999a2c8..4c1150d1a51 100644 --- a/doc/lispref/eval.texi +++ b/doc/lispref/eval.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 1998, 2001-2012 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 1998, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/eval @node Evaluation, Control Structures, Symbols, Top @chapter Evaluation @cindex evaluation @@ -807,7 +806,7 @@ The value of this variable is a list of the values returned by all the expressions that were read, evaluated, and printed from buffers (including the minibuffer) by the standard Emacs commands which do this. (Note that this does @emph{not} include evaluation in -@samp{*ielm*} buffers, nor evaluation using @kbd{C-j} in +@file{*ielm*} buffers, nor evaluation using @kbd{C-j} in @code{lisp-interaction-mode}.) The elements are ordered most recent first. diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index b49e56158ad..3597d9f80c4 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/files @node Files, Backups and Auto-Saving, Documentation, Top @comment node-name, next, previous, up @chapter Files @@ -490,11 +489,13 @@ in particular buffers. @defopt require-final-newline This variable determines whether files may be written out that do @emph{not} end with a newline. If the value of the variable is -@code{t}, then @code{save-buffer} silently adds a newline at the end of -the file whenever the buffer being saved does not already end in one. -If the value of the variable is non-@code{nil}, but not @code{t}, then -@code{save-buffer} asks the user whether to add a newline each time the -case arises. +@code{t}, then @code{save-buffer} silently adds a newline at the end +of the buffer whenever it does not already end in one. If the value +is @code{visit}, Emacs adds a missing newline just after it visits the +file. If the value is @code{visit-save}, Emacs adds a missing newline +both on visiting and on saving. For any other non-@code{nil} value, +@code{save-buffer} asks the user whether to add a newline each time +the case arises. If the value of the variable is @code{nil}, then @code{save-buffer} doesn't add newlines at all. @code{nil} is the default value, but a few @@ -2154,7 +2155,7 @@ double all @samp{$} characters to prevent subsequent incorrect results. @c Wordy to avoid overfull hbox. --rjc 15mar92 -Here we assume that the environment variable @code{HOME}, which holds +Here we assume that the environment variable @env{HOME}, which holds the user's home directory name, has value @samp{/xcssun/users/rms}. @example @@ -2239,9 +2240,9 @@ non-@code{nil}. To use it, you should expand the prefix against the proper directory before calling @code{make-temp-file}. @defopt temporary-file-directory -@cindex @code{TMPDIR} environment variable -@cindex @code{TMP} environment variable -@cindex @code{TEMP} environment variable +@cindex @env{TMPDIR} environment variable +@cindex @env{TMP} environment variable +@cindex @env{TEMP} environment variable This variable specifies the directory name for creating temporary files. Its value should be a directory name (@pxref{Directory Names}), but it is good for Lisp programs to cope if the value is a directory's file @@ -2249,7 +2250,7 @@ name instead. Using the value as the second argument to @code{expand-file-name} is a good way to achieve that. The default value is determined in a reasonable way for your operating -system; it is based on the @code{TMPDIR}, @code{TMP} and @code{TEMP} +system; it is based on the @env{TMPDIR}, @env{TMP} and @env{TEMP} environment variables, with a fall-back to a system-dependent name if none of these variables is defined. diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 125d6071cab..d824f51e47e 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @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 @chapter Frames @cindex frame @@ -488,7 +487,7 @@ frame. @code{title} and @code{name} are meaningful on all terminals. @item display The display on which to open this frame. It should be a string of the form @code{"@var{host}:@var{dpy}.@var{screen}"}, just like the -@code{DISPLAY} environment variable. +@env{DISPLAY} environment variable. @vindex display-type, a frame parameter @item display-type diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 9ee94557066..73bdefe19fc 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/functions @node Functions, Macros, Variables, Top @chapter Functions diff --git a/doc/lispref/gpl.texi b/doc/lispref/gpl.texi index 244f3330d44..0eb877328e1 100644 --- a/doc/lispref/gpl.texi +++ b/doc/lispref/gpl.texi @@ -1,5 +1,4 @@ @c -*-texinfo-*- -@setfilename ../../info/gpl @node GPL, Tips, GNU Free Documentation License, Top @comment node-name, next, previous, up diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi index 0a2783b6f16..0ca4c915a65 100644 --- a/doc/lispref/hash.texi +++ b/doc/lispref/hash.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc. +@c Copyright (C) 1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/hash @node Hash Tables, Symbols, Sequences Arrays Vectors, Top @chapter Hash Tables @cindex hash tables diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index c703e7810f8..5dfb2b05ff8 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/help @node Documentation, Files, Modes, Top @chapter Documentation @cindex documentation strings @@ -180,7 +179,7 @@ face. @c Wordy to prevent overfull hboxes. --rjc 15mar92 Here is an example of using the two functions, @code{documentation} and @code{documentation-property}, to display the documentation strings for -several symbols in a @samp{*Help*} buffer. +several symbols in a @file{*Help*} buffer. @anchor{describe-symbols example} @smallexample @@ -348,6 +347,21 @@ This function scans @var{string} for the above special sequences and replaces them by what they stand for, returning the result as a string. This permits display of documentation that refers accurately to the user's own customized key bindings. + +@cindex advertised binding +If a command has multiple bindings, this function normally uses the +first one it finds. You can specify one particular key binding by +assigning an @code{:advertised-binding} symbol property to the +command, like this: + +@smallexample +(put 'undo :advertised-binding [?\C-/]) +@end smallexample + +@noindent +The @code{:advertised-binding} property also affects the binding shown +in menu items (@pxref{Menu Bar}). The property is ignored if it +specifies a key binding that the command does not actually have. @end defun Here are examples of the special sequences: @@ -535,7 +549,7 @@ seems to be as a match. Each of the remaining elements is a documentation string, or @code{nil}, for @var{symbol} as a function, variable, etc. -It also displays the symbols in a buffer named @samp{*Apropos*}, each +It also displays the symbols in a buffer named @file{*Apropos*}, each with a one-line description taken from the beginning of its documentation string. @@ -648,7 +662,7 @@ certain documentation and text files that come with Emacs. @defun help-buffer This function returns the name of the help buffer, which is normally -@samp{*Help*}; if such a buffer does not exist, it is first created. +@file{*Help*}; if such a buffer does not exist, it is first created. @end defun @defmac with-help-window buffer-name body@dots{} @@ -662,16 +676,16 @@ scroll the help window. @end defmac @defun help-setup-xref item interactive-p -This function updates the cross reference data in the @samp{*Help*} +This function updates the cross reference data in the @file{*Help*} buffer, which is used to regenerate the help information when the user clicks on the @samp{Back} or @samp{Forward} buttons. Most commands -that use the @samp{*Help*} buffer should invoke this function before +that use the @file{*Help*} buffer should invoke this function before clearing the buffer. The @var{item} argument should have the form @code{(@var{function} . @var{args})}, where @var{function} is a function to call, with argument list @var{args}, to regenerate the help buffer. The @var{interactive-p} argument is non-@code{nil} if the calling command was invoked interactively; in that case, the stack of items -for the @samp{*Help*} buffer's @samp{Back} buttons is cleared. +for the @file{*Help*} buffer's @samp{Back} buttons is cleared. @end defun @xref{describe-symbols example}, for an example of using diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index 0d29c25c8b1..8aed3c676e2 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1993, 1998, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/hooks @node Standard Hooks, Index, Standard Keymaps, Top @appendix Standard Hooks @cindex standard hooks diff --git a/doc/lispref/index.texi b/doc/lispref/index.texi index 6cdadf94491..ebdb4eb84b1 100644 --- a/doc/lispref/index.texi +++ b/doc/lispref/index.texi @@ -1,5 +1,4 @@ @c -*-texinfo-*- -@setfilename ../../info/index @c Indexing guidelines diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index edf892e751a..c9758f8704a 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -2,7 +2,6 @@ @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 See the file elisp.texi for copying conditions. -@setfilename ../../info/internals @node GNU Emacs Internals, Standard Errors, Tips, Top @comment node-name, next, previous, up @appendix GNU Emacs Internals diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi index 365c5f3122e..d3a5b253162 100644 --- a/doc/lispref/intro.texi +++ b/doc/lispref/intro.texi @@ -1,8 +1,7 @@ @c -*-coding: iso-latin-1-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/intro @node Introduction, Lisp Data Types, Top, Top @comment node-name, next, previous, up @@ -247,7 +246,7 @@ indicated with @samp{@equiv{}}. Many of the examples in this manual print text when they are evaluated. If you execute example code in a Lisp Interaction buffer -(such as the buffer @samp{*scratch*}), the printed text is inserted into +(such as the buffer @file{*scratch*}), the printed text is inserted into the buffer. If you execute the example by other means (such as by evaluating the function @code{eval-region}), the printed text is displayed in the echo area. diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 5dd57ccb4ac..b12752fdeea 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1994, 1998-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/keymaps @node Keymaps, Modes, Command Loop, Top @chapter Keymaps @cindex keymap @@ -64,7 +63,7 @@ constituent events; thus, @code{"\C-xl"} represents the key sequence @kbd{C-x l}. Key sequences containing function keys, mouse button events, or -non-ASCII characters such as @kbd{C-=} or @kbd{H-a} cannot be +non-@acronym{ASCII} characters such as @kbd{C-=} or @kbd{H-a} cannot be represented as strings; they have to be represented as vectors. In the vector representation, each element of the vector represents @@ -808,7 +807,7 @@ bindings. @defun current-local-map This function returns the current buffer's local keymap, or @code{nil} if it has none. In the following example, the keymap for the -@samp{*scratch*} buffer (using Lisp Interaction mode) is a sparse keymap +@file{*scratch*} buffer (using Lisp Interaction mode) is a sparse keymap in which the entry for @key{ESC}, @acronym{ASCII} code 27, is another sparse keymap. @@ -1922,7 +1921,7 @@ other command. However, if @var{no-remap} is non-@code{nil}. @deffn Command describe-bindings &optional prefix buffer-or-name This function creates a listing of all current key bindings, and -displays it in a buffer named @samp{*Help*}. The text is grouped by +displays it in a buffer named @file{*Help*}. The text is grouped by modes---minor modes first, then the major mode, then global bindings. If @var{prefix} is non-@code{nil}, it should be a prefix key; then the @@ -2549,17 +2548,8 @@ the same command (if such a key binding exists). This serves as a convenient hint for users who do not know the key binding. If a command has multiple bindings, Emacs normally displays the first one it finds. You can specify one particular key binding by assigning an -@code{:advertised-binding} symbol property to the command. For -instance, the following tells Emacs to show @kbd{C-/} for the -@code{undo} menu item: - -@smallexample -(put 'undo :advertised-binding [?\C-/]) -@end smallexample - -@noindent -If the @code{:advertised-binding} property specifies a key binding -that the command does not actually have, it is ignored. +@code{:advertised-binding} symbol property to the command. @xref{Keys +in Documentation}. @node Tool Bar @subsection Tool bars diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index c8433c79b54..2325915d76a 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 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/lists @node Lists, Sequences Arrays Vectors, Strings and Characters, Top @chapter Lists @cindex lists diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 47a2a39ed63..2bd500d8479 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/loading @node Loading, Byte Compilation, Customization, Top @chapter Loading @cindex loading @@ -235,7 +234,7 @@ it skips the latter group. in a list of directories specified by the variable @code{load-path}. @defvar load-path -@cindex @code{EMACSLOADPATH} environment variable +@cindex @env{EMACSLOADPATH} environment variable The value of this variable is a list of directories to search when loading files with @code{load}. Each element is a string (which must be a directory name) or @code{nil} (which stands for the current working @@ -375,7 +374,7 @@ strings are multibyte strings should not be noticeable, since inserting them in unibyte buffers converts them to unibyte automatically. However, if this does make a difference, you can force a particular Lisp file to be interpreted as unibyte by writing -@samp{-*-unibyte: t;-*-} in a comment on the file's first line. With +@samp{unibyte: t} in a local variables section. With that designator, the file will unconditionally be interpreted as unibyte, even in an ordinary multibyte Emacs session. This can matter when making keybindings to non-@acronym{ASCII} characters written as diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi index a71d3379b80..bc4cec3307d 100644 --- a/doc/lispref/macros.texi +++ b/doc/lispref/macros.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998, 2001-2012 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/macros @node Macros, Customization, Functions, Top @chapter Macros @cindex macros diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi index b303562028b..cb5734d71d0 100644 --- a/doc/lispref/maps.texi +++ b/doc/lispref/maps.texi @@ -2,7 +2,6 @@ @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/maps @node Standard Keymaps, Standard Hooks, Standard Errors, Top @appendix Standard Keymaps @cindex keymaps, standard diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi index 25a9fc88fc5..ba9d429314d 100644 --- a/doc/lispref/markers.texi +++ b/doc/lispref/markers.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/markers @node Markers, Text, Positions, Top @chapter Markers @cindex markers diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 437a2daa8e3..c840eb6ded0 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/minibuf @node Minibuffers, Command Loop, Read and Print, Top @chapter Minibuffers @cindex arguments, reading @@ -30,8 +29,8 @@ argument. * Multiple Queries:: Asking a series of similar questions. * Reading a Password:: Reading a password from the terminal. * Minibuffer Commands:: Commands used as key bindings in minibuffers. -* Minibuffer Contents:: How such commands access the minibuffer text. * Minibuffer Windows:: Operating on the special minibuffer windows. +* Minibuffer Contents:: How such commands access the minibuffer text. * Recursive Mini:: Whether recursive entry to minibuffer is allowed. * Minibuffer Misc:: Various customization hooks and variables. @end menu @@ -60,8 +59,10 @@ boundary between the prompt and the actual text. The minibuffer's window is normally a single line; it grows automatically if the contents require more space. You can explicitly +@c FIXME? Works in 23.4, not 24.0.95. (Bug#11276) resize it temporarily with the window sizing commands; it reverts to its normal size when the minibuffer is exited. You can resize it +@c FIXME? Doesn't work in any version of Emacs? permanently by using the window sizing commands in the frame's other window, when the minibuffer is not active. If the frame contains just a minibuffer, you can change the minibuffer's size by changing the @@ -73,9 +74,9 @@ of variables such as @code{this-command} and @code{last-command} code that uses the minibuffer, if you do not want that to change them. Under some circumstances, a command can use a minibuffer even if -there is an active minibuffer; such minibuffers are called a +there is an active minibuffer; such a minibuffer is called a @dfn{recursive minibuffer}. The first minibuffer is named -@w{@samp{ *Minibuf-0*}}. Recursive minibuffers are named by +@w{@samp{ *Minibuf-1*}}. Recursive minibuffers are named by incrementing the number at the end of the name. (The names begin with a space so that they won't show up in normal buffer lists.) Of several recursive minibuffers, the innermost (or most recently @@ -91,6 +92,12 @@ to be done. @xref{Text from Minibuffer}, for the non-completion minibuffer local maps. @xref{Completion Commands}, for the minibuffer local maps for completion. +@cindex inactive minibuffer + When a minibuffer is inactive, its major mode is +@code{minibuffer-inactive-mode}, with keymap +@code{minibuffer-inactive-mode-map}. This is only really useful if +the minibuffer is in a separate frame. @xref{Minibuffers and Frames}. + When Emacs is running in batch mode, any request to read from the minibuffer actually reads a line from the standard input descriptor that was supplied when Emacs was started. @@ -111,7 +118,7 @@ middle of a Lisp function. Instead, do all minibuffer input as part of reading the arguments for a command, in the @code{interactive} specification. @xref{Defining Commands}. -@defun read-from-minibuffer prompt-string &optional initial-contents keymap read hist default inherit-input-method +@defun read-from-minibuffer prompt &optional initial keymap read history default inherit-input-method This function is the most general way to get input from the minibuffer. By default, it accepts arbitrary text and returns it as a string; however, if @var{read} is non-@code{nil}, then it uses @@ -119,8 +126,8 @@ string; however, if @var{read} is non-@code{nil}, then it uses Functions}). The first thing this function does is to activate a minibuffer and -display it with @var{prompt-string} as the prompt. This value must be a -string. Then the user can edit text in the minibuffer. +display it with @var{prompt} (which must be a string) as the +prompt. Then the user can edit text in the minibuffer. When the user types a command to exit the minibuffer, @code{read-from-minibuffer} constructs the return value from the text in @@ -132,7 +139,7 @@ reads the text and returns the resulting Lisp object, unevaluated. The argument @var{default} specifies default values to make available through the history commands. It should be a string, a list of strings, or @code{nil}. The string or strings become the minibuffer's -``future history,'' available to the user with @kbd{M-n}. +``future history'', available to the user with @kbd{M-n}. If @var{read} is non-@code{nil}, then @var{default} is also used as the input to @code{read}, if the user enters empty input. @@ -149,12 +156,13 @@ value of @code{minibuffer-local-map} is used as the keymap. Specifying a keymap is the most important way to customize the minibuffer for various applications such as completion. -The argument @var{hist} specifies which history list variable to use +The argument @var{history} specifies a history list variable to use for saving the input and for history commands used in the minibuffer. -It defaults to @code{minibuffer-history}. @xref{Minibuffer History}. +It defaults to @code{minibuffer-history}. You can optionally specify +a starting position in the history list as well. @xref{Minibuffer History}. If the variable @code{minibuffer-allow-text-properties} is -non-@code{nil}, then the string which is returned includes whatever text +non-@code{nil}, then the string that is returned includes whatever text properties were present in the minibuffer. Otherwise all the text properties are stripped when the value is returned. @@ -164,9 +172,9 @@ the setting of @code{enable-multibyte-characters} (@pxref{Text Representations}) from whichever buffer was current before entering the minibuffer. -Use of @var{initial-contents} is mostly deprecated; we recommend using +Use of @var{initial} is mostly deprecated; we recommend using a non-@code{nil} value only in conjunction with specifying a cons cell -for @var{hist}. @xref{Initial Input}. +for @var{history}. @xref{Initial Input}. @end defun @defun read-string prompt &optional initial history default inherit-input-method @@ -179,11 +187,11 @@ The optional argument @var{default} is used as in @code{read-from-minibuffer}, except that, if non-@code{nil}, it also specifies a default value to return if the user enters null input. As in @code{read-from-minibuffer} it should be a string, a list of -strings, or @code{nil} which is equivalent to an empty string. When +strings, or @code{nil}, which is equivalent to an empty string. When @var{default} is a string, that string is the default value. When it is a list of strings, the first string is the default value. (All these strings are available to the user in the ``future minibuffer -history.'') +history''.) This function works by calling the @code{read-from-minibuffer} function: @@ -202,16 +210,16 @@ This function works by calling the @end smallexample @end defun -@defun read-regexp prompt &optional default-value +@defun read-regexp prompt &optional default This function reads a regular expression as a string from the minibuffer and returns it. The argument @var{prompt} is used as in @code{read-from-minibuffer}. The keymap used is @code{minibuffer-local-map}, and @code{regexp-history} is used as the history list (@pxref{Minibuffer History, regexp-history}). -The optional argument @var{default-value} specifies a default value to +The optional argument @var{default} specifies a default value to return if the user enters null input; it should be a string, or -@code{nil} which is equivalent to an empty string. +@code{nil}, which is equivalent to an empty string. In addition, @code{read-regexp} collects a few useful candidates for input and passes them to @code{read-from-minibuffer}, to make them @@ -235,9 +243,9 @@ function, after computing the list of defaults as described above. @end defun @defvar minibuffer-allow-text-properties -If this variable is @code{nil}, then @code{read-from-minibuffer} strips -all text properties from the minibuffer input before returning it. -This variable also affects @code{read-string}. However, +If this variable is @code{nil}, then @code{read-from-minibuffer} +and @code{read-string} strip all text properties from the minibuffer +input before returning it. However, @code{read-no-blanks-input} (see below), as well as @code{read-minibuffer} and related functions (@pxref{Object from Minibuffer,, Reading Lisp Objects With the Minibuffer}), and all @@ -275,6 +283,12 @@ default, it makes the following bindings: @item @kbd{M-r} @code{previous-matching-history-element} + +@ignore +@c Does not seem worth/appropriate mentioning. +@item @kbd{C-@key{TAB}} +@code{file-cache-minibuffer-complete} +@end ignore @end table @end defvar @@ -305,6 +319,8 @@ This function discards text properties, regardless of the value of @end smallexample @end defun +@c Slightly unfortunate name, suggesting it might be related to the +@c Nextstep port... @defvar minibuffer-local-ns-map This built-in variable is the keymap used as the minibuffer local keymap in the function @code{read-no-blanks-input}. By default, it makes the @@ -389,23 +405,16 @@ This function simply evaluates the result of a call to @end defun @defun edit-and-eval-command prompt form -This function reads a Lisp expression in the minibuffer, and then -evaluates it. The difference between this command and +This function reads a Lisp expression in the minibuffer, evaluates it, +then returns the result. The difference between this command and @code{eval-minibuffer} is that here the initial @var{form} is not optional and it is treated as a Lisp object to be converted to printed representation rather than as a string of text. It is printed with @code{prin1}, so if it is a string, double-quote characters (@samp{"}) appear in the initial text. @xref{Output Functions}. -The first thing @code{edit-and-eval-command} does is to activate the -minibuffer with @var{prompt} as the prompt. Then it inserts the printed -representation of @var{form} in the minibuffer, and lets the user edit it. -When the user exits the minibuffer, the edited text is read with -@code{read} and then evaluated. The resulting value becomes the value -of @code{edit-and-eval-command}. - In the following example, we offer the user an expression with initial -text which is a valid form already: +text that is already a valid form: @smallexample @group @@ -425,7 +434,6 @@ Please edit: (forward-word 1)@point{} @noindent Typing @key{RET} right away would exit the minibuffer and evaluate the expression, thus moving point forward one word. -@code{edit-and-eval-command} returns @code{nil} in this example. @end defun @node Minibuffer History @@ -441,7 +449,7 @@ is a list of strings (previous inputs), most recent first. kinds of inputs. It's the Lisp programmer's job to specify the right history list for each use of the minibuffer. - You specify a minibuffer history list with the optional @var{hist} + You specify a minibuffer history list with the optional @var{history} argument to @code{read-from-minibuffer} or @code{completing-read}. Here are the possible values for it: @@ -457,7 +465,7 @@ Specifying 0 for @var{startpos} is equivalent to just specifying the symbol @var{variable}. @code{previous-history-element} will display the most recent element of the history list in the minibuffer. If you specify a positive @var{startpos}, the minibuffer history functions -behave as if @code{(elt @var{variable} (1- @var{STARTPOS}))} were the +behave as if @code{(elt @var{variable} (1- @var{startpos}))} were the history element currently shown in the minibuffer. For consistency, you should also specify that element of the history @@ -465,7 +473,7 @@ as the initial minibuffer contents, using the @var{initial} argument to the minibuffer input function (@pxref{Initial Input}). @end table - If you don't specify @var{hist}, then the default history list + If you don't specify @var{history}, then the default history list @code{minibuffer-history} is used. For other standard history lists, see below. You can also create your own history list variable; just initialize it to @code{nil} before the first use. @@ -504,15 +512,15 @@ If the value of this variable is @code{nil}, standard functions that read from the minibuffer don't add new elements to the history list. This lets Lisp programs explicitly manage input history by using @code{add-to-history}. By default, @code{history-add-new-input} is -set to a non-@code{nil} value. +non-@code{nil}. @end defvar @defopt history-length The value of this variable specifies the maximum length for all history lists that don't specify their own maximum lengths. If the value is @code{t}, that means there is no maximum (don't delete old -elements). The value of @code{history-length} property of the history -list variable's symbol, if set, overrides this variable for that +elements). If a history list variable's symbol has a non-@code{nil} +@code{history-length} property, it overrides this variable for that particular history list. @end defopt @@ -556,11 +564,19 @@ A history list for arguments that are shell commands. A history list for arguments that are Lisp expressions to evaluate. @end defvar +@defvar face-name-history +A history list for arguments that are faces. +@end defvar + +@c Less common: coding-system-history, input-method-history, +@c command-history, grep-history, grep-find-history, +@c read-envvar-name-history, setenv-history, yes-or-no-p-history. + @node Initial Input @section Initial Input Several of the functions for minibuffer input have an argument called -@var{initial} or @var{initial-contents}. This is a mostly-deprecated +@var{initial}. This is a mostly-deprecated feature for specifying that the minibuffer should start out with certain text, instead of empty as usual. @@ -577,7 +593,7 @@ to offer useful default inputs to the user. There is just one situation where you should specify a string for an @var{initial} argument. This is when you specify a cons cell for the -@var{hist} or @var{history} argument. @xref{Minibuffer History}. +@var{history} argument. @xref{Minibuffer History}. @var{initial} can also be a cons cell of the form @code{(@var{string} . @var{position})}. This means to insert @var{string} in the @@ -589,11 +605,10 @@ inconsistently in different functions. In @code{completing-read}, of 0 means the beginning of the string, 1 means after the first character, etc. In @code{read-minibuffer}, and the other non-completion minibuffer input functions that support this argument, -1 means the beginning of the string 2 means after the first character, +1 means the beginning of the string, 2 means after the first character, etc. -Use of a cons cell as the value for @var{initial} arguments is -deprecated in user code. +Use of a cons cell as the value for @var{initial} arguments is deprecated. @node Completion @section Completion @@ -604,6 +619,7 @@ starting from an abbreviation for it. Completion works by comparing the user's input against a list of valid names and determining how much of the name is determined uniquely by what the user has typed. For example, when you type @kbd{C-x b} (@code{switch-to-buffer}) and then +@c "This is the sort of English up with which I will not put." type the first few letters of the name of the buffer to which you wish to switch, and then type @key{TAB} (@code{minibuffer-complete}), Emacs extends the name as far as it can. @@ -628,7 +644,7 @@ for reading certain kinds of names with completion. * Minibuffer Completion:: Invoking the minibuffer with completion. * Completion Commands:: Minibuffer commands that do completion. * High-Level Completion:: Convenient special cases of completion - (reading buffer name, file name, etc.). + (reading buffer names, variable names, etc.). * Reading File Names:: Using completion to read file names and shell commands. * Completion Variables:: Variables controlling completion behavior. @@ -663,20 +679,14 @@ If @var{collection} is an alist (@pxref{Association Lists}), the permissible completions are the elements of the alist that are either strings, or conses whose @sc{car} is a string or symbol. Symbols are converted to strings using @code{symbol-name}. Other -elements of the alist are ignored. (Remember that in Emacs Lisp, the +elements of the alist are ignored. (Remember that in Emacs Lisp, the elements of alists do not @emph{have} to be conses.) In particular, a list of strings is allowed, even though we usually do not think of such lists as alists. @cindex obarray in completion If @var{collection} is an obarray (@pxref{Creating Symbols}), the names -of all symbols in the obarray form the set of permissible completions. The -global variable @code{obarray} holds an obarray containing the names of -all interned Lisp symbols. - -Note that the only valid way to make a new obarray is to create it -empty and then add symbols to it one by one using @code{intern}. -Also, you cannot intern a given symbol in more than one obarray. +of all symbols in the obarray form the set of permissible completions. If @var{collection} is a hash table, then the keys that are strings are the possible completions. Other keys are ignored. @@ -757,16 +767,20 @@ too short). Both of those begin with the string @samp{foobar}. @end smallexample @end defun -@defun all-completions string collection &optional predicate nospace +@c Removed obsolete argument nospace. +@defun all-completions string collection &optional predicate This function returns a list of all possible completions of -@var{string}. The arguments to this function (aside from -@var{nospace}) are the same as those of @code{try-completion}. Also, -this function uses @code{completion-regexp-list} in the same way that +@var{string}. The arguments to this function +@c (aside from @var{nospace}) +are the same as those of @code{try-completion}, and it +uses @code{completion-regexp-list} in the same way that @code{try-completion} does. +@ignore The optional argument @var{nospace} is obsolete. If it is non-@code{nil}, completions that start with a space are ignored unless @var{string} starts with a space. +@end ignore If @var{collection} is a function, it is called with three arguments: @var{string}, @var{predicate} and @code{t}; then @code{all-completions} @@ -836,7 +850,7 @@ pertains to the area after @code{"/usr/"} and before @code{"/doc"}. @end defun If you store a completion alist in a variable, you should mark the -variable as ``risky'' with a non-@code{nil} +variable as ``risky'' by giving it a non-@code{nil} @code{risky-local-variable} property. @xref{File Local Variables}. @defvar completion-ignore-case @@ -865,7 +879,7 @@ proper value is done the first time you do completion using @var{var}. It is done by calling @var{fun} with no arguments. The value @var{fun} returns becomes the permanent value of @var{var}. -Here is a usage example: +Here is an example: @smallexample (defvar foo (lazy-completion-table foo make-my-alist)) @@ -880,7 +894,7 @@ Here is a usage example: This section describes the basic interface for reading from the minibuffer with completion. -@defun completing-read prompt collection &optional predicate require-match initial hist default inherit-input-method +@defun completing-read prompt collection &optional predicate require-match initial history default inherit-input-method This function reads a string in the minibuffer, assisting the user by providing completion. It activates the minibuffer with prompt @var{prompt}, which must be a string. @@ -935,13 +949,13 @@ The function @code{completing-read} uses @code{minibuffer-local-must-match-map} if @var{require-match} is non-@code{nil}. @xref{Completion Commands}. -The argument @var{hist} specifies which history list variable to use for +The argument @var{history} specifies which history list variable to use for saving the input and for minibuffer history commands. It defaults to @code{minibuffer-history}. @xref{Minibuffer History}. The argument @var{initial} is mostly deprecated; we recommend using a non-@code{nil} value only in conjunction with specifying a cons cell -for @var{hist}. @xref{Initial Input}. For default input, use +for @var{history}. @xref{Initial Input}. For default input, use @var{default} instead. If the argument @var{inherit-input-method} is non-@code{nil}, then the @@ -950,7 +964,7 @@ Methods}) and the setting of @code{enable-multibyte-characters} (@pxref{Text Representations}) from whichever buffer was current before entering the minibuffer. -If the built-in variable @code{completion-ignore-case} is +If the variable @code{completion-ignore-case} is non-@code{nil}, completion ignores case when comparing the input against the possible matches. @xref{Basic Completion}. In this mode of operation, @var{predicate} must also ignore case, or you will get @@ -1062,7 +1076,7 @@ using the value of the variable @code{minibuffer-completion-table} as the @var{collection} argument, and the value of @code{minibuffer-completion-predicate} as the @var{predicate} argument. The list of completions is displayed as text in a buffer named -@samp{*Completions*}. +@file{*Completions*}. @end deffn @defun display-completion-list completions &optional common-substring @@ -1083,8 +1097,8 @@ uses this to highlight text in the completion list for better visual feedback. This is not needed in the minibuffer; for minibuffer completion, you can pass @code{nil}. -This function is called by @code{minibuffer-completion-help}. The -most common way to use it is together with +This function is called by @code{minibuffer-completion-help}. A +common way to use it is together with @code{with-output-to-temp-buffer}, like this: @example @@ -1118,7 +1132,7 @@ keymap makes the following bindings: @end table @noindent -with other characters bound as in @code{minibuffer-local-map} +and uses @code{minibuffer-local-map} as its parent keymap (@pxref{Definition of minibuffer-local-map}). @end defvar @@ -1130,15 +1144,6 @@ minibuffer unconditionally. By default, this keymap makes the following bindings: @table @asis -@item @kbd{?} -@code{minibuffer-completion-help} - -@item @key{SPC} -@code{minibuffer-complete-word} - -@item @key{TAB} -@code{minibuffer-complete} - @item @kbd{C-j} @code{minibuffer-complete-and-exit} @@ -1147,25 +1152,21 @@ bindings: @end table @noindent -with other characters bound as in @code{minibuffer-local-map}. +and uses @code{minibuffer-local-completion-map} as its parent keymap. @end defvar @defvar minibuffer-local-filename-completion-map -This is like @code{minibuffer-local-completion-map} -except that it does not bind @key{SPC}. This keymap is used by the -function @code{read-file-name}. +This is a sparse keymap that simply unbinds @key{SPC}; because +filenames can contain spaces. The function @code{read-file-name} +combines this keymap with either @code{minibuffer-local-completion-map} +or @code{minibuffer-local-must-match-map}. @end defvar -@defvar minibuffer-local-filename-must-match-map -This is like @code{minibuffer-local-must-match-map} -except that it does not bind @key{SPC}. This keymap is used by the -function @code{read-file-name}. -@end defvar @node High-Level Completion @subsection High-Level Completion Functions - This section describes the higher-level convenient functions for + This section describes the higher-level convenience functions for reading certain sorts of names with completion. In most cases, you should not call these functions in the middle of a @@ -1239,7 +1240,7 @@ for which @code{commandp} returns @code{t}. @xref{Interactive Call}. The argument @var{default} specifies what to return if the user enters null input. It can be a symbol, a string or a list of strings. If it is a string, @code{read-command} interns it before returning it. -If it is a list, @code{read-command} returns the first element of this list. +If it is a list, @code{read-command} interns the first element of this list. If @var{default} is @code{nil}, that means no default has been specified; then if the user enters null input, the return value is @code{(intern "")}, that is, a symbol whose name is an empty string. @@ -1281,51 +1282,11 @@ complete in the set of extant Lisp symbols, and it uses the @defun read-variable prompt &optional default @anchor{Definition of read-variable} -This function reads the name of a user variable and returns it as a -symbol. - -The argument @var{default} specifies the default value to return if -the user enters null input. It can be a symbol, a string, or a list -of strings. If it is a string, @code{read-variable} interns it to -make the default value. If it is a list, @code{read-variable} interns -the first element. If @var{default} is @code{nil}, that means no -default has been specified; then if the user enters null input, the -return value is @code{(intern "")}. - -@example -@group -(read-variable "Variable name? ") - -;; @r{After evaluation of the preceding expression,} -;; @r{the following prompt appears,} -;; @r{with an empty minibuffer:} -@end group - -@group ----------- Buffer: Minibuffer ---------- -Variable name? @point{} ----------- Buffer: Minibuffer ---------- -@end group -@end example - -@noindent -If the user then types @kbd{fill-p @key{RET}}, @code{read-variable} -returns @code{fill-prefix}. - -In general, @code{read-variable} is similar to @code{read-command}, -but uses the predicate @code{custom-variable-p} instead of -@code{commandp}: - -@cindex @code{custom-variable-p} example -@example -@group -(read-variable @var{prompt}) -@equiv{} -(intern - (completing-read @var{prompt} obarray - 'custom-variable-p t nil)) -@end group -@end example +This function reads the name of a customizable variable and returns it +as a symbol. Its arguments have the same form as those of +@code{read-command}. It behaves just like @code{read-command}, except +that it uses the predicate @code{custom-variable-p} instead of +@code{commandp}. @end defun @deffn Command read-color &optional prompt convert allow-empty display @@ -1343,7 +1304,7 @@ minibuffer. However, when called interactively or if the optional argument @var{convert} is non-@code{nil}, it converts any input color name into the corresponding RGB value string and instead returns that. This function requires a valid color specification to be input. -Empty color names are allowed when @code{allow-empty} is +Empty color names are allowed when @var{allow-empty} is non-@code{nil} and the user enters null input. Interactively, or when @var{display} is non-@code{nil}, the return @@ -1361,7 +1322,7 @@ and @code{read-input-method-name}, in @ref{Input Methods}. The high-level completion functions @code{read-file-name}, @code{read-directory-name}, and @code{read-shell-command} are designed -to read file names, directory names, and shell commands respectively. +to read file names, directory names, and shell commands, respectively. They provide special features, including automatic insertion of the default directory. @@ -1370,15 +1331,29 @@ This function reads a file name, prompting with @var{prompt} and providing completion. As an exception, this function reads a file name using a graphical -file dialog instead of the minibuffer, if (i) it is invoked via a -mouse command, and (ii) the selected frame is on a graphical display -supporting such dialogs, and (iii) the variable @code{use-dialog-box} -is non-@code{nil} (@pxref{Dialog Boxes,, Dialog Boxes, emacs, The GNU -Emacs Manual}), and (iv) the @var{directory} argument, described -below, does not specify a remote file (@pxref{Remote Files,, Remote -Files, emacs, The GNU Emacs Manual}). The exact behavior when using a -graphical file dialog is platform-dependent. Here, we simply document -the behavior when using the minibuffer. +file dialog instead of the minibuffer, if all of the following are +true: + +@enumerate +@item +It is invoked via a mouse command. + +@item +The selected frame is on a graphical display supporting such dialogs. + +@item +The variable @code{use-dialog-box} is non-@code{nil}. +@xref{Dialog Boxes,, Dialog Boxes, emacs, The GNU Emacs Manual}. + +@item +The @var{directory} argument, described below, does not specify a +remote file. @xref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual}. +@end enumerate + +@noindent +The exact behavior when using a graphical file dialog is +platform-dependent. Here, we simply document the behavior when using +the minibuffer. @code{read-file-name} does not automatically expand the returned file name. You must call @code{expand-file-name} yourself if an absolute @@ -1389,7 +1364,7 @@ The optional argument @var{require-match} has the same meaning as in The argument @var{directory} specifies the directory to use for completing relative file names. It should be an absolute directory -name. If @code{insert-default-directory} is non-@code{nil}, +name. If the variable @code{insert-default-directory} is non-@code{nil}, @var{directory} is also inserted in the minibuffer as initial input. It defaults to the current buffer's value of @code{default-directory}. @@ -1397,9 +1372,9 @@ If you specify @var{initial}, that is an initial file name to insert in the buffer (after @var{directory}, if that is inserted). In this case, point goes at the beginning of @var{initial}. The default for @var{initial} is @code{nil}---don't insert any file name. To see what -@var{initial} does, try the command @kbd{C-x C-v}. @strong{Please -note:} we recommend using @var{default} rather than @var{initial} in -most cases. +@var{initial} does, try the command @kbd{C-x C-v} in a buffer visiting +a file. @strong{Please note:} we recommend using @var{default} rather +than @var{initial} in most cases. If @var{default} is non-@code{nil}, then the function returns @var{default} if the user exits the minibuffer with the same non-empty @@ -1502,7 +1477,7 @@ use the code letters @samp{f} or @samp{F} in their interactive form. @xref{Interactive Codes,, Code Characters for interactive}.) Its value controls whether @code{read-file-name} starts by placing the name of the default directory in the minibuffer, plus the initial file -name if any. If the value of this variable is @code{nil}, then +name, if any. If the value of this variable is @code{nil}, then @code{read-file-name} does not place any initial input in the minibuffer (unless you specify initial input with the @var{initial} argument). In that case, the default directory is still used for @@ -1545,17 +1520,17 @@ The file is @point{} @end example @end defopt -@defun read-shell-command prompt &optional initial-contents hist &rest args +@defun read-shell-command prompt &optional initial history &rest args This function reads a shell command from the minibuffer, prompting with @var{prompt} and providing intelligent completion. It completes the first word of the command using candidates that are appropriate for command names, and the rest of the command words as file names. This function uses @code{minibuffer-local-shell-command-map} as the -keymap for minibuffer input. The @var{hist} argument specifies the +keymap for minibuffer input. The @var{history} argument specifies the history list to use; if is omitted or @code{nil}, it defaults to @code{shell-command-history} (@pxref{Minibuffer History, -shell-command-history}). The optional argument @var{initial-contents} +shell-command-history}). The optional argument @var{initial} specifies the initial content of the minibuffer (@pxref{Initial Input}). The rest of @var{args}, if present, are used as the @var{default} and @var{inherit-input-method} arguments in @@ -1564,20 +1539,22 @@ Input}). The rest of @var{args}, if present, are used as the @defvar minibuffer-local-shell-command-map This keymap is used by @code{read-shell-command} for completing -command and file names that are part of a shell command. +command and file names that are part of a shell command. It uses +@code{minibuffer-local-map} as its parent keymap, and binds @key{TAB} +to @code{completion-at-point}. @end defvar @node Completion Variables @subsection Completion Variables - Here are some variables which can be used to alter the default + Here are some variables that can be used to alter the default completion behavior. @cindex completion styles @defopt completion-styles The value of this variable is a list of completion style (symbols) to use for performing completion. A @dfn{completion style} is a set of -rules for generating completions. Each symbol in occurring this list +rules for generating completions. Each symbol occurring this list must have a corresponding entry in @code{completion-styles-alist}. @end defopt @@ -1624,13 +1601,14 @@ description of the available completion styles. @defopt completion-category-overrides This variable specifies special completion styles and other completion behaviors to use when completing certain types of text. Its value -should be a list of the form @code{(@var{category} . @var{alist})}. -@var{category} is a symbol describing what is being completed; -currently, the @code{buffer} and @code{file} categories are defined, -but others can be defined via specialized completion functions -(@pxref{Programmed Completion}). @var{alist} is an association list -describing how completion should behave for the corresponding -category. The following alist keys are supported: +should be an alist with elements of the form @code{(@var{category} +. @var{alist})}. @var{category} is a symbol describing what is being +completed; currently, the @code{buffer}, @code{file}, and +@code{unicode-name} categories are defined, but others can be defined +via specialized completion functions (@pxref{Programmed Completion}). +@var{alist} is an association list describing how completion should +behave for the corresponding category. The following alist keys are +supported: @table @code @item styles @@ -1663,7 +1641,7 @@ the completion. The value should be a function to run after performing completion. The function should accept two arguments, @var{string} and @var{status}, where @var{string} is the text to which the field was -completed and @var{status} indicates what kind of operation happened: +completed, and @var{status} indicates what kind of operation happened: @code{finished} if text is now complete, @code{sole} if the text cannot be further completed but completion is not finished, or @code{exact} if the text is a valid completion but may be further @@ -1727,9 +1705,10 @@ some completion alternative; @code{nil} otherwise. @item (boundaries . @var{suffix}) This specifies a @code{completion-boundaries} operation. The function -should return @code{(boundaries START . END)}, where START is the -position of the beginning boundary in the specified string, and END is -the position of the end boundary in SUFFIX. +should return @code{(boundaries @var{start} . @var{end})}, where +@var{start} is the position of the beginning boundary in the specified +string, and @var{end} is the position of the end boundary in +@var{suffix}. @item metadata This specifies a request for information about the state of the @@ -1756,7 +1735,7 @@ completion behavior is overridden. @xref{Completion Variables}. The value should be a function for @dfn{annotating} completions. The function should take one argument, @var{string}, which is a possible completion. It should return a string, which is displayed after the -completion @var{string} in the @samp{*Completions*} buffer. +completion @var{string} in the @file{*Completions*} buffer. @item display-sort-function The value should be a function for sorting completions. The function @@ -1774,7 +1753,7 @@ the same as for @code{display-sort-function}. @defun completion-table-dynamic function This function is a convenient way to write a function that can act as -programmed completion function. The argument @var{function} should be +a programmed completion function. The argument @var{function} should be a function that takes one argument, a string, and returns an alist of possible completions of it. You can think of @code{completion-table-dynamic} as a transducer between that interface @@ -1828,7 +1807,7 @@ satisfy. @item :exclusive If the value is @code{no}, then if the completion table fails to match -the text at point, then @code{completion-at-point} moves on to the +the text at point, @code{completion-at-point} moves on to the next function in @code{completion-at-point-functions} instead of reporting a completion failure. @end table @@ -1842,7 +1821,7 @@ old code to using @code{completion-at-point}. The first function in @code{completion-at-point-functions} to return a non-@code{nil} value is used by @code{completion-at-point}. The remaining functions are not called. The exception to this is when -there is a @code{:exclusive} specification, as described above. +there is an @code{:exclusive} specification, as described above. @end defvar The following function provides a convenient way to perform @@ -1880,7 +1859,7 @@ answer. using the mouse---more precisely, if @code{last-nonmenu-event} (@pxref{Command Loop Info}) is either @code{nil} or a list---then it uses a dialog box or pop-up menu to ask the question. Otherwise, it -uses keyboard input. You can force use of the mouse or use of keyboard +uses keyboard input. You can force use either of the mouse or of keyboard input by binding @code{last-nonmenu-event} to a suitable value around the call. @@ -1891,7 +1870,7 @@ the call. This function asks the user a question, expecting input in the echo area. It returns @code{t} if the user types @kbd{y}, @code{nil} if the user types @kbd{n}. This function also accepts @key{SPC} to mean yes -and @key{DEL} to mean no. It accepts @kbd{C-]} to mean ``quit,'' like +and @key{DEL} to mean no. It accepts @kbd{C-]} to mean ``quit'', like @kbd{C-g}, because the question might look like a minibuffer and for that reason the user might try to use @kbd{C-]} to get out. The answer is a single character, with no @key{RET} needed to terminate it. Upper @@ -1915,12 +1894,16 @@ hardwired. The keymap @code{query-replace-map} specifies them. In the following example, the user first types @kbd{q}, which is invalid. At the next prompt the user types @kbd{y}. +@c Need an interactive example, because otherwise the return value +@c obscures the display of the valid answer. @smallexample @group -(y-or-n-p "Do you need a lift? ") +(defun ask () + (interactive) + (y-or-n-p "Do you need a lift? ")) -;; @r{After evaluation of the preceding expression,} -;; @r{the following prompt appears in the echo area:} +;; @r{After evaluation of the preceding definition, @kbd{M-x ask}} +;; @r{causes the following prompt to appear in the echo area:} @end group @group @@ -1952,10 +1935,10 @@ We show successive lines of echo area messages, but only one actually appears on the screen at a time. @end defun -@defun y-or-n-p-with-timeout prompt seconds default-value +@defun y-or-n-p-with-timeout prompt seconds default Like @code{y-or-n-p}, except that if the user fails to answer within @var{seconds} seconds, this function stops waiting and returns -@var{default-value}. It works by setting up a timer; see @ref{Timers}. +@var{default}. It works by setting up a timer; see @ref{Timers}. The argument @var{seconds} may be an integer or a floating point number. @end defun @@ -2023,7 +2006,7 @@ single-character answer in the echo area for each one. The value of @var{list} specifies the objects to ask questions about. It should be either a list of objects or a generator function. If it is a function, it should expect no arguments, and should return either the -next object to ask about, or @code{nil} meaning stop asking questions. +next object to ask about, or @code{nil}, meaning to stop asking questions. The argument @var{prompter} specifies how to ask each question. If @var{prompter} is a string, the question text is computed like this: @@ -2039,8 +2022,8 @@ where @var{object} is the next object to ask about (as obtained from If not a string, @var{prompter} should be a function of one argument (the next object to ask about) and should return the question text. If the value is a string, that is the question to ask the user. The -function can also return @code{t} meaning do act on this object (and -don't ask the user), or @code{nil} meaning ignore this object (and don't +function can also return @code{t}, meaning do act on this object (and +don't ask the user), or @code{nil}, meaning ignore this object (and don't ask the user). The argument @var{actor} says how to act on the answers that the user @@ -2081,7 +2064,7 @@ answer); @var{function} is a function of one argument (an object from When the user responds with @var{char}, @code{map-y-or-n-p} calls @var{function}. If it returns non-@code{nil}, the object is considered -``acted upon,'' and @code{map-y-or-n-p} advances to the next object in +``acted upon'', and @code{map-y-or-n-p} advances to the next object in @var{list}. If it returns @code{nil}, the prompt is repeated for the same object. @@ -2093,12 +2076,14 @@ If @code{map-y-or-n-p} is called in a command that was invoked using the mouse---more precisely, if @code{last-nonmenu-event} (@pxref{Command Loop Info}) is either @code{nil} or a list---then it uses a dialog box or pop-up menu to ask the question. In this case, it does not use -keyboard input or the echo area. You can force use of the mouse or use +keyboard input or the echo area. You can force use either of the mouse or of keyboard input by binding @code{last-nonmenu-event} to a suitable value around the call. The return value of @code{map-y-or-n-p} is the number of objects acted on. @end defun +@c FIXME An example of this would be more useful than all the +@c preceding examples of simple things. @node Reading a Password @section Reading a Password @@ -2161,6 +2146,19 @@ This command replaces the minibuffer contents with the value of the regular expression). @end deffn +@deffn Command previous-complete-history-element n +This command replaces the minibuffer contents with the value of the +@var{n}th previous (older) history element that completes the current +contents of the minibuffer before the point. +@end deffn + +@deffn Command next-complete-history-element n +This command replaces the minibuffer contents with the value of the +@var{n}th next (newer) history element that completes the current +contents of the minibuffer before the point. +@end deffn + + @node Minibuffer Windows @section Minibuffer Windows @cindex minibuffer windows @@ -2170,7 +2168,7 @@ and test whether they are active. @defun active-minibuffer-window This function returns the currently active minibuffer window, or -@code{nil} if none is currently active. +@code{nil} if there is none. @end defun @defun minibuffer-window &optional frame @@ -2203,8 +2201,8 @@ there can be more than one minibuffer window if there is more than one frame. @defun minibuffer-window-active-p window -This function returns non-@code{nil} if @var{window}, assumed to be -a minibuffer window, is currently active. +This function returns non-@code{nil} if @var{window} is the currently +active minibuffer window. @end defun @node Minibuffer Contents @@ -2319,7 +2317,7 @@ minibuffer, it scrolls this window. @end defvar @defun minibuffer-selected-window -This function returns the window which was selected when the +This function returns the window that was selected when the minibuffer was entered. If selected window is not a minibuffer window, it returns @code{nil}. @end defun @@ -2330,10 +2328,19 @@ windows. If a float, it specifies a fraction of the height of the frame. If an integer, it specifies a number of lines. @end defopt +@vindex minibuffer-message-timeout @defun minibuffer-message string &rest args This function displays @var{string} temporarily at the end of the -minibuffer text, for two seconds, or until the next input event -arrives, whichever comes first. If @var{args} is non-@code{nil}, the -actual message is obtained by passing @var{string} and @var{args} -through @code{format}. @xref{Formatting Strings}. +minibuffer text, for a few seconds, or until the next input event +arrives, whichever comes first. The variable +@code{minibuffer-message-timeout} specifies the number of seconds to +wait in the absence of input. It defaults to 2. If @var{args} is +non-@code{nil}, the actual message is obtained by passing @var{string} +and @var{args} through @code{format}. @xref{Formatting Strings}. @end defun + +@deffn Command minibuffer-inactive-mode +This is the major mode used in inactive minibuffers. It uses +keymap @code{minibuffer-inactive-mode-map}. This can be useful +if the minibuffer is in a separate frame. @xref{Minibuffers and Frames}. +@end deffn diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 946dcb91317..aa089aec36b 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/modes @node Modes, Documentation, Keymaps, Top @chapter Major and Minor Modes @cindex mode @@ -628,7 +627,7 @@ have set. This function sets the major mode of @var{buffer} to the default value of @code{major-mode}; if that is @code{nil}, it uses the current buffer's major mode (if that is suitable). As an exception, -if @var{buffer}'s name is @samp{*scratch*}, it sets the mode to +if @var{buffer}'s name is @file{*scratch*}, it sets the mode to @code{initial-major-mode}. The low-level primitives for creating buffers do not use this function, @@ -637,9 +636,9 @@ but medium-level commands such as @code{switch-to-buffer} and @end defun @defopt initial-major-mode -@cindex @samp{*scratch*} +@cindex @file{*scratch*} The value of this variable determines the major mode of the initial -@samp{*scratch*} buffer. The value should be a symbol that is a major +@file{*scratch*} buffer. The value should be a symbol that is a major mode command. The default value is @code{lisp-interaction-mode}. @end defopt @@ -908,7 +907,7 @@ common bindings, including @kbd{q} for @code{quit-window}, @kbd{z} for (@pxref{Reverting}). An example of a major mode derived from Special mode is Buffer Menu -mode, which is used by the @samp{*Buffer List*} buffer. @xref{List +mode, which is used by the @file{*Buffer List*} buffer. @xref{List Buffers,,Listing Existing Buffers, emacs, The GNU Emacs Manual}. @end deffn @@ -1571,8 +1570,8 @@ rather than buffer-local. It defaults to @code{nil}. One of the effects of making a minor mode global is that the @var{mode} variable becomes a customization variable. Toggling it -through the Custom interface turns the mode on and off, and its value -can be saved for future Emacs sessions (@pxref{Saving +through the Customize interface turns the mode on and off, and its +value can be saved for future Emacs sessions (@pxref{Saving Customizations,,, emacs, The GNU Emacs Manual}. For the saved variable to work, you should ensure that the @code{define-minor-mode} form is evaluated each time Emacs starts; for packages that are not @@ -1691,7 +1690,7 @@ Fundamental mode; but it does not detect the creation of a new buffer in Fundamental mode. This defines the customization option @var{global-mode} (@pxref{Customization}), -which can be toggled in the Custom interface to turn the minor mode on +which can be toggled in the Customize interface to turn the minor mode on and off. As with @code{define-minor-mode}, you should ensure that the @code{define-globalized-minor-mode} form is evaluated each time Emacs starts, for example by providing a @code{:require} keyword. @@ -2016,7 +2015,7 @@ identify the mode name in the mode line, use @code{format-mode-line} This buffer-local variable contains the mode line information on process status in modes used for communicating with subprocesses. It is displayed immediately following the major mode name, with no intervening -space. For example, its value in the @samp{*shell*} buffer is +space. For example, its value in the @file{*shell*} buffer is @code{(":%s")}, which allows the shell to display its status along with the major mode as: @samp{(Shell:run)}. Normally this variable is @code{nil}. diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index c97cd099328..315a25c7e52 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. +@c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/characters @node Non-ASCII Characters, Searching and Matching, Text, Top @chapter Non-@acronym{ASCII} Characters @cindex multibyte characters diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index 82336aa537f..66f491b7780 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/numbers @node Numbers, Strings and Characters, Lisp Data Types, Top @chapter Numbers @cindex integers diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index ba4803c73f2..58ceeb02b76 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/objects @node Lisp Data Types, Numbers, Introduction, Top @chapter Lisp Data Types @cindex object @@ -352,7 +351,7 @@ following text.) In addition to the specific escape sequences for special important control characters, Emacs provides several types of escape syntax that -you can use to specify non-ASCII text characters. +you can use to specify non-@acronym{ASCII} text characters. @cindex unicode character escape You can specify characters by their Unicode values. diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 8a57ed2c1f0..aae2e4434d7 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/os @node System Interface, Packaging, Display, Top @chapter Operating System Interface @@ -89,7 +88,7 @@ that Emacs is being initialized. @c set-locale-environment @item It sets the language environment and the terminal coding system, -if requested by environment variables such as @code{LANG}. +if requested by environment variables such as @env{LANG}. @item It does some basic parsing of the command-line arguments. @@ -170,7 +169,7 @@ measurement of how long it took. It runs the normal hook @code{after-init-hook}. @item -If the buffer @samp{*scratch*} exists and is still in Fundamental mode +If the buffer @file{*scratch*} exists and is still in Fundamental mode (as it should be by default), it sets its major mode according to @code{initial-major-mode}. @@ -196,7 +195,7 @@ It now exits if the option @code{--batch} was specified. @item If @code{initial-buffer-choice} is a string, it visits the file with -that name. If the @samp{*scratch*} buffer exists and is +that name. If the @file{*scratch*} buffer exists and is empty, it inserts @code{initial-scratch-message} into that buffer. @c To make things nice and confusing, the next three items can be @@ -254,7 +253,7 @@ The following options affect some aspects of the startup sequence. @defopt inhibit-startup-screen This variable, if non-@code{nil}, inhibits the startup screen. In -that case, Emacs typically displays the @samp{*scratch*} buffer; but +that case, Emacs typically displays the @file{*scratch*} buffer; but see @code{initial-buffer-choice}, below. Do not set this variable in the init file of a new user, or in a way @@ -274,7 +273,7 @@ startup screen. @ignore @c I do not think this should be mentioned. AFAICS it is just a dodge @c around inhibit-startup-screen not being settable on a site-wide basis. -If its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. +If its value is @code{t}, Emacs displays the @file{*scratch*} buffer. @end ignore @end defopt @@ -290,17 +289,17 @@ form to your init file: Emacs explicitly checks for an expression as shown above in your init file; your login name must appear in the expression as a Lisp string -constant. You can also use the Custom interface. Other methods of setting -@code{inhibit-startup-echo-area-message} to the same value do not -inhibit the startup message. This way, you can easily inhibit the +constant. You can also use the Customize interface. Other methods of +setting @code{inhibit-startup-echo-area-message} to the same value do +not inhibit the startup message. This way, you can easily inhibit the message for yourself if you wish, but thoughtless copying of your init file will not inhibit the message for someone else. @end defopt @defopt initial-scratch-message This variable, if non-@code{nil}, should be a string, which is -inserted into the @samp{*scratch*} buffer when Emacs starts up. If it -is @code{nil}, the @samp{*scratch*} buffer is empty. +inserted into the @file{*scratch*} buffer when Emacs starts up. If it +is @code{nil}, the @file{*scratch*} buffer is empty. @end defopt @noindent @@ -352,8 +351,8 @@ control whether and where to find the init file; @samp{-q} (and the stronger @samp{-Q}) says not to load an init file, while @samp{-u @var{user}} says to load @var{user}'s init file instead of yours. @xref{Entering Emacs,,, emacs, The GNU Emacs Manual}. If neither -option is specified, Emacs uses the @code{LOGNAME} environment -variable, or the @code{USER} (most systems) or @code{USERNAME} (MS +option is specified, Emacs uses the @env{LOGNAME} environment +variable, or the @env{USER} (most systems) or @env{USERNAME} (MS systems) variable, to find your home directory and thus your init file; this way, even if you have su'd, Emacs still loads your own init file. If those environment variables are absent, though, Emacs uses @@ -430,7 +429,7 @@ This variable holds the name of the @file{.emacs.d} directory. It is Each terminal type can have its own Lisp library that Emacs loads when run on that type of terminal. The library's name is constructed by concatenating the value of the variable @code{term-file-prefix} and the -terminal type (specified by the environment variable @code{TERM}). +terminal type (specified by the environment variable @env{TERM}). Normally, @code{term-file-prefix} has the value @code{"term/"}; changing this is not recommended. Emacs finds the file in the normal manner, by searching the @code{load-path} directories, and @@ -468,7 +467,7 @@ use this hook to define initializations for terminals that do not have their own libraries. @xref{Hooks}. @defvar term-file-prefix -@cindex @code{TERM} environment variable +@cindex @env{TERM} environment variable If the value of this variable is non-@code{nil}, Emacs loads a terminal-specific initialization file as follows: @@ -481,7 +480,7 @@ You may set the @code{term-file-prefix} variable to @code{nil} in your init file if you do not wish to load the terminal-initialization file. -On MS-DOS, Emacs sets the @code{TERM} environment variable to @samp{internal}. +On MS-DOS, Emacs sets the @env{TERM} environment variable to @samp{internal}. @end defvar @defvar term-setup-hook @@ -1010,7 +1009,7 @@ value is @code{":"} for Unix and GNU systems, and @code{";"} for MS systems. @defun parse-colon-path path This function takes a search path string such as the value of -the @code{PATH} environment variable, and splits it at the separators, +the @env{PATH} environment variable, and splits it at the separators, returning a list of directory names. @code{nil} in this list means the current directory. Although the function's name says ``colon'', it actually uses the value of @code{path-separator}. @@ -1113,7 +1112,7 @@ want to use the default value. @defun user-login-name &optional uid This function returns the name under which the user is logged in. -It uses the environment variables @code{LOGNAME} or @code{USER} if +It uses the environment variables @env{LOGNAME} or @env{USER} if either is set. Otherwise, the value is based on the effective @acronym{UID}, not the real @acronym{UID}. @@ -1124,12 +1123,12 @@ corresponds to @var{uid}, or @code{nil} if there is no such user. @defun user-real-login-name This function returns the user name corresponding to Emacs's real @acronym{UID}. This ignores the effective @acronym{UID}, and the -environment variables @code{LOGNAME} and @code{USER}. +environment variables @env{LOGNAME} and @env{USER}. @end defun @defun user-full-name &optional uid This function returns the full name of the logged-in user---or the value -of the environment variable @code{NAME}, if that is set. +of the environment variable @env{NAME}, if that is set. If the Emacs process's user-id does not correspond to any known user (and provided @code{NAME} is not set), the result is @code{"unknown"}. @@ -1249,9 +1248,9 @@ The argument @var{time-value}, if given, specifies a time (represented as a list of integers) to analyze instead of the current time. @end defun -The current time zone is determined by the @samp{TZ} environment +The current time zone is determined by the @env{TZ} environment variable. @xref{System Environment}. For example, you can tell Emacs -to use universal time with @code{(setenv "TZ" "UTC0")}. If @samp{TZ} +to use universal time with @code{(setenv "TZ" "UTC0")}. If @env{TZ} is not in the environment, Emacs uses a platform-dependent default time zone. @@ -1325,7 +1324,7 @@ yourself before you call @code{encode-time}. The optional argument @var{zone} defaults to the current time zone and its daylight saving time rules. If specified, it can be either a list (as you would get from @code{current-time-zone}), a string as in the -@code{TZ} environment variable, @code{t} for Universal Time, or an +@env{TZ} environment variable, @code{t} for Universal Time, or an integer (as you would get from @code{decode-time}). The specified zone is used without any further alteration for daylight saving time. @@ -2233,7 +2232,7 @@ non-@code{nil}, Emacs tells the session manager to cancel the shutdown. @end defvar -Here is an example that just inserts some text into @samp{*scratch*} when +Here is an example that just inserts some text into @file{*scratch*} when Emacs is restarted by the session manager. @example diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index b17f13b6b89..7cb260d32b8 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 2010-2012 Free Software Foundation, Inc. +@c Copyright (C) 2010-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/package @node Packaging, Antinews, System Interface, Top @chapter Preparing Lisp code for distribution @cindex package diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 99722c93902..8ad52a8e56d 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/positions @node Positions, Markers, Frames, Top @chapter Positions @cindex position (in buffer) diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 0dae20427c6..71736584865 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/processes @node Processes, Display, Abbrevs, Top @chapter Processes @cindex child process @@ -23,7 +22,7 @@ subprocess, the Lisp program waits for the subprocess to terminate before continuing execution. When you create an asynchronous subprocess, it can run in parallel with the Lisp program. This kind of subprocess is represented within Emacs by a Lisp object which is also -called a ``process.'' Lisp programs can use this object to communicate +called a ``process''. Lisp programs can use this object to communicate with the subprocess or to control it. For example, you can send signals, obtain status information, receive output from the process, or send input to it. @@ -70,21 +69,23 @@ a program. One of them, @code{start-process}, creates an asynchronous process and returns a process object (@pxref{Asynchronous Processes}). The other two, @code{call-process} and @code{call-process-region}, create a synchronous process and do not return a process object -(@pxref{Synchronous Processes}). +(@pxref{Synchronous Processes}). There are various higher-level +functions that make use of these primitives to run particular types of +process. Synchronous and asynchronous processes are explained in the following sections. Since the three functions are all called in a similar fashion, their common arguments are described here. @cindex execute program -@cindex @code{PATH} environment variable -@cindex @code{HOME} environment variable +@cindex @env{PATH} environment variable +@cindex @env{HOME} environment variable In all cases, the function's @var{program} argument specifies the program to be run. An error is signaled if the file is not found or cannot be executed. If the file name is relative, the variable @code{exec-path} contains a list of directories to search. Emacs initializes @code{exec-path} when it starts up, based on the value of -the environment variable @code{PATH}. The standard file name +the environment variable @env{PATH}. The standard file name constructs, @samp{~}, @samp{.}, and @samp{..}, are interpreted as usual in @code{exec-path}, but environment variable substitutions (@samp{$HOME}, etc.) are not recognized; use @@ -104,16 +105,19 @@ system-dependent. @strong{Please note:} The argument @var{program} contains only the name of the program; it may not contain any command-line arguments. You -must use @var{args} to provide those. +must use a separate argument, @var{args}, to provide those, as +described below. Each of the subprocess-creating functions has a @var{buffer-or-name} -argument which specifies where the standard output from the program will +argument that specifies where the standard output from the program will go. It should be a buffer or a buffer name; if it is a buffer name, that will create the buffer if it does not already exist. It can also be @code{nil}, which says to discard the output unless a filter function handles it. (@xref{Filter Functions}, and @ref{Read and Print}.) Normally, you should avoid having multiple processes send output to the same buffer because their output would be intermixed randomly. +For synchronous processes, you can send the output to a file instead +of a buffer. @cindex program arguments All three of the subprocess-creating functions have a @code{&rest} @@ -122,18 +126,16 @@ supplied to @var{program} as separate command line arguments. Wildcard characters and other shell constructs have no special meanings in these strings, since the strings are passed directly to the specified program. - The subprocess gets its current directory from the value of -@code{default-directory} (@pxref{File Name Expansion}). - @cindex environment variables, subprocesses The subprocess inherits its environment from Emacs, but you can specify overrides for it with @code{process-environment}. @xref{System -Environment}. +Environment}. The subprocess gets its current directory from the +value of @code{default-directory}. @defvar exec-directory @pindex movemail The value of this variable is a string, the name of a directory that -contains programs that come with GNU Emacs, programs intended for Emacs +contains programs that come with GNU Emacs and are intended for Emacs to invoke. The program @code{movemail} is an example of such a program; Rmail uses it to fetch new mail from an inbox. @end defvar @@ -148,6 +150,11 @@ directory (which is the value of @code{default-directory}). The value of @code{exec-path} is used by @code{call-process} and @code{start-process} when the @var{program} argument is not an absolute file name. + +Generally, you should not modify @code{exec-path} directly. Instead, +ensure that your @env{PATH} environment variable is set appropriately +before starting Emacs. Trying to modify @code{exec-path} +independently of @env{PATH} can lead to confusing results. @end defopt @node Shell Arguments @@ -163,7 +170,7 @@ occur in the file name, they will confuse the shell. To handle these characters, use the function @code{shell-quote-argument}: @defun shell-quote-argument argument -This function returns a string which represents, in shell syntax, +This function returns a string that represents, in shell syntax, an argument whose actual contents are @var{argument}. It should work reliably to concatenate the return value into a shell command and then pass it to a shell for execution. @@ -201,10 +208,10 @@ a shell command: The following two functions are useful for combining a list of individual command-line argument strings into a single string, and taking a string apart into a list of individual command-line -arguments. These functions are mainly intended to be used for +arguments. These functions are mainly intended for converting user input in the minibuffer, a Lisp string, into a list of string arguments to be passed to @code{call-process} or -@code{start-process}, or for the converting such lists of arguments in +@code{start-process}, or for converting such lists of arguments into a single Lisp string to be presented in the minibuffer or echo area. @defun split-string-and-unquote string &optional separators @@ -268,6 +275,9 @@ system, much like text written into a file. @xref{Coding Systems}. @defun call-process program &optional infile destination display &rest args This function calls @var{program} and waits for it to finish. +The current working directory of the subprocess is +@code{default-directory}. + The standard input for the new process comes from file @var{infile} if @var{infile} is not @code{nil}, and from the null device otherwise. The argument @var{destination} says where to put the process output. @@ -345,7 +355,7 @@ In the examples below, the buffer @samp{foo} is current. @result{} 0 ---------- Buffer: foo ---------- -/usr/user/lewis/manual +/home/lewis/manual ---------- Buffer: foo ---------- @end group @@ -354,18 +364,18 @@ In the examples below, the buffer @samp{foo} is current. @result{} 0 ---------- Buffer: bar ---------- -lewis:5LTsHm66CSWKg:398:21:Bil Lewis:/user/lewis:/bin/csh +lewis:x:1001:1001:Bil Lewis,,,,:/home/lewis:/bin/bash ---------- Buffer: bar ---------- @end group @end smallexample -Here is a good example of the use of @code{call-process}, which used to -be found in the definition of @code{insert-directory}: +Here is an example of the use of @code{call-process}, as used to +be found in the definition of the @code{insert-directory} function: @smallexample @group -(call-process insert-directory-program nil t nil @var{switches} +(call-process insert-directory-program nil t nil switches (if full-directory-p (concat (file-name-as-directory file) ".") file)) @@ -375,9 +385,9 @@ be found in the definition of @code{insert-directory}: @defun process-file program &optional infile buffer display &rest args This function processes files synchronously in a separate process. It -is similar to @code{call-process} but may invoke a file handler based -on the value of the variable @code{default-directory}. The current -working directory of the subprocess is @code{default-directory}. +is similar to @code{call-process}, but may invoke a file handler based +on the value of the variable @code{default-directory}, which specifies +the current working directory of the subprocess. The arguments are handled in almost the same way as for @code{call-process}, with the following differences: @@ -390,15 +400,15 @@ file handlers might not support separating standard output and error output by way of the @var{buffer} argument. If a file handler is invoked, it determines the program to run based -on the first argument @var{program}. For instance, consider that a +on the first argument @var{program}. For instance, suppose that a handler for remote files is invoked. Then the path that is used for -searching the program might be different than @code{exec-path}. +searching for the program might be different from @code{exec-path}. The second argument @var{infile} may invoke a file handler. The file handler could be different from the handler chosen for the @code{process-file} function itself. (For example, -@code{default-directory} could be on a remote host, whereas -@var{infile} is on another remote host. Or @code{default-directory} +@code{default-directory} could be on one remote host, and +@var{infile} on a different remote host. Or @code{default-directory} could be non-special, whereas @var{infile} is on a remote host.) If @var{buffer} is a list of the form @code{(@var{real-destination} @@ -415,16 +425,16 @@ file names. @end defun @defvar process-file-side-effects -This variable indicates, whether a call of @code{process-file} changes +This variable indicates whether a call of @code{process-file} changes remote files. -Per default, this variable is always set to @code{t}, meaning that a +By default, this variable is always set to @code{t}, meaning that a call of @code{process-file} could potentially change any file on a remote host. When set to @code{nil}, a file handler could optimize -its behavior with respect to remote file attributes caching. +its behavior with respect to remote file attribute caching. -This variable should never be changed by @code{setq}. Instead of, it -shall be set only by let-binding. +You should only ever change this variable with a let-binding; never +with @code{setq}. @end defvar @defun call-process-region start end program &optional delete destination display &rest args @@ -440,7 +450,7 @@ as it comes in. For details, see the description of @code{call-process}, above. If @var{destination} is the integer 0, @code{call-process-region} discards the output and returns @code{nil} immediately, without waiting for the subprocess to finish (this only -works if asynchronous subprocesses are supported). +works if asynchronous subprocesses are supported; i.e. not on MS-DOS). The remaining arguments, @var{args}, are strings that specify command line arguments for the program. @@ -474,20 +484,21 @@ inputinput@point{} @end group @end smallexample - The @code{shell-command-on-region} command uses -@code{call-process-region} like this: + For example, the @code{shell-command-on-region} command uses +@code{call-process-region} in a manner similar to this: @smallexample @group (call-process-region start end - shell-file-name ; @r{Name of program.} - nil ; @r{Do not delete region.} - buffer ; @r{Send output to @code{buffer}.} - nil ; @r{No redisplay during output.} - "-c" command) ; @r{Arguments for the shell.} + shell-file-name ; @r{name of program} + nil ; @r{do not delete region} + buffer ; @r{send output to @code{buffer}} + nil ; @r{no redisplay during output} + "-c" command) ; @r{arguments for the shell} @end group @end smallexample +@c It actually uses shell-command-switch, but no need to mention that here. @end defun @defun call-process-shell-command command &optional infile destination display &rest args @@ -508,6 +519,9 @@ This function executes @var{command} (a string) as a shell command, then returns the command's output as a string. @end defun +@c There is also shell-command-on-region, but that is more of a user +@c command, not something to use in programs. + @defun process-lines program &rest args This function runs @var{program}, waits for it to finish, and returns its output as a list of strings. Each string in the list holds a @@ -547,11 +561,17 @@ already exists, then @var{name} is modified (by appending @samp{<1>}, etc.) to be unique. The buffer @var{buffer-or-name} is the buffer to associate with the process. +If @var{program} is @code{nil}, Emacs opens a new pseudoterminal (pty) +and associates its input and output with @var{buffer-or-name}, without +creating a subprocess. In that case, the remaining arguments +@var{args} are ignored. + The remaining arguments, @var{args}, are strings that specify command -line arguments for the program. +line arguments for the subprocess. In the example below, the first process is started and runs (rather, -sleeps) for 100 seconds. Meanwhile, the second process is started, and +sleeps) for 100 seconds (the output buffer @samp{foo} is created +immediately). Meanwhile, the second process is started, and given the name @samp{my-process<1>} for the sake of uniqueness. It inserts the directory listing at the end of the buffer @samp{foo}, before the first process finishes. Then it finishes, and a message to @@ -565,13 +585,15 @@ finishes, and another message is inserted in the buffer for it. @end group @group -(start-process "my-process" "foo" "ls" "-l" "/user/lewis/bin") +(start-process "my-process" "foo" "ls" "-l" "/bin") @result{} #> ---------- Buffer: foo ---------- -total 2 -lrwxrwxrwx 1 lewis 14 Jul 22 10:12 gnuemacs --> /emacs --rwxrwxrwx 1 lewis 19 Jul 30 21:02 lemon +total 8336 +-rwxr-xr-x 1 root root 971384 Mar 30 10:14 bash +-rwxr-xr-x 1 root root 146920 Jul 5 2011 bsd-csh +@dots{} +-rwxr-xr-x 1 root root 696880 Feb 28 15:55 zsh4 Process my-process<1> finished @@ -584,45 +606,49 @@ Process my-process finished @defun start-file-process name buffer-or-name program &rest args Like @code{start-process}, this function starts a new asynchronous subprocess running @var{program} in it, and returns its process -object---when @code{default-directory} is not a magic file name. +object. -If @code{default-directory} is magic, the function invokes its file -handler instead. This handler ought to run @var{program}, perhaps on -the local host, perhaps on a remote host that corresponds to -@code{default-directory}. In the latter case, the local part of -@code{default-directory} becomes the working directory of the process. +The difference from @code{start-process} is that this function may +invoked a file handler based on the value of @code{default-directory}. +This handler ought to run @var{program}, perhaps on the local host, +perhaps on a remote host that corresponds to @code{default-directory}. +In the latter case, the local part of @code{default-directory} becomes +the working directory of the process. This function does not try to invoke file name handlers for @var{program} or for the @var{program-args}. Depending on the implementation of the file handler, it might not be possible to apply @code{process-filter} or @code{process-sentinel} to -the resulting process object (@pxref{Filter Functions}, @pxref{Sentinels}). +the resulting process object. @xref{Filter Functions}, and @ref{Sentinels}. +@c FIXME Can we find a better example (i.e. a more modern function +@c that is actually documented). Some file handlers may not support @code{start-file-process} (for -example @code{ange-ftp-hook-function}). In such cases, the function -does nothing and returns @code{nil}. +example the function @code{ange-ftp-hook-function}). In such cases, +this function does nothing and returns @code{nil}. @end defun @defun start-process-shell-command name buffer-or-name command -This function is like @code{start-process} except that it uses a shell +This function is like @code{start-process}, except that it uses a shell to execute the specified command. The argument @var{command} is a shell command name. The variable @code{shell-file-name} specifies which shell to use. The point of running a program through the shell, rather than directly with @code{start-process}, is so that you can employ shell features such -as wildcards in the arguments. It follows that if you include an -arbitrary user-specified arguments in the command, you should quote it +as wildcards in the arguments. It follows that if you include any +arbitrary user-specified arguments in the command, you should quote them with @code{shell-quote-argument} first, so that any special shell characters do @emph{not} have their special shell meanings. @xref{Shell -Arguments}. +Arguments}. Of course, when executing commands based on user input +you should also consider the security implications. @end defun @defun start-file-process-shell-command name buffer-or-name command This function is like @code{start-process-shell-command}, but uses -@code{start-file-process} internally. By this, @var{command} can be -executed also on remote hosts, depending on @code{default-directory}. +@code{start-file-process} internally. Because of this, @var{command} +can also be executed on remote hosts, depending on @code{default-directory}. @end defun @defvar process-connection-type @@ -647,7 +673,7 @@ with one subprocess by binding the variable around the call to @smallexample @group -(let ((process-connection-type nil)) ; @r{Use a pipe.} +(let ((process-connection-type nil)) ; @r{use a pipe} (start-process @dots{})) @end group @end smallexample @@ -664,9 +690,9 @@ Information}). @dfn{Deleting a process} disconnects Emacs immediately from the subprocess. Processes are deleted automatically after they terminate, but not necessarily right away. You can delete a process explicitly -at any time. If you delete a terminated process explicitly before it +at any time. If you explicitly delete a terminated process before it is deleted automatically, no harm results. Deleting a running -process sends a signal to terminate it (and its child processes if +process sends a signal to terminate it (and its child processes, if any), and calls the process sentinel if it has one. @xref{Sentinels}. When a process is deleted, the process object itself continues to @@ -707,17 +733,17 @@ happen sooner or later). @section Process Information Several functions return information about processes. -@code{list-processes} is provided for interactive use. -@deffn Command list-processes &optional query-only +@deffn Command list-processes &optional query-only buffer This command displays a listing of all living processes. In addition, it finally deletes any process whose status was @samp{Exited} or @samp{Signaled}. It returns @code{nil}. -The processes are shown in a buffer named @samp{*Process List*}, whose -major mode is named Process Menu mode. +The processes are shown in a buffer named @file{*Process List*} +(unless you specify otherwise using the optional argument @var{buffer}), +whose major mode is Process Menu mode. -If @var{query-only} is non-@code{nil} then it lists only processes +If @var{query-only} is non-@code{nil}, it only lists processes whose query flag is non-@code{nil}. @xref{Query Before Exit}. @end deffn @@ -733,8 +759,8 @@ This function returns a list of all processes that have not been deleted. @end defun @defun get-process name -This function returns the process named @var{name}, or @code{nil} if -there is none. An error is signaled if @var{name} is not a string. +This function returns the process named @var{name} (a string), or +@code{nil} if there is none. @smallexample @group @@ -753,7 +779,7 @@ were given to the program. @smallexample @group (process-command (get-process "shell")) - @result{} ("/bin/csh" "-i") + @result{} ("bash" "-i") @end group @end smallexample @end defun @@ -761,11 +787,10 @@ were given to the program. @defun process-contact process &optional key This function returns information about how a network or serial -process was set up. For a network process, when @var{key} is -@code{nil}, it returns @code{(@var{hostname} @var{service})} which -specifies what you connected to. For a serial process, when @var{key} -is @code{nil}, it returns @code{(@var{port} @var{speed})}. For an -ordinary child process, this function always returns @code{t}. +process was set up. When @var{key} is @code{nil}, it returns +@code{(@var{hostname} @var{service})} for a network process, and +@code{(@var{port} @var{speed})} for a serial process. +For an ordinary child process, this function always returns @code{t}. If @var{key} is @code{t}, the value is the complete status information for the connection, server, or serial port; that is, the list of @@ -773,7 +798,8 @@ keywords and values specified in @code{make-network-process} or @code{make-serial-process}, except that some of the values represent the current status instead of what you specified. -For a network process: +For a network process, the values include (see +@code{make-network-process} for a complete list): @table @code @item :buffer @@ -810,7 +836,7 @@ process is started and remains constant as long as the process exists. @end defun @defun process-name process -This function returns the name of @var{process}. +This function returns the name of @var{process}, as a string. @end defun @defun process-status process-name @@ -850,12 +876,6 @@ if @var{process-name} is not the name of an existing process. (process-status (get-buffer "*shell*")) @result{} run @end group -@group -x - @result{} #> -(process-status x) - @result{} exit -@end group @end smallexample For a network connection, @code{process-status} returns one of the symbols @@ -864,7 +884,7 @@ closed the connection, or Emacs did @code{delete-process}. @end defun @defun process-live-p process -This function returns nin-@code{nil} if @var{process} is alive. A +This function returns non-@code{nil} if @var{process} is alive. A process is considered alive if its status is @code{run}, @code{open}, @code{listen}, @code{connect} or @code{stop}. @end defun @@ -893,13 +913,9 @@ the remote host is provided as process property @code{remote-tty}. @defun process-coding-system process @anchor{Coding systems for a subprocess} -This function returns a cons cell describing the coding systems in use -for decoding output from @var{process} and for encoding input to -@var{process} (@pxref{Coding Systems}). The value has this form: - -@example -(@var{coding-system-for-decoding} . @var{coding-system-for-encoding}) -@end example +This function returns a cons cell @code{(@var{decode} . @var{encode})}, +describing the coding systems in use for decoding output from, and +encoding input to, @var{process} (@pxref{Coding Systems}). @end defun @defun set-process-coding-system process &optional decoding-system encoding-system @@ -939,6 +955,7 @@ Emacs, which is done with the functions in this section. You must specify the process to send input to, and the input data to send. The data appears on the ``standard input'' of the subprocess. +@c FIXME which? Some operating systems have limited space for buffered input in a @acronym{PTY}. On these systems, Emacs sends an @acronym{EOF} periodically amidst the other characters, to force them through. For @@ -965,26 +982,14 @@ the current buffer's process. @defun process-send-string process string This function sends @var{process} the contents of @var{string} as -standard input. If it is @code{nil}, the current buffer's process is used. - - The function returns @code{nil}. +standard input. It returns @code{nil}. For example, to make a +Shell buffer list files: @smallexample @group (process-send-string "shell<1>" "ls\n") @result{} nil @end group - - -@group ----------- Buffer: *shell* ---------- -... -introduction.texi syntax-tables.texi~ -introduction.texi~ text.texi -introduction.txt text.texi~ -... ----------- Buffer: *shell* ---------- -@end group @end smallexample @end defun @@ -1000,7 +1005,6 @@ is unimportant which number is larger.) @defun process-send-eof &optional process This function makes @var{process} see an end-of-file in its input. The @acronym{EOF} comes after any text already sent to it. - The function returns @var{process}. @smallexample @@ -1031,7 +1035,7 @@ system. For example, the signal @code{SIGINT} means that the user has typed @kbd{C-c}, or that some analogous thing has happened. Each signal has a standard effect on the subprocess. Most signals -kill the subprocess, but some stop or resume execution instead. Most +kill the subprocess, but some stop (or resume) execution instead. Most signals can optionally be handled by programs; if the program handles the signal, then we can say nothing in general about its effects. @@ -1040,7 +1044,7 @@ section. Emacs also sends signals automatically at certain times: killing a buffer sends a @code{SIGHUP} signal to all its associated processes; killing Emacs sends a @code{SIGHUP} signal to all remaining processes. (@code{SIGHUP} is a signal that usually indicates that the -user hung up the phone.) +user ``hung up the phone'', i.e., disconnected.) Each of the signal-sending functions takes two optional arguments: @var{process} and @var{current-group}. @@ -1084,6 +1088,8 @@ and cannot be handled by the subprocess. @defun quit-process &optional process current-group This function sends the signal @code{SIGQUIT} to the process @var{process}. This signal is the one sent by the ``quit +@c FIXME? Never heard of C-b being used for this. In readline, eg +@c bash, that is backward-word. character'' (usually @kbd{C-b} or @kbd{C-\}) when you are not inside Emacs. @end defun @@ -1108,11 +1114,12 @@ stopped previously. @defun signal-process process signal This function sends a signal to process @var{process}. The argument -@var{signal} specifies which signal to send; it should be an integer. +@var{signal} specifies which signal to send; it should be an integer, +or a symbol whose name is a signal. -The @var{process} argument can be a system process @acronym{ID}; that -allows you to send signals to processes that are not children of -Emacs. @xref{System Processes}. +The @var{process} argument can be a system process @acronym{ID} (an +integer); that allows you to send signals to processes that are not +children of Emacs. @xref{System Processes}. @end defun @node Output from Processes @@ -1122,10 +1129,10 @@ Emacs. @xref{System Processes}. There are two ways to receive the output that a subprocess writes to its standard output stream. The output can be inserted in a buffer, -which is called the associated buffer of the process, or a function -called the @dfn{filter function} can be called to act on the output. If -the process has no buffer and no filter function, its output is -discarded. +which is called the associated buffer of the process (@pxref{Process +Buffers}), or a function called the @dfn{filter function} can be +called to act on the output. If the process has no buffer and no +filter function, its output is discarded. When a subprocess terminates, Emacs reads any pending output, then stops reading output from that subprocess. Therefore, if the @@ -1133,19 +1140,20 @@ subprocess has children that are still live and still producing output, Emacs won't receive that output. Output from a subprocess can arrive only while Emacs is waiting: when -reading terminal input, in @code{sit-for} and @code{sleep-for} -(@pxref{Waiting}), and in @code{accept-process-output} (@pxref{Accepting -Output}). This minimizes the problem of timing errors that usually -plague parallel programming. For example, you can safely create a -process and only then specify its buffer or filter function; no output -can arrive before you finish, if the code in between does not call any -primitive that waits. +reading terminal input (see the function @code{waiting-for-user-input-p}), +in @code{sit-for} and @code{sleep-for} (@pxref{Waiting}), and in +@code{accept-process-output} (@pxref{Accepting Output}). This +minimizes the problem of timing errors that usually plague parallel +programming. For example, you can safely create a process and only +then specify its buffer or filter function; no output can arrive +before you finish, if the code in between does not call any primitive +that waits. @defvar process-adaptive-read-buffering On some systems, when Emacs reads the output from a subprocess, the output data is read in very small blocks, potentially resulting in very poor performance. This behavior can be remedied to some extent -by setting the variable @var{process-adaptive-read-buffering} to a +by setting the variable @code{process-adaptive-read-buffering} to a non-@code{nil} value (the default), as it will automatically delay reading from such processes, thus allowing them to produce more output before Emacs tries to read it. @@ -1214,9 +1222,9 @@ to insert, and updates it to point after the inserted text. That is why successive batches of output are inserted consecutively. Filter functions normally should use this marker in the same fashion -as is done by direct insertion of output in the buffer. A good -example of a filter function that uses @code{process-mark} is found at -the end of the following section. +as is done by direct insertion of output in the buffer. For an +example of a filter function that uses @code{process-mark}, +@pxref{Process Filter Example}. When the user is expected to enter input in the process buffer for transmission to the process, the process marker separates the new input @@ -1264,14 +1272,16 @@ there is no filter. The filter function can only be called when Emacs is waiting for something, because process output arrives only at such times. Emacs -waits when reading terminal input, in @code{sit-for} and -@code{sleep-for} (@pxref{Waiting}), and in @code{accept-process-output} -(@pxref{Accepting Output}). +waits when reading terminal input (see the function +@code{waiting-for-user-input-p}), in @code{sit-for} and +@code{sleep-for} (@pxref{Waiting}), and in +@code{accept-process-output} (@pxref{Accepting Output}). A filter function must accept two arguments: the associated process and a string, which is output just received from it. The function is then free to do whatever it chooses with the output. +@c Note this text is duplicated in the sentinels section. Quitting is normally inhibited within a filter function---otherwise, the effect of typing @kbd{C-g} at command level or to quit a user command would be unpredictable. If you want to permit quitting inside @@ -1282,19 +1292,20 @@ cases, the right way to do this is with the macro If an error happens during execution of a filter function, it is caught automatically, so that it doesn't stop the execution of whatever program was running when the filter function was started. However, if -@code{debug-on-error} is non-@code{nil}, the error-catching is turned -off. This makes it possible to use the Lisp debugger to debug the +@code{debug-on-error} is non-@code{nil}, errors are not caught. +This makes it possible to use the Lisp debugger to debug the filter function. @xref{Debugger}. - Many filter functions sometimes or always insert the text in the + Many filter functions sometimes (or always) insert the output in the process's buffer, mimicking the actions of Emacs when there is no -filter. Such filter functions need to use @code{set-buffer} in order to -be sure to insert in that buffer. To avoid setting the current buffer -semipermanently, these filter functions must save and restore the -current buffer. They should also check whether the buffer is still -alive, update the process marker, and in some cases update the value -of point. Here is how to do these things: +filter. Such filter functions need to make sure that they save the +current buffer, select the correct buffer (if different) before +inserting output, and then restore the original buffer. +They should also check whether the buffer is still alive, update the +process marker, and in some cases update the value of point. Here is +how to do these things: +@anchor{Process Filter Example} @smallexample @group (defun ordinary-insertion-filter (proc string) @@ -1304,7 +1315,7 @@ of point. Here is how to do these things: @end group @group (save-excursion - ;; @r{Insert the text, advancing the process marker.} + ;; @r{Insert the text, advancing the process marker.} (goto-char (process-mark proc)) (insert string) (set-marker (process-mark proc) (point))) @@ -1312,14 +1323,8 @@ of point. Here is how to do these things: @end group @end smallexample -@noindent -The reason to use @code{with-current-buffer}, rather than using -@code{save-excursion} to save and restore the current buffer, is so as -to preserve the change in point made by the second call to -@code{goto-char}. - To make the filter force the process buffer to be visible whenever new -text arrives, insert the following line just before the +text arrives, you could insert a line like the following just before the @code{with-current-buffer} construct: @smallexample @@ -1330,12 +1335,16 @@ text arrives, insert the following line just before the previously, eliminate the variable @code{moving} and call @code{goto-char} unconditionally. +@ignore In earlier Emacs versions, every filter function that did regular expression searching or matching had to explicitly save and restore the match data. Now Emacs does this automatically for filter functions; -they never need to do it explicitly. @xref{Match Data}. +they never need to do it explicitly. +@end ignore + Note that Emacs automatically saves and restores the match data +while executing filter functions. @xref{Match Data}. - The output to the function may come in chunks of any size. A program + The output to the filter may come in chunks of any size. A program that produces the same output twice in a row may send it as one batch of 200 characters one time, and five batches of 40 characters the next. If the filter looks for certain text strings in the subprocess output, make @@ -1353,7 +1362,7 @@ This function returns the filter function of @var{process}, or @code{nil} if it has none. @end defun - Here is an example of use of a filter function: + Here is an example of the use of a filter function: @smallexample @group @@ -1373,7 +1382,7 @@ if it has none. (process-send-string "shell" "ls ~/other\n") @result{} nil kept - @result{} ("lewis@@slug[8] % " + @result{} ("lewis@@slug:$ " @end group @group "FINAL-W87-SHORT.MSS backup.otl kolstad.mss~ @@ -1429,8 +1438,8 @@ bytes, Emacs by default uses @code{no-conversion} for it; see @ref{Lisp and Coding Systems, inhibit-null-byte-detection}, for how to control this behavior. - @strong{Warning:} Coding systems such as @code{undecided} which -determine the coding system from the data do not work entirely + @strong{Warning:} Coding systems such as @code{undecided}, which +determine the coding system from the data, do not work entirely reliably with asynchronous subprocess output. This is because Emacs has to process asynchronous subprocess output in batches, as it arrives. Emacs must try to detect the proper coding system from one @@ -1448,7 +1457,7 @@ output as a multibyte string or as a unibyte string according to the process's filter coding system. Emacs decodes the output according to the process output coding system, which usually produces a multibyte string, except for coding systems -such as @code{binary} and @code{raw-text} +such as @code{binary} and @code{raw-text}. @node Accepting Output @subsection Accepting Output from Processes @@ -1466,7 +1475,6 @@ output is inserted in the associated buffers or given to their filter functions. If @var{process} is non-@code{nil} then this function does not return until some output has been received from @var{process}. -@c Emacs 19 feature The arguments @var{seconds} and @var{millisec} let you specify timeout periods. The former specifies a period measured in seconds and the latter specifies one measured in milliseconds. The two time periods @@ -1474,10 +1482,10 @@ thus specified are added together, and @code{accept-process-output} returns after that much time, whether or not there has been any subprocess output. -The argument @var{millisec} is semi-obsolete nowadays because -@var{seconds} can be a floating point number to specify waiting a -fractional number of seconds. If @var{seconds} is 0, the function -accepts whatever output is pending but does not wait. +The argument @var{millisec} is obsolete (and should not be used), +because @var{seconds} can be a floating point number to specify +waiting a fractional number of seconds. If @var{seconds} is 0, the +function accepts whatever output is pending but does not wait. @c Emacs 22.1 feature If @var{process} is a process, and the argument @var{just-this-one} is @@ -1508,6 +1516,7 @@ describing the type of event. The string describing the event looks like one of the following: +@c FIXME? Also "killed\n" - see example below? @itemize @bullet @item @code{"finished\n"}. @@ -1524,7 +1533,7 @@ describing the type of event. A sentinel runs only while Emacs is waiting (e.g., for terminal input, or for time to elapse, or for process output). This avoids the -timing errors that could result from running them at random places in +timing errors that could result from running sentinels at random places in the middle of other Lisp programs. A program can wait, so that sentinels will run, by calling @code{sit-for} or @code{sleep-for} (@pxref{Waiting}), or @code{accept-process-output} (@pxref{Accepting @@ -1548,6 +1557,7 @@ should check whether the buffer is still alive. If it tries to insert into a dead buffer, it will get an error. If the buffer is dead, @code{(buffer-name (process-buffer @var{process}))} returns @code{nil}. +@c Note this text is duplicated in the filter functions section. Quitting is normally inhibited within a sentinel---otherwise, the effect of typing @kbd{C-g} at command level or to quit a user command would be unpredictable. If you want to permit quitting inside a @@ -1558,8 +1568,8 @@ right way to do this is with the macro @code{with-local-quit}. If an error happens during execution of a sentinel, it is caught automatically, so that it doesn't stop the execution of whatever programs was running when the sentinel was started. However, if -@code{debug-on-error} is non-@code{nil}, the error-catching is turned -off. This makes it possible to use the Lisp debugger to debug the +@code{debug-on-error} is non-@code{nil}, errors are not caught. +This makes it possible to use the Lisp debugger to debug the sentinel. @xref{Debugger}. While a sentinel is running, the process sentinel is temporarily @@ -1567,10 +1577,14 @@ set to @code{nil} so that the sentinel won't run recursively. For this reason it is not possible for a sentinel to specify a new sentinel. +@ignore In earlier Emacs versions, every sentinel that did regular expression searching or matching had to explicitly save and restore the match data. Now Emacs does this automatically for sentinels; they never need to do -it explicitly. @xref{Match Data}. +it explicitly. +@end ignore + Note that Emacs automatically saves and restores the match data +while executing sentinels. @xref{Match Data}. @defun set-process-sentinel process sentinel This function associates @var{sentinel} with @var{process}. If @@ -1578,7 +1592,7 @@ This function associates @var{sentinel} with @var{process}. If The default behavior when there is no sentinel is to insert a message in the process's buffer when the process status changes. -Changes in process sentinel take effect immediately---if the sentinel +Changes in process sentinels take effect immediately---if the sentinel is slated to be run but has not been called yet, and you specify a new sentinel, the eventual call to the sentinel will use the new one. @@ -1606,7 +1620,7 @@ has none. @defun waiting-for-user-input-p While a sentinel or filter function is running, this function returns non-@code{nil} if Emacs was waiting for keyboard input from the user at -the time the sentinel or filter function was called, @code{nil} if it +the time the sentinel or filter function was called, or @code{nil} if it was not. @end defun @@ -1616,7 +1630,7 @@ was not. When Emacs exits, it terminates all its subprocesses by sending them the @code{SIGHUP} signal. Because subprocesses may be doing valuable work, Emacs normally asks the user to confirm that it is ok -to terminate them. Each process has a query flag which, if +to terminate them. Each process has a query flag, which, if non-@code{nil}, says that Emacs should ask for confirmation before exiting and thus killing that process. The default for the query flag is @code{t}, meaning @emph{do} query. @@ -1629,31 +1643,13 @@ This returns the query flag of @var{process}. This function sets the query flag of @var{process} to @var{flag}. It returns @var{flag}. +Here is an example of using @code{set-process-query-on-exit-flag} on a +shell process to avoid querying: + @smallexample @group -;; @r{Don't query about the shell process} (set-process-query-on-exit-flag (get-process "shell") nil) - @result{} t -@end group -@end smallexample -@end defun - -@defun process-kill-without-query process &optional do-query -This function clears the query flag of @var{process}, so that -Emacs will not query the user on account of that process. - -Actually, the function does more than that: it returns the old value of -the process's query flag, and sets the query flag to @var{do-query}. -Please don't use this function to do those things any more---please -use the newer, cleaner functions @code{process-query-on-exit-flag} and -@code{set-process-query-on-exit-flag} in all but the simplest cases. -The only way you should use @code{process-kill-without-query} nowadays -is like this: - -@smallexample -@group -;; @r{Don't query about the shell process} -(process-kill-without-query (get-process "shell")) + @result{} nil @end group @end smallexample @end defun @@ -1665,7 +1661,7 @@ is like this: In addition to accessing and manipulating processes that are subprocesses of the current Emacs session, Emacs Lisp programs can also access other processes running on the same machine. We call -these @dfn{system processes}, to distinguish between them and Emacs +these @dfn{system processes}, to distinguish them from Emacs subprocesses. Emacs provides several primitives for accessing system processes. @@ -1685,7 +1681,7 @@ This function returns an alist of attributes for the process specified by its process ID @var{pid}. Each association in the alist is of the form @code{(@var{key} . @var{value})}, where @var{key} designates the attribute and @var{value} is the value of that attribute. The various -attribute @var{key}'s that this function can return are listed below. +attribute @var{key}s that this function can return are listed below. Not all platforms support all of these attributes; if an attribute is not supported, its association will not appear in the returned alist. Values that are numbers can be either integer or floating-point, @@ -1846,6 +1842,8 @@ as @code{shell-command}. @section Transaction Queues @cindex transaction queue +@c That's not very informative. What is a transaction, and when might +@c I want to use one? You can use a @dfn{transaction queue} to communicate with a subprocess using transactions. First use @code{tq-create} to create a transaction queue communicating with a specified process. Then you can call @@ -1875,8 +1873,11 @@ text at the end of the entire answer, but nothing before; that's how If the argument @var{delay-question} is non-@code{nil}, delay sending this question until the process has finished replying to any previous questions. This produces more reliable results with some processes. +@ignore +@c Let's not mention it then. The return value of @code{tq-enqueue} itself is not meaningful. +@end ignore @end defun @defun tq-close queue @@ -1894,10 +1895,11 @@ Transaction queues are implemented by means of a filter function. @cindex UDP Emacs Lisp programs can open stream (TCP) and datagram (UDP) network -connections to other processes on the same machine or other machines. +connections (@pxref{Datagrams}) to other processes on the same machine +or other machines. A network connection is handled by Lisp much like a subprocess, and is represented by a process object. However, the process you are -communicating with is not a child of the Emacs process, so it has no +communicating with is not a child of the Emacs process, has no process @acronym{ID}, and you can't kill it or send it signals. All you can do is send and receive data. @code{delete-process} closes the connection, but does not kill the program at the other end; that @@ -1925,7 +1927,7 @@ network connection or server, @code{serial} for a serial port connection, or @code{real} for a real subprocess. The @code{process-status} function returns @code{open}, -@code{closed}, @code{connect}, and @code{failed} for network +@code{closed}, @code{connect}, or @code{failed} for network connections. For a network server, the status is always @code{listen}. None of those values is possible for a real subprocess. @xref{Process Information}. @@ -1935,35 +1937,48 @@ subprocess. @xref{Process Information}. process, being stopped means not accepting new connections. (Up to 5 connection requests will be queued for when you resume the server; you can increase this limit, unless it is imposed by the operating -system.) For a network stream connection, being stopped means not -processing input (any arriving input waits until you resume the -connection). For a datagram connection, some number of packets may be -queued but input may be lost. You can use the function +system---see the @code{:server} keyword of @code{make-network-process}, +@ref{Network Processes}.) For a network stream connection, being +stopped means not processing input (any arriving input waits until you +resume the connection). For a datagram connection, some number of +packets may be queued but input may be lost. You can use the function @code{process-command} to determine whether a network connection or server is stopped; a non-@code{nil} value means yes. @cindex network connection, encrypted @cindex encrypted network connections -@cindex TLS network connections -@cindex STARTTLS network connections -@defun open-network-stream name buffer-or-name host service &rest parameters +@cindex @acronym{TLS} network connections +@cindex @acronym{STARTTLS} network connections +Emacs can create encrypted network connections, using either built-in +or external support. The built-in support uses the GnuTLS +(``Transport Layer Security'') library; see +@uref{http://www.gnu.org/software/gnutls/, the GnuTLS project page}. +If your Emacs was compiled with GnuTLS support, the function +@code{gnutls-available-p} is defined and returns non-@code{nil}. For +more details, @pxref{Top,, Overview, emacs-gnutls, The Emacs-GnuTLS manual}. +The external support uses the @file{starttls.el} library, which +requires a helper utility such as @command{gnutls-cli} to be installed +on the system. The @code{open-network-stream} function can +transparently handle the details of creating encrypted connections for +you, using whatever support is available. + +@defun open-network-stream name buffer host service &rest parameters This function opens a TCP connection, with optional encryption, and returns a process object that represents the connection. The @var{name} argument specifies the name for the process object. It is modified as necessary to make it unique. -The @var{buffer-or-name} argument is the buffer to associate with the +The @var{buffer} argument is the buffer to associate with the connection. Output from the connection is inserted in the buffer, unless you specify a filter function to handle the output. If -@var{buffer-or-name} is @code{nil}, it means that the connection is not +@var{buffer} is @code{nil}, it means that the connection is not associated with any buffer. The arguments @var{host} and @var{service} specify where to connect to; @var{host} is the host name (a string), and @var{service} is the name of a defined network service (a string) or a port number (an integer). -@c FIXME? Is this too lengthy for the printed manual? The remaining arguments @var{parameters} are keyword/argument pairs that are mainly relevant to encrypted connections: @@ -1980,14 +1995,15 @@ The type of connection. Options are: An ordinary, unencrypted connection. @item tls @itemx ssl -A TLS (``Transport Layer Security'') connection. +A @acronym{TLS} (``Transport Layer Security'') connection. @item nil @itemx network Start with a plain connection, and if parameters @samp{:success} and @samp{:capability-command} are supplied, try to upgrade to an encrypted -connection via STARTTLS. If that fails, retain the unencrypted connection. +connection via @acronym{STARTTLS}. If that fails, retain the +unencrypted connection. @item starttls -As for @code{nil}, but if STARTTLS fails drop the connection. +As for @code{nil}, but if @acronym{STARTTLS} fails drop the connection. @item shell A shell connection. @end table @@ -2006,22 +2022,22 @@ command @var{capability-command}. The latter defaults to the former. @item :starttls-function @var{function} Function of one argument (the response to @var{capability-command}), -which returns either @code{nil}, or the command to activate STARTTLS +which returns either @code{nil}, or the command to activate @acronym{STARTTLS} if supported. @item :success @var{regexp} -Regular expression matching a successful STARTTLS negotiation. +Regular expression matching a successful @acronym{STARTTLS} negotiation. @item :use-starttls-if-possible @var{boolean} -If non-@code{nil}, do opportunistic STARTTLS upgrades even if Emacs -doesn't have built-in TLS support. +If non-@code{nil}, do opportunistic @acronym{STARTTLS} upgrades even if Emacs +doesn't have built-in @acronym{TLS} support. @item :client-certificate @var{list-or-t} Either a list of the form @code{(@var{key-file} @var{cert-file})}, naming the certificate key file and certificate file itself, or @code{t}, meaning to query @code{auth-source} for this information -(@pxref{Top,,auth-source, auth, Emacs auth-source Library}). -Only used for TLS or STARTTLS. +(@pxref{Top,,Overview, auth, The Auth-Source Manual}). +Only used for @acronym{TLS} or @acronym{STARTTLS}. @item :return-list @var{cons-or-nil} The return value of this function. If omitted or @code{nil}, return a @@ -2045,18 +2061,20 @@ The connection type: @samp{plain} or @samp{tls}. @section Network Servers @cindex network servers - You create a server by calling @code{make-network-process} with -@code{:server t}. The server will listen for connection requests from -clients. When it accepts a client connection request, that creates a -new network connection, itself a process object, with the following -parameters: + You create a server by calling @code{make-network-process} +(@pxref{Network Processes}) with @code{:server t}. The server will +listen for connection requests from clients. When it accepts a client +connection request, that creates a new network connection, itself a +process object, with the following parameters: @itemize @bullet @item The connection's process name is constructed by concatenating the server process's @var{name} with a client identification string. The +@c FIXME? What about IPv6? Say briefly what the difference is? client identification string for an IPv4 connection looks like -@samp{<@var{a}.@var{b}.@var{c}.@var{d}:@var{p}>}. Otherwise, it is a +@samp{<@var{a}.@var{b}.@var{c}.@var{d}:@var{p}>}, which represents an +address and port number. Otherwise, it is a unique number in brackets, as in @samp{<@var{nnn}>}. The number is unique for each connection in the Emacs session. @@ -2077,7 +2095,7 @@ uses its filter and sentinel; their sole purpose is to initialize connections made to the server. @item -The connection's process contact info is set according to the client's +The connection's process contact information is set according to the client's addressing information (typically an IP address and a port number). This information is associated with the @code{process-contact} keywords @code{:host}, @code{:service}, @code{:remote}. @@ -2094,7 +2112,7 @@ The client process's plist is initialized from the server's plist. @section Datagrams @cindex datagrams - A datagram connection communicates with individual packets rather + A @dfn{datagram} connection communicates with individual packets rather than streams of data. Each call to @code{process-send} sends one datagram packet (@pxref{Input to Processes}), and each datagram received results in one call to the filter function. @@ -2147,7 +2165,8 @@ process object that represents it. The arguments @var{args} are a list of keyword/argument pairs. Omitting a keyword is always equivalent to specifying it with value @code{nil}, except for @code{:coding}, @code{:filter-multibyte}, and @code{:reuseaddr}. Here -are the meaningful keywords: +are the meaningful keywords (those corresponding to network options +are listed in the following section): @table @asis @item :name @var{name} @@ -2163,7 +2182,7 @@ connection. Both connections and servers can be of these types. @item :server @var{server-flag} If @var{server-flag} is non-@code{nil}, create a server. Otherwise, create a connection. For a stream type server, @var{server-flag} may -be an integer which then specifies the length of the queue of pending +be an integer, which then specifies the length of the queue of pending connections to the server. The default queue length is 5. @item :host @var{host} @@ -2174,7 +2193,7 @@ specify a valid address for the local host, and only clients connecting to that address will be accepted. @item :service @var{service} -@var{service} specifies a port number to connect to, or, for a server, +@var{service} specifies a port number to connect to; or, for a server, the port number to listen on. It should be a service name that translates to a port number, or an integer specifying the port number directly. For a server, it can also be @code{t}, which means to let @@ -2185,18 +2204,18 @@ the system select an unused port number. communication. @code{nil} means determine the proper address family automatically for the given @var{host} and @var{service}. @code{local} specifies a Unix socket, in which case @var{host} is -ignored. @code{ipv4} and @code{ipv6} specify to use IPv4 and IPv6 +ignored. @code{ipv4} and @code{ipv6} specify to use IPv4 and IPv6, respectively. @item :local @var{local-address} For a server process, @var{local-address} is the address to listen on. -It overrides @var{family}, @var{host} and @var{service}, and you -may as well not specify them. +It overrides @var{family}, @var{host} and @var{service}, so you +might as well not specify them. @item :remote @var{remote-address} For a connection, @var{remote-address} is the address to connect to. -It overrides @var{family}, @var{host} and @var{service}, and you -may as well not specify them. +It overrides @var{family}, @var{host} and @var{service}, so you +might as well not specify them. For a datagram server, @var{remote-address} specifies the initial setting of the remote datagram address. @@ -2220,7 +2239,7 @@ integers @code{[@var{a} @var{b} @var{c} @var{d} @var{e} @var{f} port number @var{p}. @item -A local address is represented as a string which specifies the address +A local address is represented as a string, which specifies the address in the local address space. @item @@ -2242,8 +2261,8 @@ second argument matching @code{"open"} (if successful) or has succeeded or failed. @item :stop @var{stopped} -Start the network connection or server in the `stopped' state if -@var{stopped} is non-@code{nil}. +If @var{stopped} is non-@code{nil}, start the network connection or +server in the ``stopped'' state. @item :buffer @var{buffer} Use @var{buffer} as the process buffer. @@ -2264,6 +2283,11 @@ Initialize the process query flag to @var{query-flag}. @item :filter @var{filter} Initialize the process filter to @var{filter}. +@item :filter-multibyte @var{multibyte} +If @var{multibyte} is non-@code{nil}, strings given to the process +filter are multibyte, otherwise they are unibyte. The default is the +default value of @code{enable-multibyte-characters}. + @item :sentinel @var{sentinel} Initialize the process sentinel to @var{sentinel}. @@ -2271,7 +2295,7 @@ Initialize the process sentinel to @var{sentinel}. Initialize the log function of a server process to @var{log}. The log function is called each time the server accepts a network connection from a client. The arguments passed to the log function are -@var{server}, @var{connection}, and @var{message}, where @var{server} +@var{server}, @var{connection}, and @var{message}; where @var{server} is the server process, @var{connection} is the new process for the connection, and @var{message} is a string describing what has happened. @@ -2308,7 +2332,7 @@ Using this option may require special privileges on some systems. @item :broadcast @var{broadcast-flag} If @var{broadcast-flag} is non-@code{nil} for a datagram process, the process will receive datagram packet sent to a broadcast address, and -be able to send packets to a broadcast address. Ignored for a stream +be able to send packets to a broadcast address. This is ignored for a stream connection. @item :dontroute @var{dontroute-flag} @@ -2324,10 +2348,11 @@ If @var{linger-arg} is non-@code{nil}, wait for successful transmission of all queued packets on the connection before it is deleted (see @code{delete-process}). If @var{linger-arg} is an integer, it specifies the maximum time in seconds to wait for queued -packets to be sent before closing the connection. Default is -@code{nil} which means to discard unsent queued packets when the +packets to be sent before closing the connection. The default is +@code{nil}, which means to discard unsent queued packets when the process is deleted. +@c FIXME Where out-of-band data is ...? @item :oobinline @var{oobinline-flag} If @var{oobinline-flag} is non-@code{nil} for a stream connection, receive out-of-band data in the normal data stream. Otherwise, ignore @@ -2336,7 +2361,7 @@ out-of-band data. @item :priority @var{priority} Set the priority for packets sent on this connection to the integer @var{priority}. The interpretation of this number is protocol -specific, such as setting the TOS (type of service) field on IP +specific; such as setting the TOS (type of service) field on IP packets sent on this connection. It may also have system dependent effects, such as selecting a specific output queue on the network interface. @@ -2344,20 +2369,20 @@ interface. @item :reuseaddr @var{reuseaddr-flag} If @var{reuseaddr-flag} is non-@code{nil} (the default) for a stream server process, allow this server to reuse a specific port number (see -@code{:service}) unless another process on this host is already +@code{:service}), unless another process on this host is already listening on that port. If @var{reuseaddr-flag} is @code{nil}, there may be a period of time after the last use of that port (by any -process on the host), where it is not possible to make a new server on +process on the host) where it is not possible to make a new server on that port. @end table @defun set-network-process-option process option value &optional no-error This function sets or modifies a network option for network process -@var{process}. See @code{make-network-process} for details of options -@var{option} and their corresponding values @var{value}. If -@var{no-error} is non-@code{nil}, this function returns @code{nil} -instead of signaling an error if @var{option} is not a supported -option. If the function successfully completes, it returns @code{t}. +@var{process}. The accepted options and values are as for +@code{make-network-process}. If @var{no-error} is non-@code{nil}, +this function returns @code{nil} instead of signaling an error if +@var{option} is not a supported option. If the function successfully +completes, it returns @code{t}. The current setting of an option is available via the @code{process-contact} function. @@ -2374,11 +2399,9 @@ The current setting of an option is available via the @end example @noindent -The result of the first form is @code{t} if it works to specify +The result of this form is @code{t} if it works to specify @var{keyword} with value @var{value} in @code{make-network-process}. -The result of the second form is @code{t} if @var{keyword} is -supported by @code{make-network-process}. Here are some of the -@var{keyword}---@var{value} pairs you can test in +Here are some of the @var{keyword}---@var{value} pairs you can test in this way. @table @code @@ -2402,20 +2425,10 @@ Non-@code{nil} if the system can select the port for a server. @end example @noindent -Here are some of the options you can test in this way. - -@table @code -@item :bindtodevice -@itemx :broadcast -@itemx :dontroute -@itemx :keepalive -@itemx :linger -@itemx :oobinline -@itemx :priority -@itemx :reuseaddr -That particular network option is supported by -@code{make-network-process} and @code{set-network-process-option}. -@end table +The accepted @var{keyword} values are @code{:bindtodevice}, etc. +For the complete list, @pxref{Network Options}. This form returns +non-@code{nil} if that particular network option is supported by +@code{make-network-process} (or @code{set-network-process-option}). @node Misc Network @section Misc Network Facilities @@ -2487,11 +2500,11 @@ lets you change the speed, bytesize, and other parameters. In a terminal window created by @code{serial-term}, you can click on the mode line for configuration. - A serial connection is represented by a process object which can be -used similar to a subprocess or network process. You can send and -receive data and configure the serial port. A serial process object -has no process ID, you can't send signals to it, and the status codes -are different from other types of processes. + A serial connection is represented by a process object, which can be +used in a similar way to a subprocess or network process. You can send and +receive data, and configure the serial port. A serial process object +has no process ID, however, and you can't send signals to it, and the +status codes are different from other types of processes. @code{delete-process} on the process object or @code{kill-buffer} on the process buffer close the connection, but this does not affect the device connected to the serial port. @@ -2499,15 +2512,17 @@ device connected to the serial port. The function @code{process-type} returns the symbol @code{serial} for a process object representing a serial port connection. - Serial ports are available on GNU/Linux, Unix, and Windows systems. + Serial ports are available on GNU/Linux, Unix, and MS Windows systems. @deffn Command serial-term port speed Start a terminal-emulator for a serial port in a new buffer. -@var{port} is the name of the serial port to which to connect. For -example, this could be @file{/dev/ttyS0} on Unix. On Windows, this +@var{port} is the name of the serial port to connect to. For +example, this could be @file{/dev/ttyS0} on Unix. On MS Windows, this could be @file{COM1}, or @file{\\.\COM10} (double the backslashes in Lisp strings). +@c FIXME is 9600 still the most common value, or is it 115200 now? +@c (Same value, 9600, appears below as well.) @var{speed} is the speed of the serial port in bits per second. 9600 is a common value. The buffer is in Term mode; see @ref{Term Mode,,, emacs, The GNU Emacs Manual}, for the commands to use in that buffer. @@ -2516,25 +2531,27 @@ You can change the speed and the configuration in the mode line menu. @defun make-serial-process &rest args This function creates a process and a buffer. Arguments are specified -as keyword/argument pairs. Here's the list of the meaningful keywords: +as keyword/argument pairs. Here's the list of the meaningful +keywords, with the first two (@var{port} and @var{speed}) being mandatory: @table @code -@item :port @var{port}@r{ (mandatory)} +@item :port @var{port} This is the name of the serial port. On Unix and GNU systems, this is a file name such as @file{/dev/ttyS0}. On Windows, this could be @file{COM1}, or @file{\\.\COM10} for ports higher than @file{COM9} (double the backslashes in Lisp strings). -@item :speed @var{speed}@r{ (mandatory)} +@item :speed @var{speed} The speed of the serial port in bits per second. This function calls -@code{serial-process-configure} to handle the speed. +@code{serial-process-configure} to handle the speed; see the +following documentation of that function for more details. @item :name @var{name} The name of the process. If @var{name} is not given, @var{port} will serve as the process name as well. @item :buffer @var{buffer} -The buffer to associate with the process. The value could be either a +The buffer to associate with the process. The value can be either a buffer or a string that names a buffer. Process output goes at the end of that buffer, unless you specify an output stream or filter function to handle the output. If @var{buffer} is not given, the @@ -2544,16 +2561,16 @@ keyword. @item :coding @var{coding} If @var{coding} is a symbol, it specifies the coding system used for both reading and writing for this process. If @var{coding} is a cons -@code{(decoding . encoding)}, @var{decoding} is used for reading, and -@var{encoding} is used for writing. If not specified, the default is -to determine the coding systems from data itself. +@code{(@var{decoding} . @var{encoding})}, @var{decoding} is used for +reading, and @var{encoding} is used for writing. If not specified, +the default is to determine the coding systems from the data itself. @item :noquery @var{query-flag} Initialize the process query flag to @var{query-flag}. @xref{Query Before Exit}. The flags defaults to @code{nil} if unspecified. @item :stop @var{bool} -Start process in the @code{stopped} state if @var{bool} is +Start process in the ``stopped'' state if @var{bool} is non-@code{nil}. In the stopped state, a serial process does not accept incoming data, but you can send outgoing data. The stopped state is cleared by @code{continue-process} and set by @@ -2568,8 +2585,7 @@ Install @var{sentinel} as the process sentinel. @item :plist @var{plist} Install @var{plist} as the initial plist of the process. -@item :speed -@itemx :bytesize +@item :bytesize @itemx :parity @itemx :stopbits @itemx :flowcontrol @@ -2597,7 +2613,7 @@ Here is an example: This functions configures a serial port connection. Arguments are specified as keyword/argument pairs. Attributes that are not given are re-initialized from the process's current configuration (available -via the function @code{process-contact}) or set to reasonable default +via the function @code{process-contact}), or set to reasonable default values. The following arguments are defined: @table @code @@ -2615,8 +2631,8 @@ rate}. The value can be any number, but most serial ports work only at a few defined values between 1200 and 115200, with 9600 being the most common value. If @var{speed} is @code{nil}, the function ignores all other arguments and does not configure the port. This may be -useful for special serial ports such as Bluetooth-to-serial converters -which can only be configured through AT commands sent through the +useful for special serial ports such as Bluetooth-to-serial converters, +which can only be configured through @samp{AT} commands sent through the connection. The value of @code{nil} for @var{speed} is valid only for connections that were already opened by a previous call to @code{make-serial-process} or @code{serial-term}. @@ -2643,9 +2659,9 @@ flow control). If @var{flowcontrol} is not given, it defaults to no flow control. @end table -@code{serial-process-configure} is called by -@code{make-serial-process} for the initial configuration of the serial -port. +Internally, @code{make-serial-process} calls +@code{serial-process-configure} for the initial configuration of the +serial port. @end defun @node Byte Packing @@ -2655,8 +2671,12 @@ port. This section describes how to pack and unpack arrays of bytes, usually for binary network protocols. These functions convert byte arrays to alists, and vice versa. The byte array can be represented as a +@c FIXME? No multibyte? unibyte string or as a vector of integers, while the alist associates symbols either with fixed-size objects or with recursive sub-alists. +To use the functions referred to in this section, load the +@code{bindat} library. +@c It doesn't have any autoloads. @cindex serializing @cindex deserializing @@ -2677,10 +2697,10 @@ direction is also known as @dfn{serializing} or @dfn{packing}. To control unpacking and packing, you write a @dfn{data layout specification}, a special nested list describing named and typed -@dfn{fields}. This specification controls length of each field to be +@dfn{fields}. This specification controls the length of each field to be processed, and how to pack or unpack it. We normally keep bindat specs in variables whose names end in @samp{-bindat-spec}; that kind of name -is automatically recognized as ``risky.'' +is automatically recognized as ``risky''. @cindex endianness @cindex big endian @@ -2690,7 +2710,7 @@ is automatically recognized as ``risky.'' that the field represents and, in the case of multibyte fields, how the bytes are ordered within the field. The two possible orderings are ``big endian'' (also known as ``network byte ordering'') and -``little endian.'' For instance, the number @code{#x23cd} (decimal +``little endian''. For instance, the number @code{#x23cd} (decimal 9165) in big endian would be the two bytes @code{#x23} @code{#xcd}; and in little endian, @code{#xcd} @code{#x23}. Here are the possible type values: @@ -2726,12 +2746,12 @@ String of length @var{len}. Zero-terminated string, in a fixed-size field with length @var{len}. @item vec @var{len} [@var{type}] -Vector of @var{len} elements of type @var{type}, or bytes if not -@var{type} is specified. +Vector of @var{len} elements of type @var{type}, defaulting to bytes. The @var{type} is any of the simple types above, or another vector -specified as a list @code{(vec @var{len} [@var{type}])}. +specified as a list of the form @code{(vec @var{len} [@var{type}])}. @item ip +@c FIXME? IPv6? Four-byte vector representing an Internet address. For example: @code{[127 0 0 1]} for localhost. @@ -2759,12 +2779,11 @@ below, or by an expression @code{(eval @var{form})} where @var{form} should evaluate to an integer, specifying the field length. A field specification generally has the form @code{([@var{name}] -@var{handler})}. The square braces indicate that @var{name} is -optional. (Don't use names that are symbols meaningful as type -specifications (above) or handler specifications (below), since that -would be ambiguous.) @var{name} can be a symbol or the expression -@code{(eval @var{form})}, in which case @var{form} should evaluate to -a symbol. +@var{handler})}, where @var{name} is optional. Don't use names that +are symbols meaningful as type specifications (above) or handler +specifications (below), since that would be ambiguous. @var{name} can +be a symbol or an expression @code{(eval @var{form})}, in which case +@var{form} should evaluate to a symbol. @var{handler} describes how to unpack or pack the field and can be one of the following: @@ -2811,10 +2830,11 @@ of @var{form}. A non-@code{nil} result indicates a match. @item repeat @var{count} @var{field-specs}@dots{} Process the @var{field-specs} recursively, in order, then repeat -starting from the first one, processing all the specs @var{count} +starting from the first one, processing all the specifications @var{count} times overall. The @var{count} is given using the same formats as a field length---if an @code{eval} form is used, it is evaluated just once. -For correct operation, each spec in @var{field-specs} must include a name. +For correct operation, each specification in @var{field-specs} must +include a name. @end table For the @code{(eval @var{form})} forms used in a bindat specification, @@ -2853,9 +2873,10 @@ specification, @code{bindat-raw} to a byte array, and @var{struct} to an alist representing unpacked field data. @defun bindat-unpack spec bindat-raw &optional bindat-idx +@c FIXME? Again, no multibyte? This function unpacks data from the unibyte string or byte array @code{bindat-raw} -according to @var{spec}. Normally this starts unpacking at the +according to @var{spec}. Normally, this starts unpacking at the beginning of the byte array, but if @var{bindat-idx} is non-@code{nil}, it specifies a zero-based starting position to use instead. @@ -2891,7 +2912,7 @@ according to @var{spec}. @defun bindat-pack spec struct &optional bindat-raw bindat-idx This function returns a byte array packed according to @var{spec} from -the data in the alist @var{struct}. Normally it creates and fills a +the data in the alist @var{struct}. It normally creates and fills a new byte array starting at the beginning. However, if @var{bindat-raw} is non-@code{nil}, it specifies a pre-allocated unibyte string or vector to pack into. If @var{bindat-idx} is non-@code{nil}, it specifies the starting @@ -2904,6 +2925,7 @@ meets or exceeds the total length to avoid an out-of-range error. @defun bindat-ip-to-string ip Convert the Internet address vector @var{ip} to a string in the usual dotted notation. +@c FIXME? Does it do IPv6? @example (bindat-ip-to-string [127 0 0 1]) @@ -2913,10 +2935,16 @@ dotted notation. @node Bindat Examples @subsection Examples of Byte Unpacking and Packing +@c FIXME? This seems a very long example for something that is not used +@c very often. As of 24.1, gdb-mi.el is the only user of bindat.el in Emacs. +@c Maybe one or both of these examples should just be moved to the +@c commentary of bindat.el. Here is a complete example of byte unpacking and packing: @lisp +(require 'bindat) + (defvar fcookie-index-spec '((:version u32) (:count u32) @@ -2925,16 +2953,14 @@ dotted notation. (:flags u32) (:delim u8) (:ignored fill 3) - (:offset repeat (:count) - (:foo u32))) + (:offset repeat (:count) (:foo u32))) "Description of a fortune cookie index file's contents.") (defun fcookie (cookies &optional index) "Display a random fortune cookie from file COOKIES. Optional second arg INDEX specifies the associated index -filename, which is by default constructed by appending -\".dat\" to COOKIES. Display cookie text in possibly -new buffer \"*Fortune Cookie: BASENAME*\" where BASENAME +filename, by default \"COOKIES.dat\". Display cookie text +in buffer \"*Fortune Cookie: BASENAME*\", where BASENAME is COOKIES without the directory part." (interactive "fCookies file: ") (let* ((info (with-temp-buffer @@ -2957,10 +2983,9 @@ is COOKIES without the directory part." (defun fcookie-create-index (cookies &optional index delim) "Scan file COOKIES, and write out its index file. -Optional second arg INDEX specifies the index filename, -which is by default constructed by appending \".dat\" to -COOKIES. Optional third arg DELIM specifies the unibyte -character which, when found on a line of its own in +Optional arg INDEX specifies the index filename, which by +default is \"COOKIES.dat\". Optional arg DELIM specifies the +unibyte character that, when found on a line of its own in COOKIES, indicates the border between entries." (interactive "fCookies file: ") (setq delim (or delim ?%)) @@ -2997,8 +3022,8 @@ COOKIES, indicates the border between entries." (write-file (or index (concat cookies ".dat"))))))) @end lisp -Following is an example of defining and unpacking a complex structure. -Consider the following C structures: +The following is an example of defining and unpacking a complex +structure. Consider the following C structures: @example struct header @{ @@ -3011,14 +3036,14 @@ struct header @{ struct data @{ unsigned char type; unsigned char opcode; - unsigned short length; /* In network byte order */ + unsigned short length; /* in network byte order */ unsigned char id[8]; /* null-terminated string */ unsigned char data[/* (length + 3) & ~3 */]; @}; struct packet @{ struct header header; - unsigned long counters[2]; /* In little endian order */ + unsigned long counters[2]; /* in little endian order */ unsigned char items; unsigned char filler[3]; struct data item[/* items */]; @@ -3026,7 +3051,7 @@ struct packet @{ @}; @end example -The corresponding data layout specification: +The corresponding data layout specification is: @lisp (setq header-spec @@ -3038,21 +3063,21 @@ The corresponding data layout specification: (setq data-spec '((type u8) (opcode u8) - (length u16) ;; network byte order + (length u16) ; network byte order (id strz 8) (data vec (length)) (align 4))) (setq packet-spec '((header struct header-spec) - (counters vec 2 u32r) ;; little endian order + (counters vec 2 u32r) ; little endian order (items u8) (fill 3) (item repeat (items) (struct data-spec)))) @end lisp -A binary data representation: +A binary data representation is: @lisp (setq binary-data @@ -3062,7 +3087,7 @@ A binary data representation: 1 4 0 7 ?B ?C ?D ?E ?F ?G 0 0 6 7 8 9 10 11 12 0 ]) @end lisp -The corresponding decoded structure: +The corresponding decoded structure is: @lisp (setq decoded (bindat-unpack packet-spec binary-data)) @@ -3086,7 +3111,7 @@ The corresponding decoded structure: (type . 1)))) @end lisp -Fetching data from this structure: +An example of fetching data from this structure: @lisp (bindat-get-field decoded 'item 1 'id) diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index e79d361bfeb..786bffc1f84 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/searching @node Searching and Matching, Syntax Tables, Non-ASCII Characters, Top @chapter Searching and Matching @cindex searching diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 50f75da2de8..16cc5f946d0 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/sequences @node Sequences Arrays Vectors, Hash Tables, Lists, Top @chapter Sequences, Arrays, and Vectors @cindex sequence diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index 1628f32aa29..7028b6e4e3f 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc. +@c Copyright (C) 1990-1994, 1998-1999, 2001-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/streams @node Read and Print, Minibuffers, Debugging, Top @comment node-name, next, previous, up @chapter Reading and Printing Lisp Objects diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 7813283ade5..cadbc26b910 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/strings @node Strings and Characters, Lists, Numbers, Top @comment node-name, next, previous, up @chapter Strings and Characters @@ -1117,7 +1116,7 @@ Exits}). @acronym{ASCII} characters; for example, in the Turkish language environment, the @acronym{ASCII} character @samp{I} is downcased into a Turkish ``dotless i''. This can interfere with code that requires -ordinary ASCII case conversion, such as implementations of +ordinary @acronym{ASCII} case conversion, such as implementations of @acronym{ASCII}-based network protocols. In that case, use the @code{with-case-table} macro with the variable @var{ascii-case-table}, which stores the unmodified case table for the @acronym{ASCII} diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index 0ee22b905b6..ac2cea02040 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 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/symbols @node Symbols, Evaluation, Hash Tables, Top @chapter Symbols @cindex symbol diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi index e2fb3238642..830ceeedefd 100644 --- a/doc/lispref/syntax.texi +++ b/doc/lispref/syntax.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/syntax @node Syntax Tables, Abbrevs, Searching and Matching, Top @chapter Syntax Tables @cindex parsing buffer text diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 770dd5b5777..a9c51fead1b 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -1,8 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. +@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/text @node Text, Non-ASCII Characters, Markers, Top @chapter Text @cindex text @@ -4345,7 +4344,7 @@ changed text, its length is simply the difference between the first two arguments. @end defvar - Output of messages into the @samp{*Messages*} buffer does not + Output of messages into the @file{*Messages*} buffer does not call these functions. @defmac combine-after-change-calls body@dots{} diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 5874a848807..4ba7dd9dfe9 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1993, 1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/tips @node Tips, GNU Emacs Internals, GPL, Top @appendix Tips and Conventions @cindex tips for writing Lisp diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 548d2e99414..e0e629ec9d3 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -2,7 +2,6 @@ @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/variables @node Variables, Functions, Control Structures, Top @chapter Variables @cindex variable diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index df269868e09..25ea8577467 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi @@ -141,7 +141,7 @@ Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}. * Functions:: A function is a Lisp program that can be invoked from other functions. * Macros:: Macros are a way to extend the Lisp language. -* Customization:: Writing customization declarations. +* Customization:: Making variables and faces customizable. * Loading:: Reading files of Lisp code into Lisp. * Byte Compilation:: Compilation makes programs run faster. @@ -520,6 +520,8 @@ Writing Customization Definitions * Group Definitions:: Writing customization group definitions. * Variable Definitions:: Declaring user options. * Customization Types:: Specifying the type of a user option. +* Applying Customizations:: Functions to apply customization settings. +* Custom Themes:: Writing Custom themes. Customization Types @@ -656,8 +658,8 @@ Minibuffers * Multiple Queries:: Asking a series of similar questions. * Reading a Password:: Reading a password from the terminal. * Minibuffer Commands:: Commands used as key bindings in minibuffers. -* Minibuffer Contents:: How such commands access the minibuffer text. * Minibuffer Windows:: Operating on the special minibuffer windows. +* Minibuffer Contents:: How such commands access the minibuffer text. * Recursive Mini:: Whether recursive entry to minibuffer is allowed. * Minibuffer Misc:: Various customization hooks and variables. @@ -668,7 +670,7 @@ Completion * Minibuffer Completion:: Invoking the minibuffer with completion. * Completion Commands:: Minibuffer commands that do completion. * High-Level Completion:: Convenient special cases of completion - (reading buffer name, file name, etc.). + (reading buffer names, variable names, etc.). * Reading File Names:: Using completion to read file names and shell commands. * Completion Variables:: Variables controlling completion behavior. @@ -1317,7 +1319,7 @@ Overlays Faces -* Defining Faces:: How to define a face with @code{defface}. +* Defining Faces:: How to define a face. * Face Attributes:: What is in a face? * Attribute Functions:: Functions to examine and set face attributes. * Displaying Faces:: How Emacs combines the faces specified for diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 2a2578158bf..2fd2a8d8224 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi @@ -140,7 +140,7 @@ Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}. * Functions:: A function is a Lisp program that can be invoked from other functions. * Macros:: Macros are a way to extend the Lisp language. -* Customization:: Writing customization declarations. +* Customization:: Making variables and faces customizable. * Loading:: Reading files of Lisp code into Lisp. * Byte Compilation:: Compilation makes programs run faster. @@ -519,6 +519,8 @@ Writing Customization Definitions * Group Definitions:: Writing customization group definitions. * Variable Definitions:: Declaring user options. * Customization Types:: Specifying the type of a user option. +* Applying Customizations:: Functions to apply customization settings. +* Custom Themes:: Writing Custom themes. Customization Types @@ -655,8 +657,8 @@ Minibuffers * Multiple Queries:: Asking a series of similar questions. * Reading a Password:: Reading a password from the terminal. * Minibuffer Commands:: Commands used as key bindings in minibuffers. -* Minibuffer Contents:: How such commands access the minibuffer text. * Minibuffer Windows:: Operating on the special minibuffer windows. +* Minibuffer Contents:: How such commands access the minibuffer text. * Recursive Mini:: Whether recursive entry to minibuffer is allowed. * Minibuffer Misc:: Various customization hooks and variables. @@ -667,7 +669,7 @@ Completion * Minibuffer Completion:: Invoking the minibuffer with completion. * Completion Commands:: Minibuffer commands that do completion. * High-Level Completion:: Convenient special cases of completion - (reading buffer name, file name, etc.). + (reading buffer names, variable names, etc.). * Reading File Names:: Using completion to read file names and shell commands. * Completion Variables:: Variables controlling completion behavior. @@ -1316,7 +1318,7 @@ Overlays Faces -* Defining Faces:: How to define a face with @code{defface}. +* Defining Faces:: How to define a face. * Face Attributes:: What is in a face? * Attribute Functions:: Functions to examine and set face attributes. * Displaying Faces:: How Emacs combines the faces specified for diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 8df32785036..a9a25d8e867 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -3,7 +3,6 @@ @c Copyright (C) 1990-1995, 1998-1999, 2001-2012 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. -@setfilename ../../info/windows @node Windows, Frames, Buffers, Top @chapter Windows diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index be79a9d864d..14f389044bb 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,29 @@ +2012-04-20 Glenn Morris + + * faq.texi (New in Emacs 24): New section. + (Packages that do not come with Emacs): Mention M-x list-packages. + +2012-04-14 Alan Mackenzie + + * cc-mode.texi (c-offsets-alist): Correct a typo. + +2012-04-14 Jérémie Courrèges-Anglas (tiny change) + + * org.texi (Deadlines and scheduling): Fix the example: the + DEADLINE item should come right after the headline. We enforce + this convention, so it is a bug not to illustrate it correctly in + the manual. + +2012-04-14 Ippei FURUHASHI (tiny change) + + * org.texi (Agenda commands): Fix documentation bug by swapping + the equivalent keybindings to `org-agenda-next-line' with the ones + to `org-agenda-previous-line'. + +2012-04-14 Glenn Morris + + * Makefile.in: Replace non-portable use of $< in ordinary rules. + 2012-04-09 Eli Zaretskii * makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 429b84abf8f..390b077bbb0 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -1,6 +1,6 @@ #### Makefile for documentation other than the Emacs manual. -# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1994, 1996-2012 Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -227,235 +227,237 @@ pdf: $(PDF_TARGETS) # to exist in the build directory. # In a distribution of Emacs, the Info files should be up to date. +# Note: "<" is not portable in ordinary make rules. + ## "short" target names for convenience, to just rebuild one manual. ada-mode : $(infodir)/ada-mode $(infodir)/ada-mode: ada-mode.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ada-mode.texi ada-mode.dvi: ${srcdir}/ada-mode.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/ada-mode.texi ada-mode.pdf: ${srcdir}/ada-mode.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/ada-mode.texi auth : $(infodir)/auth $(infodir)/auth: auth.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) auth.texi auth.dvi: ${srcdir}/auth.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/auth.texi auth.pdf: ${srcdir}/auth.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/auth.texi autotype : $(infodir)/autotype $(infodir)/autotype: autotype.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) autotype.texi autotype.dvi: ${srcdir}/autotype.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/autotype.texi autotype.pdf: ${srcdir}/autotype.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/autotype.texi calc : $(infodir)/calc $(infodir)/calc: calc.texi $(emacsdir)/emacsver.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) calc.texi calc.dvi: ${srcdir}/calc.texi $(emacsdir)/emacsver.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/calc.texi calc.pdf: ${srcdir}/calc.texi $(emacsdir)/emacsver.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/calc.texi ccmode : $(infodir)/ccmode $(infodir)/ccmode: cc-mode.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) cc-mode.texi cc-mode.dvi: ${srcdir}/cc-mode.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/cc-mode.texi cc-mode.pdf: ${srcdir}/cc-mode.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/cc-mode.texi cl : $(infodir)/cl $(infodir)/cl: cl.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) cl.texi cl.dvi: ${srcdir}/cl.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi cl.pdf: ${srcdir}/cl.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/cl.texi dbus : $(infodir)/dbus $(infodir)/dbus: dbus.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) dbus.texi dbus.dvi: ${srcdir}/dbus.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/dbus.texi dbus.pdf: ${srcdir}/dbus.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/dbus.texi dired-x : $(infodir)/dired-x $(infodir)/dired-x: dired-x.texi $(emacsdir)/emacsver.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) dired-x.texi dired-x.dvi: ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/dired-x.texi dired-x.pdf: ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/dired-x.texi ebrowse : $(infodir)/ebrowse $(infodir)/ebrowse: ebrowse.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ebrowse.texi ebrowse.dvi: ${srcdir}/ebrowse.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/ebrowse.texi ebrowse.pdf: ${srcdir}/ebrowse.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/ebrowse.texi ede : $(infodir)/ede $(infodir)/ede: ede.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ede.texi ede.dvi: ${srcdir}/ede.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/ede.texi ede.pdf: ${srcdir}/ede.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/ede.texi ediff : $(infodir)/ediff $(infodir)/ediff: ediff.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ediff.texi ediff.dvi: ${srcdir}/ediff.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/ediff.texi ediff.pdf: ${srcdir}/ediff.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/ediff.texi edt : $(infodir)/edt $(infodir)/edt: edt.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) edt.texi edt.dvi: ${srcdir}/edt.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/edt.texi edt.pdf: ${srcdir}/edt.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/edt.texi eieio : $(infodir)/eieio $(infodir)/eieio: eieio.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) eieio.texi eieio.dvi: ${srcdir}/eieio.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/eieio.texi eieio.pdf: ${srcdir}/eieio.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/eieio.texi emacs-gnutls : $(infodir)/emacs-gnutls $(infodir)/emacs-gnutls: emacs-gnutls.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) emacs-gnutls.texi emacs-gnutls.dvi: ${srcdir}/emacs-gnutls.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-gnutls.texi emacs-gnutls.pdf: ${srcdir}/emacs-gnutls.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-gnutls.texi emacs-mime : $(infodir)/emacs-mime $(infodir)/emacs-mime: emacs-mime.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --enable-encoding $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --enable-encoding emacs-mime.texi emacs-mime.dvi: ${srcdir}/emacs-mime.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-mime.texi emacs-mime.pdf: ${srcdir}/emacs-mime.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-mime.texi epa : $(infodir)/epa $(infodir)/epa: epa.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) epa.texi epa.dvi: ${srcdir}/epa.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/epa.texi epa.pdf: ${srcdir}/epa.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/epa.texi erc : $(infodir)/erc $(infodir)/erc: erc.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) erc.texi erc.dvi: ${srcdir}/erc.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/erc.texi erc.pdf: ${srcdir}/erc.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/erc.texi ert : $(infodir)/ert $(infodir)/ert: ert.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ert.texi ert.dvi: ${srcdir}/ert.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/ert.texi ert.pdf: ${srcdir}/ert.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/ert.texi eshell : $(infodir)/eshell $(infodir)/eshell: eshell.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) eshell.texi eshell.dvi: ${srcdir}/eshell.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/eshell.texi eshell.pdf: ${srcdir}/eshell.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/eshell.texi eudc : $(infodir)/eudc $(infodir)/eudc: eudc.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) eudc.texi eudc.dvi: ${srcdir}/eudc.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/eudc.texi eudc.pdf: ${srcdir}/eudc.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/eudc.texi efaq : $(infodir)/efaq $(infodir)/efaq: faq.texi $(emacsdir)/emacsver.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) faq.texi faq.dvi: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/faq.texi faq.pdf: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/faq.texi ## This is the name used on the Emacs web-page. ## sed fixes up links to point to split version of the manual. emacs-faq.html: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi $(MAKEINFO) $(MAKEINFO_OPTS) --no-split \ - --css-ref='/layout.css' --html -o $@ $< + --css-ref='/layout.css' --html -o $@ ${srcdir}/faq.texi sed -i -e 's|a href="\([a-z]*\)\.html#\([^"]*\)"|a href="manual/html_node/\1/\2.html"|g' \ -e 's|/Top\.html|/|g' $@ emacs-faq.text: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi - $(MAKEINFO) $(MAKEINFO_OPTS) --plaintext -o $@ $< + $(MAKEINFO) $(MAKEINFO_OPTS) --plaintext -o $@ ${srcdir}/faq.texi flymake : $(infodir)/flymake $(infodir)/flymake: flymake.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) flymake.texi flymake.dvi: ${srcdir}/flymake.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/flymake.texi flymake.pdf: ${srcdir}/flymake.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/flymake.texi forms : $(infodir)/forms $(infodir)/forms: forms.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) forms.texi forms.dvi: ${srcdir}/forms.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/forms.texi forms.pdf: ${srcdir}/forms.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/forms.texi # gnus/message/emacs-mime/sieve/pgg are part of Gnus: gnus : $(infodir)/gnus $(infodir)/gnus: gnus.texi gnus-faq.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) gnus.texi gnus.dvi: ${srcdir}/gnus.texi gnus-faq.texi - sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmp.texi + sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi $(ENVADD) $(TEXI2DVI) gnustmp.texi cp gnustmp.dvi $*.dvi rm gnustmp.* gnus.pdf: ${srcdir}/gnus.texi gnus-faq.texi - sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmp.texi + sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi $(ENVADD) $(TEXI2PDF) gnustmp.texi cp gnustmp.pdf $@ rm gnustmp.* @@ -465,11 +467,11 @@ gnus.pdf: ${srcdir}/gnus.texi gnus-faq.texi idlwave : $(infodir)/idlwave $(infodir)/idlwave: idlwave.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split idlwave.texi idlwave.dvi: ${srcdir}/idlwave.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/idlwave.texi idlwave.pdf: ${srcdir}/idlwave.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/idlwave.texi # The following target uses an explicit -o switch to work around # the @setfilename directive in info.texi, which is required for @@ -477,227 +479,227 @@ idlwave.pdf: ${srcdir}/idlwave.texi ###info : $(infodir)/info # circular! $(infodir)/info: info.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split $< -o $@ + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split -o $@ info.texi info.dvi: ${srcdir}/info.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/info.texi info.pdf: ${srcdir}/info.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/info.texi mairix-el : $(infodir)/mairix-el $(infodir)/mairix-el: mairix-el.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) mairix-el.texi mairix-el.dvi: ${srcdir}/mairix-el.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/mairix-el.texi mairix-el.pdf: ${srcdir}/mairix-el.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/mairix-el.texi message : $(infodir)/message $(infodir)/message: message.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) message.texi message.dvi: ${srcdir}/message.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/message.texi message.pdf: ${srcdir}/message.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/message.texi mh-e : $(infodir)/mh-e $(infodir)/mh-e: mh-e.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) mh-e.texi mh-e.dvi: ${srcdir}/mh-e.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/mh-e.texi mh-e.pdf: ${srcdir}/mh-e.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/mh-e.texi newsticker : $(infodir)/newsticker $(infodir)/newsticker: newsticker.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) newsticker.texi newsticker.dvi: ${srcdir}/newsticker.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/newsticker.texi newsticker.pdf: ${srcdir}/newsticker.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/newsticker.texi nxml-mode : $(infodir)/nxml-mode $(infodir)/nxml-mode: nxml-mode.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) nxml-mode.texi nxml-mode.dvi: ${srcdir}/nxml-mode.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/nxml-mode.texi nxml-mode.pdf: ${srcdir}/nxml-mode.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/nxml-mode.texi org : $(infodir)/org $(infodir)/org: org.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) org.texi org.dvi: ${srcdir}/org.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/org.texi org.pdf: ${srcdir}/org.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/org.texi pcl-cvs : $(infodir)/pcl-cvs $(infodir)/pcl-cvs: pcl-cvs.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) pcl-cvs.texi pcl-cvs.dvi: ${srcdir}/pcl-cvs.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/pcl-cvs.texi pcl-cvs.pdf: ${srcdir}/pcl-cvs.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/pcl-cvs.texi pgg : $(infodir)/pgg $(infodir)/pgg: pgg.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) pgg.texi pgg.dvi: ${srcdir}/pgg.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/pgg.texi pgg.pdf: ${srcdir}/pgg.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/pgg.texi rcirc : $(infodir)/rcirc $(infodir)/rcirc: rcirc.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) rcirc.texi rcirc.dvi: ${srcdir}/rcirc.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/rcirc.texi rcirc.pdf: ${srcdir}/rcirc.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/rcirc.texi reftex : $(infodir)/reftex $(infodir)/reftex: reftex.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) reftex.texi reftex.dvi: ${srcdir}/reftex.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/reftex.texi reftex.pdf: ${srcdir}/reftex.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/reftex.texi remember : $(infodir)/remember $(infodir)/remember: remember.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) remember.texi remember.dvi: ${srcdir}/remember.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/remember.texi remember.pdf: ${srcdir}/remember.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/remember.texi sasl : $(infodir)/sasl $(infodir)/sasl: sasl.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) sasl.texi sasl.dvi: ${srcdir}/sasl.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/sasl.texi sasl.pdf: ${srcdir}/sasl.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/sasl.texi sc : $(infodir)/sc $(infodir)/sc: sc.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) sc.texi sc.dvi: ${srcdir}/sc.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/sc.texi sc.pdf: ${srcdir}/sc.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/sc.texi semantic : $(infodir)/semantic $(infodir)/semantic: semantic.texi sem-user.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) semantic.texi semantic.dvi: ${srcdir}/semantic.texi sem-user.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/semantic.texi semantic.pdf: ${srcdir}/semantic.texi sem-user.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/semantic.texi ses : $(infodir)/ses $(infodir)/ses: ses.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ses.texi ses.dvi: ${srcdir}/ses.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/ses.texi ses.pdf: ${srcdir}/ses.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/ses.texi sieve : $(infodir)/sieve $(infodir)/sieve: sieve.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) sieve.texi sieve.dvi: ${srcdir}/sieve.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/sieve.texi sieve.pdf: ${srcdir}/sieve.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/sieve.texi smtpmail : $(infodir)/smtpmail $(infodir)/smtpmail: smtpmail.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) smtpmail.texi smtpmail.dvi: ${srcdir}/smtpmail.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/smtpmail.texi smtpmail.pdf: ${srcdir}/smtpmail.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/smtpmail.texi speedbar : $(infodir)/speedbar $(infodir)/speedbar: speedbar.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) speedbar.texi speedbar.dvi: ${srcdir}/speedbar.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/speedbar.texi speedbar.pdf: ${srcdir}/speedbar.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/speedbar.texi tramp : $(infodir)/tramp $(infodir)/tramp: tramp.texi trampver.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) -D emacs $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) -D emacs tramp.texi tramp.dvi: ${srcdir}/tramp.texi trampver.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/tramp.texi tramp.pdf: ${srcdir}/tramp.texi trampver.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/tramp.texi url : $(infodir)/url $(infodir)/url: url.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) url.texi url.dvi: ${srcdir}/url.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/url.texi url.pdf: ${srcdir}/url.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/url.texi vip : $(infodir)/vip $(infodir)/vip: vip.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) vip.texi vip.dvi: ${srcdir}/vip.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/vip.texi vip.pdf: ${srcdir}/vip.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/vip.texi viper : $(infodir)/viper $(infodir)/viper: viper.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) viper.texi viper.dvi: ${srcdir}/viper.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/viper.texi viper.pdf: ${srcdir}/viper.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/viper.texi widget : $(infodir)/widget $(infodir)/widget: widget.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) widget.texi widget.dvi: ${srcdir}/widget.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/widget.texi widget.pdf: ${srcdir}/widget.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/widget.texi woman : $(infodir)/woman $(infodir)/woman: woman.texi $(mkinfodir) - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $< + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) woman.texi woman.dvi: ${srcdir}/woman.texi - $(ENVADD) $(TEXI2DVI) $< + $(ENVADD) $(TEXI2DVI) ${srcdir}/woman.texi woman.pdf: ${srcdir}/woman.texi - $(ENVADD) $(TEXI2PDF) $< + $(ENVADD) $(TEXI2PDF) ${srcdir}/woman.texi .PHONY: mostlyclean clean distclean maintainer-clean diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 1a192123c3e..58420bbd99c 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -5195,7 +5195,7 @@ indentation. @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! This section explains the structure and semantics of the style -variable @code{c-offset-alist}, the principal variable for configuring +variable @code{c-offsets-alist}, the principal variable for configuring indentation. Details of how to set it up, and its relationship to @ccmode{}'s style system are given in @ref{Style Variables}. diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi index 5b7bb7ec9ce..0f20c41c8eb 100644 --- a/doc/misc/faq.texi +++ b/doc/misc/faq.texi @@ -942,6 +942,7 @@ status of its latest version. @menu * Origin of the term Emacs:: * Latest version of Emacs:: +* New in Emacs 24:: * New in Emacs 23:: * New in Emacs 22:: * New in Emacs 21:: @@ -1009,12 +1010,84 @@ Emacs, type @kbd{C-h C-n} (@kbd{M-x view-emacs-news}). As of Emacs 22, you can give this command a prefix argument to read about which features were new in older versions. +@node New in Emacs 24 +@section What is different about Emacs 24? +@cindex Differences between Emacs 23 and Emacs 24 +@cindex Emacs 24, new features in + +@itemize +@cindex packages, installing more +@item +Emacs now includes a package manager. Type @kbd{M-x list-packages} to +get started. You can use this to download and automatically install +many more Lisp packages. + +@cindex lexical binding +@item +Emacs Lisp now supports lexical binding on a per-file basis. In +@emph{lexical binding}, variable references must be located textually +within the binding construct. This contrasts with @emph{dynamic +binding}, where programs can refer to variables defined outside their +local textual scope. A Lisp file can use a local variable setting of +@code{lexical-binding: t} to indicate that the contents should be +interpreted using lexical binding. See the Emacs Lisp Reference +Manual for more details. + +@cindex bidirectional display +@cindex right-to-left languages +@item +Some human languages, such as English, are written from left to right. +Others, such as Arabic, are written from right to left. Emacs now has +support for any mixture of these forms---this is ``bidirectional text''. + +@item +Handling of text selections has been improved, and now integrates +better with external clipboards. + +@cindex themes +@item +A new command @kbd{customize-themes} allows you to easily change the +appearance of your Emacs. + +@item +Emacs can be compiled with the Gtk+ 3 toolkit. + +@item +Support for several new external libraries can be included at compile +time: + +@itemize + +@item +``Security-Enhanced Linux'' (SELinux) is a Linux kernel feature that +provides more sophisticated file access controls than ordinary +``Unix-style'' file permissions. + +@item +The ImageMagick display library. This allows you to display many more +image format in Emacs, as well as carry out transformations such as +rotations. + +@item +The GnuTLS library for secure network communications. Emacs uses this +transparently for email if your mail server supports it. + +@item +The libxml2 library for parsing XML structures. +@end itemize + +@item +Much more flexibility in the handling of windows and buffer display. + +@end itemize + +As always, consult the @file{NEWS} file for more information. + + @node New in Emacs 23 @section What is different about Emacs 23? @cindex Differences between Emacs 22 and Emacs 23 @cindex Emacs 23, new features in -@cindex Recently introduced features -@cindex Default features @itemize @@ -1065,8 +1138,7 @@ Other changes include: support for serial port access; D-Bus bindings; a new Visual Line mode for line-motion; improved completion; a new mode (@samp{DocView}) for viewing of PDF, PostScript, and DVI documents; nXML mode (for editing XML documents) is included; VC has been updated for -newer version control systems; etc. As always, consult the @file{NEWS} -file for more information. +newer version control systems; etc. @node New in Emacs 22 @@ -3225,6 +3297,14 @@ see @ref{Packages that do not come with Emacs}. @cindex Emacs Lisp List @cindex Emacs Lisp Archive +Your first port of call should be the @kbd{M-x list-packages} command. +This connects to the @uref{http:///elpa.gnu.org, GNU ELPA} (``Emacs +Lisp Package Archive'') server and fetches the list of additional +packages that it offers. These are GNU packages that are available +for use with Emacs, but are distributed separately. Select a package +to get more details about the features that it offers, and then if you +wish, Emacs can download and automatically install it for you. + @uref{http://www.damtp.cam.ac.uk/user/sje30/emacs/ell.html, The Emacs Lisp List (ELL)}, maintained by @email{S.J.Eglen@@damtp.cam.ac.uk, Stephen Eglen}, aims to provide one compact list with links to all of the current Emacs diff --git a/doc/misc/org.texi b/doc/misc/org.texi index e033a47aa96..67633e1acac 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -4,8 +4,8 @@ @setfilename ../../info/org @settitle The Org Manual -@set VERSION 7.8.07 -@set DATE March 2012 +@set VERSION 7.8.09 +@set DATE April 2012 @c Use proper quote and backtick for code sections in PDF output @c Cf. Texinfo manual 14.2 @@ -5698,8 +5698,8 @@ until the entry is marked DONE. An example: @example *** TODO write article about the Earth for the Guide - The editor in charge is [[bbdb:Ford Prefect]] DEADLINE: <2004-02-29 Sun> + The editor in charge is [[bbdb:Ford Prefect]] @end example You can specify a different lead time for warnings for a specific @@ -7852,9 +7852,9 @@ the other commands, the cursor needs to be in the desired line. @tsubheading{Motion} @cindex motion commands in agenda @orgcmd{n,org-agenda-next-line} -Next line (same as @key{up} and @kbd{C-p}). +Next line (same as @key{down} and @kbd{C-n}). @orgcmd{p,org-agenda-previous-line} -Previous line (same as @key{down} and @kbd{C-n}). +Previous line (same as @key{up} and @kbd{C-p}). @tsubheading{View/Go to Org file} @orgcmdkkc{@key{SPC},mouse-3,org-agenda-show-and-scroll-up} Display the original location of the item in another window. @@ -9537,12 +9537,12 @@ the web, while the XOXO format provides a solid base for exchange with a broad range of other applications. @LaTeX{} export lets you use Org mode and its structured editing functions to easily create @LaTeX{} files. DocBook export makes it possible to convert Org files to many other formats using -DocBook tools. OpenDocument Text(ODT) export allows seamless +DocBook tools. OpenDocument Text (ODT) export allows seamless collaboration across organizational boundaries. For project management you can create gantt and resource charts by using TaskJuggler export. To incorporate entries with associated times like deadlines or appointments into a desktop calendar program like iCal, Org mode can also produce extracts in -the iCalendar format. Currently Org mode only supports export, not import of +the iCalendar format. Currently, Org mode only supports export, not import of these different formats. Org supports export of selected regions when @code{transient-mark-mode} is @@ -10869,10 +10869,10 @@ one format (say @samp{csv}) to another format (say @samp{ods} or @samp{xls}). If you have a working installation of LibreOffice, a document converter is pre-configured for you and you can use it right away. If you would like to use @file{unoconv} as your preferred converter, customize the variable -@code{org-export-odt-convert-process} to point to @code{unoconv}. If you -would like to use a converter of your own choosing or tweak the default -settings of the default @file{LibreOffice} and @samp{unoconv} converters -@xref{Configuring a document converter}. +@code{org-export-odt-convert-process} to point to @code{unoconv}. You can +also use your own favorite converter or tweak the default settings of the +@file{LibreOffice} and @samp{unoconv} converters. @xref{Configuring a +document converter}. @subsubsection Automatically exporting to other formats @anchor{x-export-to-other-formats} @@ -11206,7 +11206,7 @@ that the @file{dvipng} program be available on your system. For various reasons, you may find embedding @LaTeX{} math snippets in an ODT document less than reliable. In that case, you can embed a -math equation by linking to its MathML(@file{.mml}) source or its +math equation by linking to its MathML (@file{.mml}) source or its OpenDocument formula (@file{.odf}) file as shown below: @example @@ -11269,7 +11269,7 @@ Illustration 2: Bell curve Export of literal examples (@pxref{Literal examples}) with full fontification is supported. Internally, the exporter relies on @file{htmlfontify.el} to generate all style definitions needed for a fancy listing.@footnote{Your -@file{htmlfontify.el} library must atleast be at Emacs 24.1 levels for +@file{htmlfontify.el} library must at least be at Emacs 24.1 levels for fontification to be turned on.} The auto-generated styles have @samp{OrgSrc} as prefix and inherit their color from the faces used by Emacs @code{font-lock} library for the source language. @@ -11318,10 +11318,9 @@ the variable @code{org-export-odt-convert-processes}. Also specify how the converter can be invoked via command-line to effect the conversion. @item Configure its capabilities + @vindex org-export-odt-convert-capabilities - @anchor{x-odt-converter-capabilities} - Specify the set of formats the converter can handle by customizing the variable @code{org-export-odt-convert-capabilities}. Use the default value for this variable as a guide for configuring your converter. As suggested by @@ -11460,7 +11459,7 @@ regular text. @end example @strong{Hint:} To see the above example in action, edit your -@file{styles.xml}(@pxref{x-orgodtstyles-xml,,Factory styles}) and add a +@file{styles.xml} (@pxref{x-orgodtstyles-xml,,Factory styles}) and add a custom @samp{Highlight} style as shown below. @example @@ -11479,7 +11478,7 @@ directive. For example, to force a page break do the following: @end example @strong{Hint:} To see the above example in action, edit your -@file{styles.xml}(@pxref{x-orgodtstyles-xml,,Factory styles}) and add a +@file{styles.xml} (@pxref{x-orgodtstyles-xml,,Factory styles}) and add a custom @samp{PageBreak} style as shown below. @example diff --git a/etc/CONTRIBUTE b/etc/CONTRIBUTE index 06b9a9e45a5..aff350f9642 100644 --- a/etc/CONTRIBUTE +++ b/etc/CONTRIBUTE @@ -1,4 +1,4 @@ -Copyright (C) 2006-2012 Free Software Foundation, Inc. +Copyright (C) 2006-2012 Free Software Foundation, Inc. See end for license conditions. @@ -44,13 +44,24 @@ Ref: The "Tips" Appendix in the Emacs Lisp Reference. * Copyright Assignment -We can accept small changes (roughly, fewer than 15 lines) without -legal papers. Anything more substantial requires a copyright -disclaimer or assignment (the latter is preferred, especially for -larger changes). Both of these involved filling out a short form and -filing it with the FSF. The process is straightforward -- contact us -at emacs-devel@gnu.org to obtain the relevant forms. +The FSF (Free Software Foundation) is the copyright holder for GNU Emacs. +The FSF is a nonprofit with a worldwide mission to promote computer +user freedom and to defend the rights of all free software users. +For general information, see the website http://www.fsf.org/ . +Generally speaking, for non-trivial contributions to GNU Emacs we +require that the copyright be assigned to the FSF. For the reasons +behind this, see: http://www.gnu.org/licenses/why-assign.html . + +Copyright assignment is a simple process. If you live in the US, you +can do it entirely electronically. We can help you get started, and +answer any questions you may have (or point you to the people with the +answers), at the emacs-devel@gnu.org mailing list. + +A copyright disclaimer is also a possibility, but we prefer an assignment. +We can accept small changes (roughly, fewer than 15 lines) without +an assignment. This is a cumulative limit (e.g. three separate 5 line +patches) over all your contributions. * Getting the Source Code diff --git a/etc/ChangeLog b/etc/ChangeLog index adc4c941212..f2cdfb83c44 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,13 @@ +2012-04-20 Glenn Morris + + * CONTRIBUTE: Expand a bit on copyright assignments. + + * MORE.STUFF: General update. Mention list-packages. + Remove many old/outdated URLs. +2012-04-10 Lars Magne Ingebrigtsen + + * publicsuffix.txt: New file (bug#1401). + 2012-04-02 Alan Mackenzie * NEWS: Add CC Mode entries. diff --git a/etc/MORE.STUFF b/etc/MORE.STUFF index 84a34d24585..06e0870e4ce 100644 --- a/etc/MORE.STUFF +++ b/etc/MORE.STUFF @@ -1,99 +1,87 @@ More Neat Stuff for your Emacs -Copyright (C) 1993, 1999, 2001-2012 Free Software Foundation, Inc. +Copyright (C) 1993, 1999, 2001-2012 Free Software Foundation, Inc. See the end of the file for license conditions. -This file describes GNU Emacs programs and resources that are +The easiest way to add more features to your Emacs is to use the command +M-x list-packages. This contacts the server at , +where many Emacs Lisp packages are stored. These are distributed +separately from Emacs itself for reasons of space, etc. You can browse +the resulting *Packages* buffer to see what is available, and then +Emacs can automatically download and install the packages that you +select. See the section "Emacs Lisp Packages" in the Emacs manual +for more details. + +Below we describe some GNU Emacs programs and resources that are maintained by other people. Some of these may become part of the -Emacs distribution in the future. Others we unfortunately can't -distribute, even though they are free software, because we lack legal -papers for copyright purposes. Also included are sites where -development versions of some packages distributed with Emacs may be -found. +Emacs distribution, or GNU ELPA, in the future. Others we unfortunately +can't distribute, even though they are free software, because we lack +legal papers for copyright purposes. -You might also look at the Emacs web page -. If you use the -Windows-32 version of Emacs, see the NTEmacs sites listed in the FAQ. +Also listed are sites where development versions of some packages +distributed with Emacs may be found. -Please submit a bug report if you find that any of the addresses -listed here fail. +It is difficult to keep this file up-to-date, and it only lists a fraction +of the Emacs modes that are available. If you are interested in +a particular feature, then after checking Emacs itself and GNU ELPA, +a web search is often the best way to find results. + +* The gnu-emacs-sources mailing list + + which is gatewayed to the gnu.emacs.sources newsgroup (although the + connection between the two can be unreliable) is an official + place where people can post or announce their extensions to Emacs. * The `Emacs Lisp List' at - has pointers - to sources of a large number of packages. - -* gnu.emacs.sources - -Packages posted to the gnu.emacs.sources newsgroup (see -etc/MAILINGLISTS) might be archived specifically (try a web search -engine) or retrievable from general Usenet archive services. + has pointers + to sources of a large number of packages. Unfortunately, at the time + of writing it seems to no longer be updating. * emacswiki.org + The Emacs Wiki has an area for storing elisp files + . -The Emacs Wiki has an area for storing elisp files -. +* WikEmacs + is an alternative wiki for Emacs. -* Emacs tutorials and manuals - - * Emacs slides and tutorials can be found here: +* Emacs slides and tutorials can be found here: * Maintenance versions of some packages distributed with Emacs You might find bug-fixes or enhancements in these places. +In many cases, however, development of these packages has shifted to Emacs, +so you will find the latest version in Emacs. * Ada-mode: * Battery and Info Look: - * BS: - - * Calculator: - * CC mode: * CPerl: * Ediff and Viper: - * Eldoc and Rlogin: - - * ERC: - * Etags: - * Gnus: - * Ispell: - * MH-E: * nXML: * Org mode: - * PS mode: - - * PS-print: - - * Python: - - * QuickURL: - * RefTeX: * Remember: - * Speedbar, Checkdoc etc: - - * SQL: + * CEDET: * Tramp: Remote file access via rsh/ssh - * Webjump: - * Auxiliary files * (Tex)info files for use with Info-look that don't come from GNU @@ -114,18 +102,16 @@ Emacs for various reasons, sometimes because their authors haven't made a copyright assignment to the FSF. Some of them may be integrated in the future. -You might like to check whether they are packaged for your system. -Several are for Debian GNU/Linux in particular. +Your operating system distribution may include several of these as optional +packages that you can install. * AUCTeX: An extensible package that supports writing and formatting TeX files (including AMS-TeX, LaTeX, Texinfo, ConTeXt, and docTeX). + Available from GNU ELPA. * BBDB: personal Info Rolodex integrated with mail/news: - - [You might want to set the coding system of your .bbdb file to - emacs-mule, say by adding `("\\.bbdb\\'" . emacs-mule)' to - `file-coding-system-alist' for non-ASCII characters.] + * Boxquote: @@ -143,13 +129,6 @@ Several are for Debian GNU/Linux in particular. * Ee: categorizing information manager: - * EFS: enhanced version of ange-ftp: - - - * Elib library: - From GNU distribution mirrors. (Much of this functionality is now - in Emacs.) - * EMacro: EMacro is a portable configuration file that configures itself. @@ -168,33 +147,19 @@ Several are for Debian GNU/Linux in particular. * Emacs Wiki Mode: A wiki-like publishing tool and personal information manager - * Gnuserv: - - Alternative emacsclient/emacsserver. Also available from this Web - page: eiffel-mode.el. - * Go in a buffer: Go Text Protocol client: A modified version is also bundled with GNU Go: - * hm--html-menus: - - HTML-specific editing. Can work with PSGML. - * Hyperbole: - + Hyperbole is an open, efficient, programmable information management and hypertext system. * JDEE: Provides a Java development environment for Emacs. - * Mailcrypt: - - PGP and GPG support. PGP isn't free software, but GPG, the GNU - Privacy Guard, is a free replacement . - * Mew: A MIME mail reader for Emacs/XEmacs. @@ -208,9 +173,6 @@ Several are for Debian GNU/Linux in particular. * Preview LaTeX: embed preview LaTeX images in source buffer. - * PSGML: - DTD-aware serious SGML/XML editing. - * Quack: Quack enhances Emacs support for Scheme. @@ -227,26 +189,17 @@ Several are for Debian GNU/Linux in particular. * Tamago: Chinese/Japanese/Korean input method Emacs Lisp package to provide input methods for CJK characters. - It can use these background conversion servers: - FreeWnn (jserver, cserver, tserver), - Wnn6, - SJ3 Ver.2 - * Tiny Tools: + * Tiny Tools: * VM (View Mail): Alternative mail reader Previously hosted at: - There are VM newsgroups: , and - . - * W3: - Web browser. There's a W3 mail list/newsgroup - . + * W3 Web browser: * Wanderlust: - Yet Another Message Interface on Emacsen. Wanderlust is a mail/news - reader supporting IMAP4rev1 for emacsen. + Wanderlust is a mail/news reader for Emacs. * WhizzyTex: WhizzyTeX provides a minor mode for Emacs or XEmacs, a (bash) diff --git a/etc/NEWS b/etc/NEWS index a1ef62c0bd6..b2c487ba15b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -22,6 +22,13 @@ so we will look at it and add it to the manual. * Installation Changes in Emacs 24.2 + +** New configure option '--enable-gcc-warnings', intended for developers. +If building with GCC, this enables compile-time checks that warn about +possibly-questionable C code. On a recent GNU system there should be +no warnings; on older and on non-GNU systems the generated warnings +may be useful. + * Startup Changes in Emacs 24.2 @@ -32,13 +39,60 @@ been adding them there, put them somewhere else, eg site-lisp. * Changes in Emacs 24.2 +** New functions `system-users', `system-groups' return lists of the user +name, group names known to the system (where possible). + ** If your Emacs was built from a bzr checkout, the new variable `emacs-bzr-version' contains information about which bzr revision was used. +** ImageMagick support, if available, is automatically enabled. +It is no longer necessary to call `imagemagick-register-types' +explicitly to install ImageMagick image types; that function is called +automatically when setting `imagemagick-types-inhibit'. + +*** Setting `imagemagick-types-inhibit' to t now disables the use of +ImageMagick to view images, set + +** String values for `initial-buffer-choice' also apply to emacsclient +frames, if emacsclient is only told to open a new frame without +specifying any file to visit or expression to evaluate. + * Editing Changes in Emacs 24.2 + +** M-x move-to-column, if called interactively with no prefix arg, now +prompts for a column number. + +** `mouse-avoidance-banish-position' can now be used to customize +`mouse-avoidance-mode' further. + +** `C-M-f' and `C-M-b' will now move to the path name separator +character when doing minibuffer filename prompts. + +** `goto-char' is now bound to `M-g c'. + * Changes in Specialized Modes and Packages in Emacs 24.2 + +** which-function-mode now applies to all applicable major modes by default. + +** erc will look up server/channel names via auth-source and use the +channel keys found, if any. + +** The `server-auth-key' variable can be used to set a permanent +shared key for Emacs Server. + +** In Perl mode, new option `perl-indent-parens-as-block' causes non-block +closing brackets to be aligned with the line of the opening bracket. + +** FIXME something happened to ses.el, 2012-04-17. + +** Obsolete packages: + +*** mailpost.el + +*** mouse-sel.el + * New Modes and Packages in Emacs 24.2 diff --git a/etc/TODO b/etc/TODO index db1d50192f2..6aa74df5a79 100644 --- a/etc/TODO +++ b/etc/TODO @@ -647,17 +647,29 @@ up on top of all others ** Bidirectional editing +*** Support reordering structured text +Two important use cases: (1) comments and strings in program sources, +and (2) text with markup, like HTML or XML. + +One idea is to invent a special text property that would instruct the +display engine to reorder only the parts of buffer text covered by +that property. The display engine will then push its state onto the +iterator stack, restrict the bidi iterator to accessing only the +portion of buffer text covered by the property, reorder the text, then +pop its state from stack and continue as usual. This will require +minor changes in the bidi_it structure. + +This design requires Lisp-level code to put the text properties on the +relevant parts of the buffer text. That could be done using JIT +fontifications, or as a preliminary processing when the file is +visited. With HTML/XML, the code that puts text properties needs to +pay attention to the bidi directives embedded in the HTML/XML stream. + *** Allow the user to control the direction of the UI **** Introduce user option to control direction of mode line. -This requires to figure out what to do with unibyte strings that are -used in constructing the mode line. Currently, unibyte strings are -not reordered by bidi.c, without which R2L mode line will not display -correctly. One possibility would be to STRING_SET_MULTIBYTE all Lisp -strings involved in the mode line, and then pass them through bidi.c. - -Another problem is the header line, which is produced by the same -routines as the mode line. While it makes sense to have the mode-line +One problem is the header line, which is produced by the same routines +as the mode line. While it makes sense to have the mode-line direction controlled by a single global variable, header lines are buffer-specific, so they need a separate treatment in this regard. diff --git a/etc/publicsuffix.txt b/etc/publicsuffix.txt new file mode 100644 index 00000000000..45cd95aca30 --- /dev/null +++ b/etc/publicsuffix.txt @@ -0,0 +1,5189 @@ +// ***** BEGIN LICENSE BLOCK ***** +// Version: MPL 1.1/GPL 2.0/LGPL 2.1 +// +// The contents of this file are subject to the Mozilla Public License Version +// 1.1 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" basis, +// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +// for the specific language governing rights and limitations under the +// License. +// +// The Original Code is the Public Suffix List. +// +// The Initial Developer of the Original Code is +// Jo Hermans . +// Portions created by the Initial Developer are Copyright (C) 2007 +// the Initial Developer. All Rights Reserved. +// +// Contributor(s): +// Ruben Arakelyan +// Gervase Markham +// Pamela Greene +// David Triendl +// Jothan Frakes +// The kind representatives of many TLD registries +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// +// ***** END LICENSE BLOCK ***** + +// ac : http://en.wikipedia.org/wiki/.ac +ac +com.ac +edu.ac +gov.ac +net.ac +mil.ac +org.ac + +// ad : http://en.wikipedia.org/wiki/.ad +ad +nom.ad + +// ae : http://en.wikipedia.org/wiki/.ae +// see also: "Domain Name Eligibility Policy" at http://www.aeda.ae/eng/aepolicy.php +ae +co.ae +net.ae +org.ae +sch.ae +ac.ae +gov.ae +mil.ae + +// aero : see http://www.information.aero/index.php?id=66 +aero +accident-investigation.aero +accident-prevention.aero +aerobatic.aero +aeroclub.aero +aerodrome.aero +agents.aero +aircraft.aero +airline.aero +airport.aero +air-surveillance.aero +airtraffic.aero +air-traffic-control.aero +ambulance.aero +amusement.aero +association.aero +author.aero +ballooning.aero +broker.aero +caa.aero +cargo.aero +catering.aero +certification.aero +championship.aero +charter.aero +civilaviation.aero +club.aero +conference.aero +consultant.aero +consulting.aero +control.aero +council.aero +crew.aero +design.aero +dgca.aero +educator.aero +emergency.aero +engine.aero +engineer.aero +entertainment.aero +equipment.aero +exchange.aero +express.aero +federation.aero +flight.aero +freight.aero +fuel.aero +gliding.aero +government.aero +groundhandling.aero +group.aero +hanggliding.aero +homebuilt.aero +insurance.aero +journal.aero +journalist.aero +leasing.aero +logistics.aero +magazine.aero +maintenance.aero +marketplace.aero +media.aero +microlight.aero +modelling.aero +navigation.aero +parachuting.aero +paragliding.aero +passenger-association.aero +pilot.aero +press.aero +production.aero +recreation.aero +repbody.aero +res.aero +research.aero +rotorcraft.aero +safety.aero +scientist.aero +services.aero +show.aero +skydiving.aero +software.aero +student.aero +taxi.aero +trader.aero +trading.aero +trainer.aero +union.aero +workinggroup.aero +works.aero + +// af : http://www.nic.af/help.jsp +af +gov.af +com.af +org.af +net.af +edu.af + +// ag : http://www.nic.ag/prices.htm +ag +com.ag +org.ag +net.ag +co.ag +nom.ag + +// ai : http://nic.com.ai/ +ai +off.ai +com.ai +net.ai +org.ai + +// al : http://www.ert.gov.al/ert_alb/faq_det.html?Id=31 +al +com.al +edu.al +gov.al +mil.al +net.al +org.al + +// am : http://en.wikipedia.org/wiki/.am +am + +// an : http://www.una.an/an_domreg/default.asp +an +com.an +net.an +org.an +edu.an + +// ao : http://en.wikipedia.org/wiki/.ao +// http://www.dns.ao/REGISTR.DOC +ao +ed.ao +gv.ao +og.ao +co.ao +pb.ao +it.ao + +// aq : http://en.wikipedia.org/wiki/.aq +aq + +// ar : http://en.wikipedia.org/wiki/.ar +*.ar +!congresodelalengua3.ar +!educ.ar +!gobiernoelectronico.ar +!mecon.ar +!nacion.ar +!nic.ar +!promocion.ar +!retina.ar +!uba.ar + +// arpa : http://en.wikipedia.org/wiki/.arpa +// Confirmed by registry 2008-06-18 +e164.arpa +in-addr.arpa +ip6.arpa +iris.arpa +uri.arpa +urn.arpa + +// as : http://en.wikipedia.org/wiki/.as +as +gov.as + +// asia: http://en.wikipedia.org/wiki/.asia +asia + +// at : http://en.wikipedia.org/wiki/.at +// Confirmed by registry 2008-06-17 +at +ac.at +co.at +gv.at +or.at + +// http://www.info.at/ +biz.at +info.at + +// priv.at : http://www.nic.priv.at/ +// Submitted by registry 2008-06-09 +priv.at + +// au : http://en.wikipedia.org/wiki/.au +*.au +// au geographical names (vic.au etc... are covered above) +act.edu.au +nsw.edu.au +nt.edu.au +qld.edu.au +sa.edu.au +tas.edu.au +vic.edu.au +wa.edu.au +act.gov.au +// Removed at request of Shae.Donelan@services.nsw.gov.au, 2010-03-04 +// nsw.gov.au +nt.gov.au +qld.gov.au +sa.gov.au +tas.gov.au +vic.gov.au +wa.gov.au +// CGDNs - http://www.aucd.org.au/ +act.au +nsw.au +nt.au +qld.au +sa.au +tas.au +vic.au +wa.au + +// aw : http://en.wikipedia.org/wiki/.aw +aw +com.aw + +// ax : http://en.wikipedia.org/wiki/.ax +ax + +// az : http://en.wikipedia.org/wiki/.az +az +com.az +net.az +int.az +gov.az +org.az +edu.az +info.az +pp.az +mil.az +name.az +pro.az +biz.az + +// ba : http://en.wikipedia.org/wiki/.ba +ba +org.ba +net.ba +edu.ba +gov.ba +mil.ba +unsa.ba +unbi.ba +co.ba +com.ba +rs.ba + +// bb : http://en.wikipedia.org/wiki/.bb +bb +biz.bb +com.bb +edu.bb +gov.bb +info.bb +net.bb +org.bb +store.bb + +// bd : http://en.wikipedia.org/wiki/.bd +*.bd + +// be : http://en.wikipedia.org/wiki/.be +// Confirmed by registry 2008-06-08 +be +ac.be + +// bf : http://en.wikipedia.org/wiki/.bf +bf +gov.bf + +// bg : http://en.wikipedia.org/wiki/.bg +// https://www.register.bg/user/static/rules/en/index.html +bg +a.bg +b.bg +c.bg +d.bg +e.bg +f.bg +g.bg +h.bg +i.bg +j.bg +k.bg +l.bg +m.bg +n.bg +o.bg +p.bg +q.bg +r.bg +s.bg +t.bg +u.bg +v.bg +w.bg +x.bg +y.bg +z.bg +0.bg +1.bg +2.bg +3.bg +4.bg +5.bg +6.bg +7.bg +8.bg +9.bg + +// bh : http://en.wikipedia.org/wiki/.bh +bh +com.bh +edu.bh +net.bh +org.bh +gov.bh + +// bi : http://en.wikipedia.org/wiki/.bi +// http://whois.nic.bi/ +bi +co.bi +com.bi +edu.bi +or.bi +org.bi + +// biz : http://en.wikipedia.org/wiki/.biz +biz + +// bj : http://en.wikipedia.org/wiki/.bj +bj +asso.bj +barreau.bj +gouv.bj + +// bm : http://www.bermudanic.bm/dnr-text.txt +bm +com.bm +edu.bm +gov.bm +net.bm +org.bm + +// bn : http://en.wikipedia.org/wiki/.bn +*.bn + +// bo : http://www.nic.bo/ +bo +com.bo +edu.bo +gov.bo +gob.bo +int.bo +org.bo +net.bo +mil.bo +tv.bo + +// br : http://registro.br/dominio/dpn.html +// Updated by registry 2011-03-01 +br +adm.br +adv.br +agr.br +am.br +arq.br +art.br +ato.br +b.br +bio.br +blog.br +bmd.br +can.br +cim.br +cng.br +cnt.br +com.br +coop.br +ecn.br +edu.br +emp.br +eng.br +esp.br +etc.br +eti.br +far.br +flog.br +fm.br +fnd.br +fot.br +fst.br +g12.br +ggf.br +gov.br +imb.br +ind.br +inf.br +jor.br +jus.br +lel.br +mat.br +med.br +mil.br +mus.br +net.br +nom.br +not.br +ntr.br +odo.br +org.br +ppg.br +pro.br +psc.br +psi.br +qsl.br +radio.br +rec.br +slg.br +srv.br +taxi.br +teo.br +tmp.br +trd.br +tur.br +tv.br +vet.br +vlog.br +wiki.br +zlg.br + +// bs : http://www.nic.bs/rules.html +bs +com.bs +net.bs +org.bs +edu.bs +gov.bs + +// bt : http://en.wikipedia.org/wiki/.bt +bt +com.bt +edu.bt +gov.bt +net.bt +org.bt + +// bv : No registrations at this time. +// Submitted by registry 2006-06-16 + +// bw : http://en.wikipedia.org/wiki/.bw +// http://www.gobin.info/domainname/bw.doc +// list of other 2nd level tlds ? +bw +co.bw +org.bw + +// by : http://en.wikipedia.org/wiki/.by +// http://tld.by/rules_2006_en.html +// list of other 2nd level tlds ? +by +gov.by +mil.by +// Official information does not indicate that com.by is a reserved +// second-level domain, but it's being used as one (see www.google.com.by and +// www.yahoo.com.by, for example), so we list it here for safety's sake. +com.by + +// http://hoster.by/ +of.by + +// bz : http://en.wikipedia.org/wiki/.bz +// http://www.belizenic.bz/ +bz +com.bz +net.bz +org.bz +edu.bz +gov.bz + +// ca : http://en.wikipedia.org/wiki/.ca +ca +// ca geographical names +ab.ca +bc.ca +mb.ca +nb.ca +nf.ca +nl.ca +ns.ca +nt.ca +nu.ca +on.ca +pe.ca +qc.ca +sk.ca +yk.ca +// gc.ca: http://en.wikipedia.org/wiki/.gc.ca +// see also: http://registry.gc.ca/en/SubdomainFAQ +gc.ca + +// cat : http://en.wikipedia.org/wiki/.cat +cat + +// cc : http://en.wikipedia.org/wiki/.cc +cc + +// cd : http://en.wikipedia.org/wiki/.cd +// see also: https://www.nic.cd/domain/insertDomain_2.jsp?act=1 +cd +gov.cd + +// cf : http://en.wikipedia.org/wiki/.cf +cf + +// cg : http://en.wikipedia.org/wiki/.cg +cg + +// ch : http://en.wikipedia.org/wiki/.ch +ch + +// ci : http://en.wikipedia.org/wiki/.ci +// http://www.nic.ci/index.php?page=charte +ci +org.ci +or.ci +com.ci +co.ci +edu.ci +ed.ci +ac.ci +net.ci +go.ci +asso.ci +aéroport.ci +int.ci +presse.ci +md.ci +gouv.ci + +// ck : http://en.wikipedia.org/wiki/.ck +*.ck + +// cl : http://en.wikipedia.org/wiki/.cl +cl +gov.cl +gob.cl + +// cm : http://en.wikipedia.org/wiki/.cm +cm +gov.cm + +// cn : http://en.wikipedia.org/wiki/.cn +// Submitted by registry 2008-06-11 +cn +ac.cn +com.cn +edu.cn +gov.cn +net.cn +org.cn +mil.cn +公司.cn +网络.cn +網絡.cn +// cn geographic names +ah.cn +bj.cn +cq.cn +fj.cn +gd.cn +gs.cn +gz.cn +gx.cn +ha.cn +hb.cn +he.cn +hi.cn +hl.cn +hn.cn +jl.cn +js.cn +jx.cn +ln.cn +nm.cn +nx.cn +qh.cn +sc.cn +sd.cn +sh.cn +sn.cn +sx.cn +tj.cn +xj.cn +xz.cn +yn.cn +zj.cn +hk.cn +mo.cn +tw.cn + +// co : http://en.wikipedia.org/wiki/.co +// Submitted by registry 2008-06-11 +co +arts.co +com.co +edu.co +firm.co +gov.co +info.co +int.co +mil.co +net.co +nom.co +org.co +rec.co +web.co + +// com : http://en.wikipedia.org/wiki/.com +com + +// CentralNic names : http://www.centralnic.com/names/domains +// Confirmed by registry 2008-06-09 +ar.com +br.com +cn.com +de.com +eu.com +gb.com +hu.com +jpn.com +kr.com +no.com +qc.com +ru.com +sa.com +se.com +uk.com +us.com +uy.com +za.com + +// Requested by Yngve Pettersen 2009-11-26 +operaunite.com + +// Requested by Eduardo Vela 2010-09-06 +appspot.com + +// coop : http://en.wikipedia.org/wiki/.coop +coop + +// cr : http://www.nic.cr/niccr_publico/showRegistroDominiosScreen.do +cr +ac.cr +co.cr +ed.cr +fi.cr +go.cr +or.cr +sa.cr + +// cu : http://en.wikipedia.org/wiki/.cu +cu +com.cu +edu.cu +org.cu +net.cu +gov.cu +inf.cu + +// cv : http://en.wikipedia.org/wiki/.cv +cv + +// cx : http://en.wikipedia.org/wiki/.cx +// list of other 2nd level tlds ? +cx +gov.cx + +// cy : http://en.wikipedia.org/wiki/.cy +*.cy + +// cz : http://en.wikipedia.org/wiki/.cz +cz + +// de : http://en.wikipedia.org/wiki/.de +// Confirmed by registry (with technical +// reservations) 2008-07-01 +de + +// dj : http://en.wikipedia.org/wiki/.dj +dj + +// dk : http://en.wikipedia.org/wiki/.dk +// Confirmed by registry 2008-06-17 +dk + +// dm : http://en.wikipedia.org/wiki/.dm +dm +com.dm +net.dm +org.dm +edu.dm +gov.dm + +// do : http://en.wikipedia.org/wiki/.do +do +art.do +com.do +edu.do +gob.do +gov.do +mil.do +net.do +org.do +sld.do +web.do + +// dz : http://en.wikipedia.org/wiki/.dz +dz +com.dz +org.dz +net.dz +gov.dz +edu.dz +asso.dz +pol.dz +art.dz + +// ec : http://www.nic.ec/reg/paso1.asp +// Submitted by registry 2008-07-04 +ec +com.ec +info.ec +net.ec +fin.ec +k12.ec +med.ec +pro.ec +org.ec +edu.ec +gov.ec +gob.ec +mil.ec + +// edu : http://en.wikipedia.org/wiki/.edu +edu + +// ee : http://www.eenet.ee/EENet/dom_reeglid.html#lisa_B +ee +edu.ee +gov.ee +riik.ee +lib.ee +med.ee +com.ee +pri.ee +aip.ee +org.ee +fie.ee + +// eg : http://en.wikipedia.org/wiki/.eg +eg +com.eg +edu.eg +eun.eg +gov.eg +mil.eg +name.eg +net.eg +org.eg +sci.eg + +// er : http://en.wikipedia.org/wiki/.er +*.er + +// es : https://www.nic.es/site_ingles/ingles/dominios/index.html +es +com.es +nom.es +org.es +gob.es +edu.es + +// et : http://en.wikipedia.org/wiki/.et +*.et + +// eu : http://en.wikipedia.org/wiki/.eu +eu + +// fi : http://en.wikipedia.org/wiki/.fi +fi +// aland.fi : http://en.wikipedia.org/wiki/.ax +// This domain is being phased out in favor of .ax. As there are still many +// domains under aland.fi, we still keep it on the list until aland.fi is +// completely removed. +// TODO: Check for updates (expected to be phased out around Q1/2009) +aland.fi +// iki.fi : Submitted by Hannu Aronsson 2009-11-05 +iki.fi + +// fj : http://en.wikipedia.org/wiki/.fj +*.fj + +// fk : http://en.wikipedia.org/wiki/.fk +*.fk + +// fm : http://en.wikipedia.org/wiki/.fm +fm + +// fo : http://en.wikipedia.org/wiki/.fo +fo + +// fr : http://www.afnic.fr/ +// domaines descriptifs : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-descriptifs +fr +com.fr +asso.fr +nom.fr +prd.fr +presse.fr +tm.fr +// domaines sectoriels : http://www.afnic.fr/obtenir/chartes/nommage-fr/annexe-sectoriels +aeroport.fr +assedic.fr +avocat.fr +avoues.fr +cci.fr +chambagri.fr +chirurgiens-dentistes.fr +experts-comptables.fr +geometre-expert.fr +gouv.fr +greta.fr +huissier-justice.fr +medecin.fr +notaires.fr +pharmacien.fr +port.fr +veterinaire.fr + +// ga : http://en.wikipedia.org/wiki/.ga +ga + +// gb : This registry is effectively dormant +// Submitted by registry 2008-06-12 + +// gd : http://en.wikipedia.org/wiki/.gd +gd + +// ge : http://www.nic.net.ge/policy_en.pdf +ge +com.ge +edu.ge +gov.ge +org.ge +mil.ge +net.ge +pvt.ge + +// gf : http://en.wikipedia.org/wiki/.gf +gf + +// gg : http://www.channelisles.net/applic/avextn.shtml +gg +co.gg +org.gg +net.gg +sch.gg +gov.gg + +// gh : http://en.wikipedia.org/wiki/.gh +// see also: http://www.nic.gh/reg_now.php +// Although domains directly at second level are not possible at the moment, +// they have been possible for some time and may come back. +gh +com.gh +edu.gh +gov.gh +org.gh +mil.gh + +// gi : http://www.nic.gi/rules.html +gi +com.gi +ltd.gi +gov.gi +mod.gi +edu.gi +org.gi + +// gl : http://en.wikipedia.org/wiki/.gl +// http://nic.gl +gl + +// gm : http://www.nic.gm/htmlpages%5Cgm-policy.htm +gm + +// gn : http://psg.com/dns/gn/gn.txt +// Submitted by registry 2008-06-17 +ac.gn +com.gn +edu.gn +gov.gn +org.gn +net.gn + +// gov : http://en.wikipedia.org/wiki/.gov +gov + +// gp : http://www.nic.gp/index.php?lang=en +gp +com.gp +net.gp +mobi.gp +edu.gp +org.gp +asso.gp + +// gq : http://en.wikipedia.org/wiki/.gq +gq + +// gr : https://grweb.ics.forth.gr/english/1617-B-2005.html +// Submitted by registry 2008-06-09 +gr +com.gr +edu.gr +net.gr +org.gr +gov.gr + +// gs : http://en.wikipedia.org/wiki/.gs +gs + +// gt : http://www.gt/politicas.html +*.gt + +// gu : http://gadao.gov.gu/registration.txt +*.gu + +// gw : http://en.wikipedia.org/wiki/.gw +gw + +// gy : http://en.wikipedia.org/wiki/.gy +// http://registry.gy/ +gy +co.gy +com.gy +net.gy + +// hk : https://www.hkdnr.hk +// Submitted by registry 2008-06-11 +hk +com.hk +edu.hk +gov.hk +idv.hk +net.hk +org.hk +公司.hk +教育.hk +敎育.hk +政府.hk +個人.hk +个人.hk +箇人.hk +網络.hk +网络.hk +组織.hk +網絡.hk +网絡.hk +组织.hk +組織.hk +組织.hk + +// hm : http://en.wikipedia.org/wiki/.hm +hm + +// hn : http://www.nic.hn/politicas/ps02,,05.html +hn +com.hn +edu.hn +org.hn +net.hn +mil.hn +gob.hn + +// hr : http://www.dns.hr/documents/pdf/HRTLD-regulations.pdf +hr +iz.hr +from.hr +name.hr +com.hr + +// ht : http://www.nic.ht/info/charte.cfm +ht +com.ht +shop.ht +firm.ht +info.ht +adult.ht +net.ht +pro.ht +org.ht +med.ht +art.ht +coop.ht +pol.ht +asso.ht +edu.ht +rel.ht +gouv.ht +perso.ht + +// hu : http://www.domain.hu/domain/English/sld.html +// Confirmed by registry 2008-06-12 +hu +co.hu +info.hu +org.hu +priv.hu +sport.hu +tm.hu +2000.hu +agrar.hu +bolt.hu +casino.hu +city.hu +erotica.hu +erotika.hu +film.hu +forum.hu +games.hu +hotel.hu +ingatlan.hu +jogasz.hu +konyvelo.hu +lakas.hu +media.hu +news.hu +reklam.hu +sex.hu +shop.hu +suli.hu +szex.hu +tozsde.hu +utazas.hu +video.hu + +// id : http://en.wikipedia.org/wiki/.id +// see also: https://register.pandi.or.id/ +id +ac.id +co.id +go.id +mil.id +net.id +or.id +sch.id +web.id + +// ie : http://en.wikipedia.org/wiki/.ie +ie +gov.ie + +// il : http://en.wikipedia.org/wiki/.il +*.il + +// im : https://www.nic.im/pdfs/imfaqs.pdf +im +co.im +ltd.co.im +plc.co.im +net.im +gov.im +org.im +nic.im +ac.im + +// in : http://en.wikipedia.org/wiki/.in +// see also: http://www.inregistry.in/policies/ +// Please note, that nic.in is not an offical eTLD, but used by most +// government institutions. +in +co.in +firm.in +net.in +org.in +gen.in +ind.in +nic.in +ac.in +edu.in +res.in +gov.in +mil.in + +// info : http://en.wikipedia.org/wiki/.info +info + +// int : http://en.wikipedia.org/wiki/.int +// Confirmed by registry 2008-06-18 +int +eu.int + +// io : http://www.nic.io/rules.html +// list of other 2nd level tlds ? +io +com.io + +// iq : http://www.cmc.iq/english/iq/iqregister1.htm +iq +gov.iq +edu.iq +mil.iq +com.iq +org.iq +net.iq + +// ir : http://www.nic.ir/Terms_and_Conditions_ir,_Appendix_1_Domain_Rules +// Also see http://www.nic.ir/Internationalized_Domain_Names +// Two .ir entries added at request of , 2010-04-16 +ir +ac.ir +co.ir +gov.ir +id.ir +net.ir +org.ir +sch.ir +// xn--mgba3a4f16a.ir (.ir, Persian YEH) +ایران.ir +// xn--mgba3a4fra.ir (.ir, Arabic YEH) +ايران.ir + +// is : http://www.isnic.is/domain/rules.php +// Confirmed by registry 2008-12-06 +is +net.is +com.is +edu.is +gov.is +org.is +int.is + +// it : http://en.wikipedia.org/wiki/.it +it +gov.it +edu.it +// list of reserved geo-names : +// http://www.nic.it/documenti/regolamenti-e-linee-guida/regolamento-assegnazione-versione-6.0.pdf +// (There is also a list of reserved geo-names corresponding to Italian +// municipalities : http://www.nic.it/documenti/appendice-c.pdf , but it is +// not included here.) +agrigento.it +ag.it +alessandria.it +al.it +ancona.it +an.it +aosta.it +aoste.it +ao.it +arezzo.it +ar.it +ascoli-piceno.it +ascolipiceno.it +ap.it +asti.it +at.it +avellino.it +av.it +bari.it +ba.it +andria-barletta-trani.it +andriabarlettatrani.it +trani-barletta-andria.it +tranibarlettaandria.it +barletta-trani-andria.it +barlettatraniandria.it +andria-trani-barletta.it +andriatranibarletta.it +trani-andria-barletta.it +traniandriabarletta.it +bt.it +belluno.it +bl.it +benevento.it +bn.it +bergamo.it +bg.it +biella.it +bi.it +bologna.it +bo.it +bolzano.it +bozen.it +balsan.it +alto-adige.it +altoadige.it +suedtirol.it +bz.it +brescia.it +bs.it +brindisi.it +br.it +cagliari.it +ca.it +caltanissetta.it +cl.it +campobasso.it +cb.it +carboniaiglesias.it +carbonia-iglesias.it +iglesias-carbonia.it +iglesiascarbonia.it +ci.it +caserta.it +ce.it +catania.it +ct.it +catanzaro.it +cz.it +chieti.it +ch.it +como.it +co.it +cosenza.it +cs.it +cremona.it +cr.it +crotone.it +kr.it +cuneo.it +cn.it +dell-ogliastra.it +dellogliastra.it +ogliastra.it +og.it +enna.it +en.it +ferrara.it +fe.it +fermo.it +fm.it +firenze.it +florence.it +fi.it +foggia.it +fg.it +forli-cesena.it +forlicesena.it +cesena-forli.it +cesenaforli.it +fc.it +frosinone.it +fr.it +genova.it +genoa.it +ge.it +gorizia.it +go.it +grosseto.it +gr.it +imperia.it +im.it +isernia.it +is.it +laquila.it +aquila.it +aq.it +la-spezia.it +laspezia.it +sp.it +latina.it +lt.it +lecce.it +le.it +lecco.it +lc.it +livorno.it +li.it +lodi.it +lo.it +lucca.it +lu.it +macerata.it +mc.it +mantova.it +mn.it +massa-carrara.it +massacarrara.it +carrara-massa.it +carraramassa.it +ms.it +matera.it +mt.it +medio-campidano.it +mediocampidano.it +campidano-medio.it +campidanomedio.it +vs.it +messina.it +me.it +milano.it +milan.it +mi.it +modena.it +mo.it +monza.it +monza-brianza.it +monzabrianza.it +monzaebrianza.it +monzaedellabrianza.it +monza-e-della-brianza.it +mb.it +napoli.it +naples.it +na.it +novara.it +no.it +nuoro.it +nu.it +oristano.it +or.it +padova.it +padua.it +pd.it +palermo.it +pa.it +parma.it +pr.it +pavia.it +pv.it +perugia.it +pg.it +pescara.it +pe.it +pesaro-urbino.it +pesarourbino.it +urbino-pesaro.it +urbinopesaro.it +pu.it +piacenza.it +pc.it +pisa.it +pi.it +pistoia.it +pt.it +pordenone.it +pn.it +potenza.it +pz.it +prato.it +po.it +ragusa.it +rg.it +ravenna.it +ra.it +reggio-calabria.it +reggiocalabria.it +rc.it +reggio-emilia.it +reggioemilia.it +re.it +rieti.it +ri.it +rimini.it +rn.it +roma.it +rome.it +rm.it +rovigo.it +ro.it +salerno.it +sa.it +sassari.it +ss.it +savona.it +sv.it +siena.it +si.it +siracusa.it +sr.it +sondrio.it +so.it +taranto.it +ta.it +tempio-olbia.it +tempioolbia.it +olbia-tempio.it +olbiatempio.it +ot.it +teramo.it +te.it +terni.it +tr.it +torino.it +turin.it +to.it +trapani.it +tp.it +trento.it +trentino.it +tn.it +treviso.it +tv.it +trieste.it +ts.it +udine.it +ud.it +varese.it +va.it +venezia.it +venice.it +ve.it +verbania.it +vb.it +vercelli.it +vc.it +verona.it +vr.it +vibo-valentia.it +vibovalentia.it +vv.it +vicenza.it +vi.it +viterbo.it +vt.it + +// je : http://www.channelisles.net/applic/avextn.shtml +je +co.je +org.je +net.je +sch.je +gov.je + +// jm : http://www.com.jm/register.html +*.jm + +// jo : http://www.dns.jo/Registration_policy.aspx +jo +com.jo +org.jo +net.jo +edu.jo +sch.jo +gov.jo +mil.jo +name.jo + +// jobs : http://en.wikipedia.org/wiki/.jobs +jobs + +// jp : http://en.wikipedia.org/wiki/.jp +// http://jprs.co.jp/en/jpdomain.html +// Submitted by registry 2008-06-11 +// Updated by registry 2008-12-04 +jp +// jp organizational type names +ac.jp +ad.jp +co.jp +ed.jp +go.jp +gr.jp +lg.jp +ne.jp +or.jp +// jp geographic type names +// http://jprs.jp/doc/rule/saisoku-1.html +*.aichi.jp +*.akita.jp +*.aomori.jp +*.chiba.jp +*.ehime.jp +*.fukui.jp +*.fukuoka.jp +*.fukushima.jp +*.gifu.jp +*.gunma.jp +*.hiroshima.jp +*.hokkaido.jp +*.hyogo.jp +*.ibaraki.jp +*.ishikawa.jp +*.iwate.jp +*.kagawa.jp +*.kagoshima.jp +*.kanagawa.jp +*.kawasaki.jp +*.kitakyushu.jp +*.kobe.jp +*.kochi.jp +*.kumamoto.jp +*.kyoto.jp +*.mie.jp +*.miyagi.jp +*.miyazaki.jp +*.nagano.jp +*.nagasaki.jp +*.nagoya.jp +*.nara.jp +*.niigata.jp +*.oita.jp +*.okayama.jp +*.okinawa.jp +*.osaka.jp +*.saga.jp +*.saitama.jp +*.sapporo.jp +*.sendai.jp +*.shiga.jp +*.shimane.jp +*.shizuoka.jp +*.tochigi.jp +*.tokushima.jp +*.tokyo.jp +*.tottori.jp +*.toyama.jp +*.wakayama.jp +*.yamagata.jp +*.yamaguchi.jp +*.yamanashi.jp +*.yokohama.jp +!metro.tokyo.jp +!pref.aichi.jp +!pref.akita.jp +!pref.aomori.jp +!pref.chiba.jp +!pref.ehime.jp +!pref.fukui.jp +!pref.fukuoka.jp +!pref.fukushima.jp +!pref.gifu.jp +!pref.gunma.jp +!pref.hiroshima.jp +!pref.hokkaido.jp +!pref.hyogo.jp +!pref.ibaraki.jp +!pref.ishikawa.jp +!pref.iwate.jp +!pref.kagawa.jp +!pref.kagoshima.jp +!pref.kanagawa.jp +!pref.kochi.jp +!pref.kumamoto.jp +!pref.kyoto.jp +!pref.mie.jp +!pref.miyagi.jp +!pref.miyazaki.jp +!pref.nagano.jp +!pref.nagasaki.jp +!pref.nara.jp +!pref.niigata.jp +!pref.oita.jp +!pref.okayama.jp +!pref.okinawa.jp +!pref.osaka.jp +!pref.saga.jp +!pref.saitama.jp +!pref.shiga.jp +!pref.shimane.jp +!pref.shizuoka.jp +!pref.tochigi.jp +!pref.tokushima.jp +!pref.tottori.jp +!pref.toyama.jp +!pref.wakayama.jp +!pref.yamagata.jp +!pref.yamaguchi.jp +!pref.yamanashi.jp +!city.chiba.jp +!city.fukuoka.jp +!city.hiroshima.jp +!city.kawasaki.jp +!city.kitakyushu.jp +!city.kobe.jp +!city.kyoto.jp +!city.nagoya.jp +!city.niigata.jp +!city.okayama.jp +!city.osaka.jp +!city.saitama.jp +!city.sapporo.jp +!city.sendai.jp +!city.shizuoka.jp +!city.yokohama.jp + +// ke : http://www.kenic.or.ke/index.php?option=com_content&task=view&id=117&Itemid=145 +*.ke + +// kg : http://www.domain.kg/dmn_n.html +kg +org.kg +net.kg +com.kg +edu.kg +gov.kg +mil.kg + +// kh : http://www.mptc.gov.kh/dns_registration.htm +*.kh + +// ki : http://www.ki/dns/index.html +ki +edu.ki +biz.ki +net.ki +org.ki +gov.ki +info.ki +com.ki + +// km : http://en.wikipedia.org/wiki/.km +// http://www.domaine.km/documents/charte.doc +km +org.km +nom.km +gov.km +prd.km +tm.km +edu.km +mil.km +ass.km +com.km +// These are only mentioned as proposed suggestions at domaine.km, but +// http://en.wikipedia.org/wiki/.km says they're available for registration: +coop.km +asso.km +presse.km +medecin.km +notaires.km +pharmaciens.km +veterinaire.km +gouv.km + +// kn : http://en.wikipedia.org/wiki/.kn +// http://www.dot.kn/domainRules.html +kn +net.kn +org.kn +edu.kn +gov.kn + +// kp : http://www.kcce.kp/en_index.php +com.kp +edu.kp +gov.kp +org.kp +rep.kp +tra.kp + +// kr : http://en.wikipedia.org/wiki/.kr +// see also: http://domain.nida.or.kr/eng/registration.jsp +kr +ac.kr +co.kr +es.kr +go.kr +hs.kr +kg.kr +mil.kr +ms.kr +ne.kr +or.kr +pe.kr +re.kr +sc.kr +// kr geographical names +busan.kr +chungbuk.kr +chungnam.kr +daegu.kr +daejeon.kr +gangwon.kr +gwangju.kr +gyeongbuk.kr +gyeonggi.kr +gyeongnam.kr +incheon.kr +jeju.kr +jeonbuk.kr +jeonnam.kr +seoul.kr +ulsan.kr + +// kw : http://en.wikipedia.org/wiki/.kw +*.kw + +// ky : http://www.icta.ky/da_ky_reg_dom.php +// Confirmed by registry 2008-06-17 +ky +edu.ky +gov.ky +com.ky +org.ky +net.ky + +// kz : http://en.wikipedia.org/wiki/.kz +// see also: http://www.nic.kz/rules/index.jsp +kz +org.kz +edu.kz +net.kz +gov.kz +mil.kz +com.kz + +// la : http://en.wikipedia.org/wiki/.la +// Submitted by registry 2008-06-10 +la +int.la +net.la +info.la +edu.la +gov.la +per.la +com.la +org.la +// see http://www.c.la/ +c.la + +// lb : http://en.wikipedia.org/wiki/.lb +// Submitted by registry 2008-06-17 +com.lb +edu.lb +gov.lb +net.lb +org.lb + +// lc : http://en.wikipedia.org/wiki/.lc +// see also: http://www.nic.lc/rules.htm +lc +com.lc +net.lc +co.lc +org.lc +edu.lc +gov.lc + +// li : http://en.wikipedia.org/wiki/.li +li + +// lk : http://www.nic.lk/seclevpr.html +lk +gov.lk +sch.lk +net.lk +int.lk +com.lk +org.lk +edu.lk +ngo.lk +soc.lk +web.lk +ltd.lk +assn.lk +grp.lk +hotel.lk + +// local : http://en.wikipedia.org/wiki/.local +local + +// lr : http://psg.com/dns/lr/lr.txt +// Submitted by registry 2008-06-17 +com.lr +edu.lr +gov.lr +org.lr +net.lr + +// ls : http://en.wikipedia.org/wiki/.ls +ls +co.ls +org.ls + +// lt : http://en.wikipedia.org/wiki/.lt +lt +// gov.lt : http://www.gov.lt/index_en.php +gov.lt + +// lu : http://www.dns.lu/en/ +lu + +// lv : http://www.nic.lv/DNS/En/generic.php +lv +com.lv +edu.lv +gov.lv +org.lv +mil.lv +id.lv +net.lv +asn.lv +conf.lv + +// ly : http://www.nic.ly/regulations.php +ly +com.ly +net.ly +gov.ly +plc.ly +edu.ly +sch.ly +med.ly +org.ly +id.ly + +// ma : http://en.wikipedia.org/wiki/.ma +// http://www.anrt.ma/fr/admin/download/upload/file_fr782.pdf +ma +co.ma +net.ma +gov.ma +org.ma +ac.ma +press.ma + +// mc : http://www.nic.mc/ +mc +tm.mc +asso.mc + +// md : http://en.wikipedia.org/wiki/.md +md + +// me : http://en.wikipedia.org/wiki/.me +me +co.me +net.me +org.me +edu.me +ac.me +gov.me +its.me +priv.me + +// mg : http://www.nic.mg/tarif.htm +mg +org.mg +nom.mg +gov.mg +prd.mg +tm.mg +edu.mg +mil.mg +com.mg + +// mh : http://en.wikipedia.org/wiki/.mh +mh + +// mil : http://en.wikipedia.org/wiki/.mil +mil + +// mk : http://en.wikipedia.org/wiki/.mk +// see also: http://dns.marnet.net.mk/postapka.php +mk +com.mk +org.mk +net.mk +edu.mk +gov.mk +inf.mk +name.mk + +// ml : http://www.gobin.info/domainname/ml-template.doc +// see also: http://en.wikipedia.org/wiki/.ml +ml +com.ml +edu.ml +gouv.ml +gov.ml +net.ml +org.ml +presse.ml + +// mm : http://en.wikipedia.org/wiki/.mm +*.mm + +// mn : http://en.wikipedia.org/wiki/.mn +mn +gov.mn +edu.mn +org.mn + +// mo : http://www.monic.net.mo/ +mo +com.mo +net.mo +org.mo +edu.mo +gov.mo + +// mobi : http://en.wikipedia.org/wiki/.mobi +mobi + +// mp : http://www.dot.mp/ +// Confirmed by registry 2008-06-17 +mp + +// mq : http://en.wikipedia.org/wiki/.mq +mq + +// mr : http://en.wikipedia.org/wiki/.mr +mr +gov.mr + +// ms : http://en.wikipedia.org/wiki/.ms +ms + +// mt : https://www.nic.org.mt/dotmt/ +*.mt + +// mu : http://en.wikipedia.org/wiki/.mu +mu +com.mu +net.mu +org.mu +gov.mu +ac.mu +co.mu +or.mu + +// museum : http://about.museum/naming/ +// http://index.museum/ +museum +academy.museum +agriculture.museum +air.museum +airguard.museum +alabama.museum +alaska.museum +amber.museum +ambulance.museum +american.museum +americana.museum +americanantiques.museum +americanart.museum +amsterdam.museum +and.museum +annefrank.museum +anthro.museum +anthropology.museum +antiques.museum +aquarium.museum +arboretum.museum +archaeological.museum +archaeology.museum +architecture.museum +art.museum +artanddesign.museum +artcenter.museum +artdeco.museum +arteducation.museum +artgallery.museum +arts.museum +artsandcrafts.museum +asmatart.museum +assassination.museum +assisi.museum +association.museum +astronomy.museum +atlanta.museum +austin.museum +australia.museum +automotive.museum +aviation.museum +axis.museum +badajoz.museum +baghdad.museum +bahn.museum +bale.museum +baltimore.museum +barcelona.museum +baseball.museum +basel.museum +baths.museum +bauern.museum +beauxarts.museum +beeldengeluid.museum +bellevue.museum +bergbau.museum +berkeley.museum +berlin.museum +bern.museum +bible.museum +bilbao.museum +bill.museum +birdart.museum +birthplace.museum +bonn.museum +boston.museum +botanical.museum +botanicalgarden.museum +botanicgarden.museum +botany.museum +brandywinevalley.museum +brasil.museum +bristol.museum +british.museum +britishcolumbia.museum +broadcast.museum +brunel.museum +brussel.museum +brussels.museum +bruxelles.museum +building.museum +burghof.museum +bus.museum +bushey.museum +cadaques.museum +california.museum +cambridge.museum +can.museum +canada.museum +capebreton.museum +carrier.museum +cartoonart.museum +casadelamoneda.museum +castle.museum +castres.museum +celtic.museum +center.museum +chattanooga.museum +cheltenham.museum +chesapeakebay.museum +chicago.museum +children.museum +childrens.museum +childrensgarden.museum +chiropractic.museum +chocolate.museum +christiansburg.museum +cincinnati.museum +cinema.museum +circus.museum +civilisation.museum +civilization.museum +civilwar.museum +clinton.museum +clock.museum +coal.museum +coastaldefence.museum +cody.museum +coldwar.museum +collection.museum +colonialwilliamsburg.museum +coloradoplateau.museum +columbia.museum +columbus.museum +communication.museum +communications.museum +community.museum +computer.museum +computerhistory.museum +comunicações.museum +contemporary.museum +contemporaryart.museum +convent.museum +copenhagen.museum +corporation.museum +correios-e-telecomunicações.museum +corvette.museum +costume.museum +countryestate.museum +county.museum +crafts.museum +cranbrook.museum +creation.museum +cultural.museum +culturalcenter.museum +culture.museum +cyber.museum +cymru.museum +dali.museum +dallas.museum +database.museum +ddr.museum +decorativearts.museum +delaware.museum +delmenhorst.museum +denmark.museum +depot.museum +design.museum +detroit.museum +dinosaur.museum +discovery.museum +dolls.museum +donostia.museum +durham.museum +eastafrica.museum +eastcoast.museum +education.museum +educational.museum +egyptian.museum +eisenbahn.museum +elburg.museum +elvendrell.museum +embroidery.museum +encyclopedic.museum +england.museum +entomology.museum +environment.museum +environmentalconservation.museum +epilepsy.museum +essex.museum +estate.museum +ethnology.museum +exeter.museum +exhibition.museum +family.museum +farm.museum +farmequipment.museum +farmers.museum +farmstead.museum +field.museum +figueres.museum +filatelia.museum +film.museum +fineart.museum +finearts.museum +finland.museum +flanders.museum +florida.museum +force.museum +fortmissoula.museum +fortworth.museum +foundation.museum +francaise.museum +frankfurt.museum +franziskaner.museum +freemasonry.museum +freiburg.museum +fribourg.museum +frog.museum +fundacio.museum +furniture.museum +gallery.museum +garden.museum +gateway.museum +geelvinck.museum +gemological.museum +geology.museum +georgia.museum +giessen.museum +glas.museum +glass.museum +gorge.museum +grandrapids.museum +graz.museum +guernsey.museum +halloffame.museum +hamburg.museum +handson.museum +harvestcelebration.museum +hawaii.museum +health.museum +heimatunduhren.museum +hellas.museum +helsinki.museum +hembygdsforbund.museum +heritage.museum +histoire.museum +historical.museum +historicalsociety.museum +historichouses.museum +historisch.museum +historisches.museum +history.museum +historyofscience.museum +horology.museum +house.museum +humanities.museum +illustration.museum +imageandsound.museum +indian.museum +indiana.museum +indianapolis.museum +indianmarket.museum +intelligence.museum +interactive.museum +iraq.museum +iron.museum +isleofman.museum +jamison.museum +jefferson.museum +jerusalem.museum +jewelry.museum +jewish.museum +jewishart.museum +jfk.museum +journalism.museum +judaica.museum +judygarland.museum +juedisches.museum +juif.museum +karate.museum +karikatur.museum +kids.museum +koebenhavn.museum +koeln.museum +kunst.museum +kunstsammlung.museum +kunstunddesign.museum +labor.museum +labour.museum +lajolla.museum +lancashire.museum +landes.museum +lans.museum +läns.museum +larsson.museum +lewismiller.museum +lincoln.museum +linz.museum +living.museum +livinghistory.museum +localhistory.museum +london.museum +losangeles.museum +louvre.museum +loyalist.museum +lucerne.museum +luxembourg.museum +luzern.museum +mad.museum +madrid.museum +mallorca.museum +manchester.museum +mansion.museum +mansions.museum +manx.museum +marburg.museum +maritime.museum +maritimo.museum +maryland.museum +marylhurst.museum +media.museum +medical.museum +medizinhistorisches.museum +meeres.museum +memorial.museum +mesaverde.museum +michigan.museum +midatlantic.museum +military.museum +mill.museum +miners.museum +mining.museum +minnesota.museum +missile.museum +missoula.museum +modern.museum +moma.museum +money.museum +monmouth.museum +monticello.museum +montreal.museum +moscow.museum +motorcycle.museum +muenchen.museum +muenster.museum +mulhouse.museum +muncie.museum +museet.museum +museumcenter.museum +museumvereniging.museum +music.museum +national.museum +nationalfirearms.museum +nationalheritage.museum +nativeamerican.museum +naturalhistory.museum +naturalhistorymuseum.museum +naturalsciences.museum +nature.museum +naturhistorisches.museum +natuurwetenschappen.museum +naumburg.museum +naval.museum +nebraska.museum +neues.museum +newhampshire.museum +newjersey.museum +newmexico.museum +newport.museum +newspaper.museum +newyork.museum +niepce.museum +norfolk.museum +north.museum +nrw.museum +nuernberg.museum +nuremberg.museum +nyc.museum +nyny.museum +oceanographic.museum +oceanographique.museum +omaha.museum +online.museum +ontario.museum +openair.museum +oregon.museum +oregontrail.museum +otago.museum +oxford.museum +pacific.museum +paderborn.museum +palace.museum +paleo.museum +palmsprings.museum +panama.museum +paris.museum +pasadena.museum +pharmacy.museum +philadelphia.museum +philadelphiaarea.museum +philately.museum +phoenix.museum +photography.museum +pilots.museum +pittsburgh.museum +planetarium.museum +plantation.museum +plants.museum +plaza.museum +portal.museum +portland.museum +portlligat.museum +posts-and-telecommunications.museum +preservation.museum +presidio.museum +press.museum +project.museum +public.museum +pubol.museum +quebec.museum +railroad.museum +railway.museum +research.museum +resistance.museum +riodejaneiro.museum +rochester.museum +rockart.museum +roma.museum +russia.museum +saintlouis.museum +salem.museum +salvadordali.museum +salzburg.museum +sandiego.museum +sanfrancisco.museum +santabarbara.museum +santacruz.museum +santafe.museum +saskatchewan.museum +satx.museum +savannahga.museum +schlesisches.museum +schoenbrunn.museum +schokoladen.museum +school.museum +schweiz.museum +science.museum +scienceandhistory.museum +scienceandindustry.museum +sciencecenter.museum +sciencecenters.museum +science-fiction.museum +sciencehistory.museum +sciences.museum +sciencesnaturelles.museum +scotland.museum +seaport.museum +settlement.museum +settlers.museum +shell.museum +sherbrooke.museum +sibenik.museum +silk.museum +ski.museum +skole.museum +society.museum +sologne.museum +soundandvision.museum +southcarolina.museum +southwest.museum +space.museum +spy.museum +square.museum +stadt.museum +stalbans.museum +starnberg.museum +state.museum +stateofdelaware.museum +station.museum +steam.museum +steiermark.museum +stjohn.museum +stockholm.museum +stpetersburg.museum +stuttgart.museum +suisse.museum +surgeonshall.museum +surrey.museum +svizzera.museum +sweden.museum +sydney.museum +tank.museum +tcm.museum +technology.museum +telekommunikation.museum +television.museum +texas.museum +textile.museum +theater.museum +time.museum +timekeeping.museum +topology.museum +torino.museum +touch.museum +town.museum +transport.museum +tree.museum +trolley.museum +trust.museum +trustee.museum +uhren.museum +ulm.museum +undersea.museum +university.museum +usa.museum +usantiques.museum +usarts.museum +uscountryestate.museum +usculture.museum +usdecorativearts.museum +usgarden.museum +ushistory.museum +ushuaia.museum +uslivinghistory.museum +utah.museum +uvic.museum +valley.museum +vantaa.museum +versailles.museum +viking.museum +village.museum +virginia.museum +virtual.museum +virtuel.museum +vlaanderen.museum +volkenkunde.museum +wales.museum +wallonie.museum +war.museum +washingtondc.museum +watchandclock.museum +watch-and-clock.museum +western.museum +westfalen.museum +whaling.museum +wildlife.museum +williamsburg.museum +windmill.museum +workshop.museum +york.museum +yorkshire.museum +yosemite.museum +youth.museum +zoological.museum +zoology.museum +ירושלים.museum +иком.museum + +// mv : http://en.wikipedia.org/wiki/.mv +// "mv" included because, contra Wikipedia, google.mv exists. +mv +aero.mv +biz.mv +com.mv +coop.mv +edu.mv +gov.mv +info.mv +int.mv +mil.mv +museum.mv +name.mv +net.mv +org.mv +pro.mv + +// mw : http://www.registrar.mw/ +mw +ac.mw +biz.mw +co.mw +com.mw +coop.mw +edu.mw +gov.mw +int.mw +museum.mw +net.mw +org.mw + +// mx : http://www.nic.mx/ +// Submitted by registry 2008-06-19 +mx +com.mx +org.mx +gob.mx +edu.mx +net.mx + +// my : http://www.mynic.net.my/ +my +com.my +net.my +org.my +gov.my +edu.my +mil.my +name.my + +// mz : http://www.gobin.info/domainname/mz-template.doc +*.mz + +// na : http://www.na-nic.com.na/ +// http://www.info.na/domain/ +na +info.na +pro.na +name.na +school.na +or.na +dr.na +us.na +mx.na +ca.na +in.na +cc.na +tv.na +ws.na +mobi.na +co.na +com.na +org.na + +// name : has 2nd-level tlds, but there's no list of them +name + +// nc : http://www.cctld.nc/ +nc +asso.nc + +// ne : http://en.wikipedia.org/wiki/.ne +ne + +// net : http://en.wikipedia.org/wiki/.net +net + +// CentralNic names : http://www.centralnic.com/names/domains +// Submitted by registry 2008-06-17 +gb.net +se.net +uk.net + +// ZaNiC names : http://www.za.net/ +// Confirmed by registry 2009-10-03 +za.net + +// nf : http://en.wikipedia.org/wiki/.nf +nf +com.nf +net.nf +per.nf +rec.nf +web.nf +arts.nf +firm.nf +info.nf +other.nf +store.nf + +// ng : http://psg.com/dns/ng/ +// Submitted by registry 2008-06-17 +ac.ng +com.ng +edu.ng +gov.ng +net.ng +org.ng + +// ni : http://www.nic.ni/dominios.htm +*.ni + +// nl : http://www.domain-registry.nl/ace.php/c,728,122,,,,Home.html +// Confirmed by registry (with technical +// reservations) 2008-06-08 +nl + +// BV.nl will be a registry for dutch BV's (besloten vennootschap) +bv.nl + +// the co.nl domain is managed by CoDNS B.V. Added 2010-05-23. +co.nl + +// no : http://www.norid.no/regelverk/index.en.html +// The Norwegian registry has declined to notify us of updates. The web pages +// referenced below are the official source of the data. There is also an +// announce mailing list: +// https://postlister.uninett.no/sympa/info/norid-diskusjon +no +// Norid generic domains : http://www.norid.no/regelverk/vedlegg-c.en.html +fhs.no +vgs.no +fylkesbibl.no +folkebibl.no +museum.no +idrett.no +priv.no +// Non-Norid generic domains : http://www.norid.no/regelverk/vedlegg-d.en.html +mil.no +stat.no +dep.no +kommune.no +herad.no +// no geographical names : http://www.norid.no/regelverk/vedlegg-b.en.html +// counties +aa.no +ah.no +bu.no +fm.no +hl.no +hm.no +jan-mayen.no +mr.no +nl.no +nt.no +of.no +ol.no +oslo.no +rl.no +sf.no +st.no +svalbard.no +tm.no +tr.no +va.no +vf.no +// primary and lower secondary schools per county +gs.aa.no +gs.ah.no +gs.bu.no +gs.fm.no +gs.hl.no +gs.hm.no +gs.jan-mayen.no +gs.mr.no +gs.nl.no +gs.nt.no +gs.of.no +gs.ol.no +gs.oslo.no +gs.rl.no +gs.sf.no +gs.st.no +gs.svalbard.no +gs.tm.no +gs.tr.no +gs.va.no +gs.vf.no +// cities +akrehamn.no +åkrehamn.no +algard.no +ålgård.no +arna.no +brumunddal.no +bryne.no +bronnoysund.no +brønnøysund.no +drobak.no +drøbak.no +egersund.no +fetsund.no +floro.no +florø.no +fredrikstad.no +hokksund.no +honefoss.no +hønefoss.no +jessheim.no +jorpeland.no +jørpeland.no +kirkenes.no +kopervik.no +krokstadelva.no +langevag.no +langevåg.no +leirvik.no +mjondalen.no +mjøndalen.no +mo-i-rana.no +mosjoen.no +mosjøen.no +nesoddtangen.no +orkanger.no +osoyro.no +osøyro.no +raholt.no +råholt.no +sandnessjoen.no +sandnessjøen.no +skedsmokorset.no +slattum.no +spjelkavik.no +stathelle.no +stavern.no +stjordalshalsen.no +stjørdalshalsen.no +tananger.no +tranby.no +vossevangen.no +// communities +afjord.no +åfjord.no +agdenes.no +al.no +ål.no +alesund.no +ålesund.no +alstahaug.no +alta.no +áltá.no +alaheadju.no +álaheadju.no +alvdal.no +amli.no +åmli.no +amot.no +åmot.no +andebu.no +andoy.no +andøy.no +andasuolo.no +ardal.no +årdal.no +aremark.no +arendal.no +ås.no +aseral.no +åseral.no +asker.no +askim.no +askvoll.no +askoy.no +askøy.no +asnes.no +åsnes.no +audnedaln.no +aukra.no +aure.no +aurland.no +aurskog-holand.no +aurskog-høland.no +austevoll.no +austrheim.no +averoy.no +averøy.no +balestrand.no +ballangen.no +balat.no +bálát.no +balsfjord.no +bahccavuotna.no +báhccavuotna.no +bamble.no +bardu.no +beardu.no +beiarn.no +bajddar.no +bájddar.no +baidar.no +báidár.no +berg.no +bergen.no +berlevag.no +berlevåg.no +bearalvahki.no +bearalváhki.no +bindal.no +birkenes.no +bjarkoy.no +bjarkøy.no +bjerkreim.no +bjugn.no +bodo.no +bodø.no +badaddja.no +bådåddjå.no +budejju.no +bokn.no +bremanger.no +bronnoy.no +brønnøy.no +bygland.no +bykle.no +barum.no +bærum.no +bo.telemark.no +bø.telemark.no +bo.nordland.no +bø.nordland.no +bievat.no +bievát.no +bomlo.no +bømlo.no +batsfjord.no +båtsfjord.no +bahcavuotna.no +báhcavuotna.no +dovre.no +drammen.no +drangedal.no +dyroy.no +dyrøy.no +donna.no +dønna.no +eid.no +eidfjord.no +eidsberg.no +eidskog.no +eidsvoll.no +eigersund.no +elverum.no +enebakk.no +engerdal.no +etne.no +etnedal.no +evenes.no +evenassi.no +evenášši.no +evje-og-hornnes.no +farsund.no +fauske.no +fuossko.no +fuoisku.no +fedje.no +fet.no +finnoy.no +finnøy.no +fitjar.no +fjaler.no +fjell.no +flakstad.no +flatanger.no +flekkefjord.no +flesberg.no +flora.no +fla.no +flå.no +folldal.no +forsand.no +fosnes.no +frei.no +frogn.no +froland.no +frosta.no +frana.no +fræna.no +froya.no +frøya.no +fusa.no +fyresdal.no +forde.no +førde.no +gamvik.no +gangaviika.no +gáŋgaviika.no +gaular.no +gausdal.no +gildeskal.no +gildeskål.no +giske.no +gjemnes.no +gjerdrum.no +gjerstad.no +gjesdal.no +gjovik.no +gjøvik.no +gloppen.no +gol.no +gran.no +grane.no +granvin.no +gratangen.no +grimstad.no +grong.no +kraanghke.no +kråanghke.no +grue.no +gulen.no +hadsel.no +halden.no +halsa.no +hamar.no +hamaroy.no +habmer.no +hábmer.no +hapmir.no +hápmir.no +hammerfest.no +hammarfeasta.no +hámmárfeasta.no +haram.no +hareid.no +harstad.no +hasvik.no +aknoluokta.no +ákŋoluokta.no +hattfjelldal.no +aarborte.no +haugesund.no +hemne.no +hemnes.no +hemsedal.no +heroy.more-og-romsdal.no +herøy.møre-og-romsdal.no +heroy.nordland.no +herøy.nordland.no +hitra.no +hjartdal.no +hjelmeland.no +hobol.no +hobøl.no +hof.no +hol.no +hole.no +holmestrand.no +holtalen.no +holtålen.no +hornindal.no +horten.no +hurdal.no +hurum.no +hvaler.no +hyllestad.no +hagebostad.no +hægebostad.no +hoyanger.no +høyanger.no +hoylandet.no +høylandet.no +ha.no +hå.no +ibestad.no +inderoy.no +inderøy.no +iveland.no +jevnaker.no +jondal.no +jolster.no +jølster.no +karasjok.no +karasjohka.no +kárášjohka.no +karlsoy.no +galsa.no +gálsá.no +karmoy.no +karmøy.no +kautokeino.no +guovdageaidnu.no +klepp.no +klabu.no +klæbu.no +kongsberg.no +kongsvinger.no +kragero.no +kragerø.no +kristiansand.no +kristiansund.no +krodsherad.no +krødsherad.no +kvalsund.no +rahkkeravju.no +ráhkkerávju.no +kvam.no +kvinesdal.no +kvinnherad.no +kviteseid.no +kvitsoy.no +kvitsøy.no +kvafjord.no +kvæfjord.no +giehtavuoatna.no +kvanangen.no +kvænangen.no +navuotna.no +návuotna.no +kafjord.no +kåfjord.no +gaivuotna.no +gáivuotna.no +larvik.no +lavangen.no +lavagis.no +loabat.no +loabát.no +lebesby.no +davvesiida.no +leikanger.no +leirfjord.no +leka.no +leksvik.no +lenvik.no +leangaviika.no +leaŋgaviika.no +lesja.no +levanger.no +lier.no +lierne.no +lillehammer.no +lillesand.no +lindesnes.no +lindas.no +lindås.no +lom.no +loppa.no +lahppi.no +láhppi.no +lund.no +lunner.no +luroy.no +lurøy.no +luster.no +lyngdal.no +lyngen.no +ivgu.no +lardal.no +lerdal.no +lærdal.no +lodingen.no +lødingen.no +lorenskog.no +lørenskog.no +loten.no +løten.no +malvik.no +masoy.no +måsøy.no +muosat.no +muosát.no +mandal.no +marker.no +marnardal.no +masfjorden.no +meland.no +meldal.no +melhus.no +meloy.no +meløy.no +meraker.no +meråker.no +moareke.no +moåreke.no +midsund.no +midtre-gauldal.no +modalen.no +modum.no +molde.no +moskenes.no +moss.no +mosvik.no +malselv.no +målselv.no +malatvuopmi.no +málatvuopmi.no +namdalseid.no +aejrie.no +namsos.no +namsskogan.no +naamesjevuemie.no +nååmesjevuemie.no +laakesvuemie.no +nannestad.no +narvik.no +narviika.no +naustdal.no +nedre-eiker.no +nes.akershus.no +nes.buskerud.no +nesna.no +nesodden.no +nesseby.no +unjarga.no +unjárga.no +nesset.no +nissedal.no +nittedal.no +nord-aurdal.no +nord-fron.no +nord-odal.no +norddal.no +nordkapp.no +davvenjarga.no +davvenjárga.no +nordre-land.no +nordreisa.no +raisa.no +ráisa.no +nore-og-uvdal.no +notodden.no +naroy.no +nærøy.no +notteroy.no +nøtterøy.no +odda.no +oksnes.no +øksnes.no +oppdal.no +oppegard.no +oppegård.no +orkdal.no +orland.no +ørland.no +orskog.no +ørskog.no +orsta.no +ørsta.no +os.hedmark.no +os.hordaland.no +osen.no +osteroy.no +osterøy.no +ostre-toten.no +østre-toten.no +overhalla.no +ovre-eiker.no +øvre-eiker.no +oyer.no +øyer.no +oygarden.no +øygarden.no +oystre-slidre.no +øystre-slidre.no +porsanger.no +porsangu.no +porsáŋgu.no +porsgrunn.no +radoy.no +radøy.no +rakkestad.no +rana.no +ruovat.no +randaberg.no +rauma.no +rendalen.no +rennebu.no +rennesoy.no +rennesøy.no +rindal.no +ringebu.no +ringerike.no +ringsaker.no +rissa.no +risor.no +risør.no +roan.no +rollag.no +rygge.no +ralingen.no +rælingen.no +rodoy.no +rødøy.no +romskog.no +rømskog.no +roros.no +røros.no +rost.no +røst.no +royken.no +røyken.no +royrvik.no +røyrvik.no +rade.no +råde.no +salangen.no +siellak.no +saltdal.no +salat.no +sálát.no +sálat.no +samnanger.no +sande.more-og-romsdal.no +sande.møre-og-romsdal.no +sande.vestfold.no +sandefjord.no +sandnes.no +sandoy.no +sandøy.no +sarpsborg.no +sauda.no +sauherad.no +sel.no +selbu.no +selje.no +seljord.no +sigdal.no +siljan.no +sirdal.no +skaun.no +skedsmo.no +ski.no +skien.no +skiptvet.no +skjervoy.no +skjervøy.no +skierva.no +skiervá.no +skjak.no +skjåk.no +skodje.no +skanland.no +skånland.no +skanit.no +skánit.no +smola.no +smøla.no +snillfjord.no +snasa.no +snåsa.no +snoasa.no +snaase.no +snåase.no +sogndal.no +sokndal.no +sola.no +solund.no +songdalen.no +sortland.no +spydeberg.no +stange.no +stavanger.no +steigen.no +steinkjer.no +stjordal.no +stjørdal.no +stokke.no +stor-elvdal.no +stord.no +stordal.no +storfjord.no +omasvuotna.no +strand.no +stranda.no +stryn.no +sula.no +suldal.no +sund.no +sunndal.no +surnadal.no +sveio.no +svelvik.no +sykkylven.no +sogne.no +søgne.no +somna.no +sømna.no +sondre-land.no +søndre-land.no +sor-aurdal.no +sør-aurdal.no +sor-fron.no +sør-fron.no +sor-odal.no +sør-odal.no +sor-varanger.no +sør-varanger.no +matta-varjjat.no +mátta-várjjat.no +sorfold.no +sørfold.no +sorreisa.no +sørreisa.no +sorum.no +sørum.no +tana.no +deatnu.no +time.no +tingvoll.no +tinn.no +tjeldsund.no +dielddanuorri.no +tjome.no +tjøme.no +tokke.no +tolga.no +torsken.no +tranoy.no +tranøy.no +tromso.no +tromsø.no +tromsa.no +romsa.no +trondheim.no +troandin.no +trysil.no +trana.no +træna.no +trogstad.no +trøgstad.no +tvedestrand.no +tydal.no +tynset.no +tysfjord.no +divtasvuodna.no +divttasvuotna.no +tysnes.no +tysvar.no +tysvær.no +tonsberg.no +tønsberg.no +ullensaker.no +ullensvang.no +ulvik.no +utsira.no +vadso.no +vadsø.no +cahcesuolo.no +čáhcesuolo.no +vaksdal.no +valle.no +vang.no +vanylven.no +vardo.no +vardø.no +varggat.no +várggát.no +vefsn.no +vaapste.no +vega.no +vegarshei.no +vegårshei.no +vennesla.no +verdal.no +verran.no +vestby.no +vestnes.no +vestre-slidre.no +vestre-toten.no +vestvagoy.no +vestvågøy.no +vevelstad.no +vik.no +vikna.no +vindafjord.no +volda.no +voss.no +varoy.no +værøy.no +vagan.no +vågan.no +voagat.no +vagsoy.no +vågsøy.no +vaga.no +vågå.no +valer.ostfold.no +våler.østfold.no +valer.hedmark.no +våler.hedmark.no + +// the co.no domain is managed by CoDNS B.V. Added 2010-05-23. +co.no + +// np : http://www.mos.com.np/register.html +*.np + +// nr : http://cenpac.net.nr/dns/index.html +// Confirmed by registry 2008-06-17 +nr +biz.nr +info.nr +gov.nr +edu.nr +org.nr +net.nr +com.nr + +// nu : http://en.wikipedia.org/wiki/.nu +nu + +// nz : http://en.wikipedia.org/wiki/.nz +*.nz + +// om : http://en.wikipedia.org/wiki/.om +*.om +!mediaphone.om +!nawrastelecom.om +!nawras.om +!omanmobile.om +!omanpost.om +!omantel.om +!rakpetroleum.om +!siemens.om +!songfest.om +!statecouncil.om + +// org : http://en.wikipedia.org/wiki/.org +org + +// CentralNic names : http://www.centralnic.com/names/domains +// Submitted by registry 2008-06-17 +ae.org + +// ZaNiC names : http://www.za.net/ +// Confirmed by registry 2009-10-03 +za.org + +// pa : http://www.nic.pa/ +// Some additional second level "domains" resolve directly as hostnames, such as +// pannet.pa, so we add a rule for "pa". +pa +ac.pa +gob.pa +com.pa +org.pa +sld.pa +edu.pa +net.pa +ing.pa +abo.pa +med.pa +nom.pa + +// pe : https://www.nic.pe/InformeFinalComision.pdf +pe +edu.pe +gob.pe +nom.pe +mil.pe +org.pe +com.pe +net.pe + +// pf : http://www.gobin.info/domainname/formulaire-pf.pdf +pf +com.pf +org.pf +edu.pf + +// pg : http://en.wikipedia.org/wiki/.pg +*.pg + +// ph : http://www.domains.ph/FAQ2.asp +// Submitted by registry 2008-06-13 +ph +com.ph +net.ph +org.ph +gov.ph +edu.ph +ngo.ph +mil.ph +i.ph + +// pk : http://pk5.pknic.net.pk/pk5/msgNamepk.PK +pk +com.pk +net.pk +edu.pk +org.pk +fam.pk +biz.pk +web.pk +gov.pk +gob.pk +gok.pk +gon.pk +gop.pk +gos.pk +info.pk + +// pl : http://www.dns.pl/english/ +pl +// NASK functional domains (nask.pl / dns.pl) : http://www.dns.pl/english/dns-funk.html +aid.pl +agro.pl +atm.pl +auto.pl +biz.pl +com.pl +edu.pl +gmina.pl +gsm.pl +info.pl +mail.pl +miasta.pl +media.pl +mil.pl +net.pl +nieruchomosci.pl +nom.pl +org.pl +pc.pl +powiat.pl +priv.pl +realestate.pl +rel.pl +sex.pl +shop.pl +sklep.pl +sos.pl +szkola.pl +targi.pl +tm.pl +tourism.pl +travel.pl +turystyka.pl +// ICM functional domains (icm.edu.pl) +6bone.pl +art.pl +mbone.pl +// Government domains (administered by ippt.gov.pl) +gov.pl +uw.gov.pl +um.gov.pl +ug.gov.pl +upow.gov.pl +starostwo.gov.pl +so.gov.pl +sr.gov.pl +po.gov.pl +pa.gov.pl +// other functional domains +ngo.pl +irc.pl +usenet.pl +// NASK geographical domains : http://www.dns.pl/english/dns-regiony.html +augustow.pl +babia-gora.pl +bedzin.pl +beskidy.pl +bialowieza.pl +bialystok.pl +bielawa.pl +bieszczady.pl +boleslawiec.pl +bydgoszcz.pl +bytom.pl +cieszyn.pl +czeladz.pl +czest.pl +dlugoleka.pl +elblag.pl +elk.pl +glogow.pl +gniezno.pl +gorlice.pl +grajewo.pl +ilawa.pl +jaworzno.pl +jelenia-gora.pl +jgora.pl +kalisz.pl +kazimierz-dolny.pl +karpacz.pl +kartuzy.pl +kaszuby.pl +katowice.pl +kepno.pl +ketrzyn.pl +klodzko.pl +kobierzyce.pl +kolobrzeg.pl +konin.pl +konskowola.pl +kutno.pl +lapy.pl +lebork.pl +legnica.pl +lezajsk.pl +limanowa.pl +lomza.pl +lowicz.pl +lubin.pl +lukow.pl +malbork.pl +malopolska.pl +mazowsze.pl +mazury.pl +mielec.pl +mielno.pl +mragowo.pl +naklo.pl +nowaruda.pl +nysa.pl +olawa.pl +olecko.pl +olkusz.pl +olsztyn.pl +opoczno.pl +opole.pl +ostroda.pl +ostroleka.pl +ostrowiec.pl +ostrowwlkp.pl +pila.pl +pisz.pl +podhale.pl +podlasie.pl +polkowice.pl +pomorze.pl +pomorskie.pl +prochowice.pl +pruszkow.pl +przeworsk.pl +pulawy.pl +radom.pl +rawa-maz.pl +rybnik.pl +rzeszow.pl +sanok.pl +sejny.pl +siedlce.pl +slask.pl +slupsk.pl +sosnowiec.pl +stalowa-wola.pl +skoczow.pl +starachowice.pl +stargard.pl +suwalki.pl +swidnica.pl +swiebodzin.pl +swinoujscie.pl +szczecin.pl +szczytno.pl +tarnobrzeg.pl +tgory.pl +turek.pl +tychy.pl +ustka.pl +walbrzych.pl +warmia.pl +warszawa.pl +waw.pl +wegrow.pl +wielun.pl +wlocl.pl +wloclawek.pl +wodzislaw.pl +wolomin.pl +wroclaw.pl +zachpomor.pl +zagan.pl +zarow.pl +zgora.pl +zgorzelec.pl +// TASK geographical domains (www.task.gda.pl/uslugi/dns) +gda.pl +gdansk.pl +gdynia.pl +med.pl +sopot.pl +// other geographical domains +gliwice.pl +krakow.pl +poznan.pl +wroc.pl +zakopane.pl + +// co.pl : Mainseek Sp. z o.o. http://www.co.pl +co.pl + +// pn : http://www.government.pn/PnRegistry/policies.htm +pn +gov.pn +co.pn +org.pn +edu.pn +net.pn + +// pr : http://www.nic.pr/index.asp?f=1 +pr +com.pr +net.pr +org.pr +gov.pr +edu.pr +isla.pr +pro.pr +biz.pr +info.pr +name.pr +// these aren't mentioned on nic.pr, but on http://en.wikipedia.org/wiki/.pr +est.pr +prof.pr +ac.pr + +// pro : http://www.nic.pro/support_faq.htm +pro +aca.pro +bar.pro +cpa.pro +jur.pro +law.pro +med.pro +eng.pro + +// ps : http://en.wikipedia.org/wiki/.ps +// http://www.nic.ps/registration/policy.html#reg +ps +edu.ps +gov.ps +sec.ps +plo.ps +com.ps +org.ps +net.ps + +// pt : http://online.dns.pt/dns/start_dns +pt +net.pt +gov.pt +org.pt +edu.pt +int.pt +publ.pt +com.pt +nome.pt + +// pw : http://en.wikipedia.org/wiki/.pw +pw +co.pw +ne.pw +or.pw +ed.pw +go.pw +belau.pw + +// py : http://www.nic.py/faq_a.html#faq_b +*.py + +// qa : http://www.qatar.net.qa/services/virtual.htm +*.qa + +// re : http://www.afnic.re/obtenir/chartes/nommage-re/annexe-descriptifs +re +com.re +asso.re +nom.re + +// ro : http://www.rotld.ro/ +ro +com.ro +org.ro +tm.ro +nt.ro +nom.ro +info.ro +rec.ro +arts.ro +firm.ro +store.ro +www.ro + +// rs : http://en.wikipedia.org/wiki/.rs +rs +co.rs +org.rs +edu.rs +ac.rs +gov.rs +in.rs + +// ru : http://www.cctld.ru/ru/docs/aktiv_8.php +// Industry domains +ru +ac.ru +com.ru +edu.ru +int.ru +net.ru +org.ru +pp.ru +// Geographical domains +adygeya.ru +altai.ru +amur.ru +arkhangelsk.ru +astrakhan.ru +bashkiria.ru +belgorod.ru +bir.ru +bryansk.ru +buryatia.ru +cbg.ru +chel.ru +chelyabinsk.ru +chita.ru +chukotka.ru +chuvashia.ru +dagestan.ru +dudinka.ru +e-burg.ru +grozny.ru +irkutsk.ru +ivanovo.ru +izhevsk.ru +jar.ru +joshkar-ola.ru +kalmykia.ru +kaluga.ru +kamchatka.ru +karelia.ru +kazan.ru +kchr.ru +kemerovo.ru +khabarovsk.ru +khakassia.ru +khv.ru +kirov.ru +koenig.ru +komi.ru +kostroma.ru +krasnoyarsk.ru +kuban.ru +kurgan.ru +kursk.ru +lipetsk.ru +magadan.ru +mari.ru +mari-el.ru +marine.ru +mordovia.ru +mosreg.ru +msk.ru +murmansk.ru +nalchik.ru +nnov.ru +nov.ru +novosibirsk.ru +nsk.ru +omsk.ru +orenburg.ru +oryol.ru +palana.ru +penza.ru +perm.ru +pskov.ru +ptz.ru +rnd.ru +ryazan.ru +sakhalin.ru +samara.ru +saratov.ru +simbirsk.ru +smolensk.ru +spb.ru +stavropol.ru +stv.ru +surgut.ru +tambov.ru +tatarstan.ru +tom.ru +tomsk.ru +tsaritsyn.ru +tsk.ru +tula.ru +tuva.ru +tver.ru +tyumen.ru +udm.ru +udmurtia.ru +ulan-ude.ru +vladikavkaz.ru +vladimir.ru +vladivostok.ru +volgograd.ru +vologda.ru +voronezh.ru +vrn.ru +vyatka.ru +yakutia.ru +yamal.ru +yaroslavl.ru +yekaterinburg.ru +yuzhno-sakhalinsk.ru +// More geographical domains +amursk.ru +baikal.ru +cmw.ru +fareast.ru +jamal.ru +kms.ru +k-uralsk.ru +kustanai.ru +kuzbass.ru +magnitka.ru +mytis.ru +nakhodka.ru +nkz.ru +norilsk.ru +oskol.ru +pyatigorsk.ru +rubtsovsk.ru +snz.ru +syzran.ru +vdonsk.ru +zgrad.ru +// State domains +gov.ru +mil.ru +// Technical domains +test.ru + +// rw : http://www.nic.rw/cgi-bin/policy.pl +rw +gov.rw +net.rw +edu.rw +ac.rw +com.rw +co.rw +int.rw +mil.rw +gouv.rw + +// sa : http://www.nic.net.sa/ +sa +com.sa +net.sa +org.sa +gov.sa +med.sa +pub.sa +edu.sa +sch.sa + +// sb : http://www.sbnic.net.sb/ +// Submitted by registry 2008-06-08 +sb +com.sb +edu.sb +gov.sb +net.sb +org.sb + +// sc : http://www.nic.sc/ +sc +com.sc +gov.sc +net.sc +org.sc +edu.sc + +// sd : http://www.isoc.sd/sudanic.isoc.sd/billing_pricing.htm +// Submitted by registry 2008-06-17 +sd +com.sd +net.sd +org.sd +edu.sd +med.sd +gov.sd +info.sd + +// se : http://en.wikipedia.org/wiki/.se +// Submitted by registry 2008-06-24 +se +a.se +ac.se +b.se +bd.se +brand.se +c.se +d.se +e.se +f.se +fh.se +fhsk.se +fhv.se +g.se +h.se +i.se +k.se +komforb.se +kommunalforbund.se +komvux.se +l.se +lanbib.se +m.se +n.se +naturbruksgymn.se +o.se +org.se +p.se +parti.se +pp.se +press.se +r.se +s.se +sshn.se +t.se +tm.se +u.se +w.se +x.se +y.se +z.se + +// sg : http://www.nic.net.sg/sub_policies_agreement/2ld.html +sg +com.sg +net.sg +org.sg +gov.sg +edu.sg +per.sg + +// sh : http://www.nic.sh/rules.html +// list of 2nd level domains ? +sh + +// si : http://en.wikipedia.org/wiki/.si +si + +// sj : No registrations at this time. +// Submitted by registry 2008-06-16 + +// sk : http://en.wikipedia.org/wiki/.sk +// list of 2nd level domains ? +sk + +// sl : http://www.nic.sl +// Submitted by registry 2008-06-12 +sl +com.sl +net.sl +edu.sl +gov.sl +org.sl + +// sm : http://en.wikipedia.org/wiki/.sm +sm + +// sn : http://en.wikipedia.org/wiki/.sn +sn +art.sn +com.sn +edu.sn +gouv.sn +org.sn +perso.sn +univ.sn + +// so : http://www.soregistry.com/ +so +com.so +net.so +org.so + +// sr : http://en.wikipedia.org/wiki/.sr +sr + +// st : http://www.nic.st/html/policyrules/ +st +co.st +com.st +consulado.st +edu.st +embaixada.st +gov.st +mil.st +net.st +org.st +principe.st +saotome.st +store.st + +// su : http://en.wikipedia.org/wiki/.su +su + +// sv : http://www.svnet.org.sv/svpolicy.html +*.sv + +// sy : http://en.wikipedia.org/wiki/.sy +// see also: http://www.gobin.info/domainname/sy.doc +sy +edu.sy +gov.sy +net.sy +mil.sy +com.sy +org.sy + +// sz : http://en.wikipedia.org/wiki/.sz +// http://www.sispa.org.sz/ +sz +co.sz +ac.sz +org.sz + +// tc : http://en.wikipedia.org/wiki/.tc +tc + +// td : http://en.wikipedia.org/wiki/.td +td + +// tel: http://en.wikipedia.org/wiki/.tel +// http://www.telnic.org/ +tel + +// tf : http://en.wikipedia.org/wiki/.tf +tf + +// tg : http://en.wikipedia.org/wiki/.tg +// http://www.nic.tg/nictg/index.php implies no reserved 2nd-level domains, +// although this contradicts wikipedia. +tg + +// th : http://en.wikipedia.org/wiki/.th +// Submitted by registry 2008-06-17 +th +ac.th +co.th +go.th +in.th +mi.th +net.th +or.th + +// tj : http://www.nic.tj/policy.htm +tj +ac.tj +biz.tj +co.tj +com.tj +edu.tj +go.tj +gov.tj +int.tj +mil.tj +name.tj +net.tj +nic.tj +org.tj +test.tj +web.tj + +// tk : http://en.wikipedia.org/wiki/.tk +tk + +// tl : http://en.wikipedia.org/wiki/.tl +tl +gov.tl + +// tm : http://www.nic.tm/rules.html +// list of 2nd level tlds ? +tm + +// tn : http://en.wikipedia.org/wiki/.tn +// http://whois.ati.tn/ +tn +com.tn +ens.tn +fin.tn +gov.tn +ind.tn +intl.tn +nat.tn +net.tn +org.tn +info.tn +perso.tn +tourism.tn +edunet.tn +rnrt.tn +rns.tn +rnu.tn +mincom.tn +agrinet.tn +defense.tn +turen.tn + +// to : http://en.wikipedia.org/wiki/.to +// Submitted by registry 2008-06-17 +to +com.to +gov.to +net.to +org.to +edu.to +mil.to + +// tr : http://en.wikipedia.org/wiki/.tr +*.tr +!nic.tr +// Used by government in the TRNC +// http://en.wikipedia.org/wiki/.nc.tr +gov.nc.tr + +// travel : http://en.wikipedia.org/wiki/.travel +travel + +// tt : http://www.nic.tt/ +tt +co.tt +com.tt +org.tt +net.tt +biz.tt +info.tt +pro.tt +int.tt +coop.tt +jobs.tt +mobi.tt +travel.tt +museum.tt +aero.tt +name.tt +gov.tt +edu.tt + +// tv : http://en.wikipedia.org/wiki/.tv +// Not listing any 2LDs as reserved since none seem to exist in practice, +// Wikipedia notwithstanding. +tv + +// tw : http://en.wikipedia.org/wiki/.tw +tw +edu.tw +gov.tw +mil.tw +com.tw +net.tw +org.tw +idv.tw +game.tw +ebiz.tw +club.tw +網路.tw +組織.tw +商業.tw + +// tz : http://en.wikipedia.org/wiki/.tz +// Submitted by registry 2008-06-17 +// Updated from http://www.tznic.or.tz/index.php/domains.html 2010-10-25 +ac.tz +co.tz +go.tz +mil.tz +ne.tz +or.tz +sc.tz + +// ua : http://www.nic.net.ua/ +ua +com.ua +edu.ua +gov.ua +in.ua +net.ua +org.ua +// ua geo-names +cherkassy.ua +chernigov.ua +chernovtsy.ua +ck.ua +cn.ua +crimea.ua +cv.ua +dn.ua +dnepropetrovsk.ua +donetsk.ua +dp.ua +if.ua +ivano-frankivsk.ua +kh.ua +kharkov.ua +kherson.ua +khmelnitskiy.ua +kiev.ua +kirovograd.ua +km.ua +kr.ua +ks.ua +kv.ua +lg.ua +lugansk.ua +lutsk.ua +lviv.ua +mk.ua +nikolaev.ua +od.ua +odessa.ua +pl.ua +poltava.ua +rovno.ua +rv.ua +sebastopol.ua +sumy.ua +te.ua +ternopil.ua +uzhgorod.ua +vinnica.ua +vn.ua +zaporizhzhe.ua +zp.ua +zhitomir.ua +zt.ua + +// ug : http://www.registry.co.ug/ +ug +co.ug +ac.ug +sc.ug +go.ug +ne.ug +or.ug + +// uk : http://en.wikipedia.org/wiki/.uk +*.uk +*.sch.uk +!bl.uk +!british-library.uk +!icnet.uk +!jet.uk +!mod.uk +!nel.uk +!nhs.uk +!nic.uk +!nls.uk +!national-library-scotland.uk +!parliament.uk +!police.uk + +// us : http://en.wikipedia.org/wiki/.us +us +dni.us +fed.us +isa.us +kids.us +nsn.us +// us geographic names +ak.us +al.us +ar.us +as.us +az.us +ca.us +co.us +ct.us +dc.us +de.us +fl.us +ga.us +gu.us +hi.us +ia.us +id.us +il.us +in.us +ks.us +ky.us +la.us +ma.us +md.us +me.us +mi.us +mn.us +mo.us +ms.us +mt.us +nc.us +nd.us +ne.us +nh.us +nj.us +nm.us +nv.us +ny.us +oh.us +ok.us +or.us +pa.us +pr.us +ri.us +sc.us +sd.us +tn.us +tx.us +ut.us +vi.us +vt.us +va.us +wa.us +wi.us +wv.us +wy.us +// The registrar notes several more specific domains available in each state, +// such as state.*.us, dst.*.us, etc., but resolution of these is somewhat +// haphazard; in some states these domains resolve as addresses, while in others +// only subdomains are available, or even nothing at all. We include the +// most common ones where it's clear that different sites are different +// entities. +k12.ak.us +k12.al.us +k12.ar.us +k12.as.us +k12.az.us +k12.ca.us +k12.co.us +k12.ct.us +k12.dc.us +k12.de.us +k12.fl.us +k12.ga.us +k12.gu.us +// k12.hi.us Hawaii has a state-wide DOE login: bug 614565 +k12.ia.us +k12.id.us +k12.il.us +k12.in.us +k12.ks.us +k12.ky.us +k12.la.us +k12.ma.us +k12.md.us +k12.me.us +k12.mi.us +k12.mn.us +k12.mo.us +k12.ms.us +k12.mt.us +k12.nc.us +k12.nd.us +k12.ne.us +k12.nh.us +k12.nj.us +k12.nm.us +k12.nv.us +k12.ny.us +k12.oh.us +k12.ok.us +k12.or.us +k12.pa.us +k12.pr.us +k12.ri.us +k12.sc.us +k12.sd.us +k12.tn.us +k12.tx.us +k12.ut.us +k12.vi.us +k12.vt.us +k12.va.us +k12.wa.us +k12.wi.us +k12.wv.us +k12.wy.us + +cc.ak.us +cc.al.us +cc.ar.us +cc.as.us +cc.az.us +cc.ca.us +cc.co.us +cc.ct.us +cc.dc.us +cc.de.us +cc.fl.us +cc.ga.us +cc.gu.us +cc.hi.us +cc.ia.us +cc.id.us +cc.il.us +cc.in.us +cc.ks.us +cc.ky.us +cc.la.us +cc.ma.us +cc.md.us +cc.me.us +cc.mi.us +cc.mn.us +cc.mo.us +cc.ms.us +cc.mt.us +cc.nc.us +cc.nd.us +cc.ne.us +cc.nh.us +cc.nj.us +cc.nm.us +cc.nv.us +cc.ny.us +cc.oh.us +cc.ok.us +cc.or.us +cc.pa.us +cc.pr.us +cc.ri.us +cc.sc.us +cc.sd.us +cc.tn.us +cc.tx.us +cc.ut.us +cc.vi.us +cc.vt.us +cc.va.us +cc.wa.us +cc.wi.us +cc.wv.us +cc.wy.us + +lib.ak.us +lib.al.us +lib.ar.us +lib.as.us +lib.az.us +lib.ca.us +lib.co.us +lib.ct.us +lib.dc.us +lib.de.us +lib.fl.us +lib.ga.us +lib.gu.us +lib.hi.us +lib.ia.us +lib.id.us +lib.il.us +lib.in.us +lib.ks.us +lib.ky.us +lib.la.us +lib.ma.us +lib.md.us +lib.me.us +lib.mi.us +lib.mn.us +lib.mo.us +lib.ms.us +lib.mt.us +lib.nc.us +lib.nd.us +lib.ne.us +lib.nh.us +lib.nj.us +lib.nm.us +lib.nv.us +lib.ny.us +lib.oh.us +lib.ok.us +lib.or.us +lib.pa.us +lib.pr.us +lib.ri.us +lib.sc.us +lib.sd.us +lib.tn.us +lib.tx.us +lib.ut.us +lib.vi.us +lib.vt.us +lib.va.us +lib.wa.us +lib.wi.us +lib.wv.us +lib.wy.us + +// k12.ma.us contains school districts in Massachusetts. The 4LDs are +// managed indepedently except for private (PVT), charter (CHTR) and +// parochial (PAROCH) schools. Those are delegated dorectly to the +// 5LD operators. +pvt.k12.ma.us +chtr.k12.ma.us +paroch.k12.ma.us + +// uy : http://www.antel.com.uy/ +*.uy + +// uz : http://www.reg.uz/registerr.html +// are there other 2nd level tlds ? +uz +com.uz +co.uz + +// va : http://en.wikipedia.org/wiki/.va +va + +// vc : http://en.wikipedia.org/wiki/.vc +// Submitted by registry 2008-06-13 +vc +com.vc +net.vc +org.vc +gov.vc +mil.vc +edu.vc + +// ve : http://registro.nic.ve/nicve/registro/index.html +*.ve + +// vg : http://en.wikipedia.org/wiki/.vg +vg + +// vi : http://www.nic.vi/newdomainform.htm +// http://www.nic.vi/Domain_Rules/body_domain_rules.html indicates some other +// TLDs are "reserved", such as edu.vi and gov.vi, but doesn't actually say they +// are available for registration (which they do not seem to be). +vi +co.vi +com.vi +k12.vi +net.vi +org.vi + +// vn : https://www.dot.vn/vnnic/vnnic/domainregistration.jsp +vn +com.vn +net.vn +org.vn +edu.vn +gov.vn +int.vn +ac.vn +biz.vn +info.vn +name.vn +pro.vn +health.vn + +// vu : http://en.wikipedia.org/wiki/.vu +// list of 2nd level tlds ? +vu + +// ws : http://en.wikipedia.org/wiki/.ws +// http://samoanic.ws/index.dhtml +ws +com.ws +net.ws +org.ws +gov.ws +edu.ws + +// IDN ccTLDs +// Please sort by ISO 3166 ccTLD, then punicode string +// when submitting patches and follow this format: +// ("" ) : +// [optional sponsoring org] +// + +// xn--mgbaam7a8h ("Emerat" Arabic) : AE +//http://nic.ae/english/arabicdomain/rules.jsp +امارات + +// xn--54b7fta0cc ("Bangla" Bangla) : BD +বাংলা + +// xn--fiqs8s ("China" Chinese-Han-Simplified <.Zhonggou>) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +中国 + +// xn--fiqz9s ("China" Chinese-Han-Traditional <.Zhonggou>) : CN +// CNNIC +// http://cnnic.cn/html/Dir/2005/10/11/3218.htm +中國 + +// xn--lgbbat1ad8j ("Algeria / Al Jazair" Arabic) : DZ +الجزائر + +// xn--wgbh1c ("Egypt" Arabic .masr) : EG +// http://www.dotmasr.eg/ +مصر + +// xn--node ("ge" Georgian (Mkhedruli)) : GE +გე + +// xn--j6w193g ("Hong Kong" Chinese-Han) : HK +// https://www2.hkirc.hk/register/rules.jsp +香港 + +// xn--h2brj9c ("Bharat" Devanagari) : IN +// India +भारत + +// xn--mgbbh1a71e ("Bharat" Arabic) : IN +// India +بھارت + +// xn--fpcrj9c3d ("Bharat" Telugu) : IN +// India +భారత్ + +// xn--gecrj9c ("Bharat" Gujarati) : IN +// India +ભારત + +// xn--s9brj9c ("Bharat" Gurmukhi) : IN +// India +ਭਾਰਤ + +// xn--45brj9c ("Bharat" Bengali) : IN +// India +ভারত + +// xn--xkc2dl3a5ee0h ("India" Tamil) : IN +// India +இந்தியா + +// xn--mgba3a4f16a ("Iran" Persian) : IR +ایران + +// xn--mgba3a4fra ("Iran" Arabic) : IR +ايران + +//xn--mgbayh7gpa ("al-Ordon" Arabic) JO +//National Information Technology Center (NITC) +//Royal Scientific Society, Al-Jubeiha +الاردن + +// xn--3e0b707e ("Republic of Korea" Hangul) : KR +한국 + +// xn--fzc2c9e2c ("Lanka" Sinhalese-Sinhala) : LK +// http://nic.lk +ලංකා + +// xn--xkc2al3hye2a ("Ilangai" Tamil) : LK +// http://nic.lk +இலங்கை + +// xn--mgbc0a9azcg ("Morocco / al-Maghrib" Arabic) : MA +المغرب + +// xn--mgb9awbf ("Oman" Arabic) : OM +عمان + +// xn--ygbi2ammx ("Falasteen" Arabic) : PS +// The Palestinian National Internet Naming Authority (PNINA) +// http://www.pnina.ps +فلسطين + +// xn--90a3ac ("srb" Cyrillic) : RS +срб + +// xn--p1ai ("rf" Russian-Cyrillic) : RU +// http://www.cctld.ru/en/docs/rulesrf.php +рф + +// xn--wgbl6a ("Qatar" Arabic) : QA +// http://www.ict.gov.qa/ +قطر + +// xn--mgberp4a5d4ar ("AlSaudiah" Arabic) : SA +// http://www.nic.net.sa/ +السعودية + +// xn--mgberp4a5d4a87g ("AlSaudiah" Arabic) variant : SA +السعودیة + +// xn--mgbqly7c0a67fbc ("AlSaudiah" Arabic) variant : SA +السعودیۃ + +// xn--mgbqly7cvafr ("AlSaudiah" Arabic) variant : SA +السعوديه + +// xn--ogbpf8fl ("Syria" Arabic) : SY +سورية + +// xn--mgbtf8fl ("Syria" Arabic) variant : SY +سوريا + +// xn--yfro4i67o Singapore ("Singapore" Chinese-Han) : SG +新加坡 + +// xn--clchc0ea0b2g2a9gcd ("Singapore" Tamil) : SG +சிங்கப்பூர் + +// xn--o3cw4h ("Thai" Thai) : TH +// http://www.thnic.co.th +ไทย + +// xn--pgbs0dh ("Tunis") : TN +// http://nic.tn +تونس + +// xn--kpry57d ("Taiwan" Chinese-Han-Traditional) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +台灣 + +// xn--kprw13d ("Taiwan" Chinese-Han-Simplified) : TW +// http://www.twnic.net/english/dn/dn_07a.htm +台湾 + +// xn--nnx388a ("Taiwan") variant : TW +臺灣 + +// xn--j1amh ("ukr" Cyrillic) : UA +укр + +// xn--mgb2ddes ("AlYemen" Arabic) : YE +اليمن + +// xxx : http://icmregistry.com +xxx + +// ye : http://www.y.net.ye/services/domain_name.htm +*.ye + +// yu : http://www.nic.yu/pravilnik-e.html +*.yu + +// za : http://www.zadna.org.za/slds.html +*.za + +// zm : http://en.wikipedia.org/wiki/.zm +*.zm + +// zw : http://en.wikipedia.org/wiki/.zw +*.zw + +// DynDNS.com Dynamic DNS zones : http://www.dyndns.com/services/dns/dyndns/ +dyndns-at-home.com +dyndns-at-work.com +dyndns-blog.com +dyndns-free.com +dyndns-home.com +dyndns-ip.com +dyndns-mail.com +dyndns-office.com +dyndns-pics.com +dyndns-remote.com +dyndns-server.com +dyndns-web.com +dyndns-wiki.com +dyndns-work.com +dyndns.biz +dyndns.info +dyndns.org +dyndns.tv +at-band-camp.net +ath.cx +barrel-of-knowledge.info +barrell-of-knowledge.info +better-than.tv +blogdns.com +blogdns.net +blogdns.org +blogsite.org +boldlygoingnowhere.org +broke-it.net +buyshouses.net +cechire.com +dnsalias.com +dnsalias.net +dnsalias.org +dnsdojo.com +dnsdojo.net +dnsdojo.org +does-it.net +doesntexist.com +doesntexist.org +dontexist.com +dontexist.net +dontexist.org +doomdns.com +doomdns.org +dvrdns.org +dyn-o-saur.com +dynalias.com +dynalias.net +dynalias.org +dynathome.net +dyndns.ws +endofinternet.net +endofinternet.org +endoftheinternet.org +est-a-la-maison.com +est-a-la-masion.com +est-le-patron.com +est-mon-blogueur.com +for-better.biz +for-more.biz +for-our.info +for-some.biz +for-the.biz +forgot.her.name +forgot.his.name +from-ak.com +from-al.com +from-ar.com +from-az.net +from-ca.com +from-co.net +from-ct.com +from-dc.com +from-de.com +from-fl.com +from-ga.com +from-hi.com +from-ia.com +from-id.com +from-il.com +from-in.com +from-ks.com +from-ky.com +from-la.net +from-ma.com +from-md.com +from-me.org +from-mi.com +from-mn.com +from-mo.com +from-ms.com +from-mt.com +from-nc.com +from-nd.com +from-ne.com +from-nh.com +from-nj.com +from-nm.com +from-nv.com +from-ny.net +from-oh.com +from-ok.com +from-or.com +from-pa.com +from-pr.com +from-ri.com +from-sc.com +from-sd.com +from-tn.com +from-tx.com +from-ut.com +from-va.com +from-vt.com +from-wa.com +from-wi.com +from-wv.com +from-wy.com +ftpaccess.cc +fuettertdasnetz.de +game-host.org +game-server.cc +getmyip.com +gets-it.net +go.dyndns.org +gotdns.com +gotdns.org +groks-the.info +groks-this.info +ham-radio-op.net +here-for-more.info +hobby-site.com +hobby-site.org +home.dyndns.org +homedns.org +homeftp.net +homeftp.org +homeip.net +homelinux.com +homelinux.net +homelinux.org +homeunix.com +homeunix.net +homeunix.org +iamallama.com +in-the-band.net +is-a-anarchist.com +is-a-blogger.com +is-a-bookkeeper.com +is-a-bruinsfan.org +is-a-bulls-fan.com +is-a-candidate.org +is-a-caterer.com +is-a-celticsfan.org +is-a-chef.com +is-a-chef.net +is-a-chef.org +is-a-conservative.com +is-a-cpa.com +is-a-cubicle-slave.com +is-a-democrat.com +is-a-designer.com +is-a-doctor.com +is-a-financialadvisor.com +is-a-geek.com +is-a-geek.net +is-a-geek.org +is-a-green.com +is-a-guru.com +is-a-hard-worker.com +is-a-hunter.com +is-a-knight.org +is-a-landscaper.com +is-a-lawyer.com +is-a-liberal.com +is-a-libertarian.com +is-a-linux-user.org +is-a-llama.com +is-a-musician.com +is-a-nascarfan.com +is-a-nurse.com +is-a-painter.com +is-a-patsfan.org +is-a-personaltrainer.com +is-a-photographer.com +is-a-player.com +is-a-republican.com +is-a-rockstar.com +is-a-socialist.com +is-a-soxfan.org +is-a-student.com +is-a-teacher.com +is-a-techie.com +is-a-therapist.com +is-an-accountant.com +is-an-actor.com +is-an-actress.com +is-an-anarchist.com +is-an-artist.com +is-an-engineer.com +is-an-entertainer.com +is-by.us +is-certified.com +is-found.org +is-gone.com +is-into-anime.com +is-into-cars.com +is-into-cartoons.com +is-into-games.com +is-leet.com +is-lost.org +is-not-certified.com +is-saved.org +is-slick.com +is-uberleet.com +is-very-bad.org +is-very-evil.org +is-very-good.org +is-very-nice.org +is-very-sweet.org +is-with-theband.com +isa-geek.com +isa-geek.net +isa-geek.org +isa-hockeynut.com +issmarterthanyou.com +isteingeek.de +istmein.de +kicks-ass.net +kicks-ass.org +knowsitall.info +land-4-sale.us +lebtimnetz.de +leitungsen.de +likes-pie.com +likescandy.com +merseine.nu +mine.nu +misconfused.org +mypets.ws +myphotos.cc +neat-url.com +office-on-the.net +on-the-web.tv +podzone.net +podzone.org +readmyblog.org +saves-the-whales.com +scrapper-site.net +scrapping.cc +selfip.biz +selfip.com +selfip.info +selfip.net +selfip.org +sells-for-less.com +sells-for-u.com +sells-it.net +sellsyourhome.org +servebbs.com +servebbs.net +servebbs.org +serveftp.net +serveftp.org +servegame.org +shacknet.nu +simple-url.com +space-to-rent.com +stuff-4-sale.org +stuff-4-sale.us +teaches-yoga.com +thruhere.net +traeumtgerade.de +webhop.biz +webhop.info +webhop.net +webhop.org +worse-than.tv +writesthisblog.com diff --git a/etc/refcards/orgcard.pdf b/etc/refcards/orgcard.pdf index 201bb892dc0..3bedb6f2cf5 100644 Binary files a/etc/refcards/orgcard.pdf and b/etc/refcards/orgcard.pdf differ diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex index d78f2a38021..d06afca8083 100644 --- a/etc/refcards/orgcard.tex +++ b/etc/refcards/orgcard.tex @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{7.8.07} +\def\orgversionnumber{7.8.09} \def\versionyear{2012} % latest update \def\year{2012} % latest copyright year diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index aad382de6d0..fc6d905cfb2 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,28 @@ +2012-04-20 Chong Yidong + + * emacsclient.c (decode_options): Move -t -n corner case handling + into server.el (Bug#11102). + (main): Send -tty to Emacs under more circumstanced (Bug#8314). + +2012-04-18 Paul Eggert + + configure: new option --enable-gcc-warnings (Bug#11207) + * Makefile.in (C_WARNINGS_SWITCH): Remove. + (WARN_CFLAGS, WERROR_CFLAGS): New macros. + (BASE_CFLAGS): Use new macros rather than old. + +2012-04-16 Paul Eggert + + Assume less-ancient POSIX support. + * update-game-score.c: Include rather than rolling our + own decls for optarg, optind, opterr. See + . + +2012-04-14 Juanma Barranquero + + * emacsclient.c (decode_options) [WINDOWSNT]: + Call ttyname instead of passing its address (typo in 2011-12-04T17:13:01Z!lekktu@gmail.com). + 2012-04-07 Eli Zaretskii * makefile.w32-in (obj): Add xml.o. @@ -62,7 +87,7 @@ * makefile.w32-in (LOCAL_FLAGS): Add $(EMACS_EXTRA_C_FLAGS). * emacsclient.c (main) : Remove declaration, already - pulled in by unistd.h on Posix hosts and stdlib.h on MS-Windows. + pulled in by unistd.h on POSIX hosts and stdlib.h on MS-Windows. 2011-11-24 Glenn Morris @@ -6646,7 +6671,7 @@ 1993-08-25 Paul Eggert (eggert@twinsun.com) - * rcs2log: Change /{/ to /\{/ for Posix ERE compatibility; + * rcs2log: Change /{/ to /\{/ for POSIX ERE compatibility; otherwise, HP awk complains. * vcdiff: Append /usr/ccs/bin and /usr/sccs to PATH, since these @@ -6993,7 +7018,7 @@ * rcs2log: mawk, SunOS 4.1.3 nawk, and Ultrix/MKS nawk all barf on /[/]/, so change it to /[\/]/. This should work on all - Posix-compliant awks. It's slightly wrong with traditional awk, + POSIX-compliant awks. It's slightly wrong with traditional awk, since it matches \ too, but that's a minor problem compared to awk syntax errors. diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index cc1757e4e3b..6732030a648 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -36,8 +36,9 @@ configuration=@configuration@ EXEEXT=@EXEEXT@ C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ -C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ +WARN_CFLAGS = @WARN_CFLAGS@ +WERROR_CFLAGS = @WERROR_CFLAGS@ # Program name transformation. TRANSFORM = @program_transform_name@ @@ -167,7 +168,8 @@ LIBS_SYSTEM = @LIBS_SYSTEM@ # Those files shared with other GNU utilities need HAVE_CONFIG_H # defined before they know they can take advantage of the information # in ../src/config.h. -BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) ${C_WARNINGS_SWITCH} \ +BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ -DHAVE_CONFIG_H -I. -I../src -I../lib \ -I${srcdir} -I${srcdir}/../src -I${srcdir}/../lib diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 049886ed2ba..ea55398306b 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -638,32 +638,23 @@ decode_options (int argc, char **argv) if (display && strlen (display) == 0) display = NULL; -#ifdef WINDOWSNT - /* Emacs on Windows does not support GUI and console frames in the same - instance. So, it makes sense to treat the -t and -c options as - equivalent, and open a new frame regardless of whether the running - instance is GUI or console. Ideally, we would only set tty = 1 when - the instance is running in a console, but alas we don't know that. - The simplest workaround is to always ask for a tty frame, and let - server.el check whether it makes sense. */ - if (tty || !current_frame) - { - display = (const char *) ttyname; - current_frame = 0; - tty = 1; - } -#endif - /* If no display is available, new frames are tty frames. */ if (!current_frame && !display) tty = 1; - /* --no-wait implies --current-frame on ttys when there are file - arguments or expressions given. */ - if (nowait && tty && argc - optind > 0) - current_frame = 1; - #ifdef WINDOWSNT + /* Emacs on Windows does not support graphical and text terminal + frames in the same instance. So, treat the -t and -c options as + equivalent, and open a new frame on the server's terminal. + Ideally, we would only set tty = 1 when the serve is running in a + console, but alas we don't know that. As a workaround, always + ask for a tty frame, and let server.el figure it out. */ + if (!current_frame) + { + display = NULL; + tty = 1; + } + if (alternate_editor && alternate_editor[0] == '\0') { message (TRUE, "--alternate-editor argument or ALTERNATE_EDITOR variable cannot be\n\ @@ -1667,10 +1658,10 @@ main (int argc, char **argv) send_to_emacs (emacs_socket, " "); } - /* If using the current frame, send tty information to Emacs anyway. - In daemon mode, Emacs may need to occupy this tty if no other - frame is available. */ - if (tty || (current_frame && !eval)) + /* Unless we are certain we don't want to occupy the tty, send our + tty information to Emacs. For example, in daemon mode Emacs may + need to occupy this tty if no other frame is available. */ + if (!current_frame || !eval) { const char *tty_type, *tty_name; diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index a32bd6d8d78..e0c940510be 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -46,10 +46,7 @@ along with GNU Emacs. If not, see . */ #include #endif #include - -/* Needed for SunOS4, for instance. */ -extern char *optarg; -extern int optind, opterr; +#include static int usage (int err) NO_RETURN; diff --git a/lib/Makefile.am b/lib/Makefile.am index 220ba713d4e..716510aff92 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -4,6 +4,7 @@ MOSTLYCLEANDIRS = MOSTLYCLEANFILES = noinst_LIBRARIES = +AM_CFLAGS = $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) DEFAULT_INCLUDES = -I. -I../src -I$(top_srcdir)/src include gnulib.mk diff --git a/lib/gnulib.mk b/lib/gnulib.mk index 154ae9882da..153ea11efe4 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat manywarnings mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat warnings MOSTLYCLEANFILES += core *.stackdump diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 954daf68510..2ffd9ce77a8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,710 @@ +2012-04-21 Juanma Barranquero + + * progmodes/verilog-mode.el (verilog-mode): Check whether + which-func-modes is t before adding verilog-mode. + Reported by Andy Moreton . + +2012-04-21 Leo Liu + + * net/rcirc.el (rcirc): Avoid error when process-contact returns t. + +2012-04-21 Michael Vehrs + + * woman.el: Add support for "T{ T}" tbl syntax, and fix the + filling of the last column of a table (Bug#5635). + (woman-find-next-control-line): New arg, specifying an additional + regexp component for the control line. + (woman2-roff-buffer): Use it. + (woman-break-table): New function. + (woman2-TS): Use it. + +2012-04-21 Chong Yidong + + * woman.el (woman-set-buffer-display-table, woman-decode-region) + (woman-horizontal-escapes, woman-negative-vertical-space) + (woman-tab-to-tab-stop, woman2-fc, woman2-TS) + (WoMan-warn-ignored): Use ?\s instead of ?\ . + +2012-04-20 Stefan Monnier + + * minibuffer.el (completion-file-name-table): Complete user names. + +2012-04-20 Leo Liu + + * font-lock.el (lisp-font-lock-keywords-2): Add pcase, pcase-let + and pcase-let*. + +2012-04-20 Chong Yidong + + * server.el (server-execute): Respect initial-buffer-choice if it + is a string and there are no files to open (Bug#2825). + (server-create-window-system-frame, server-create-tty-frame): + Don't switch buffers here. + (server-process-filter): Only try to open a window system frame if + compiled with graphical support (Bug#8314). + +2012-04-20 Dan Nicolaescu + + * battery.el (battery-echo-area-format): Display remaining time + for sysfs backend too (Bug#11269). + (battery-linux-sysfs): Fix conditional for the charge. + +2012-04-20 Chong Yidong + + * progmodes/gdb-mi.el (gdb): Revert previous change. + (gdb-inferior-io--init-proc): New function. + (gdb-init-1): Use it. + (gdb-inferior-io-sentinel): New sentinel for the gdb-inferior pty, + responsible for allocating a new pty and hooking it to gdb when + the old pty gets an EIO due to process exit. + (gdb-delchar-or-quit): New command. Bind it in gdb-mi buffers. + (gdb-tooltip-print): Don't use obsolete tooltip-use-echo-area. + (gdb-inferior-io--maybe-delete-pty): Move into gdb-reset. + +2012-04-20 Eli Zaretskii + + * window.el (window-min-size, window-sizable, window-min-delta) + (window-max-delta, window--resizable, window-resizable) + (window-total-size, window-full-height-p, window-full-width-p) + (window-in-direction, window--resize-mini-window, window-resize) + (window--resize-child-windows-normal) + (window--resize-child-windows, window--resize-siblings) + (window--resize-this-window, adjust-window-trailing-edge) + (enlarge-window, shrink-window): Doc fixes. + +2012-04-20 Chong Yidong + + * progmodes/gdb-mi.el (gdb-inferior-io--maybe-delete-pty): New + function to call delete-process on the gdb-inferior buffer's pty. + (gdb-reset): Use it, instead of relying on kill-buffer to kill the + pty process (Bug#11273). + (gdb-update): New arg to suppress talking to the gdb process. + (gdb-done-or-error): Use it. + (gdb-stopped-functions): Rename from gdb-stopped-hooks. + (gdb): Call gdb-inferior-io--maybe-delete-pty as a workaround for + sentinel not being called. + + * comint.el (make-comint-in-buffer, comint-exec): Doc fix. + + * progmodes/grep.el (grep, rgrep): Doc fix (Bug#11268). + +2012-04-20 Glenn Morris + + * net/network-stream.el (open-network-stream): Doc fix. + +2012-04-20 Chong Yidong + + * emacs-lisp/tabulated-list.el (tabulated-list-print): Fix typos. + +2012-04-20 Alan Mackenzie + + Ensure searching for keywords is case sensitive. + + * progmodes/cc-cmds.el (c-electric-brace, c-electric-lt-gt) + (c-electric-paren, c-beginning-of-defun, c-end-of-defun) + (c-defun-name, c-mark-function, c-cpp-define-name) + (c-comment-indent, c-scan-conditionals, c-indent-defun) + (c-context-line-break): Bind case-fold-search to nil. + + * progmodes/cc-mode.el (c-font-lock-fontify-region): Bind + case-fold-search to nil. + +2012-04-20 Chong Yidong + + * mail/sendmail.el (mail-bury): Call return action with the right + Rmail buffer (Bug#11242). + + * server.el (server-process-filter): Handle corner case where both + tty and nowait options are present (Bug#11102). + +2012-04-20 Eli Zaretskii + + * version.el (emacs-bzr-version, emacs-bzr-get-version): Doc fixes. + (top level): Put into the executable the ident-style '$Id:' tag on + windows-nt as well. + +2012-04-19 Stefan Monnier + + * electric.el (electric-indent-post-self-insert-function): Check that + electric-indent-mode is enabled in current buffer. + +2012-04-19 Juanma Barranquero + + * imenu.el (imenu-progress-message): Restore; it is "used" in + erc/erc-imenu.el and net/snmp-mode.el. + +2012-04-19 Juanma Barranquero + + * avoid.el (mouse-avoidance-mode): Mark unused arg. + (mouse-avoidance-nudge-mouse): Remove unused binding. + + * bs.el (bs-toggle-readonly): Call `toggle-read-only' interactively. + + * descr-text.el (describe-char): + * progmodes/python.el (python-describe-symbol): + Don't call `toggle-read-only', set `buffer-read-only'. + + * imenu.el (imenu-default-goto-function): Mark unused args. + (imenu-progress-message): Remove obsolete macro; all callers changed. + + * subr.el (keymap-canonicalize): Remove unused binding. + (read-passwd): Mark unused arg. + + * tutorial.el (tutorial--display-changes): Remove unused binding. + (tutorial--save-tutorial-to): Remove unused variable. + + * emacs-lisp/package.el (define-package, package-menu-mark-delete) + (package-menu-mark-install, package-menu-mark-unmark): Mark unused args. + (package-generate-autoloads, package-menu--generate) + (package-menu--find-upgrades): Remove unused bindings. + + * emulation/cua-rect.el (cua-restrict-regexp-rectangle) + (cua-restrict-prefix-rectangle): Doc fixes. Remove unused bindings. + (cua--mouse-ignore, cua--delete-rectangle, cua--extract-rectangle) + (cua--indent-rectangle, cua-open-rectangle, cua-close-rectangle) + (cua-blank-rectangle, cua-string-rectangle, cua-replace-in-rectangle) + (cua-incr-rectangle, cua-sequence-rectangle, cua--convert-rectangle-as) + (cua--rectangle-aux-replace, cua--left-fill-rectangle) + (cua-scroll-rectangle-up, cua-scroll-rectangle-down) + (cua-delete-char-rectangle): Mark unused args. + (cua-align-rectangle): Remove unused binding. + + * mail/rmail.el (compilation--message->loc) + (epa--find-coding-system-for-mime-charset): Declare. + + * net/dbus.el (dbus-register-service): Declare. + (dbus-name-owner-changed-handler): Remove unused binding. + + * nxml/nxml-mode.el (nxml-electric-slash, nxml-in-mixed-content-p) + (nxml-compute-indent-from-matching-start-tag): Remove unused variables. + (nxml-scan-backward-within): Mark unused arg. + (nxml-dynamic-markup-word): Remove unused binding. + + * mouse.el (mouse-menu-major-mode-map): + * emacs-lisp/authors.el (authors-scan-change-log) + (authors-add-to-author-list): + * emacs-lisp/avl-tree.el (avl-tree--enter-balance): + * emacs-lisp/smie.el (smie-auto-fill): + * mail/sendmail.el (mail-bury): + * mail/unrmail.el (unrmail): + * net/tls.el (open-tls-stream): + * textmodes/picture.el (picture-mouse-set-point): + Remove unused bindings. + +2012-04-19 Michael Albinus + + * net/tramp.el (tramp-action-password): Let-bind + `enable-recursive-minibuffers' to t. + +2012-04-18 Sam Steingold + + * progmodes/gud.el (gud-key-prefix): Use :type 'key-sequence + instead of 'string to accommodate values like [f11]. + Always use `vconcat' instead of `concat' on it, like in `gud-def'. + * progmodes/gdb-mi.el: Likewise. + +2012-04-18 Leo Liu + + * abbrev.el (edit-abbrevs): Move point to the abbrev table of + current buffer. + (prepare-abbrev-list-buffer): Enter edit-abbrevs-mode only if + LOCAL is nil. + +2012-04-18 Chong Yidong + + * simple.el (line-move): Use forward-line if in batch mode + (Bug#11053). + +2012-04-18 Christopher Schmidt + + * files.el (after-find-file): Do not try to add a final newline if + the buffer is read-only (Bug#11156). + +2012-04-17 Richard Stallman + + * mail/rmail.el (rmail-start-mail): + Pass (rmail-mail-return...) for the return-action. + Pass (rmail-yank-current-message...) for the yank-action. + (rmail-yank-current-message): New function. + (rmail-mail): Pass the Rmail buffer, not view buffer, for replybuffer. + (rmail-reply): Likewise. + (rmail-forward): Pass the Rmail buffer, not nil, for replybuffer. + + * mail/sendmail.el (mail-bury): Choose the first rmail-mode + buffer, not the last. Reject temp buffers. Use the rmail-mode + buffer, not newbuf. + +2012-04-17 Juanma Barranquero + + * server.el (server-ensure-safe-dir): Simplify. + +2012-04-17 Stefan Monnier + + * emacs-lisp/smie.el: Provide smarter auto-filling. + (smie-auto-fill): New function. + (smie-setup): Use it. + + * newcomment.el (comment-choose-indent): Obey comment-inline-offset. + +2012-04-17 Philipp Haselwarter (tiny change) + + * newcomment.el (comment-inline-offset): New custom var (bug#11090). + (comment-indent): Use it. + +2012-04-17 Vincent Belaïche + + * ses.el: The overall change is to add cell renaming, that is + setting fancy names for cell symbols other than name matching + "\\`[A-Z]+[0-9]+\\'" regexp . + (ses-localvars): Add ses--renamed-cell-symb-list. + (ses-create-cell-variable): New defun. + (ses-destroy-cell-variable-range): Respect ses--numrows, ses--numcols. + (ses-relocate-formula): Relocate formulas only for cells the + symbols of which are not renamed, i.e. symbols whose names do not + match regexp "\\`[A-Z]+[0-9]+\\'". + (ses-relocate-all): Relocate values only for cells the symbols of + which are not renamed. + (ses-load): Create cells variables as the (ses-cell ...) are read, + in order to check row col consistency with cell symbol name only + for cells that are not renamed. + (ses-replace-name-in-formula): New defun. + (ses-rename-cell): New defun. + +2012-04-17 Peter Oliver (tiny change) + + * progmodes/perl-mode.el (perl-indent-parens-as-block): + New option (bug#11118). + (perl-calculate-indent): Respect it. + +2012-04-17 Glenn Morris + + * dired-aux.el (dired-mark-read-string): Doc fix. + +2012-04-17 Dmitry Antipov + + * dired-aux.el (dired-mark-read-string): Offer optional completion. + (dired-do-chxxx): Complete chown, chgrp over users, groups. (Bug#7900) + +2012-04-17 Glenn Morris + + * mouse.el (mouse-drag-track): + * speedbar.el (speedbar-frame-mode): + Use auto-hscroll-mode rather than the alias automatic-hscrolling. + +2012-04-16 Leo Liu + + * progmodes/python.el: Trivial cleanup. + +2012-04-16 Glenn Morris + + * vc/vc.el (vc-string-prefix-p): + * vc/pcvs-util.el (cvs-string-prefix-p): + * textmodes/tex-mode.el (latex-string-prefix-p, tex-string-prefix-p): + * mpc.el (mpc-string-prefix-p): + Make all of these into obsolete aliases for string-prefix-p. + Update callers. + * vc/pcvs.el, vc/vc-dispatcher.el, vc/vc-dir.el: Update callers. + + * textmodes/two-column.el: Move custom options to the start. + (frame-width): Remove compat definition. + (2C-associate-buffer, 2C-dissociate): + Use with-current-buffer rather than save-excursion. + (2C-dissociate): Force a mode-line update. + (2C-autoscroll): Use ignore-errors. + + * emacs-lisp/eieio-opt.el (describe-class, describe-generic): + Autoload trivia. + + * emacs-lisp/cl-extra.el (*random-state*): + Remove unnecessary declaration. + + * calendar/cal-tex.el (cal-tex-end-document): Trivial clarification. + + * play/cookie1.el (cookie-snarf): + Give an explicit error if input file cannot be read. + + * play/yow.el (yow-file): Use expand-file-name rather than concat. + + * progmodes/perl-mode.el (c-macro-expand): + Remove unnecessary autoload (it is in loaddefs.el). + + * textmodes/picture.el (picture-desired-column) + (picture-update-desired-column): Convert comments to doc-strings. + (picture-substitute): Remove function. + (picture-mode-map): Initialize in the defvar. + + * woman.el: Remove eval-after-load for tar-mode. + * tar-mode.el (tar-mode-map): Add woman binding and menu entry. + (woman-tar-extract-file): Autoload it. + + * frame.el (automatic-hscrolling): Make this alias obsolete. + +2012-04-12 Agustín Martín Domingo + + * ispell.el (ispell-set-spellchecker-params): Post-process + `ispell-dictionary-alist' to use [:alpha:] and utf-8 if possible. + (ispell-dictionary-base-alist): Revert to original XEmacs + friendly version for default. [:alpha:] will be added in + `ispell-set-spellchecker-params' if needed + +2012-04-16 Chong Yidong + + * image.el (imagemagick--extension-regexp): New variable. + (imagemagick-register-types): Use it. + (imagemagick-types-inhibit): Add :set function. Allow new value + of t to inhibit all types. + + * emacs-lisp/regexp-opt.el (regexp-opt-charset): Avoid cl macros, + so we can preload it. + + * loadup.el (fboundp): Preload regexp-opt, needed by + imagemagick-register-types. + +2012-04-15 Chong Yidong + + * frame.el (scrolling): Remove nearly unused customization group. + + * scroll-all.el (scroll-all-mode): Move to windows group. + +2012-04-15 Chong Yidong + + * bindings.el (goto-map): Bind goto-char to M-g c (Bug#11240). + +2012-04-15 Stefan Monnier + + Avoid the use of ((lambda ...) ...) in lexical-binding code. + * emacs-lisp/easy-mmode.el (define-minor-mode): Use funcall (bug#11241). + +2012-04-15 Glenn Morris + + * simple.el (process-file-side-effects): Doc fix. + +2012-04-15 Glenn Morris + + * international/mule-cmds.el (set-language-environment): Doc fix. + +2012-04-14 Juanma Barranquero + + * server.el (server-auth-key, server-generate-key): Doc fixes. + (server-get-auth-key): Doc fix. Use `string-match-p'. + (server-start): Reflow docstring. + +2012-04-14 Lars Ingebrigtsen + + * server.el (server-generate-key): `called-interactively-p' + requires a parameter. + +2012-04-14 Michal Nazarewicz + + * server.el (server-auth-key): New variable. + (server-generate-key, server-get-auth-key): New function. + (server-start): Use the new variable and functions to allow + setting a permanent server key (bug#9423). + +2012-04-14 Leo Liu + + * vc/diff-mode.el (diff-file-prev/next): Fix typo. + +2012-04-14 Paul Eggert + + Spelling fixes. + * hexl.el (hexl-rulerize): Rename from hexl-rulerise, since + Emacs uses American spelling. + +2012-04-14 Juanma Barranquero + + * emacs-lock.el (emacs-lock-locked-buffer-functions): New hook. + (emacs-lock--exit-locked-buffer): Return the locked buffer. Doc fix. + (emacs-lock--kill-emacs-hook, emacs-lock--kill-emacs-query-functions) + (emacs-lock--kill-buffer-query-functions): Run new hook. (Bug#11017) + +2012-04-14 Stefan Monnier + + * progmodes/which-func.el (which-func-modes): Change default. + +2012-04-14 Kim F. Storm + + * emulation/cua-base.el (cua-exchange-point-and-mark): Just call + exchange-point-and-mark if cua-enable-cua-keys is nil (Bug#11191). + +2012-04-14 Chong Yidong + + * custom.el (custom-theme-set-variables): Doc fix. + +2012-04-14 Glenn Morris + + * international/mule.el (set-auto-coding-for-load): Doc fix. + +2012-04-14 Alan Mackenzie + + * progmodes/cc-menus.el (cc-imenu-objc-generic-expression): Make + imenu work again for Objective C Mode. Correct the *-index values, + these having been disturbed by a previous change in 2011-08. + + * progmodes/cc-engine.el (c-before-change-check-<>-operators): + Correct two search limits. + +2012-04-14 Stefan Monnier + + * startup.el (command-line-1): Inhibit splash from daemon (bug#10996). + +2012-04-14 Andreas Schwab + + * international/characters.el: Fix sorting. + +2012-04-14 Eli Zaretskii + + * international/characters.el: Add more missing Latin case pairs. + +2012-04-14 Glenn Morris + + * files.el (dir-locals-set-class-variables): Doc fix. + +2012-04-14 Eli Zaretskii + + * international/characters.el: Add set-case-syntax-pair call for + LATIN CAPITAL LETTER Y WITH DIAERESIS RET and its lower-case + counterpart. (Bug#11209) + + * simple.el (shell-command-on-region): Doc fix. (Bug#11208) + +2012-04-14 Glenn Morris + + * calendar/holidays.el (calendar-check-holidays): Doc fix. + +2012-04-14 Eli Zaretskii + + * textmodes/ispell.el (ispell-dictionary-base-alist): + Add data for Hebrew. + +2012-04-14 Chong Yidong + + * net/rcirc.el (rcirc-cmd-quit): + Revert 2012-03-18 change (Bug#11192). + +2012-04-14 Glenn Morris + + * pcmpl-rpm.el (pcomplete/rpm): Handle -qf. + +2012-04-14 Eli Zaretskii + + * minibuffer.el (completion-in-region-mode-map): + Bind completion-help-at-point to M-? rather than ?. (Bug#11182) + +2012-04-13 Vivek Dasmohapatra + + * hexl.el (hexl-insert-char): Make display sizes other than 16 work. + +2012-04-13 Masatake YAMATO + + * minibuffer.el (minibuffer-local-filename-syntax): New variable + to allow `C-M-f' and `C-M-b' to move to the nearest path + separator (bug#9511). + +2012-04-13 Lars Ingebrigtsen + + * avoid.el: Require cl when compiling. And also move the + `provide' to the end. + +2012-04-13 Thierry Volpiatto + + * avoid.el (mouse-avoidance-banish-position): New variable. + (mouse-avoidance-banish-destination): Use it (bug#10165). + +2012-04-13 Leo Liu + + * progmodes/which-func.el (which-func-modes): Add objc-mode. + +2012-04-13 Ken Brown + + * net/browse-url.el (browse-url-file-url): Remove Cygwin hack; + this is no longer needed now that cygstart understands file:// URLs. + (browse-url-filename-alist): For the same reason, don't modify + file:// URLs on Cygwin. + +2012-04-13 Stefan Monnier + + * emulation/cua-base.el (cua--pre-command-handler-1): Don't activate + the region on shift if the binding is already shifted (bug#11221). + +2012-04-12 Glenn Morris + + * mail/mailpost.el: Move to obsolete/. + +2012-04-12 Drew Adams + + * imenu.el (imenu--generic-function): Ignore invisible definitions + (bug#10123). + +2012-04-12 Vivek Dasmohapatra + + * hexl.el (hexl-bits): New variable. + (hexl-options): Mention the variable in the doc string. + (hexl-rulerise, hexl-line-displen): New functions. + (hexl-mode): Mention the new variable. + (hexl-mode, hexl-current-address, hexl-current-address): + Use the displen. + (hexl-ascii-start-column): New function. + (hexl-address-to-marker, hexl-beginning-of-line, hexl-options) + (hexl-insert-char, hexl-mode-ruler): Use the displen (bug#4941). + +2012-04-12 Agustín Martín Domingo + + * textmodes/flyspell.el (flyspell-large-region): For hunspell, use + '("-i" ENCODING), in 2 separate command-line arguments, to specify + the encoding, as expected by hunspell. + +2012-04-12 Stefan Monnier + + * battery.el (battery--linux-sysfs-regexp): New const. + (battery-status-function): Use it. Remove yeeloong special case. + (battery-yeeloong-sysfs): Remove. + (battery-echo-area-format): Remove yeeloong special case. + +2012-04-11 Stefan Monnier + + * imenu.el (imenu-add-to-menubar): `current-local-map' can be nil. + Reported by Noah Friedman. + + * subr.el (read-passwd): Use read-string. + +2012-04-11 Lars Magne Ingebrigtsen + + * vcursor.el (vcursor-move): Increase the priority of the overlay + (bug#9663). + +2012-04-11 Deniz Dogan + + * net/rcirc.el (rcirc-kill-channel-buffers): New variable. + (rcirc-kill-buffer-hook): Use it to kill channel buffers (bug#5128). + +2012-04-11 William Stevenson + + * textmodes/artist.el (artist-mode): Convert artist-mode to use + define-minor-mode (bug#10760). + +2012-04-11 Wolfgang Jenkner (tiny change) + + * progmodes/grep.el (rgrep): Tweak the find command line so + that directories matching `grep-find-ignored-files' won't be + pruned (bug#10351). + +2012-04-11 Chong Yidong + + * startup.el (command-line): Remove support for long-obsolete + variable font-lock-face-attributes. + +2012-04-11 Glenn Morris + + * vc/vc-bzr.el (vc-bzr-status): Avoid condition-case-unless-debug. + +2012-04-11 Stefan Monnier + + * window.el (window--state-get-1): Obey window-point-insertion-type. + +2012-04-11 Lennart Borgman + + * emacs-lisp/lisp.el (narrow-to-defun): `beginning-of-defun' goes + to previous function when point is on the first character of a + function. Take care of that in `narrow-to-defun' (bug#6157). + +2012-04-11 Glenn Morris + + * vc/vc-bzr.el (vc-bzr-status): Handle all errors, + not just file-errors. + + * vc/vc-bzr.el (vc-bzr-sha1-program, sha1-program): Remove. + (vc-bzr-sha1): Use internal sha1. + +2012-04-11 Stefan Monnier + + * progmodes/flymake.el (flymake-mode): Beware read-only dirs (bug#8954). + +2012-04-10 Sébastien Gross (tiny change) + + * progmodes/hideshow.el (hs-hide-all): Don't infloop on comments + that start in the middle of the line (bug#10496). + +2012-04-10 Dan Nicolaescu + + * battery.el (battery-linux-proc-acpi): Only one battery is + discharged at a time, but that seems to confuse battery.el when + computing `rate-type' for the battery not being discharged + (bug#10332). + +2012-04-10 Stefan Monnier + + * emacs-lisp/autoload.el (autoload-make-program): Remove, unused. + + * international/quail.el: Use dolist and simplify. + (quail-define-package, quail-update-keyboard-layout) + (quail-define-rules): Use dolist. + (quail-insert-kbd-layout, quail-get-translation): CSE. + + * tmm.el: Use dolist, remove left over hook. + (tmm-prompt, tmm-define-keys, tmm-shortcut, tmm-get-keybind): + Use dolist. + (calendar-load-hook): Don't mess with it. + + * vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): + Use derived-mode-p. Run the diff asynchronously. + +2012-04-10 Lars Magne Ingebrigtsen + + * obsolete/mouse-sel.el: Add an Obsolete-since header. + +2012-04-10 Juanma Barranquero + + * misc.el: Display absolute path of loaded DLLs (bug#10424). + (list-dynamic-libraries--loaded): New function. + (list-dynamic-libraries--refresh): Use it. + +2012-04-10 Nathan Weizenbaum + + * progmodes/python.el (python-fill-paragraph): + Make python-fill-region in a multiline string work when font-lock is + disabled (bug#7018). + +2012-04-10 Laimonas Vėbra (tiny change) + + * language/european.el (cp775): Add oem/legacy (en)coding on + DOS/MS Windows for the Baltic languages. There are still plenty + of texts written in this encoding/codepage (bug#6519). + +2012-04-10 Glenn Morris + + * cus-start.el (eol-mnemonic-unix, eol-mnemonic-dos, eol-mnemonic-mac): + Add :standard values, reducing "rogue" customs in emacs -Q a bit more. + +2012-04-10 Florian Adamsky (tiny change) + + * recentf.el (recentf-dialog-mode-map): Add two keybindings for + next-line "n" and previous-line "p" in order to make recentf more + consistent with ibuffer, dired or org-mode (bug#9387). + +2012-04-10 Lars Magne Ingebrigtsen + + * image.el (put-image): Return the overlay created instead of the + optional input string (bug#7834). Note that this may break code + that is (for some reason or other) depending on `put-image' + returning the string. + + * mouse-sel.el (mouse-sel-mode): Mark as obsolete (bug#6174). + + * simple.el (zap-to-char): Allow zapping using input methods + (bug#1580). + + * textmodes/fill.el (fill-region): Leave point and mark where they + were before filling (bug#5399). + +2012-04-09 Glenn Morris + + * version.el (emacs-bzr-get-version): + Handle lightweight checkouts of local branches. + 2012-04-09 Andreas Schwab - * international/characters.el: Recover lost case pairs. - (Bug#11209) + * international/characters.el: Recover lost case pairs. (Bug#11209) 2012-04-09 Chong Yidong @@ -156,8 +859,8 @@ 2012-03-30 Agustín Martín Domingo * ispell.el (ispell-get-extended-character-mode): Disable - extended-char-mode for hunspell. hunspell does not support it and - treats ~word as ordinary words in pipe mode. + extended-char-mode for hunspell. hunspell does not support it + and treats ~word as ordinary words in pipe mode. 2012-03-30 Glenn Morris @@ -387,7 +1090,7 @@ (hfy-face-to-css-default): Same as the earlier `hfy-face-to-css'. (hfy-face-to-css): Re-defined to be a variable. (hfy-compile-stylesheet): Modify. Allow stylesheet to be built - over multiple runs. This is made possible by having the caller let + over multiple runs. This is made possible by having the caller let bind a special variable `hfy-user-sheet-assoc'. (htmlfontify-string): New defun. (hfy-compile-face-map): Make sure that the last char in the @@ -620,7 +1323,7 @@ 2012-03-09 Michael Albinus - * net/dbus.el: (dbus-property-handler): Return empty array if + * net/dbus.el (dbus-property-handler): Return empty array if there are no properties. 2012-03-09 Leo Liu @@ -955,10 +1658,6 @@ * term/x-win.el (x-initialize-window-system): Reduce default for x-selection-timeout to 5 seconds (Bug#8869). -2012-02-24 Thierry Volpiatto - - * files.el (file-subdir-of-p): Fix typo. - 2012-02-24 Thierry Volpiatto * files.el (files-equal-p, file-subdir-of-p): New functions. @@ -1224,7 +1923,7 @@ 2012-02-12 Alan Mackenzie Fix infinite loop with long macros. - * cc-engine.el (c-state-safe-place): Handle macros properly. + * progmodes/cc-engine.el (c-state-safe-place): Handle macros properly. 2012-02-12 Chong Yidong @@ -1487,11 +2186,10 @@ 2012-02-06 Lars Ingebrigtsen - * progmodes/cc-mode.el - (c-standard-font-lock-fontify-region-function): Set the default at - load time, too, so that `font-lock-fontify-buffer' can be called - without setting up the entire mode first. This fixes a bug in - `mm-inline-text' with C MIME parts. + * progmodes/cc-mode.el (c-standard-font-lock-fontify-region-function): + Set the default at load time, too, so that `font-lock-fontify-buffer' + can be called without setting up the entire mode first. This fixes + a bug in `mm-inline-text' with C MIME parts. 2012-02-06 Chong Yidong diff --git a/lisp/ChangeLog.11 b/lisp/ChangeLog.11 index 0b4e62f9e91..8ea7d40c004 100644 --- a/lisp/ChangeLog.11 +++ b/lisp/ChangeLog.11 @@ -10889,7 +10889,7 @@ 2004-01-29 Jari Aalto * progmodes/executable.el (executable-command-find-posix-p): - New. Check if find handles arguments Posix-style. + New. Check if find handles arguments POSIX-style. * progmodes/grep.el (grep-compute-defaults): Use executable-command-find-posix-p. diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12 index 9611eaa21b4..2361528abb3 100644 --- a/lisp/ChangeLog.12 +++ b/lisp/ChangeLog.12 @@ -12449,7 +12449,7 @@ * calendar/appt.el (diary-selective-display): Add defvar. - * sort.el (sort-columns): Use Posix arg syntax for `sort'. + * sort.el (sort-columns): Use POSIX arg syntax for `sort'. * isearch.el (search-whitespace-regexp): Fix custom type. diff --git a/lisp/ChangeLog.6 b/lisp/ChangeLog.6 index 85301ef78e1..5d79470bd2a 100644 --- a/lisp/ChangeLog.6 +++ b/lisp/ChangeLog.6 @@ -715,7 +715,7 @@ * ediff-diff.el (ediff-setup-fine-diff-regions): Allow diff options to be passed to the diff program. - (ediff-make-diff2-buffer): Don't run Posix diff on remote files. + (ediff-make-diff2-buffer): Don't run POSIX diff on remote files. (ediff-make-diff2-buffer): Refuses to diff remote files. (ediff-make-diff2-buffer, ediff-setup-diff-regions): Changed functions. (ediff-make-diff2-buffer): New function. diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 3845c4ce4e6..7f54d3dc253 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -134,10 +134,13 @@ Otherwise display all abbrevs." (push table empty-tables) (insert-abbrev-table-description table t))) (dolist (table (nreverse empty-tables)) - (insert-abbrev-table-description table t)))) + (insert-abbrev-table-description table t))) + ;; Note: `list-abbrevs' can dispaly only local abbrevs, in + ;; which case editing could lose abbrevs of other tables. Thus + ;; enter `edit-abbrevs-mode' only if LOCAL is nil. + (edit-abbrevs-mode)) (goto-char (point-min)) (set-buffer-modified-p nil) - (edit-abbrevs-mode) (current-buffer)))) (defun edit-abbrevs-mode () @@ -152,7 +155,8 @@ Otherwise display all abbrevs." (defun edit-abbrevs () "Alter abbrev definitions by editing a list of them. -Selects a buffer containing a list of abbrev definitions. +Selects a buffer containing a list of abbrev definitions with +point located in the abbrev table of current buffer. You can edit them and type \\\\[edit-abbrevs-redefine] to redefine abbrevs according to your editing. Buffer contains a header line for each abbrev table, @@ -163,7 +167,12 @@ where NAME and EXPANSION are strings with quotes, USECOUNT is an integer, and HOOK is any valid function or may be omitted (it is usually omitted)." (interactive) - (switch-to-buffer (prepare-abbrev-list-buffer))) + (let ((table-name (abbrev-table-name local-abbrev-table))) + (switch-to-buffer (prepare-abbrev-list-buffer)) + (when (and table-name + (search-forward + (concat "(" (symbol-name table-name) ")\n\n") nil t)) + (goto-char (match-end 0))))) (defun edit-abbrevs-redefine () "Redefine abbrevs according to current buffer contents." diff --git a/lisp/avoid.el b/lisp/avoid.el index 17d99fd6517..bfe15de0ca2 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -67,7 +67,7 @@ ;;; Code: -(provide 'avoid) +(eval-when-compile (require 'cl)) (defgroup avoid nil "Make mouse pointer stay out of the way of editing." @@ -80,7 +80,7 @@ See function `mouse-avoidance-mode' for possible values. Setting this variable directly does not take effect; use either \\[customize] or the function `mouse-avoidance-mode'." - :set (lambda (symbol value) + :set (lambda (_symbol value) ;; 'none below prevents toggling when value is nil. (mouse-avoidance-mode (or value 'none))) :initialize 'custom-initialize-default @@ -115,6 +115,23 @@ Only applies in Mouse Avoidance modes `animate' and `jump'." :type 'integer :group 'avoid) +(defcustom mouse-avoidance-banish-position '((frame-or-window . frame) + (side . right) + (side-pos . 3) + (top-or-bottom . top) + (top-or-bottom-pos . 0)) + "Position to which Mouse Avoidance mode `banish' moves the mouse. +An alist where keywords mean: +FRAME-OR-WINDOW: banish the mouse to corner of frame or window. +SIDE: banish the mouse on right or left corner of frame or window. +SIDE-POS: Distance from right or left edge of frame or window. +TOP-OR-BOTTOM: banish the mouse to top or bottom of frame or window. +TOP-OR-BOTTOM-POS: Distance from top or bottom edge of frame or window." + :group 'avoid + :type '(alist :key-type symbol :value-type symbol) + :options '(frame-or-window side (side-pos integer) + top-or-bottom (top-or-bottom-pos integer))) + ;; Internal variables (defvar mouse-avoidance-state nil) (defvar mouse-avoidance-pointer-shapes nil) @@ -183,13 +200,45 @@ Acceptable distance is defined by `mouse-avoidance-threshold'." (defun mouse-avoidance-banish-destination () "The position to which Mouse Avoidance mode `banish' moves the mouse. -You can redefine this if you want the mouse banished to a different corner." - (let* ((pos (window-edges))) - (cons (- (nth 2 pos) 2) - (nth 1 pos)))) + +If you want the mouse banished to a different corner set +`mouse-avoidance-banish-position' as you need." + (let* ((fra-or-win (assoc-default + 'frame-or-window + mouse-avoidance-banish-position 'eq)) + (list-values (case fra-or-win + (frame (list 0 0 (frame-width) (frame-height))) + (window (window-edges)))) + (alist (loop for v in list-values + for k in '(left top right bottom) + collect (cons k v))) + (side (assoc-default + 'side + mouse-avoidance-banish-position 'eq)) + (side-dist (assoc-default + 'side-pos + mouse-avoidance-banish-position 'eq)) + (top-or-bottom (assoc-default + 'top-or-bottom + mouse-avoidance-banish-position 'eq)) + (top-or-bottom-dist (assoc-default + 'top-or-bottom-pos + mouse-avoidance-banish-position 'eq)) + (side-fn (case side + (left '+) + (right '-))) + (top-or-bottom-fn (case top-or-bottom + (top '+) + (bottom '-)))) + (cons (funcall side-fn ; -/+ + (assoc-default side alist 'eq) ; right or left + side-dist) ; distance from side + (funcall top-or-bottom-fn ; -/+ + (assoc-default top-or-bottom alist 'eq) ; top/bottom + top-or-bottom-dist)))) ; distance from top/bottom (defun mouse-avoidance-banish-mouse () - ;; Put the mouse pointer in the upper-right corner of the current frame. + "Put the mouse pointer to `mouse-avoidance-banish-position'." (mouse-avoidance-set-mouse-position (mouse-avoidance-banish-destination))) (defsubst mouse-avoidance-delta (cur delta dist var min max) @@ -218,7 +267,6 @@ You can redefine this if you want the mouse banished to a different corner." ;; For these modes, state keeps track of the total offset that we've ;; accumulated, and tries to keep it close to zero. (let* ((cur (mouse-position)) - (cur-frame (car cur)) (cur-pos (cdr cur)) (pos (window-edges)) (wleft (pop pos)) @@ -408,4 +456,6 @@ definition of \"random distance\".)" (if mouse-avoidance-mode (mouse-avoidance-mode mouse-avoidance-mode)) +(provide 'avoid) + ;;; avoid.el ends here diff --git a/lisp/battery.el b/lisp/battery.el index 586be9e8938..dcfe07121b3 100644 --- a/lisp/battery.el +++ b/lisp/battery.el @@ -39,6 +39,9 @@ :prefix "battery-" :group 'hardware) +;; Either BATn or yeeloong-bat, basically. +(defconst battery--linux-sysfs-regexp "[bB][aA][tT][0-9]?$") + (defcustom battery-status-function (cond ((and (eq system-type 'gnu/linux) (file-readable-p "/proc/apm")) @@ -48,12 +51,9 @@ 'battery-linux-proc-acpi) ((and (eq system-type 'gnu/linux) (file-directory-p "/sys/class/power_supply/") - (directory-files "/sys/class/power_supply/" nil "BAT[0-9]$")) + (directory-files "/sys/class/power_supply/" nil + battery--linux-sysfs-regexp)) 'battery-linux-sysfs) - ((and (eq system-type 'gnu/linux) - (file-directory-p "/sys/class/power_supply/yeeloong-bat/") - (directory-files "/sys/class/power_supply/yeeloong-bat/" nil "charge_")) - 'battery-yeeloong-sysfs) ((and (eq system-type 'darwin) (condition-case nil (with-temp-buffer @@ -78,11 +78,9 @@ introduced by a `%' character in a control string." (cond ((eq battery-status-function 'battery-linux-proc-acpi) "Power %L, battery %B at %r (%p%% load, remaining time %t)") ((eq battery-status-function 'battery-linux-sysfs) - "Power %L, battery %B (%p%% load)") + "Power %L, battery %B (%p%% load, remaining time %t)") ((eq battery-status-function 'battery-pmset) "%L power, battery %B (%p%% load, remaining time %t)") - ((eq battery-status-function 'battery-yeeloong-sysfs) - "%L power, battery %B (%p%% load, remaining time %t)") (battery-status-function "Power %L, battery %B (%p%% load, remaining time %t)")) "Control string formatting the string to display in the echo area. @@ -344,14 +342,15 @@ The following %-sequences are provided: (setq charging-state (match-string 1))) (when (re-search-forward "present rate: +\\([0-9]+\\) \\(m[AW]\\)$" nil t) - (setq rate (+ (or rate 0) (string-to-number (match-string 1))) - rate-type (or (and rate-type + (setq rate (+ (or rate 0) (string-to-number (match-string 1)))) + (when (> rate 0) + (setq rate-type (or (and rate-type (if (string= rate-type (match-string 2)) rate-type (error "Inconsistent rate types (%s vs. %s)" rate-type (match-string 2)))) - (match-string 2)))) + (match-string 2))))) (when (re-search-forward "remaining capacity: +\\([0-9]+\\) m[AW]h$" nil t) (setq capacity @@ -447,7 +446,8 @@ The following %-sequences are provided: (with-temp-buffer (dolist (dir (ignore-errors (directory-files - "/sys/class/power_supply/" t "BAT[0-9]$"))) + "/sys/class/power_supply/" t + battery--linux-sysfs-regexp))) (erase-buffer) (ignore-errors (insert-file-contents (expand-file-name "uevent" dir))) @@ -509,7 +509,7 @@ The following %-sequences are provided: "N/A")) (cons ?d (or temperature "N/A")) (cons ?B (or charging-state "N/A")) - (cons ?p (cond ((> charge-full 0) + (cons ?p (cond ((and (> charge-full 0) (> charge-now 0)) (format "%.1f" (/ (* 100 charge-now) charge-full))) ((> energy-full 0) @@ -524,91 +524,6 @@ The following %-sequences are provided: "AC" "BAT") "N/A"))))) - -(defun battery-yeeloong-sysfs () - "Get ACPI status information from Linux (the kernel). -This function works only on the Lemote Yeeloong. - -The following %-sequences are provided: -%c Current capacity (mAh) -%r Current rate -%B Battery status (verbose) -%b Battery status, empty means high, `-' means low, - `!' means critical, and `+' means charging -%L AC line status (verbose) -%p Battery load percentage -%m Remaining time (to charge or discharge) in minutes -%h Remaining time (to charge or discharge) in hours -%t Remaining time (to charge or discharge) in the form `h:min'" - - (let (capacity - capacity-level - status - ac-online - hours - current-now - charge-full - charge-now) - - (with-temp-buffer - (ignore-errors - (insert-file-contents "/sys/class/power_supply/yeeloong-bat/uevent") - (goto-char 1) - (search-forward "POWER_SUPPLY_CHARGE_NOW=") - (setq charge-now (read (current-buffer))) - (goto-char 1) - (search-forward "POWER_SUPPLY_CHARGE_FULL=") - (setq charge-full (read (current-buffer))) - (goto-char 1) - (search-forward "POWER_SUPPLY_CURRENT_NOW=") - (setq current-now (read (current-buffer))) - (goto-char 1) - (search-forward "POWER_SUPPLY_CAPACITY_LEVEL=") - (setq capacity-level (buffer-substring (point) (line-end-position))) - (goto-char 1) - (search-forward "POWER_SUPPLY_STATUS=") - (setq status (buffer-substring (point) (line-end-position)))) - - (erase-buffer) - (ignore-errors - (insert-file-contents - "/sys/class/power_supply/yeeloong-ac/online") - (goto-char 1) - (setq ac-online (read (current-buffer))) - (erase-buffer))) - - - (setq capacity (round (/ (* charge-now 100.0) charge-full))) - (when (and current-now (not (= current-now 0))) - (if (< current-now 0) - ;; Charging - (setq hours (/ (- charge-now charge-full) (+ 0.0 current-now))) - ;; Discharging - (setq hours (/ charge-now (+ 0.0 current-now))))) - - (list (cons ?c (if charge-now - (number-to-string charge-now) - "N/A")) - (cons ?r current-now) - (cons ?B (cond ((equal capacity-level "Full") "full") - ((equal status "Charging") "charging") - ((equal capacity-level "Low") "low") - ((equal capacity-level "Critical") "critical") - (t "high"))) - (cons ?b (cond ((equal capacity-level "Full") " ") - ((equal status "Charging") "+") - ((equal capacity-level "Low") "-") - ((equal capacity-level "Critical") "!") - (t " "))) - (cons ?h (if hours (number-to-string hours) "N/A")) - (cons ?m (if hours (number-to-string (* 60 hours)) "N/A")) - (cons ?t (if hours - (format "%d:%d" - (/ (round (* 60 hours)) 60) - (% (round (* 60 hours)) 60)) - "N/A")) - (cons ?p (if capacity (number-to-string capacity) "N/A")) - (cons ?L (if (eq ac-online 1) "AC" "BAT"))))) ;;; `pmset' interface for Darwin (OS X). diff --git a/lisp/bindings.el b/lisp/bindings.el index a87f321c936..8cfeecf5b40 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -868,6 +868,7 @@ if `inhibit-field-text-motion' is non-nil." "Keymap for navigation commands.") (define-key esc-map "g" goto-map) +(define-key goto-map "c" 'goto-char) (define-key goto-map "g" 'goto-line) (define-key goto-map "\M-g" 'goto-line) (define-key goto-map "n" 'next-error) diff --git a/lisp/bs.el b/lisp/bs.el index 64c1183b64d..08d05a946e3 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -964,7 +964,7 @@ Default is `bs--current-sort-function'." Uses function `toggle-read-only'." (interactive) (with-current-buffer (bs--current-buffer) - (toggle-read-only)) + (call-interactively 'toggle-read-only)) (bs--update-current-line)) (defun bs-clear-modified () diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index 14899431e2a..0ae2b38eaf6 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el @@ -1,6 +1,6 @@ ;;; cal-tex.el --- calendar functions for printing calendars with LaTeX -;; Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001-2012 Free Software Foundation, Inc. ;; Author: Steve Fisk ;; Edward M. Reingold @@ -1588,8 +1588,7 @@ informative header, and run HOOK." (cal-tex-e-document) (or (and cal-tex-preamble-extra (string-match "inputenc" cal-tex-preamble-extra)) - (not (re-search-backward "[^[:ascii:]]" nil 'move)) - (progn + (when (re-search-backward "[^[:ascii:]]" nil 'move) (goto-char (point-min)) (when (search-forward "documentclass" nil t) (forward-line 1) diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 37f511f7990..9edd353b889 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -634,7 +634,7 @@ The optional LABEL is used to label the buffer created." "Check the list of holidays for any that occur on DATE. DATE is a list (month day year). This function considers the holidays from the list `calendar-holidays', and returns a list of -strings describing those holidays that apply on DATE." +strings describing those holidays that apply on DATE, or nil if none do." (let ((displayed-month (calendar-extract-month date)) (displayed-year (calendar-extract-year date)) holiday-list) diff --git a/lisp/comint.el b/lisp/comint.el index 68fedeb88a9..10981675971 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -699,16 +699,21 @@ BUFFER can be either a buffer or the name of one." (defun make-comint-in-buffer (name buffer program &optional startfile &rest switches) "Make a Comint process NAME in BUFFER, running PROGRAM. If BUFFER is nil, it defaults to NAME surrounded by `*'s. -PROGRAM should be either a string denoting an executable program to create -via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting -a TCP connection to be opened via `open-network-stream'. If there is already -a running process in that buffer, it is not restarted. Optional fourth arg -STARTFILE is the name of a file, whose contents are sent to the -process as its initial input. +If there is a running process in BUFFER, it is not restarted. + +PROGRAM should be one of the following: +- a string, denoting an executable program to create via + `start-file-process' +- a cons pair of the form (HOST . SERVICE), denoting a TCP + connection to be opened via `open-network-stream' +- nil, denoting a newly-allocated pty. + +Optional fourth arg STARTFILE is the name of a file, whose +contents are sent to the process as its initial input. If PROGRAM is a string, any more args are arguments to PROGRAM. -Returns the (possibly newly created) process buffer." +Return the (possibly newly created) process buffer." (or (fboundp 'start-file-process) (error "Multi-processing is not supported for this system")) (setq buffer (get-buffer-create (or buffer (concat "*" name "*")))) @@ -752,9 +757,18 @@ See `make-comint' and `comint-exec'." (defun comint-exec (buffer name command startfile switches) "Start up a process named NAME in buffer BUFFER for Comint modes. Runs the given COMMAND with SWITCHES, and initial input from STARTFILE. -Blasts any old process running in the buffer. Doesn't set the buffer mode. -You can use this to cheaply run a series of processes in the same Comint -buffer. The hook `comint-exec-hook' is run after each exec." + +COMMAND should be one of the following: +- a string, denoting an executable program to create via + `start-file-process' +- a cons pair of the form (HOST . SERVICE), denoting a TCP + connection to be opened via `open-network-stream' +- nil, denoting a newly-allocated pty. + +This function blasts any old process running in the buffer, and +does not set the buffer mode. You can use this to cheaply run a +series of processes in the same Comint buffer. The hook +`comint-exec-hook' is run after each exec." (with-current-buffer buffer (let ((proc (get-buffer-process buffer))) ; Blast any old process. (if proc (delete-process proc))) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index fbba49951d1..83973e4a534 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -138,9 +138,18 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of ;; coding.c (inhibit-eol-conversion mule boolean) (eol-mnemonic-undecided mule string) - (eol-mnemonic-unix mule string) - (eol-mnemonic-dos mule string) - (eol-mnemonic-mac mule string) + ;; startup.el fiddles with the values. IMO, would be + ;; simpler to just use #ifdefs in coding.c. + (eol-mnemonic-unix mule string nil + :standard + (if (memq system-type '(ms-dos windows-nt)) + "(Unix)" ":")) + (eol-mnemonic-dos mule string nil + :standard + (if (memq system-type '(ms-dos windows-nt)) + "\\" "(DOS)")) + (eol-mnemonic-mac mule string nil + :standard "(Mac)") (file-coding-system-alist mule (alist diff --git a/lisp/custom.el b/lisp/custom.el index d8909f8be92..611d5688f30 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -936,16 +936,21 @@ Each of the arguments in ARGS should be a list of this form: (SYMBOL EXP [NOW [REQUEST [COMMENT]]]) -This stores EXP (without evaluating it) as the saved value for SYMBOL. -If NOW is present and non-nil, then also evaluate EXP and set -the default value for the SYMBOL to the value of EXP. +SYMBOL is the variable name, and EXP is an expression which +evaluates to the customized value. EXP will also be stored, +without evaluating it, in SYMBOL's `saved-value' property, so +that it can be restored via the Customize interface. It is also +added to the alist in SYMBOL's `theme-value' property \(by +calling `custom-push-theme'). -REQUEST is a list of features we must require in order to -handle SYMBOL properly. -COMMENT is a comment string about SYMBOL. +NOW, if present and non-nil, means to install the variable's +value directly now, even if its `defcustom' declaration has not +been executed. This is for internal use only. -EXP itself is saved unevaluated as SYMBOL property `saved-value' and -in SYMBOL's list property `theme-value' \(using `custom-push-theme')." +REQUEST is a list of features to `require' (which are loaded +prior to evaluating EXP). + +COMMENT is a comment string about SYMBOL." (custom-check-theme theme) ;; Process all the needed autoloads before anything else, so that the diff --git a/lisp/descr-text.el b/lisp/descr-text.el index d2995ab790d..50b32fc8f2e 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el @@ -806,7 +806,7 @@ relevant to POS." (format " %s: %s\n" elt val))))))) (if text-props-desc (insert text-props-desc)) - (toggle-read-only 1)))))) + (setq buffer-read-only t)))))) (define-obsolete-function-alias 'describe-char-after 'describe-char "22.1") diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 0795b0175a2..8a499c47464 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -245,7 +245,11 @@ List has a form of (file-name full-file-name (attribute-list))." " (default now): " ": "))) (new-attribute (dired-mark-read-string prompt nil op-symbol - arg files default)) + arg files default + (cond ((eq op-symbol 'chown) + (system-users)) + ((eq op-symbol 'chgrp) + (system-groups))))) (operation (concat program " " new-attribute)) failures) (setq failures @@ -385,7 +389,7 @@ Uses the shell command coming from variables `lpr-command' and (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) (defun dired-mark-read-string (prompt initial op-symbol arg files - &optional default-value) + &optional default-value collection) "Read args for a Dired marked-files command, prompting with PROMPT. Return the user input (a string). @@ -397,11 +401,14 @@ FILES should be a list of file names. DEFAULT-VALUE, if non-nil, should be a \"standard\" value or list of such values, available via history commands. Note that if the user enters empty input, this function returns the empty string, -not DEFAULT-VALUE." +not DEFAULT-VALUE. + +Optional argument COLLECTION is a collection of possible completions, +suitable for use by `completing-read'." (dired-mark-pop-up nil op-symbol files - 'read-from-minibuffer + 'completing-read (format prompt (dired-mark-prompt arg files)) - initial nil nil nil default-value)) + collection nil nil initial nil default-value nil)) ;;; Cleaning a directory: flagging some backups for deletion. diff --git a/lisp/dired.el b/lisp/dired.el index d322752e15f..77fe9cb7614 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3736,7 +3736,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "58d623eb8e68e472e6164a1bcae83360") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "de7e4c64718c8ba8438a6397a460bf23") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ diff --git a/lisp/electric.el b/lisp/electric.el index 50c9010a74e..6a31ba1f1d3 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -215,6 +215,7 @@ point right after that char, and it should return t to cause indentation, ;; it looks challenging. (let (pos) (when (and + electric-indent-mode ;; Don't reindent while inserting spaces at beginning of line. (or (not (memq last-command-event '(?\s ?\t))) (save-excursion (skip-chars-backward " \t") (not (bolp)))) diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 6f2c6f73eca..a7f8dad54ed 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el @@ -1,4 +1,4 @@ -;;; authors.el --- utility for maintaining Emacs's AUTHORS file -*-coding: utf-8;-*- +;;; authors.el --- utility for maintaining Emacs's AUTHORS file -*-coding: utf-8 -*- ;; Copyright (C) 2000-2012 Free Software Foundation, Inc. @@ -829,7 +829,7 @@ with the file and the number of each action: (enable-local-eval nil) (existing-buffer (get-file-buffer log-file)) (buffer (find-file-noselect log-file)) - authors file pos) + authors pos) (with-current-buffer buffer (save-restriction (widen) @@ -943,8 +943,7 @@ and changed by AUTHOR." (file (car change)) (filestat (if (authors-public-domain-p file) (concat file " (public domain)") - file)) - slot) + file))) (cond ((assq :wrote actions) (setq wrote-list (cons filestat wrote-list))) ((assq :cowrote actions) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 5af666b9ded..921b08b10a8 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -762,9 +762,6 @@ write its autoloads into the specified file instead." (define-obsolete-function-alias 'update-autoloads-from-directories 'update-directory-autoloads "22.1") -(defvar autoload-make-program (or (getenv "MAKE") "make") - "Name of the make program in use during the Emacs build process.") - ;;;###autoload (defun batch-update-autoloads () "Update loaddefs.el autoloads in batch mode. diff --git a/lisp/emacs-lisp/avl-tree.el b/lisp/emacs-lisp/avl-tree.el index 9f348767478..1f00677cd00 100644 --- a/lisp/emacs-lisp/avl-tree.el +++ b/lisp/emacs-lisp/avl-tree.el @@ -260,7 +260,7 @@ Return t if the height of the tree has grown." (opp (avl-tree--switch-dir dir)) ;; direction 0,1 -> sign factor -1,+1 (sgn (avl-tree--dir-to-sign dir)) - p1 p2 b2 result) + p1 p2 b2) (cond ((< (* sgn (avl-tree--node-balance br)) 0) (setf (avl-tree--node-balance br) 0) diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 9ac5ce7d2f0..9a3d8cf705b 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -1,6 +1,6 @@ ;;; cl-extra.el --- Common Lisp features, part 2 -;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc. ;; Author: Dave Gillespie ;; Keywords: extensions @@ -430,7 +430,6 @@ With two arguments, return rounding and remainder of their quotient." ;; Random numbers. -(defvar *random-state*) ;;;###autoload (defun random* (lim &optional state) "Return a random nonnegative number less than LIM, an integer or float. diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 5bb86628bb8..9e0099bb649 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -10,7 +10,7 @@ ;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p ;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively ;;;;;; notevery notany every some mapcon mapcan mapl maplist map -;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "c172dda6770ce18b556561481bfefbb2") +;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "5a8a7f7ec2dc453113b8cbda577f2acb") ;;; Generated autoloads from cl-extra.el (autoload 'coerce "cl-extra" "\ diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 88698a1f069..0d6716a2e63 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -260,7 +260,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. ;; repeat-command still does the toggling correctly. (interactive (list (or current-prefix-arg 'toggle))) (let ((,last-message (current-message))) - (,@(if setter (list setter) + (,@(if setter `(funcall #',setter) (list (if (symbolp mode) 'setq 'setf) mode)) (if (eq arg 'toggle) (not ,mode) diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 10816aaa43c..a899839f68a 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -72,8 +72,7 @@ Argument CH-PREFIX is another character prefix to display." ;;; CLASS COMPLETION / DOCUMENTATION -;;;###autoload -(defalias 'describe-class 'eieio-describe-class) +;;;###autoload(defalias 'describe-class 'eieio-describe-class) ;;;###autoload (defun eieio-describe-class (class &optional headerfcn) @@ -305,8 +304,7 @@ are not abstract." ;;; METHOD COMPLETION / DOC (defalias 'describe-method 'eieio-describe-generic) -;;;###autoload -(defalias 'describe-generic 'eieio-describe-generic) +;;;###autoload(defalias 'describe-generic 'eieio-describe-generic) (defalias 'eieio-describe-method 'eieio-describe-generic) ;;;###autoload diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index f1c1bf8965c..768eba58ee1 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -3051,7 +3051,7 @@ Optional argument GROUP is the sub-group of slots to display. ;;;### (autoloads (eieio-help-mode-augmentation-maybee eieio-describe-generic ;;;;;; eieio-describe-constructor eieio-describe-class eieio-browse) -;;;;;; "eieio-opt" "eieio-opt.el" "e2814881441ad23759409687502f0ee1") +;;;;;; "eieio-opt" "eieio-opt.el" "d808328f9c0156ecbd412d77ba8c569e") ;;; Generated autoloads from eieio-opt.el (autoload 'eieio-browse "eieio-opt" "\ @@ -3060,7 +3060,6 @@ If optional ROOT-CLASS, then start with that, otherwise start with variable `eieio-default-superclass'. \(fn &optional ROOT-CLASS)" t nil) - (defalias 'describe-class 'eieio-describe-class) (autoload 'eieio-describe-class "eieio-opt" "\ @@ -3075,7 +3074,6 @@ Describe the constructor function FCN. Uses `eieio-describe-class' to describe the class being constructed. \(fn FCN)" t nil) - (defalias 'describe-generic 'eieio-describe-generic) (autoload 'eieio-describe-generic "eieio-opt" "\ diff --git a/lisp/emacs-lisp/ert-x.el b/lisp/emacs-lisp/ert-x.el index 257d0528cbc..a7916354c91 100644 --- a/lisp/emacs-lisp/ert-x.el +++ b/lisp/emacs-lisp/ert-x.el @@ -3,7 +3,7 @@ ;; Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. ;; Author: Lennart Borgman (lennart O borgman A gmail O com) -;; Author: Christian Ohler +;; Christian Ohler ;; This file is part of GNU Emacs. diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 4efdc3240cd..bcb7fab026b 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -447,7 +447,21 @@ Optional ARG is ignored." ;; Try first in this order for the sake of languages with nested ;; functions where several can end at the same place as with ;; the offside rule, e.g. Python. - (beginning-of-defun) + + ;; Finding the start of the function is a bit problematic since + ;; `beginning-of-defun' when we are on the first character of + ;; the function might go to the previous function. + ;; + ;; Therefore we first move one character forward and then call + ;; `beginning-of-defun'. However now we must check that we did + ;; not move into the next function. + (let ((here (point))) + (unless (eolp) + (forward-char)) + (beginning-of-defun) + (when (< (point) here) + (goto-char here) + (beginning-of-defun))) (setq beg (point)) (end-of-defun) (setq end (point)) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 5b158eb994f..4b868f72899 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -524,7 +524,7 @@ Required package `%s-%s' is unavailable" (defun define-package (name-string version-string &optional docstring requirements - &rest extra-properties) + &rest _extra-properties) "Define a new package. NAME-STRING is the name of the package, as a string. VERSION-STRING is the version of the package, as a string. @@ -584,7 +584,7 @@ EXTRA-PROPERTIES is currently unused." (defun package-generate-autoloads (name pkg-dir) (require 'autoload) ;Load before we let-bind generated-autoload-file! (let* ((auto-name (concat name "-autoloads.el")) - (ignore-name (concat name "-pkg.el")) + ;;(ignore-name (concat name "-pkg.el")) (generated-autoload-file (expand-file-name auto-name pkg-dir)) (version-control 'never)) (unless (fboundp 'autoload-ensure-default-file) @@ -1389,7 +1389,7 @@ If REMEMBER-POS is non-nil, keep point on the same entry. PACKAGES should be t, which means to display all known packages, or a list of package names (symbols) to display." ;; Construct list of ((PACKAGE . VERSION) STATUS DESCRIPTION). - (let (info-list name builtin) + (let (info-list name) ;; Installed packages: (dolist (elt package-alist) (setq name (car elt)) @@ -1474,21 +1474,21 @@ If optional arg BUTTON is non-nil, describe its associated package." (describe-package package)))) ;; fixme numeric argument -(defun package-menu-mark-delete (&optional num) +(defun package-menu-mark-delete (&optional _num) "Mark a package for deletion and move to the next line." (interactive "p") (if (member (package-menu-get-status) '("installed" "obsolete")) (tabulated-list-put-tag "D" t) (forward-line))) -(defun package-menu-mark-install (&optional num) +(defun package-menu-mark-install (&optional _num) "Mark a package for installation and move to the next line." (interactive "p") (if (string-equal (package-menu-get-status) "available") (tabulated-list-put-tag "I" t) (forward-line))) -(defun package-menu-mark-unmark (&optional num) +(defun package-menu-mark-unmark (&optional _num) "Clear any marks on a package and move to the next line." (interactive "p") (tabulated-list-put-tag " " t)) @@ -1530,8 +1530,7 @@ If optional arg BUTTON is non-nil, describe its associated package." (dolist (entry tabulated-list-entries) ;; ENTRY is ((NAME . VERSION) [NAME VERSION STATUS DOC]) (let ((pkg (car entry)) - (status (aref (cadr entry) 2)) - old) + (status (aref (cadr entry) 2))) (cond ((equal status "installed") (push pkg installed)) ((equal status "available") diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 6d12fe19277..72e3c398dc0 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -136,9 +136,6 @@ This means the number of non-shy regexp grouping constructs ;;; Workhorse functions. -(eval-when-compile - (require 'cl)) - (defun regexp-opt-group (strings &optional paren lax) "Return a regexp to match a string in the sorted list STRINGS. If PAREN non-nil, output regexp parentheses around returned regexp. @@ -248,15 +245,15 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher." ;; ;; Make a character map but extract character set meta characters. (dolist (char chars) - (case char - (?\] - (setq bracket "]")) - (?^ - (setq caret "^")) - (?- - (setq dash "-")) - (otherwise - (aset charmap char t)))) + (cond + ((eq char ?\]) + (setq bracket "]")) + ((eq char ?^) + (setq caret "^")) + ((eq char ?-) + (setq dash "-")) + (t + (aset charmap char t)))) ;; ;; Make a character set from the map using ranges where applicable. (map-char-table @@ -268,14 +265,14 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher." (setq charset (format "%s%c-%c" charset start end)) (while (>= end start) (setq charset (format "%s%c" charset start)) - (incf start))) + (setq start (1+ start)))) (setq start (car c) end (cdr c))) (if (= (1- c) end) (setq end c) (if (> end (+ start 2)) (setq charset (format "%s%c-%c" charset start end)) (while (>= end start) (setq charset (format "%s%c" charset start)) - (incf start))) + (setq start (1+ start)))) (setq start c end c))))) charmap) (when (>= end start) @@ -283,7 +280,7 @@ Merges keywords to avoid backtracking in Emacs's regexp matcher." (setq charset (format "%s%c-%c" charset start end)) (while (>= end start) (setq charset (format "%s%c" charset start)) - (incf start)))) + (setq start (1+ start))))) ;; ;; Make sure a caret is not first and a dash is first or last. (if (and (string-equal charset "") (string-equal bracket "")) diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 2a12f03e514..cafa1942a09 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -1602,6 +1602,36 @@ to which that point should be aligned, if we were to reindent it.") (save-excursion (indent-line-to indent)) (indent-line-to indent))))) +(defun smie-auto-fill () + (let ((fc (current-fill-column))) + (while (and fc (> (current-column) fc)) + (cond + ((not (or (nth 8 (save-excursion + (syntax-ppss (line-beginning-position)))) + (nth 8 (syntax-ppss)))) + (save-excursion + (beginning-of-line) + (smie-indent-forward-token) + (let ((bsf (point)) + (gain 0) + curcol) + (while (<= (setq curcol (current-column)) fc) + ;; FIXME? `smie-indent-calculate' can (and often will) + ;; return a result that actually depends on the presence/absence + ;; of a newline, so the gain computed here may not be accurate, + ;; but in practice it seems to works well enough. + (let* ((newcol (smie-indent-calculate)) + (newgain (- curcol newcol))) + (when (> newgain gain) + (setq gain newgain) + (setq bsf (point)))) + (smie-indent-forward-token)) + (when (> gain 0) + (goto-char bsf) + (newline-and-indent))))) + (t (do-auto-fill)))))) + + (defun smie-setup (grammar rules-function &rest keywords) "Setup SMIE navigation and indentation. GRAMMAR is a grammar table generated by `smie-prec2->grammar'. @@ -1612,6 +1642,7 @@ KEYWORDS are additional arguments, which can use the following keywords: (set (make-local-variable 'smie-rules-function) rules-function) (set (make-local-variable 'smie-grammar) grammar) (set (make-local-variable 'indent-line-function) 'smie-indent-line) + (set (make-local-variable 'normal-auto-fill-function) 'smie-auto-fill) (set (make-local-variable 'forward-sexp-function) 'smie-forward-sexp-command) (while keywords diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index f17b12da6a0..9439fba2b86 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -215,7 +215,7 @@ buffer and inserts the entries with `tabulated-list-printer'. Optional argument REMEMBER-POS, if non-nil, means to move point to the entry with the same ID element as the current line." (let ((inhibit-read-only t) - (entries (if (functionp 'tabulated-list-entries) + (entries (if (functionp tabulated-list-entries) (funcall tabulated-list-entries) tabulated-list-entries)) entry-id saved-pt saved-col) @@ -246,7 +246,7 @@ to the entry with the same ID element as the current line." (setq entries (sort entries sorter)) (if (cdr tabulated-list-sort-key) (setq entries (nreverse entries))) - (unless (functionp 'tabulated-list-entries) + (unless (functionp tabulated-list-entries) (setq tabulated-list-entries entries))))) ;; Print the resulting list. (dolist (elt entries) diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el index 743b828326c..f5954564a2f 100644 --- a/lisp/emacs-lock.el +++ b/lisp/emacs-lock.el @@ -81,6 +81,13 @@ for both actions (NOT RECOMMENDED)." :group 'emacs-lock :version "24.1") +(defcustom emacs-lock-locked-buffer-functions nil + "Abnormal hook run when Emacs Lock prevents exiting Emacs, or killing a buffer. +The functions get one argument, the first locked buffer found." + :type 'hook + :group 'emacs-lock + :version "24.2") + (defvar emacs-lock-mode nil "If non-nil, the current buffer is locked. It can be one of the following values: @@ -119,40 +126,45 @@ See `emacs-lock-unlockable-modes'." (or (eq unlock 'all) (eq unlock action)))))) (defun emacs-lock--exit-locked-buffer () - "Return the name of the first exit-locked buffer found." + "Return the first exit-locked buffer found." (save-current-buffer (catch :found (dolist (buffer (buffer-list)) (set-buffer buffer) (unless (or (emacs-lock--can-auto-unlock 'exit) (memq emacs-lock-mode '(nil kill))) - (throw :found (buffer-name)))) + (throw :found buffer))) nil))) (defun emacs-lock--kill-emacs-hook () "Signal an error if any buffer is exit-locked. Used from `kill-emacs-hook' (which see)." - (let ((buffer-name (emacs-lock--exit-locked-buffer))) - (when buffer-name - (error "Emacs cannot exit because buffer %S is locked" buffer-name)))) + (let ((locked (emacs-lock--exit-locked-buffer))) + (when locked + (run-hook-with-args 'emacs-lock-locked-buffer-functions locked) + (error "Emacs cannot exit because buffer %S is locked" + (buffer-name locked))))) (defun emacs-lock--kill-emacs-query-functions () "Display a message if any buffer is exit-locked. Return a value appropriate for `kill-emacs-query-functions' (which see)." (let ((locked (emacs-lock--exit-locked-buffer))) - (or (not locked) - (progn - (message "Emacs cannot exit because buffer %S is locked" locked) - nil)))) + (if (not locked) + t + (run-hook-with-args 'emacs-lock-locked-buffer-functions locked) + (message "Emacs cannot exit because buffer %S is locked" + (buffer-name locked)) + nil))) (defun emacs-lock--kill-buffer-query-functions () "Display a message if the current buffer is kill-locked. Return a value appropriate for `kill-buffer-query-functions' (which see)." - (or (emacs-lock--can-auto-unlock 'kill) - (memq emacs-lock-mode '(nil exit)) - (progn - (message "Buffer %S is locked and cannot be killed" (buffer-name)) - nil))) + (if (or (emacs-lock--can-auto-unlock 'kill) + (memq emacs-lock-mode '(nil exit))) + t + (run-hook-with-args 'emacs-lock-locked-buffer-functions (current-buffer)) + (message "Buffer %S is locked and cannot be killed" (buffer-name)) + nil)) (defun emacs-lock--set-mode (mode arg) "Setter function for `emacs-lock-mode'." diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index a918f298a4e..ba6127b4cba 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -1002,15 +1002,21 @@ behavior, see `cua-paste-pop-rotate-temporarily'." (setq this-command 'cua-paste-pop)))) (defun cua-exchange-point-and-mark (arg) - "Exchanges point and mark, but don't activate the mark. -Activates the mark if a prefix argument is given." + "Exchange point and mark. +Don't activate the mark if `cua-enable-cua-keys' is non-nil. +Otherwise, just activate the mark if a prefix ARG is given. + +See also `exchange-point-and-mark'." (interactive "P") - (if arg - (setq mark-active t) - (let (mark-active) - (exchange-point-and-mark) - (if cua--rectangle - (cua--rectangle-corner 0))))) + (cond ((null cua-enable-cua-keys) + (exchange-point-and-mark arg)) + (arg + (setq mark-active t)) + (t + (let (mark-active) + (exchange-point-and-mark) + (if cua--rectangle + (cua--rectangle-corner 0)))))) ;; Typed text that replaced the highlighted region. (defvar cua--repeat-replace-text nil) @@ -1246,22 +1252,7 @@ If ARG is the atom `-', scroll upward by nearly full screen." ;; (and region not started with C-SPC). ;; If rectangle is active, expand rectangle in specified direction and ;; ignore the movement. - ((if window-system - ;; Shortcut for window-system, assuming that input-decode-map is empty. - (memq 'shift (event-modifiers - (aref (this-single-command-raw-keys) 0))) - (or - ;; Check if the final key-sequence was shifted. - (memq 'shift (event-modifiers - (aref (this-single-command-keys) 0))) - ;; If not, maybe the raw key-sequence was mapped by input-decode-map - ;; to a shifted key (and then mapped down to its unshifted form). - (let* ((keys (this-single-command-raw-keys)) - (ev (lookup-key input-decode-map keys))) - (or (and (vector ev) (memq 'shift (event-modifiers (aref ev 0)))) - ;; Or maybe, the raw key-sequence was not an escape sequence - ;; and was shifted (and then mapped down to its unshifted form). - (memq 'shift (event-modifiers (aref keys 0))))))) + (this-command-keys-shift-translated (unless mark-active (push-mark-command nil t)) (setq cua--last-region-shifted t) diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index e3aade760dc..4286afba938 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -465,7 +465,7 @@ If command is repeated at same position, delete the rectangle." (cua-copy-rectangle arg) (setq cua--mouse-last-pos (cons (point) cua--last-killed-rectangle))))) -(defun cua--mouse-ignore (event) +(defun cua--mouse-ignore (_event) (interactive "e") (setq this-command last-command)) @@ -609,12 +609,12 @@ If command is repeated at same position, delete the rectangle." (let ((lines 0)) (if (not (cua--rectangle-virtual-edges)) (cua--rectangle-operation nil nil t 2 t - (lambda (s e l r v) + (lambda (s e _l _r _v) (setq lines (1+ lines)) (if (and (> e s) (<= e (point-max))) (delete-region s e)))) (cua--rectangle-operation nil 1 t nil t - (lambda (s e l r v) + (lambda (s e _l _r _v) (setq lines (1+ lines)) (when (and (> e s) (<= e (point-max))) (delete-region s e))))) @@ -624,10 +624,10 @@ If command is repeated at same position, delete the rectangle." (let (rect) (if (not (cua--rectangle-virtual-edges)) (cua--rectangle-operation nil nil nil nil nil ; do not tabify - (lambda (s e l r) + (lambda (s e _l _r) (setq rect (cons (cua--filter-buffer-noprops s e) rect)))) (cua--rectangle-operation nil 1 nil nil nil ; do not tabify - (lambda (s e l r v) + (lambda (s e l r _v) (let ((copy t) (bs 0) (as 0) row) (if (= s e) (setq e (1+ e))) (goto-char s) @@ -840,7 +840,7 @@ If command is repeated at same position, delete the rectangle." (pad (cua--rectangle-virtual-edges)) indent) (cua--rectangle-operation (if clear 'clear 'corners) nil t pad nil - (lambda (s e l r) + (lambda (_s _e l _r) (move-to-column col pad) (if (and (eolp) (< (current-column) col)) @@ -905,10 +905,10 @@ With prefix argument, activate previous rectangle if possible." (cua-help-for-region t)))) (defun cua-restrict-regexp-rectangle (arg) - "Restrict rectangle to lines (not) matching REGEXP. -With prefix argument, the toggle restriction." + "Restrict rectangle to lines (not) matching regexp. +With prefix argument, toggle restriction." (interactive "P") - (let ((r (cua--rectangle-restriction)) regexp) + (let ((r (cua--rectangle-restriction))) (if (and r (null (car (cdr r)))) (if arg (cua--rectangle-restriction (car r) nil (not (car (cdr (cdr r))))) @@ -919,9 +919,9 @@ With prefix argument, the toggle restriction." (defun cua-restrict-prefix-rectangle (arg) "Restrict rectangle to lines (not) starting with CHAR. -With prefix argument, the toggle restriction." +With prefix argument, toggle restriction." (interactive "P") - (let ((r (cua--rectangle-restriction)) regexp) + (let ((r (cua--rectangle-restriction))) (if (and r (car (cdr r))) (if arg (cua--rectangle-restriction (car r) t (not (car (cdr (cdr r))))) @@ -1000,7 +1000,7 @@ The text previously in the region is not overwritten by the blanks, but instead winds up to the right of the rectangle." (interactive) (cua--rectangle-operation 'corners nil t 1 nil - (lambda (s e l r) + (lambda (_s _e l r) (skip-chars-forward " \t") (let ((ws (- (current-column) l)) (p (point))) @@ -1015,7 +1015,7 @@ at that column is deleted. With prefix arg, also delete whitespace to the left of that column." (interactive "P") (cua--rectangle-operation 'clear nil t 1 nil - (lambda (s e l r) + (lambda (s _e _l _r) (when arg (skip-syntax-backward " " (line-beginning-position)) (setq s (point))) @@ -1027,7 +1027,7 @@ With prefix arg, also delete whitespace to the left of that column." The text previously in the rectangle is overwritten by the blanks." (interactive) (cua--rectangle-operation 'keep nil nil 1 nil - (lambda (s e l r) + (lambda (s e _l _r) (goto-char e) (skip-syntax-forward " " (line-end-position)) (setq e (point)) @@ -1040,20 +1040,19 @@ The text previously in the rectangle is overwritten by the blanks." (defun cua-align-rectangle () "Align rectangle lines to left column." (interactive) - (let (x) - (cua--rectangle-operation 'clear nil t t nil - (lambda (s e l r) - (let ((b (line-beginning-position))) - (skip-syntax-backward "^ " b) - (skip-syntax-backward " " b) - (setq s (point))) - (skip-syntax-forward " " (line-end-position)) - (delete-region s (point)) - (indent-to l)) - (lambda (l r) - (move-to-column l) - ;; (setq cua-save-point (point)) - )))) + (cua--rectangle-operation 'clear nil t t nil + (lambda (s _e l _r) + (let ((b (line-beginning-position))) + (skip-syntax-backward "^ " b) + (skip-syntax-backward " " b) + (setq s (point))) + (skip-syntax-forward " " (line-end-position)) + (delete-region s (point)) + (indent-to l)) + (lambda (l _r) + (move-to-column l) + ;; (setq cua-save-point (point)) + ))) (declare-function cua--cut-rectangle-to-global-mark "cua-gmrk" (as-text)) (declare-function cua--copy-rectangle-to-global-mark "cua-gmrk" (as-text)) @@ -1087,7 +1086,7 @@ The text previously in the rectangle is overwritten by the blanks." The length of STRING need not be the same as the rectangle width." (interactive "sString rectangle: ") (cua--rectangle-operation 'keep nil t t nil - (lambda (s e l r) + (lambda (s e l _r) (delete-region s e) (skip-chars-forward " \t") (let ((ws (- (current-column) l))) @@ -1095,7 +1094,7 @@ The length of STRING need not be the same as the rectangle width." (insert string) (indent-to (+ (current-column) ws)))) (unless (cua--rectangle-restriction) - (lambda (l r) + (lambda (l _r) (cua--rectangle-right (max l (+ l (length string) -1))))))) (defun cua-fill-char-rectangle (character) @@ -1113,7 +1112,7 @@ The length of STRING need not be the same as the rectangle width." (if buffer-read-only (message "Cannot replace in read-only buffer") (cua--rectangle-operation 'keep nil t 1 nil - (lambda (s e l r) + (lambda (_s e _l _r) (if (re-search-forward regexp e t) (replace-match newtext nil nil)))))) @@ -1121,7 +1120,7 @@ The length of STRING need not be the same as the rectangle width." "Increment each line of CUA rectangle by prefix amount." (interactive "p") (cua--rectangle-operation 'keep nil t 1 nil - (lambda (s e l r) + (lambda (_s e _l _r) (cond ((re-search-forward "0x\\([0-9a-fA-F]+\\)" e t) (let* ((txt (cua--filter-buffer-noprops (match-beginning 1) (match-end 1))) @@ -1154,14 +1153,14 @@ The numbers are formatted according to the FORMAT string." (setq format cua--rectangle-seq-format) (setq cua--rectangle-seq-format format)) (cua--rectangle-operation 'clear nil t 1 nil - (lambda (s e l r) + (lambda (s e _l _r) (delete-region s e) (insert (format format first)) (setq first (+ first incr))))) (defmacro cua--convert-rectangle-as (command tabify) `(cua--rectangle-operation 'clear nil nil nil ,tabify - (lambda (s e l r) + (lambda (s e _l _r) (,command s e)))) (defun cua-upcase-rectangle () @@ -1218,7 +1217,7 @@ The numbers are formatted according to the FORMAT string." (if cua--debug (print z auxbuf)) (cua--rectangle-operation nil nil t pad nil - (lambda (s e l r) + (lambda (s e l _r) (let (cc) (goto-char e) (skip-chars-forward " \t") @@ -1249,7 +1248,7 @@ The numbers are formatted according to the FORMAT string." (put 'cua--rectangle-aux-replace 'lisp-indent-function 4) -(defun cua--left-fill-rectangle (start end) +(defun cua--left-fill-rectangle (_start _end) (beginning-of-line) (while (< (point) (point-max)) (delete-horizontal-space nil) @@ -1298,7 +1297,7 @@ With prefix arg, replace rectangle with output from command." "Remove the first line of the rectangle and scroll remaining lines up." (interactive) (cua--rectangle-aux-replace 0 t t t t - (lambda (s e) + (lambda (s _e) (if (= (forward-line 1) 0) (delete-region s (point)))))) @@ -1307,7 +1306,7 @@ With prefix arg, replace rectangle with output from command." The remaining lines are scrolled down, losing the last line." (interactive) (cua--rectangle-aux-replace 0 t t t t - (lambda (s e) + (lambda (s _e) (goto-char s) (insert "\n")))) @@ -1337,7 +1336,7 @@ With prefix arg, indent to that column." (pad (cua--rectangle-virtual-edges)) indent) (cua--rectangle-operation 'corners nil t pad nil - (lambda (s e l r) + (lambda (_s _e l r) (move-to-column (if (cua--rectangle-right-side t) (max (1+ r) col) l) diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 34aa015d7ac..06c6d42ed39 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,23 @@ +2012-04-11 Vivek Dasmohapatra + + * erc-services.el (erc-nickserv-passwords): Don't display the + password (bug#4459). + +2012-04-10 Lars Magne Ingebrigtsen + + * erc-join.el (erc-server-join-channel): New function to look up + the channel password via auth-source. + (erc-autojoin-channels): Use it. + (erc-autojoin-after-ident): Ditto. + (erc-autojoin-channels-alist): Mention auth-source. + +2012-04-10 Deniz Dogan (tiny change) + + * erc.el (erc-display-prompt): Adds the field text property to the + ERC prompt. This allows users to use `kill-whole-line' to kill + all text back to the prompt given that it's on a single line + (bug#10841). + 2012-04-09 Chong Yidong * erc.el (erc-cmd-SET): Call custom-variable-p instead of diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el index da894ba5977..85d1edf6427 100644 --- a/lisp/erc/erc-join.el +++ b/lisp/erc/erc-join.el @@ -32,6 +32,7 @@ ;;; Code: (require 'erc) +(require 'auth-source) (eval-when-compile (require 'cl)) (defgroup erc-autojoin nil @@ -56,6 +57,13 @@ Every element in the alist has the form (SERVER . CHANNELS). SERVER is a regexp matching the server, and channels is the list of channels to join. +If the channel(s) require channel keys for joining, the passwords +are found via auth-source. For instance, if you use ~/.authinfo +as your auth-source backend, then put something like the +following in that file: + +machine irc.example.net login \"#fsf\" password sEcReT + Customize this variable to set the value for your first connect. Once you are connected and join and part channels, this alist keeps track of what channels you are on, and will join them @@ -131,7 +139,7 @@ This function is run from `erc-nickserv-identified-hook'." (when (string-match (car l) server) (dolist (chan (cdr l)) (unless (erc-member-ignore-case chan joined) - (erc-server-send (concat "join " chan)))))))) + (erc-server-join-channel server chan))))))) nil) (defun erc-autojoin-channels (server nick) @@ -148,10 +156,25 @@ This function is run from `erc-nickserv-identified-hook'." (dolist (l erc-autojoin-channels-alist) (when (string-match (car l) server) (dolist (chan (cdr l)) - (erc-server-send (concat "join " chan)))))) + (erc-server-join-channel server chan))))) ;; Return nil to avoid stomping on any other hook funcs. nil) +(defun erc-server-join-channel (server channel) + (let* ((secret (plist-get (nth 0 (auth-source-search + :max 1 + :host server + :port "irc" + :user channel)) + :secret)) + (password (if (functionp secret) + (funcall secret) + secret))) + (erc-server-send (concat "join " channel + (if password + (concat " " password) + ""))))) + (defun erc-autojoin-add (proc parsed) "Add the channel being joined to `erc-autojoin-channels-alist'." (let* ((chnl (erc-response.contents parsed)) diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 66eb341b47a..5986d81efed 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -195,7 +195,8 @@ Example of use: (repeat :tag "Nickname and password" (cons :tag "Identity" (string :tag "Nick") - (string :tag "Password")))))) + (string :tag "Password" + :secret ?*)))))) ;; Variables: diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 62b701204d1..b79c2fd6c5e 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -3646,6 +3646,7 @@ If FACE is non-nil, it will be used to propertize the prompt. If it is nil, 'start-open t ; XEmacs 'rear-nonsticky t ; Emacs 'erc-prompt t + 'field t 'front-sticky t 'read-only t)) (erc-put-text-property 0 (1- (length prompt)) diff --git a/lisp/files.el b/lisp/files.el index e623bc66080..d757e1a277c 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2152,6 +2152,7 @@ unless NOMODES is non-nil." (/= (char-after (1- (point-max))) ?\n) (not (and (eq selective-display t) (= (char-after (1- (point-max))) ?\r))) + (not buffer-read-only) (save-excursion (goto-char (point-max)) (insert "\n"))) @@ -3523,7 +3524,7 @@ LIST is a list of the form accepted by the function. When a file is visited, the file's class is found. A directory may be assigned a class using `dir-locals-set-directory-class'. Then variables are set in the file's buffer according to the -class' LIST. The list is processed in order. +VARIABLES list of the class. The list is processed in order. * If the element is of the form (MAJOR-MODE . ALIST), and the buffer's major mode is derived from MAJOR-MODE (as determined diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 910585f21f1..2f76687983b 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -2285,10 +2285,10 @@ in which C preprocessor directives are used. e.g. `asm-mode' and (,(concat "(" (regexp-opt '("cond" "if" "while" "while-no-input" "let" "let*" "letrec" - "prog" "progn" "progv" "prog1" "prog2" "prog*" - "inline" "lambda" "save-restriction" "save-excursion" - "save-selected-window" "save-window-excursion" - "save-match-data" "save-current-buffer" + "pcase" "pcase-let" "pcase-let*" "prog" "progn" "progv" + "prog1" "prog2" "prog*" "inline" "lambda" + "save-restriction" "save-excursion" "save-selected-window" + "save-window-excursion" "save-match-data" "save-current-buffer" "combine-after-change-calls" "unwind-protect" "condition-case" "condition-case-unless-debug" "track-mouse" "eval-after-load" "eval-and-compile" diff --git a/lisp/frame.el b/lisp/frame.el index 1cd6c0cf181..1ee9d966ef1 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1556,21 +1556,6 @@ left untouched. FRAME nil or omitted means use the selected frame." (define-obsolete-variable-alias 'delete-frame-hook 'delete-frame-functions "22.1") - -;; Highlighting trailing whitespace. - -(make-variable-buffer-local 'show-trailing-whitespace) - - -;; Scrolling - -(defgroup scrolling nil - "Scrolling windows." - :version "21.1" - :group 'frames) - -(defvaralias 'automatic-hscrolling 'auto-hscroll-mode) - ;; Blinking cursor @@ -1663,6 +1648,14 @@ terminals, cursor blinking is controlled by the terminal." (define-key ctl-x-5-map "0" 'delete-frame) (define-key ctl-x-5-map "o" 'other-frame) + +;; Misc. + +;; Only marked as obsolete in 24.2. +(define-obsolete-variable-alias 'automatic-hscrolling 'auto-hscroll-mode "22.1") + +(make-variable-buffer-local 'show-trailing-whitespace) + (provide 'frame) ;;; frame.el ends here diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ef0f1c5c852..52f140d9192 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,23 @@ +2012-04-16 Glenn Morris + + * nndraft.el (nndraft-request-list): Fix declaration. + +2012-04-14 Lars Magne Ingebrigtsen + + * gnus-msg.el (gnus-inews-insert-gcc): Don't do the alist stuff when we + don't have a current group. + + * gnus-msg.el (gnus-inews-insert-gcc): Protect against when we don't + have a group name. + + * gnus-art.el (article-wash-html): Ensure that we insert the HTML into + a multibyte buffer (bug#7410). + (article-wash-html): Parse the original article buffer to get the + unencoded data (bug#7410). + + * gnus-start.el (gnus-read-newsrc-el-file): Protect against broken + .newsrc.el files. + 2012-03-22 Lars Magne Ingebrigtsen * auth-source.el (auth-source-netrc-create): Quote tokens that contain diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 048f8956567..b04615dc5a9 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2754,9 +2754,11 @@ If READ-CHARSET, ask for a coding system." (let ((handles nil) (buffer-read-only nil)) (when (gnus-buffer-live-p gnus-original-article-buffer) - (setq handles (mm-dissect-buffer t t))) + (with-current-buffer gnus-original-article-buffer + (setq handles (mm-dissect-buffer t t)))) (article-goto-body) (delete-region (point) (point-max)) + (mm-enable-multibyte) (mm-inline-text-html handles))) (defvar gnus-article-browse-html-temp-list nil diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 500ace9e8ff..815bd9e44a6 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1664,17 +1664,19 @@ this is a reply." ((functionp var) ;; A function. (funcall var group)) - (t + (group ;; An alist of regexps/functions/forms. (while (and var (not (setq result (cond - ((stringp (caar var)) + ((and group + (stringp (caar var))) ;; Regexp. (when (string-match (caar var) group) (cdar var))) - ((functionp (car var)) + ((and group + (functionp (car var))) ;; Function. (funcall (car var) group)) (t diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index bb7dd76d590..f025960c348 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -2442,7 +2442,9 @@ If FORCE is non-nil, the .newsrc file is read." (when gnus-newsrc-assoc (setq gnus-newsrc-alist gnus-newsrc-assoc)))) (dolist (elem gnus-newsrc-alist) - (setcar elem (mm-string-as-unibyte (car elem)))) + ;; Protect against broken .newsrc.el files. + (when (car elem) + (setcar elem (mm-string-as-unibyte (car elem))))) (gnus-make-hashtable-from-newsrc-alist) (when (file-newer-than-file-p file ding-file) ;; Old format quick file diff --git a/lisp/gnus/nndraft.el b/lisp/gnus/nndraft.el index 1800d0c02de..da50720ebbe 100644 --- a/lisp/gnus/nndraft.el +++ b/lisp/gnus/nndraft.el @@ -37,7 +37,8 @@ (require 'mm-util) (eval-when-compile (require 'cl)) -(declare-function nndraft-request-list "nnmh" (&rest args)) +;; The nnoo-import at the end, I think. +(declare-function nndraft-request-list "nndraft" (&rest args) t) (nnoo-declare nndraft nnmh) diff --git a/lisp/hexl.el b/lisp/hexl.el index 538d218e38e..bedcc6b10b9 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -51,6 +51,14 @@ "Edit a file in a hex dump format using the hexl filter." :group 'data) +(defcustom hexl-bits 16 + "The bit grouping that hexl will use." + :type '(choice (const 8 ) + (const 16) + (const 32) + (const 64)) + :group 'hexl + :version "24.2") (defcustom hexl-program "hexl" "The program that will hexlify and dehexlify its stdin. @@ -67,7 +75,9 @@ and \"-de\" when dehexlifying a buffer." (defcustom hexl-options (format "-hex %s" hexl-iso) "Space separated options to `hexl-program' that suit your needs. -Quoting cannot be used, so the arguments cannot themselves contain spaces." +Quoting cannot be used, so the arguments cannot themselves contain spaces. +If you wish to set the `-group-by-X-bits' options, set `hexl-bits' instead, +as that will override any bit grouping options set here." :type 'string :group 'hexl) @@ -212,10 +222,34 @@ Quoting cannot be used, so the arguments cannot themselves contain spaces." (2 'hexl-ascii-region t t))) "Font lock keywords used in `hexl-mode'.") +(defun hexl-rulerize (string bits) + (let ((size (/ bits 4)) (strlen (length string)) (pos 0) (ruler "")) + (while (< pos strlen) + (setq ruler (concat ruler " " (substring string pos (+ pos size)))) + (setq pos (+ pos size))) + (substring ruler 1) )) + +(defvar hexl-rulers + (mapcar + (lambda (bits) + (cons bits + (concat " 87654321 " + (hexl-rulerize "00112233445566778899aabbccddeeff" bits) + " 0123456789abcdef"))) + '(8 16 32 64))) ;; routines (put 'hexl-mode 'mode-class 'special) +;; 10 chars for the "address: " +;; 32 chars for the hexlified bytes +;; 1 char for the space +;; 16 chars for the character display +;; X chars for the spaces (128 bits divided by the hexl-bits) +;; 1 char for the newline. +(defun hexl-line-displen () + "The length of a hexl display line (varies with `hexl-bits')." + (+ 60 (/ 128 (or hexl-bits 16)))) (defun hexl-mode--minor-mode-p (var) (memq var '(ruler-mode hl-line-mode))) @@ -248,7 +282,7 @@ using the function `hexlify-buffer'. Each line in the buffer has an \"address\" (displayed in hexadecimal) representing the offset into the file that the characters on this line are at and 16 characters from the file (displayed as hexadecimal -values grouped every 16 bits) and as their ASCII values. +values grouped every `hexl-bits' bits) and as their ASCII values. If any of the characters (displayed as ASCII characters) are unprintable (control or meta characters) they will be replaced as @@ -330,10 +364,7 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode. (hexlify-buffer) (restore-buffer-modified-p modified)) (set (make-local-variable 'hexl-max-address) - (let* ((full-lines (/ (buffer-size) 68)) - (last-line (% (buffer-size) 68)) - (last-line-bytes (% last-line 52))) - (+ last-line-bytes (* full-lines 16) -1))) + (+ (* (/ (1- (buffer-size)) (hexl-line-displen)) 16) 15)) (condition-case nil (hexl-goto-address original-point) (error nil))) @@ -510,17 +541,20 @@ Ask the user for confirmation." (defun hexl-current-address (&optional validate) "Return current hexl-address." (interactive) - (let ((current-column (- (% (- (point) (point-min) -1) 68) 11)) + (let ((current-column + (- (% (- (point) (point-min) -1) (hexl-line-displen)) 11)) (hexl-address 0)) (if (< current-column 0) (if validate (error "Point is not on a character in the file") (setq current-column 0))) (setq hexl-address - (+ (* (/ (- (point) (point-min) -1) 68) 16) - (if (>= current-column 41) - (- current-column 41) - (/ (- current-column (/ current-column 5)) 2)))) + (+ (* (/ (- (point) (point-min) -1) + (hexl-line-displen)) 16) + (if (>= current-column (- (hexl-ascii-start-column) 10)) + (- current-column (- (hexl-ascii-start-column) 10)) + (/ (- current-column + (/ current-column (1+ (/ hexl-bits 4)))) 2)))) (when (called-interactively-p 'interactive) (message "Current address is %d/0x%08x" hexl-address hexl-address)) hexl-address)) @@ -531,10 +565,18 @@ This function is intended to be used as eldoc callback." (let ((addr (hexl-current-address))) (format "Current address is %d/0x%08x" addr addr))) +(defun hexl-ascii-start-column () + "Column at which the ascii portion of the hexl display starts." + (+ 43 (/ 128 hexl-bits))) + (defun hexl-address-to-marker (address) "Return buffer position for ADDRESS." (interactive "nAddress: ") - (+ (* (/ address 16) 68) 10 (point-min) (/ (* (% address 16) 5) 2))) + (let ((N (* (% address 16) 2))) + (+ (* (/ address 16) (hexl-line-displen)) ; hexl line no * display length + 10 ; 10 chars for the "address: " prefix + (point-min) ; base offset (point usually starts at 1, not 0) + (+ N (/ N (/ hexl-bits 4))) )) ) ; char offset into hexl display line (defun hexl-goto-address (address) "Go to hexl-mode (decimal) address ADDRESS. @@ -700,7 +742,7 @@ With prefix arg N, puts point N bytes of the way from the true beginning." (defun hexl-beginning-of-line () "Goto beginning of line in hexl mode." (interactive) - (goto-char (+ (* (/ (point) 68) 68) 11))) + (goto-char (+ (* (/ (point) (hexl-line-displen)) (hexl-line-displen)) 11))) (defun hexl-end-of-line () "Goto end of line in hexl mode." @@ -776,6 +818,17 @@ You may also type octal digits, to insert a character with that code." ;00000000: 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789ABCDEF +(defun hexl-options (&optional test) + "Combine `hexl-bits' with `hexl-options', altering `hexl-options' as needed +to produce the command line options to pass to the hexl command." + (let ((opts (or test hexl-options))) + (when (memq hexl-bits '(8 16 32 64)) + (when (string-match "\\(.*\\)-group-by-[0-9]+-bits\\(.*\\)" opts) + (setq opts (concat (match-string 1 opts) + (match-string 2 opts)))) + (setq opts (format "%s -group-by-%d-bits " opts hexl-bits)) ) + opts)) + ;;;###autoload (defun hexlify-buffer () "Convert a binary buffer to hexl format. @@ -798,7 +851,7 @@ This discards the buffer's undo information." (mapcar (lambda (s) (if (not (multibyte-string-p s)) s (encode-coding-string s locale-coding-system))) - (split-string hexl-options))) + (split-string (hexl-options)))) (if (> (point) (hexl-address-to-marker hexl-max-address)) (hexl-goto-address hexl-max-address)))) @@ -815,7 +868,7 @@ This discards the buffer's undo information." (buffer-undo-list t)) (apply 'call-process-region (point-min) (point-max) (expand-file-name hexl-program exec-directory) - t t nil "-de" (split-string hexl-options)))) + t t nil "-de" (split-string (hexl-options))))) (defun hexl-char-after-point () "Return char for ASCII hex digits at point." @@ -911,13 +964,12 @@ CH must be a unibyte character whose value is between 0 and 255." (error "Invalid character 0x%x -- must be in the range [0..255]" ch)) (let ((address (hexl-current-address t))) (while (> num 0) - (let ((hex-position - (+ (* (/ address 16) 68) - 10 (point-min) - (* 2 (% address 16)) - (/ (% address 16) 2))) + (let ((hex-position (hexl-address-to-marker address)) (ascii-position - (+ (* (/ address 16) 68) 51 (point-min) (% address 16))) + (+ (* (/ address 16) (hexl-line-displen)) + (hexl-ascii-start-column) + (point-min) + (% address 16))) at-ascii-position) (if (= (point) ascii-position) (setq at-ascii-position t)) @@ -933,7 +985,7 @@ CH must be a unibyte character whose value is between 0 and 255." (if at-ascii-position (progn (beginning-of-line) - (forward-char 51) + (forward-char (hexl-ascii-start-column)) (forward-char (% address 16))))) (setq num (1- num))))) @@ -1041,7 +1093,7 @@ This function is assumed to be used as callback function for `hl-line-mode'." (defun hexl-follow-ascii-find () "Find and highlight the ASCII element corresponding to current point." - (let ((pos (+ 51 + (let ((pos (+ (hexl-ascii-start-column) (- (point) (current-column)) (mod (hexl-current-address) 16)))) (move-overlay hexl-ascii-overlay pos (1+ pos)) @@ -1050,7 +1102,7 @@ This function is assumed to be used as callback function for `hl-line-mode'." (defun hexl-mode-ruler () "Return a string ruler for hexl mode." (let* ((highlight (mod (hexl-current-address) 16)) - (s " 87654321 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789abcdef") + (s (cdr (assq hexl-bits hexl-rulers))) (pos 0)) (set-text-properties 0 (length s) nil s) ;; Turn spaces in the header into stretch specs so they work @@ -1062,12 +1114,12 @@ This function is assumed to be used as callback function for `hl-line-mode'." `(space :align-to ,(1- pos)) s)) ;; Highlight the current column. - (put-text-property (+ 11 (/ (* 5 highlight) 2)) - (+ 13 (/ (* 5 highlight) 2)) - 'face 'highlight s) + (let ( (offset (+ (* 2 highlight) (/ (* 8 highlight) hexl-bits))) ) + (put-text-property (+ 11 offset) (+ 13 offset) 'face 'highlight s)) ;; Highlight the current ascii column - (put-text-property (+ 13 39 highlight) (+ 13 40 highlight) - 'face 'highlight s) + (put-text-property (+ (hexl-ascii-start-column) highlight 1) + (+ (hexl-ascii-start-column) highlight 2) + 'face 'highlight s) s)) ;; startup stuff. diff --git a/lisp/image.el b/lisp/image.el index be1b1ef8f48..348c208781e 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -412,7 +412,8 @@ means display it in the right marginal area." (prop (if (null area) image (list (list 'margin area) image)))) (put-text-property 0 (length string) 'display prop string) (overlay-put overlay 'put-image t) - (overlay-put overlay 'before-string string)))) + (overlay-put overlay 'before-string string) + overlay))) ;;;###autoload @@ -684,26 +685,16 @@ The minimum delay between successive frames is 0.01s." image n count time-elapsed limit)))) -(defcustom imagemagick-types-inhibit - '(C HTML HTM TXT PDF) - "ImageMagick types that should not be visited in Image mode. -This should be a list of symbols, each of which should be one of -the ImageMagick types listed in `imagemagick-types'. These image -types are not registered by `imagemagick-register-types'. - -If Emacs is compiled without ImageMagick support, this variable -has no effect." - :type '(choice (const :tag "Let ImageMagick handle all types it can" nil) - (repeat symbol)) - ;; Ideally, would have a :set function that checks if we already did - ;; imagemagick-register-types, and if so undoes it, then redoes it. - :version "24.1" - :group 'image) +(defvar imagemagick--file-regexp nil + "File extension regexp for ImageMagick files, if any. +This is the extension installed into `auto-mode-alist' and +`image-type-file-name-regexps' by `imagemagick-register-types'.") ;;;###autoload (defun imagemagick-register-types () "Register file types that can be handled by ImageMagick. -This registers the ImageMagick types listed in `imagemagick-types', +This function is called at startup, after loading the init file. +It registers the ImageMagick types listed in `imagemagick-types', excluding those listed in `imagemagick-types-inhibit'. Registered image types are added to `auto-mode-alist', so that @@ -713,14 +704,45 @@ recognizes these files as having image type `imagemagick'. If Emacs is compiled without ImageMagick support, do nothing." (when (fboundp 'imagemagick-types) - (let ((im-types '())) - (dolist (im-type (imagemagick-types)) - (unless (memq im-type imagemagick-types-inhibit) - (push (downcase (symbol-name im-type)) im-types))) - (let ((extension (concat "\\." (regexp-opt im-types) "\\'"))) - (push (cons extension 'image-mode) auto-mode-alist) - (push (cons extension 'imagemagick) - image-type-file-name-regexps))))) + (let ((re (if (eq imagemagick-types-inhibit t) + ;; Use a bogus regexp to inhibit matches. + "\\'a" + (let ((types)) + (dolist (type (imagemagick-types)) + (unless (memq type imagemagick-types-inhibit) + (push (downcase (symbol-name type)) types))) + (concat "\\." (regexp-opt types) "\\'")))) + (ama-elt (car (member (cons imagemagick--file-regexp 'image-mode) + auto-mode-alist))) + (itfnr-elt (car (member (cons imagemagick--file-regexp 'imagemagick) + image-type-file-name-regexps)))) + (if ama-elt + (setcar ama-elt re) + (push (cons re 'image-mode) auto-mode-alist)) + (if itfnr-elt + (setcar itfnr-elt re) + (push (cons re 'imagemagick) image-type-file-name-regexps)) + (setq imagemagick--file-regexp re)))) + +(defcustom imagemagick-types-inhibit + '(C HTML HTM TXT PDF) + "List of ImageMagick types that should not be treated as images. +This should be a list of symbols, each of which should be one of +the ImageMagick types listed in `imagemagick-types'. The listed +image types are not registered by `imagemagick-register-types'. + +If the value is t, inhibit the use of ImageMagick for images. + +If Emacs is compiled without ImageMagick support, this variable +has no effect." + :type '(choice (const :tag "Support all ImageMagick types" nil) + (const :tag "Disable all ImageMagick types" t) + (repeat symbol)) + :set (lambda (symbol value) + (set-default symbol value) + (imagemagick-register-types)) + :version "24.1" + :group 'image) (provide 'image) diff --git a/lisp/imenu.el b/lisp/imenu.el index 8363956355b..12ac3540925 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -280,13 +280,13 @@ The function in this variable is called when selecting a normal index-item.") ;; `(and ;; imenu-scanning-message ;; (let ((pos ,(if relpos -;; relpos -;; `(imenu--relative-position ,reverse)))) -;; (if ,(if relpos t -;; `(> pos (+ 5 ,prevpos))) -;; (progn -;; (message imenu-scanning-message pos) -;; (setq ,prevpos pos))))) +;; relpos +;; `(imenu--relative-position ,reverse)))) +;; (if ,(if relpos t +;; `(> pos (+ 5 ,prevpos))) +;; (progn +;; (message imenu-scanning-message pos) +;; (setq ,prevpos pos))))) ) @@ -338,13 +338,10 @@ Don't move point." (let ((index-alist '()) (index-var-alist '()) (index-type-alist '()) - (index-unknown-alist '()) - prev-pos) + (index-unknown-alist '())) (goto-char (point-max)) - (imenu-progress-message prev-pos 0) ;; Search for the function (while (beginning-of-defun) - (imenu-progress-message prev-pos nil t) (save-match-data (and (looking-at "(def") (save-excursion @@ -371,7 +368,6 @@ Don't move point." (forward-sexp 2) (push (imenu-example--name-and-position) index-unknown-alist))))))) - (imenu-progress-message prev-pos 100) (and index-var-alist (push (cons "Variables" index-var-alist) index-alist)) @@ -396,15 +392,13 @@ Don't move point." (defun imenu-example--create-c-index (&optional regexp) (let ((index-alist '()) - prev-pos char) + char) (goto-char (point-min)) - (imenu-progress-message prev-pos 0) ;; Search for the function (save-match-data (while (re-search-forward (or regexp imenu-example--function-name-regexp-c) nil t) - (imenu-progress-message prev-pos) (backward-up-list 1) (save-excursion (goto-char (scan-sexps (point) 1)) @@ -412,7 +406,6 @@ Don't move point." ;; Skip this function name if it is a prototype declaration. (if (not (eq char ?\;)) (push (imenu-example--name-and-position) index-alist)))) - (imenu-progress-message prev-pos 100) (nreverse index-alist))) (make-obsolete 'imenu-example--create-c-index "your own" "23.2") @@ -684,22 +677,19 @@ The alternate method, which is the one most often used, is to call (cond ((and imenu-prev-index-position-function imenu-extract-index-name-function) (let ((index-alist '()) (pos (point)) - prev-pos name) + name) (goto-char (point-max)) - (imenu-progress-message prev-pos 0 t) ;; Search for the function (while (funcall imenu-prev-index-position-function) (when (= pos (point)) (error "Infinite loop at %s:%d: imenu-prev-index-position-function does not move point" (buffer-name) pos)) (setq pos (point)) - (imenu-progress-message prev-pos nil t) (save-excursion (setq name (funcall imenu-extract-index-name-function))) (and (stringp name) ;; [ydi] updated for imenu-use-markers (push (cons name (if imenu-use-markers (point-marker) (point))) index-alist))) - (imenu-progress-message prev-pos 100 t) index-alist)) ;; Use generic expression if possible. ((and imenu-generic-expression) @@ -765,7 +755,6 @@ They may also be nested index alists like: depending on PATTERNS." (let ((index-alist (list 'dummy)) - prev-pos (case-fold-search (if (or (local-variable-p 'imenu-case-fold-search) (not (local-variable-p 'font-lock-defaults))) imenu-case-fold-search @@ -782,7 +771,6 @@ depending on PATTERNS." (modify-syntax-entry c (cdr syn) table)) (car syn)))) (goto-char (point-max)) - (imenu-progress-message prev-pos 0 t) (unwind-protect ; for syntax table (save-match-data (set-syntax-table table) @@ -800,7 +788,17 @@ depending on PATTERNS." (goto-char (point-max)) (while (and (if (functionp regexp) (funcall regexp) - (re-search-backward regexp nil t)) + (and + (re-search-backward regexp nil t) + ;; Do not count invisible definitions. + (let ((invis (invisible-p (point)))) + (or (not invis) + (progn + (while (and invis + (not (bobp))) + (setq invis (not (re-search-backward + regexp nil 'move)))) + (not invis)))))) ;; Exit the loop if we get an empty match, ;; because it means a bad regexp was specified. (not (= (match-beginning 0) (match-end 0)))) @@ -810,7 +808,6 @@ depending on PATTERNS." (goto-char (match-beginning index)) (beginning-of-line) (setq beg (point)) - (imenu-progress-message prev-pos nil t) ;; Add this sort of submenu only when we've found an ;; item for it, avoiding empty, duff menus. (unless (assoc menu-title index-alist) @@ -835,7 +832,6 @@ depending on PATTERNS." ;; keep making progress backwards. (goto-char start)))) (set-syntax-table old-table))) - (imenu-progress-message prev-pos 100 t) ;; Sort each submenu by position. ;; This is in case one submenu gets items from two different regexps. (dolist (item index-alist) @@ -963,7 +959,8 @@ See the command `imenu' for more information." imenu-generic-expression (not (eq imenu-create-index-function 'imenu-default-create-index-function))) - (unless (keymapp (lookup-key (current-local-map) [menu-bar index])) + (unless (and (current-local-map) + (keymapp (lookup-key (current-local-map) [menu-bar index]))) (let ((newmap (make-sparse-keymap))) (set-keymap-parent newmap (current-local-map)) (setq imenu--last-menubar-index-alist nil) @@ -1028,7 +1025,7 @@ to `imenu-update-menubar'.") (imenu item) nil)) -(defun imenu-default-goto-function (name position &optional rest) +(defun imenu-default-goto-function (_name position &optional _rest) "Move to the given position. NAME is ignored. POSITION is where to move. REST is also ignored. diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 99985fa72c7..c75ca8106ac 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -577,8 +577,6 @@ with L, LRE, or LRO Unicode bidi character type.") (setq from (+ from 2)))))) (set-case-syntax-pair ?Ÿ ?ÿ tbl) - (set-case-syntax-pair #x189 #x256 tbl) - (set-case-syntax-pair #x18A #x257 tbl) ;; In some languages, such as Turkish, U+0049 LATIN CAPITAL LETTER I ;; and U+0131 LATIN SMALL LETTER DOTLESS I make a case pair, and so @@ -594,6 +592,8 @@ with L, LRE, or LRO Unicode bidi character type.") (set-case-syntax-pair ?Ɓ ?ɓ tbl) (set-case-syntax-pair ?Ɔ ?ɔ tbl) + (set-case-syntax-pair ?Ɖ ?ɖ tbl) + (set-case-syntax-pair ?Ɗ ?ɗ tbl) (set-case-syntax-pair ?Ǝ ?ǝ tbl) (set-case-syntax-pair ?Ə ?ə tbl) (set-case-syntax-pair ?Ɛ ?ɛ tbl) @@ -622,6 +622,12 @@ with L, LRE, or LRO Unicode bidi character type.") (set-case-syntax-pair ?Dz ?dz tbl) (set-case-syntax-pair ?Ƕ ?ƕ tbl) (set-case-syntax-pair ?Ƿ ?ƿ tbl) + (set-case-syntax-pair ?Ⱥ ?ⱥ tbl) + (set-case-syntax-pair ?Ƚ ?ƚ tbl) + (set-case-syntax-pair ?Ⱦ ?ⱦ tbl) + (set-case-syntax-pair ?Ƀ ?ƀ tbl) + (set-case-syntax-pair ?Ʉ ?ʉ tbl) + (set-case-syntax-pair ?Ʌ ?ʌ tbl) ;; Latin Extended Additional (modify-category-entry '(#x1e00 . #x1ef9) ?l) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 6d609b67d63..02d37f86da0 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1834,7 +1834,11 @@ The default status is as follows: This sets the coding system priority and the default input method and sometimes other things. LANGUAGE-NAME should be a string which is the name of a language environment. For example, \"Latin-1\" -specifies the character set for the major languages of Western Europe." +specifies the character set for the major languages of Western Europe. + +If there is a prior value for `current-language-environment', this +runs the hook `exit-language-environment-hook'. After setting up +the new language environment, it runs `set-language-environment-hook'." (interactive (list (read-language-name nil "Set language environment (default English): "))) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 7bf15009687..1f88df52fd4 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -1754,8 +1754,9 @@ functions, so they won't be called at all." :type '(repeat function)) (defvar set-auto-coding-for-load nil - "Non-nil means look for `load-coding' property instead of `coding'. -This is used for loading and byte-compiling Emacs Lisp files.") + "Non-nil means respect a \"unibyte: t\" entry in file local variables. +Emacs binds this variable to t when loading or byte-compiling Emacs Lisp +files.") (defun auto-coding-alist-lookup (filename) "Return the coding system specified by `auto-coding-alist' for FILENAME." diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 70e6d4b69cb..4d69e2fdbcb 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -486,19 +486,15 @@ non-Quail commands." (setq translation-keymap (copy-keymap (if simple quail-simple-translation-keymap quail-translation-keymap))) - (while translation-keys - (define-key translation-keymap - (car (car translation-keys)) (cdr (car translation-keys))) - (setq translation-keys (cdr translation-keys)))) + (dolist (trans translation-keys) + (define-key translation-keymap (car trans) (cdr trans)))) (setq translation-keymap (if simple quail-simple-translation-keymap quail-translation-keymap))) (when conversion-keys (setq conversion-keymap (copy-keymap quail-conversion-keymap)) - (while conversion-keys - (define-key conversion-keymap - (car (car conversion-keys)) (cdr (car conversion-keys))) - (setq conversion-keys (cdr conversion-keys)))) + (dolist (conv conversion-keys) + (define-key conversion-keymap (car conv) (cdr conv)))) (quail-add-package (list name title (list nil) guidance (or docstring "") translation-keymap @@ -720,12 +716,11 @@ The command `quail-set-keyboard-layout' usually sets this variable." (setq quail-keyboard-layout-substitution subst-list) ;; If there are additional key locations, map them to missing ;; key locations. - (while missing-list + (dolist (missing missing-list) (while (and subst-list (cdr (car subst-list))) (setq subst-list (cdr subst-list))) (if subst-list - (setcdr (car subst-list) (car missing-list))) - (setq missing-list (cdr missing-list)))))) + (setcdr (car subst-list) missing)))))) (defcustom quail-keyboard-layout-type "standard" "Type of keyboard layout used in Quail base input method. @@ -806,9 +801,10 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'." (if translation (progn (if (consp translation) - (if (> (length (cdr translation)) 0) - (setq translation (aref (cdr translation) 0)) - (setq translation " "))) + (setq translation + (if (> (length (cdr translation)) 0) + (aref (cdr translation) 0) + " "))) (setq done-list (cons translation done-list))) (setq translation (aref kbd-layout i))) (aset layout i translation)) @@ -834,17 +830,19 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'." (if (< (if (stringp lower) (string-width lower) (char-width lower)) 2) (insert " ")) (if (characterp lower) - (if (eq (get-char-code-property lower 'general-category) 'Mn) - ;; Pad the left and right of non-spacing characters. - (setq lower (compose-string (string lower) 0 1 - (format "\t%c\t" lower))) - (setq lower (string lower)))) + (setq lower + (if (eq (get-char-code-property lower 'general-category) 'Mn) + ;; Pad the left and right of non-spacing characters. + (compose-string (string lower) 0 1 + (format "\t%c\t" lower)) + (string lower)))) (if (characterp upper) - (if (eq (get-char-code-property upper 'general-category) 'Mn) - ;; Pad the left and right of non-spacing characters. - (setq upper (compose-string (string upper) 0 1 - (format "\t%c\t" upper))) - (setq upper (string upper)))) + (setq upper + (if (eq (get-char-code-property upper 'general-category) 'Mn) + ;; Pad the left and right of non-spacing characters. + (compose-string (string upper) 0 1 + (format "\t%c\t" upper)) + (string upper)))) (insert (bidi-string-mark-left-to-right lower) (propertize " " 'invisible t) (bidi-string-mark-left-to-right upper)) @@ -1032,8 +1030,8 @@ the following annotation types are supported. (let ((map (list nil)) (decode-map (if (not no-decode-map) (list 'decode-map))) key trans) - (while l - (setq key (car (car l)) trans (car (cdr (car l))) l (cdr l)) + (dolist (el l) + (setq key (car el) trans (car (cdr el))) (quail-defrule-internal key trans map t decode-map props)) `(if (prog1 (quail-decode-map) (quail-install-map ',map)) @@ -1201,7 +1199,7 @@ function `quail-define-rules' for the detail." (if (stringp trans) (setq trans (string-to-vector trans)))) (let ((new (quail-vunion prevchars trans))) - (setq trans + (setq trans (if (equal new prevchars) ;; Nothing to change, get back to orig value. prev @@ -1215,10 +1213,8 @@ where VECTOR is a vector of candidates (character or string) for the translation, and INDEX points into VECTOR to specify the currently selected translation." (if (and def (symbolp def)) - (if (functionp def) - ;; DEF is a symbol of a function which returns valid translation. - (setq def (funcall def key len)) - (setq def nil))) + ;; DEF is a symbol of a function which returns valid translation. + (setq def (if (functionp def) (funcall def key len)))) (if (and (consp def) (not (vectorp (cdr def)))) (setq def (car def))) diff --git a/lisp/language/european.el b/lisp/language/european.el index b658f93d90f..259c06755a0 100644 --- a/lisp/language/european.el +++ b/lisp/language/european.el @@ -324,6 +324,14 @@ Latin-9 is sometimes nicknamed `Latin-0'.")) :mime-charset 'windows-1257) (define-coding-system-alias 'cp1257 'windows-1257) +(define-coding-system 'cp775 + "DOS codepage 775 (PC Baltic, MS-DOS Baltic Rim)" + :coding-type 'charset + :mnemonic ?D + :charset-list '(cp775) + :mime-charset 'cp775) +(define-coding-system-alias 'ibm775 'cp775) + (define-coding-system 'cp850 "DOS codepage 850 (Western European)" :coding-type 'charset diff --git a/lisp/loadup.el b/lisp/loadup.el index 2ba24c8fe37..f7ffa27a9ed 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -193,6 +193,8 @@ (if (fboundp 'x-create-frame) (progn (load "fringe") + ;; Needed by `imagemagick-register-types' + (load "emacs-lisp/regexp-opt") (load "image") (load "international/fontset") (load "dnd") diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 4e76e5cdb64..f35560841e2 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -1586,7 +1586,7 @@ messages to make sure it works as expected." ;; feedmail-buffer-to-binmail, feedmail-buffer-to-sendmail, and -;; feedmail-buffer-to-smptmail are the only things provided for values +;; feedmail-buffer-to-smtpmail are the only things provided for values ;; for the variable feedmail-buffer-eating-function. It's pretty easy ;; to write your own, though. (defun feedmail-buffer-to-binmail (prepped errors-to addr-listoid) diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 093050229c4..d2b9890805c 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -40,6 +40,9 @@ (require 'mail-utils) (require 'rfc2047) +(declare-function compilation--message->loc "compile" (cl-x) t) +(declare-function epa--find-coding-system-for-mime-charset "epa" (mime-charset)) + (defconst rmail-attribute-header "X-RMAIL-ATTRIBUTES" "The header that stores the Rmail attribute data.") @@ -3560,6 +3563,16 @@ does not pop any summary buffer." ;;;; *** Rmail Mailing Commands *** +(defun rmail-yank-current-message (buffer) + "Yank into the current buffer the current message of Rmail buffer BUFFER. +If BUFFER is swapped with its message viewer buffer, yank out of BUFFER. +If BUFFER is not swapped, yank out of its message viewer buffer." + (with-current-buffer buffer + (unless (rmail-buffers-swapped-p) + (setq buffer rmail-view-buffer))) + (insert-buffer buffer)) + + (defun rmail-start-mail (&optional noerase to subject in-reply-to cc replybuffer sendactions same-window other-headers) @@ -3571,7 +3584,8 @@ does not pop any summary buffer." (if replybuffer ;; The function used here must behave like insert-buffer wrt ;; point and mark (see doc of sc-cite-original). - (setq yank-action (list 'insert-buffer replybuffer))) + (setq yank-action + `(rmail-yank-current-message ,replybuffer))) (push (cons "cc" cc) other-headers) (push (cons "in-reply-to" in-reply-to) other-headers) (setq other-headers @@ -3587,7 +3601,7 @@ does not pop any summary buffer." (prog1 (compose-mail to subject other-headers noerase switch-function yank-action sendactions - `(rmail-mail-return ,replybuffer)) + (if replybuffer `(rmail-mail-return ,replybuffer))) (if (eq switch-function 'switch-to-buffer-other-frame) ;; This is not a standard frame parameter; nothing except ;; sendmail.el looks at it. @@ -3644,7 +3658,7 @@ to switch to." While composing the message, use \\[mail-yank-original] to yank the original message into it." (interactive) - (rmail-start-mail nil nil nil nil nil rmail-view-buffer)) + (rmail-start-mail nil nil nil nil nil rmail-buffer)) ;; FIXME should complain if there is nothing to continue. (defun rmail-continue () @@ -3731,9 +3745,7 @@ use \\[mail-yank-original] to yank the original message into it." (mail-strip-quoted-names (if (null cc) to (concat to ", " cc)))))) (if (string= cc-list "") nil cc-list))) - (if (rmail-buffers-swapped-p) - rmail-buffer - rmail-view-buffer) + rmail-buffer (list (list 'rmail-mark-message rmail-buffer (with-current-buffer rmail-buffer @@ -3835,7 +3847,7 @@ see the documentation of `rmail-resend'." (or (mail-fetch-field "Subject") "") "]"))) (if (rmail-start-mail - nil nil subject nil nil nil + nil nil subject nil nil rmail-buffer (list (list 'rmail-mark-message forward-buffer (with-current-buffer rmail-buffer diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index f8958a691b2..cd3862985bd 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -856,15 +856,17 @@ Prefix arg means don't delete this window." (defun mail-bury (&optional arg) "Bury this mail buffer." (let ((newbuf (other-buffer (current-buffer))) - (return-action mail-return-action) - some-rmail) + (return-action mail-return-action)) (bury-buffer (current-buffer)) ;; If there is an Rmail buffer, return to it nicely ;; even if this message was not started by an Rmail command. (unless return-action (dolist (buffer (buffer-list)) - (if (eq (buffer-local-value 'major-mode buffer) 'rmail-mode) - (setq return-action `(rmail-mail-return ,newbuf))))) + (if (and (eq (buffer-local-value 'major-mode buffer) 'rmail-mode) + (null return-action) + ;; Don't match message-viewer buffer. + (not (string-match "\\` " (buffer-name buffer)))) + (setq return-action `(rmail-mail-return ,buffer))))) (if (and (null arg) return-action) (apply (car return-action) (cdr return-action)) (switch-to-buffer newbuf)))) diff --git a/lisp/mail/unrmail.el b/lisp/mail/unrmail.el index af16bbf8c73..bf7b9abe2c1 100644 --- a/lisp/mail/unrmail.el +++ b/lisp/mail/unrmail.el @@ -61,8 +61,7 @@ For example, invoke `emacs -batch -f batch-unrmail RMAIL'." (error "This file is not in Babyl format")) ;; Decode the file contents just as Rmail did. - (let ((modifiedp (buffer-modified-p)) - (coding-system rmail-file-coding-system) + (let ((coding-system rmail-file-coding-system) from to) (goto-char (point-min)) (search-forward "\n\^_" nil t) ; Skip BABYL header. diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 2c3d0dc3803..f98b4a7490e 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,8 @@ +2012-04-21 Juanma Barranquero + + * mh-folder.el (top): Check whether which-func-modes is t before + adding mh-folder-mode. + 2011-11-20 Bill Wohler * Release MH-E version 8.3.1. diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index 71ef87385ca..d9e6c74f3f3 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el @@ -520,7 +520,7 @@ font-lock is done highlighting.") ;; Register mh-folder-mode as supporting which-function-mode... (mh-require 'which-func nil t) -(when (boundp 'which-func-modes) +(when (and (boundp 'which-func-modes) (listp which-func-modes)) (add-to-list 'which-func-modes 'mh-folder-mode)) ;; Shush compiler. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index bcc6a808d22..5a990f6ab35 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1506,7 +1506,7 @@ exit." (let ((map (make-sparse-keymap))) ;; FIXME: Only works if completion-in-region-mode was activated via ;; completion-at-point called directly. - (define-key map "?" 'completion-help-at-point) + (define-key map "\M-?" 'completion-help-at-point) (define-key map "\t" 'completion-at-point) map) "Keymap activated during `completion-in-region'.") @@ -1817,6 +1817,12 @@ same as `substitute-in-file-name'." (condition-case nil (cond ((eq action 'metadata) '(metadata (category . file))) + ((string-match-p "\\`~[^/\\]*\\'" string) + (completion-table-with-context "~" + (mapcar (lambda (u) (concat u "/")) + (system-users)) + (substring string 1) + pred action)) ((eq (car-safe action) 'boundaries) (let ((start (length (file-name-directory string))) (end (string-match-p "/" (cdr action)))) @@ -2045,6 +2051,21 @@ and `read-file-name-function'." (funcall (or read-file-name-function #'read-file-name-default) prompt dir default-filename mustmatch initial predicate)) +(defvar minibuffer-local-filename-syntax + (let ((table (make-syntax-table)) + (punctuation (car (string-to-syntax ".")))) + ;; Convert all punctuation entries to symbol. + (map-char-table (lambda (c syntax) + (when (eq (car syntax) punctuation) + (modify-syntax-entry c "_" table))) + table) + (mapc + (lambda (c) + (modify-syntax-entry c "." table)) + '(?/ ?: ?\\)) + table) + "Syntax table to be used in minibuffer for reading file name.") + ;; minibuffer-completing-file-name is a variable used internally in minibuf.c ;; to determine whether to use minibuffer-local-filename-completion-map or ;; minibuffer-local-completion-map. It shouldn't be exported to Elisp. @@ -2113,7 +2134,8 @@ See `read-file-name' for the meaning of the arguments." (lambda () (with-current-buffer (window-buffer (minibuffer-selected-window)) - (read-file-name--defaults dir initial))))) + (read-file-name--defaults dir initial)))) + (set-syntax-table minibuffer-local-filename-syntax)) (completing-read prompt 'read-file-name-internal pred mustmatch insdef 'file-name-history default-filename))) diff --git a/lisp/misc.el b/lisp/misc.el index 4706c918db3..cb52ecbd36e 100644 --- a/lisp/misc.el +++ b/lisp/misc.el @@ -138,6 +138,19 @@ variation of `C-x M-c M-butterfly' from url `http://xkcd.com/378/'." (defvar list-dynamic-libraries--loaded-only-p) (make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p) +(defun list-dynamic-libraries--loaded (from) + "Compute the \"Loaded from\" column. +Internal use only." + (if from + (let ((name (car from)) + (path (or (cdr from) ""))) + ;; This is a roundabout way to change the tooltip without + ;; having to replace the default printer function + (propertize name + 'display (propertize name + 'help-echo (concat "Loaded from: " path)))) + "")) + (defun list-dynamic-libraries--refresh () "Recompute the list of dynamic libraries. Internal use only." @@ -159,7 +172,7 @@ Internal use only." (when (or from (not list-dynamic-libraries--loaded-only-p)) (push (list id (vector (symbol-name id) - (or from "") + (list-dynamic-libraries--loaded from) (mapconcat 'identity (cdr lib) ", "))) tabulated-list-entries))))) diff --git a/lisp/mouse.el b/lisp/mouse.el index 2e119483797..8e08f89f22c 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1,6 +1,6 @@ ;;; mouse.el --- window system-independent mouse support -;; Copyright (C) 1993-1995, 1999-2012 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 1999-2012 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: hardware, mouse @@ -194,8 +194,7 @@ items `Turn Off' and `Help'." (newmap (if ancestor (make-sparse-keymap (concat (format-mode-line mode-name) " Mode")) - menu-bar-edit-menu)) - uniq) + menu-bar-edit-menu))) (if ancestor (set-keymap-parent newmap ancestor)) newmap)) @@ -805,8 +804,8 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by (= click-count 1))) ;; Suppress automatic hscrolling, because that is a nuisance ;; when setting point near the right fringe (but see below). - (automatic-hscrolling-saved automatic-hscrolling) - (automatic-hscrolling nil) + (auto-hscroll-mode-saved auto-hscroll-mode) + (auto-hscroll-mode nil) event end end-point) (setq mouse-selection-click-count click-count) @@ -838,7 +837,7 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by ;; Automatic hscrolling did not occur during the call to ;; `read-event'; but if the user subsequently drags the ;; mouse, go ahead and hscroll. - (let ((automatic-hscrolling automatic-hscrolling-saved)) + (let ((auto-hscroll-mode auto-hscroll-mode-saved)) (redisplay)) (setq end (event-end event) end-point (posn-point end)) diff --git a/lisp/mpc.el b/lisp/mpc.el index 614f2bd6806..d2203a4deab 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -1,6 +1,6 @@ ;;; mpc.el --- A client for the Music Player Daemon -*- coding: utf-8; lexical-binding: t -*- -;; Copyright (C) 2006-2012 Free Software Foundation, Inc. +;; Copyright (C) 2006-2012 Free Software Foundation, Inc. ;; Author: Stefan Monnier ;; Keywords: multimedia @@ -184,10 +184,7 @@ numerically rather than lexicographically." (abs res)) res)))))))) -(defun mpc-string-prefix-p (str1 str2) - ;; FIXME: copied from pcvs-util.el. - "Tell whether STR1 is a prefix of STR2." - (eq t (compare-strings str2 nil (length str1) str1 nil nil))) +(define-obsolete-function-alias 'mpc-string-prefix-p 'string-prefix-p "24.2") ;; This can speed up mpc--song-search significantly. The table may grow ;; very large, tho. It's only bounded by the fact that it gets flushed @@ -1690,7 +1687,7 @@ Return non-nil if a selection was deactivated." (process-put (mpc-proc) prop (delq nil (mapcar (lambda (x) - (if (mpc-string-prefix-p name x) + (if (string-prefix-p name x) nil x)) new))))) (mpc-tagbrowser-refresh))) diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 0bfc8eda3b1..62c0e317a81 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -467,7 +467,7 @@ commands reverses the effect of this variable. Requires Netscape version ;; it in anonymous cases. If it's not anonymous the next regexp ;; applies. ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/") - ,@(if (memq system-type '(windows-nt ms-dos cygwin)) + ,@(if (memq system-type '(windows-nt ms-dos)) '(("^\\([a-zA-Z]:\\)[\\/]" . "file:///\\1/") ("^[\\/][\\/]+" . "file://"))) ("^/+" . "file:///")) @@ -724,12 +724,6 @@ interactively. Turn the filename into a URL with function (defun browse-url-file-url (file) "Return the URL corresponding to FILE. Use variable `browse-url-filename-alist' to map filenames to URLs." - ;; De-munge Cygwin filenames before passing them to Windows browser. - (if (eq system-type 'cygwin) - (let ((winfile (with-output-to-string - (call-process "cygpath" nil standard-output - nil "-m" file)))) - (setq file (substring winfile 0 -1)))) (let ((coding (and (default-value 'enable-multibyte-characters) (or file-name-coding-system default-file-name-coding-system)))) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index feef78a305f..e3144a53fab 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -37,6 +37,7 @@ (declare-function dbus-init-bus "dbusbind.c") (declare-function dbus-method-return-internal "dbusbind.c") (declare-function dbus-method-error-internal "dbusbind.c") +(declare-function dbus-register-service "dbusbind.c") (declare-function dbus-register-signal "dbusbind.c") (declare-function dbus-register-method "dbusbind.c") (declare-function dbus-send-signal "dbusbind.c") @@ -275,8 +276,7 @@ usage: (dbus-name-owner-changed-handler service old-owner new-owner)" (stringp (cadr args)) (stringp (caddr args))) (let ((service (car args)) - (old-owner (cadr args)) - (new-owner (caddr args))) + (old-owner (cadr args))) ;; Check whether SERVICE is a known name. (when (not (string-match "^:" service)) (maphash diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index 7a3d47ef1d1..81d05eabc5a 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el @@ -125,9 +125,8 @@ values: certificate. This parameter will only be used when doing TLS or STARTTLS connections. -If :use-starttls-if-possible is non-nil, do opportunistic -STARTTLS upgrades even if Emacs doesn't have built-in TLS -functionality. +:use-starttls-if-possible is a boolean that says to do opportunistic +STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality. :nowait is a boolean that says the connection should be made asynchronously, if possible." diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 9d7e8664542..1898b3d074f 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -361,6 +361,14 @@ of a line. The string is passed as the first argument to :type 'string :group 'rcirc) +(defcustom rcirc-kill-channel-buffers nil + "When non-nil, kill channel buffers when the server buffer is killed. +Only the channel buffers associated with the server in question +will be killed." + :version "24.2" + :type 'boolean + :group 'rcirc) + (defvar rcirc-nick nil) (defvar rcirc-prompt-start-marker nil) @@ -471,7 +479,8 @@ If ARG is non-nil, instead prompt for connection parameters." rcirc-default-full-name)) (channels (plist-get (cdr c) :channels)) (password (plist-get (cdr c) :password)) - (encryption (plist-get (cdr c) :encryption))) + (encryption (plist-get (cdr c) :encryption)) + contact) (when server (let (connected) (dolist (p (rcirc-process-list)) @@ -483,10 +492,11 @@ If ARG is non-nil, instead prompt for connection parameters." full-name channels password encryption) (quit (message "Quit connecting to %s" server))) (with-current-buffer (process-buffer connected) - (setq connected-servers - (cons (process-contact (get-buffer-process - (current-buffer)) :host) - connected-servers)))))))) + (setq contact (process-contact + (get-buffer-process (current-buffer)) :host)) + (setq connected-servers + (cons (if (stringp contact) contact server) + connected-servers)))))))) (when connected-servers (message "Already connected to %s" (if (cdr connected-servers) @@ -1088,12 +1098,20 @@ Logfiles are kept in `rcirc-log-directory'." :group 'rcirc) (defun rcirc-kill-buffer-hook () - "Part the channel when killing an rcirc buffer." + "Part the channel when killing an rcirc buffer. + +If `rcirc-kill-channel-buffers' is non-nil and the killed buffer +is a server buffer, kills all of the channel buffers associated +with it." (when (eq major-mode 'rcirc-mode) (when (and rcirc-log-flag rcirc-log-directory) (rcirc-log-write)) - (rcirc-clean-up-buffer "Killed buffer"))) + (rcirc-clean-up-buffer "Killed buffer") + (when (and rcirc-buffer-alist ;; it's a server buffer + rcirc-kill-channel-buffers) + (dolist (channel rcirc-buffer-alist) + (kill-buffer (cdr channel)))))) (defun rcirc-change-major-mode-hook () "Part the channel when changing the major-mode." @@ -2165,17 +2183,13 @@ CHANNELS is a comma- or space-separated string of channel names." (let ((channel (if (> (length channel) 0) channel target))) (rcirc-send-string process (concat "PART " channel " :" rcirc-id-string)))) -(defun-rcirc-command quit (reason all) - "Send a quit message to server with REASON. -When called with prefix, quit all servers." - (interactive "sQuit reason: \nP") - (dolist (p (if all - (rcirc-process-list) - (list process))) - (rcirc-send-string p (concat "QUIT :" - (if (not (zerop (length reason))) - reason - rcirc-id-string))))) +(defun-rcirc-command quit (reason) + "Send a quit message to server with REASON." + (interactive "sQuit reason: ") + (rcirc-send-string process (concat "QUIT :" + (if (not (zerop (length reason))) + reason + rcirc-id-string)))) (defun-rcirc-command nick (nick) "Change nick to NICK." diff --git a/lisp/net/tls.el b/lisp/net/tls.el index d232095444b..75d178e3225 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -231,8 +231,7 @@ Fourth arg PORT is an integer specifying a port to connect to." ?h host ?p (if (integerp port) (int-to-string port) - port)))) - response) + port))))) (message "Opening TLS connection with `%s'..." formatted-cmd) (setq process (start-process name buffer shell-file-name shell-command-switch diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5b4ea1e6f17..95848ac34ea 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3133,11 +3133,12 @@ beginning of local filename are not substituted." (defun tramp-action-password (proc vec) "Query the user for a password." (with-current-buffer (process-buffer proc) - (tramp-check-for-regexp proc tramp-password-prompt-regexp) - (tramp-message vec 3 "Sending %s" (match-string 1)) - (tramp-enter-password proc) - ;; Hide password prompt. - (narrow-to-region (point-max) (point-max)))) + (let ((enable-recursive-minibuffers t)) + (tramp-check-for-regexp proc tramp-password-prompt-regexp) + (tramp-message vec 3 "Sending %s" (match-string 1)) + (tramp-enter-password proc) + ;; Hide password prompt. + (narrow-to-region (point-max) (point-max))))) (defun tramp-action-succeed (proc vec) "Signal success in finding shell prompt." diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 37a76e0309c..0862427c3ba 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -269,6 +269,19 @@ makes the comment easier to read. Default is 1. nil means 0." :type '(choice string integer (const nil)) :group 'comment) +(defcustom comment-inline-offset 1 + "Inline comments have to be preceded by at least this many spaces. +This is useful when style-conventions require a certain minimal offset. +Python's PEP8 for example recommends two spaces, so you could do: + +\(add-hook 'python-mode-hook + (lambda () (set (make-local-variable 'comment-inline-offset) 2))) + +See `comment-padding' for whole-line comments." + :version "24.2" + :type 'integer + :group 'comment) + ;;;###autoload (defcustom comment-multi-line nil "Non-nil means `comment-indent-new-line' continues comments. @@ -587,7 +600,7 @@ Point is expected to be at the start of the comment." (save-excursion (end-of-line) (current-column))))) (other nil) (min (save-excursion (skip-chars-backward " \t") - (if (bolp) 0 (1+ (current-column)))))) + (if (bolp) 0 (+ comment-inline-offset (current-column)))))) ;; Fix up the range. (if (< max min) (setq max min)) ;; Don't move past the fill column. @@ -687,7 +700,8 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any." (save-excursion (skip-chars-backward " \t") (unless (bolp) - (setq indent (max indent (1+ (current-column)))))) + (setq indent (max indent + (+ (current-column) comment-inline-offset))))) ;; If that's different from comment's current position, change it. (unless (= (current-column) indent) (delete-region (point) (progn (skip-chars-backward " \t") (point))) diff --git a/lisp/nxml/nxml-mode.el b/lisp/nxml/nxml-mode.el index f9122e7245e..5adafc3845c 100644 --- a/lisp/nxml/nxml-mode.el +++ b/lisp/nxml/nxml-mode.el @@ -1236,7 +1236,7 @@ on the line, reindent the line." (unless arg (if nxml-slash-auto-complete-flag (if end-tag-p - (condition-case err + (condition-case nil (let ((start-tag-end (nxml-scan-element-backward (1- slash-pos) t))) (when start-tag-end @@ -1434,7 +1434,7 @@ its line. Otherwise return nil." (nxml-token-after) (= xmltok-start bol)) (eq xmltok-type 'data)) - (condition-case err + (condition-case nil (nxml-scan-element-backward (point) nil @@ -1559,8 +1559,7 @@ This expects the xmltok-* variables to be set up as by `xmltok-forward'." (off 0)) (if value-boundary ;; inside an attribute value - (let ((value-start (car value-boundary)) - (value-end (cdr value-boundary))) + (let ((value-start (car value-boundary))) (goto-char pos) (forward-line -1) (if (< (point) value-start) @@ -1753,7 +1752,7 @@ single name. A character reference contains a character number." xmltok-name-end) (t end))) -(defun nxml-scan-backward-within (end) +(defun nxml-scan-backward-within (_end) (setq xmltok-start (+ xmltok-start (nxml-start-delimiter-length xmltok-type))) @@ -2263,7 +2262,7 @@ ENDP is t in the former case, nil in the latter." 'nxml-in-mixed-content-hook)) nil) ;; See if the matching tag does not start or end a line. - ((condition-case err + ((condition-case nil (progn (setq matching-tag-pos (xmltok-save @@ -2401,7 +2400,7 @@ Repeating \\[nxml-dynamic-markup-word] immediately after successful \\[nxml-dynamic-markup-word] removes the previously inserted markup and attempts to find another possible way to do the markup." (interactive "*") - (let (search-start-pos done) + (let (search-start-pos) (if (and (integerp nxml-dynamic-markup-prev-pos) (= nxml-dynamic-markup-prev-pos (point)) (eq last-command this-command) diff --git a/lisp/mail/mailpost.el b/lisp/obsolete/mailpost.el similarity index 99% rename from lisp/mail/mailpost.el rename to lisp/obsolete/mailpost.el index 7c4bea830d8..158523e8ef2 100644 --- a/lisp/mail/mailpost.el +++ b/lisp/obsolete/mailpost.el @@ -9,6 +9,7 @@ ;; Maintainer: FSF ;; Created: 13 Jan 1986 ;; Keywords: mail +;; Obsolete-since: 24.2 ;;; Commentary: diff --git a/lisp/mouse-sel.el b/lisp/obsolete/mouse-sel.el similarity index 99% rename from lisp/mouse-sel.el rename to lisp/obsolete/mouse-sel.el index 6323ef03696..45396d30ea5 100644 --- a/lisp/mouse-sel.el +++ b/lisp/obsolete/mouse-sel.el @@ -4,6 +4,7 @@ ;; Author: Mike Williams ;; Keywords: mouse +;; Obsolete-since: 24.2 ;; This file is part of GNU Emacs. @@ -262,6 +263,8 @@ kill ring; mouse-1 or mouse-3 kills it." interprogram-paste-function mouse-sel-original-interprogram-paste-function)))) +(make-obsolete 'mouse-sel-mode "use the normal mouse modes" "24.2") + ;;=== Internal Variables/Constants ======================================== (defvar mouse-sel-primary-thing nil diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 618d5753a46..86f493a0a5b 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,3 +1,49 @@ +2012-04-14 Bastien Guerry + + * org.el (org-point-at-end-of-empty-headline): Only try to match + `org-todo-line-regexp' when the value is non-nil, e.g. in non-org + modes. + (org-fontify-meta-lines-and-blocks-1): Prevent errors when trying + to fontify beyond (point-max). + + * org-clock.el (org-clock-task-overrun-text) + (org-task-overrun, org-clock-get-clock-string) + (org-clock-update-mode-line) + (org-clock-notify-once-if-expired): Rename `org-task-overrun' + and `org-task-overrun-text' to `org-clock-task-overrun' and + `org-clock-task-overrun-text' respectively. + (org-task-overrun-text): New alias. + + * org-table.el (org-table-eval-formula): Fix bug about handling + remote references as durations. + (org-table-get-range): Fix bug: make sure references to $0 are + correctly handled. + + * org-pcomplete.el (pcomplete/org-mode/file-option): + Fix bug in `pcomplete/org-mode/file-option'. + (org-thing-at-point): Also match line options like LATEX_CLASS + when pcompleting from LATEX_. + + * org-agenda.el (org-agenda-filter-make-matcher) + (org-agenda-filter-apply): Allow filtering entries out by + category. Using `C-u <' from the agenda view will redisplay + the agenda without entries from categories of the current line. + +2012-04-14 Eric Schulte + + * ob-C.el (org-babel-C-ensure-main-wrap): + Add an explicit return to automatically generated main methods. + +2012-04-14 Matt Lundin + + * org.el (org-after-todo-state-change-hook): + Fix docstring to reflect name change of state to `org-state'. + +2012-04-14 Mike Sperber (tiny change) + + * org-footnote.el (org-footnote-normalize): + Correctly pass keyword arguments to `org-export-preprocess-string'. + 2012-04-03 Bastien Guerry * org.el (org-todo): Fix regression: rename `state' to diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el index 5f6c1cb1dd1..583510ac618 100644 --- a/lisp/org/ob-C.el +++ b/lisp/org/ob-C.el @@ -152,7 +152,7 @@ it's header arguments." "Wrap body in a \"main\" function call if none exists." (if (string-match "^[ \t]*[intvod]+[ \t\n\r]*main[ \t]*(.*)" body) body - (format "int main() {\n%s\n}\n" body))) + (format "int main() {\n%s\nreturn(0);\n}\n" body))) (defun org-babel-prep-session:C (session params) "This function does nothing as C is a compiled language with no diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 324ddd27f9a..3bb0fc84897 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -6365,7 +6365,9 @@ to switch to narrowing." (dolist (x (delete-dups (append (get 'org-agenda-category-filter :preset-filter) org-agenda-category-filter))) - (setq f1 (list 'equal (substring x 1) 'cat)) + (if (equal "-" (substring x 0 1)) + (setq f1 (list 'not (list 'equal (substring x 1) 'cat))) + (setq f1 (list 'equal (substring x 1) 'cat))) (push f1 f)) (cons 'and (nreverse f)))) @@ -6396,9 +6398,13 @@ If the line does not have an effort defined, return nil." (let (tags cat) (if (eq type 'tag) (setq org-agenda-tag-filter filter) - (setq org-agenda-category-filter filter - org-agenda-filtered-by-category t)) + (setq org-agenda-category-filter filter)) (setq org-agenda-filter-form (org-agenda-filter-make-matcher)) + (if (and (eq type 'category) + (not (equal (substring (car filter) 0 1) "-"))) + ;; Only set `org-agenda-filtered-by-category' to t + ;; when a unique category is used as the filter + (setq org-agenda-filtered-by-category t)) (org-agenda-set-mode-name) (save-excursion (goto-char (point-min)) @@ -6412,7 +6418,7 @@ If the line does not have an effort defined, return nil." (beginning-of-line 2)) (beginning-of-line 2)))) (if (get-char-property (point) 'invisible) - (org-agenda-previous-line)))) + (ignore-errors (org-agenda-previous-line))))) (defun org-agenda-filter-hide-line (type) (let (ov) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 7105bfe13dc..434f6a1d5f6 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -219,7 +219,8 @@ auto Automatically, either `all', or `repeat' for repeating tasks" (const :tag "All task time" all) (const :tag "Automatically, `all' or since `repeat'" auto))) -(defcustom org-task-overrun-text nil +(defvaralias 'org-task-overrun-text 'org-clock-task-overrun-text) +(defcustom org-clock-task-overrun-text nil "The extra modeline text that should indicate that the clock is overrun. The can be nil to indicate that instead of adding text, the clock time should get a different face (`org-mode-line-clock-overrun'). @@ -495,7 +496,7 @@ pointing to it." (insert (format "[%c] %-15s %s\n" i cat task)) (cons i marker))))) -(defvar org-task-overrun nil +(defvar org-clock-task-overrun nil "Internal flag indicating if the clock has overrun the planned time.") (defvar org-clock-update-period 60 "Number of seconds between mode line clock string updates.") @@ -516,7 +517,7 @@ If not, show simply the clocked time like 01:50." (work-done-str (org-propertize (format org-time-clocksum-format h m) - 'face (if (and org-task-overrun (not org-task-overrun-text)) + 'face (if (and org-clock-task-overrun (not org-clock-task-overrun-text)) 'org-mode-line-clock-overrun 'org-mode-line-clock))) (effort-str (format org-time-clocksum-format effort-h effort-m)) (clockstr (org-propertize @@ -532,7 +533,7 @@ If not, show simply the clocked time like 01:50." (defun org-clock-update-mode-line () (if org-clock-effort (org-clock-notify-once-if-expired) - (setq org-task-overrun nil)) + (setq org-clock-task-overrun nil)) (setq org-mode-line-string (org-propertize (let ((clock-string (org-clock-get-clock-string)) @@ -546,10 +547,10 @@ If not, show simply the clocked time like 01:50." 'local-map org-clock-mode-line-map 'mouse-face (if (featurep 'xemacs) 'highlight 'mode-line-highlight) )) - (if (and org-task-overrun org-task-overrun-text) + (if (and org-clock-task-overrun org-clock-task-overrun-text) (setq org-mode-line-string (concat (org-propertize - org-task-overrun-text + org-clock-task-overrun-text 'face 'org-mode-line-clock-overrun) org-mode-line-string))) (force-mode-line-update)) @@ -606,7 +607,7 @@ Notification is shown only once." (when (org-clocking-p) (let ((effort-in-minutes (org-duration-string-to-minutes org-clock-effort)) (clocked-time (org-clock-get-clocked-time))) - (if (setq org-task-overrun + (if (setq org-clock-task-overrun (if (or (null effort-in-minutes) (zerop effort-in-minutes)) nil (>= clocked-time effort-in-minutes))) diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index 34fc31f39d6..9319e0813c0 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el @@ -704,7 +704,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor': (org-combine-plists export-props '(:todo-keywords t :tags t :priority t)))) - (org-export-preprocess-string def parameters)) + (apply #'org-export-preprocess-string def parameters)) def) ;; Reference beginning position is a marker ;; to preserve it during further buffer diff --git a/lisp/org/org-pcomplete.el b/lisp/org/org-pcomplete.el index 0ca8777878c..5950d8e26da 100644 --- a/lisp/org/org-pcomplete.el +++ b/lisp/org/org-pcomplete.el @@ -69,7 +69,7 @@ The return value is a string naming the thing at point." (re-search-backward "^[ \t]*#\\+\\([A-Z_]+\\):.*" (line-beginning-position) t)) (cons "file-option" (match-string-no-properties 1))) - ((string-match "\\`[ \t]*#\\+[a-zA-Z]*\\'" line-to-here) + ((string-match "\\`[ \t]*#\\+[a-zA-Z_]*\\'" line-to-here) (cons "file-option" nil)) ((equal (char-before beg) ?\[) (cons "link" nil)) @@ -144,7 +144,7 @@ When completing for #+STARTUP, for example, this function returns (if (string-match "^#\\+\\([A-Z_]+:?\\)" x) (match-string 1 x))) (org-split-string (org-get-current-options) "\n")) - org-additional-option-like-keywords))))) + (copy-sequence org-additional-option-like-keywords)))))) (substring pcomplete-stub 2))) (defvar org-startup-options) diff --git a/lisp/org/org-special-blocks.el b/lisp/org/org-special-blocks.el index 5bf8362357f..43b37c64016 100644 --- a/lisp/org/org-special-blocks.el +++ b/lisp/org/org-special-blocks.el @@ -80,17 +80,17 @@ seen. This is run after a few special cases are taken care of." (add-hook 'org-export-latex-after-blockquotes-hook 'org-special-blocks-convert-latex-special-cookies) -(defvar org-special-blocks-line) +(defvar line) (defun org-special-blocks-convert-html-special-cookies () "Converts the special cookies into div blocks." - ;; Uses the dynamically-bound variable `org-special-blocks-line'. - (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-special-blocks-line) + ;; Uses the dynamically-bound variable `line'. + (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" line) (message "%s" (match-string 1)) - (when (equal (match-string 2 org-special-blocks-line) "START") + (when (equal (match-string 2 line) "START") (org-close-par-maybe) - (insert "\n
") + (insert "\n
") (org-open-par)) - (when (equal (match-string 2 org-special-blocks-line) "END") + (when (equal (match-string 2 line) "END") (org-close-par-maybe) (insert "\n
") (org-open-par)) diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index ae12cee2abe..08981b57e49 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -2526,8 +2526,13 @@ not overwrite the stored one." (replace-match (save-match-data (org-table-make-reference - (org-table-get-remote-range - (match-string 1 form) (match-string 2 form)) + (let ((rmtrng (org-table-get-remote-range + (match-string 1 form) (match-string 2 form)))) + (if duration + (if (listp rmtrng) + (mapcar (lambda(x) (org-table-time-string-to-seconds x)) rmtrng) + (org-table-time-string-to-seconds rmtrng)) + rmtrng)) keep-empty numbers lispp)) t t form))) ;; Insert complex ranges @@ -2663,8 +2668,8 @@ in the buffer and column1 and column2 are table column numbers." ; (setq r2 (or r2 r1) c2 (or c2 c1)) (if (not r1) (setq r1 thisline)) (if (not r2) (setq r2 thisline)) - (if (not c1) (setq c1 col)) - (if (not c2) (setq c2 col)) + (if (or (not c1) (= 0 c1)) (setq c1 col)) + (if (or (not c2) (= 0 c2)) (setq c2 col)) (if (and (not corners-only) (or (not rangep) (and (= r1 r2) (= c1 c2)))) ;; just one field diff --git a/lisp/org/org.el b/lisp/org/org.el index 0f13223d0c1..c2cc2354439 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -6,7 +6,7 @@ ;; Maintainer: Bastien Guerry ;; Keywords: outlines, hypermedia, calendar, wp ;; Homepage: http://orgmode.org -;; Version: 7.8.08 +;; Version: 7.8.09 ;; ;; This file is part of GNU Emacs. ;; @@ -206,7 +206,7 @@ identifier." ;;; Version -(defconst org-version "7.8.08" +(defconst org-version "7.8.09" "The version number of the file org.el.") ;;;###autoload @@ -2225,7 +2225,7 @@ property and include the word \"recursive\" into the value." (defcustom org-after-todo-state-change-hook nil "Hook which is run after the state of a TODO item was changed. The new state (a string with a TODO keyword, or nil) is available in the -Lisp variable `state'." +Lisp variable `org-state'." :group 'org-todo :type 'hook) @@ -5427,7 +5427,8 @@ will be prompted for." (when (re-search-forward (concat "^[ \t]*#\\+end" (match-string 4) "\\>.*") nil t) ;; on purpose, we look further than LIMIT - (setq end (match-end 0) end1 (1- (match-beginning 0))) + (setq end (min (point-max) (match-end 0)) + end1 (min (point-max) (1- (match-beginning 0)))) (setq block-end (match-beginning 0)) (when quoting (remove-text-properties beg end @@ -5455,11 +5456,12 @@ will be prompted for." '(face org-block))) ; end of source block ((not org-fontify-quote-and-verse-blocks)) ((string= block-type "quote") - (add-text-properties beg1 (1+ end1) '(face org-quote))) + (add-text-properties beg1 (min (point-max) (1+ end1)) '(face org-quote))) ((string= block-type "verse") - (add-text-properties beg1 (1+ end1) '(face org-verse)))) + (add-text-properties beg1 (min (point-max) (1+ end1)) '(face org-verse)))) (add-text-properties beg beg1 '(face org-block-begin-line)) - (add-text-properties (1+ end) (1+ end1) '(face org-block-end-line)) + (add-text-properties (min (point-max) (1+ end)) (min (point-max) (1+ end1)) + '(face org-block-end-line)) t)) ((member dc1 '("title:" "author:" "email:" "date:")) (add-text-properties @@ -5475,7 +5477,7 @@ will be prompted for." ((not (member (char-after beg) '(?\ ?\t))) ;; just any other in-buffer setting, but not indented (add-text-properties - beg (1+ (match-end 0)) + beg (match-end 0) '(font-lock-fontified t face org-meta-line)) t) ((or (member dc1 '("begin:" "end:" "caption:" "label:" @@ -13422,8 +13424,7 @@ With prefix ARG, realign all tags in headings in the current buffer." ;; Get a new set of tags from the user (save-excursion (setq table (append org-tag-persistent-alist - org-tag-alist - (org-get-buffer-tags) + (or org-tag-alist (org-get-buffer-tags)) (and org-complete-tags-always-offer-all-agenda-tags (org-global-tags-completion-table @@ -13725,11 +13726,9 @@ Returns the new tags string, or nil to not change the current settings." (condition-case nil (setq tg (org-icompleting-read "Tag: " - (delete-dups - (append (or buffer-tags - (with-current-buffer buf - (mapcar 'car (org-get-buffer-tags)))) - (mapcar 'car table))))) + (or buffer-tags + (with-current-buffer buf + (org-get-buffer-tags))))) (quit (setq tg ""))) (when (string-match "\\S-" tg) (add-to-list 'buffer-tags (list tg)) @@ -20775,11 +20774,12 @@ This version does not only check the character property, but also If the heading only contains a TODO keyword, it is still still considered empty." (and (looking-at "[ \t]*$") - (save-excursion - (beginning-of-line 1) - (let ((case-fold-search nil)) - (looking-at org-todo-line-regexp))) - (string= (match-string 3) ""))) + (when org-todo-line-regexp + (save-excursion + (beginning-of-line 1) + (let ((case-fold-search nil)) + (looking-at org-todo-line-regexp) + (string= (match-string 3) "")))))) (defun org-at-heading-or-item-p () (or (org-at-heading-p) (org-at-item-p))) diff --git a/lisp/pcmpl-rpm.el b/lisp/pcmpl-rpm.el index 8019b876562..f28469d791b 100644 --- a/lisp/pcmpl-rpm.el +++ b/lisp/pcmpl-rpm.el @@ -1,6 +1,6 @@ ;;; pcmpl-rpm.el --- functions for dealing with rpm completions -;; Copyright (C) 1999-2012 Free Software Foundation, Inc. +;; Copyright (C) 1999-2012 Free Software Foundation, Inc. ;; Package: pcomplete @@ -29,6 +29,13 @@ ;; Functions: +;; FIXME rpm -qa can be slow, so: +;; Adding --nodigest --nosignature is MUCH faster. +;; (Probably need to test --help for those options though.) +;; Consider caching the result (cf woman). +;; Consider printing an explanatory message before running -qa. +;; +;; Seems pointless for this to be a defsubst. (defsubst pcmpl-rpm-packages () (split-string (pcomplete-process-result "rpm" "-q" "-a"))) @@ -92,6 +99,7 @@ '("--changelog" "--dbpath" "--dump" + "--file" "--ftpport" ;nyi for the next four "--ftpproxy" "--httpport" @@ -112,6 +120,8 @@ (pcomplete-here*)) ((pcomplete-test "--rcfile") (pcomplete-here* (pcomplete-entries))) + ((pcomplete-test "--file") + (pcomplete-here* (pcomplete-entries))) ((pcomplete-test "--root") (pcomplete-here* (pcomplete-dirs))) ((pcomplete-test "--scripts") @@ -129,7 +139,9 @@ (pcomplete-opt "af.p(pcmpl-rpm-files)ilsdcvR") (if (pcomplete-test "-[^-]*p" 'first 1) (pcomplete-here (pcmpl-rpm-files)) - (pcomplete-here (pcmpl-rpm-packages)))))) + (if (pcomplete-test "-[^-]*f" 'first 1) + (pcomplete-here* (pcomplete-entries)) + (pcomplete-here (pcmpl-rpm-packages))))))) ((pcomplete-test "--pipe") (pcomplete-here* (funcall pcomplete-command-completion-function))) ((pcomplete-test "--rmsource") diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el index 06bd962d925..cbf29a26a71 100644 --- a/lisp/play/cookie1.el +++ b/lisp/play/cookie1.el @@ -96,6 +96,8 @@ of load, ENDMSG at the end." "Reads in the PHRASE-FILE, returns it as a vector of strings. Emit STARTMSG and ENDMSG before and after. Caches the result; second and subsequent calls on the same file won't go to disk." + (or (file-readable-p phrase-file) + (error "Cannot read file `%s'" phrase-file)) (let ((sym (intern-soft phrase-file cookie-cache))) (and sym (not (equal (symbol-function sym) (nth 5 (file-attributes phrase-file)))) diff --git a/lisp/play/yow.el b/lisp/play/yow.el index fa32fdf8272..cb02a839cde 100644 --- a/lisp/play/yow.el +++ b/lisp/play/yow.el @@ -1,6 +1,6 @@ ;;; yow.el --- quote random zippyisms -;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc. +;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Author: Richard Mlynarik @@ -24,10 +24,6 @@ ;;; Commentary: ;; Important pinheadery for GNU Emacs. -;; -;; See cookie1.el for implementation. Note --- the `n' argument of yow -;; from the 18.xx implementation is no longer; we only support *random* -;; random access now. ;;; Code: @@ -38,7 +34,7 @@ :prefix "yow-" :group 'games) -(defcustom yow-file (concat data-directory "yow.lines") +(defcustom yow-file (expand-file-name "yow.lines" data-directory) "File containing pertinent pinhead phrases." :type 'file :group 'yow) diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 55ab6c9981c..9cf20ccb516 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -679,7 +679,7 @@ settings of `c-cleanup-list' are done." ;; We want to inhibit blinking the paren since this would be ;; most disruptive. We'll blink it ourselves later on. (old-blink-paren blink-paren-function) - blink-paren-function) + blink-paren-function case-fold-search) (c-save-buffer-state () (setq safepos (c-safe-position (point) (c-parse-state)) @@ -1086,7 +1086,7 @@ numeric argument is supplied, or the point is inside a literal." (interactive "*P") (let ((c-echo-syntactic-information-p nil) - final-pos close-paren-inserted found-delim) + final-pos close-paren-inserted found-delim case-fold-search) (self-insert-command (prefix-numeric-value arg)) (setq final-pos (point)) @@ -1172,7 +1172,8 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'." (interactive "*P") (let ((literal (c-save-buffer-state () (c-in-literal))) ;; shut this up - (c-echo-syntactic-information-p nil)) + (c-echo-syntactic-information-p nil) + case-fold-search) (self-insert-command (prefix-numeric-value arg)) (if (and (not arg) (not literal)) @@ -1585,7 +1586,7 @@ defun." ; structure with other users of c-state-cache. (orig-point-min (point-min)) (orig-point-max (point-max)) lim ; Position of { which has been widened to. - where pos) + where pos case-fold-search) (save-restriction (if (eq c-defun-tactic 'go-outward) @@ -1709,7 +1710,8 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'." ; structure with other users of c-state-cache. (orig-point-min (point-min)) (orig-point-max (point-max)) lim - where pos) + where pos case-fold-search) + (save-restriction (if (eq c-defun-tactic 'go-outward) (setq lim (c-widen-to-enclosing-decl-scope ; e.g. class, namespace @@ -1769,8 +1771,8 @@ with a brace block." (interactive) (c-save-buffer-state (beginning-of-defun-function end-of-defun-function - where pos name-end) - + where pos name-end case-fold-search) + (save-restriction (widen) (save-excursion @@ -1969,7 +1971,7 @@ As opposed to \\[c-beginning-of-defun] and \\[c-end-of-defun], this function does not require the declaration to contain a brace block." (interactive) - (let (decl-limits) + (let (decl-limits case-fold-search) (c-save-buffer-state nil ;; We try to be line oriented, unless there are several ;; declarations on the same line. @@ -2001,11 +2003,12 @@ function does not require the declaration to contain a brace block." (defun c-cpp-define-name () "Return the name of the current CPP macro, or NIL if we're not in one." (interactive) - (save-excursion - (and c-opt-cpp-macro-define-start - (c-beginning-of-macro) - (looking-at c-opt-cpp-macro-define-start) - (match-string-no-properties 1)))) + (let (case-fold-search) + (save-excursion + (and c-opt-cpp-macro-define-start + (c-beginning-of-macro) + (looking-at c-opt-cpp-macro-define-start) + (match-string-no-properties 1))))) ;; Movement by statements. @@ -2888,7 +2891,8 @@ See `c-indent-comment-alist' for a description." (eq (match-end 0) eot)) 'cpp-end-block) (t - 'other)))) + 'other))) + case-fold-search) (if (and (memq line-type '(anchored-comment empty-line)) c-indent-comments-syntactically-p) (let ((c-syntactic-context (c-guess-basic-syntax))) @@ -3024,7 +3028,7 @@ are treated as conditional clause limits. Normally they are ignored." (let* ((forward (> count 0)) (increment (if forward -1 1)) (search-function (if forward 're-search-forward 're-search-backward)) - new) + new case-fold-search) (unless (integerp target-depth) (setq target-depth (if target-depth -1 0))) (save-excursion @@ -3226,7 +3230,7 @@ balanced expression is found." In the macro case this also has the effect of realigning any line continuation backslashes, unless `c-auto-align-backslashes' is nil." (interactive "*") - (let ((here (point-marker)) decl-limits) + (let ((here (point-marker)) decl-limits case-fold-search) (unwind-protect (progn (c-save-buffer-state nil @@ -4638,7 +4642,8 @@ inside a preprocessor directive." (interactive "*") (let* (c-lit-limits c-lit-type - (c-macro-start c-macro-start)) + (c-macro-start c-macro-start) + case-fold-search) (c-save-buffer-state () (setq c-lit-limits (c-literal-limits nil nil t) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index cf38001c123..65e28c11e21 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -5382,7 +5382,7 @@ comment at the start of cc-engine.el for more info." new-beg new-end need-new-beg need-new-end) ;; Locate the barrier before the changed region (goto-char (if beg-lit-limits (car beg-lit-limits) beg)) - (c-syntactic-skip-backward "^;{}" (max (- beg 2048) (point-min))) + (c-syntactic-skip-backward "^;{}" (c-determine-limit 512)) (setq new-beg (point)) ;; Remove the syntax-table properties from each pertinent <...> pair. @@ -5393,8 +5393,7 @@ comment at the start of cc-engine.el for more info." ;; Locate the barrier after END. (goto-char (if end-lit-limits (cdr end-lit-limits) end)) - (c-syntactic-re-search-forward "[;{}]" - (min (+ end 2048) (point-max)) 'end) + (c-syntactic-re-search-forward "[;{}]" (c-determine-+ve-limit 512) 'end) (setq new-end (point)) ;; Remove syntax-table properties from the remaining pertinent <...> diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index f57fcbff5ca..a53d65f6307 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el @@ -63,6 +63,20 @@ For example: A sample value might look like: `\\(_P\\|_PROTO\\)'.") +;; *Warning for cc-mode developers* +;; +;; `cc-imenu-objc-generic-expression' elements depend on +;; `cc-imenu-c++-generic-expression'. So if you change this +;; expression, you need to change following variables, +;; `cc-imenu-objc-generic-expression-*-index', +;; too. `cc-imenu-objc-function' uses these *-index variables, in +;; order to know where the each regexp *group \\(foobar\\)* elements +;; are started. +;; +;; *-index variables are initialized during `cc-imenu-objc-generic-expression' +;; being initialized. +;; + (defvar cc-imenu-c++-generic-expression `( ;; Try to match ::operator definitions first. Otherwise `X::operator new ()' @@ -187,23 +201,8 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") ")" "[.," c-alnum " \t\n\r]*" "{" - )) 1)) - "Imenu generic expression for Java mode. See -`imenu-generic-expression'.") - -;; *Warning for cc-mode developers* -;; -;; `cc-imenu-objc-generic-expression' elements depend on -;; `cc-imenu-c++-generic-expression'. So if you change this -;; expression, you need to change following variables, -;; `cc-imenu-objc-generic-expression-*-index', -;; too. `cc-imenu-objc-function' uses these *-index variables, in -;; order to know where the each regexp *group \\(foobar\\)* elements -;; are started. -;; -;; *-index variables are initialized during `cc-imenu-objc-generic-expression' -;; being initialized. -;; + )) 1)) + "Imenu generic expression for Java mode. See `imenu-generic-expression'.") ;; Internal variables (defvar cc-imenu-objc-generic-expression-noreturn-index nil) @@ -224,7 +223,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") "\\|" ;; > General function name regexp ;; Pick a token by (match-string 3) - (car (cdr (nth 2 cc-imenu-c++-generic-expression))) ; -> index += 5 + (car (cdr (nth 2 cc-imenu-c++-generic-expression))) ; -> index += 6 (prog2 (setq cc-imenu-objc-generic-expression-general-func-index 3) "") ;; > Special case for definitions using phony prototype macros like: ;; > `int main _PROTO( (int argc,char *argv[]) )'. @@ -233,11 +232,11 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") (concat "\\|" (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1 - (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 9) "") + (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 10) "") ) - (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 8) "") + (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 9) "") "") ; -> index += 0 - (prog2 (setq cc-imenu-objc-generic-expression-proto-index 8) "") + (prog2 (setq cc-imenu-objc-generic-expression-proto-index 9) "") ;; ;; For Objective-C ;; Pick a token by (match-string 8 or 9) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 7c018feefbb..ff18f56bbe8 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1170,10 +1170,10 @@ Note that the style variables are always made local to the buffer." ;; ;; ;; void myfunc(T* p) {} - ;; + ;; ;; Type a space in the first blank line, and the fontification of the next ;; line was fouled up by context fontification. - (let ((new-beg beg) (new-end end) new-region) + (let ((new-beg beg) (new-end end) new-region case-fold-search) (if c-in-after-change-fontification (setq c-in-after-change-fontification nil) (save-restriction diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 07393c6954d..ed8eb81932e 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -1356,8 +1356,12 @@ if ARG is omitted or nil." (setq flymake-timer (run-at-time nil 1 'flymake-on-timer-event (current-buffer))) - (when flymake-start-syntax-check-on-find-file - (flymake-start-syntax-check))))) + (when (and flymake-start-syntax-check-on-find-file + ;; Since we write temp files in current dir, there's no point + ;; trying if the directory is read-only (bug#8954). + (file-writable-p (file-name-directory buffer-file-name))) + (with-demoted-errors + (flymake-start-syntax-check)))))) ;; Turning the mode OFF. (t diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 89450cd2276..1be74ff544b 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -375,9 +375,8 @@ Emacs always switches to the thread which caused the stop." :version "23.2" :link '(info-link "(gdb)GDB/MI Async Records")) -(defcustom gdb-stopped-hooks nil - "This variable holds a list of functions to be called whenever -GDB stops. +(defcustom gdb-stopped-functions nil + "List of functions called whenever GDB stops. Each function takes one argument, a parsed MI response, which contains fields of corresponding MI *stopped async record: @@ -818,6 +817,8 @@ detailed description of this mode. nil 'local) (local-set-key "\C-i" 'completion-at-point) + (local-set-key [remap comint-delchar-or-maybe-eof] 'gdb-delchar-or-quit) + (setq gdb-first-prompt t) (setq gud-running nil) @@ -859,15 +860,8 @@ detailed description of this mode. (gdb-get-buffer-create 'gdb-inferior-io) (gdb-clear-inferior-io) - (set-process-filter (get-process "gdb-inferior") 'gdb-inferior-filter) - (gdb-input - ;; Needs GDB 6.4 onwards - (concat "-inferior-tty-set " - (or - ;; The process can run on a remote host. - (process-get (get-process "gdb-inferior") 'remote-tty) - (process-tty-name (get-process "gdb-inferior")))) - 'ignore) + (gdb-inferior-io--init-proc (get-process "gdb-inferior")) + (if (eq window-system 'w32) (gdb-input "-gdb-set new-console off" 'ignore)) (gdb-input "-gdb-set height 0" 'ignore) @@ -905,6 +899,25 @@ detailed description of this mode. (setq gdb-non-stop nil) (gdb-input "-gdb-set non-stop 0" 'ignore))) +(defun gdb-delchar-or-quit (arg) + "Delete ARG characters or send a quit command to GDB. +Send a quit only if point is at the end of the buffer, there is +no input, and GDB is waiting for input." + (interactive "p") + (unless (and (eq (current-buffer) gud-comint-buffer) + (eq gud-minor-mode 'gdbmi)) + (error "Not in a GDB-MI buffer")) + (let ((proc (get-buffer-process gud-comint-buffer))) + (if (and (eobp) proc (process-live-p proc) + (not gud-running) + (= (point) (marker-position (process-mark proc)))) + ;; Sending an EOF does not work with GDB-MI; submit an + ;; explicit quit command. + (progn + (insert "quit") + (comint-send-input t t)) + (delete-char arg)))) + (defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") (defun gdb-create-define-alist () @@ -929,7 +942,6 @@ detailed description of this mode. (push (cons name define) gdb-define-alist)))) (declare-function tooltip-show "tooltip" (text &optional use-echo-area)) -(defvar tooltip-use-echo-area) (defun gdb-tooltip-print (expr) (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer) @@ -937,7 +949,7 @@ detailed description of this mode. (if (re-search-forward ".*value=\\(\".*\"\\)" nil t) (tooltip-show (concat expr " = " (read (match-string 1))) - (or gud-tooltip-echo-area tooltip-use-echo-area + (or gud-tooltip-echo-area (not (display-graphic-p))))))) ;; If expr is a macro for a function don't print because of possible dangerous @@ -1056,7 +1068,7 @@ positive, otherwise don't automatically raise it." (if gdb-speedbar-auto-raise "en" "dis")))) (define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch) -(define-key global-map (concat gud-key-prefix "\C-w") 'gud-watch) +(define-key global-map (vconcat gud-key-prefix "\C-w") 'gud-watch) (declare-function tooltip-identifier-from-point "tooltip" (point)) @@ -1510,6 +1522,31 @@ DOC is an optional documentation string." (gdb-display-buffer (gdb-get-buffer-create 'gdb-inferior-io) t)) +(defun gdb-inferior-io--init-proc (proc) + ;; Set up inferior I/O. Needs GDB 6.4 onwards. + (set-process-filter proc 'gdb-inferior-filter) + (set-process-sentinel proc 'gdb-inferior-io-sentinel) + (gdb-input + (concat "-inferior-tty-set " + ;; The process can run on a remote host. + (or (process-get proc 'remote-tty) + (process-tty-name proc))) + 'ignore)) + +(defun gdb-inferior-io-sentinel (proc str) + (when (eq (process-status proc) 'failed) + ;; When the debugged process exits, Emacs gets an EIO error on + ;; read from the pty, and stops listening to it. If the gdb + ;; process is still running, remove the pty, make a new one, and + ;; pass it to gdb. + (let ((gdb-proc (get-buffer-process gud-comint-buffer)) + (io-buffer (process-buffer proc))) + (when (and gdb-proc (process-live-p gdb-proc) + (buffer-live-p io-buffer)) + ;; `comint-exec' deletes the original process as a side effect. + (comint-exec io-buffer "gdb-inferior" nil nil nil) + (gdb-inferior-io--init-proc (get-buffer-process io-buffer)))))) + (defconst gdb-frame-parameters '((height . 14) (width . 80) (unsplittable . t) @@ -1746,24 +1783,27 @@ If `gdb-thread-number' is nil, just wrap NAME in asterisks." (setq gdb-output-sink 'user) (setq gdb-pending-triggers nil)) -(defun gdb-update () - "Update buffers showing status of debug session." +(defun gdb-update (&optional no-proc) + "Update buffers showing status of debug session. +If NO-PROC is non-nil, do not try to contact the GDB process." (when gdb-first-prompt (gdb-force-mode-line-update (propertize "initializing..." 'face font-lock-variable-name-face)) (gdb-init-1) (setq gdb-first-prompt nil)) - (gdb-get-main-selected-frame) + (unless no-proc + (gdb-get-main-selected-frame)) + ;; We may need to update gdb-threads-list so we can use (gdb-get-buffer-create 'gdb-threads-buffer) ;; gdb-break-list is maintained in breakpoints handler (gdb-get-buffer-create 'gdb-breakpoints-buffer) - (gdb-emit-signal gdb-buf-publisher 'update) + (unless no-proc + (gdb-emit-signal gdb-buf-publisher 'update)) (gdb-get-changed-registers) - (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) (dolist (var gdb-var-list) (setcar (nthcdr 5 var) nil)) @@ -2045,7 +2085,7 @@ current thread and update GDB buffers." ;; In all-stop this updates gud-running properly as well. (gdb-update) (setq gdb-first-done-or-error nil)) - (run-hook-with-args 'gdb-stopped-hooks result))) + (run-hook-with-args 'gdb-stopped-functions result))) ;; Remove the trimmings from log stream containing debugging messages ;; being produced by GDB's internals, use warning face and send to GUD @@ -2085,23 +2125,28 @@ current thread and update GDB buffers." (setq gdb-output-sink 'emacs)) (gdb-clear-partial-output) - (when gdb-first-done-or-error - (unless (or token-number gud-running) - (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name))) - (gdb-update) - (setq gdb-first-done-or-error nil)) - (setq gdb-filter-output - (gdb-concat-output gdb-filter-output output-field)) + ;; The process may already be dead (e.g. C-d at the gdb prompt). + (let* ((proc (get-buffer-process gud-comint-buffer)) + (no-proc (or (null proc) + (memq (process-status proc) '(exit signal))))) - (if token-number - (progn - (with-current-buffer - (gdb-get-buffer-create 'gdb-partial-output-buffer) - (funcall - (cdr (assoc (string-to-number token-number) gdb-handler-alist)))) - (setq gdb-handler-alist - (assq-delete-all token-number gdb-handler-alist))))) + (when gdb-first-done-or-error + (unless (or token-number gud-running no-proc) + (setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name))) + (gdb-update no-proc) + (setq gdb-first-done-or-error nil)) + + (setq gdb-filter-output + (gdb-concat-output gdb-filter-output output-field)) + + (when token-number + (with-current-buffer + (gdb-get-buffer-create 'gdb-partial-output-buffer) + (funcall + (cdr (assoc (string-to-number token-number) gdb-handler-alist)))) + (setq gdb-handler-alist + (assq-delete-all token-number gdb-handler-alist))))) (defun gdb-concat-output (so-far new) (cond @@ -4105,9 +4150,15 @@ This arrangement depends on the value of `gdb-many-windows'." (gud-find-file gdb-main-file))) (setq gdb-source-window win))))) +;; Called from `gud-sentinel' in gud.el: (defun gdb-reset () "Exit a debugging session cleanly. Kills the gdb buffers, and resets variables and the source buffers." + ;; The gdb-inferior buffer has a pty hooked up to the main gdb + ;; process. This pty must be deleted explicitly. + (let ((pty (get-process "gdb-inferior"))) + (if pty (delete-process pty))) + ;; Find gdb-mi buffers and kill them. (dolist (buffer (buffer-list)) (unless (eq buffer gud-comint-buffer) (with-current-buffer buffer diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index d41364547f2..a6ae42f86b1 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -728,9 +728,9 @@ This function is called from `compilation-filter-hook'." (defun grep (command-args) "Run grep, with user-specified args, and collect output in a buffer. While grep runs asynchronously, you can use \\[next-error] (M-x next-error), -or \\\\[compile-goto-error] in the grep \ -output buffer, to go to the lines where grep -found matches. +or \\\\[compile-goto-error] in the *grep* \ +buffer, to go to the lines where grep found +matches. To kill the grep job before it finishes, type \\[kill-compilation]. For doing a recursive `grep', see the `rgrep' command. For running `grep' in a specific directory, see `lgrep'. @@ -957,10 +957,11 @@ With \\[universal-argument] prefix, you can edit the constructed shell command l before it is executed. With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'. -Collect output in a buffer. While find runs asynchronously, you -can use \\[next-error] (M-x next-error), or \\\\[compile-goto-error] \ +Collect output in a buffer. While the recursive grep is running, +you can use \\[next-error] (M-x next-error), or \\\\[compile-goto-error] \ in the grep output buffer, -to go to the lines where grep found matches. +to visit the lines where matches were found. To kill the job +before it finishes, type \\[kill-compilation]. This command shares argument histories with \\[lgrep] and \\[grep-find]. @@ -1024,7 +1025,8 @@ to specify a command to run." (shell-quote-argument ")") " -prune -o ")) (and grep-find-ignored-files - (concat (shell-quote-argument "(") + (concat (shell-quote-argument "!") " -type d " + (shell-quote-argument "(") ;; we should use shell-quote-argument here " -name " (mapconcat diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 6b1f891b230..1f60c351252 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -66,10 +66,10 @@ Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python) and jdb." (defcustom gud-key-prefix "\C-x\C-a" "Prefix of all GUD commands valid in C buffers." - :type 'string + :type 'key-sequence :group 'gud) -(global-set-key (concat gud-key-prefix "\C-l") 'gud-refresh) +(global-set-key (vconcat gud-key-prefix "\C-l") 'gud-refresh) (define-key ctl-x-map " " 'gud-break) ;; backward compatibility hack (defvar gud-marker-filter nil) diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index e2016e206a8..b6d2b5e319c 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -802,12 +802,15 @@ If `hs-hide-comments-when-hiding-all' is non-nil, also hide the comments." (forward-comment (point-max))) (re-search-forward re (point-max) t)) (if (match-beginning 1) - ;; we have found a block beginning + ;; We have found a block beginning. (progn (goto-char (match-beginning 1)) - (if hs-hide-all-non-comment-function - (funcall hs-hide-all-non-comment-function) - (hs-hide-block-at-point t))) + (unless (if hs-hide-all-non-comment-function + (funcall hs-hide-all-non-comment-function) + (hs-hide-block-at-point t)) + ;; Go to end of matched data to prevent from getting stuck + ;; with an endless loop. + (goto-char (match-end 0)))) ;; found a comment, probably (let ((c-reg (hs-inside-comment-p))) (when (and c-reg (car c-reg)) diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index aab5f8f65a4..9df9943cc00 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -1,6 +1,6 @@ ;;; perl-mode.el --- Perl code editing commands for GNU Emacs -;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1994, 2001-2012 Free Software Foundation, Inc. ;; Author: William F. Mann ;; Maintainer: FSF @@ -133,11 +133,6 @@ map) "Keymap used in Perl mode.") -(autoload 'c-macro-expand "cmacexp" - "Display the result of expanding all C macros occurring in the region. -The expansion is entirely correct because it uses the C preprocessor." - t) - (defvar perl-mode-syntax-table (let ((st (make-syntax-table (standard-syntax-table)))) (modify-syntax-entry ?\n ">" st) @@ -511,6 +506,14 @@ If nil, continued arguments are aligned with the first argument." :type '(choice integer (const nil)) :group 'perl) +(defcustom perl-indent-parens-as-block nil + "Non-nil means that non-block ()-, {}- and []-groups are indented as blocks. +The closing bracket is aligned with the line of the opening bracket, +not the contents of the brackets." + :version "24.2" + :type 'boolean + :group 'perl) + (defcustom perl-tab-always-indent tab-always-indent "Non-nil means TAB in Perl mode always indents the current line. Otherwise it inserts a tab character if you type it past the first @@ -853,7 +856,8 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." (cond ((nth 3 state) 'noindent) ; In a quoted string? ((null containing-sexp) ; Line is at top level. (skip-chars-forward " \t\f") - (if (= (following-char) ?{) + (if (memq (following-char) + (if perl-indent-parens-as-block '(?\{ ?\( ?\[) '(?\{))) 0 ; move to beginning of line if it starts a function body ;; indent a little if this is a continuation line (perl-backward-to-noncomment) @@ -897,7 +901,9 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." 0 perl-continued-statement-offset) (current-column) (if (save-excursion (goto-char indent-point) - (looking-at "[ \t]*{")) + (looking-at + (if perl-indent-parens-as-block + "[ \t]*[{(\[]" "[ \t]*{"))) perl-continued-brace-offset 0))) ;; This line starts a new statement. ;; Position at last unclosed open. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f7566c31b41..2922330e6f9 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -69,11 +69,7 @@ (require 'comint) (require 'ansi-color) -(eval-when-compile - (require 'compile) - (require 'hippie-exp)) - -(autoload 'comint-mode "comint") +(eval-when-compile (require 'compile)) (defgroup python nil "Silly walks in the Python language." @@ -1488,8 +1484,6 @@ Don't save anything for STR matching `inferior-python-filter-regexp'." res) (t (concat res s))))) -(autoload 'comint-check-proc "comint") - (defvar python-version-checked nil) (defun python-check-version (cmd) "Check that CMD runs a suitable version of Python." @@ -1684,8 +1678,6 @@ value to determine defaults." "Caches (directory . file) pair used in the last `python-load-file' command. Used for determining the default in the next one.") -(autoload 'comint-get-source "comint") - (defun python-load-file (file-name) "Load a Python file FILE-NAME into the inferior Python process. If the file has extension `.py' import or reload it as a module. @@ -1776,7 +1768,7 @@ will." ;; allow C-c C-f in help buffer. (let ((temp-buffer-show-hook ; avoid xref stuff (lambda () - (toggle-read-only 1) + (setq buffer-read-only t) (setq view-return-to-alist (list (cons (selected-window) help-return-method)))))) (with-output-to-temp-buffer (help-buffer) @@ -1959,7 +1951,7 @@ the string's indentation." ;; paragraph in a multi-line string properly, so narrow ;; to the string and then fill around (the end of) the ;; current line. - ((eq t (nth 3 syntax)) ; in fenced string + ((nth 3 syntax) ; in fenced string (goto-char (nth 8 syntax)) ; string start (setq start (line-beginning-position)) (setq end (condition-case () ; for unbalanced quotes diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index c8ef8f0324c..0139795dd38 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -3592,7 +3592,7 @@ Key bindings specific to `verilog-mode-map' are: (set (make-local-variable 'imenu-generic-expression) verilog-imenu-generic-expression) ;; Tell which-func-modes that imenu knows about verilog - (when (boundp 'which-func-modes) + (when (and (boundp 'which-func-modes) (listp which-func-modes)) (add-to-list 'which-func-modes 'verilog-mode)) ;; hideshow support (when (boundp 'hs-special-modes-alist) diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el index 721c610517a..c8435c14ea2 100644 --- a/lisp/progmodes/which-func.el +++ b/lisp/progmodes/which-func.el @@ -1,6 +1,6 @@ ;;; which-func.el --- print current function in mode line -;; Copyright (C) 1994, 1997-1998, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1997-1998, 2001-2012 Free Software Foundation, Inc. ;; Author: Alex Rezinsky ;; (doesn't seem to be responsive any more) @@ -72,14 +72,15 @@ :group 'tools :version "20.3") -(defcustom which-func-modes - '(emacs-lisp-mode c-mode c++-mode perl-mode cperl-mode python-mode - makefile-mode sh-mode fortran-mode f90-mode ada-mode - diff-mode) +(defcustom which-func-modes t + ;; '(emacs-lisp-mode c-mode c++-mode objc-mode perl-mode cperl-mode python-mode + ;; makefile-mode sh-mode fortran-mode f90-mode ada-mode + ;; diff-mode) "List of major modes for which Which Function mode should be used. For other modes it is disabled. If this is equal to t, then Which Function mode is enabled in any major mode that supports it." :group 'which-func + :version "24.2" ; explicit list -> t :type '(choice (const :tag "All modes" t) (repeat (symbol :tag "Major mode")))) diff --git a/lisp/recentf.el b/lisp/recentf.el index 8b0b36cdddc..636110f41de 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -1061,6 +1061,8 @@ Go to the beginning of buffer if not found." (let ((km (copy-keymap recentf--shortcuts-keymap))) (set-keymap-parent km widget-keymap) (define-key km "q" 'recentf-cancel-dialog) + (define-key km "n" 'next-line) + (define-key km "p" 'previous-line) (define-key km [follow-link] "\C-m") km) "Keymap used in recentf dialogs.") diff --git a/lisp/scroll-all.el b/lisp/scroll-all.el index 9ff0a61db2f..fed886c2b55 100644 --- a/lisp/scroll-all.el +++ b/lisp/scroll-all.el @@ -111,7 +111,6 @@ one window apply to all visible windows in the same frame." nil " *SL*" nil :global t :group 'windows - :group 'scrolling (if scroll-all-mode (add-hook 'post-command-hook 'scroll-all-check-to-scroll) (remove-hook 'post-command-hook 'scroll-all-check-to-scroll))) diff --git a/lisp/server.el b/lisp/server.el index 404bebc4747..1e2f458ac9c 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -139,6 +139,32 @@ directory residing in a NTFS partition instead." ;;;###autoload (put 'server-auth-dir 'risky-local-variable t) +(defcustom server-auth-key nil + "Server authentication key. + +Normally, the authentication key is randomly generated when the +server starts, which guarantees some level of security. It is +recommended to leave it that way. Using a long-lived shared key +will decrease security (especially since the key is transmitted as +plain text). + +In some situations however, it can be difficult to share randomly +generated passwords with remote hosts (eg. no shared directory), +so you can set the key with this variable and then copy the +server file to the remote host (with possible changes to IP +address and/or port if that applies). + +The key must consist of 64 ASCII printable characters except for +space (this means characters from ! to ~; or from code 33 to 126). + +You can use \\[server-generate-key] to get a random authentication +key." + :group 'server + :type '(choice + (const :tag "Random" nil) + (string :tag "Password")) + :version "24.2") + (defcustom server-raise-frame t "If non-nil, raise frame when switching to a buffer." :group 'server @@ -494,41 +520,62 @@ Creates the directory if necessary and makes sure: ;; Check that it's safe for use. (let* ((uid (nth 2 attrs)) (w32 (eq system-type 'windows-nt)) - (safe (catch :safe - (unless (eq t (car attrs)) ; is a dir? - (throw :safe nil)) - (when (and w32 (zerop uid)) ; on FAT32? - (display-warning - 'server - (format "Using `%s' to store Emacs-server authentication files. + (safe (cond + ((not (eq t (car attrs))) nil) ; is a dir? + ((and w32 (zerop uid)) ; on FAT32? + (display-warning + 'server + (format "Using `%s' to store Emacs-server authentication files. Directories on FAT32 filesystems are NOT secure against tampering. See variable `server-auth-dir' for details." - (file-name-as-directory dir)) - :warning) - (throw :safe t)) - (unless (or (= uid (user-uid)) ; is the dir ours? - (and w32 - ;; Files created on Windows by - ;; Administrator (RID=500) have - ;; the Administrators (RID=544) - ;; group recorded as the owner. - (= uid 544) (= (user-uid) 500))) - (throw :safe nil)) - (when w32 ; on NTFS? - (throw :safe t)) - (unless (zerop (logand ?\077 (file-modes dir))) - (throw :safe nil)) - t))) + (file-name-as-directory dir)) + :warning) + t) + ((and (/= uid (user-uid)) ; is the dir ours? + (or (not w32) + ;; Files created on Windows by Administrator + ;; (RID=500) have the Administrators (RID=544) + ;; group recorded as the owner. + (/= uid 544) (/= (user-uid) 500))) + nil) + (w32 t) ; on NTFS? + (t ; else, check permissions + (zerop (logand ?\077 (file-modes dir))))))) (unless safe (error "The directory `%s' is unsafe" dir))))) +(defun server-generate-key () + "Generate and return a random authentication key. +The key is a 64-byte string of random chars in the range `!'..`~'. +If called interactively, also inserts it into current buffer." + (interactive) + (let ((auth-key + (loop repeat 64 + collect (+ 33 (random 94)) into auth + finally return (concat auth)))) + (if (called-interactively-p 'interactive) + (insert auth-key)) + auth-key)) + +(defun server-get-auth-key () + "Return server's authentication key. + +If `server-auth-key' is nil, just call `server-generate-key'. +Otherwise, if `server-auth-key' is a valid key, return it. +If the key is not valid, signal an error." + (if server-auth-key + (if (string-match-p "^[!-~]\\{64\\}$" server-auth-key) + server-auth-key + (error "The key '%s' is invalid" server-auth-key)) + (server-generate-key))) + ;;;###autoload (defun server-start (&optional leave-dead inhibit-prompt) "Allow this Emacs process to be a server for client processes. -This starts a server communications subprocess through which -client \"editors\" can send your editing commands to this Emacs -job. To use the server, set up the program `emacsclient' in the -Emacs distribution as your standard \"editor\". +This starts a server communications subprocess through which client +\"editors\" can send your editing commands to this Emacs job. +To use the server, set up the program `emacsclient' in the Emacs +distribution as your standard \"editor\". Optional argument LEAVE-DEAD (interactively, a prefix arg) means just kill any existing server communications subprocess. @@ -615,13 +662,7 @@ server or call `M-x server-force-delete' to forcibly disconnect it.") (unless server-process (error "Could not start server process")) (process-put server-process :server-file server-file) (when server-use-tcp - (let ((auth-key - (loop - ;; The auth key is a 64-byte string of random chars in the - ;; range `!'..`~'. - repeat 64 - collect (+ 33 (random 94)) into auth - finally return (concat auth)))) + (let ((auth-key (server-get-auth-key))) (process-put server-process :auth-key auth-key) (with-temp-file server-file (set-buffer-multibyte nil) @@ -780,10 +821,6 @@ This handles splitting the command if it would be bigger than (select-frame frame) (process-put proc 'frame frame) (process-put proc 'terminal (frame-terminal frame)) - - ;; Display *scratch* by default. - (switch-to-buffer (get-buffer-create "*scratch*") 'norecord) - frame)) (defun server-create-window-system-frame (display nowait proc parent-id @@ -816,9 +853,6 @@ This handles splitting the command if it would be bigger than (select-frame frame) (process-put proc 'frame frame) (process-put proc 'terminal (frame-terminal frame)) - - ;; Display *scratch* by default. - (switch-to-buffer (get-buffer-create "*scratch*") 'norecord) frame))) (defun server-goto-toplevel (proc) @@ -1042,8 +1076,9 @@ The following commands are accepted by the client: ;; -window-system: Open a new X frame. (`"-window-system" - (setq dontkill t) - (setq tty-name 'window-system)) + (if (fboundp 'x-create-frame) + (setq dontkill t + tty-name 'window-system))) ;; -resume: Resume a suspended tty frame. (`"-resume" @@ -1071,7 +1106,8 @@ The following commands are accepted by the client: (setq dontkill t) (pop args-left)) - ;; -tty DEVICE-NAME TYPE: Open a new tty frame at the client. + ;; -tty DEVICE-NAME TYPE: Open a new tty frame. + ;; (But if we see -window-system later, use that.) (`"-tty" (setq tty-name (pop args-left) tty-type (pop args-left) @@ -1133,6 +1169,13 @@ The following commands are accepted by the client: ;; Unknown command. (arg (error "Unknown command: %s" arg)))) + ;; If both -no-wait and -tty are given with file or sexp + ;; arguments, use an existing frame. + (and nowait + (not (eq tty-name 'window-system)) + (or files commands) + (setq use-current-frame t)) + (setq frame (cond ((and use-current-frame @@ -1182,12 +1225,17 @@ The following commands are accepted by the client: ;; including code that needs to wait. (with-local-quit (condition-case err - (let* ((buffers - (when files - (server-visit-files files proc nowait)))) - + (let ((buffers (server-visit-files files proc nowait))) (mapc 'funcall (nreverse commands)) + ;; If we were told only to open a new client, obey + ;; `initial-buffer-choice' if it specifies a file. + (unless (or files commands) + (if (stringp initial-buffer-choice) + (find-file initial-buffer-choice) + (switch-to-buffer (get-buffer-create "*scratch*") + 'norecord))) + ;; Delete the client if necessary. (cond (nowait diff --git a/lisp/ses.el b/lisp/ses.el index 0638fc344c7..da18046c953 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -282,6 +282,9 @@ default printer and then modify its output.") ses--numcols ses--numrows ses--symbolic-formulas ses--data-marker ses--params-marker (ses--Dijkstra-attempt-nb . 0) ses--Dijkstra-weight-bound + ;; This list is useful to speed-up clean-up of symbols when + ;; an area containing renamed cell is deleted. + ses--renamed-cell-symb-list ;; Global variables that we override mode-line-process next-line-add-newlines transient-mark-mode) "Buffer-local variables used by SES.") @@ -674,6 +677,17 @@ for this spreadsheet." (put sym 'ses-cell (cons xrow xcol)) (make-local-variable sym))))) +(defun ses-create-cell-variable (sym row col) + "Create a buffer-local variable `SYM' for cell at position (ROW, COL). + +SYM is the symbol for that variable, ROW and COL are integers for +row and column of the cell, with numbering starting from 0. + +Return nil in case of failure." + (unless (local-variable-p sym) + (make-local-variable sym) + (put sym 'ses-cell (cons row col)))) + ;; We do not delete the ses-cell properties for the cell-variables, in ;; case a formula that refers to this cell is in the kill-ring and is ;; later pasted back in. @@ -682,7 +696,10 @@ for this spreadsheet." (let (sym) (dotimes (row (1+ (- maxrow minrow))) (dotimes (col (1+ (- maxcol mincol))) - (setq sym (ses-create-cell-symbol (+ row minrow) (+ col mincol))) + (let ((xrow (+ row minrow)) (xcol (+ col mincol))) + (setq sym (if (and (< xrow ses--numrows) (< xcol ses--numcols)) + (ses-cell-symbol xrow xcol) + (ses-create-cell-symbol xrow xcol)))) (if (boundp sym) (push `(apply ses-set-with-undo ,sym ,(symbol-value sym)) buffer-undo-list)) @@ -1400,7 +1417,8 @@ removed. Example: Sets `ses-relocate-return' to 'delete if cell-references were removed." (let (rowcol result) (if (or (atom formula) (eq (car formula) 'quote)) - (if (setq rowcol (ses-sym-rowcol formula)) + (if (and (setq rowcol (ses-sym-rowcol formula)) + (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name formula))) (ses-relocate-symbol formula rowcol startrow startcol rowincr colincr) formula) ; Pass through as-is. @@ -1508,14 +1526,15 @@ if the range was altered." the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR to each symbol." (let (reform) - (let (mycell newval) + (let (mycell newval xrow) (dotimes-with-progress-reporter (row ses--numrows) "Relocating formulas..." (dotimes (col ses--numcols) (setq ses-relocate-return nil mycell (ses-get-cell row col) newval (ses-relocate-formula (ses-cell-formula mycell) - minrow mincol rowincr colincr)) + minrow mincol rowincr colincr) + xrow (- row rowincr)) (ses-set-cell row col 'formula newval) (if (eq ses-relocate-return 'range) ;; This cell contains a (ses-range X Y) where a cell has been @@ -1531,8 +1550,22 @@ to each symbol." minrow mincol rowincr colincr)) (ses-set-cell row col 'references newval) (and (>= row minrow) (>= col mincol) - (ses-set-cell row col 'symbol - (ses-create-cell-symbol row col)))))) + (let ((sym (ses-cell-symbol row col)) + (xcol (- col colincr))) + (if (and + sym + (>= xrow 0) + (>= xcol 0) + (null (eq sym + (ses-create-cell-symbol xrow xcol)))) + ;; This is a renamed cell, do not update the cell + ;; name, but just update the coordinate property. + (put sym 'ses-cell (cons row col)) + (ses-set-cell row col 'symbol + (setq sym (ses-create-cell-symbol row col))) + (unless (and (boundp sym) (local-variable-p sym)) + (set (make-local-variable sym) nil) + (put sym 'ses-cell (cons row col)))))) ))) ;; Relocate the cell values. (let (oldval myrow mycol xrow xcol) (cond @@ -1545,11 +1578,17 @@ to each symbol." (setq mycol (+ col mincol) xrow (- myrow rowincr) xcol (- mycol colincr)) - (if (and (< xrow ses--numrows) (< xcol ses--numcols)) - (setq oldval (ses-cell-value xrow xcol)) - ;; Cell is off the end of the array. - (setq oldval (symbol-value (ses-create-cell-symbol xrow xcol)))) - (ses-set-cell myrow mycol 'value oldval)))) + (let ((sym (ses-cell-symbol myrow mycol)) + (xsym (ses-create-cell-symbol xrow xcol))) + ;; Make the value relocation only when if the cell is not + ;; a renamed cell. Otherwise this is not needed. + (and (eq sym xsym) + (ses-set-cell myrow mycol 'value + (if (and (< xrow ses--numrows) (< xcol ses--numcols)) + (ses-cell-value xrow xcol) + ;;Cell is off the end of the array + (symbol-value xsym)))))))) + ((and (wholenump rowincr) (wholenump colincr)) ;; Insertion of rows and/or columns. Run the loop backwards. (let ((disty (1- ses--numrows)) @@ -1659,7 +1698,6 @@ Does not execute cell formulas or print functions." (message "Upgrading from SES-1 file format"))) (or (= ses--file-format 2) (error "This file needs a newer version of the SES library code")) - (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols)) ;; Initialize cell array. (setq ses--cells (make-vector ses--numrows nil)) (dotimes (row ses--numrows) @@ -1679,11 +1717,10 @@ Does not execute cell formulas or print functions." (dotimes (row ses--numrows) (dotimes (col ses--numcols) (let* ((x (read (current-buffer))) - (rowcol (ses-sym-rowcol (car-safe (cdr-safe x))))) + (sym (car-safe (cdr-safe x)))) (or (and (looking-at "\n") (eq (car-safe x) 'ses-cell) - (eq row (car rowcol)) - (eq col (cdr rowcol))) + (ses-create-cell-variable sym row col)) (error "Cell-def error")) (eval x))) (or (looking-at "\n\n") @@ -3140,6 +3177,63 @@ highlighted range in the spreadsheet." (mouse-set-point event) (ses-insert-ses-range)) +(defun ses-replace-name-in-formula (formula old-name new-name) + (let ((new-formula formula)) + (unless (and (consp formula) + (eq (car-safe formula) 'quote)) + (while formula + (let ((elt (car-safe formula))) + (cond + ((consp elt) + (setcar formula (ses-replace-name-in-formula elt old-name new-name))) + ((and (symbolp elt) + (eq (car-safe formula) old-name)) + (setcar formula new-name)))) + (setq formula (cdr formula)))) + new-formula)) + +(defun ses-rename-cell (new-name) + "Rename current cell." + (interactive "*SEnter new name: ") + (ses-check-curcell) + (or + (and (local-variable-p new-name) + (ses-sym-rowcol new-name) + ;; this test is needed because ses-cell property of deleted cells + ;; is not deleted in case of subsequent undo + (memq new-name ses--renamed-cell-symb-list) + (error "Already a cell name")) + (and (boundp new-name) + (null (yes-or-no-p (format "`%S' is already bound outside this buffer, continue? " + new-name))) + (error "Already a bound cell name"))) + (let* ((rowcol (ses-sym-rowcol ses--curcell)) + (cell (ses-get-cell (car rowcol) (cdr rowcol)))) + (put new-name 'ses-cell rowcol) + (dolist (reference (ses-cell-references (car rowcol) (cdr rowcol))) + (let* ((rowcol (ses-sym-rowcol reference)) + (cell (ses-get-cell (car rowcol) (cdr rowcol)))) + (ses-cell-set-formula (car rowcol) + (cdr rowcol) + (ses-replace-name-in-formula + (ses-cell-formula cell) + ses--curcell + new-name)))) + (push new-name ses--renamed-cell-symb-list) + (set new-name (symbol-value ses--curcell)) + (aset cell 0 new-name) + (put ses--curcell 'ses-cell nil) + (makunbound ses--curcell) + (setq ses--curcell new-name) + (let* ((pos (point)) + (inhibit-read-only t) + (col (current-column)) + (end (save-excursion + (move-to-column (1+ col)) + (if (eolp) + (+ pos (ses-col-width col) 1) + (point))))) + (put-text-property pos end 'intangible new-name))) ) ;;---------------------------------------------------------------------------- ;; Checking formulas for safety diff --git a/lisp/simple.el b/lisp/simple.el index 9fab1d6dd86..67f6e4eedf7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1,6 +1,6 @@ ;;; simple.el --- basic editing commands for Emacs -;; Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -2464,9 +2464,9 @@ COMMAND. To specify a coding system for converting non-ASCII characters in the input and output to the shell command, use \\[universal-coding-system-argument] before this command. By default, the input (from the current buffer) -is encoded in the same coding system that will be used to save the file, -`buffer-file-coding-system'. If the output is going to replace the region, -then it is decoded from that same coding system. +is encoded using coding-system specified by `process-coding-system-alist', +falling back to `default-process-coding-system' if no match for COMMAND +is found in `process-coding-system-alist'. The noninteractive arguments are START, END, COMMAND, OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER. @@ -2677,13 +2677,13 @@ value passed." (defvar process-file-side-effects t "Whether a call of `process-file' changes remote files. -Per default, this variable is always set to `t', meaning that a +By default, this variable is always set to `t', meaning that a call of `process-file' could potentially change any file on a remote host. When set to `nil', a file handler could optimize -its behavior with respect to remote file attributes caching. +its behavior with respect to remote file attribute caching. -This variable should never be changed by `setq'. Instead of, it -shall be set only by let-binding.") +You should only ever change this variable with a let-binding; +never with `setq'.") (defun start-file-process (name buffer program &rest program-args) "Start a program in a subprocess. Return the process object for it. @@ -3487,14 +3487,14 @@ and KILLP is t if a prefix arg was specified." "Kill up to and including ARGth occurrence of CHAR. Case is ignored if `case-fold-search' is non-nil in the current buffer. Goes backward if ARG is negative; error if CHAR not found." - (interactive "p\ncZap to char: ") + (interactive (list (prefix-numeric-value current-prefix-arg) + (read-char "Zap to char: " t))) ;; Avoid "obsolete" warnings for translation-table-for-input. (with-no-warnings (if (char-table-p translation-table-for-input) (setq char (or (aref translation-table-for-input char) char)))) (kill-region (point) (progn (search-forward (char-to-string char) nil nil arg) -; (goto-char (if (> arg 0) (1- (point)) (1+ (point)))) (point)))) ;; kill-line and its subroutines. @@ -4405,23 +4405,25 @@ lines." ;; a cleaner solution to the problem of making C-n do something ;; useful given a tall image. (defun line-move (arg &optional noerror to-end try-vscroll) - (unless (and auto-window-vscroll try-vscroll - ;; Only vscroll for single line moves - (= (abs arg) 1) - ;; But don't vscroll in a keyboard macro. - (not defining-kbd-macro) - (not executing-kbd-macro) - (line-move-partial arg noerror to-end)) - (set-window-vscroll nil 0 t) - (if (and line-move-visual - ;; Display-based column are incompatible with goal-column. - (not goal-column) - ;; When the text in the window is scrolled to the left, - ;; display-based motion doesn't make sense (because each - ;; logical line occupies exactly one screen line). - (not (> (window-hscroll) 0))) - (line-move-visual arg noerror) - (line-move-1 arg noerror to-end)))) + (if noninteractive + (forward-line arg) + (unless (and auto-window-vscroll try-vscroll + ;; Only vscroll for single line moves + (= (abs arg) 1) + ;; But don't vscroll in a keyboard macro. + (not defining-kbd-macro) + (not executing-kbd-macro) + (line-move-partial arg noerror to-end)) + (set-window-vscroll nil 0 t) + (if (and line-move-visual + ;; Display-based column are incompatible with goal-column. + (not goal-column) + ;; When the text in the window is scrolled to the left, + ;; display-based motion doesn't make sense (because each + ;; logical line occupies exactly one screen line). + (not (> (window-hscroll) 0))) + (line-move-visual arg noerror) + (line-move-1 arg noerror to-end))))) ;; Display-based alternative to line-move-1. ;; Arg says how many lines to move. The value is t if we can move the diff --git a/lisp/speedbar.el b/lisp/speedbar.el index bb1debb4552..9065d9ed131 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -1,6 +1,6 @@ ;;; speedbar --- quick access to files and tags in a frame -;; Copyright (C) 1996-2012 Free Software Foundation, Inc. +;; Copyright (C) 1996-2012 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam ;; Keywords: file, tags, tools @@ -1022,7 +1022,7 @@ supported at a time. (set (make-local-variable 'dframe-delete-frame-function) 'speedbar-handle-delete-frame) ;; hscroll - (set (make-local-variable 'automatic-hscrolling) nil) ; Emacs 21 + (set (make-local-variable 'auto-hscroll-mode) nil) ;; reset the selection variable (setq speedbar-last-selected-file nil)) diff --git a/lisp/startup.el b/lisp/startup.el index 518b53ccdf1..4a8af55af2f 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1169,38 +1169,6 @@ the `--debug-init' option to view a complete error backtrace." (or mail-host-address (system-name)))))) - ;; Originally face attributes were specified via - ;; `font-lock-face-attributes'. Users then changed the default - ;; face attributes by setting that variable. However, we try and - ;; be back-compatible and respect its value if set except for - ;; faces where M-x customize has been used to save changes for the - ;; face. - (when (boundp 'font-lock-face-attributes) - (let ((face-attributes font-lock-face-attributes)) - (while face-attributes - (let* ((face-attribute (pop face-attributes)) - (face (car face-attribute))) - ;; Rustle up a `defface' SPEC from a - ;; `font-lock-face-attributes' entry. - (unless (get face 'saved-face) - (let ((foreground (nth 1 face-attribute)) - (background (nth 2 face-attribute)) - (bold-p (nth 3 face-attribute)) - (italic-p (nth 4 face-attribute)) - (underline-p (nth 5 face-attribute)) - face-spec) - (when foreground - (setq face-spec (cons ':foreground (cons foreground face-spec)))) - (when background - (setq face-spec (cons ':background (cons background face-spec)))) - (when bold-p - (setq face-spec (append '(:weight bold) face-spec))) - (when italic-p - (setq face-spec (append '(:slant italic) face-spec))) - (when underline-p - (setq face-spec (append '(:underline t) face-spec))) - (face-spec-set face (list (list t face-spec)) nil))))))) - ;; If parameter have been changed in the init file which influence ;; face realization, clear the face cache so that new faces will ;; be realized. @@ -2348,6 +2316,7 @@ A fancy display is used on graphic displays, normal otherwise." (if (or inhibit-startup-screen initial-buffer-choice noninteractive + (daemonp) inhibit-x-resources) ;; Not displaying a startup screen. If 3 or more files @@ -2390,9 +2359,7 @@ A fancy display is used on graphic displays, normal otherwise." ;; (with-no-warnings ;; (setq menubar-bindings-done t)) - (if (> file-count 0) - (display-startup-screen t) - (display-startup-screen nil))))) + (display-startup-screen (> file-count 0))))) (defun command-line-normalize-file-name (file) "Collapse multiple slashes to one, to handle non-Emacs file names." diff --git a/lisp/subr.el b/lisp/subr.el index a6ad67283be..8e296aa7422 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -678,7 +678,6 @@ Subkeymaps may be modified but are not canonicalized." ;; Process the bindings starting from the end. (dolist (binding (prog1 bindings (setq bindings ()))) (let* ((key (car binding)) - (item (cdr binding)) (oldbind (assq key bindings))) (push (if (not oldbind) ;; The normal case: no duplicate bindings. @@ -871,6 +870,7 @@ The normal global definition of the character C-x indirects to this keymap.") (defsubst eventp (obj) "True if the argument is an event object." (or (and (integerp obj) + ;; FIXME: Why bother? ;; Filter out integers too large to be events. ;; M is the biggest modifier. (zerop (logand obj (lognot (1- (lsh ?\M-\^@ 1))))) @@ -1888,8 +1888,7 @@ Used from `delayed-warnings-hook' (which see)." (push warning collapsed))) (setq delayed-warnings-list (nreverse collapsed)))) -;; At present this is only really useful for Emacs internals. -;; Document in the lispref if it becomes generally useful. +;; At present this is only used for Emacs internals. ;; Ref http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00085.html (defvar delayed-warnings-hook '(collapse-delayed-warnings display-delayed-warnings) @@ -1989,6 +1988,10 @@ obey the input decoding and translations usually done by `read-key-sequence'. So escape sequences and keyboard encoding are taken into account. When there's an ambiguity because the key looks like the prefix of some sort of escape sequence, the ambiguity is resolved via `read-key-delay'." + ;; This overriding-terminal-local-map binding also happens to + ;; disable quail's input methods, so although read-key-sequence + ;; always inherits the input method, in practice read-key does not + ;; inherit the input method (at least not if it's based on quail). (let ((overriding-terminal-local-map read-key-empty-map) (overriding-local-map nil) (echo-keystrokes 0) @@ -2093,77 +2096,45 @@ Optional DEFAULT is a default password to use instead of empty input. This function echoes `.' for each character that the user types. -The user ends with RET, LFD, or ESC. DEL or C-h rubs out. -C-y yanks the current kill. C-u kills line. -C-g quits; if `inhibit-quit' was non-nil around this function, -then it returns nil if the user types C-g, but `quit-flag' remains set. - Once the caller uses the password, it can erase the password by doing (clear-string STRING)." - (with-local-quit - (if confirm - (let (success) - (while (not success) - (let ((first (read-passwd prompt nil default)) - (second (read-passwd "Confirm password: " nil default))) - (if (equal first second) - (progn - (and (arrayp second) (clear-string second)) - (setq success first)) - (and (arrayp first) (clear-string first)) - (and (arrayp second) (clear-string second)) - (message "Password not repeated accurately; please start over") - (sit-for 1)))) - success) - (let ((pass nil) - ;; Copy it so that add-text-properties won't modify - ;; the object that was passed in by the caller. - (prompt (copy-sequence prompt)) - (c 0) - (echo-keystrokes 0) - (cursor-in-echo-area t) - (message-log-max nil) - (stop-keys (list 'return ?\r ?\n ?\e)) - (rubout-keys (list 'backspace ?\b ?\177))) - (add-text-properties 0 (length prompt) - minibuffer-prompt-properties prompt) - (while (progn (message "%s%s" - prompt - (make-string (length pass) ?.)) - (setq c (read-key)) - (not (memq c stop-keys))) - (clear-this-command-keys) - (cond ((memq c rubout-keys) ; rubout - (when (> (length pass) 0) - (let ((new-pass (substring pass 0 -1))) - (and (arrayp pass) (clear-string pass)) - (setq pass new-pass)))) - ((eq c ?\C-g) (keyboard-quit)) - ((not (numberp c))) - ((= c ?\C-u) ; kill line - (and (arrayp pass) (clear-string pass)) - (setq pass "")) - ((= c ?\C-y) ; yank - (let* ((str (condition-case nil - (current-kill 0) - (error nil))) - new-pass) - (when str - (setq new-pass - (concat pass - (substring-no-properties str))) - (and (arrayp pass) (clear-string pass)) - (setq c ?\0) - (setq pass new-pass)))) - ((characterp c) ; insert char - (let* ((new-char (char-to-string c)) - (new-pass (concat pass new-char))) - (and (arrayp pass) (clear-string pass)) - (clear-string new-char) - (setq c ?\0) - (setq pass new-pass))))) - (message nil) - (or pass default ""))))) + (if confirm + (let (success) + (while (not success) + (let ((first (read-passwd prompt nil default)) + (second (read-passwd "Confirm password: " nil default))) + (if (equal first second) + (progn + (and (arrayp second) (clear-string second)) + (setq success first)) + (and (arrayp first) (clear-string first)) + (and (arrayp second) (clear-string second)) + (message "Password not repeated accurately; please start over") + (sit-for 1)))) + success) + (let (minibuf) + (minibuffer-with-setup-hook + (lambda () + (setq minibuf (current-buffer)) + ;; Turn off electricity. + (set (make-local-variable 'post-self-insert-hook) nil) + (add-hook 'after-change-functions + (lambda (beg end _len) + (clear-this-command-keys) + (setq beg (min end (max (minibuffer-prompt-end) + beg))) + (dotimes (i (- end beg)) + (put-text-property (+ i beg) (+ 1 i beg) + 'display (string ?.)))) + nil t)) + (unwind-protect + (read-string prompt nil + (let ((sym (make-symbol "forget-history"))) + (set sym nil) + sym) + default) + (when (buffer-live-p minibuf) + (with-current-buffer minibuf (erase-buffer)))))))) ;; This should be used by `call-interactively' for `n' specs. (defun read-number (prompt &optional default) @@ -2336,6 +2307,8 @@ is nil and `use-dialog-box' is non-nil." (discard-input)))) (let ((ret (eq answer 'act))) (unless noninteractive + ;; FIXME this prints one too many spaces, since prompt + ;; already ends in a space. Eg "... (y or n) y". (message "%s %s" prompt (if ret "y" "n"))) ret))) @@ -3557,8 +3530,7 @@ of STRING. To replace only the first match (if any), make REGEXP match up to \\' and replace a sub-expression, e.g. (replace-regexp-in-string \"\\\\(foo\\\\).*\\\\'\" \"bar\" \" foo foo\" nil nil 1) - => \" bar foo\" -" + => \" bar foo\"" ;; To avoid excessive consing from multiple matches in long strings, ;; don't just call `replace-match' continually. Walk down the diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 3eb2be15698..7c95f47e0fb 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -549,6 +549,7 @@ MODE should be an integer which is a file mode value." (define-key map "R" 'tar-rename-entry) (define-key map "u" 'tar-unflag) (define-key map "v" 'tar-view) + (define-key map "w" 'woman-tar-extract-file) (define-key map "x" 'tar-expunge) (define-key map "\177" 'tar-unflag-backwards) (define-key map "E" 'tar-extract-other-window) @@ -566,6 +567,8 @@ MODE should be an integer which is a file mode value." (define-key map [menu-bar immediate] (cons "Immediate" (make-sparse-keymap "Immediate"))) + (define-key map [menu-bar immediate woman] + '("Read Man Page (WoMan)" . woman-tar-extract-file)) (define-key map [menu-bar immediate view] '("View This File" . tar-view)) (define-key map [menu-bar immediate display] @@ -677,6 +680,8 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'. (fundamental-mode) (signal (car err) (cdr err))))) +(autoload 'woman-tar-extract-file "woman" + "In tar mode, run the WoMan man-page browser on this file." t) (define-minor-mode tar-subfile-mode "Minor mode for editing an element of a tar-file. diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index dedbfcbf338..76d03dd164f 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -1197,9 +1197,9 @@ PREV-OP-ARG are used when invoked recursively during the build-up." ;;; --------------------------------- ;;;###autoload -(defun artist-mode (&optional state) +(define-minor-mode artist-mode "Toggle Artist mode. -With argument STATE, turn Artist mode on if STATE is positive. +With argument ARG, turn Artist mode on if ARG is positive. Artist lets you draw lines, squares, rectangles and poly-lines, ellipses and circles with your mouse and/or keyboard. @@ -1388,36 +1388,24 @@ Variables Hooks - When entering artist-mode, the hook `artist-mode-init-hook' is called. - When quitting artist-mode, the hook `artist-mode-exit-hook' is called. + Turning the mode on or off runs `artist-mode-hook'. Keymap summary \\{artist-mode-map}" - (interactive) - (if (setq artist-mode - (if (null state) (not artist-mode) - (> (prefix-numeric-value state) 0))) - (artist-mode-init) - (artist-mode-exit))) - -;; insert our minor mode string -(or (assq 'artist-mode minor-mode-alist) - (setq minor-mode-alist - (cons '(artist-mode artist-mode-name) - minor-mode-alist))) - -;; insert our minor mode keymap -(or (assq 'artist-mode minor-mode-map-alist) - (setq minor-mode-map-alist - (cons (cons 'artist-mode artist-mode-map) - minor-mode-map-alist))) - + :init-value nil :group 'artist :lighter artist-mode-name + :keymap artist-mode-map + (cond ((null artist-mode) + ;; Turn mode off + (artist-mode-exit)) + (t + ;; Turn mode on + (artist-mode-init)))) ;; Init and exit (defun artist-mode-init () - "Init Artist mode. This will call the hook `artist-mode-init-hook'." + "Init Artist mode. This will call the hook `artist-mode-hook'." ;; Set up a conversion table for mapping tabs and new-lines to spaces. ;; the last case, 0, is for the last position in buffer/region, where ;; the `following-char' function returns 0. @@ -1459,15 +1447,13 @@ Keymap summary (progn (picture-mode) (message ""))) - (run-hooks 'artist-mode-init-hook) (artist-mode-line-show-curr-operation artist-key-is-drawing)) (defun artist-mode-exit () - "Exit Artist mode. This will call the hook `artist-mode-exit-hook'." + "Exit Artist mode. This will call the hook `artist-mode-hook'." (if (and artist-picture-compatibility (eq major-mode 'picture-mode)) (picture-mode-exit)) - (kill-local-variable 'next-line-add-newlines) - (run-hooks 'artist-mode-exit-hook)) + (kill-local-variable 'next-line-add-newlines)) (defun artist-mode-off () "Turn Artist mode off." diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 08254c6f5f7..d0e90c99516 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -1011,7 +1011,8 @@ space does not end a sentence, so don't break a line there." (if current-prefix-arg 'full)))) (unless (memq justify '(t nil none full center left right)) (setq justify 'full)) - (let (max beg fill-pfx) + (let ((start-point (point-marker)) + max beg fill-pfx) (goto-char (max from to)) (when to-eop (skip-chars-backward "\n") @@ -1042,6 +1043,8 @@ space does not end a sentence, so don't break a line there." (setq fill-pfx (fill-region-as-paragraph (point) end justify nosqueeze)) (goto-char end)))) + (goto-char start-point) + (set-marker start-point nil) fill-pfx)) diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 24967ded154..72a3eb474f8 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1576,10 +1576,11 @@ The buffer to mark them in is `flyspell-large-region-buffer'." (if ispell-encoding8-command (setq args (append args - (list - (concat ispell-encoding8-command - (symbol-name - encoding)))))) + (if ispell-really-hunspell + (list ispell-encoding8-command + (upcase (symbol-name encoding))) + (list (concat ispell-encoding8-command + (symbol-name encoding))))))) (let ((process-coding-system-alist (list (cons "\\.*" encoding)))) (setq c (apply 'ispell-call-process-region beg diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 74c32817734..53822694698 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -574,12 +574,12 @@ re-start Emacs." (defvar ispell-dictionary-base-alist - '((nil + '((nil ; default ;; The default dictionary. It may be English.aff, or any other ;; dictionary depending on locale and such things. We should probably ;; ask ispell what dictionary it's using, but until we do that, let's - ;; just use an approximate regexp. - "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-B") nil iso-8859-1) + ;; just use a minimal regexp. [:alpha:] will later be set if possible. + "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) ("american" ; Yankee English "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1) ("brasileiro" ; Brazilian mode @@ -684,7 +684,8 @@ re-start Emacs." ("svenska" ; Swedish mode "[A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" "[^A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]" - "[']" nil ("-C") "~list" iso-8859-1)) + "[']" nil ("-C") "~list" iso-8859-1) + ("hebrew" "[\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" "[^\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" "" nil ("-B") nil cp1255)) "Base value for `ispell-dictionary-alist'.") (defvar ispell-dictionary-alist nil @@ -766,6 +767,12 @@ here just for backwards compatibility.") (make-obsolete-variable 'ispell-aspell-supports-utf8 'ispell-encoding8-command "23.1") +(defvar ispell-emacs-alpha-regexp + (if (string-match "^[[:alpha:]]+$" "abcde") + "[[:alpha:]]" + nil) + "[[:alpha:]] if Emacs supports [:alpha:] regexp, nil +otherwise (current XEmacs does not support it).") ;;; ********************************************************************** ;;; The following are used by ispell, and should not be changed. @@ -1091,8 +1098,7 @@ aspell is used along with Emacs).") (error nil)) ispell-really-aspell ispell-encoding8-command - ;; XEmacs does not like [:alpha:] regexps. - (string-match "^[[:alpha:]]+$" "abcde")) + ispell-emacs-alpha-regexp) (unless ispell-aspell-dictionary-alist (ispell-find-aspell-dictionaries))) @@ -1116,8 +1122,27 @@ aspell is used along with Emacs).") ispell-dictionary-base-alist)) (unless (assoc (car dict) all-dicts-alist) (add-to-list 'all-dicts-alist dict))) - (setq ispell-dictionary-alist all-dicts-alist)))) + (setq ispell-dictionary-alist all-dicts-alist)) + ;; If Emacs flavor supports [:alpha:] use it for global dicts. If + ;; spellchecker also supports UTF-8 via command-line option use it + ;; in communication. This does not affect definitions in ~/.emacs. + (if ispell-emacs-alpha-regexp + (let (tmp-dicts-alist) + (dolist (adict ispell-dictionary-alist) + (add-to-list 'tmp-dicts-alist + (list + (nth 0 adict) ; dict name + "[[:alpha:]]" ; casechars + "[^[:alpha:]]" ; not-casechars + (nth 3 adict) ; otherchars + (nth 4 adict) ; many-otherchars-p + (nth 5 adict) ; ispell-args + (nth 6 adict) ; extended-character-mode + (if ispell-encoding8-command + 'utf-8 + (nth 7 adict))))) + (setq ispell-dictionary-alist tmp-dicts-alist))))) (defun ispell-valid-dictionary-list () "Return a list of valid dictionaries. diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 9e8cbb216d1..191e9f3672b 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -63,15 +63,17 @@ ;; Picture Movement Commands -;; When a cursor is on a wide-column character (e.g. Chinese, -;; Japanese, Korean), this variable tells the desired current column -;; which may be different from (current-column). -(defvar picture-desired-column 0) +(defvar picture-desired-column 0 + "Desired current column for Picture mode. +When a cursor is on a wide-column character (e.g. Chinese, +Japanese, Korean), this may may be different from `current-column'.") + -;; If the value of picture-desired-column is far from the current -;; column, or if the arg ADJUST-TO-CURRENT is non-nil, set it to the -;; current column. Return the current column. (defun picture-update-desired-column (adjust-to-current) + "Maybe update `picture-desired-column'. +If the value of `picture-desired-column' is more than one column +from `current-column', or if the argument ADJUST-TO-CURRENT is +non-nil, set it to the current column. Return `current-column'." (let ((current-column (current-column))) (if (or adjust-to-current (< picture-desired-column (1- current-column)) @@ -240,8 +242,7 @@ Use \"\\[command-apropos] picture-movement\" to see commands which control motio (spacing (when (display-graphic-p frame) (or (with-current-buffer (window-buffer window) line-spacing) - (frame-parameter frame 'line-spacing)))) - rows cols) + (frame-parameter frame 'line-spacing))))) (cond ((floatp spacing) (setq spacing (truncate (* spacing char-ht)))) ((null spacing) @@ -606,64 +607,61 @@ Leaves the region surrounding the rectangle." (defalias 'picture-delete-char 'delete-char) -(defvar picture-mode-map nil) - -(defun picture-substitute (oldfun newfun) - (define-key picture-mode-map (vector 'remap oldfun) newfun)) - -(if (not picture-mode-map) - (progn - (setq picture-mode-map (make-keymap)) - (picture-substitute 'self-insert-command 'picture-self-insert) - (picture-substitute 'completion-separator-self-insert-command - 'picture-self-insert) - (picture-substitute 'completion-separator-self-insert-autofilling - 'picture-self-insert) - (picture-substitute 'forward-char 'picture-forward-column) - (picture-substitute 'backward-char 'picture-backward-column) - (picture-substitute 'delete-char 'picture-clear-column) - ;; There are two possibilities for what is normally on DEL. - (picture-substitute 'backward-delete-char-untabify 'picture-backward-clear-column) - (picture-substitute 'delete-backward-char 'picture-backward-clear-column) - (picture-substitute 'kill-line 'picture-clear-line) - (picture-substitute 'open-line 'picture-open-line) - (picture-substitute 'newline 'picture-newline) - (picture-substitute 'newline-and-indent 'picture-duplicate-line) - (picture-substitute 'next-line 'picture-move-down) - (picture-substitute 'previous-line 'picture-move-up) - (picture-substitute 'move-beginning-of-line 'picture-beginning-of-line) - (picture-substitute 'move-end-of-line 'picture-end-of-line) - (picture-substitute 'mouse-set-point 'picture-mouse-set-point) - - (define-key picture-mode-map "\C-c\C-d" 'picture-delete-char) - (define-key picture-mode-map "\e\t" 'picture-toggle-tab-state) - (define-key picture-mode-map "\t" 'picture-tab) - (define-key picture-mode-map "\e\t" 'picture-tab-search) - (define-key picture-mode-map "\C-c\t" 'picture-set-tab-stops) - (define-key picture-mode-map "\C-c\C-k" 'picture-clear-rectangle) - (define-key picture-mode-map "\C-c\C-w" 'picture-clear-rectangle-to-register) - (define-key picture-mode-map "\C-c\C-y" 'picture-yank-rectangle) - (define-key picture-mode-map "\C-c\C-x" 'picture-yank-rectangle-from-register) - (define-key picture-mode-map "\C-c\C-r" 'picture-draw-rectangle) - (define-key picture-mode-map "\C-c\C-c" 'picture-mode-exit) - (define-key picture-mode-map "\C-c\C-f" 'picture-motion) - (define-key picture-mode-map "\C-c\C-b" 'picture-motion-reverse) - (define-key picture-mode-map "\C-c<" 'picture-movement-left) - (define-key picture-mode-map "\C-c>" 'picture-movement-right) - (define-key picture-mode-map "\C-c^" 'picture-movement-up) - (define-key picture-mode-map "\C-c." 'picture-movement-down) - (define-key picture-mode-map "\C-c`" 'picture-movement-nw) - (define-key picture-mode-map "\C-c'" 'picture-movement-ne) - (define-key picture-mode-map "\C-c/" 'picture-movement-sw) - (define-key picture-mode-map "\C-c\\" 'picture-movement-se) - (define-key picture-mode-map [(control ?c) left] 'picture-movement-left) - (define-key picture-mode-map [(control ?c) right] 'picture-movement-right) - (define-key picture-mode-map [(control ?c) up] 'picture-movement-up) - (define-key picture-mode-map [(control ?c) down] 'picture-movement-down) - (define-key picture-mode-map [(control ?c) home] 'picture-movement-nw) - (define-key picture-mode-map [(control ?c) prior] 'picture-movement-ne) - (define-key picture-mode-map [(control ?c) end] 'picture-movement-sw) - (define-key picture-mode-map [(control ?c) next] 'picture-movement-se))) +(defvar picture-mode-map + (let ((map (make-keymap))) + (define-key map [remap self-insert-command] 'picture-self-insert) + (define-key map [remap self-insert-command] 'picture-self-insert) + (define-key map [remap completion-separator-self-insert-command] + 'picture-self-insert) + (define-key map [remap completion-separator-self-insert-autofilling] + 'picture-self-insert) + (define-key map [remap forward-char] 'picture-forward-column) + (define-key map [remap backward-char] 'picture-backward-column) + (define-key map [remap delete-char] 'picture-clear-column) + ;; There are two possibilities for what is normally on DEL. + (define-key map [remap backward-delete-char-untabify] + 'picture-backward-clear-column) + (define-key map [remap delete-backward-char] 'picture-backward-clear-column) + (define-key map [remap kill-line] 'picture-clear-line) + (define-key map [remap open-line] 'picture-open-line) + (define-key map [remap newline] 'picture-newline) + (define-key map [remap newline-and-indent] 'picture-duplicate-line) + (define-key map [remap next-line] 'picture-move-down) + (define-key map [remap previous-line] 'picture-move-up) + (define-key map [remap move-beginning-of-line] 'picture-beginning-of-line) + (define-key map [remap move-end-of-line] 'picture-end-of-line) + (define-key map [remap mouse-set-point] 'picture-mouse-set-point) + (define-key map "\C-c\C-d" 'picture-delete-char) + (define-key map "\e\t" 'picture-toggle-tab-state) + (define-key map "\t" 'picture-tab) + (define-key map "\e\t" 'picture-tab-search) + (define-key map "\C-c\t" 'picture-set-tab-stops) + (define-key map "\C-c\C-k" 'picture-clear-rectangle) + (define-key map "\C-c\C-w" 'picture-clear-rectangle-to-register) + (define-key map "\C-c\C-y" 'picture-yank-rectangle) + (define-key map "\C-c\C-x" 'picture-yank-rectangle-from-register) + (define-key map "\C-c\C-r" 'picture-draw-rectangle) + (define-key map "\C-c\C-c" 'picture-mode-exit) + (define-key map "\C-c\C-f" 'picture-motion) + (define-key map "\C-c\C-b" 'picture-motion-reverse) + (define-key map "\C-c<" 'picture-movement-left) + (define-key map "\C-c>" 'picture-movement-right) + (define-key map "\C-c^" 'picture-movement-up) + (define-key map "\C-c." 'picture-movement-down) + (define-key map "\C-c`" 'picture-movement-nw) + (define-key map "\C-c'" 'picture-movement-ne) + (define-key map "\C-c/" 'picture-movement-sw) + (define-key map "\C-c\\" 'picture-movement-se) + (define-key map [(control ?c) left] 'picture-movement-left) + (define-key map [(control ?c) right] 'picture-movement-right) + (define-key map [(control ?c) up] 'picture-movement-up) + (define-key map [(control ?c) down] 'picture-movement-down) + (define-key map [(control ?c) home] 'picture-movement-nw) + (define-key map [(control ?c) prior] 'picture-movement-ne) + (define-key map [(control ?c) end] 'picture-movement-sw) + (define-key map [(control ?c) next] 'picture-movement-se) + map) + "Keymap used in `picture-mode'.") (defcustom picture-mode-hook nil "If non-nil, its value is called on entry to Picture mode. diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 9472d7df879..af00531137a 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1492,8 +1492,8 @@ Puts point on a blank line between them." (defvar latex-complete-bibtex-cache nil) -(defun latex-string-prefix-p (str1 str2) - (eq t (compare-strings str1 nil nil str2 0 (length str1)))) +(define-obsolete-function-alias 'latex-string-prefix-p + 'string-prefix-p "24.2") (defvar bibtex-reference-key) (declare-function reftex-get-bibfile-list "reftex-cite.el" ()) @@ -1507,7 +1507,7 @@ Puts point on a blank line between them." keys) (if (and (eq (car latex-complete-bibtex-cache) (reftex-get-bibfile-list)) - (latex-string-prefix-p (nth 1 latex-complete-bibtex-cache) + (string-prefix-p (nth 1 latex-complete-bibtex-cache) key)) ;; Use the cache. (setq keys (nth 2 latex-complete-bibtex-cache)) @@ -2051,10 +2051,7 @@ IN can be either a string (with the same % escapes in it) indicating OUT describes the output file and is either a %-escaped string or nil to indicate that there is no output file.") -;; defsubst* gives better byte-code than defsubst. -(defsubst* tex-string-prefix-p (str1 str2) - "Return non-nil if STR1 is a prefix of STR2" - (eq t (compare-strings str2 nil (length str1) str1 nil nil))) +(define-obsolete-function-alias 'tex-string-prefix-p 'string-prefix-p "24.2") (defun tex-guess-main-file (&optional all) "Find a likely `tex-main-file'. @@ -2069,7 +2066,7 @@ of the current buffer." (with-current-buffer buf (when (and (cond ((null all) (equal dir default-directory)) - ((eq all 'sub) (tex-string-prefix-p default-directory dir)) + ((eq all 'sub) (string-prefix-p default-directory dir)) (t)) (stringp tex-main-file)) (throw 'found (expand-file-name tex-main-file))))) @@ -2078,7 +2075,7 @@ of the current buffer." (with-current-buffer buf (when (and (cond ((null all) (equal dir default-directory)) - ((eq all 'sub) (tex-string-prefix-p default-directory dir)) + ((eq all 'sub) (string-prefix-p default-directory dir)) (t)) buffer-file-name ;; (or (easy-mmode-derived-mode-p 'latex-mode) diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index 40cbbc59292..8a4fe4f87fd 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el @@ -124,15 +124,51 @@ ;;; Code: +(defgroup two-column nil + "Minor mode for editing of two-column text." + :prefix "2C-" + :group 'frames) + +(defcustom 2C-mode-line-format + '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name + minor-mode-alist "%n" mode-line-process ")%]%-") + "Value of `mode-line-format' for a buffer in two-column minor mode." + :type 'sexp + :group 'two-column) + +(defcustom 2C-other-buffer-hook 'text-mode + "Hook run in new buffer when it is associated with current one." + :type 'function + :group 'two-column) + +(defcustom 2C-separator "" + "A string inserted between the two columns when merging. +This gets set locally by \\[2C-split]." + :type 'string + :group 'two-column) +(put '2C-separator 'permanent-local t) + +(defcustom 2C-window-width 40 + "The width of the first column. (Must be at least `window-min-width'.) +This value is local for every buffer that sets it." + :type 'integer + :group 'two-column) +(make-variable-buffer-local '2C-window-width) +(put '2C-window-width 'permanent-local t) + +(defcustom 2C-beyond-fill-column 4 + "Base for calculating `fill-column' for a buffer in two-column minor mode. +The value of `fill-column' becomes `2C-window-width' for this buffer +minus this value." + :type 'integer + :group 'two-column) + +(defcustom 2C-autoscroll t + "If non-nil, Emacs attempts to keep the two column's buffers aligned." + :type 'boolean + :group 'two-column) + - -;; Lucid patch -(or (fboundp 'frame-width) - (fset 'frame-width 'screen-width)) - - -;;;;; Set up keymap ;;;;; - (defvar 2C-mode-map (let ((map (make-sparse-keymap))) (define-key map "2" '2C-two-columns) @@ -142,8 +178,6 @@ map) "Keymap for commands for setting up two-column mode.") - - ;;;###autoload (autoload '2C-command "two-column" () t 'keymap) (fset '2C-command 2C-mode-map) @@ -154,7 +188,6 @@ ;;;###autoload (global-set-key [f2] '2C-command) - (defvar 2C-minor-mode-map (let ((map (make-sparse-keymap))) (define-key map "1" '2C-merge) @@ -167,7 +200,6 @@ map) "Keymap for commands for use in two-column mode.") - (setq minor-mode-map-alist (cons (cons '2C-mode (let ((map (make-sparse-keymap))) @@ -181,15 +213,8 @@ map (current-global-map)) map)) minor-mode-map-alist)) + -;;;;; variable declarations ;;;;; - -(defgroup two-column nil - "Minor mode for editing of two-column text." - :prefix "2C-" - :group 'frames) - - ;; Markers seem to be the only buffer-id not affected by renaming a buffer. ;; This nevertheless loses when a buffer is killed. The variable-name is ;; required by `describe-mode'. @@ -198,62 +223,8 @@ (make-variable-buffer-local '2C-mode) (put '2C-mode 'permanent-local t) - - (setq minor-mode-alist (cons '(2C-mode " 2C") minor-mode-alist)) - - -;; rearranged, so that the pertinent info will show in 40 columns -(defcustom 2C-mode-line-format - '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name - minor-mode-alist "%n" mode-line-process ")%]%-") - "Value of `mode-line-format' for a buffer in two-column minor mode." - :type 'sexp - :group 'two-column) - - -(defcustom 2C-other-buffer-hook 'text-mode - "Hook run in new buffer when it is associated with current one." - :type 'function - :group 'two-column) - - -(defcustom 2C-separator "" - "A string inserted between the two columns when merging. -This gets set locally by \\[2C-split]." - :type 'string - :group 'two-column) -(put '2C-separator 'permanent-local t) - - - -(defcustom 2C-window-width 40 - "The width of the first column. (Must be at least `window-min-width') -This value is local for every buffer that sets it." - :type 'integer - :group 'two-column) -(make-variable-buffer-local '2C-window-width) -(put '2C-window-width 'permanent-local t) - - - -(defcustom 2C-beyond-fill-column 4 - "Base for calculating `fill-column' for a buffer in two-column minor mode. -The value of `fill-column' becomes `2C-window-width' for this buffer -minus this value." - :type 'integer - :group 'two-column) - - - -(defcustom 2C-autoscroll t - "If non-nil, Emacs attempts to keep the two column's buffers aligned." - :type 'boolean - :group 'two-column) - - - (defvar 2C-autoscroll-start nil) (make-variable-buffer-local '2C-autoscroll-start) @@ -276,7 +247,6 @@ minus this value." (if req (error "You must first set two-column minor mode")))) - ;; function for setting up two-column minor mode in a buffer associated ;; with the buffer pointed to by the marker other. (defun 2C-mode (other) @@ -320,7 +290,6 @@ The appearance of the screen can be customized by the variables (run-hooks '2C-mode-hook)) - ;;;###autoload (defun 2C-two-columns (&optional buffer) "Split current window vertically for two-column editing. @@ -356,7 +325,6 @@ first and the associated buffer to its right." (other-window -1))))) - ;;;###autoload (defun 2C-associate-buffer () "Associate another buffer with this one in two-column minor mode. @@ -368,9 +336,8 @@ accepting the proposed default buffer. (let ((b1 (current-buffer)) (b2 (or (2C-other) (read-buffer "Associate buffer: " (other-buffer))))) - (save-excursion - (setq 2C-mode nil) - (set-buffer b2) + (setq 2C-mode nil) + (with-current-buffer b2 (and (2C-other) (not (eq b1 (2C-other))) (error "Buffer already associated with buffer `%s'" @@ -382,7 +349,6 @@ accepting the proposed default buffer. (2C-two-columns b2))) - ;;;###autoload (defun 2C-split (arg) "Split a two-column text at point, into two buffers in two-column minor mode. @@ -454,32 +420,28 @@ First column's text sSs Second column's text (move-to-column column))))) - - (defun 2C-dissociate () "Turn off two-column minor mode in current and associated buffer. If the associated buffer is unmodified and empty, it is killed." (interactive) - (let ((buffer (current-buffer))) - (save-excursion - (and (2C-other) - (set-buffer (2C-other)) - (or (not (2C-other)) - (eq buffer (2C-other))) - (if (and (not (buffer-modified-p)) - (eobp) (bobp)) - (kill-buffer nil) - (kill-local-variable '2C-mode) - (kill-local-variable '2C-window-width) - (kill-local-variable '2C-separator) - (kill-local-variable 'mode-line-format) - (kill-local-variable 'fill-column)))) - (kill-local-variable '2C-mode) - (kill-local-variable '2C-window-width) - (kill-local-variable '2C-separator) - (kill-local-variable 'mode-line-format) - (kill-local-variable 'fill-column))) - + (let ((buffer (current-buffer)) + (other (2C-other))) + (if other + (with-current-buffer other + (when (or (not (2C-other)) (eq buffer (2C-other))) + (if (and (not (buffer-modified-p)) (zerop (buffer-size))) + (kill-buffer) + (kill-local-variable '2C-mode) + (kill-local-variable '2C-window-width) + (kill-local-variable '2C-separator) + (kill-local-variable 'mode-line-format) + (kill-local-variable 'fill-column)))))) + (kill-local-variable '2C-mode) + (kill-local-variable '2C-window-width) + (kill-local-variable '2C-separator) + (kill-local-variable 'mode-line-format) + (kill-local-variable 'fill-column) + (force-mode-line-update)) ;; this doesn't use yank-rectangle, so that the first column can @@ -578,7 +540,6 @@ on, this also realigns the two buffers." (message "Autoscrolling is off."))) - (defun 2C-autoscroll () (if 2C-autoscroll ;; catch a mouse scroll on non-selected scrollbar @@ -590,27 +551,25 @@ on, this also realigns the two buffers." (select-window (car (car (cdr last-command-event))))) ;; In some cases scrolling causes an error, but post-command-hook ;; shouldn't, and should always stay in the original window - (condition-case () - (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil) - (/= (window-start) 2C-autoscroll-start) - (2C-other) - (get-buffer-window (2C-other)) - (let ((lines (count-lines (window-start) - 2C-autoscroll-start))) - (if (< (window-start) 2C-autoscroll-start) - (setq lines (- lines))) - (setq 2C-autoscroll-start (window-start)) - (select-window (get-buffer-window (2C-other))) - ;; make sure that other buffer has enough lines - (save-excursion - (insert-char - ?\n (- lines (count-lines (window-start) - (goto-char (point-max))) - -1))) - (scroll-up lines) - (setq 2C-autoscroll-start (window-start)))) - (error)))))) - + (ignore-errors + (and (or 2C-autoscroll-start (2C-toggle-autoscroll t) nil) + (/= (window-start) 2C-autoscroll-start) + (2C-other) + (get-buffer-window (2C-other)) + (let ((lines (count-lines (window-start) + 2C-autoscroll-start))) + (if (< (window-start) 2C-autoscroll-start) + (setq lines (- lines))) + (setq 2C-autoscroll-start (window-start)) + (select-window (get-buffer-window (2C-other))) + ;; make sure that other buffer has enough lines + (save-excursion + (insert-char + ?\n (- lines (count-lines (window-start) + (goto-char (point-max))) + -1))) + (scroll-up lines) + (setq 2C-autoscroll-start (window-start))))))))) (defun 2C-enlarge-window-horizontally (arg) @@ -628,7 +587,6 @@ on, this also realigns the two buffers." (2C-enlarge-window-horizontally (- arg))) - (provide 'two-column) ;;; two-column.el ends here diff --git a/lisp/tmm.el b/lisp/tmm.el index 2a0d1d3d7de..776e4335376 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -165,14 +165,13 @@ Its value should be an event that has a binding in MENU." ;; tmm-km-list is an alist of (STRING . MEANING). ;; It has no other elements. ;; The order of elements in tmm-km-list is the order of the menu bar. - (mapc (lambda (elt) - (cond - ((stringp elt) (setq gl-str elt)) - ((listp elt) (tmm-get-keymap elt not-menu)) - ((vectorp elt) - (dotimes (i (length elt)) - (tmm-get-keymap (cons i (aref elt i)) not-menu))))) - menu) + (dolist (elt menu) + (cond + ((stringp elt) (setq gl-str elt)) + ((listp elt) (tmm-get-keymap elt not-menu)) + ((vectorp elt) + (dotimes (i (length elt)) + (tmm-get-keymap (cons i (aref elt i)) not-menu))))) ;; Choose an element of tmm-km-list; put it in choice. (if (and not-menu (= 1 (length tmm-km-list))) ;; If this is the top-level of an x-popup-menu menu, @@ -313,15 +312,13 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (defun tmm-define-keys (minibuffer) (let ((map (make-sparse-keymap))) (suppress-keymap map t) - (mapc - (lambda (c) - (if (listp tmm-shortcut-style) - (define-key map (char-to-string c) 'tmm-shortcut) - ;; only one kind of letters are shortcuts, so map both upcase and - ;; downcase input to the same - (define-key map (char-to-string (downcase c)) 'tmm-shortcut) - (define-key map (char-to-string (upcase c)) 'tmm-shortcut))) - tmm-short-cuts) + (dolist (c tmm-short-cuts) + (if (listp tmm-shortcut-style) + (define-key map (char-to-string c) 'tmm-shortcut) + ;; only one kind of letters are shortcuts, so map both upcase and + ;; downcase input to the same + (define-key map (char-to-string (downcase c)) 'tmm-shortcut) + (define-key map (char-to-string (upcase c)) 'tmm-shortcut))) (if minibuffer (progn (define-key map [pageup] 'tmm-goto-completions) @@ -401,14 +398,13 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'." (choose-completion)) ;; In minibuffer (delete-region (minibuffer-prompt-end) (point-max)) - (mapc (lambda (elt) - (if (string= - (substring (car elt) 0 - (min (1+ (length tmm-mid-prompt)) - (length (car elt)))) - (concat (char-to-string c) tmm-mid-prompt)) - (setq s (car elt)))) - tmm-km-list) + (dolist (elt tmm-km-list) + (if (string= + (substring (car elt) 0 + (min (1+ (length tmm-mid-prompt)) + (length (car elt)))) + (concat (char-to-string c) tmm-mid-prompt)) + (setq s (car elt)))) (insert s) (exit-minibuffer))))) @@ -540,20 +536,16 @@ of `menu-bar-final-items'." (setq allbind (cons globalbind (cons localbind minorbind))) ;; Merge all the elements of ALLBIND into one keymap. - (mapc (lambda (in) - (if (and (symbolp in) (keymapp in)) - (setq in (symbol-function in))) - (and in (keymapp in) - (if (keymapp bind) - (setq bind (nconc bind (copy-sequence (cdr in)))) - (setq bind (copy-sequence in))))) - allbind) + (dolist (in allbind) + (if (and (symbolp in) (keymapp in)) + (setq in (symbol-function in))) + (and in (keymapp in) + (setq bind (if (keymapp bind) + (nconc bind (copy-sequence (cdr in))) + (copy-sequence in))))) ;; Return that keymap. bind)))) -;; Huh? What's that about? --Stef -(add-hook 'calendar-load-hook (lambda () (require 'cal-menu))) - (provide 'tmm) ;;; tmm.el ends here diff --git a/lisp/tutorial.el b/lisp/tutorial.el index b512700f5b9..e0e2a82fab9 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el @@ -585,7 +585,6 @@ with some explanatory links." (not (get-text-property (match-beginning 1) 'tutorial-remark)) (let* ((desc (car changed-key)) (ck (cdr changed-key)) - (key (nth 0 ck)) (def-fun (nth 1 ck)) (where (nth 3 ck)) s1 s2 help-string) @@ -724,7 +723,7 @@ See `tutorial--save-tutorial' for more information." saved-file (error-message-string err)))) ;; An error is raised here?? Is this a bug? - (condition-case err + (condition-case nil (undo-only) (error nil)) ;; Restore point diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index d6e25188c69..3c9313e3e7d 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,21 @@ +2012-04-10 William Xu (tiny change) + + * url.el (url-retrieve-internal): Hexify multibye URL string first + when necessary (bug#7017). + +2012-04-10 Lars Magne Ingebrigtsen + + * url.el (url-retrieve-internal): Mention utf-8 encoding. + (url-retrieve): Ditto. + +2012-04-10 Lars Magne Ingebrigtsen + + * url-domsurf.el: New file (bug#1401). + + * url-cookie.el (url-cookie-two-dot-domains): Remove. + (url-cookie-host-can-set-p): Use `url-domsuf-cookie-allowed-p' + instead of the variable above. + 2012-03-25 Lars Magne Ingebrigtsen * url-queue.el (url-queue-kill-job): Check whether the buffer has diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index e6ff9bf7dea..aefe8fffd0a 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -25,6 +25,7 @@ (require 'url-util) (require 'url-parse) +(require 'url-domsuf) (eval-when-compile (require 'cl)) ; defstruct @@ -211,14 +212,6 @@ telling Microsoft that." (concat retval "\r\n") ""))) -(defvar url-cookie-two-dot-domains - (concat "\\.\\(" - (mapconcat 'identity (list "com" "edu" "net" "org" "gov" "mil" "int") - "\\|") - "\\)$") - "A regexp of top level domains that only require two matching -'.'s in the domain name in order to set a cookie.") - (defcustom url-cookie-trusted-urls nil "A list of regular expressions matching URLs to always accept cookies from." :type '(repeat regexp) @@ -230,30 +223,18 @@ telling Microsoft that." :group 'url-cookie) (defun url-cookie-host-can-set-p (host domain) - (let ((numdots 0) - (last nil) - (case-fold-search t) - (mindots 3)) - (while (setq last (string-match "\\." domain last)) - (setq numdots (1+ numdots) - last (1+ last))) - (if (string-match url-cookie-two-dot-domains domain) - (setq mindots 2)) - (cond - ((string= host domain) ; Apparently netscape lets you do this - t) - ((>= numdots mindots) ; We have enough dots in domain name - ;; Need to check and make sure the host is actually _in_ the - ;; domain it wants to set a cookie for though. - (string-match (concat (regexp-quote - ;; Remove the dot from wildcard domains - ;; before matching. - (if (eq ?. (aref domain 0)) - (substring domain 1) - domain)) - "$") host)) - (t - nil)))) + (let ((last nil) + (case-fold-search t)) + (if (string= host domain) ; Apparently netscape lets you do this + t + ;; Remove the dot from wildcard domains before matching. + (when (eq ?. (aref domain 0)) + (setq domain (substring domain 1))) + (and (url-domsuf-cookie-allowed-p domain) + ;; Need to check and make sure the host is actually _in_ the + ;; domain it wants to set a cookie for though. + (string-match (concat (regexp-quote domain) + "$") host))))) (defun url-cookie-handle-set-cookie (str) (setq url-cookies-changed-since-last-save t) diff --git a/lisp/url/url-domsuf.el b/lisp/url/url-domsuf.el new file mode 100644 index 00000000000..29fc166e30b --- /dev/null +++ b/lisp/url/url-domsuf.el @@ -0,0 +1,98 @@ +;;; url-domsuf.el --- Say what domain names can have cookies set. + +;; Copyright (C) 2012 Free Software Foundation, Inc. + +;; Author: Lars Magne Ingebrigtsen + +;; Keywords: comm, data, processes, hypermedia + +;; This file is part of GNU Emacs. +;; +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; The rules for what domains can have cookies set is defined here: +;; http://publicsuffix.org/list/ + +;;; Code: + +(defvar url-domsuf-domains nil) + +(defun url-domsuf-parse-file () + (with-temp-buffer + (insert-file-contents + (expand-file-name "publicsuffix.txt" data-directory)) + (let ((domains nil) + domain exception) + (while (not (eobp)) + (when (not (looking-at "[/\n\t ]")) + ;; !pref.aichi.jp means that it's allowed. + (if (not (eq (following-char) ?!)) + (setq exception nil) + (setq exception t) + (forward-char 1)) + (setq domain (buffer-substring (point) (line-end-position))) + (cond + ((string-match "\\`\\*\\." domain) + (setq domain (substring domain 2)) + (push (cons domain (1+ (length (split-string domain "[.]")))) + domains)) + (exception + (push (cons domain t) domains)) + (t + (push (cons domain nil) domains)))) + (forward-line 1)) + (setq url-domsuf-domains (nreverse domains))))) + +(defun url-domsuf-cookie-allowed-p (domain) + (unless url-domsuf-domains + (url-domsuf-parse-file)) + (let* ((allowedp t) + (domain-bits (split-string domain "[.]")) + (length (length domain-bits)) + (upper-domain (mapconcat 'identity (cdr domain-bits) ".")) + entry modifier) + (dolist (elem url-domsuf-domains) + (setq entry (car elem) + modifier (cdr elem)) + (cond + ;; "com" + ((and (null modifier) + (string= domain entry)) + (setq allowedp nil)) + ;; "!pref.hokkaido.jp" + ((and (eq modifier t) + (string= domain entry)) + (setq allowedp t)) + ;; "*.ar" + ((and (numberp modifier) + (= length modifier) + (string= entry upper-domain)) + (setq allowedp nil)))) + allowedp)) + +;; Tests: + +;; (url-domsuf-cookie-allowed-p "com") => nil +;; (url-domsuf-cookie-allowed-p "foo.bar.ar") => t +;; (url-domsuf-cookie-allowed-p "bar.ar") => nil +;; (url-domsuf-cookie-allowed-p "co.uk") => nil +;; (url-domsuf-cookie-allowed-p "foo.bar.hokkaido.jo") => t +;; (url-domsuf-cookie-allowed-p "bar.hokkaido.jp") => nil +;; (url-domsuf-cookie-allowed-p "pref.hokkaido.jp") => t + +(provide 'url-domsuf) + +;;; url-domsuf.el ends here diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index 848eb66e54b..d12bd5447fa 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el @@ -330,8 +330,7 @@ forbidden in URL encoding." " ") (t (byte-to-string code)))) str (substring str (match-end 0))))) - (setq tmp (concat tmp str)) - tmp)) + (concat tmp str))) (defconst url-unreserved-chars '( diff --git a/lisp/url/url.el b/lisp/url/url.el index 5ced789e4e4..f3ef553bbce 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -149,7 +149,9 @@ take effect. If SILENT, then don't message progress reports and the like. If INHIBIT-COOKIES, cookies will neither be stored nor sent to -the server." +the server. +If URL is a multibyte string, it will be encoded as utf-8 and +URL-encoded before it's used." ;;; XXX: There is code in Emacs that does dynamic binding ;;; of the following variables around url-retrieve: ;;; url-standalone-mode, url-gateway-unplugged, w3-honor-stylesheets, @@ -171,11 +173,16 @@ the list of events, as described in the docstring of `url-retrieve'. If SILENT, don't message progress reports and the like. If INHIBIT-COOKIES, cookies will neither be stored nor sent to -the server." +the server. +If URL is a multibyte string, it will be encoded as utf-8 and +URL-encoded before it's used." (url-do-setup) (url-gc-dead-buffers) (if (stringp url) (set-text-properties 0 (length url) nil url)) + (when (multibyte-string-p url) + (let ((url-unreserved-chars (append '(?: ?/) url-unreserved-chars))) + (setq url (url-hexify-string url)))) (if (not (vectorp url)) (setq url (url-generic-parse-url url))) (if (not (functionp callback)) diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 16e33889c31..8b6b85dd22e 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -545,7 +545,7 @@ but in the file header instead, in which case move forward to the first hunk." (condition-case-unless-debug nil (diff-refine-hunk) (error nil)))) (easy-mmode-define-navigation - diff-file diff-file-header-re "file" diff-end-of-hunk) + diff-file diff-file-header-re "file" diff-end-of-file) (defun diff-restrict-view (&optional arg) "Restrict the view to the current hunk. diff --git a/lisp/vc/pcvs-util.el b/lisp/vc/pcvs-util.el index b300247e552..a3c525cb896 100644 --- a/lisp/vc/pcvs-util.el +++ b/lisp/vc/pcvs-util.el @@ -182,9 +182,7 @@ arguments. If ARGS is not a list, no argument will be passed." (if oneline (line-end-position) (point-max)))) (file-error nil))) -(defun cvs-string-prefix-p (str1 str2) - "Tell whether STR1 is a prefix of STR2." - (eq t (compare-strings str2 nil (length str1) str1 nil nil))) +(define-obsolete-function-alias 'cvs-string-prefix-p 'string-prefix-p "24.2") ;;;; ;;;; file names diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index 9ba65cda143..6aec24755b5 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el @@ -432,8 +432,8 @@ If non-nil, NEW means to create a new buffer no matter what." (case cvs-reuse-cvs-buffer (always t) (subdir - (or (cvs-string-prefix-p default-directory dir) - (cvs-string-prefix-p dir default-directory))) + (or (string-prefix-p default-directory dir) + (string-prefix-p dir default-directory))) (samedir (string= default-directory dir))) (return buffer))))) ;; we really have to create a new buffer: @@ -887,7 +887,7 @@ RM-MSGS if non-nil means remove messages." (eq (cvs-fileinfo->type last-fi) 'DIRCHANGE) (not (when first-dir (setq first-dir nil) t)) (or (eq rm-dirs 'all) - (not (cvs-string-prefix-p + (not (string-prefix-p (cvs-fileinfo->dir last-fi) (cvs-fileinfo->dir fi))) (and (eq type 'DIRCHANGE) (eq rm-dirs 'empty)) @@ -1839,7 +1839,7 @@ Signal an error if there is no backup file." (setq buffer-file-name (expand-file-name buffer-file-name)) (let (ret) (dolist (fi (or fis (list (cvs-create-fileinfo 'DIRCHANGE "" "." "")))) - (when (cvs-string-prefix-p + (when (string-prefix-p (expand-file-name (cvs-fileinfo->full-name fi) dir) buffer-file-name) (setq ret t))) @@ -2261,7 +2261,7 @@ With prefix argument, prompt for cvs flags." (defun cvs-dir-member-p (fileinfo dir) "Return true if FILEINFO represents a file in directory DIR." (and (not (eq (cvs-fileinfo->type fileinfo) 'DIRCHANGE)) - (cvs-string-prefix-p dir (cvs-fileinfo->dir fileinfo)))) + (string-prefix-p dir (cvs-fileinfo->dir fileinfo)))) (defun cvs-execute-single-file (fi extractor program constant-args) "Internal function for `cvs-execute-single-file-list'." @@ -2392,7 +2392,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (set-buffer cvs-buf) ;; look for a corresponding pcl-cvs buffer (when (and (eq major-mode 'cvs-mode) - (cvs-string-prefix-p default-directory dir)) + (string-prefix-p default-directory dir)) (let ((subdir (substring dir (length default-directory)))) (set-buffer buffer) (set (make-local-variable 'cvs-buffer) cvs-buf) @@ -2423,7 +2423,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (set-buffer cvs-buf) ;; look for a corresponding pcl-cvs buffer (when (and (eq major-mode 'cvs-mode) - (cvs-string-prefix-p default-directory file)) + (string-prefix-p default-directory file)) (let* ((file (substring file (length default-directory))) (fi (cvs-create-fileinfo (if (string= "0" version) diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el index a1dd807d828..f4964ef85cc 100644 --- a/lisp/vc/vc-annotate.el +++ b/lisp/vc/vc-annotate.el @@ -522,12 +522,12 @@ the file in question, search for the log entry required and move point." (car rev-at-line) t 1))))))) (defun vc-annotate-show-diff-revision-at-line-internal (filediff) - (if (not (equal major-mode 'vc-annotate-mode)) + (if (not (derived-mode-p 'vc-annotate-mode)) (message "Cannot be invoked outside of a vc annotate buffer") (let* ((rev-at-line (vc-annotate-extract-revision-at-line)) - (prev-rev nil) - (rev (car rev-at-line)) - (fname (cdr rev-at-line))) + (prev-rev nil) + (rev (car rev-at-line)) + (fname (cdr rev-at-line))) (if (not rev-at-line) (message "Cannot extract revision number from the current line") (setq prev-rev @@ -535,17 +535,15 @@ the file in question, search for the log entry required and move point." (if filediff fname nil) rev)) (if (not prev-rev) (message "Cannot diff from any revision prior to %s" rev) - (save-window-excursion - (vc-diff-internal - nil - ;; The value passed here should follow what - ;; `vc-deduce-fileset' returns. - (list vc-annotate-backend - (if filediff - (list fname) - nil)) - prev-rev rev)) - (switch-to-buffer "*vc-diff*")))))) + (vc-diff-internal + t + ;; The value passed here should follow what + ;; `vc-deduce-fileset' returns. + (list vc-annotate-backend + (if filediff + (list fname) + nil)) + prev-rev rev)))))) (defun vc-annotate-show-diff-revision-at-line () "Visit the diff of the revision at line from its previous revision." diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 798131236d5..505e40f46ba 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -37,7 +37,6 @@ ;; are bzr-versioned, `vc-bzr` presently runs `bzr status` on the ;; symlink, thereby not detecting whether the actual contents ;; (that is, the target contents) are changed. -;; See https://bugs.launchpad.net/vc-bzr/+bug/116607 ;;; Properties of the backend @@ -65,14 +64,6 @@ :group 'vc-bzr :type 'string) -(defcustom vc-bzr-sha1-program '("sha1sum") - "Name of program to compute SHA1. -It must be a string \(program name\) or list of strings \(name and its args\)." - :type '(repeat string) - :group 'vc-bzr) - -(define-obsolete-variable-alias 'sha1-program 'vc-bzr-sha1-program "24.1") - (defcustom vc-bzr-diff-switches nil "String or list of strings specifying switches for bzr diff under VC. If nil, use the value of `vc-diff-switches'. If t, use no switches." @@ -190,20 +181,15 @@ in the repository root directory of FILE." (defun vc-bzr-sha1 (file) (with-temp-buffer (set-buffer-multibyte nil) - (let ((prog vc-bzr-sha1-program) - (args nil) - process-file-side-effects) - (when (consp prog) - (setq args (cdr prog)) - (setq prog (car prog))) - (apply 'process-file prog (file-relative-name file) t nil args) - (buffer-substring (point-min) (+ (point-min) 40))))) + (insert-file-contents-literally file) + (sha1 (current-buffer)))) (defun vc-bzr-state-heuristic (file) "Like `vc-bzr-state' but hopefully without running Bzr." - ;; `bzr status' was excruciatingly slow with large histories and - ;; pending merges, so try to avoid using it until they fix their - ;; performance problems. + ;; `bzr status' could be slow with large histories and pending merges, + ;; so this tries to avoid calling it if possible. bzr status is + ;; faster now, so this is not as important as it was. + ;; ;; This function tries first to parse Bzr internal file ;; `checkout/dirstate', but it may fail if Bzr internal file format ;; has changed. As a safeguard, the `checkout/dirstate' file is @@ -299,10 +285,7 @@ in the repository root directory of FILE." 'up-to-date) (t 'edited)) 'unregistered)))) - ;; Either the dirstate file can't be read, or the sha1 - ;; executable is missing, or ... - ;; In either case, recent versions of Bzr aren't that slow - ;; any more. + ;; The dirstate file can't be read, or some other problem. (error (vc-bzr-state file))))))) @@ -417,49 +400,56 @@ string or nil, and STATUS is one of the symbols: `added', `ignored', `kindchanged', `modified', `removed', `renamed', `unknown', which directly correspond to `bzr status' output, or 'unchanged for files whose copy in the working tree is identical to the one -in the branch repository, or nil for files that are not -registered with Bzr. - -If any error occurred in running `bzr status', then return nil." +in the branch repository (or whose status not be determined)." +;; Doc used to also say the following, but AFAICS, it has never been true. +;; +;; ", or nil for files that are not registered with Bzr. +;; If any error occurred in running `bzr status', then return nil." +;; +;; Rather than returning nil in case of an error, it returns +;; (unchanged . WARNING). FIXME unchanged is not the best status to +;; return in case of error. (with-temp-buffer - (let ((ret (condition-case nil - (vc-bzr-command "status" t 0 file) - (file-error nil))) ; vc-bzr-program not found. - (status 'unchanged)) - ;; the only secure status indication in `bzr status' output - ;; is a couple of lines following the pattern:: - ;; | : - ;; | - ;; if the file is up-to-date, we get no status report from `bzr', - ;; so if the regexp search for the above pattern fails, we consider - ;; the file to be up-to-date. - (goto-char (point-min)) - (when (re-search-forward - ;; bzr prints paths relative to the repository root. - (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+" - (regexp-quote (vc-bzr-file-name-relative file)) - ;; Bzr appends a '/' to directory names and - ;; '*' to executable files - (if (file-directory-p file) "/?" "\\*?") - "[ \t\n]*$") - nil t) - (lexical-let ((statusword (match-string 1))) - ;; Erase the status text that matched. - (delete-region (match-beginning 0) (match-end 0)) - (setq status - (intern (replace-regexp-in-string " " "" statusword))))) - (when status - (goto-char (point-min)) - (skip-chars-forward " \n\t") ;Throw away spaces. - (cons status - ;; "bzr" will output warnings and informational messages to - ;; stderr; due to Emacs's `vc-do-command' (and, it seems, - ;; `start-process' itself) limitations, we cannot catch stderr - ;; and stdout into different buffers. So, if there's anything - ;; left in the buffer after removing the above status - ;; keywords, let us just presume that any other message from - ;; "bzr" is a user warning, and display it. - (unless (eobp) (buffer-substring (point) (point-max)))))))) + ;; This is with-demoted-errors without the condition-case-unless-debug + ;; annoyance, which makes it fail during ert testing. + (let (err) + (condition-case err (vc-bzr-command "status" t 0 file) + (error (message "Error: %S" err) nil))) + (let ((status 'unchanged)) + ;; the only secure status indication in `bzr status' output + ;; is a couple of lines following the pattern:: + ;; | : + ;; | + ;; if the file is up-to-date, we get no status report from `bzr', + ;; so if the regexp search for the above pattern fails, we consider + ;; the file to be up-to-date. + (goto-char (point-min)) + (when (re-search-forward + ;; bzr prints paths relative to the repository root. + (concat "^\\(" vc-bzr-state-words "\\):[ \t\n]+" + (regexp-quote (vc-bzr-file-name-relative file)) + ;; Bzr appends a '/' to directory names and + ;; '*' to executable files + (if (file-directory-p file) "/?" "\\*?") + "[ \t\n]*$") + nil t) + (lexical-let ((statusword (match-string 1))) + ;; Erase the status text that matched. + (delete-region (match-beginning 0) (match-end 0)) + (setq status + (intern (replace-regexp-in-string " " "" statusword))))) + (when status + (goto-char (point-min)) + (skip-chars-forward " \n\t") ;Throw away spaces. + (cons status + ;; "bzr" will output warnings and informational messages to + ;; stderr; due to Emacs's `vc-do-command' (and, it seems, + ;; `start-process' itself) limitations, we cannot catch stderr + ;; and stdout into different buffers. So, if there's anything + ;; left in the buffer after removing the above status + ;; keywords, let us just presume that any other message from + ;; "bzr" is a user warning, and display it. + (unless (eobp) (buffer-substring (point) (point-max)))))))) (defun vc-bzr-state (file) (lexical-let ((result (vc-bzr-status file))) diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 33611b4eafd..4c32eea2f72 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1,6 +1,6 @@ ;;; vc-dir.el --- Directory status display under VC -;; Copyright (C) 2007-2012 Free Software Foundation, Inc. +;; Copyright (C) 2007-2012 Free Software Foundation, Inc. ;; Author: Dan Nicolaescu ;; Keywords: vc tools @@ -556,7 +556,7 @@ If a prefix argument is given, move by that many lines." (let ((data (ewoc-data crt)) (dir (vc-dir-node-directory crt))) (and (vc-dir-fileinfo->directory data) - (vc-string-prefix-p dir argdir) + (string-prefix-p dir argdir) (vc-dir-fileinfo->marked data) (setq found data)))) found)) @@ -818,7 +818,7 @@ child files." data) (while (and (setq crt (ewoc-next vc-ewoc crt)) - (vc-string-prefix-p dir + (string-prefix-p dir (progn (setq data (ewoc-data crt)) (vc-dir-node-directory crt)))) @@ -846,7 +846,7 @@ If it is a file, return the corresponding cons for the file itself." data) (while (and (setq crt (ewoc-next vc-ewoc crt)) - (vc-string-prefix-p dir (progn + (string-prefix-p dir (progn (setq data (ewoc-data crt)) (vc-dir-node-directory crt)))) (unless (vc-dir-fileinfo->directory data) @@ -878,10 +878,10 @@ If it is a file, return the corresponding cons for the file itself." children dname) ;; Find DIR - (while (and crt (not (vc-string-prefix-p + (while (and crt (not (string-prefix-p dirname (vc-dir-node-directory crt)))) (setq crt (ewoc-next vc-ewoc crt))) - (while (and crt (vc-string-prefix-p + (while (and crt (string-prefix-p dirname (setq dname (vc-dir-node-directory crt)))) (let ((data (ewoc-data crt))) @@ -915,7 +915,7 @@ If it is a file, return the corresponding cons for the file itself." (if (not (derived-mode-p 'vc-dir-mode)) (push status-buf drop) (let ((ddir default-directory)) - (when (vc-string-prefix-p ddir file) + (when (string-prefix-p ddir file) (if (file-directory-p file) (progn (vc-dir-resync-directory-files file) diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index ec1b127dd19..95c15030953 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -537,13 +537,12 @@ editing!" (kill-buffer (current-buffer))))) (declare-function vc-dir-resynch-file "vc-dir" (&optional fname)) -(declare-function vc-string-prefix-p "vc" (prefix string)) (defun vc-resynch-buffers-in-directory (directory &optional keep noquery reset-vc-info) "Resync all buffers that visit files in DIRECTORY." (dolist (buffer (buffer-list)) (let ((fname (buffer-file-name buffer))) - (when (and fname (vc-string-prefix-p directory fname)) + (when (and fname (string-prefix-p directory fname)) (with-current-buffer buffer (vc-resynch-buffer fname keep noquery reset-vc-info)))))) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 52e8051342d..a2728268816 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2006-2012 Free Software Foundation, Inc. ;; Author: Ivan Kanis +;; Maintainer: FSF ;; Keywords: vc tools ;; Package: vc diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 4cbbf47c2d6..ab7e587eb79 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1,6 +1,6 @@ ;;; vc.el --- drive a version-control system from within Emacs -;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc. +;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc. ;; Author: FSF (see below for full credits) ;; Maintainer: Andre Spiegel @@ -847,7 +847,7 @@ been updated to their corresponding values." (if (file-directory-p file) (dolist (buffer (buffer-list)) (let ((fname (buffer-file-name buffer))) - (when (and fname (vc-string-prefix-p file fname)) + (when (and fname (string-prefix-p file fname)) (push fname flist)))) (push file flist))) ,form @@ -900,7 +900,7 @@ use." (lambda (arg) (message "arg %s" arg) (and (file-directory-p arg) - (vc-string-prefix-p (expand-file-name arg) def-dir))))))) + (string-prefix-p (expand-file-name arg) def-dir))))))) (let ((default-directory repo-dir)) (vc-call-backend bk 'create-repo)) (throw 'found bk)))) @@ -2809,11 +2809,7 @@ to provide the `find-revision' operation instead." ;; These things should probably be generally available - -(defun vc-string-prefix-p (prefix string) - (let ((lpref (length prefix))) - (and (>= (length string) lpref) - (eq t (compare-strings prefix nil nil string nil lpref))))) +(define-obsolete-function-alias 'vc-string-prefix-p 'string-prefix-p "24.2") (defun vc-file-tree-walk (dirname func &rest args) "Walk recursively through DIRNAME. diff --git a/lisp/vcursor.el b/lisp/vcursor.el index 95928ebe87a..19cb7a9df8d 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el @@ -656,12 +656,13 @@ another window. With LEAVE-W, use the current `vcursor-window'." (or window-system (display-color-p) (overlay-put vcursor-overlay 'before-string vcursor-string)) - (overlay-put vcursor-overlay 'face 'vcursor)) + (overlay-put vcursor-overlay 'face 'vcursor) + ;; 200 is purely an arbitrary "high" number. See bug#9663. + (overlay-put vcursor-overlay 'priority 200)) (or leave-w (vcursor-find-window nil t)) ;; vcursor-window now contains the right buffer (or (pos-visible-in-window-p pt vcursor-window) - (set-window-point vcursor-window pt))) - ) + (set-window-point vcursor-window pt)))) (defun vcursor-insert (text) "Insert TEXT, respecting `vcursor-interpret-input'." diff --git a/lisp/version.el b/lisp/version.el index a4bc4fd54a6..d7fb05ea465 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -81,28 +81,45 @@ to the system configuration; look at `system-configuration' instead." ;; Set during dumping, this is a defvar so that it can be setq'd. (defvar emacs-bzr-version nil "\ -String giving the bzr revision number from which this Emacs was built. -This is nil if Emacs was not built from a bzr checkout, or if we could +String giving the bzr revision from which this Emacs was built. +Value is the bzr revision number and a revision ID separated by a blank. +Value is nil if Emacs was not built from a bzr checkout, or if we could not determine the revision.") -(defun emacs-bzr-get-version () "\ +(defun emacs-bzr-get-version (&optional dir) "\ Try to return as a string the bzr revision number of the Emacs sources. -Returns nil if the sources do not seem to be under bzr, or if we could +Value is the bzr revision number and a revision ID separated by a blank. +Value is nil if the sources do not seem to be under bzr, or if we could not determine the revision. Note that this reports on the current state -of the sources, which may not correspond to the running Emacs." - (let ((file (expand-file-name ".bzr/branch/last-revision" source-directory))) - (if (file-readable-p file) - (with-temp-buffer - (insert-file-contents file) - (goto-char (point-max)) - (if (looking-back "\n") - (delete-char -1)) - (buffer-string))))) +of the sources, which may not correspond to the running Emacs. + +Optional argument DIR is a directory to use instead of `source-directory'." + (or dir (setq dir source-directory)) + (when (file-directory-p (setq dir (expand-file-name ".bzr/branch" dir))) + (let (file loc) + (cond ((file-readable-p + (setq file (expand-file-name "last-revision" dir))) + (with-temp-buffer + (insert-file-contents file) + (goto-char (point-max)) + (if (looking-back "\n") + (delete-char -1)) + (buffer-string))) + ;; OK, no last-revision. Is it a lightweight checkout? + ((file-readable-p + (setq file (expand-file-name "location" dir))) + ;; If the parent branch is local, try looking there for the revid. + (if (setq loc (with-temp-buffer + (insert-file-contents file) + (if (looking-at "file://\\(.*\\)") + (match-string 1)))) + (emacs-bzr-get-version loc))) + ;; Could fall back to eg `bzr testament' at this point. + )))) ;; We put version info into the executable in the form that `ident' uses. -(or (eq system-type 'windows-nt) - (purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) - " $\n"))) +(purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version)) + " $\n")) ;; Local Variables: ;; version-control: never diff --git a/lisp/window.el b/lisp/window.el index c9e2469b0d2..c148f5ee01f 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -514,17 +514,19 @@ window).") (if (window-valid-p ignore) (eq window ignore) ignore)) (defun window-min-size (&optional window horizontal ignore) - "Return the minimum number of lines of WINDOW. + "Return the minimum size of WINDOW. WINDOW can be an arbitrary window and defaults to the selected one. Optional argument HORIZONTAL non-nil means return the -minimum number of columns of WINDOW. +minimum number of columns of WINDOW; otherwise return the minimum +number of WINDOW's lines. -Optional argument IGNORE non-nil means ignore any restrictions +Optional argument IGNORE, if non-nil, means ignore restrictions imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. IGNORE equal `safe' means live +`window-min-width' settings. If IGNORE equals `safe', live windows may get as small as `window-safe-min-height' lines and -`window-safe-min-width' columns. IGNORE a window means ignore -restrictions for that window only." +`window-safe-min-width' columns. If IGNORE is a window, ignore +restrictions for that window only. Any other non-nil value +means ignore all of the above restrictions for all windows." (window--min-size-1 (window-normalize-window window) horizontal ignore)) @@ -614,12 +616,13 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns, return the minimum value in the range DELTA..0 by which WINDOW can be shrunk. -Optional argument IGNORE non-nil means ignore any restrictions +Optional argument IGNORE non-nil means ignore restrictions imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. IGNORE equal `safe' means live +`window-min-width' settings. If IGNORE equals `safe', live windows may get as small as `window-safe-min-height' lines and -`window-safe-min-width' columns. IGNORE any window means ignore -restrictions for that window only." +`window-safe-min-width' columns. If IGNORE is a window, ignore +restrictions for that window only. Any other non-nil value means +ignore all of the above restrictions for all windows." (setq window (window-normalize-window window)) (cond ((< delta 0) @@ -734,20 +737,21 @@ window. Return zero if WINDOW cannot be shrunk. Optional argument HORIZONTAL non-nil means return number of columns by which WINDOW can be shrunk. -Optional argument IGNORE non-nil means ignore any restrictions +Optional argument IGNORE non-nil means ignore restrictions imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. IGNORE a window means ignore -restrictions for that window only. IGNORE equal `safe' means +`window-min-width' settings. If IGNORE is a window, ignore +restrictions for that window only. If IGNORE equals `safe', live windows may get as small as `window-safe-min-height' lines -and `window-safe-min-width' columns. +and `window-safe-min-width' columns. Any other non-nil value +means ignore all of the above restrictions for all windows. -Optional argument TRAIL `before' means only windows to the left -of or above WINDOW can be enlarged. Optional argument TRAIL -`after' means only windows to the right of or below WINDOW can be -enlarged. +Optional argument TRAIL restricts the windows that can be enlarged. +If its value is `before', only windows to the left of or above WINDOW +can be enlarged. If it is `after', only windows to the right of or +below WINDOW can be enlarged. Optional argument NOUP non-nil means don't go up in the window -tree but try to enlarge windows within WINDOW's combination only. +tree, but try to enlarge windows within WINDOW's combination only. Optional argument NODOWN non-nil means don't check whether WINDOW itself (and its child windows) can be shrunk; check only whether @@ -808,24 +812,25 @@ at least one other window can be enlarged appropriately." (window--max-delta-1 parent delta horizontal ignore trail)))))) (defun window-max-delta (&optional window horizontal ignore trail noup nodown) - "Return maximum number of lines WINDOW by which WINDOW can be enlarged. + "Return maximum number of lines by which WINDOW can be enlarged. WINDOW can be an arbitrary window and defaults to the selected window. The return value is zero if WINDOW cannot be enlarged. Optional argument HORIZONTAL non-nil means return maximum number of columns by which WINDOW can be enlarged. -Optional argument IGNORE non-nil means ignore any restrictions +Optional argument IGNORE non-nil means ignore restrictions imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. IGNORE a window means ignore -restrictions for that window only. IGNORE equal `safe' means +`window-min-width' settings. If IGNORE is a window, ignore +restrictions for that window only. If IGNORE equals `safe', live windows may get as small as `window-safe-min-height' lines -and `window-safe-min-width' columns. +and `window-safe-min-width' columns. Any other non-nil value means +ignore all of the above restrictions for all windows. -Optional argument TRAIL `before' means only windows to the left -of or below WINDOW can be shrunk. Optional argument TRAIL -`after' means only windows to the right of or above WINDOW can be -shrunk. +Optional argument TRAIL restricts the windows that can be enlarged. +If its value is `before', only windows to the left of or above WINDOW +can be enlarged. If it is `after', only windows to the right of or +below WINDOW can be enlarged. Optional argument NOUP non-nil means don't go up in the window tree but try to obtain the entire space from windows within @@ -860,12 +865,13 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns, return the minimum value in the range DELTA..0 that can be used for shrinking WINDOW. -Optional argument IGNORE non-nil means ignore any restrictions +Optional argument IGNORE non-nil means ignore restrictions imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. IGNORE a window means ignore -restrictions for that window only. IGNORE equal `safe' means +`window-min-width' settings. If IGNORE is a window, ignore +restrictions for that window only. If IGNORE equals `safe', live windows may get as small as `window-safe-min-height' lines -and `window-safe-min-width' columns. +and `window-safe-min-width' columns. Any other non-nil value +means ignore all of the above restrictions for all windows. Optional argument TRAIL `before' means only windows to the left of or below WINDOW can be shrunk. Optional argument TRAIL @@ -916,17 +922,18 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns, return the minimum value in the range DELTA..0 that can be used for shrinking WINDOW. -Optional argument IGNORE non-nil means ignore any restrictions +Optional argument IGNORE non-nil means ignore restrictions imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. IGNORE a window means ignore -restrictions for that window only. IGNORE equal `safe' means +`window-min-width' settings. If IGNORE is a window, ignore +restrictions for that window only. If IGNORE equals `safe', live windows may get as small as `window-safe-min-height' lines -and `window-safe-min-width' columns." +and `window-safe-min-width' columns. Any other non-nil value +means ignore all of the above restrictions for all windows." (setq window (window-normalize-window window)) (window--resizable window delta horizontal ignore)) (defun window-total-size (&optional window horizontal) - "Return the total height or width of window WINDOW. + "Return the total height or width of WINDOW. If WINDOW is omitted or nil, it defaults to the selected window. If HORIZONTAL is omitted or nil, return the total height of @@ -941,7 +948,7 @@ the total width, in columns, like `window-total-width'." ;; See discussion in bug#4543. (defun window-full-height-p (&optional window) - "Return t if WINDOW is as high as the containing frame. + "Return t if WINDOW is as high as its containing frame. More precisely, return t if and only if the total height of WINDOW equals the total height of the root window of WINDOW's frame. WINDOW can be any window and defaults to the selected @@ -951,7 +958,7 @@ one." (window-total-size (frame-root-window window)))) (defun window-full-width-p (&optional window) - "Return t if WINDOW is as wide as the containing frame. + "Return t if WINDOW is as wide as its containing frame. More precisely, return t if and only if the total width of WINDOW equals the total width of the root window of WINDOW's frame. WINDOW can be any window and defaults to the selected one." @@ -1115,7 +1122,7 @@ SIDE can be any of the symbols `left', `top', `right' or "Return window in DIRECTION as seen from WINDOW. DIRECTION must be one of `above', `below', `left' or `right'. WINDOW must be a live window and defaults to the selected one. -IGNORE, when non-nil means a window can be returned even if its +IGNORE non-nil means a window can be returned even if its `no-other-window' parameter is non-nil." (setq window (window-normalize-window window t)) (unless (memq direction '(above below left right)) @@ -1420,7 +1427,7 @@ windows." (defun window--resize-mini-window (window delta) "Resize minibuffer window WINDOW by DELTA lines. If WINDOW cannot be resized by DELTA lines make it as large (or -as small) as possible but don't signal an error." +as small) as possible, but don't signal an error." (when (window-minibuffer-p window) (let* ((frame (window-frame window)) (root (frame-root-window frame)) @@ -1461,12 +1468,13 @@ horizontally by DELTA columns. In this case a positive DELTA means enlarge WINDOW by DELTA columns. DELTA negative means WINDOW shall be shrunk by -DELTA columns. -Optional argument IGNORE non-nil means ignore any restrictions +Optional argument IGNORE non-nil means ignore restrictions imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. IGNORE any window means ignore -restrictions for that window only. IGNORE equal `safe' means +`window-min-width' settings. If IGNORE is a window, ignore +restrictions for that window only. If IGNORE equals `safe', live windows may get as small as `window-safe-min-height' lines -and `window-safe-min-width' columns. +and `window-safe-min-width' columns. Any other non-nil value +means ignore all of the above restrictions for all windows. This function resizes other windows proportionally and never deletes any windows. If you want to move only the low (right) @@ -1516,9 +1524,9 @@ HORIZONTAL non-nil means set the new normal width of these windows. WINDOW specifies a child window of PARENT that has been resized by THIS-DELTA lines (columns). -Optional argument TRAIL either 'before or 'after means set values -for windows before or after WINDOW only. Optional argument -OTHER-DELTA a number specifies that this many lines (columns) +Optional argument TRAIL either `before' or `after' means set values +only for windows before or after WINDOW. Optional argument +OTHER-DELTA, a number, specifies that this many lines (columns) have been obtained from (or returned to) an ancestor window of PARENT in order to resize WINDOW." (let* ((delta-normal @@ -1618,12 +1626,13 @@ be a horizontally combined internal window. WINDOW, if specified, must denote a child window of PARENT that is resized by DELTA lines. -Optional argument IGNORE non-nil means ignore any restrictions +Optional argument IGNORE non-nil means ignore restrictions imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. IGNORE equal `safe' means live +`window-min-width' settings. If IGNORE equals `safe', live windows may get as small as `window-safe-min-height' lines and -`window-safe-min-width' columns. IGNORE any window means ignore -restrictions for that window only. +`window-safe-min-width' columns. If IGNORE is a window, ignore +restrictions for that window only. Any other non-nil value means +ignore all of the above restrictions for all windows. Optional arguments TRAIL and EDGE, when non-nil, restrict the set of windows that shall be resized. If TRAIL equals `before', @@ -1790,12 +1799,13 @@ Optional argument HORIZONTAL non-nil means resize other windows when WINDOW is resized horizontally by DELTA columns. WINDOW itself is not resized by this function. -Optional argument IGNORE non-nil means ignore any restrictions +Optional argument IGNORE non-nil means ignore restrictions imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. IGNORE equal `safe' means live +`window-min-width' settings. If IGNORE equals `safe', live windows may get as small as `window-safe-min-height' lines and -`window-safe-min-width' columns. IGNORE any window means ignore -restrictions for that window only. +`window-safe-min-width' columns. If IGNORE is a window, ignore +restrictions for that window only. Any other non-nil value means +ignore all of the above restrictions for all windows. Optional arguments TRAIL and EDGE, when non-nil, refine the set of windows that shall be resized. If TRAIL equals `before', @@ -1891,12 +1901,13 @@ preferably only resize windows adjacent to EDGE." Optional argument HORIZONTAL non-nil means resize WINDOW horizontally by DELTA columns. -Optional argument IGNORE non-nil means ignore any restrictions +Optional argument IGNORE non-nil means ignore restrictions imposed by fixed size windows, `window-min-height' or -`window-min-width' settings. IGNORE equal `safe' means live +`window-min-width' settings. If IGNORE equals `safe', live windows may get as small as `window-safe-min-height' lines and -`window-safe-min-width' columns. IGNORE any window means ignore -restrictions for that window only. +`window-safe-min-width' columns. If IGNORE is a window, ignore +restrictions for that window only. Any other non-nil value +means ignore all of the above restrictions for all windows. Optional argument ADD non-nil means add DELTA to the new total size of WINDOW. @@ -1986,7 +1997,7 @@ any windows." Optional argument HORIZONTAL non-nil means move WINDOW's right edge by DELTA columns. WINDOW defaults to the selected window. -If DELTA is greater zero, then move the edge downwards or to the +If DELTA is greater than zero, move the edge downwards or to the right. If DELTA is less than zero, move the edge upwards or to the left. If the edge can't be moved by DELTA lines or columns, move it as far as possible in the desired direction." @@ -2091,7 +2102,7 @@ move it as far as possible in the desired direction." (error "Failed adjusting window %s" window))))))) (defun enlarge-window (delta &optional horizontal) - "Make selected window DELTA lines taller. + "Make the selected window DELTA lines taller. Interactively, if no argument is given, make the selected window one line taller. If optional argument HORIZONTAL is non-nil, make selected window wider by DELTA columns. If DELTA is @@ -2112,7 +2123,7 @@ Return nil." horizontal)))) (defun shrink-window (delta &optional horizontal) - "Make selected window DELTA lines smaller. + "Make the selected window DELTA lines smaller. Interactively, if no argument is given, make the selected window one line smaller. If optional argument HORIZONTAL is non-nil, make selected window narrower by DELTA columns. If DELTA is @@ -3643,7 +3654,11 @@ specific buffers." (scroll-bars . ,(window-scroll-bars window)) (vscroll . ,(window-vscroll window)) (dedicated . ,(window-dedicated-p window)) - (point . ,(if writable point (copy-marker point))) + (point . ,(if writable point + (copy-marker point + (buffer-local-value + 'window-point-insertion-type + buffer)))) (start . ,(if writable start (copy-marker start))))))))) (tail (when (memq type '(vc hc)) @@ -5439,7 +5454,7 @@ A value of t means point moves to the beginning or the end of the buffer \(depending on scrolling direction) when no more scrolling possible. When point is already on that position, then signal an error." :type 'boolean - :group 'scrolling + :group 'windows :version "24.1") (defun scroll-up-command (&optional arg) diff --git a/lisp/woman.el b/lisp/woman.el index c76399a96e5..3ab06a5dd73 100644 --- a/lisp/woman.el +++ b/lisp/woman.el @@ -1,6 +1,6 @@ ;;; woman.el --- browse UN*X manual pages `wo (without) man' -;; Copyright (C) 2000-2012 Free Software Foundation, Inc. +;; Copyright (C) 2000-2012 Free Software Foundation, Inc. ;; Author: Francis J. Wright ;; Maintainer: FSF @@ -1595,14 +1595,6 @@ Also make each path-info component into a list. (woman-process-buffer) (goto-char (point-min))))) -;; There is currently no `tar-mode-hook' so use ... -(eval-after-load "tar-mode" - '(progn - (define-key tar-mode-map "w" 'woman-tar-extract-file) - (define-key-after (lookup-key tar-mode-map [menu-bar immediate]) - [woman] '("Read Man Page (WoMan)" . woman-tar-extract-file) 'view))) - - (defvar woman-last-file-name nil "The full pathname of the last file formatted by WoMan.") @@ -2141,7 +2133,7 @@ European characters." (copy-sequence standard-display-table) (make-display-table))) ;; Display the following internal chars correctly: - (aset buffer-display-table woman-unpadded-space-char [?\ ]) + (aset buffer-display-table woman-unpadded-space-char [?\s]) (aset buffer-display-table woman-escaped-escape-char [?\\])) @@ -2401,10 +2393,12 @@ Currently set only from '\" t in the first line of the source file.") (progn (goto-char from) (while (search-forward woman-escaped-escape-string nil t) - (delete-char -1) (insert ?\\)) + (delete-char -1) + (insert ?\\)) (goto-char from) (while (search-forward woman-unpadded-space-string nil t) - (delete-char -1) (insert ?\ )))) + (delete-char -1) + (insert ?\s)))) ;; Must return the new end of file if used in format-alist. (point-max))) @@ -2445,9 +2439,9 @@ Preserves location of `point'." ;; first backwards then forwards: (while (and (<= (setq N (1+ N)) 0) - (cond ((memq (preceding-char) '(?\ ?\t)) + (cond ((memq (preceding-char) '(?\s ?\t)) (delete-char -1) t) - ((memq (following-char) '(?\ ?\t)) + ((memq (following-char) '(?\s ?\t)) (delete-char 1) t) (t nil)))) (if (<= N 0) @@ -3384,7 +3378,7 @@ Ignore the default face and underline only word characters." ;; this used to be globally bound to nil, to avoid an error. Instead ;; we can use bound-and-true-p in woman-translate. (defvar woman-translations) -;; A list of the form (\"[ace]\" (a . b) (c . d) (e . ?\ )) or nil. +;; A list of the form (\"[ace]\" (a . b) (c . d) (e . ?\s)) or nil. (defun woman-get-next-char () "Return and delete next char in buffer, including special chars." @@ -3719,7 +3713,9 @@ expression in parentheses. Leaves point after the value." (setq fn 'woman2-format-paragraphs)))) () ;; Find next control line: - (set-marker to (woman-find-next-control-line)) + (if (equal woman-request "TS") + (set-marker to (woman-find-next-control-line "TE")) + (set-marker to (woman-find-next-control-line))) ;; Call the appropriate function: (funcall fn to))) (if (not (eobp)) ; This should not happen, but ... @@ -3730,12 +3726,13 @@ expression in parentheses. Leaves point after the value." (fset 'insert-and-inherit insert-and-inherit) (set-marker to nil)))) -(defun woman-find-next-control-line () - "Find and return start of next control line." -; (let ((to (save-excursion -; (re-search-forward "^\\." nil t)))) -; (if to (1- to) (point-max))) - (let (to) +(defun woman-find-next-control-line (&optional pat) + "Find and return start of next control line. +PAT, if non-nil, specifies an additional component of the control +line regexp to search for, which is appended to the default +regexp, \"\\(\\\\c\\)?\\n[.']\"." + (let ((pattern (concat "\\(\\\\c\\)?\n[.']" pat)) + to) (save-excursion ;; Must handle ;; ...\c @@ -3744,12 +3741,14 @@ expression in parentheses. Leaves point after the value." ;; BEWARE THAT THIS CODE MAY BE UNRELIABLE!!!!! (while (and - (setq to (re-search-forward "\\(\\\\c\\)?\n[.']" nil t)) + (setq to (re-search-forward pattern nil t)) (match-beginning 1) (looking-at "br")) (goto-char (match-beginning 0)) (woman-delete-line 2))) - (if to (1- to) (point-max)))) + (if to + (- to (+ 1 (length pat))) + (point-max)))) (defun woman2-PD (to) ".PD d -- Set the interparagraph distance to d. @@ -3893,18 +3892,18 @@ Leave 1 blank line. Format paragraphs upto TO." (insert (substring overlap i eol)) (setq i (or eol imax))) ) - ((eq c ?\ ) ; skip + ((eq c ?\s) ; skip (forward-char)) ((eq c ?\t) ; skip (if (eq (following-char) ?\t) (forward-char) ; both tabs, just skip (dotimes (i woman-tab-width) (if (eolp) - (insert ?\ ) ; extend line + (insert ?\s) ; extend line (forward-char)) ; skip ))) (t - (if (or (eq (following-char) ?\ ) ; overwrite OK + (if (or (eq (following-char) ?\s) ; overwrite OK overwritten) ; warning only once per ".sp -" () (setq overwritten t) @@ -4408,7 +4407,7 @@ tab stop columns or pairs (COLUMN . TYPE) where TYPE is R or C." tab (- tab (if (eq type ?C) (/ n 2) n))) ) (setq n (- tab (current-column))) (insert-char ?\s n)) - (insert ?\ )))) + (insert ?\s)))) (defun woman2-DT (to) ".DT -- Restore default tabs. Format paragraphs upto TO. @@ -4426,7 +4425,7 @@ Needs doing properly!" (if (eolp) (woman-delete-whole-line) ; ignore! (let ((delim (following-char)) - (pad ?\ ) end) ; pad defaults to space + (pad ?\s) end) ; pad defaults to space (forward-char) (skip-chars-forward " \t") (or (eolp) (setq pad (following-char))) @@ -4457,8 +4456,6 @@ Needs doing properly!" (defun woman2-TS (to) ".TS -- Start of table code for the tbl processor. Format paragraphs upto TO." - ;; This is a preliminary hack that seems to suffice for lilo.8. - (woman-delete-line 1) ; ignore any arguments (when woman-emulate-tbl ;; Assumes column separator is \t and intercolumn spacing is 3. ;; The first line may optionally be a list of options terminated by @@ -4470,6 +4467,22 @@ Format paragraphs upto TO." (woman-delete-line 1) ;; For each column, find its width and align it: (let ((start (point)) (col 1)) + (WoMan-log "%s" (buffer-substring start (+ start 40))) + ;; change T{ T} to tabs + (while (search-forward "T{\n" to t) + (replace-match "") + (catch 'end + (while (search-forward "\n" to t) + (replace-match " ") + (if (looking-at "T}") + (progn + (delete-char 2) + (throw 'end t)))))) + (goto-char start) + ;; strip space and headers + (while (re-search-forward "^\\.TH\\|\\.sp" to t) + (woman-delete-whole-line)) + (goto-char start) (while (prog1 (search-forward "\t" to t) (goto-char start)) ;; Find current column width: (while (< (point) to) @@ -4483,8 +4496,25 @@ Format paragraphs upto TO." (while (< (point) to) (when (search-forward "\t" to t) (delete-char -1) - (insert-char ?\ (- col (current-column)))) + (insert-char ?\s (- col (current-column)))) (forward-line)) + (goto-char start)) + ;; find maximum width + (let ((max-col 0)) + (while (search-forward "\n" to t) + (backward-char) + (if (> (current-column) max-col) + (setq max-col (current-column))) + (forward-char)) + (goto-char start) + ;; break lines if they are too long + (when (and (> max-col woman-fill-column) + (> woman-fill-column col)) + (setq max-col woman-fill-column) + (woman-break-table col to start) + (goto-char start)) + (while (re-search-forward "^_$" to t) + (replace-match (make-string max-col ?_))) (goto-char start)))) ;; Format table with no filling or adjusting (cf. woman2-nf): (setq woman-nofill t) @@ -4494,6 +4524,17 @@ Format paragraphs upto TO." ;; ".TE -- End of table code for the tbl processor." ;; Turn filling and adjusting back on. +(defun woman-break-table (start-column to start) + (while (< (point) to) + (move-to-column woman-fill-column) + (if (eolp) + (forward-line) + (if (and (search-backward " " start t) + (> (current-column) start-column)) + (progn + (insert-char ?\n 1) + (insert-char ?\s (- start-column 5))) + (forward-line))))) ;;; WoMan message logging: @@ -4531,7 +4572,7 @@ IGNORED is a string appended to the log message." (buffer-substring (point) (line-end-position)))) (if (and (> (length tail) 0) - (/= (string-to-char tail) ?\ )) + (/= (string-to-char tail) ?\s)) (setq tail (concat " " tail))) (WoMan-log-1 (concat "** " request tail " request " ignored)))) diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index a4bb243f35d..5451fa38001 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,15 @@ +2012-04-18 Paul Eggert + + configure: new option --enable-gcc-warnings (Bug#11207) + * Makefile.in (C_WARNINGS_SWITCH): Remove. + (WARN_CFLAGS, WERROR_CFLAGS): New macros. + (ALL_CFLAGS): Use new macros rather than old. + +2012-04-11 Glenn Morris + + * Makefile.in (C_SWITCH_X_SYSTEM): Remove. + (ALL_CFLAGS): Remove C_SWITCH_X_SYSTEM. + 2011-10-13 Dmitry Antipov * lwlib-Xaw.c (openFont, xaw_destroy_instance): Replace free with @@ -1756,7 +1768,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 1995-1999, 2001-2012 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index db108862d70..d43d9ca211e 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in @@ -1,5 +1,5 @@ # Copyright (C) 1992, 1993 Lucid, Inc. -# Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc. +# Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc. # # This file is part of the Lucid Widget Library. # @@ -26,11 +26,11 @@ srcdir=@srcdir@ VPATH=@srcdir@ @SET_MAKE@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ -C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ -C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ +WARN_CFLAGS = `echo @WARN_CFLAGS@ | sed 's/ -Wwrite-strings//'` +WERROR_CFLAGS = @WERROR_CFLAGS@ CC=@CC@ CFLAGS=@CFLAGS@ @@ -53,8 +53,8 @@ OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o ## $(srcdir) is where the lwlib sources are. ## There are no generated lwlib files, hence no need for -I. ALL_CFLAGS= $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ - $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) \ - $(C_WARNINGS_SWITCH) $(PROFILING_CFLAGS) $(CFLAGS) \ + $(C_SWITCH_MACHINE) \ + $(WARN_CFLAGS) $(WERROR_CFLAGS) $(PROFILING_CFLAGS) $(CFLAGS) \ -DHAVE_CONFIG_H -Demacs -I../src \ -I$(srcdir) -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib diff --git a/m4/gl-comp.m4 b/m4/gl-comp.m4 index 4894f840303..73a26c41324 100644 --- a/m4/gl-comp.m4 +++ b/m4/gl-comp.m4 @@ -62,6 +62,7 @@ AC_DEFUN([gl_EARLY], # Code from module largefile: AC_REQUIRE([AC_SYS_LARGEFILE]) # Code from module lstat: + # Code from module manywarnings: # Code from module mktime: # Code from module multiarch: # Code from module nocrash: @@ -100,6 +101,7 @@ AC_DEFUN([gl_EARLY], # Code from module u64: # Code from module unistd: # Code from module verify: + # Code from module warnings: ]) # This macro should be invoked from ./configure.in, in the section @@ -216,6 +218,7 @@ fi gl_TIME_MODULE_INDICATOR([time_r]) AC_REQUIRE([AC_C_INLINE]) gl_UNISTD_H +AC_SUBST([WARN_CFLAGS]) gl_gnulib_enabled_dosname=false gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false gl_gnulib_enabled_pathmax=false @@ -562,6 +565,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/largefile.m4 m4/longlong.m4 m4/lstat.m4 + m4/manywarnings.m4 m4/md5.m4 m4/mktime.m4 m4/multiarch.m4 @@ -596,5 +600,6 @@ AC_DEFUN([gl_FILE_LIST], [ m4/tm_gmtoff.m4 m4/unistd_h.m4 m4/warn-on-use.m4 + m4/warnings.m4 m4/wchar_t.m4 ]) diff --git a/m4/manywarnings.m4 b/m4/manywarnings.m4 new file mode 100644 index 00000000000..fd0e3722d35 --- /dev/null +++ b/m4/manywarnings.m4 @@ -0,0 +1,184 @@ +# manywarnings.m4 serial 3 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# gl_MANYWARN_COMPLEMENT(OUTVAR, LISTVAR, REMOVEVAR) +# -------------------------------------------------- +# Copy LISTVAR to OUTVAR except for the entries in REMOVEVAR. +# Elements separated by whitespace. In set logic terms, the function +# does OUTVAR = LISTVAR \ REMOVEVAR. +AC_DEFUN([gl_MANYWARN_COMPLEMENT], +[ + gl_warn_set= + set x $2; shift + for gl_warn_item + do + case " $3 " in + *" $gl_warn_item "*) + ;; + *) + gl_warn_set="$gl_warn_set $gl_warn_item" + ;; + esac + done + $1=$gl_warn_set +]) + +# gl_MANYWARN_ALL_GCC(VARIABLE) +# ----------------------------- +# Add all documented GCC warning parameters to variable VARIABLE. +# Note that you need to test them using gl_WARN_ADD if you want to +# make sure your gcc understands it. +AC_DEFUN([gl_MANYWARN_ALL_GCC], +[ + dnl First, check if -Wno-missing-field-initializers is needed. + dnl -Wmissing-field-initializers is implied by -W, but that issues + dnl warnings with GCC version before 4.7, for the common idiom + dnl of initializing types on the stack to zero, using { 0, } + AC_REQUIRE([AC_PROG_CC]) + if test -n "$GCC"; then + + dnl First, check -W -Werror -Wno-missing-field-initializers is supported + dnl with the current $CC $CFLAGS $CPPFLAGS. + AC_MSG_CHECKING([whether -Wno-missing-field-initializers is supported]) + AC_CACHE_VAL([gl_cv_cc_nomfi_supported], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [gl_cv_cc_nomfi_supported=yes], + [gl_cv_cc_nomfi_supported=no]) + CFLAGS="$gl_save_CFLAGS"]) + AC_MSG_RESULT([$gl_cv_cc_nomfi_supported]) + + if test "$gl_cv_cc_nomfi_supported" = yes; then + dnl Now check whether -Wno-missing-field-initializers is needed + dnl for the { 0, } construct. + AC_MSG_CHECKING([whether -Wno-missing-field-initializers is needed]) + AC_CACHE_VAL([gl_cv_cc_nomfi_needed], [ + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -W -Werror" + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[void f (void) + { + typedef struct { int a; int b; } s_t; + s_t s1 = { 0, }; + } + ]], + [[]])], + [gl_cv_cc_nomfi_needed=no], + [gl_cv_cc_nomfi_needed=yes]) + CFLAGS="$gl_save_CFLAGS" + ]) + AC_MSG_RESULT([$gl_cv_cc_nomfi_needed]) + fi + fi + + gl_manywarn_set= + for gl_manywarn_item in \ + -Wall \ + -W \ + -Wformat-y2k \ + -Wformat-nonliteral \ + -Wformat-security \ + -Winit-self \ + -Wmissing-include-dirs \ + -Wswitch-default \ + -Wswitch-enum \ + -Wunused \ + -Wunknown-pragmas \ + -Wstrict-aliasing \ + -Wstrict-overflow \ + -Wsystem-headers \ + -Wfloat-equal \ + -Wtraditional \ + -Wtraditional-conversion \ + -Wdeclaration-after-statement \ + -Wundef \ + -Wshadow \ + -Wunsafe-loop-optimizations \ + -Wpointer-arith \ + -Wbad-function-cast \ + -Wc++-compat \ + -Wcast-qual \ + -Wcast-align \ + -Wwrite-strings \ + -Wconversion \ + -Wsign-conversion \ + -Wlogical-op \ + -Waggregate-return \ + -Wstrict-prototypes \ + -Wold-style-definition \ + -Wmissing-prototypes \ + -Wmissing-declarations \ + -Wmissing-noreturn \ + -Wmissing-format-attribute \ + -Wpacked \ + -Wpadded \ + -Wredundant-decls \ + -Wnested-externs \ + -Wunreachable-code \ + -Winline \ + -Winvalid-pch \ + -Wlong-long \ + -Wvla \ + -Wvolatile-register-var \ + -Wdisabled-optimization \ + -Wstack-protector \ + -Woverlength-strings \ + -Wbuiltin-macro-redefined \ + -Wmudflap \ + -Wpacked-bitfield-compat \ + -Wsync-nand \ + ; do + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + # The following are not documented in the manual but are included in + # output from gcc --help=warnings. + for gl_manywarn_item in \ + -Wattributes \ + -Wcoverage-mismatch \ + -Wmultichar \ + -Wunused-macros \ + ; do + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + # More warnings from gcc 4.6.2 --help=warnings. + for gl_manywarn_item in \ + -Wabi \ + -Wcpp \ + -Wdeprecated \ + -Wdeprecated-declarations \ + -Wdiv-by-zero \ + -Wdouble-promotion \ + -Wendif-labels \ + -Wextra \ + -Wformat-contains-nul \ + -Wformat-extra-args \ + -Wformat-zero-length \ + -Wformat=2 \ + -Wmultichar \ + -Wnormalized=nfc \ + -Woverflow \ + -Wpointer-to-int-cast \ + -Wpragmas \ + -Wsuggest-attribute=const \ + -Wsuggest-attribute=noreturn \ + -Wsuggest-attribute=pure \ + -Wtrampolines \ + ; do + gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" + done + + # Disable the missing-field-initializers warning if needed + if test "$gl_cv_cc_nomfi_needed" = yes; then + gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" + fi + + $1=$gl_manywarn_set +]) diff --git a/m4/warnings.m4 b/m4/warnings.m4 new file mode 100644 index 00000000000..c14c4801e78 --- /dev/null +++ b/m4/warnings.m4 @@ -0,0 +1,42 @@ +# warnings.m4 serial 6 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Simon Josefsson + +# gl_AS_VAR_APPEND(VAR, VALUE) +# ---------------------------- +# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it. +m4_ifdef([AS_VAR_APPEND], +[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])], +[m4_define([gl_AS_VAR_APPEND], +[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])]) + + +# gl_WARN_ADD(PARAMETER, [VARIABLE = WARN_CFLAGS]) +# ------------------------------------------------ +# Adds parameter to WARN_CFLAGS if the compiler supports it. For example, +# gl_WARN_ADD([-Wparentheses]). +# +# If VARIABLE is a variable name, AC_SUBST it. +AC_DEFUN([gl_WARN_ADD], +dnl FIXME: gl_Warn must be used unquoted until we can assume +dnl autoconf 2.64 or newer. +[AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl +AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [ + gl_save_compiler_FLAGS="$gl_Flags" + gl_Flags="$gl_Flags $1" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [AS_VAR_SET(gl_Warn, [yes])], + [AS_VAR_SET(gl_Warn, [no])]) + gl_Flags="$gl_save_compiler_FLAGS" +]) +AS_VAR_IF(gl_Warn, [yes], + [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_CFLAGS]], [[$2]]), [" $1"])]) +AS_VAR_POPDEF([gl_Flags])dnl +AS_VAR_POPDEF([gl_Warn])dnl +m4_ifval([$2], [AS_LITERAL_IF([$2], [AC_SUBST([$2])], [])])dnl +]) diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 0c00364d6fa..603baa978e0 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,25 @@ +2012-04-21 Eli Zaretskii + + * sedleim.inp (RUN_EMACS): Replace BUILT_EMACS with EMACS. + Remove stale editing of "else make quail". + (.PHONY, compile-targets): Remove targets. + (compile-main): Edit into something that can be done without + requiring a Unixy shell. + (bootstrap-clean): Likewise: edit to not require $(setwins). + + * sed1v2.inp: Edit "cd $(leimdir) && $(MAKE) ..." into the + equivalent "$(MAKE) $(MFLAGS) -C $(leimdir) ..." command. + +2012-04-18 Paul Eggert + + configure: new option --enable-gcc-warnings (Bug#11207) + * sed1v2.inp, sed3v2.inp, sedlibmk.inp: GNULIB_WARN_CFLAGS, + WARN_CFLAGS, and WERROR_CFLAGS replace C_WARNINGS_SWITCH. + +2012-04-11 Glenn Morris + + * sedlibmk.inp, sed1v2.inp: GNUSTEP_CFLAGS replaces C_SWITCH_X_SYSTEM. + 2012-04-07 Glenn Morris * sed2v2.inp: Bump version to 24.1.50. @@ -1312,7 +1334,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc. + Copyright (C) 1994-1999, 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index c13fbe621f4..b9e94afea51 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -2,7 +2,7 @@ # Configuration script for src/Makefile under DJGPP v2.x # ---------------------------------------------------------------------- # -# Copyright (C) 1996-1997, 1999-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-1997, 1999-2012 Free Software Foundation, Inc. # # This file is part of GNU Emacs. # @@ -39,9 +39,10 @@ s/\.h\.in/.h-in/ /^LIBOBJS *=/s/@[^@\n]*@// /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// /^C_SWITCH_SYSTEM *=/s/@C_SWITCH_SYSTEM@// -/^C_SWITCH_X_SYSTEM *=/s/@C_SWITCH_X_SYSTEM@// +/^GNUSTEP_CFLAGS *=/s/@GNUSTEP_CFLAGS@// /^C_SWITCH_X_SITE *=/s/@C_SWITCH_X_SITE@// -/^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@// +/^WARN_CFLAGS *=/s/@WARN_CFLAGS@// +/^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@// /^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@// #/^LD_SWITCH_X_SITE *=/s/@LD_SWITCH_X_SITE@// /^LD_SWITCH_SYSTEM_TEMACS *=/s/@LD_SWITCH_SYSTEM_TEMACS@// @@ -151,6 +152,8 @@ s/^ [^ ]*move-if-change / update / /^ echo[ ][ ]*timestamp/s/echo /djecho / /^ .*djecho timestamp/a\ @rm -f gl-tmp +/^ cd \$(leimdir) && \$(MAKE)/c\ + $(MAKE) $(MFLAGS) -C $(leimdir) leim-list.el EMACS=$(bootstrap_exe) /^ cd \$(lib) && \$(MAKE)/c\ $(MAKE) $(MFLAGS) -C $(lib) libgnu.a /^RUN_TEMACS *=/s|`/bin/pwd`|.| @@ -186,7 +189,7 @@ s/echo.*buildobj.lst/dj&/ /^ *THEFILE=/s|$|\; cd ../src| /^ echo.* buildobj.h/s|echo |djecho | # Make the GCC command line fit one screen line -/^[ ][ ]*\$(C_SWITCH_X_SYSTEM)/d +/^[ ][ ]*\$(GNUSTEP_CFLAGS)/d /^[ ][ ]*\$(GCONF_CFLAGS)/d /^[ ][ ]*\$(LIBGNUTLS_CFLAGS)/d s/\$(LIBOTF_CFLAGS) \$(M17N_FLT_CFLAGS) \$(DEPFLAGS) // diff --git a/msdos/sed3v2.inp b/msdos/sed3v2.inp index c147ad64cf9..faa57996a25 100644 --- a/msdos/sed3v2.inp +++ b/msdos/sed3v2.inp @@ -38,7 +38,8 @@ s/-DVERSION[^ ]* // /^CFLAGS *=/s!=.*$!=-O2 -g! /^C_SWITCH_SYSTEM *=/s!=.*$!=-DMSDOS! /^C_SWITCH_MACHINE *=/s/@C_SWITCH_MACHINE@// -/^C_WARNINGS_SWITCH *=/s/@C_WARNINGS_SWITCH@// +/^WARN_CFLAGS *=/s/@WARN_CFLAGS@// +/^WERROR_CFLAGS *=/s/@WERROR_CFLAGS@// /^PROFILING_CFLAGS *=/s/@PROFILING_CFLAGS@// /^ALLOCA *=/s!@ALLOCA@!! /^EXEEXT *=/s!@EXEEXT@!! @@ -51,4 +52,3 @@ s!^ \./! ! } /^insrcdir=/s/^.*$/\#&/ /^ *\$(insrcdir) ||/s,\$(insrcdir) ||,command.com /c if not exist $( (tiny change) + + * makefile.w32-in: Fix typo (Bug#10261). + +2012-04-10 Eli Zaretskii + + * makefile.w32-in (emacs, misc, lispref, lispintro): New targets, + each runs makeinfo in its own subdirectory of 'doc'. + (info-gmake): Depend on these new targets. + 2012-04-07 Glenn Morris * config.nt, makefile.w32-in, emacs.rc, emacsclient.rc: @@ -1185,7 +1195,7 @@ 2005-06-05 Eli Zaretskii * inc/sys/socket.h: Change arg 4 of sys_setsockopt to - `const void *', for consistency with Posix. + `const void *', for consistency with POSIX. 2005-06-04 Eli Zaretskii diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in index f090849e6a9..3ddf3a04cb6 100644 --- a/nt/makefile.w32-in +++ b/nt/makefile.w32-in @@ -264,10 +264,10 @@ install-shortcuts: $(INSTALL_DIR)/bin maybe-copy-distfiles: maybe-copy-distfiles-$(SHELLTYPE) maybe-copy-distfiles-CMD: create-tmp-dist-dir doit - @if not $(ARGQUOTE)$(DIST_FILES)$(ARGQUOTE)=="" $(CP_DIR) $(DIST_FILES) $(TMP_DIST_DIR)/bin + @if not $(ARGQUOTE)$(DIST_FILES)$(ARGQUOTE) == "" $(CP_DIR) $(DIST_FILES) $(TMP_DIST_DIR)/bin maybe-copy-distfiles-SH: create-tmp-dist-dir doit - @if [ ! $(ARGQUOTE)$(DIST_FILES)$(ARGQUOTE)=="" ] ; then \ + @if [ ! $(ARGQUOTE)$(DIST_FILES)$(ARGQUOTE) == "" ] ; then \ $(CP_DIR) $(DIST_FILES) $(TMP_DIST_DIR)/bin ; \ fi @@ -307,11 +307,11 @@ info-nmake: $(MAKE) $(MFLAGS) info cd $(MAKEDIR) -info-gmake: - $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/emacs info - $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/misc info - $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispref info - $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/lispintro info +info-gmake: emacs misc lispref lispintro + +emacs misc lispref lispintro: + $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../doc/$@ info + # # Maintenance # diff --git a/oldXMenu/ChangeLog b/oldXMenu/ChangeLog index 1d3091c6bb4..b1eb200416b 100644 --- a/oldXMenu/ChangeLog +++ b/oldXMenu/ChangeLog @@ -1,3 +1,15 @@ +2012-04-18 Paul Eggert + + configure: new option --enable-gcc-warnings (Bug#11207) + * Makefile.in (C_WARNINGS_SWITCH): Remove. + (WARN_CFLAGS, WERROR_CFLAGS): New macros. + (ALL_CFLAGS): Use new macros rather than old. + +2012-04-11 Glenn Morris + + * Makefile.in (C_SWITCH_X_SYSTEM): Remove. + (ALL_CFLAGS): Remove C_SWITCH_X_SYSTEM. + 2011-04-16 Paul Eggert Static checks with GCC 4.6.0 and non-default toolkits. @@ -615,7 +627,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc. + Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in index 94c49fb9966..01855f6585b 100644 --- a/oldXMenu/Makefile.in +++ b/oldXMenu/Makefile.in @@ -1,4 +1,4 @@ -## Makefile for oldXMenu +## Makefile for oldXMenu ## Copyright 1985, 1986, 1987 by the Massachusetts Institute of Technology @@ -15,7 +15,7 @@ ## without express or implied warranty. -## Copyright (C) 2001-2012 Free Software Foundation, Inc. +## Copyright (C) 2001-2012 Free Software Foundation, Inc. ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -45,11 +45,11 @@ srcdir=@srcdir@ VPATH=@srcdir@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ -C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ -C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ +WARN_CFLAGS = @WARN_CFLAGS@ +WERROR_CFLAGS = @WERROR_CFLAGS@ EXTRA=insque.o CC=@CC@ @@ -88,8 +88,8 @@ OBJS = Activate.o \ all:: libXMenu11.a ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ - $(C_SWITCH_X_SITE) $(C_SWITCH_X_SYSTEM) \ - ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} \ + $(C_SWITCH_X_SITE) \ + $(WARN_CFLAGS) $(WERROR_CFLAGS) ${PROFILING_CFLAGS} \ $(CPPFLAGS) $(CFLAGS) -DEMACS_BITMAP_FILES \ -I../src -I${srcdir} -I${srcdir}/../src diff --git a/src/ChangeLog b/src/ChangeLog index 71fb5d9ab2a..ae8ab9420a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,4 @@ -2012-04-09 Paul Eggert +2012-04-21 Paul Eggert Fix integer width and related bugs (Bug#9874). * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp): @@ -790,6 +790,187 @@ rather than rolling our own approximation. (SCROLL_BAR_VEC_SIZE): Remove; not used. +2012-04-21 Eduard Wiebe + + * sysdep.c (list_system_processes, system_process_attributes): Add + implementation for FreeBSD (Bug#5243). + +2012-04-21 Andreas Schwab + + * lisp.mk (lisp): Update. + +2012-04-20 Paul Eggert + + * keyboard.c (process_pending_signals): Define only if SYNC_INPUT. + It is never used otherwise. + +2012-04-20 Stefan Monnier + + * print.c (print_preprocess): Only check print_depth if print-circle + is nil. + (print_object): Check for cycles even when print-circle is nil and + print-gensym is t, but only check print_depth if print-circle is nil. + +2012-04-20 Chong Yidong + + * process.c (wait_reading_process_output): If EIO occurs on a pty, + set the status to "failed" and ensure that sentinel is run. + +2012-04-20 Glenn Morris + + * process.c (Fset_process_inherit_coding_system_flag) + (Fset_process_query_on_exit_flag): Doc fix (mention return value). + (Fmake_network_process, Fmake_serial_process): Doc fix. + +2012-04-20 Eli Zaretskii + + * xdisp.c (string_buffer_position_lim): Limit starting position to + BEGV. + (set_cursor_from_row): If called for a mode-line or header-line + row, return zero immediately. + (try_cursor_movement): If inside continuation line, don't back up + farther than the first row after the header line, if any. + Don't consider the header-line row as "partially visible", even if + MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261) + +2012-04-20 Atsuo Ohki (tiny change) + + * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n" + (bug#11238). + +2012-04-20 Teodor Zlatanov +2012-04-18 Paul Eggert + + configure: new option --enable-gcc-warnings (Bug#11207) + * Makefile.in (C_WARNINGS_SWITCH): Remove. + (WARN_CFLAGS, WERROR_CFLAGS): New macros. + (ALL_CFLAGS): Use new macros rather than old. + * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904. + * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore + -Wunused-but-set-variable, -Wunused-function, -Wunused-macros, + -Wunused-result, -Wunused-variable. This should go away once + the Emacs and Gnulib regex code is merged. + (xmalloc, xrealloc): Now static. + +2012-04-17 Paul Eggert + + * dired.c (Fsystem_groups): Remove unused local. + +2012-04-17 Glenn Morris + + * dired.c (Fsystem_users): Doc fix. + +2012-04-17 Dmitry Antipov + + * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900) + (syms_of_dired): Add them. + +2012-04-16 Paul Eggert + + Fix minor alloc.c problems found by static checking. + * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]: + New extern decls, to avoid calling undeclared functions. + (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT) + && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined + GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used. + (NEED_MEM_INSERT): New macro. + (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused. + Remove one incorrect comment and fix another. + + Fix minor ralloc.c problems found by static checking. + See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html + * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE) + (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused. + (r_alloc_sbrk): Now static. + + Improve ralloc.c interface checking. + See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html + * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc) + (r_alloc_free) [REL_ALLOC]: Move decls from here ... + * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable) + [REL_ALLOC]: ... to here, to check interface. + * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]: + Remove decls. This fixes an "It stinks!". + + * alloc.c (which_symbols): Fix alignment issue / type clash. + +2012-04-15 Andreas Schwab + + * lisp.h (struct Lisp_Symbol): Remove explicit padding. + (struct Lisp_Misc_Any): Likewise. + (struct Lisp_Free): Likewise. + * alloc.c (union aligned_Lisp_Symbol): Define. + (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union + aligned_Lisp_Symbol instead of struct Lisp_Symbol. + (union aligned_Lisp_Misc): Define. + (MARKER_BLOCK_SIZE, struct marker_block): Use union + aligned_Lisp_Misc instead of union Lisp_Misc. + (Fmake_symbol, allocate_misc, gc_sweep): Adjust. + +2012-04-14 Paul Eggert + + Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926). + * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS. + * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h: + * s/netbsd.h, s/sol2-6.h: + Remove definition of GC_MARK_STACK, since the default now works. + * s/aix4-2.h, s/hpux10-20.h, s/unixware.h: + Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's + no longer the default. + * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default. + +2012-04-14 Atsuo Ohki (tiny change) + + * lread.c (lisp_file_lexically_bound_p): + Fix hang at ";-*-\n" (bug#11238). + +2012-04-14 Eli Zaretskii + + * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row + "unchanged" if its end.pos is beyond ZV. (Bug#11199) + +2012-04-14 Jan Djärv + + * nsterm.m (constrainFrameRect): Always constrain when there is only + one screen (Bug#10962). + +2012-04-13 Ken Brown + + * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor. + +2012-04-13 Reuben Thomas + + * indent.c (Fmove_to_column): Change interactive spec (Bug#739). + +2012-04-11 Daniel Colascione + + * s/cygwin.h: The vfork the #define in cygwin.h was protecting + against is gone. It's better to use vfork now so that when Cygwin + gains a new, working vfork, we use it automatically (bug#10398). + +2012-04-11 Stefan Monnier + + * window.c (save_window_save): Obey window-point-insertion-type. + +2012-04-11 Glenn Morris + + * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM. + +2012-04-11 Stefan Monnier + + * alloc.c (lisp_align_malloc): Remove unneeded prototype. + +2012-04-10 Jason S. Cornez (tiny change) + + * keyboard.c: Override inhibit-quit after the third C-g (bug#6585). + (force_quit_count): New var. + (handle_interrupt): Use it. + +2012-04-10 Juanma Barranquero + + * w32.c (w32_delayed_load): Record the full path of the library + being loaded (bug#10424). + 2012-04-09 Glenn Morris * doc.c (Fsnarf_documentation): Check variables, functions are bound, @@ -804,8 +985,8 @@ * process.h: Add integer `gnutls_handshakes_tried' member to process struct. - * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit. Add - convenience `GNUTLS_LOG2i' macro. + * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit. + Add convenience `GNUTLS_LOG2i' macro. * gnutls.c (gnutls_log_function2i): Convenience log function. (emacs_gnutls_read): Use new log functions, @@ -891,8 +1072,8 @@ (xml_cleanup_parser): New function, export for fn_xmlCleanupParser. Calls xmlCleanupParser only if libxml2 was loaded (or statically linked in). - (Flibxml_parse_html_region, Flibxml_parse_xml_region): Call - init_libxml2_functions before calling libxml2 functions. + (Flibxml_parse_html_region, Flibxml_parse_xml_region): + Call init_libxml2_functions before calling libxml2 functions. (syms_of_xml) : DEFSYM it. * emacs.c: Don't include libxml/parser.h. @@ -2278,7 +2459,7 @@ * xfns.c (unwind_create_frame): Fix comment. (Fx_create_frame, x_create_tip_frame): Move terminal->reference_count++ just before making the frame - official. Move initialization of image_cache_refcount and + official. Move initialization of image_cache_refcount and dpyinfo_refcount before calling init_frame_faces (Bug#9943). 2011-11-05 Eli Zaretskii @@ -8051,7 +8232,7 @@ * xfaces.c : Make extern again. * syntax.c: Include sys/types.h before including regex.h, as - required by Posix. + required by POSIX. * doc.c (get_doc_string): Improve the format passed to `error'. @@ -10515,7 +10696,7 @@ See ChangeLog.11 for earlier changes. ;; coding: utf-8 ;; End: - Copyright (C) 2011-2012 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index 10de7e53794..cf62ec29bbc 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 @@ -23215,7 +23215,7 @@ * macterm.c (do_ae_open_documents) [MAC_OSX]: Call FSpMakeFSRef and FSRefMakePath to convert FSSpec returned with Apple Event to - Posix pathname. + POSIX pathname. (mac_initialize) [TARGET_API_MAC_CARBON]: Call init_required_apple_events and disable the `Quit' menu item provided automatically by the Carbon Toolbox. diff --git a/src/ChangeLog.11 b/src/ChangeLog.11 index 97d5a65281a..781027ee8ae 100644 --- a/src/ChangeLog.11 +++ b/src/ChangeLog.11 @@ -9641,7 +9641,7 @@ 2010-03-12 Eli Zaretskii - These changes remove termcap.c from the build on Posix platforms. + These changes remove termcap.c from the build on POSIX platforms. * Makefile.in (termcapobj): Move termcap.o from here... (MSDOS_OBJ): ...to here. (termcapobj) [!LIBS_TERMCAP]: Remove specialized value, as it is diff --git a/src/ChangeLog.6 b/src/ChangeLog.6 index 91c20681157..3aa1a23818e 100644 --- a/src/ChangeLog.6 +++ b/src/ChangeLog.6 @@ -3236,7 +3236,7 @@ 1995-12-12 Paul Eggert - * process.c (create_process): Use Posix signal handling to + * process.c (create_process): Use POSIX signal handling to block signals, if available. If HAVE_VFORK, save and restore signal handlers that the child might change, since in many systems (e.g. Solaris 2.4) if the child changes the signal diff --git a/src/Makefile.in b/src/Makefile.in index a90fd5841e4..37480f8269d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -68,23 +68,21 @@ OTHER_FILES = @OTHER_FILES@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ ## Flags to pass to the compiler to enable build warnings -C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@ +WARN_CFLAGS = @WARN_CFLAGS@ +WERROR_CFLAGS = @WERROR_CFLAGS@ ## Machine-specific CFLAGS. C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ ## System-specific CFLAGS. C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ -## Currently only set if NS_IMPL_GNUSTEP. -## C_SWITCH_X_SITE may override this. -C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@ +GNUSTEP_CFLAGS=@GNUSTEP_CFLAGS@ ## Define C_SWITCH_X_SITE to contain any special flags your compiler ## may need to deal with X Windows. For instance, if you've defined ## HAVE_X_WINDOWS and your X include files aren't in a place that your ## compiler can find on its own, you might want to add "-I/..." or ## something similar. This is normally set by configure. -## This is used before C_SWITCH_X_SYSTEM and may override it. C_SWITCH_X_SITE=@C_SWITCH_X_SITE@ ## Define LD_SWITCH_X_SITE to contain any special flags your loader @@ -302,19 +300,16 @@ MKDEPDIR=@MKDEPDIR@ ## -DHAVE_CONFIG_H is needed for some other files to take advantage of ## the information in `config.h'. ## -## C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM -## since it may have -I options that should override those. -## ## FIXME? MYCPPFLAGS only referenced in etc/DEBUG. ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I$(srcdir) \ -I$(lib) -I$(srcdir)/../lib \ $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ - $(C_SWITCH_X_SYSTEM) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ + $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \ $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) $(PROFILING_CFLAGS) \ $(LIBGNUTLS_CFLAGS) \ - $(C_WARNINGS_SWITCH) $(CFLAGS) + $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS) ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) .SUFFIXES: .m diff --git a/src/alloc.c b/src/alloc.c index 27118c91c9c..c07d5c929f9 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -82,6 +82,8 @@ extern POINTER_TYPE *sbrk (); extern size_t _bytes_used; extern size_t __malloc_extra_blocks; +extern void *_malloc_internal (size_t); +extern void _free_internal (void *); #endif /* not DOUG_LEA_MALLOC */ @@ -296,7 +298,6 @@ enum mem_type MEM_TYPE_VECTORLIKE }; -static POINTER_TYPE *lisp_align_malloc (size_t, enum mem_type); static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); @@ -315,7 +316,6 @@ static Lisp_Object Vdead; #ifdef GC_MALLOC_CHECK enum mem_type allocated_mem_type; -static int dont_register_blocks; #endif /* GC_MALLOC_CHECK */ @@ -392,8 +392,13 @@ static int live_misc_p (struct mem_node *, void *); static void mark_maybe_object (Lisp_Object); static void mark_memory (void *, void *); static void mem_init (void); +#if (defined GC_MALLOC_CHECK \ + ? !defined SYSTEM_MALLOC && !defined SYNC_INPUT \ + : GC_MARK_STACK) +# define NEED_MEM_INSERT static struct mem_node *mem_insert (void *, void *, enum mem_type); static void mem_insert_fixup (struct mem_node *); +#endif static void mem_rotate_left (struct mem_node *); static void mem_rotate_right (struct mem_node *); static void mem_delete (struct mem_node *); @@ -938,13 +943,11 @@ lisp_free (POINTER_TYPE *block) MALLOC_UNBLOCK_INPUT; } -/* Allocation of aligned blocks of memory to store Lisp data. */ -/* The entry point is lisp_align_malloc which returns blocks of at most */ -/* BLOCK_BYTES and guarantees they are aligned on a BLOCK_ALIGN boundary. */ +/***** Allocation of aligned blocks of memory to store Lisp data. *****/ + +/* The entry point is lisp_align_malloc which returns blocks of at most + BLOCK_BYTES and guarantees they are aligned on a BLOCK_ALIGN boundary. */ -/* Use posix_memalloc if the system has it and we're using the system's - malloc (because our gmalloc.c routines don't have posix_memalign although - its memalloc could be used). */ #if defined (HAVE_POSIX_MEMALIGN) && defined (SYSTEM_MALLOC) #define USE_POSIX_MEMALIGN 1 #endif @@ -1001,7 +1004,7 @@ struct ablocks struct ablock blocks[ABLOCKS_SIZE]; }; -/* Size of the block requested from malloc or memalign. */ +/* Size of the block requested from malloc or posix_memalign. */ #define ABLOCKS_BYTES (sizeof (struct ablocks) - BLOCK_PADDING) #define ABLOCK_ABASE(block) \ @@ -1099,7 +1102,7 @@ lisp_align_malloc (size_t nbytes, enum mem_type type) #endif /* Initialize the blocks and put them on the free list. - Is `base' was not properly aligned, we can't use the last block. */ + If `base' was not properly aligned, we can't use the last block. */ for (i = 0; i < (aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1); i++) { abase->blocks[i].abase = abase; @@ -1146,8 +1149,8 @@ lisp_align_free (POINTER_TYPE *block) ablock->x.next_free = free_ablock; free_ablock = ablock; /* Update busy count. */ - ABLOCKS_BUSY (abase) = - (struct ablocks *) (-2 + (intptr_t) ABLOCKS_BUSY (abase)); + ABLOCKS_BUSY (abase) + = (struct ablocks *) (-2 + (intptr_t) ABLOCKS_BUSY (abase)); if (2 > (intptr_t) ABLOCKS_BUSY (abase)) { /* All the blocks are free. */ @@ -1223,6 +1226,10 @@ static void (*old_free_hook) (void*, const void*); # define BYTES_USED _bytes_used #endif +#ifdef GC_MALLOC_CHECK +static int dont_register_blocks; +#endif + static size_t bytes_used_when_reconsidered; /* Value of _bytes_used, when spare_memory was freed. */ @@ -3137,17 +3144,29 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT Symbol Allocation ***********************************************************************/ +/* Like struct Lisp_Symbol, but padded so that the size is a multiple + of the required alignment if LSB tags are used. */ + +union aligned_Lisp_Symbol +{ + struct Lisp_Symbol s; +#ifdef USE_LSB_TAG + unsigned char c[(sizeof (struct Lisp_Symbol) + (1 << GCTYPEBITS) - 1) + & -(1 << GCTYPEBITS)]; +#endif +}; + /* Each symbol_block is just under 1020 bytes long, since malloc really allocates in units of powers of two and uses 4 bytes for its own overhead. */ #define SYMBOL_BLOCK_SIZE \ - ((1020 - sizeof (struct symbol_block *)) / sizeof (struct Lisp_Symbol)) + ((1020 - sizeof (struct symbol_block *)) / sizeof (union aligned_Lisp_Symbol)) struct symbol_block { /* Place `symbols' first, to preserve alignment. */ - struct Lisp_Symbol symbols[SYMBOL_BLOCK_SIZE]; + union aligned_Lisp_Symbol symbols[SYMBOL_BLOCK_SIZE]; struct symbol_block *next; }; @@ -3203,7 +3222,7 @@ Its value and function definition are void, and its property list is nil. */) symbol_block = new; symbol_block_index = 0; } - XSETSYMBOL (val, &symbol_block->symbols[symbol_block_index]); + XSETSYMBOL (val, &symbol_block->symbols[symbol_block_index].s); symbol_block_index++; } @@ -3231,16 +3250,28 @@ Its value and function definition are void, and its property list is nil. */) Marker (Misc) Allocation ***********************************************************************/ +/* Like union Lisp_Misc, but padded so that its size is a multiple of + the required alignment when LSB tags are used. */ + +union aligned_Lisp_Misc +{ + union Lisp_Misc m; +#ifdef USE_LSB_TAG + unsigned char c[(sizeof (union Lisp_Misc) + (1 << GCTYPEBITS) - 1) + & -(1 << GCTYPEBITS)]; +#endif +}; + /* Allocation of markers and other objects that share that structure. Works like allocation of conses. */ #define MARKER_BLOCK_SIZE \ - ((1020 - sizeof (struct marker_block *)) / sizeof (union Lisp_Misc)) + ((1020 - sizeof (struct marker_block *)) / sizeof (union aligned_Lisp_Misc)) struct marker_block { /* Place `markers' first, to preserve alignment. */ - union Lisp_Misc markers[MARKER_BLOCK_SIZE]; + union aligned_Lisp_Misc markers[MARKER_BLOCK_SIZE]; struct marker_block *next; }; @@ -3285,7 +3316,7 @@ allocate_misc (void) marker_block_index = 0; total_free_markers += MARKER_BLOCK_SIZE; } - XSETMISC (val, &marker_block->markers[marker_block_index]); + XSETMISC (val, &marker_block->markers[marker_block_index].m); marker_block_index++; } @@ -3548,6 +3579,8 @@ mem_find (void *start) } +#ifdef NEED_MEM_INSERT + /* Insert a new node into the tree for a block of memory with start address START, end address END, and type TYPE. Value is a pointer to the node that was inserted. */ @@ -3695,6 +3728,8 @@ mem_insert_fixup (struct mem_node *x) mem_root->color = MEM_BLACK; } +#endif /* NEED_MEM_INSERT */ + /* (x) (y) / \ / \ @@ -6071,22 +6106,22 @@ gc_sweep (void) for (sblk = symbol_block; sblk; sblk = *sprev) { int this_free = 0; - struct Lisp_Symbol *sym = sblk->symbols; - struct Lisp_Symbol *end = sym + lim; + union aligned_Lisp_Symbol *sym = sblk->symbols; + union aligned_Lisp_Symbol *end = sym + lim; for (; sym < end; ++sym) { /* Check if the symbol was created during loadup. In such a case it might be pointed to by pure bytecode which we don't trace, so we conservatively assume that it is live. */ - int pure_p = PURE_POINTER_P (XSTRING (sym->xname)); + int pure_p = PURE_POINTER_P (XSTRING (sym->s.xname)); - if (!sym->gcmarkbit && !pure_p) + if (!sym->s.gcmarkbit && !pure_p) { - if (sym->redirect == SYMBOL_LOCALIZED) - xfree (SYMBOL_BLV (sym)); - sym->next = symbol_free_list; - symbol_free_list = sym; + if (sym->s.redirect == SYMBOL_LOCALIZED) + xfree (SYMBOL_BLV (&sym->s)); + sym->s.next = symbol_free_list; + symbol_free_list = &sym->s; #if GC_MARK_STACK symbol_free_list->function = Vdead; #endif @@ -6096,8 +6131,8 @@ gc_sweep (void) { ++num_used; if (!pure_p) - UNMARK_STRING (XSTRING (sym->xname)); - sym->gcmarkbit = 0; + UNMARK_STRING (XSTRING (sym->s.xname)); + sym->s.gcmarkbit = 0; } } @@ -6109,7 +6144,7 @@ gc_sweep (void) { *sprev = sblk->next; /* Unhook from the free list. */ - symbol_free_list = sblk->symbols[0].next; + symbol_free_list = sblk->symbols[0].s.next; lisp_free (sblk); } else @@ -6139,22 +6174,22 @@ gc_sweep (void) for (i = 0; i < lim; i++) { - if (!mblk->markers[i].u_any.gcmarkbit) + if (!mblk->markers[i].m.u_any.gcmarkbit) { - if (mblk->markers[i].u_any.type == Lisp_Misc_Marker) - unchain_marker (&mblk->markers[i].u_marker); + if (mblk->markers[i].m.u_any.type == Lisp_Misc_Marker) + unchain_marker (&mblk->markers[i].m.u_marker); /* Set the type of the freed object to Lisp_Misc_Free. We could leave the type alone, since nobody checks it, but this might catch bugs faster. */ - mblk->markers[i].u_marker.type = Lisp_Misc_Free; - mblk->markers[i].u_free.chain = marker_free_list; - marker_free_list = &mblk->markers[i]; + mblk->markers[i].m.u_marker.type = Lisp_Misc_Free; + mblk->markers[i].m.u_free.chain = marker_free_list; + marker_free_list = &mblk->markers[i].m; this_free++; } else { num_used++; - mblk->markers[i].u_any.gcmarkbit = 0; + mblk->markers[i].m.u_any.gcmarkbit = 0; } } lim = MARKER_BLOCK_SIZE; @@ -6165,7 +6200,7 @@ gc_sweep (void) { *mprev = mblk->next; /* Unhook from the free list. */ - marker_free_list = mblk->markers[0].u_free.chain; + marker_free_list = mblk->markers[0].m.u_free.chain; lisp_free (mblk); } else @@ -6297,11 +6332,12 @@ which_symbols (Lisp_Object obj, EMACS_INT find_max) { for (sblk = symbol_block; sblk; sblk = sblk->next) { - struct Lisp_Symbol *sym = sblk->symbols; + union aligned_Lisp_Symbol *aligned_sym = sblk->symbols; int bn; - for (bn = 0; bn < SYMBOL_BLOCK_SIZE; bn++, sym++) + for (bn = 0; bn < SYMBOL_BLOCK_SIZE; bn++, aligned_sym++) { + struct Lisp_Symbol *sym = &aligned_sym->s; Lisp_Object val; Lisp_Object tem; diff --git a/src/buffer.c b/src/buffer.c index 8cb68317bed..d3d5bd268a2 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2005,10 +2005,6 @@ advance_to_char_boundary (ptrdiff_t byte_pos) return byte_pos; } -#ifdef REL_ALLOC -extern void r_alloc_reset_variable (POINTER_TYPE *, POINTER_TYPE *); -#endif /* REL_ALLOC */ - DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, 1, 1, 0, doc: /* Swap the text between current buffer and BUFFER. */) @@ -4770,13 +4766,6 @@ mmap_realloc (POINTER_TYPE **var, size_t nbytes) Buffer-text Allocation ***********************************************************************/ -#ifdef REL_ALLOC -extern POINTER_TYPE *r_alloc (POINTER_TYPE **, size_t); -extern POINTER_TYPE *r_re_alloc (POINTER_TYPE **, size_t); -extern void r_alloc_free (POINTER_TYPE **ptr); -#endif /* REL_ALLOC */ - - /* Allocate NBYTES bytes for buffer B's text buffer. */ static void diff --git a/src/character.h b/src/character.h index d2a7a11fa56..8a0f2d4c3f6 100644 --- a/src/character.h +++ b/src/character.h @@ -316,7 +316,7 @@ along with GNU Emacs. If not, see . */ Note: This macro returns the actual length of the character's multibyte sequence as it is stored in a buffer or string. The character it returns might have a different codepoint that has a - different multibyte sequence of a different legth, due to possible + different multibyte sequence of a different length, due to possible unification of CJK characters inside string_char. Therefore do NOT assume that the length returned by this macro is identical to the length of the multibyte sequence of the character it returns. */ diff --git a/src/dired.c b/src/dired.c index 6eedc824231..38dfa23c1bf 100644 --- a/src/dired.c +++ b/src/dired.c @@ -1018,6 +1018,45 @@ Comparison is in lexicographic order and case is significant. */) return Fstring_lessp (Fcar (f1), Fcar (f2)); } + +DEFUN ("system-users", Fsystem_users, Ssystem_users, 0, 0, 0, + doc: /* Return a list of user names currently registered in the system. +If we don't know how to determine that on this platform, just +return a list with one element, taken from `user-real-login-name'. */) + (void) +{ + Lisp_Object users = Qnil; +#if defined HAVE_GETPWENT && defined HAVE_ENDPWENT + struct passwd *pw; + + while ((pw = getpwent ())) + users = Fcons (DECODE_SYSTEM (build_string (pw->pw_name)), users); + + endpwent (); +#endif + if (EQ (users, Qnil)) + /* At least current user is always known. */ + users = Fcons (Vuser_real_login_name, Qnil); + return users; +} + +DEFUN ("system-groups", Fsystem_groups, Ssystem_groups, 0, 0, 0, + doc: /* Return a list of user group names currently registered in the system. +The value may be nil if not supported on this platform. */) + (void) +{ + Lisp_Object groups = Qnil; +#if defined HAVE_GETGRENT && defined HAVE_ENDGRENT + struct group *gr; + + while ((gr = getgrent ())) + groups = Fcons (DECODE_SYSTEM (build_string (gr->gr_name)), groups); + + endgrent (); +#endif + return groups; +} + void syms_of_dired (void) { @@ -1035,6 +1074,8 @@ syms_of_dired (void) defsubr (&Sfile_name_all_completions); defsubr (&Sfile_attributes); defsubr (&Sfile_attributes_lessp); + defsubr (&Ssystem_users); + defsubr (&Ssystem_groups); DEFVAR_LISP ("completion-ignored-extensions", Vcompletion_ignored_extensions, doc: /* Completion ignores file names ending in any string in this list. diff --git a/src/indent.c b/src/indent.c index 22b0bb2c668..32533438e2a 100644 --- a/src/indent.c +++ b/src/indent.c @@ -962,7 +962,8 @@ indented_beyond_p (ptrdiff_t pos, ptrdiff_t pos_byte, EMACS_INT column) return val >= column; } -DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, "p", +DEFUN ("move-to-column", Fmove_to_column, Smove_to_column, 1, 2, + "NMove to column: ", doc: /* Move point to column COLUMN in the current line. Interactively, COLUMN is the value of prefix numeric argument. The column of a character is calculated by adding together the widths diff --git a/src/keyboard.c b/src/keyboard.c index bad91ea3f72..79d9e7a18e8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -7200,6 +7200,7 @@ handle_async_input (void) #endif } +#ifdef SYNC_INPUT void process_pending_signals (void) { @@ -7207,6 +7208,7 @@ process_pending_signals (void) handle_async_input (); do_pending_atimers (); } +#endif #ifdef SIGIO /* for entire page */ /* Note SIGIO has been undef'd if FIONREAD is missing. */ @@ -10218,7 +10220,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, memset (keybuf, 0, sizeof keybuf); GCPRO1 (keybuf[0]); - gcpro1.nvars = (sizeof keybuf/sizeof (keybuf[0])); + gcpro1.nvars = (sizeof keybuf / sizeof (keybuf[0])); if (NILP (continue_echo)) { @@ -10232,7 +10234,7 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, cancel_hourglass (); #endif - i = read_key_sequence (keybuf, (sizeof keybuf/sizeof (keybuf[0])), + i = read_key_sequence (keybuf, (sizeof keybuf / sizeof (keybuf[0])), prompt, ! NILP (dont_downcase_last), ! NILP (can_return_switch_frame), 0); @@ -10923,6 +10925,11 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */ errno = old_errno; } +/* If Emacs is stuck because `inhibit-quit' is true, then keep track + of the number of times C-g has been requested. If C-g is pressed + enough times, then quit anyway. See bug#6585. */ +static int force_quit_count; + /* This routine is called at interrupt level in response to C-g. It is called from the SIGINT handler or kbd_buffer_store_event. @@ -11041,8 +11048,16 @@ handle_interrupt (void) UNGCPRO; } else - /* Else request quit when it's safe */ - Vquit_flag = Qt; + { /* Else request quit when it's safe. */ + if (NILP (Vquit_flag)) + force_quit_count = 0; + if (++force_quit_count == 3) + { + immediate_quit = 1; + Vinhibit_quit = Qnil; + } + Vquit_flag = Qt; + } } /* TODO: The longjmp in this call throws the NS event loop integration off, diff --git a/src/lisp.h b/src/lisp.h index 864346d85c2..66e449b0039 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1139,8 +1139,6 @@ struct Lisp_Symbol special (with `defvar' etc), and shouldn't be lexically bound. */ unsigned declared_special : 1; - unsigned spacer : 23; - /* The symbol's name, as a Lisp string. The name "xname" is used to intentionally break code referring to the old field "name" of type pointer to struct Lisp_String. */ @@ -1342,8 +1340,6 @@ struct Lisp_Misc_Any /* Supertype of all Misc types. */ ENUM_BF (Lisp_Misc_Type) type : 16; /* = Lisp_Misc_??? */ unsigned gcmarkbit : 1; int spacer : 15; - /* Make it as long as "Lisp_Free without padding". */ - void *fill; }; struct Lisp_Marker @@ -1535,13 +1531,6 @@ struct Lisp_Free unsigned gcmarkbit : 1; int spacer : 15; union Lisp_Misc *chain; -#ifdef USE_LSB_TAG - /* Try to make sure that sizeof(Lisp_Misc) preserves TYPEBITS-alignment. - This assumes that Lisp_Marker is the largest of the alternatives and - that Lisp_Misc_Any has the same size as "Lisp_Free w/o padding". */ - char padding[((((sizeof (struct Lisp_Marker) - 1) >> GCTYPEBITS) + 1) - << GCTYPEBITS) - sizeof (struct Lisp_Misc_Any)]; -#endif }; /* To get the type field of a union Lisp_Misc, use XMISCTYPE. @@ -1550,19 +1539,19 @@ struct Lisp_Free union Lisp_Misc { struct Lisp_Misc_Any u_any; /* Supertype of all Misc types. */ - struct Lisp_Free u_free; /* Includes padding to force alignment. */ - struct Lisp_Marker u_marker; /* 5 */ - struct Lisp_Overlay u_overlay; /* 5 */ - struct Lisp_Save_Value u_save_value; /* 3 */ + struct Lisp_Free u_free; + struct Lisp_Marker u_marker; + struct Lisp_Overlay u_overlay; + struct Lisp_Save_Value u_save_value; }; union Lisp_Fwd { - struct Lisp_Intfwd u_intfwd; /* 2 */ - struct Lisp_Boolfwd u_boolfwd; /* 2 */ - struct Lisp_Objfwd u_objfwd; /* 2 */ - struct Lisp_Buffer_Objfwd u_buffer_objfwd; /* 2 */ - struct Lisp_Kboard_Objfwd u_kboard_objfwd; /* 2 */ + struct Lisp_Intfwd u_intfwd; + struct Lisp_Boolfwd u_boolfwd; + struct Lisp_Objfwd u_objfwd; + struct Lisp_Buffer_Objfwd u_buffer_objfwd; + struct Lisp_Kboard_Objfwd u_kboard_objfwd; }; /* Lisp floating point type */ @@ -2253,7 +2242,7 @@ struct gcpro #define GC_USE_GCPROS_CHECK_ZOMBIES 3 #ifndef GC_MARK_STACK -#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE +#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS #endif /* Whether we do the stack marking manually. */ @@ -2876,6 +2865,14 @@ extern void syms_of_alloc (void); extern struct buffer * allocate_buffer (void); extern int valid_lisp_object_p (Lisp_Object); +#ifdef REL_ALLOC +/* Defined in ralloc.c */ +extern void *r_alloc (void **, size_t); +extern void r_alloc_free (void **); +extern void *r_re_alloc (void **, size_t); +extern void r_alloc_reset_variable (void **, void **); +#endif + /* Defined in chartab.c */ EXFUN (Fmake_char_table, 2); EXFUN (Fset_char_table_parent, 2); diff --git a/src/lisp.mk b/src/lisp.mk index c082630f717..4895ca40959 100644 --- a/src/lisp.mk +++ b/src/lisp.mk @@ -131,6 +131,7 @@ lisp = \ $(lispsource)/replace.elc \ $(lispsource)/buff-menu.elc \ $(lispsource)/fringe.elc \ + $(lispsource)/emacs-lisp/regexp-opt.elc \ $(lispsource)/image.elc \ $(lispsource)/international/fontset.elc \ $(lispsource)/dnd.elc \ diff --git a/src/lread.c b/src/lread.c index 48849cccd2b..a2a18921bdc 100644 --- a/src/lread.c +++ b/src/lread.c @@ -842,7 +842,7 @@ lisp_file_lexically_bound_p (Lisp_Object readcharfun) } /* Stop scanning if no colon was found before end marker. */ - if (!in_file_vars) + if (!in_file_vars || ch == '\n' || ch == EOF) break; while (i > 0 && (var[i - 1] == ' ' || var[i - 1] == '\t')) @@ -866,8 +866,7 @@ lisp_file_lexically_bound_p (Lisp_Object readcharfun) ch = READCHAR; } if (! in_file_vars) - /* The value was terminated by an end-marker, which - remove. */ + /* The value was terminated by an end-marker, which remove. */ i -= 3; while (i > 0 && (val[i - 1] == ' ' || val[i - 1] == '\t')) i--; diff --git a/src/m/ia64.h b/src/m/ia64.h index 2ddc2fdfb17..47df94cedd0 100644 --- a/src/m/ia64.h +++ b/src/m/ia64.h @@ -30,13 +30,3 @@ along with GNU Emacs. If not, see . */ #define EMACS_INT long #define pI "l" #define EMACS_UINT unsigned long - -#ifdef REL_ALLOC -#ifndef _MALLOC_INTERNAL -/* "char *" because ralloc.c defines it that way. gmalloc.c thinks it - is allowed to prototype these as "void *" so we don't prototype in - that case. You're right: it stinks! */ -extern char *r_alloc (), *r_re_alloc (); -extern void r_alloc_free (); -#endif /* not _MALLOC_INTERNAL */ -#endif /* REL_ALLOC */ diff --git a/src/nsterm.m b/src/nsterm.m index a45792fd645..7cbaf991311 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -6038,11 +6038,15 @@ ns_term_shutdown (int sig) restrict the height to just one monitor. So we override this. */ - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen { - /* When making the frame visible for the first time, we want to - constrain. Other times not. */ + /* When making the frame visible for the first time or if there is just + one screen, we want to constrain. Other times not. */ + NSUInteger nr_screens = [[NSScreen screens] count]; struct frame *f = ((EmacsView *)[self delegate])->emacsframe; NSTRACE (constrainFrameRect); + if (nr_screens == 1) + return [super constrainFrameRect:frameRect toScreen:screen]; + if (f->output_data.ns->dont_constrain || ns_menu_bar_should_be_hidden ()) return frameRect; diff --git a/src/print.c b/src/print.c index 868d61ba2f1..92e62520954 100644 --- a/src/print.c +++ b/src/print.c @@ -93,14 +93,14 @@ static void print_interval (INTERVAL interval, Lisp_Object printcharfun); int print_output_debug_flag EXTERNALLY_VISIBLE = 1; -/* Low level output routines for characters and strings */ +/* Low level output routines for characters and strings. */ /* Lisp functions to do output using a stream must have the stream in a variable called printcharfun and must start with PRINTPREPARE, end with PRINTFINISH, and use PRINTDECLARE to declare common variables. Use PRINTCHAR to output one character, - or call strout to output a block of characters. */ + or call strout to output a block of characters. */ #define PRINTDECLARE \ struct buffer *old = current_buffer; \ @@ -1122,15 +1122,15 @@ print_preprocess (Lisp_Object obj) int loop_count = 0; Lisp_Object halftail; - /* Give up if we go so deep that print_object will get an error. */ - /* See similar code in print_object. */ - if (print_depth >= PRINT_CIRCLE) - error ("Apparently circular structure being printed"); - /* Avoid infinite recursion for circular nested structure in the case where Vprint_circle is nil. */ if (NILP (Vprint_circle)) { + /* Give up if we go so deep that print_object will get an error. */ + /* See similar code in print_object. */ + if (print_depth >= PRINT_CIRCLE) + error ("Apparently circular structure being printed"); + for (i = 0; i < print_depth; i++) if (EQ (obj, being_printed[i])) return; @@ -1232,7 +1232,7 @@ static void print_check_string_charset_prop (INTERVAL interval, Lisp_Object stri #define PRINT_STRING_NON_CHARSET_FOUND 1 #define PRINT_STRING_UNSAFE_CHARSET_FOUND 2 -/* Bitwise or of the above macros. */ +/* Bitwise or of the above macros. */ static int print_check_string_result; static void @@ -1315,48 +1315,46 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag QUIT; - /* See similar code in print_preprocess. */ - if (print_depth >= PRINT_CIRCLE) - error ("Apparently circular structure being printed"); - /* Detect circularities and truncate them. */ - if (PRINT_CIRCLE_CANDIDATE_P (obj)) + if (NILP (Vprint_circle)) { - if (NILP (Vprint_circle) && NILP (Vprint_gensym)) + /* Simple but incomplete way. */ + int i; + + /* See similar code in print_preprocess. */ + if (print_depth >= PRINT_CIRCLE) + error ("Apparently circular structure being printed"); + + for (i = 0; i < print_depth; i++) + if (EQ (obj, being_printed[i])) + { + sprintf (buf, "#%d", i); + strout (buf, -1, -1, printcharfun); + return; + } + being_printed[print_depth] = obj; + } + else if (PRINT_CIRCLE_CANDIDATE_P (obj)) + { + /* With the print-circle feature. */ + Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil); + if (INTEGERP (num)) { - /* Simple but incomplete way. */ - int i; - for (i = 0; i < print_depth; i++) - if (EQ (obj, being_printed[i])) - { - sprintf (buf, "#%d", i); - strout (buf, -1, -1, printcharfun); - return; - } - being_printed[print_depth] = obj; - } - else - { - /* With the print-circle feature. */ - Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil); - if (INTEGERP (num)) + EMACS_INT n = XINT (num); + if (n < 0) + { /* Add a prefix #n= if OBJ has not yet been printed; + that is, its status field is nil. */ + sprintf (buf, "#%"pI"d=", -n); + strout (buf, -1, -1, printcharfun); + /* OBJ is going to be printed. Remember that fact. */ + Fputhash (obj, make_number (- n), Vprint_number_table); + } + else { - EMACS_INT n = XINT (num); - if (n < 0) - { /* Add a prefix #n= if OBJ has not yet been printed; - that is, its status field is nil. */ - sprintf (buf, "#%"pI"d=", -n); - strout (buf, -1, -1, printcharfun); - /* OBJ is going to be printed. Remember that fact. */ - Fputhash (obj, make_number (- n), Vprint_number_table); - } - else - { - /* Just print #n# if OBJ has already been printed. */ - sprintf (buf, "#%"pI"d#", n); - strout (buf, -1, -1, printcharfun); - return; - } + /* Just print #n# if OBJ has already been printed. */ + sprintf (buf, "#%"pI"d#", n); + strout (buf, -1, -1, printcharfun); + return; } } } diff --git a/src/process.c b/src/process.c index 9ccc77e1d83..a84dac144d8 100644 --- a/src/process.c +++ b/src/process.c @@ -120,6 +120,13 @@ along with GNU Emacs. If not, see . */ #include "nsterm.h" #endif +/* Work around GCC 4.7.0 bug with strict overflow checking; see + . + These lines can be removed once the GCC bug is fixed. */ +#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wstrict-overflow" +#endif + Lisp_Object Qeuid, Qegid, Qcomm, Qstate, Qppid, Qpgrp, Qsess, Qttname, Qtpgid; Lisp_Object Qminflt, Qmajflt, Qcminflt, Qcmajflt, Qutime, Qstime, Qcstime; Lisp_Object Qcutime, Qpri, Qnice, Qthcount, Qstart, Qvsize, Qrss, Qargs; @@ -1066,7 +1073,9 @@ is more appropriate for saving the process buffer. Binding the variable `inherit-process-coding-system' to non-nil before starting the process is an alternative way of setting the inherit flag -for the process which will run. */) +for the process which will run. + +This function returns FLAG. */) (register Lisp_Object process, Lisp_Object flag) { CHECK_PROCESS (process); @@ -1079,7 +1088,8 @@ DEFUN ("set-process-query-on-exit-flag", 2, 2, 0, doc: /* Specify if query is needed for PROCESS when Emacs is exited. If the second argument FLAG is non-nil, Emacs will query the user before -exiting or killing a buffer if PROCESS is running. */) +exiting or killing a buffer if PROCESS is running. This function +returns FLAG. */) (register Lisp_Object process, Lisp_Object flag) { CHECK_PROCESS (process); @@ -2521,7 +2531,7 @@ could be "COM1", or "\\\\.\\COM10" for ports higher than COM9 (double the backslashes in strings). :speed SPEED -- (mandatory) is handled by `serial-process-configure', -which is called by `make-serial-process'. +which this function calls. :name NAME -- NAME is the name of the process. If NAME is not given, the value of PORT is used. @@ -2550,13 +2560,12 @@ but you can send outgoing data. The stopped state is cleared by :plist PLIST -- Install PLIST as the initial plist of the process. -:speed :bytesize :parity :stopbits :flowcontrol --- These arguments are handled by `serial-process-configure', which is -called by `make-serial-process'. +-- This function calls `serial-process-configure' to handle these +arguments. The original argument list, possibly modified by later configuration, is available via the function `process-contact'. @@ -2790,7 +2799,7 @@ The stopped state is cleared by `continue-process' and set by :filter-multibyte BOOL -- If BOOL is non-nil, strings given to the process filter are multibyte, otherwise they are unibyte. If this keyword is not specified, the strings are multibyte if -`default-enable-multibyte-characters' is non-nil. +the default value of `enable-multibyte-characters' is non-nil. :sentinel SENTINEL -- Install SENTINEL as the process sentinel. @@ -4877,16 +4886,23 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, It can't hurt. */ else if (nread == -1 && errno == EIO) { - /* Don't do anything if only a pty, with no associated - process (bug#10933). */ - if (XPROCESS (proc)->pid != -2) { - /* Clear the descriptor now, so we only raise the signal - once. */ - FD_CLR (channel, &input_wait_mask); - FD_CLR (channel, &non_keyboard_wait_mask); - - kill (getpid (), SIGCHLD); - } + struct Lisp_Process *p = XPROCESS (proc); + + /* Clear the descriptor now, so we only raise the + signal once. */ + FD_CLR (channel, &input_wait_mask); + FD_CLR (channel, &non_keyboard_wait_mask); + + if (p->pid == -2) + { + /* If the EIO occurs on a pty, sigchld_handler's + wait3() will not find the process object to + delete. Do it here. */ + p->tick = ++process_tick; + p->status = Qfailed; + } + else + kill (getpid (), SIGCHLD); } #endif /* HAVE_PTYS */ /* If we can detect process termination, don't consider the diff --git a/src/ralloc.c b/src/ralloc.c index 896ad9f3155..4bb2f240438 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -95,10 +95,8 @@ static int extra_bytes; /* Macros for rounding. Note that rounding to any value is possible by changing the definition of PAGE. */ #define PAGE (getpagesize ()) -#define ALIGNED(addr) (((unsigned long int) (addr) & (page_size - 1)) == 0) #define ROUNDUP(size) (((unsigned long int) (size) + page_size - 1) \ & ~(page_size - 1)) -#define ROUND_TO_PAGE(addr) (addr & (~(page_size - 1))) #define MEM_ALIGN sizeof (double) #define MEM_ROUNDUP(addr) (((unsigned long int)(addr) + MEM_ALIGN - 1) \ @@ -151,7 +149,6 @@ typedef struct heap } *heap_ptr; #define NIL_HEAP ((heap_ptr) 0) -#define HEAP_PTR_SIZE (sizeof (struct heap)) /* This is the first heap object. If we need additional heap objects, each one resides at the beginning of @@ -366,15 +363,6 @@ relinquish (void) } } } - -/* Return the total size in use by relocating allocator, - above where malloc gets space. */ - -long -r_alloc_size_in_use (void) -{ - return (char *) break_value - (char *) virtual_break_value; -} /* The meat - allocating, freeing, and relocating blocs. */ @@ -748,7 +736,7 @@ free_bloc (bloc_ptr bloc) __morecore hook values - in particular, __default_morecore in the GNU malloc package. */ -POINTER +static POINTER r_alloc_sbrk (long int size) { register bloc_ptr b; @@ -1014,52 +1002,6 @@ r_re_alloc (POINTER *ptr, SIZE size) return *ptr; } -/* Disable relocations, after making room for at least SIZE bytes - of non-relocatable heap if possible. The relocatable blocs are - guaranteed to hold still until thawed, even if this means that - malloc must return a null pointer. */ - -void -r_alloc_freeze (long int size) -{ - if (! r_alloc_initialized) - r_alloc_init (); - - /* If already frozen, we can't make any more room, so don't try. */ - if (r_alloc_freeze_level > 0) - size = 0; - /* If we can't get the amount requested, half is better than nothing. */ - while (size > 0 && r_alloc_sbrk (size) == 0) - size /= 2; - ++r_alloc_freeze_level; - if (size > 0) - r_alloc_sbrk (-size); -} - -void -r_alloc_thaw (void) -{ - - if (! r_alloc_initialized) - r_alloc_init (); - - if (--r_alloc_freeze_level < 0) - abort (); - - /* This frees all unused blocs. It is not too inefficient, as the resize - and memcpy is done only once. Afterwards, all unreferenced blocs are - already shrunk to zero size. */ - if (!r_alloc_freeze_level) - { - bloc_ptr *b = &first_bloc; - while (*b) - if (!(*b)->variable) - free_bloc (*b); - else - b = &(*b)->next; - } -} - #if defined (emacs) && defined (DOUG_LEA_MALLOC) diff --git a/src/regex.c b/src/regex.c index 0f9150193ec..d16a5148054 100644 --- a/src/regex.c +++ b/src/regex.c @@ -33,6 +33,19 @@ #pragma alloca #endif +/* Ignore some GCC warnings for now. This section should go away + once the Emacs and Gnulib regex code is merged. */ +#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wstrict-overflow" +# ifndef emacs +# pragma GCC diagnostic ignored "-Wunused-but-set-variable" +# pragma GCC diagnostic ignored "-Wunused-function" +# pragma GCC diagnostic ignored "-Wunused-macros" +# pragma GCC diagnostic ignored "-Wunused-result" +# pragma GCC diagnostic ignored "-Wunused-variable" +# endif +#endif + #ifdef HAVE_CONFIG_H # include #endif @@ -198,7 +211,7 @@ /* When used in Emacs's lib-src, we need xmalloc and xrealloc. */ -void * +static void * xmalloc (size_t size) { register void *val; @@ -211,7 +224,7 @@ xmalloc (size_t size) return val; } -void * +static void * xrealloc (void *block, size_t size) { register void *val; diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index 37b041396f9..354ffda0988 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h @@ -75,3 +75,7 @@ along with GNU Emacs. If not, see . */ Emacs currently calls xrealloc on the results of get_current_dir name, to avoid a crash just use the Emacs implementation for that function. */ #define BROKEN_GET_CURRENT_DIR_NAME 1 + +/* Conservative garbage collection has not been tested, so for now + play it safe and stick with the old-fashioned way of marking. */ +#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE diff --git a/src/s/cygwin.h b/src/s/cygwin.h index 9a371829eaa..9310890351e 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h @@ -58,7 +58,8 @@ along with GNU Emacs. If not, see . */ if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) \ fd = -1; \ sigsetmask (mask); \ - emacs_close (dummy); \ + if (fd >= 0) \ + emacs_close (dummy); \ } \ while (0) @@ -81,16 +82,6 @@ along with GNU Emacs. If not, see . */ #define HAVE_SOCKETS -/* vfork() interacts badly with setsid(), causing ptys to fail to - change their controlling terminal */ -#define vfork fork - -/* This should work (at least when compiling with gcc). But I have no way - or intention to verify or even test it. If you encounter a problem with - it, feel free to change this setting, but please add a comment here about - why it needed to be changed. */ -#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS - /* Emacs supplies its own malloc, but glib (part of Gtk+) calls memalign and on Cygwin, that becomes the Cygwin-supplied memalign. As malloc is not the Cygwin malloc, the Cygwin memalign always diff --git a/src/s/darwin.h b/src/s/darwin.h index 9ac9e91fd9d..7c8e26f46cc 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -145,6 +145,3 @@ along with GNU Emacs. If not, see . */ It is already a controlling terminal of subprocess, because we did ioctl TIOCSCTTY. */ #define DONT_REOPEN_PTY - -/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */ -#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS diff --git a/src/s/freebsd.h b/src/s/freebsd.h index c74605fe366..05be07695cb 100644 --- a/src/s/freebsd.h +++ b/src/s/freebsd.h @@ -58,6 +58,3 @@ along with GNU Emacs. If not, see . */ /* Tell that garbage collector that setjmp is known to save all registers relevant for conservative garbage collection in the jmp_buf. */ #define GC_SETJMP_WORKS 1 - -/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */ -#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index c1233c0e6ce..d04ea33068a 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h @@ -145,7 +145,6 @@ along with GNU Emacs. If not, see . */ || defined __arm__ || defined __powerpc__ || defined __amd64__ \ || defined __ia64__ || defined __sh__ #define GC_SETJMP_WORKS 1 -#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS #ifdef __ia64__ #define GC_MARK_SECONDARY_STACK() \ do { \ @@ -155,4 +154,6 @@ along with GNU Emacs. If not, see . */ __builtin_ia64_bsp ()); \ } while (0) #endif +#else +#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE #endif diff --git a/src/s/gnu.h b/src/s/gnu.h index 37aaa1357cc..a09e0e824c9 100644 --- a/src/s/gnu.h +++ b/src/s/gnu.h @@ -45,6 +45,3 @@ along with GNU Emacs. If not, see . */ #endif /* emacs */ #define POSIX_SIGNALS 1 - -/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */ -#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index becb5d3464e..3e25b1bd0d9 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h @@ -100,6 +100,10 @@ along with GNU Emacs. If not, see . */ header sections which lose when `static' is defined away, as it is on HP-UX. (You get duplicate symbol errors on linking). */ #undef _FILE_OFFSET_BITS + +/* Conservative garbage collection has not been tested, so for now + play it safe and stick with the old-fashioned way of marking. */ +#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE /* The data segment on this machine always starts at address 0x40000000. */ #define DATA_SEG_BITS 0x40000000 diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index 32374498fe7..e5d90c1bd5d 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h @@ -95,7 +95,6 @@ char *_getpty(); /* Tested on Irix 6.5. SCM worked on earlier versions. */ #define GC_SETJMP_WORKS 1 -#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which diff --git a/src/s/msdos.h b/src/s/msdos.h index cde24147c57..add2902d5f3 100644 --- a/src/s/msdos.h +++ b/src/s/msdos.h @@ -137,4 +137,3 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ /* Tell the garbage collector that setjmp is known to save all registers relevant for conservative garbage collection in the jmp_buf. */ #define GC_SETJMP_WORKS 1 -#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS diff --git a/src/s/netbsd.h b/src/s/netbsd.h index f25023fb615..ce3b2afa1bb 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h @@ -38,6 +38,3 @@ along with GNU Emacs. If not, see . */ /* Tell that garbage collector that setjmp is known to save all registers relevant for conservative garbage collection in the jmp_buf. */ #define GC_SETJMP_WORKS 1 - -/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method. */ -#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS diff --git a/src/s/sol2-6.h b/src/s/sol2-6.h index a9fefcb1992..bb7a9859b7d 100644 --- a/src/s/sol2-6.h +++ b/src/s/sol2-6.h @@ -59,4 +59,3 @@ along with GNU Emacs. If not, see . */ } #define GC_SETJMP_WORKS 1 -#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS diff --git a/src/s/unixware.h b/src/s/unixware.h index 22c396a060e..63c36ee40c2 100644 --- a/src/s/unixware.h +++ b/src/s/unixware.h @@ -50,3 +50,7 @@ along with GNU Emacs. If not, see . */ } #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base) + +/* Conservative garbage collection has not been tested, so for now + play it safe and stick with the old-fashioned way of marking. */ +#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE diff --git a/src/sysdep.c b/src/sysdep.c index 426c6832347..4df1f50a096 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -37,6 +37,13 @@ along with GNU Emacs. If not, see . */ #include "sysselect.h" #include "blockinput.h" +#ifdef __FreeBSD__ +#include +#include +#include */ +#include +#endif + #ifdef WINDOWSNT #define read sys_read #define write sys_write @@ -2530,6 +2537,40 @@ list_system_processes (void) return proclist; } +#elif defined (__FreeBSD__) + +Lisp_Object +list_system_processes () +{ + int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC}; + size_t len; + struct kinfo_proc *procs; + size_t i; + + struct gcpro gcpro1; + Lisp_Object proclist = Qnil; + + if (sysctl (mib, 3, NULL, &len, NULL, 0) != 0) + return proclist; + + procs = xmalloc (len); + if (sysctl (mib, 3, procs, &len, NULL, 0) != 0) + { + xfree (procs); + return proclist; + } + + GCPRO1 (proclist); + len /= sizeof (struct kinfo_proc); + for (i = 0; i < len; i++) + proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist); + UNGCPRO; + + xfree (procs); + + return proclist; +} + /* The WINDOWSNT implementation is in w32.c. The MSDOS implementation is in dosfns.c. */ #elif !defined (WINDOWSNT) && !defined (MSDOS) @@ -3077,6 +3118,176 @@ system_process_attributes (Lisp_Object pid) return attrs; } +#elif defined(__FreeBSD__) + +Lisp_Object +system_process_attributes (Lisp_Object pid) +{ + int proc_id; + int pagesize = getpagesize(); + int npages; + int fscale; + struct passwd *pw; + struct group *gr; + char *ttyname; + size_t len; + char args[MAXPATHLEN]; + EMACS_TIME t, now; + + int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID}; + struct kinfo_proc proc; + size_t proclen = sizeof(proc); + + struct gcpro gcpro1, gcpro2; + Lisp_Object attrs = Qnil; + Lisp_Object decoded_comm; + + CHECK_NUMBER_OR_FLOAT (pid); + proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid); + mib[3] = proc_id; + + if (sysctl (mib, 4, &proc, &proclen, NULL, 0) != 0) + return attrs; + + GCPRO2 (attrs, decoded_comm); + + attrs = Fcons (Fcons (Qeuid, make_fixnum_or_float(proc.ki_uid)), attrs); + + BLOCK_INPUT; + pw = getpwuid (proc.ki_uid); + UNBLOCK_INPUT; + if (pw) + attrs = Fcons (Fcons (Quser, build_string (pw->pw_name)), attrs); + + attrs = Fcons (Fcons (Qegid, make_fixnum_or_float(proc.ki_svgid)), attrs); + + BLOCK_INPUT; + gr = getgrgid (proc.ki_svgid); + UNBLOCK_INPUT; + if (gr) + attrs = Fcons (Fcons (Qgroup, build_string (gr->gr_name)), attrs); + + decoded_comm = code_convert_string_norecord + (make_unibyte_string (proc.ki_comm, strlen (proc.ki_comm)), + Vlocale_coding_system, 0); + + attrs = Fcons (Fcons (Qcomm, decoded_comm), attrs); + { + char state[2] = {'\0', '\0'}; + switch (proc.ki_stat) + { + case SRUN: + state[0] = 'R'; + break; + + case SSLEEP: + state[0] = 'S'; + break; + + case SLOCK: + state[0] = 'D'; + break; + + case SZOMB: + state[0] = 'Z'; + break; + + case SSTOP: + state[0] = 'T'; + break; + } + attrs = Fcons (Fcons (Qstate, build_string (state)), attrs); + } + + attrs = Fcons (Fcons (Qppid, make_fixnum_or_float (proc.ki_ppid)), attrs); + attrs = Fcons (Fcons (Qpgrp, make_fixnum_or_float (proc.ki_pgid)), attrs); + attrs = Fcons (Fcons (Qsess, make_fixnum_or_float (proc.ki_sid)), attrs); + + BLOCK_INPUT; + ttyname = proc.ki_tdev == NODEV ? NULL : devname (proc.ki_tdev, S_IFCHR); + UNBLOCK_INPUT; + if (ttyname) + attrs = Fcons (Fcons (Qtty, build_string (ttyname)), attrs); + + attrs = Fcons (Fcons (Qtpgid, make_fixnum_or_float (proc.ki_tpgid)), attrs); + attrs = Fcons (Fcons (Qminflt, make_fixnum_or_float (proc.ki_rusage.ru_minflt)), attrs); + attrs = Fcons (Fcons (Qmajflt, make_fixnum_or_float (proc.ki_rusage.ru_majflt)), attrs); + attrs = Fcons (Fcons (Qcminflt, make_number (proc.ki_rusage_ch.ru_minflt)), attrs); + attrs = Fcons (Fcons (Qcmajflt, make_number (proc.ki_rusage_ch.ru_majflt)), attrs); + +#define TIMELIST(ts) \ + list3 (make_number (EMACS_SECS (ts) >> 16 & 0xffff), \ + make_number (EMACS_SECS (ts) & 0xffff), \ + make_number (EMACS_USECS (ts))) + + attrs = Fcons (Fcons (Qutime, TIMELIST(proc.ki_rusage.ru_utime)), attrs); + attrs = Fcons (Fcons (Qstime, TIMELIST(proc.ki_rusage.ru_stime)), attrs); + EMACS_ADD_TIME (t, proc.ki_rusage.ru_utime, proc.ki_rusage.ru_stime); + attrs = Fcons (Fcons (Qtime, TIMELIST(t)), attrs); + + attrs = Fcons (Fcons (Qcutime, TIMELIST(proc.ki_rusage_ch.ru_utime)), attrs); + attrs = Fcons (Fcons (Qcstime, TIMELIST(proc.ki_rusage_ch.ru_utime)), attrs); + EMACS_ADD_TIME (t, proc.ki_rusage_ch.ru_utime, proc.ki_rusage_ch.ru_stime); + attrs = Fcons (Fcons (Qctime, TIMELIST(t)), attrs); + + attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (proc.ki_numthreads)), attrs); + attrs = Fcons (Fcons (Qpri, make_number (proc.ki_pri.pri_native)), attrs); + attrs = Fcons (Fcons (Qnice, make_number (proc.ki_nice)), attrs); + attrs = Fcons (Fcons (Qstart, TIMELIST(proc.ki_start)), attrs); + attrs = Fcons (Fcons (Qvsize, make_number (proc.ki_size >> 10)), attrs); + attrs = Fcons (Fcons (Qrss, make_number (proc.ki_rssize * pagesize >> 10)), attrs); + + EMACS_GET_TIME (now); + EMACS_SUB_TIME (t, now, proc.ki_start); + attrs = Fcons (Fcons (Qetime, TIMELIST(t)), attrs); + +#undef TIMELIST + + len = sizeof(fscale); + if (sysctlbyname ("kern.fscale", &fscale, &len, NULL, 0) == 0) + { + float pcpu; + fixpt_t ccpu; + len = sizeof (ccpu); + if (sysctlbyname ("kern.ccpu", &ccpu, &len, NULL, 0) == 0) + { + pcpu = 100.0 * ((double) proc.ki_pctcpu / fscale) + / (1.0 - exp(proc.ki_swtime * log((double) ccpu / fscale))); + attrs = Fcons (Fcons (Qpcpu, make_fixnum_or_float(pcpu)), attrs); + } + } + + len = sizeof(npages); + if (sysctlbyname ("hw.availpages", &npages, &len, NULL, 0) == 0) + { + float pmem = proc.ki_flag & P_INMEM + ? 100.0 * ((float) proc.ki_rssize / npages) + : 0.0; + attrs = Fcons (Fcons (Qpmem, make_fixnum_or_float(pmem)), attrs); + } + + mib[2] = KERN_PROC_ARGS; + len = MAXPATHLEN; + if (sysctl (mib, 4, args, &len, NULL, 0) == 0) + { + int i; + for (i = 0; i < len; i++) + { + if (! args[i] && i < len - 1) + args[i] = ' '; + } + + decoded_comm = code_convert_string_norecord + (make_unibyte_string (args, strlen (args)), + Vlocale_coding_system, 0); + + attrs = Fcons (Fcons (Qargs, decoded_comm), attrs); + } + + UNGCPRO; + return attrs; +} + /* The WINDOWSNT implementation is in w32.c. The MSDOS implementation is in dosfns.c. */ #elif !defined (WINDOWSNT) && !defined (MSDOS) diff --git a/src/w32.c b/src/w32.c index 3d3d33453c6..248a91463e8 100644 --- a/src/w32.c +++ b/src/w32.c @@ -5816,7 +5816,15 @@ w32_delayed_load (Lisp_Object libraries, Lisp_Object library_id) CHECK_STRING_CAR (dlls); if ((library_dll = LoadLibrary (SDATA (XCAR (dlls))))) { - found = XCAR (dlls); + char name[MAX_PATH]; + DWORD len; + + len = GetModuleFileNameA (library_dll, name, sizeof (name)); + found = Fcons (XCAR (dlls), + (len > 0) + /* Possibly truncated */ + ? make_specified_string (name, -1, len, 1) + : Qnil); break; } } diff --git a/src/window.c b/src/window.c index 7fda1b3bc54..19f27ec5320 100644 --- a/src/window.c +++ b/src/window.c @@ -5947,6 +5947,8 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) } else p->pointm = Fcopy_marker (w->pointm, Qnil); + XMARKER (p->pointm)->insertion_type + = !NILP (Vwindow_point_insertion_type); p->start = Fcopy_marker (w->start, Qnil); p->start_at_line_beg = w->start_at_line_beg; diff --git a/src/xdisp.c b/src/xdisp.c index d051e88e6bb..43b92bcf536 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4982,7 +4982,7 @@ string_buffer_position_lim (Lisp_Object string, Lisp_Object limit, prop, pos; int found = 0; - pos = make_number (from); + pos = make_number (max (from, BEGV)); if (!back_p) /* looking forward */ { @@ -13697,6 +13697,13 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, comes from a text property, not from an overlay. */ int string_from_text_prop = 0; + /* Don't even try doing anything if called for a mode-line or + header-line row, since the rest of the code isn't prepared to + deal with such calamities. */ + xassert (!row->mode_line_p); + if (row->mode_line_p) + return 0; + /* Skip over glyphs not having an object at the start and the end of the row. These are special glyphs like truncation marks on terminal frames. */ @@ -14917,6 +14924,8 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste else if (rc != CURSOR_MOVEMENT_SUCCESS && !NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering))) { + struct glyph_row *row1; + /* If rows are bidi-reordered and point moved, back up until we find a row that does not belong to a continuation line. This is because we must consider @@ -14927,24 +14936,28 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste /* FIXME: Revisit this when glyph ``spilling'' in continuation lines' rows is implemented for bidi-reordered rows. */ - while (MATRIX_ROW_CONTINUATION_LINE_P (row)) + for (row1 = MATRIX_FIRST_TEXT_ROW (w->current_matrix); + MATRIX_ROW_CONTINUATION_LINE_P (row); + --row) { /* If we hit the beginning of the displayed portion without finding the first row of a continued line, give up. */ - if (row <= w->current_matrix->rows) + if (row <= row1) { rc = CURSOR_MOVEMENT_MUST_SCROLL; break; } xassert (row->enabled_p); - --row; } } if (must_scroll) ; else if (rc != CURSOR_MOVEMENT_SUCCESS && MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row) + /* Make sure this isn't a header line by any chance, since + then MATRIX_ROW_PARTIALLY_VISIBLE_P might yield non-zero. */ + && !row->mode_line_p && make_cursor_line_fully_visible_p) { if (PT == MATRIX_ROW_END_CHARPOS (row) @@ -16613,7 +16626,15 @@ find_last_unchanged_at_beg_row (struct window *w) continued. */ && !(MATRIX_ROW_END_CHARPOS (row) == first_changed_pos && (row->continued_p - || row->exact_window_width_line_p))) + || row->exact_window_width_line_p)) + /* If ROW->end is beyond ZV, then ROW->end is outdated and + needs to be recomputed, so don't consider this row as + unchanged. This happens when the last line was + bidi-reordered and was killed immediately before this + redisplay cycle. In that case, ROW->end stores the + buffer position of the first visual-order character of + the killed text, which is now beyond ZV. */ + && CHARPOS (row->end.pos) <= ZV) row_found = row; /* Stop if last visible row. */ diff --git a/test/ChangeLog b/test/ChangeLog index f44b09102d9..66f8592c79c 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2012-04-11 Glenn Morris + + * automated/vc-bzr.el (vc-bzr-test-faulty-bzr-autoloads): New test. + 2012-02-13 Teodor Zlatanov * automated/url-future-tests.el (url-future-tests): Move from diff --git a/test/automated/vc-bzr.el b/test/automated/vc-bzr.el index 904ab4d1304..94f8502b882 100644 --- a/test/automated/vc-bzr.el +++ b/test/automated/vc-bzr.el @@ -1,6 +1,6 @@ ;;; vc-bzr.el --- tests for vc/vc-bzr.el -;; Copyright (C) 2011-2012 Free Software Foundation, Inc. +;; Copyright (C) 2011-2012 Free Software Foundation, Inc. ;; Author: Glenn Morris @@ -98,4 +98,31 @@ (should (get-buffer "*vc-log*"))) (delete-directory tempdir t)))) +;; http://lists.gnu.org/archive/html/help-gnu-emacs/2012-04/msg00145.html +(ert-deftest vc-bzr-test-faulty-bzr-autoloads () + "Test we can generate autoloads in a bzr directory when bzr is faulty." + :expected-result (if (executable-find vc-bzr-program) :passed :failed) + (should (executable-find vc-bzr-program)) + (let* ((tempdir (make-temp-file "vc-bzr-test" t)) + (file (expand-file-name "foo.el" tempdir)) + (default-directory (file-name-as-directory tempdir)) + (generated-autoload-file (expand-file-name "loaddefs.el" tempdir))) + (unwind-protect + (progn + (call-process vc-bzr-program nil nil nil "init") + (with-temp-buffer + (insert ";;;###autoload +\(defun foo () \"foo\" (interactive) (message \"foo!\"))") + (write-region nil nil file nil 'silent)) + (call-process vc-bzr-program nil nil nil "add") + (call-process vc-bzr-program nil nil nil "commit" "-m" "Commit 1") + ;; Deleting dirstate ensures both that vc-bzr's status heuristic + ;; fails, so it has to call the external bzr status, and + ;; causes bzr status to fail. This simulates a broken bzr + ;; installation. + (delete-file ".bzr/checkout/dirstate") + (should (progn (update-directory-autoloads default-directory) + t))) + (delete-directory tempdir t)))) + ;;; vc-bzr.el ends here