]> code.delx.au - gnu-emacs/commitdiff
Merge branch 'xwidget' of https://github.com/jave/xwidget-emacs into xwidget
authorJoakim Verona <joakim@verona.se>
Mon, 19 Aug 2013 18:48:07 +0000 (20:48 +0200)
committerJoakim Verona <joakim@verona.se>
Mon, 19 Aug 2013 18:48:07 +0000 (20:48 +0200)
137 files changed:
ChangeLog
Makefile.in
admin/ChangeLog
admin/FOR-RELEASE
admin/cus-test.el
admin/make-tarball.txt
admin/notes/hydra
autogen/config.in
autogen/configure
configure.ac
doc/emacs/ChangeLog
doc/emacs/files.texi
doc/emacs/glossary.texi
doc/emacs/killing.texi
doc/emacs/text.texi
doc/lispref/ChangeLog
doc/lispref/display.texi
doc/lispref/frames.texi
doc/lispref/lists.texi
doc/lispref/markers.texi
doc/lispref/modes.texi
doc/lispref/positions.texi
doc/lispref/text.texi
doc/misc/ChangeLog
doc/misc/cc-mode.texi
doc/misc/edt.texi
doc/misc/eieio.texi
doc/misc/emacs-mime.texi
doc/misc/epa.texi
doc/misc/mairix-el.texi
doc/misc/reftex.texi
doc/misc/todo-mode.texi
etc/ChangeLog
etc/NEWS
etc/refcards/Makefile
etc/refcards/README
etc/refcards/calccard.pdf [deleted file]
etc/refcards/cs-dired-ref.pdf [deleted file]
etc/refcards/cs-refcard.pdf [deleted file]
etc/refcards/de-refcard.pdf [deleted file]
etc/refcards/dired-ref.pdf [deleted file]
etc/refcards/fr-dired-ref.pdf [deleted file]
etc/refcards/fr-refcard.pdf [deleted file]
etc/refcards/gnus-booklet.pdf [deleted file]
etc/refcards/gnus-refcard.pdf [deleted file]
etc/refcards/orgcard.pdf [deleted file]
etc/refcards/pl-refcard.pdf [deleted file]
etc/refcards/pt-br-refcard.pdf [deleted file]
etc/refcards/refcard.pdf [deleted file]
etc/refcards/ru-refcard.pdf [deleted file]
etc/refcards/sk-dired-ref.pdf [deleted file]
etc/refcards/sk-refcard.pdf [deleted file]
lisp/ChangeLog
lisp/cus-start.el
lisp/desktop.el
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/debug.el
lisp/emacs-lisp/gv.el
lisp/emacs-lisp/timer.el
lisp/emulation/viper-init.el
lisp/follow.el
lisp/frame.el
lisp/frameset.el
lisp/gnus/ChangeLog
lisp/gnus/gnus-icalendar.el
lisp/gnus/gnus.el
lisp/gnus/mm-util.el
lisp/gnus/nnimap.el
lisp/image-mode.el
lisp/image.el
lisp/mail/feedmail.el
lisp/menu-bar.el
lisp/net/ange-ftp.el
lisp/net/eww.el
lisp/net/shr.el
lisp/net/tramp-adb.el
lisp/net/tramp-cache.el
lisp/net/tramp-cmds.el
lisp/net/tramp-compat.el
lisp/net/tramp-ftp.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-gw.el
lisp/net/tramp-sh.el
lisp/net/tramp-smb.el
lisp/net/tramp-uu.el
lisp/net/tramp.el
lisp/obsolete/scribe.el
lisp/progmodes/compile.el
lisp/progmodes/mixal-mode.el
lisp/progmodes/python.el
lisp/simple.el
lisp/url/ChangeLog
lisp/url/url-http.el
lisp/window.el
m4/warnings.m4
make-dist
src/ChangeLog
src/alloc.c
src/buffer.c
src/buffer.h
src/callint.c
src/cmds.c
src/decompress.c
src/dispnew.c
src/editfns.c
src/emacs.c
src/fileio.c
src/font.c
src/font.h
src/frame.c
src/fringe.c
src/image.c
src/keyboard.c
src/lisp.h
src/marker.c
src/nsfns.m
src/nsmenu.m
src/nsterm.h
src/nsterm.m
src/process.c
src/sheap.c
src/syntax.c
src/term.c
src/w32fns.c
src/w32term.c
src/w32term.h
src/window.c
src/window.h
src/xdisp.c
src/xfaces.c
src/xfns.c
src/xterm.c
src/xterm.h
test/ChangeLog
test/automated/package-test.el
test/automated/python-tests.el

index c0b7d9671130c1d173ba012705814957f3b23736..27395616072fad1219f2a57ab1251b9e4a2a16d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2013-08-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Merge from gnulib, incorporating:
+       2013-08-15 warnings: minor optimization
+       2013-08-15 warnings: check -Wfoo rather than -Wno-foo
+
+2013-08-15  Ken Brown  <kbrown@cornell.edu>
+
+       * configure.ac (G_SLICE_ALWAYS_MALLOC): Update comment.
+
+2013-08-15  Glenn Morris  <rgm@gnu.org>
+
+       * make-dist: Do not distribute etc/refcards TeX intermediate files.
+       * Makefile.in (install-arch-indep):
+       Do not install etc/refcards TeX intermediate files.
+
+2013-08-14  Ulrich Müller  <ulm@gentoo.org>
+
+       * configure.ac (EMACS_CONFIGURATION): Escape backslashes.  (Bug#15091)
+
 2013-08-12  Eli Zaretskii  <eliz@gnu.org>
 
        * configure.ac (HAVE_ZLIB): Don't use -lz on MinGW.
index db028132e5cd94e3515c505c699cd7dcff7acd72..ee74baf45cfc508d03b29b598433b7ad64fcfc1f 100644 (file)
@@ -543,6 +543,11 @@ set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \
 ## deleted the entire installed etc/ directory and recreated it.
 ## install-etcdoc installs the relevant DOC.
 
+## Note that we install etc/refcards/*.ps if present.
+## TODO we should compress these if GZIP_PROG is set.
+## It would be simpler to have a separate install rule for etc/refcards
+## (maybe move it to doc/refcards?).
+
 ## Note that the Makefiles in the etc directory are potentially useful
 ## in an installed Emacs, so should not be excluded.
 
@@ -578,7 +583,12 @@ install-arch-indep: lisp leim install-info install-man ${INSTALL_ARCH_INDEP_EXTR
          (cd $${dir}; tar -chf - . ) \
            | (cd $${dest}; umask 022; \
               tar -xvf - && cat > /dev/null) || exit 1; \
-         [ "$${dir}" != "${srcdir}/etc" ] || rm -f $${dest}/DOC* ; \
+         if [ "$${dir}" = "${srcdir}/etc" ]; then \
+             rm -f $${dest}/DOC* ; \
+             rm -f $${dest}/refcards/*.aux $${dest}/refcards/*.dvi; \
+             rm -f $${dest}/refcards/*.log; \
+         else true; \
+         fi; \
          for subdir in `find $${dest} -type d -print` ; do \
            chmod a+rx $${subdir} ; \
            rm -f $${subdir}/.gitignore ; \
index 791dbbc5989f9c9cb37d2219c5d6918f0ed0de35..e9c6c74e163fefb26963a6205370233968526450 100644 (file)
@@ -1,3 +1,11 @@
+2013-08-15  Glenn Morris  <rgm@gnu.org>
+
+       * make-tarball.txt: Mention generating pdfs in etc/refcards.
+
+2013-08-15  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * notes/hydra: More information about Hydra.
+
 2013-08-10  Xue Fuqiao  <xfq.free@gmail.com>
 
        * notes/hydra: New file.
index 53186b216883e9041d7ccb889a2e79a41f9d83eb..c578d3d37e16650848f8244e9d475c8304a85aff 100644 (file)
@@ -3,6 +3,10 @@ Tasks needed before the next release.
 * TO BE DONE SHORTLY BEFORE RELEASE
 
 ** Manuals
+Check for node names using problematic characters:
+  find doc -name '*.texi' -exec grep '^@node[^,]*[:.()]' {} +
+Sadly makeinfo does not warn about such characters.
+
 Check cross-references between the manuals (eg from emacs to elisp)
 are correct.  You can use something like the following in the info
 directory in the Emacs build tree:
index 6b8ec9abe020cd69a5f3c53fcef94778b1bc32ca..54d26cc11d64306b3a0e186db24dfe21180339cb 100644 (file)
@@ -202,6 +202,8 @@ The detected problematic options are stored in `cus-test-errors'."
 
           ;; Check the values
           (mapc (lambda (value)
+                  ;; TODO for booleans, check for values that can be
+                  ;; evaluated and are not t or nil.  Usually a bug.
                   (unless (widget-apply conv :match value)
                     (setq mismatch 'mismatch)))
                 values)
index 3172854ede75ba9df27ebe4438171ca79f456094..fc7f81f0c282eab2a5ec93739fab33ec6bbc603c 100644 (file)
@@ -61,6 +61,9 @@ General steps (for each step, check for possible errors):
 5.   autoreconf -i -I m4 --force
      make bootstrap
 
+     make -C etc/refcards
+     make -C etc/refcards clean
+
 6.  Copy lisp/loaddefs.el to lisp/ldefs-boot.el.
 
     Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed
index 776c1e2c680f1decec9ce2411ed4445b73ef4432..068bc70ee9c709a743032de1c248a0981e495d0e 100644 (file)
@@ -16,8 +16,10 @@ x86_64-darwin
 x86_64-linux
 
 * Mail notifications
-Hydra sends notifications about build breakages in Emacs trunk to
-emacs-buildstatus@gnu.org.
+In addition to the web interface, Hydra can send notifications by
+email when the build status of a project changes—e.g., from
+`SUCCEEDED' to `FAILED'.  It sends notifications about build status in
+Emacs trunk to emacs-buildstatus@gnu.org.
 
 If you want to receive these notifications, please subscribe at
 http://lists.gnu.org/mailman/listinfo/emacs-buildstatus
@@ -30,16 +32,24 @@ some autoconf/-make or bootstrap script.
 
 ** The `build' job
 which gets the result of the tarball job as input, together with
-system identifier, this job basically does a normal make, make check,
-make install.
+system identifier, this job basically does a normal make and make install.
 
 ** The 'coverage' job
 is now running `make check'.
 
-* Other GNU packages
+* Nix expressions
+The recipe for GNU Emacs are available via Git:
+http://git.savannah.gnu.org/cgit/hydra-recipes.git/tree/emacs
+
+To modify the build job, email the patch to hydra-users@gnu.org.  The
+build recipes are written in the Nix language.
+
+* Other Information
 For a list of other GNU packages that have a continuous build on
 Hydra, see http://hydra.nixos.org/project/gnu
 
+See http://www.gnu.org/software/devel.html#Hydra for more information.
+
 \f
 This file is part of GNU Emacs.
 
index 00b7c5ba05e542e7b058b037afb723190dc42769..a8ca66e22c8566e0e3289c9382202ff642837fd4 100644 (file)
@@ -210,7 +210,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #undef GNU_MALLOC
 
 /* Define to set the G_SLICE environment variable to "always-malloc" at
-   startup, if using GTK. */
+   startup. */
 #undef G_SLICE_ALWAYS_MALLOC
 
 /* Define to 1 if you have the `accept4' function. */
index 54e8f2902934d051cd4454f314de4b10aac59cd9..a82c52daf982cf1406f9253ff2d231ee81e4eaa5 100755 (executable)
@@ -7920,6 +7920,10 @@ $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
   for w in $ws; do
 
 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
+gl_positive="$w"
+case $gl_positive in
+  -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
+esac
 { $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 :
@@ -7927,7 +7931,7 @@ if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -7966,7 +7970,7 @@ if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-missing-field-initializers"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8002,7 +8006,7 @@ if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8038,7 +8042,7 @@ if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-type-limits"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8074,7 +8078,7 @@ if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-switch"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wswitch"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8110,7 +8114,7 @@ if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8146,7 +8150,7 @@ if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8185,7 +8189,7 @@ if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-logical-op"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8224,7 +8228,7 @@ if test "${gl_cv_warn_c__Wno_format_extra_args+set}" = set; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-extra-args"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-extra-args"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8260,7 +8264,7 @@ if test "${gl_cv_warn_c__Wno_tautological_constant_out_of_range_compare+set}" =
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-tautological-constant-out-of-range-compare"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtautological-constant-out-of-range-compare"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8296,7 +8300,7 @@ if test "${gl_cv_warn_c__Wno_unused_command_line_argument+set}" = set; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-command-line-argument"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-command-line-argument"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -8332,7 +8336,7 @@ if test "${gl_cv_warn_c__Wno_unused_value+set}" = set; then :
 else
 
   gl_save_compiler_FLAGS="$CFLAGS"
-  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-value"
+  as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-value"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 HAVE_ZLIB=no
 LIBZ=
 if test "${with_zlib}" != "no"; then
-  if test "${HAVE_PNG}" = "yes"; then
-    ### PNG depends on zlib, so if we have PNG, we have zlib.
-    HAVE_ZLIB=yes
-  else
-    ### No PNG, so check zlib ourselves.
-    OLIBS=$LIBS
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
+  OLIBS=$LIBS
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
 $as_echo_n "checking for library containing inflateEnd... " >&6; }
 if test "${ac_cv_search_inflateEnd+set}" = set; then :
   $as_echo_n "(cached) " >&6
@@ -13702,16 +13701,19 @@ if test "$ac_res" != no; then :
   HAVE_ZLIB=yes
 fi
 
-    LIBS=$OLIBS
-    case $ac_cv_search_inflateEnd in
-      -*) LIBZ=$ac_cv_search_inflateEnd ;;
-    esac
-  fi
+  LIBS=$OLIBS
+  case $ac_cv_search_inflateEnd in
+    -*) LIBZ=$ac_cv_search_inflateEnd ;;
+  esac
 fi
 if test "${HAVE_ZLIB}" = "yes"; then
 
 $as_echo "#define HAVE_ZLIB 1" >>confdefs.h
 
+  ### mingw32 doesn't use -lz, since it loads the library dynamically.
+  if test "${opsys}" = "mingw32"; then
+     LIBZ=
+  fi
 fi
 
 
@@ -17068,7 +17070,7 @@ fi
 
 
 case $opsys in
-          cygwin)
+                cygwin)
 
 $as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
 
@@ -17171,7 +17173,7 @@ cat >>confdefs.h <<_ACEOF
 #define EMACS_CONFIGURATION "${canonical}"
 _ACEOF
 
-emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
+emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g" -e 's/\\\\/\\\\\\\\/g'`
 
 cat >>confdefs.h <<_ACEOF
 #define EMACS_CONFIG_OPTIONS "${emacs_config_options}"
index cae270253110104764106e1905489bdb91e518a4..f97ce719a363626a522f2f9cd89804d263428e20 100644 (file)
@@ -4379,14 +4379,16 @@ fi
 
 
 case $opsys in
-  dnl Emacs supplies its own malloc, but glib (part of Gtk+) calls
-  dnl memalign and on Cygwin, that becomes the Cygwin-supplied memalign.
-  dnl As malloc is not the Cygwin malloc, the Cygwin memalign always
-  dnl returns ENOSYS.  A workaround is to set G_SLICE=always-malloc. */
+  dnl Emacs supplies its own malloc, but glib calls posix_memalign,
+  dnl and on Cygwin prior to version 1.7.24 that becomes the
+  dnl Cygwin-supplied posix_memalign.  As malloc is not the Cygwin
+  dnl malloc, the Cygwin posix_memalign always returns ENOSYS.  A
+  dnl workaround is to set G_SLICE=always-malloc.  This is no longer
+  dnl needed starting with cygwin-1.7.24, and it is no longer
+  dnl effective starting with glib-2.36. */
   cygwin)
     AC_DEFINE(G_SLICE_ALWAYS_MALLOC, 1, [Define to set the
-      G_SLICE environment variable to "always-malloc" at startup, if
-      using GTK.])
+      G_SLICE environment variable to "always-malloc" at startup.])
     ;;
 
   hpux11)
@@ -4478,7 +4480,7 @@ fi
 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION,  "${canonical}",
                   [Define to the canonical Emacs configuration name.])
 dnl Replace any embedded " characters (bug#13274).
-emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g"`
+emacs_config_options=`echo "$emacs_config_options " | sed -e 's/--no-create //' -e 's/--no-recursion //' -e 's/ *$//' -e "s/\"/'/g" -e 's/\\\\/\\\\\\\\/g'`
 AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${emacs_config_options}",
                   [Define to the options passed to configure.])
 AH_TEMPLATE(config_opsysfile, [Some platforms that do not use configure
index 2b75a2426562a9ae769811ca7b8f694ca29ed4c6..f94db60f25fa6a068abf8d56cb6794c7dd3ac6be 100644 (file)
@@ -1,3 +1,11 @@
+2013-08-17  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * text.texi (Enriched Justification): Minor fixes.
+
+2013-08-14  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * files.texi (Filesets): Add an index.
+
 2013-08-12  Glenn Morris  <rgm@gnu.org>
 
        * macos.texi (GNUstep Support):
index 7daeca3bf38c273dffaa317b21fedde7e40c2652..bff0926f347dcfb9f6e84ab5be99617145979962 100644 (file)
@@ -1982,6 +1982,7 @@ thumbnails.  @xref{Image-Dired}.
 @node Filesets
 @section Filesets
 @cindex filesets
+@cindex sets of files
 
 @findex filesets-init
   If you regularly edit a certain group of files, you can define them
index 43441c208147d06e76d894515c865240c1350c8e..e4693a5293f85b29b87df17b4b823354add534e4 100644 (file)
@@ -873,6 +873,7 @@ The Emacs major modes are a mutually exclusive set of options, each of
 which configures Emacs for editing a certain sort of text.  Ideally,
 each programming language has its own major mode.  @xref{Major Modes}.
 
+@c FIXME: Mention margins for filling?
 @item Margin
 The space between the usable part of a window (including the
 fringe) and the window edge.
index 051bfe3eae8bcd6986a1913adc53fd10e436b331..cb33327faa1e6d5962878df4a6c8abbf2f8c9230 100644 (file)
@@ -109,6 +109,8 @@ number of characters.  If the numeric argument is omitted or one, they
 delete all the text in the region if it is active (@pxref{Using
 Region}).
 
+@c FIXME: `cycle-spacing' should be documented, too.  (Maybe not in
+@c this node, tho.)  --xfq
 @kindex M-\
 @findex delete-horizontal-space
 @kindex M-SPC
index d50a841d509d0d071a246b93eea94f0cef64e62d..e5743b064fb817b2356640fb474034b9f18ed6d8 100644 (file)
@@ -2255,6 +2255,7 @@ Prefix}.
 
 @node Enriched Justification
 @subsection Justification in Enriched Text
+@cindex justification style
 
   In Enriched mode, you can use the following commands to specify
 various @dfn{justification styles} for filling.  These commands apply
@@ -2293,13 +2294,13 @@ commands do nothing on text with this setting.  You can, however,
 still indent the left margin.
 @end table
 
+@c FIXME: We should explain the effect of these symbols.  --xfq
 @vindex default-justification
   You can also specify justification styles using the Justification
-submenu in the Text Properties menu.
-  The default justification style is specified by the per-buffer
-variable @code{default-justification}.  Its value should be one of the
-symbols @code{left}, @code{right}, @code{full}, @code{center}, or
-@code{none}.
+submenu in the Text Properties menu.  The default justification style
+is specified by the per-buffer variable @code{default-justification}.
+Its value should be one of the symbols @code{left}, @code{right},
+@code{full}, @code{center}, or @code{none}.
 
 @node Enriched Properties
 @subsection Setting Other Text Properties
index 1c8f239eb9d99abc9be04a619460b00bd6e00ab5..3f9d23a5476ec4d87ed1429b89018a79f0b6a568 100644 (file)
@@ -1,3 +1,54 @@
+2013-08-18  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * positions.texi (Positions): Improve indexing.
+
+2013-08-18  Eli Zaretskii  <eliz@gnu.org>
+
+       * markers.texi (The Region): Improve indexing.
+
+2013-08-17  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * modes.texi (SMIE, SMIE Grammar, SMIE Indentation): Add some indexes.
+
+       * text.texi (Maintaining Undo): Mention interactive call of
+       buffer-disable-undo.
+       (Filling): Add cross-reference for hard newlines.
+       (Sorting): Fix indentation.
+       (Columns): Comment out undefined behavior.
+       (Case Changes): Fix an `args-out-of-range' error in the example.
+
+2013-08-16  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * text.texi (Insertion): Refine.
+       (Margins): Add an index.
+       (Undo): Doc fix for `buffer-undo-list'.
+
+       * positions.texi (Character Motion):
+       * markers.texi (Moving Markers):
+       (Creating Markers): Comment out undefined behavior.
+
+2013-08-15  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * markers.texi (The Region): Add/move indexes.
+
+2013-08-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * display.texi (ImageMagick Images): Mention :content-type and
+       `image-content-type-suffixes'.
+
+2013-08-13  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * positions.texi (Word Motion): Remove redundant sentence.
+
+2013-08-13  Glenn Morris  <rgm@gnu.org>
+
+       * lists.texi (List Elements):
+       Undocument behavior of nth and nthcdr with n < 0.  (Bug#15059)
+
+2013-08-13  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * frames.texi (Display Feature Testing): Add indexes.
+
 2013-08-12  Glenn Morris  <rgm@gnu.org>
 
        * Makefile.in (prefix, datarootdir, datadir, PACKAGE_TARNAME)
index 6b8d24179e79f720f7679f28774e70828379cb71..ff9d98170d197258f9274b7fc04e77a8f6620da8 100644 (file)
@@ -4664,6 +4664,14 @@ and if @code{:height} is set it will have precedence over
 wish.  @code{:max-width} and @code{:max-height} will always preserve
 the aspect ratio.
 
+@item :format
+ImageMagick tries to auto-detect the image type, but it isn't always
+able to.  By using @code{:format-type}, we can give ImageMagick a hint
+to try to help it.  It's used in conjunction with the
+@code{image-format-suffixes} variable, which provides a mapping from
+content types to file name suffixes.  This is then given to
+ImageMagick as a file name hint.
+
 @item :rotation
 Specifies a rotation angle in degrees.
 
index 37b48cdb6a90298c69a124d9f58781365fc5b591..370098c8b622106939c0a8237203ff34aa1f403e 100644 (file)
@@ -1362,7 +1362,7 @@ Terminals}.
 @node Input Focus
 @section Input Focus
 @cindex input focus
-@c @cindex selected frame    Duplicates selected-frame
+@c @cindex selected frame    Duplicates selected-frame, same for selected-window.
 
 At any time, one frame in Emacs is the @dfn{selected frame}.  The selected
 window always resides on the selected frame.
@@ -2391,6 +2391,7 @@ displays returned by @code{display-mm-height} and
 @code{display-mm-width} in case the system provides incorrect values.
 @end defopt
 
+@cindex backing store
 @defun display-backing-store &optional display
 This function returns the backing store capability of the display.
 Backing store means recording the pixels of windows (and parts of
@@ -2402,6 +2403,7 @@ Values can be the symbols @code{always}, @code{when-mapped}, or
 when the question is inapplicable to a certain kind of display.
 @end defun
 
+@cindex SaveUnder feature
 @defun display-save-under &optional display
 This function returns non-@code{nil} if the display supports the
 SaveUnder feature.  That feature is used by pop-up windows
index 14601de181431bf17adce45867b9b205108649b1..9daf01cd0a292f5f5627e769a21772cc52c62ac8 100644 (file)
@@ -270,8 +270,10 @@ are numbered starting with zero, so the @sc{car} of @var{list} is
 element number zero.  If the length of @var{list} is @var{n} or less,
 the value is @code{nil}.
 
-If @var{n} is negative, @code{nth} returns the first element of
-@var{list}.
+@c Behavior for -ve n undefined since 2013/08; see bug#15059.
+@ignore
+If @var{n} is negative, @code{nth} returns the first element of @var{list}.
+@end ignore
 
 @example
 @group
@@ -281,10 +283,6 @@ If @var{n} is negative, @code{nth} returns the first element of
 @group
 (nth 10 '(1 2 3 4))
      @result{} nil
-@end group
-@group
-(nth -3 '(1 2 3 4))
-     @result{} 1
 
 (nth n x) @equiv{} (car (nthcdr n x))
 @end group
@@ -300,7 +298,8 @@ This function returns the @var{n}th @sc{cdr} of @var{list}.  In other
 words, it skips past the first @var{n} links of @var{list} and returns
 what follows.
 
-If @var{n} is zero or negative, @code{nthcdr} returns all of
+@c "or negative" removed 2013/08; see bug#15059.
+If @var{n} is zero, @code{nthcdr} returns all of
 @var{list}.  If the length of @var{list} is @var{n} or less,
 @code{nthcdr} returns @code{nil}.
 
@@ -314,7 +313,7 @@ If @var{n} is zero or negative, @code{nthcdr} returns all of
      @result{} nil
 @end group
 @group
-(nthcdr -3 '(1 2 3 4))
+(nthcdr 0 '(1 2 3 4))
      @result{} (1 2 3 4)
 @end group
 @end example
index cae14ab9a7892b3e7192c8ceadf0de81ae3ab5cb..d94908994e9709dcd46c76c39f8edc0e7548e9f2 100644 (file)
@@ -216,11 +216,14 @@ new marker that points to the same place and the same buffer as does
 The new marker's insertion type is specified by the argument
 @var{insertion-type}.  @xref{Marker Insertion Types}.
 
+@c This behavior used to be documented until 2013/08.
+@ignore
 If passed an integer argument less than 1, @code{copy-marker} returns a
 new marker that points to the beginning of the current buffer.  If
 passed an integer argument greater than the length of the buffer,
 @code{copy-marker} returns a new marker that points to the end of the
 buffer.
+@end ignore
 
 @example
 @group
@@ -279,6 +282,8 @@ This function returns the position that @var{marker} points to, or
 This function returns the buffer that @var{marker} points into, or
 @code{nil} if it points nowhere.
 
+@c FIXME: The `buffer' argument of `set-marker' already defaults to
+@c the current buffer, why use `(current-buffer)' explicitly here?
 @example
 @group
 (setq m (make-marker))
@@ -349,11 +354,15 @@ This function moves @var{marker} to @var{position}
 in @var{buffer}.  If @var{buffer} is not provided, it defaults to
 the current buffer.
 
+@c This behavior used to be documented until 2013/08.
+@ignore
 If @var{position} is less than 1, @code{set-marker} moves @var{marker}
 to the beginning of the buffer.  If @var{position} is greater than the
 size of the buffer (@pxref{Point}), @code{set-marker} moves marker to
-the end of the buffer.  If @var{position} is @code{nil} or a marker
-that points nowhere, then @var{marker} is set to point nowhere.
+the end of the buffer.
+@end ignore
+If @var{position} is @code{nil} or a marker that points nowhere, then
+@var{marker} is set to point nowhere.
 
 The value returned is @var{marker}.
 
@@ -384,7 +393,7 @@ This is another name for @code{set-marker}.
 @node The Mark
 @section The Mark
 @cindex mark, the
-@cindex mark ring
+@c @cindex the mark?
 
   Each buffer has a special marker, which is designated @dfn{the
 mark}.  When a buffer is newly created, this marker exists but does
@@ -423,6 +432,7 @@ the mark is active.  This is the main motivation for using Transient
 Mark mode.  (Another is that this enables highlighting of the region
 when the mark is active.  @xref{Display}.)
 
+@cindex mark ring
   In addition to the mark, each buffer has a @dfn{mark ring} which is a
 list of markers containing previous values of the mark.  When editing
 commands change the mark, they should normally save the old value of the
@@ -644,7 +654,12 @@ more marks than this are pushed onto the @code{mark-ring},
 
 @node The Region
 @section The Region
-@cindex region (between point and mark)
+@c The index entry must be just ``region'' to make it the first hit
+@c when the user types ``i region RET'', because otherwise the Info
+@c reader will present substring matches in alphabetical order,
+@c putting this one near the end, with something utterly unrelated as
+@c the first hit.
+@cindex region
 
   The text between point and the mark is known as @dfn{the region}.
 Various functions operate on text delimited by point and the mark, but
@@ -668,6 +683,7 @@ integer).  This is the position of either point or the mark, whichever is
 larger.
 @end defun
 
+@c FIXME: Mention it in tips.texi?
   Instead of using @code{region-beginning} and @code{region-end}, a
 command designed to operate on a region should normally use
 @code{interactive} with the @samp{r} specification to find the
@@ -680,6 +696,8 @@ mark is active, and there is a valid region in the buffer.  This
 function is intended to be used by commands that operate on the
 region, instead of on text near point, when the mark is active.
 
+@cindex empty region
+@vindex use-empty-active-region
 A region is valid if it has a non-zero size, or if the user option
 @code{use-empty-active-region} is non-@code{nil} (by default, it is
 @code{nil}).  The function @code{region-active-p} is similar to
index 59729380ea70b005ac200bdb8676388b298ee6bc..180fef7241d86eebf2342c1512f9a31c2a8508ff 100644 (file)
@@ -3381,6 +3381,7 @@ of Lisp sexps and adapts it to non-Lisp languages.
 
 @node SMIE
 @subsection Simple Minded Indentation Engine
+@cindex SMIE
 
 SMIE is a package that provides a generic navigation and indentation
 engine.  Based on a very simple parser using an ``operator precedence
@@ -3548,6 +3549,8 @@ simply ignored.
 
 @node SMIE Grammar
 @subsubsection Defining the Grammar of a Language
+@cindex SMIE grammar
+@cindex grammar, SMIE
 
 The usual way to define the SMIE grammar of a language is by
 defining a new global variable that holds the precedence table by
@@ -3623,6 +3626,8 @@ formally as left associative.
 
 @node SMIE Lexer
 @subsubsection Defining Tokens
+@cindex SMIE lexer
+@cindex defining tokens, SMIE
 
 SMIE comes with a predefined lexical analyzer which uses syntax tables
 in the following way: any sequence of characters that have word or
@@ -3757,6 +3762,7 @@ surrounding text to find ad-hoc clues.
 
 @node SMIE Indentation
 @subsubsection Specifying Indentation Rules
+@cindex indentation rules, SMIE
 
 Based on the provided grammar, SMIE will be able to provide automatic
 indentation without any extra effort.  But in practice, this default
index 119ad98a53d8572994721a2dcde1c1f18aaebfbf..69f1b80c431223f9e2fed48ae804f277f23e1b4c 100644 (file)
@@ -5,6 +5,7 @@
 @node Positions
 @chapter Positions
 @cindex position (in buffer)
+@cindex buffer position
 
   A @dfn{position} is the index of a character in the text of a buffer.
 More precisely, a position identifies the place between two characters
@@ -146,9 +147,13 @@ that.
 
 @deffn Command goto-char position
 This function sets point in the current buffer to the value
-@var{position}.  If @var{position} is less than 1, it moves point to the
-beginning of the buffer.  If @var{position} is greater than the length
-of the buffer, it moves point to the end.
+@var{position}.
+@c This behavior used to be documented until 2013/08.
+@ignore
+If @var{position} is less than 1, it moves point to the beginning of
+the buffer.  If @var{position} is greater than the length of the
+buffer, it moves point to the end.
+@end ignore
 
 If narrowing is in effect, @var{position} still counts from the
 beginning of the buffer, but point cannot go outside the accessible
@@ -191,8 +196,8 @@ whether a given character is part of a word.  @xref{Syntax Tables}.
 
 @deffn Command forward-word &optional count
 This function moves point forward @var{count} words (or backward if
-@var{count} is negative).  If @var{count} is @code{nil}, it moves
-forward one word.
+@var{count} is negative).  If @var{count} is omitted or @code{nil}, it
+defaults to 1.
 
 ``Moving one word'' means moving until point crosses a
 word-constituent character and then encounters a word-separator
@@ -210,7 +215,7 @@ If @code{inhibit-field-text-motion} is non-@code{nil},
 this function ignores field boundaries.
 
 In an interactive call, @var{count} is specified by the numeric prefix
-argument.  If @var{count} is omitted or @code{nil}, it defaults to 1.
+argument.
 @end deffn
 
 @deffn Command backward-word &optional count
@@ -805,7 +810,7 @@ thousands of times in the Lisp sources of Emacs.
 buffer, use @code{save-current-buffer} or @code{with-current-buffer}
 instead (@pxref{Current Buffer}).  If you need to save or restore
 window configurations, see the forms described in @ref{Window
-Configurations} and in @ref{Frame Configurations}.
+Configurations} and in @ref{Frame Configurations}. @c frameset?
 
 @defspec save-excursion body@dots{}
 @cindex mark excursion
index 7cace70ad076d48183e57b933bfafa5861e5f9f8..c4250f2f0ba4ee0f7bfde2eb9f8a3e6dcf979b6d 100644 (file)
@@ -240,6 +240,7 @@ Major and minor modes can add functions to
 copied out of the buffer.
 @end defun
 
+@c FIXME: `filter-buffer-substring-function' should be documented.
 @defvar filter-buffer-substring-functions
 This variable is a wrapper hook (@pxref{Running Hooks}), whose members
 should be functions that accept four arguments: @var{fun},
@@ -365,7 +366,8 @@ not relocate the marker, depending on the marker's insertion type
 the inserted text, regardless of the markers' insertion type.
 
   Insertion functions signal an error if the current buffer is
-read-only or if they insert within read-only text.
+read-only (@pxref{Read Only Buffers}) or if they insert within
+read-only text (@pxref{Special Properties}).
 
   These functions copy text characters from strings and buffers along
 with their properties.  The inserted characters have exactly the same
@@ -421,10 +423,10 @@ insertion point.  @xref{Sticky Properties}.
 
 @defun insert-buffer-substring from-buffer-or-name &optional start end
 This function inserts a portion of buffer @var{from-buffer-or-name}
-(which must already exist) into the current buffer before point.  The
-text inserted is the region between @var{start} and @var{end}.  (These
-arguments default to the beginning and end of the accessible portion of
-that buffer.)  This function returns @code{nil}.
+into the current buffer before point.  The text inserted is the region
+between @var{start} (inclusive) and @var{end} (exclusive).  (These
+arguments default to the beginning and end of the accessible portion
+of that buffer.)  This function returns @code{nil}.
 
 In this example, the form is executed with buffer @samp{bar} as the
 current buffer.  We assume that buffer @samp{bar} is initially empty.
@@ -482,6 +484,7 @@ it except to install it on a keymap.
 
 In an interactive call, @var{count} is the numeric prefix argument.
 
+@c FIXME: This variable is obsolete since 23.1.
 Self-insertion translates the input character through
 @code{translation-table-for-input}.  @xref{Translation of Characters}.
 
@@ -776,6 +779,7 @@ is deleted.  If point is on a nonblank line, the command deletes all
 blank lines immediately following it.
 
 A blank line is defined as a line containing only tabs and spaces.
+@c and the Newline character?
 
 @code{delete-blank-lines} returns @code{nil}.
 @end deffn
@@ -920,6 +924,7 @@ processes the text according to @code{yank-handled-properties} and
 text anyway.)
 @end defun
 
+@c FIXME: Add an index for yank-handler.
   If you put a @code{yank-handler} text property on all or part of a
 string, that alters how @code{insert-for-yank} inserts the string.  If
 different parts of the string have different @code{yank-handler}
@@ -1284,8 +1289,8 @@ This is an extensible undo item, which is undone by calling
 @item (apply @var{delta} @var{beg} @var{end} @var{funname} . @var{args})
 This is an extensible undo item, which records a change limited to the
 range @var{beg} to @var{end}, which increased the size of the buffer
-by @var{delta}.  It is undone by calling @var{funname} with arguments
-@var{args}.
+by @var{delta} characters.  It is undone by calling @var{funname} with
+arguments @var{args}.
 
 This kind of element enables undo limited to a region to determine
 whether the element pertains to that region.
@@ -1376,7 +1381,8 @@ possible to undo either previous changes or any subsequent changes.  If
 the undo list of @var{buffer-or-name} is already disabled, this function
 has no effect.
 
-This function returns @code{nil}.
+In an interactive call, BUFFER-OR-NAME is the current buffer.  You
+cannot specify any other buffer.  This function returns @code{nil}.
 @end deffn
 
   As editing continues, undo lists get longer and longer.  To prevent
@@ -1493,6 +1499,7 @@ the header lines.  If @var{citation-regexp} is a string, it is used as
 a regular expression; if it matches the beginning of a line, that line
 is treated as a citation marker.
 
+@c FIXME: "That mode" is confusing.  It isn't a major/minor mode.
 Ordinarily, @code{fill-individual-paragraphs} regards each change in
 indentation as starting a new paragraph.  If
 @code{fill-individual-varying-indent} is non-@code{nil}, then only
@@ -1606,11 +1613,13 @@ Manual}.
 @defvar use-hard-newlines
 If this variable is non-@code{nil}, the filling functions do not delete
 newlines that have the @code{hard} text property.  These ``hard
-newlines'' act as paragraph separators.
+newlines'' act as paragraph separators.  @xref{Hard and Soft
+Newlines,, Hard and Soft Newlines, emacs, The GNU Emacs Manual}.
 @end defvar
 
 @node Margins
 @section Margins for Filling
+@cindex margins, filling
 
 @defopt fill-prefix
 This buffer-local variable, if non-@code{nil}, specifies a string of
@@ -1800,6 +1809,7 @@ prefix or @code{nil}, meaning it has failed to determine a prefix.
 @cindex filling, automatic
 @cindex Auto Fill mode
 
+@c FIXME: I don't think any of the variables below is a/an normal/abnormal hook.
   Auto Fill mode is a minor mode that fills lines automatically as text
 is inserted.  This section describes the hook used by Auto Fill mode.
 For a description of functions that you can call explicitly to fill and
@@ -1941,10 +1951,10 @@ its @code{sort-subr} call looks like this:
 @group
 (sort-subr reverse
            (function
-             (lambda ()
-               (while (and (not (eobp))
-                      (looking-at paragraph-separate))
-                 (forward-line 1))))
+            (lambda ()
+              (while (and (not (eobp))
+                          (looking-at paragraph-separate))
+                (forward-line 1))))
            'forward-paragraph)
 @end group
 @end example
@@ -2130,9 +2140,12 @@ line and point.
 When called interactively, @var{column} is the value of prefix numeric
 argument.  If @var{column} is not an integer, an error is signaled.
 
+@c This behavior used to be documented until 2013/08.
+@ignore
 If column @var{column} is beyond the end of the line, point moves to
 the end of the line.  If @var{column} is negative, point moves to the
 beginning of the line.
+@end ignore
 
 If it is impossible to move to column @var{column} because that is in
 the middle of a multicolumn character such as a tab, point moves to the
@@ -2341,6 +2354,8 @@ code.
 For example, if @var{count} is 3, this command adds 3 columns of
 indentation to each of the lines beginning in the region specified.
 
+@c FIXME: I suggest using message-indent-citation as the example, or
+@c just remove this paragraph.  --xfq
 In Mail mode, @kbd{C-c C-y} (@code{mail-yank-original}) uses
 @code{indent-rigidly} to indent the text copied from the message being
 replied to.
@@ -2518,7 +2533,7 @@ This is the contents of the 5th foo.
 @end group
 
 @group
-(capitalize-region 1 44)
+(capitalize-region 1 37)
 @result{} nil
 
 ---------- Buffer: foo ----------
@@ -3024,6 +3039,7 @@ Point}.
 
 @table @code
 @cindex property category of text character
+@c FIXME: Isn't @kindex for keyboard commands?
 @kindex category @r{(text property)}
 @item category
 If a character has a @code{category} property, we call it the
@@ -4012,6 +4028,7 @@ A rectangle is represented by a list of strings.
 This represents a window configuration to restore in one frame, and a
 position to jump to in the current buffer.
 
+@c FIXME: Mention frameset here.
 @item @code{(@var{frame-configuration} @var{position})}
 This represents a frame configuration to restore, and a position
 to jump to in the current buffer.
index 02f52869f8476179930c36a146ab6b729f499737..554580c769a71cbd0239fef711571cc2a948a336 100644 (file)
@@ -1,3 +1,24 @@
+2013-08-19  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * emacs-mime.texi (Encoding Customization): Exclude iso-2022-jp-2 and
+       shift_jis from the default value set to mm-coding-system-priorities for
+       Japanese users.
+
+2013-08-13  Glenn Morris  <rgm@gnu.org>
+
+       * reftex.texi (LaTeX xr Package, Options - Table of Contents)
+       (Options - Defining Label Environments, Options - Creating Labels)
+       (Options - Referencing Labels, Options - Creating Citations)
+       (Options - Index Support, Options - Viewing Cross-References)
+       (Options - Finding Files, Options - Optimizations)
+       (Options - Fontification, Options - Misc):
+       * cc-mode.texi (Sample Init File):
+       * edt.texi (Init file):
+       * epa.texi (Encrypting/decrypting gpg files):
+       * mairix-el.texi (About, Setting up the mairix interface, Using)
+       (Extending):
+       Rename nodes to avoid characters that can cause Texinfo problems.
+
 2013-08-12  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus.texi (Mail Source Specifiers): Fix description for pop3's :leave.
index 4cc5d9c5767605da72a705398482f2f15cea1be4..c62d7026541f6bb9a0afcf7742aee6669e95d0b3 100644 (file)
@@ -241,7 +241,7 @@ functions, classes, etc.; there are other packages for that.
 * Customizing Indentation::
 * Custom Macros::
 * Odds and Ends::
-* Sample .emacs File::
+* Sample Init File::
 * Performance Issues::
 * Limitations and Known Bugs::
 * FAQ::
@@ -1113,7 +1113,7 @@ valid.}.
 This function is not bound to a key by default, but it's intended to be
 used on the @kbd{RET} key.  If you like the behavior of
 @code{newline-and-indent} on @kbd{RET}, you should consider switching to
-this function.  @xref{Sample .emacs File}.
+this function.  @xref{Sample Init File}.
 
 @item @kbd{M-x c-context-open-line}
 @findex c-context-open-line
@@ -1170,7 +1170,7 @@ and @ref{Indentation Engine Basics}.
 
 You can toggle each of these minor modes on and off, and you can
 configure @ccmode{} so that it starts up with your favorite
-combination of them (@pxref{Sample .emacs File}).  By default, when
+combination of them (@pxref{Sample Init File}).  By default, when
 you initialize a buffer, electric mode and syntactic-indentation mode
 are enabled but the other two modes are disabled.
 
@@ -2378,7 +2378,7 @@ those set by @code{c-default-style}.
 @vindex initialization-hook (c-)
 Hook run only once per Emacs session, when @ccmode{} is initialized.
 This is a good place to change key bindings (or add new ones) in any
-of the @ccmode{} key maps.  @xref{Sample .emacs File}.
+of the @ccmode{} key maps.  @xref{Sample Init File}.
 @end defvar
 
 @defvar c-mode-common-hook
@@ -2406,7 +2406,7 @@ overwritten when @ccmode{} gets loaded.
 Here's a simplified example of what you can add to your @file{.emacs}
 file to do things whenever any @ccmode{} language is edited.  See the
 Emacs manuals for more information on customizing Emacs via hooks.
-@xref{Sample .emacs File}, for a more complete sample @file{.emacs}
+@xref{Sample Init File}, for a more complete sample @file{.emacs}
 file.
 
 @example
@@ -2685,7 +2685,7 @@ create a new @dfn{style definition}, possibly based on an existing
 style.  To do this, put the new style's settings into a list with the
 following format; the list can then be passed as an argument to the
 function @code{c-add-style}.  You can see an example of a style
-definition in @ref{Sample .emacs File}.
+definition in @ref{Sample Init File}.
 
 @cindex style definition
 @c @defvr {List} style definition
@@ -2753,7 +2753,7 @@ deprecated and it might be removed from @ccmode{} in a future release.
 You should use @code{c-set-style} instead.
 
 The sample @file{.emacs} file provides a concrete example of how a new
-style can be added and automatically set.  @xref{Sample .emacs File}.
+style can be added and automatically set.  @xref{Sample Init File}.
 @end defun
 
 @defvar c-style-alist
@@ -6760,7 +6760,7 @@ initialization code.
 @end defun
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@node    Odds and Ends, Sample .emacs File, Custom Macros, Top
+@node    Odds and Ends, Sample Init File, Custom Macros, Top
 @comment node-name, next, previous, up
 @chapter Odds and Ends
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -6804,9 +6804,9 @@ anchoring position to indent the line in that case.
 
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@node    Sample .emacs File, Performance Issues, Odds and Ends, Top
+@node    Sample Init File, Performance Issues, Odds and Ends, Top
 @comment node-name, next, previous, up
-@appendix Sample .emacs File
+@appendix Sample Init File
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
 Here's a sample .emacs file fragment that might help you along the way.
@@ -6863,7 +6863,7 @@ to change some of the actual values.
 @end verbatim
 
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-@node    Performance Issues, Limitations and Known Bugs, Sample .emacs File, Top
+@node    Performance Issues, Limitations and Known Bugs, Sample Init File, Top
 @comment node-name, next, previous, up
 @chapter Performance Issues
 @cindex performance
index 339d59bd12335a65c35caac2bd39a7e50637f20e..40aeae836efb6da3a9358cef5822a08f5e574661 100644 (file)
@@ -789,13 +789,13 @@ so the above directions may need some modification if your site has such
 special needs.
 
 @menu
-* edt-user.el::          Creating your own @file{edt-user.el} file.
+* Init file::            Creating your own @file{edt-user.el} file.
 * Words::                Specifying word entities.
 * Control keys::         Enabling EDT control key sequence bindings.
 * Scroll margins::       Setting scroll margins.
 @end menu
 
-@node edt-user.el
+@node Init file
 @section Creating your own @file{edt-user.el} File
 
 A sample @file{edt-user.el} file is provided in the Emacs @file{etc/}
index c8e8fb6d2e271d956423665a040e5a64b188196d..e199417aa9d1ea5c7f19eb70e8d7674d4e9764df 100644 (file)
@@ -256,7 +256,7 @@ concepts.  Therefore, it is highly recommended to learn these from a
 textbook or tutorial first, especially if you only know OOP from
 languages like C++ or Java.  If on the other hand you are already
 familiar with CLOS, you should be aware that @eieio{} does not implement
-the full CLOS specificiation and also differs in some other aspects
+the full CLOS specification and also differs in some other aspects
 (@xref{Introduction}, and @ref{CLOS compatibility}).
 
 A @dfn{class} is a definition for organizing data and methods
index cbb78af9d59580b0b115869d7e44285de7b2d089..2c0e929e532140629d11948cca4fe1e6bec4b099 100644 (file)
@@ -871,15 +871,15 @@ by using the @code{encoding} @acronym{MML} tag (@pxref{MML Definition}).
 @vindex mm-coding-system-priorities
 Prioritize coding systems to use for outgoing messages.  The default
 is @code{nil}, which means to use the defaults in Emacs, but is
-@code{(iso-8859-1 iso-2022-jp iso-2022-jp-2 shift_jis utf-8)} when
-running Emacs in the Japanese language environment.  It is a list of
-coding system symbols (aliases of coding systems are also allowed, use
-@kbd{M-x describe-coding-system} to make sure you are specifying correct
-coding system names).  For example, if you have configured Emacs
-to prefer UTF-8, but wish that outgoing messages should be sent in
-ISO-8859-1 if possible, you can set this variable to
-@code{(iso-8859-1)}.  You can override this setting on a per-message
-basis by using the @code{charset} @acronym{MML} tag (@pxref{MML Definition}).
+@code{(iso-8859-1 iso-2022-jp utf-8)} when running Emacs in the Japanese
+language environment.  It is a list of coding system symbols (aliases of
+coding systems are also allowed, use @kbd{M-x describe-coding-system} to
+make sure you are specifying correct coding system names).  For example,
+if you have configured Emacs to prefer UTF-8, but wish that outgoing
+messages should be sent in ISO-8859-1 if possible, you can set this
+variable to @code{(iso-8859-1)}.  You can override this setting on a
+per-message basis by using the @code{charset} @acronym{MML} tag
+(@pxref{MML Definition}).
 
 As different hierarchies prefer different charsets, you may want to set
 @code{mm-coding-system-priorities} according to the hierarchy in Gnus.
@@ -904,7 +904,7 @@ Here's an example:
           (mm-coding-system-priorities '(iso-8859-15 iso-8859-1 utf-8)))
          ("^fj\\." ;; Japanese
           (mm-coding-system-priorities
-           '(iso-8859-1 iso-2022-jp iso-2022-jp-2 shift_jis utf-8)))
+           '(iso-8859-1 iso-2022-jp utf-8)))
          ("^ru\\." ;; Cyrillic
           (mm-coding-system-priorities
            '(koi8-r iso-8859-5 iso-8859-1 utf-8))))
index adc63cc0bdbc11a7b0a731c2537882ab35b4aa4e..bdba071be55fa6395080ea2381237402c453453f 100644 (file)
@@ -106,7 +106,7 @@ This chapter introduces various commands for typical use cases.
 * Cryptographic operations on files::
 * Dired integration::
 * Mail-mode integration::
-* Encrypting/decrypting *.gpg files::
+* Encrypting/decrypting gpg files::
 @end menu
 
 @node Key management
@@ -346,8 +346,8 @@ key in the recipient list, use @samp{encrypt-to} option in
 
 @end table
 
-@node Encrypting/decrypting *.gpg files
-@section Encrypting/decrypting *.gpg files
+@node Encrypting/decrypting gpg files
+@section Encrypting/decrypting gpg files
 By default, every file whose name ends with @samp{.gpg} will be
 treated as encrypted.  That is, when you open such a file, the
 decrypted text is inserted in the buffer rather than encrypted one.
@@ -464,7 +464,7 @@ To set up gpg-agent, follow the instruction in GnuPG manual.
 
 To set up elisp passphrase cache, set
 @code{epa-file-cache-passphrase-for-symmetric-encryption}.
-@xref{Encrypting/decrypting *.gpg files}.
+@xref{Encrypting/decrypting gpg files}.
 
 @node Bug Reports
 @chapter Bug Reports
index 73a1294d28d7beea1b1e471f2c53dbcacf05d92c..210b709c1ea841b028149efc35d5696876b56036 100644 (file)
@@ -55,15 +55,15 @@ database.
 @end ifnottex
 
 @menu
-* About mairix and mairix.el::  About the mairix search engine and mairix.el
-* Configuring mairix::          How to configure mairix
-* Setting up mairix.el::        Set up mairix.el
-* Using mairix.el::             List of interactive functions
-* Extending mairix.el::         Support your favorite mail reader!
+* About::                       About the mairix search engine and mairix.el.
+* Configuring mairix::          How to configure mairix.
+* Setting up the mairix interface:: Set up mairix.el.
+* Using::                       List of interactive functions
+* Extending::                   Support your favorite mail reader!
 * GNU Free Documentation License::  The license for this documentation.
 @end menu
 
-@node About mairix and mairix.el
+@node About
 @chapter About mairix and mairix.el
 
 Mairix is a tool for indexing and searching words in locally stored
@@ -98,7 +98,7 @@ Currently, @code{mairix.el} is only tested with mbox output together
 with RMail, Gnus, or VM as the Emacs mail program.  However, it should
 also work with Maildir or MH, and it should be very easy to integrate
 other Emacs mail programs into @code{mairix.el}
-(@pxref{Extending mairix.el}).
+(@pxref{Extending}).
 
 If you use Gnus with maildir or MH, you should really use the native
 Gnus back end @code{nnmairix} instead, since it is more tightly
@@ -165,8 +165,8 @@ Now simply call @code{mairix} to create the index for the first time.
 Note that this may take a few minutes, but every following index will do
 the updates incrementally and hence is very fast.
 
-@node Setting up mairix.el
-@chapter Setting up mairix.el
+@node Setting up the mairix interface
+@chapter Setting up the mairix interface
 
 First, put @code{mairix.el} in your Emacs search path and put
 @code{(require 'mairix)} into your @file{.emacs} file.  Then, use
@@ -179,13 +179,12 @@ If you use Gnus with maildir or mh, use the native Gnus back end
 nnmairix instead.
 
 If you use another Emacs mail program which is not yet supported by
-mairix.el, it is pretty easy to integrate it.  @xref{Extending
-mairix.el}, on how to integrate it into mairix.el.
+mairix.el, it is pretty easy to integrate it.  @xref{Extending},
+on how to integrate it into mairix.el.
 
-Now you should be ready to go. @xref{Using mairix.el}, for the available
-commands.
+Now you should be ready to go. @xref{Using}, for the available commands.
 
-@node Using mairix.el
+@node Using
 @chapter Using mairix.el
 
 There are currently no default key bindings for mairix.el, since those
@@ -314,7 +313,7 @@ will still be usable while the update is done.
 @end table
 
 
-@node Extending mairix.el
+@node Extending
 @chapter Extending mairix.el
 
 Your favorite Emacs mail program is not supported?  Shame on me.  But
index b9cf23356472634543a733acd9f57175e786e084..ba83d8129a8b75ea53a1681bcbd7f73a68e3c74a 100644 (file)
@@ -153,7 +153,7 @@ Labels and References
 * Defining Label Environments::        ... and environments it doesn't.
 * Reference Info::                   View the label corresponding to a \ref.
 * Reference Styles::                 Macros to be used instead of \ref.
-* xr (LaTeX package)::               References to external documents.
+* LaTeX xr Package::                 References to external documents.
 
 Defining Label Environments
 
@@ -196,17 +196,17 @@ AUCTeX
 
 Options, Keymaps, Hooks
 
-* Options (Table of Contents)::
-* Options (Defining Label Environments)::
-* Options (Creating Labels)::
-* Options (Referencing Labels)::
-* Options (Creating Citations)::
-* Options (Index Support)::
-* Options (Viewing Cross-References)::
-* Options (Finding Files)::
-* Options (Optimizations)::
-* Options (Fontification)::
-* Options (Misc)::
+* Options - Table of Contents::
+* Options - Defining Label Environments::
+* Options - Creating Labels::
+* Options - Referencing Labels::
+* Options - Creating Citations::
+* Options - Index Support::
+* Options - Viewing Cross-References::
+* Options - Finding Files::
+* Options - Optimizations::
+* Options - Fontification::
+* Options - Misc::
 
 @end detailmenu
 @end menu
@@ -581,8 +581,8 @@ called.
 @item mouse-2
 @vindex reftex-highlight-selection
 Clicking with mouse button 2 on a line has the same effect as @key{RET}.
-See also variable @code{reftex-highlight-selection}, @ref{Options
-(Fontification)}.
+See also variable @code{reftex-highlight-selection},
+@ref{Options - Fontification}.
 
 @item f
 @vindex reftex-toc-follow-mode
@@ -701,9 +701,8 @@ buffer.
 
 @item x
 Switch to the @file{*toc*} buffer of an external document.  When the
-current document is using the @code{xr} package (@pxref{xr (LaTeX
-package)}), @RefTeX{} will switch to one of the external
-documents.
+current document is using the @code{xr} package (@pxref{LaTeX xr Package}),
+@RefTeX{} will switch to one of the external documents.
 
 
 @tablesubheading{Automatic recentering}
@@ -796,7 +795,7 @@ equation counter.
 * Defining Label Environments::        ... and environments it doesn't.
 * Reference Info::                   View the label corresponding to a \ref.
 * Reference Styles::                 Macros to be used instead of \ref.
-* xr (LaTeX package)::               References to external documents.
+* LaTeX xr Package::                 References to external documents.
 @end menu
 
 @node Creating Labels
@@ -859,8 +858,8 @@ this label later.
 
 @vindex reftex-insert-label-flags
 If you want to change the way certain labels are created, check out the
-variable @code{reftex-insert-label-flags} (@pxref{Options (Creating
-Labels)}).
+variable @code{reftex-insert-label-flags} (@pxref{Options Creating
+Labels}).
 
 If you are using @AUCTeX{} to write your @LaTeX{} documents, you can
 set it up to delegate the creation of labels to
@@ -981,7 +980,7 @@ references all marked labels.
 @vindex reftex-highlight-selection
 Clicking with mouse button 2 on a label will accept it like @key{RET}
 would.  See also variable @code{reftex-highlight-selection},
-@ref{Options (Misc)}.
+@ref{Options - Misc}.
 
 @vindex reftex-multiref-punctuation
 @item m - + ,
@@ -1034,7 +1033,7 @@ buffer.
 @tablesubheading{Controlling what gets displayed}
 @vindex reftex-label-menu-flags
 The defaults for the following flags can be configured with the variable
-@code{reftex-label-menu-flags} (@pxref{Options (Referencing Labels)}).
+@code{reftex-label-menu-flags} (@pxref{Options - Referencing Labels}).
 
 @item c
 Toggle the display of the one-line label definition context in the
@@ -1082,8 +1081,7 @@ a menu for that category will be shown.
 Reference a label from an external document.  With the @LaTeX{} package
 @code{xr} it is possible to reference labels defined in another
 document.  This key will switch to the label menu of an external
-document and let you select a label from there (@pxref{xr (LaTeX
-package),,xr}).
+document and let you select a label from there (@pxref{LaTeX xr Package,,xr}).
 
 @end table
 
@@ -1203,8 +1201,8 @@ them (@pxref{Defining Label Environments}).
 @vindex reftex-label-alist
 @RefTeX{} can be configured to recognize additional labeled
 environments and macros.  This is done with the variable
-@code{reftex-label-alist} (@pxref{Options (Defining Label
-Environments)}).  If you are not familiar with Lisp, you can use the
+@code{reftex-label-alist} (@pxref{Options Defining Label
+Environments}).  If you are not familiar with Lisp, you can use the
 @code{custom} library to configure this rather complex variable.  To do
 this, use
 
@@ -1302,8 +1300,7 @@ a @code{\macro} or after the @code{\begin} statement).  @code{t} is
 @code{nil} means to use the text right after the label definition.
 @item
 For more complex ways of getting context, see the variable
-@code{reftex-label-alist} (@ref{Options (Defining Label
-Environments)}).
+@code{reftex-label-alist} (@ref{Options - Defining Label Environments}).
 @end itemize
 
 The following list of strings is used to guess the correct label type
@@ -1356,9 +1353,8 @@ Reftex Label Alist: [Hide]
 Depending on how you would like the label insertion and selection for
 the new environments to work, you might want to add the letters @samp{a}
 and @samp{h} to some of the flags in the variables
-@code{reftex-insert-label-flags} (@pxref{Options (Creating Labels)})
-and @code{reftex-label-menu-flags} (@pxref{Options (Referencing
-Labels)}).
+@code{reftex-insert-label-flags} (@pxref{Options - Creating Labels})
+and @code{reftex-label-menu-flags} (@pxref{Options - Referencing Labels}).
 
 
 @node Quick Equation
@@ -1749,7 +1745,7 @@ and @code{reftex-fref-is-default} respectively.  While still working,
 these variables are deprecated now.  Instead of setting them, the
 variable @code{reftex-ref-style-default-list} should be adapted now.
 
-@node xr (LaTeX package)
+@node LaTeX xr Package
 @section @code{xr}: Cross-Document References
 @cindex @code{xr}, LaTeX package
 @cindex LaTeX packages, @code{xr}
@@ -1883,8 +1879,8 @@ which the selection process was started.
 @item mouse-2
 @vindex reftex-highlight-selection
 Clicking with mouse button 2 on a citation will accept it like @key{RET}
-would.  See also variable @code{reftex-highlight-selection}, @ref{Options
-(Misc)}.
+would.  See also variable @code{reftex-highlight-selection},
+@ref{Options - Misc}.
 
 @item m
 Mark the current entry.  When one or several entries are marked,
@@ -2403,8 +2399,9 @@ Abort the indexing process.
 
 The @samp{Find and Index in Document} menu in the phrases buffer also
 lists a few options for the indexing process.  The options have
-associated customization variables to set the defaults (@pxref{Options
-(Index Support)}).  Here is a short explanation of what the options do:
+associated customization variables to set the defaults
+(@pxref{Options - Index Support}).  Here is a short explanation of
+what the options do:
 
 @table @i
 @item Match Whole Words
@@ -2759,7 +2756,7 @@ variants@footnote{all macros that start with @samp{ref} or end with
 @samp{ref} or @samp{refrange}} of the @code{\ref} macro are active for
 cross-reference display.  This works also for labels defined in an
 external document when the current document refers to them through the
-@code{xr} interface (@pxref{xr (LaTeX package)}).
+@code{xr} interface (@pxref{LaTeX xr Package}).
 
 @item @code{\label}
 @cindex @code{\label}
@@ -2908,7 +2905,7 @@ the ones defined in @file{font-lock.el}.  Therefore, @RefTeX{} will
 use faces only when @code{font-lock} is loaded.  This seems to be
 reasonable because people who like faces will very likely have it
 loaded.  If you wish to turn off fontification or change the involved
-faces, see @ref{Options (Fontification)}.
+faces, see @ref{Options - Fontification}.
 
 @node Multifile Documents
 @section Multifile Documents
@@ -3894,21 +3891,21 @@ Lisp (and even if you are) you might find it more comfortable to use
 reftex-customize} will get you there.
 
 @menu
-* Options (Table of Contents)::
-* Options (Defining Label Environments)::
-* Options (Creating Labels)::
-* Options (Referencing Labels)::
-* Options (Creating Citations)::
-* Options (Index Support)::
-* Options (Viewing Cross-References)::
-* Options (Finding Files)::
-* Options (Optimizations)::
-* Options (Fontification)::
-* Options (Misc)::
+* Options - Table of Contents::
+* Options - Defining Label Environments::
+* Options - Creating Labels::
+* Options - Referencing Labels::
+* Options - Creating Citations::
+* Options - Index Support::
+* Options - Viewing Cross-References::
+* Options - Finding Files::
+* Options - Optimizations::
+* Options - Fontification::
+* Options - Misc::
 * Keymaps and Hooks::
 @end menu
 
-@node Options (Table of Contents)
+@node Options - Table of Contents
 @section Table of Contents
 @cindex Options, table of contents
 @cindex Table of contents, options
@@ -4032,7 +4029,7 @@ The keymap which is active in the @file{*toc*} buffer.
 (@pxref{Table of Contents}).
 @end deffn
 
-@node Options (Defining Label Environments)
+@node Options - Defining Label Environments
 @section Defining Label Environments
 @cindex Options, defining label environments
 @cindex Defining label environments, options
@@ -4259,7 +4256,7 @@ labels fn:xxx, you may want to set this variable to the value "^fn:$" or
 non-footnote labels.
 @end defopt
 
-@node Options (Creating Labels)
+@node Options - Creating Labels
 @section Creating Labels
 @cindex Options, creating labels
 @cindex Creating labels, options
@@ -4375,7 +4372,7 @@ Character class after  abbrev point in word.
 @end table
 @end defopt
 
-@node Options (Referencing Labels)
+@node Options - Referencing Labels
 @section Referencing Labels
 @cindex Options, referencing labels
 @cindex Referencing labels, options
@@ -4497,7 +4494,7 @@ The keymap which is active in the labels selection process
 (@pxref{Referencing Labels}).
 @end deffn
 
-@node Options (Creating Citations)
+@node Options - Creating Citations
 @section Creating Citations
 @cindex Options, creating citations
 @cindex Creating citations, options
@@ -4676,7 +4673,7 @@ Footer to insert in BibTeX files generated by
 @end defopt
 
 
-@node Options (Index Support)
+@node Options - Index Support, Options - Viewing Cross-References, Options - Creating Citations,  Options
 @section Index Support
 @cindex Options, Index support
 @cindex Index support, options
@@ -4896,7 +4893,7 @@ The keymap which is active in the @file{*Index*} buffer
 (@pxref{Index Support}).
 @end deffn
 
-@node Options (Viewing Cross-References)
+@node Options - Viewing Cross-References
 @section Viewing Cross-References
 @cindex Options, viewing cross-references
 @cindex Viewing cross-references, options
@@ -4955,7 +4952,7 @@ saved along with the parsing information.  The cache survives document
 scans.  In order to clear it, use @kbd{M-x reftex-reset-mode}.
 @end defopt
 
-@node Options (Finding Files)
+@node Options - Finding Files
 @section Finding Files
 @cindex Options, Finding Files
 @cindex Finding files, options
@@ -5045,7 +5042,7 @@ non-@code{nil}.
 @end defopt
 
 @page
-@node Options (Optimizations)
+@node Options - Optimizations
 @section Optimizations
 @cindex Options, optimizations
 @cindex Optimizations, options
@@ -5154,7 +5151,7 @@ effect when @code{reftex-use-multiple-selection-buffers} is
 non-@code{nil}.
 @end defopt
 
-@node Options (Fontification)
+@node Options - Fontification
 @section Fontification
 @cindex Options, fontification
 @cindex Fontification, options
@@ -5252,7 +5249,7 @@ Face name for index names (for multiple indices).
 Face name for index entries.
 @end defopt
 
-@node Options (Misc)
+@node Options - Misc
 @section Miscellaneous
 @cindex Options, misc
 
index 27ec68cdf059a6398a1e494b44486d6f662a6d49..a622298ba12684e33a66d57508391cf4e332623e 100644 (file)
@@ -433,7 +433,7 @@ visiting any of these files, the command also rename them accordingly.
 
 @item F k
 Delete the current todo file (@code{todo-delete-file}).@footnote{The key
-binding of this command is mnenomic for ``kill'' to parallel the binding
+binding of this command is mnemonic for ``kill'' to parallel the binding
 @kbd{k} for item deletion, since @kbd{d} is bound to another item
 editing command (@pxref{Done Items}).}  If the todo file has an archive
 (@pxref{Todo Archive Mode}), prompt whether to delete that as well.
@@ -496,7 +496,7 @@ and adds the category.
 
 @item C k
 Delete the current category (@code{todo-delete-category}).@footnote{This
-binding is mnenomic for ``kill'' to parallel the binding @kbd{k} for
+binding is mnemonic for ``kill'' to parallel the binding @kbd{k} for
 item deletion, since @kbd{d} is bound to another item editing command
 (@pxref{Done Items}).}  To delete a category that contains items, you
 have to confirm your intent; if the category is empty, deletion is
@@ -595,7 +595,7 @@ concerning the item header, and one each concerning its priority and its
 text.  Each unique combination of these parameters produces a different
 insertion command.  The command @kbd{i i} realizes one of these
 combinations.  For the commands that realize the remaining combinations
-it is convenient to associate each parameter with a mnenomically chosen
+it is convenient to associate each parameter with a mnemonically chosen
 key.  Then by typing certain sequences of these keys, you complete the
 insertion command invocation that realizes the specified combination.
 As with @kbd{i i}, the effect of many of these commands also depends on
@@ -610,7 +610,7 @@ occur in a category listing):
 @enumerate
 
 @item
-@kbd{y} for diary (non)inclusion; 
+@kbd{y} for diary (non)inclusion;
 @item
 @kbd{k} for adding or omitting `diary-nonmarking-symbol';
 @item
@@ -882,7 +882,7 @@ You delete an item, thereby permanently removing it:
 
 @item k
 Delete the todo item at point (@code{todo-delete-item}; the binding is
-mnenomic for ``kill'', since @kbd{d} is used for marking items as done
+mnemonic for ``kill'', since @kbd{d} is used for marking items as done
 (@pxref{Done Items}); but note that @kbd{k} does not put the item into
 the kill ring).  This command requires confirmation that you want to
 delete the item, since you cannot undo the deletion in Todo mode.  (You
@@ -1170,7 +1170,7 @@ listed consecutively en bloc.
 
 You can mark both todo and done items, but note that only @kbd{m} can apply
 to both; other commands only affect either marked todo or marked done
-items, so if both types of items are marked, invoking these commmands
+items, so if both types of items are marked, invoking these commands
 has no effect and informs you of your erroneous attempt.
 
 @node Todo Categories Mode, Searching for Items, Marked Items, Top
@@ -1214,7 +1214,7 @@ to visit another todo file).  To do this customize the option
 @node Table of Item Counts, Reordering Categories, , Todo Categories Mode
 @section Table of Item Counts
 
-Above each column of the table is a labelled button you can press by
+Above each column of the table is a labeled button you can press by
 clicking with the mouse or by typing @key{RET} on it.  Pressing an item
 count button sorts the table alternately in ascending or descending
 order according to the type of count.  Pressing the category button
@@ -1375,7 +1375,7 @@ filter come in pairs, one for filtering just the current todo file and
 one for filtering a user-specified list of todo files.  Thus, there
 are six item filtering commands:@footnote{The use of @kbd{F} in the key
 sequences of these commands naturally recalls ``filter'', but is also
-consistent with the Todo mode mnenomic key binding convention, since the
+consistent with the Todo mode mnemonic key binding convention, since the
 commands involve one or more whole files.}
 
 @itemize @bullet
@@ -1533,7 +1533,7 @@ completion (@code{todo-find-filtered-items-file}).
 @end table
 
 @itemize @bullet
-@item 
+@item
 As with tables of categories, by customizing @code{todo-show-first} you
 can have the first invocation of @code{todo-show} for a given todo file
 display the corresponding saved file of filtered items.  If there is
@@ -1548,7 +1548,7 @@ Filtered Items mode.  It deletes the current filtered items file.
 @node Todo Display Features, Printing Todo Buffers, Todo Filtered Items Mode, Top
 @chapter Todo Display Features
 
-You can change the appearance of Todo mode buffers in a variety of ways.  
+You can change the appearance of Todo mode buffers in a variety of ways.
 
 @menu
 * Faces::
@@ -1567,7 +1567,7 @@ the date and time of a Todo diary item (i.e., an item lacking
 @code{todo-nondiary-marker}) is earlier than the current date and time,
 they are displayed in a different face.  In this way, you can readily
 recognize diary items that have ``expired'' and act accordingly (e.g.,
-by tagging them as done or by updating the deadlines).  
+by tagging them as done or by updating the deadlines).
 
 Another example of an informational face is the face used to distinguish
 top priority items.  A third case is the face used in Todo Categories
index cbaa780a4a41ec68250177b9f2cd6e5ab1b6f6a0..c1cb67a6a67772cc9a59cd20e77d72926ffef18e 100644 (file)
@@ -1,3 +1,25 @@
+2013-08-15  Glenn Morris  <rgm@gnu.org>
+
+       * refcards/calccard.pdf, refcards/cs-dired-ref.pdf:
+       * refcards/cs-refcard.pdf, refcards/de-refcard.pdf:
+       * refcards/dired-ref.pdf, refcards/fr-dired-ref.pdf:
+       * refcards/fr-refcard.pdf, refcards/gnus-booklet.pdf:
+       * refcards/gnus-refcard.pdf, refcards/orgcard.pdf:
+       * refcards/pl-refcard.pdf, refcards/pt-br-refcard.pdf:
+       * refcards/refcard.pdf, refcards/ru-refcard.pdf:
+       * refcards/sk-dired-ref.pdf, refcards/sk-refcard.pdf:
+       Remove generated files from repository.
+
+       * refcards/Makefile: Rewrite to use portable Makefile syntax.
+       Add language-specific targets.
+       (distclean, extraclean): New rules.
+
+2013-08-13  Glenn Morris  <rgm@gnu.org>
+
+       * refcards/Makefile (all_pdf, all_ps, fr-survival.ps, dist):
+       New rules.
+       (SURVIVAL_CARDS_PDF): Add fr_survival.pdf.
+
 2013-08-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * NEWS: Mention -lz and `decompress-gzipped-region'.
index 715f7906073f454cd7a2fc413183d65a2c12e6ec..8bf72ddfedded202867051d137f0c75b1fb0cede 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -347,6 +347,8 @@ directory, respectively.
 `f' (`image-next-frame') and `b' (`image-previous-frame') visit the
 next or previous frame.  `F' (`image-goto-frame') shows a specific frame.
 
+*** New commands to speed up, slow down, or reverse animation.
+
 ---
 *** The command `image-mode-fit-frame' deletes other windows.
 When toggling, it restores the frame's previous window configuration.
@@ -683,6 +685,8 @@ Emacs uses `image-default-frame-delay'.
 *** New functions `image-current-frame' and `image-show-frame' for getting
 and setting the current frame of a multi-frame image.
 
+*** You can change the speed of animated images.
+
 ** Changes in encoding and decoding of text
 
 ---
@@ -896,6 +900,10 @@ treated as images.
 *** ImageMagick images now support the :max-width and :max-height
 keywords.
 
+*** Some data types aren't auto-detected by ImageMagick.  Adding
+:format to `create-image' may help if the content type is in the
+new variable `image-format-suffixes'.
+
 ** Minibuffer
 
 *** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the
index 66fbc96e1812f145578642c1cf965991007befb2..36abf67d594f05796db3ae7a2f73226a3304acc2 100644 (file)
 ## You should have received a copy of the GNU General Public License
 ## along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
+### Commentary:
 
-## Top-level targets.
+## See README for details.
 
-## PDF files that are included with Emacs.
-all: refcards_pdf dired-refcards_pdf misc-refcards_pdf
+PDF_ENGLISH = \
+       calccard.pdf \
+       dired-ref.pdf \
+       gnus-booklet.pdf \
+       gnus-refcard.pdf \
+       orgcard.pdf \
+       refcard.pdf \
+       survival.pdf \
+       vipcard.pdf \
+       viperCard.pdf
 
-REFCARDS_PDF = refcard.pdf cs-refcard.pdf de-refcard.pdf fr-refcard.pdf \
-            pl-refcard.pdf pt-br-refcard.pdf ru-refcard.pdf sk-refcard.pdf
-refcards_pdf: ${REFCARDS_PDF}
-refcards_ps: ${REFCARDS_PDF:.pdf=.ps}
+PDF_CZECH = \
+       cs-dired-ref.pdf \
+       cs-refcard.pdf \
+       cs-survival.pdf
 
-DIRED_REFCARDS_PDF = dired-ref.pdf cs-dired-ref.pdf fr-dired-ref.pdf \
-               sk-dired-ref.pdf
-dired-refcards_pdf: ${DIRED_REFCARDS_PDF}
-dired-refcards_ps: ${DIRED_REFCARDS_PDF:.pdf=.ps}
+PDF_FRENCH = \
+       fr-dired-ref.pdf \
+       fr-refcard.pdf \
+       fr-survival.pdf \
 
-MISC_REFCARDS_PDF = calccard.pdf gnus-booklet.pdf gnus-refcard.pdf orgcard.pdf
-misc-refcards_pdf: ${MISC_REFCARDS_PDF}
-misc-refcards_ps: ${MISC_REFCARDS_PDF:.pdf=.ps}
+PDF_GERMAN = de-refcard.pdf
 
+PDF_POLISH = pl-refcard.pdf
 
-## The following files are not included with Emacs.
-SURVIVAL_CARDS_PDF = survival.pdf cs-survival.pdf sk-survival.pdf
-survival-cards_pdf: ${SURVIVAL_CARDS_PDF}
-survival-cards_ps: ${SURVIVAL_CARDS_PDF:.pdf=.ps}
+PDF_PORTUGUESE = pt-br-refcard.pdf
 
-VIPER_CARDS_PDF = vipcard.pdf viperCard.pdf
-viper-cards_pdf: ${VIPER_CARDS_PDF}
-viper-cards_ps: ${VIPER_CARDS_PDF:.pdf=.ps}
+PDF_RUSSIAN = ru-refcard.pdf
 
-ENVADD = TEXINPUTS=".:"
+PDF_SLOVAKIAN = \
+       sk-dired-ref.pdf \
+       sk-refcard.pdf \
+       sk-survival.pdf
 
-## PDF files.
+PDF_TARGETS = $(PDF_ENGLISH) $(PDF_CZECH) $(PDF_FRENCH) $(PDF_GERMAN) \
+       $(PDF_POLISH) $(PDF_PORTUGUESE) $(PDF_RUSSIAN) $(PDF_SLOVAKIAN)
 
-## The page layouts (a4/letter) are written directly in the .tex files.
+PS_ENGLISH = \
+       calccard.ps \
+       dired-ref.ps \
+       gnus-booklet.ps \
+       gnus-refcard.ps \
+       orgcard.ps \
+       refcard.ps \
+       survival.ps \
+       vipcard.ps \
+       viperCard.ps
 
-cs-refcard.pdf cs-dired-ref.pdf cs-survival.pdf sk-refcard.pdf \
-sk-dired-ref.pdf sk-survival.pdf: %.pdf: %.tex emacsver.tex
-       if pdfcsplain --version > /dev/null 2> /dev/null; then \
-         ${ENVADD} pdfcsplain $<; \
-       else \
-         ${ENVADD} csplain "\pdfoutput=1\input $<"; \
-       fi
+PS_CZECH = \
+       cs-dired-ref.ps \
+       cs-refcard.ps \
+       cs-survival.ps
 
-## Some versions of pdfmex seem to create dvi by default, hence output-format.
-pl-refcard.pdf: %.pdf: %.tex emacsver.tex
-       if ! kpsewhich -format=fmt mex > /dev/null && \
-         ! pdfmex --version > /dev/null 2> /dev/null; then \
-         echo "No mex format found."; false; \
-       fi
-       ${ENVADD} pdftex -output-format=pdf $<
+PS_FRENCH = \
+       fr-dired-ref.ps \
+       fr-refcard.ps \
+       fr-survival.ps \
 
-ru-refcard.pdf: %.pdf: %.tex
-       pdflatex $<
+PS_GERMAN = de-refcard.ps
 
-#gnus-logo.pdf: %.pdf: %.eps
-#      ps2pdf $<
+PS_POLISH = pl-refcard.ps
 
-gnus-refcard.pdf: %.pdf: %.tex gnus-logo.pdf
-       pdflatex $<
+PS_PORTUGUESE = pt-br-refcard.ps
 
-gnus-booklet.pdf: gnus-refcard.tex gnus-logo.pdf
-       pdflatex -jobname=gnus-booklet '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
+PS_RUSSIAN = ru-refcard.ps
 
-## Everything not explicitly listed above.
-%.pdf: %.tex emacsver.tex
-       ${ENVADD} pdftex $<
+PS_SLOVAKIAN = \
+       sk-dired-ref.ps \
+       sk-refcard.ps \
+       sk-survival.ps
 
+PS_TARGETS = $(PS_ENGLISH) $(PS_CZECH) $(PS_FRENCH) $(PS_GERMAN) \
+       $(PS_POLISH) $(PS_PORTUGUESE) $(PS_RUSSIAN) $(PS_SLOVAKIAN)
 
-## dvi files.
 
-cs-refcard.dvi cs-dired-ref.dvi cs-survival.dvi sk-refcard.dvi \
-sk-dired-ref.dvi sk-survival.dvi: %.dvi: %.tex emacsver.tex
-       ${ENVADD} csplain $<
+## For emacsver.tex.
+ENVADD = TEXINPUTS=".:$(TEXINPUTS)"
 
-pl-refcard.dvi: %.dvi: %.tex emacsver.tex
-       if ! kpsewhich -format=fmt mex > /dev/null; then \
-         echo "No mex format found."; false; \
-       fi
-       ${ENVADD} tex $<
 
-ru-refcard.dvi gnus-refcard.dvi: %.dvi: %.tex
-       latex $<
+.PHONY: all pdf ps
 
-gnus-booklet.dvi: gnus-refcard.tex
-       latex '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
-       mv gnus-refcard.dvi $@
+all: pdf
+pdf: $(PDF_TARGETS)
+ps: $(PS_TARGETS)
 
-## Everything not explicitly listed above.
-%.dvi: %.tex emacsver.tex
-       ${ENVADD} tex $<
 
+.PHONY: english czech french german polish portuguese russian slovakian
+english: $(PDF_ENGLISH)
+czech: $(PDF_CZECH)
+french: $(PDF_FRENCH)
+german: $(PDF_GERMAN)
+polish: $(PDF_POLISH)
+portuguese: $(PDF_PORTUGUESE)
+russian: $(PDF_RUSSIAN)
+slovakian: $(PDF_SLOVAKIAN)
 
-## PostScript files.
+.PHONY: english-ps czech-ps french-ps german-ps polish-ps portuguese-ps russian-ps slovakian-ps
+english-ps: $(PS_ENGLISH)
+czech-ps: $(PS_CZECH)
+french-ps: $(PS_FRENCH)
+german-ps: $(PS_GERMAN)
+polish-ps: $(PS_POLISH)
+portuguese-ps: $(PS_PORTUGUESE)
+russian-ps: $(PS_RUSSIAN)
+slovakian-ps: $(PS_SLOVAKIAN)
 
-## Note that some of the tex files (refcard, de-refcard, fr-refcard,
-## pt-br-refcard) have settings for letter or a4 paper. Following are
-## the default paper sizes (letter for English, A4 for translations).
-## FIXME orgcard.ps does not fit on letter (see orgcard.tex).
 
-## A4, landscape.
-de-refcard.ps fr-refcard.ps pt-br-refcard.ps orgcard.ps: %.ps: %.dvi
-       dvips -t a4 -t landscape $< -o $@
+## Default for file that do not use a different paper size.
+.SUFFIXES: .ps .dvi
+.dvi.ps:
+       dvips -t letter -o $@ $<
+
+
+make_cs=if pdfcsplain --version > /dev/null 2> /dev/null; then \
+         $(ENVADD) pdfcsplain $$input; \
+       else \
+         $(ENVADD) csplain "\pdfoutput=1\input $$input"; \
+       fi
+
+## For pdf output, the page layouts (a4/letter) are written directly
+## in the .tex files.
 
-## A4, portrait.
-cs-dired-ref.ps cs-refcard.ps cs-survival.ps fr-dired-ref.ps \
-pl-refcard.ps ru-refcard.ps \
-sk-dired-ref.ps sk-refcard.ps sk-survival.ps: %.ps: %.dvi
-       dvips -t a4 $< -o $@
+## For PostScript output, note that some of the tex files (refcard,
+## de-refcard, fr-refcard, pt-br-refcard) have settings for letter or
+## a4 paper.  The Following are the default paper sizes (letter for English,
+## A4 for translations).
+## FIXME orgcard.ps does not fit on letter (see orgcard.tex).
 
-## letter, landscape.
-calccard.ps refcard.ps: %.ps: %.dvi
-       dvips -t letter -t landscape $< -o $@
+## A4, landscape: de-refcard, fr-refcard, pt-br-refcard orgcard
+## A4, portrait: cs-*, fr-dired-ref, sk-*, pl-refcard, ru-refcard
+## Letter, landscape: calccard, refcard
+## Letter, portrait (suffix rule): dired-ref, gnus-*, survival, vip*
+
+calccard_deps = calccard.tex emacsver.tex pdflayout.sty
+calccard.pdf: $(calccard_deps)
+       $(ENVADD) pdftex calccard.tex
+calccard.dvi: $(calccard_deps)
+       $(ENVADD) tex calccard.tex
+calccard.ps: calccard.dvi
+       dvips -t letter -t landscape -o $@ calccard.dvi
+
+cs_dired_ref_deps = cs-dired-ref.tex emacsver.tex pdflayout.sty
+cs-dired-ref.pdf: $(cs_dired_ref_deps)
+       input=cs-dired-ref.tex; $(make_cs)
+cs-dired-ref.dvi: $(cs_dired_ref_deps)
+       $(ENVADD) csplain cs-dired-ref.tex
+cs-dired-ref.ps: cs-dired-ref.dvi
+       dvips -t a4 -o $@ cs-dired-ref.dvi
+
+cs_refcard_deps = cs-refcard.tex emacsver.tex pdflayout.sty
+cs-refcard.pdf: $(cs_refcard_deps)
+       input=cs-refcard.tex; $(make_cs)
+cs-refcard.dvi: $(cs_refcard_deps)
+       $(ENVADD) csplain cs-refcard.tex
+cs-refcard.ps: cs-refcard.dvi
+       dvips -t a4 -o $@ cs-refcard.dvi
+
+cs_survival_deps = cs-survival.tex emacsver.tex pdflayout.sty
+cs-survival.pdf: $(cs_survival_deps)
+       input=cs-survival.tex; $(make_cs)
+cs-survival.dvi: $(cs_survival_deps)
+       $(ENVADD) csplain cs-survival.tex
+cs-survival.ps: cs-survival.dvi
+       dvips -t a4 -o $@ cs-survival.dvi
+
+de_refcard_deps = de-refcard.tex emacsver.tex pdflayout.sty
+de-refcard.pdf: $(de_refcard_deps)
+       $(ENVADD) pdftex de-refcard.tex
+de-refcard.dvi: $(de_refcard_deps)
+       $(ENVADD) tex de-refcard.tex
+de-refcard.ps: de-refcard.dvi
+       dvips -t a4 -t landscape -o $@ de-refcard.dvi
+
+dired_ref_deps = dired-ref.tex emacsver.tex pdflayout.sty
+dired-ref.pdf: $(dired_ref_deps)
+       $(ENVADD) pdftex dired-ref.tex
+dired-ref.dvi: $(dired_ref_deps)
+       $(ENVADD) tex dired-ref.tex
+
+fr_dired_ref_deps = fr-dired-ref.tex emacsver.tex pdflayout.sty
+fr-dired-ref.pdf: $(fr_dired_ref_deps)
+       $(ENVADD) pdftex fr-dired-ref.tex
+fr-dired-ref.dvi: $(fr_dired_ref_deps)
+       $(ENVADD) tex fr-dired-ref.tex
+fr-dired-ref.ps: fr-dired-ref.dvi
+       dvips -t a4 -o $@ fr-dired-ref.dvi
+
+fr_refcard_deps = fr-refcard.tex emacsver.tex pdflayout.sty
+fr-refcard.pdf: $(fr_refcard_deps)
+       $(ENVADD) pdftex fr-refcard.tex
+fr-refcard.dvi: $(fr_refcard_deps)
+       $(ENVADD) tex fr-refcard.tex
+fr-refcard.ps: fr-refcard.dvi
+       dvips -t a4 -t landscape -o $@ fr-refcard.dvi
+
+fr_survival_deps = fr-survival.tex emacsver.tex pdflayout.sty
+fr-survival.pdf: $(fr_survival_deps)
+       $(ENVADD) pdftex fr-survival.tex
+fr-survival.dvi: $(fr_survival_deps)
+       $(ENVADD) tex fr-survival.tex
+fr-survival.ps: fr-survival.dvi
+       dvips -t a4 -o $@ fr-survival.dvi
+
+## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD.
+gnus_booklet_deps = gnus-refcard.tex gnus-logo.pdf
+gnus-booklet.pdf: $(gnus_booklet_deps)
+       pdflatex -jobname=gnus-booklet '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
+gnus-booklet.dvi: gnus-refcard.tex gnus-logo.eps
+       latex '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}'
+       mv gnus-refcard.dvi $@
 
-## letter, portrait.
-dired-ref.ps gnus-booklet.ps gnus-refcard.ps survival.ps vipcard.ps \
-viperCard.ps: %.ps: %.dvi
-       dvips -t letter $< -o $@
+###gnus-logo.pdf: gnus-logo.eps
+###    ps2pdf gnus-logo.eps
+
+## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD.
+gnus_refcard_deps = gnus-refcard.tex gnus-logo.pdf
+gnus-refcard.pdf: $(gnus_refcard_deps)
+       pdflatex gnus-refcard.tex
+gnus-refcard.dvi: $(gnus_refcard_deps)
+       latex gnus-refcard.tex
+
+orgcard_deps = orgcard.tex emacsver.tex pdflayout.sty
+orgcard.pdf: $(orgcard_deps)
+       $(ENVADD) pdftex orgcard.tex
+orgcard.dvi: $(orgcard_deps)
+       $(ENVADD) tex orgcard.tex
+orgcard.ps: orgcard.dvi
+       dvips -t a4 -t landscape -o $@ orgcard.dvi
+
+pl_refcard_deps = pl-refcard.tex emacsver.tex pdflayout.sty
+## Some versions of pdfmex seem to create dvi by default, hence output-format.
+pl-refcard.pdf: $(pl_refcard_deps)
+       if ! kpsewhich -format=fmt mex > /dev/null && \
+         ! pdfmex --version > /dev/null 2> /dev/null; then \
+         echo "No mex format found."; false; \
+       fi
+       $(ENVADD) pdftex -output-format=pdf pl-refcard.tex
+pl-refcard.dvi: $(pl_refcard_deps)
+       if ! kpsewhich -format=fmt mex > /dev/null; then \
+         echo "No mex format found."; false; \
+       fi
+       $(ENVADD) tex pl-refcard.tex
+pl-refcard.ps: pl-refcard.dvi
+       dvips -t a4 -o $@ pl-refcard.dvi
+
+pt_br_refcard_deps = pt-br-refcard.tex emacsver.tex pdflayout.sty
+pt-br-refcard.pdf: $(pt_br_refcard_deps)
+       $(ENVADD) pdftex pt-br-refcard.tex
+pt-br-refcard.dvi: $(pt_br_refcard_deps)
+       $(ENVADD) tex pt-br-refcard.tex
+pt-br-refcard.ps: pt-br-refcard.dvi
+       dvips -t a4 -t landscape -o $@ pt-br-refcard.dvi
+
+refcard_deps = refcard.tex emacsver.tex pdflayout.sty
+refcard.pdf: $(refcard_deps)
+       $(ENVADD) pdftex refcard.tex
+refcard.dvi: $(refcard_deps)
+       $(ENVADD) tex refcard.tex
+refcard.ps: refcard.dvi
+       dvips -t letter -t landscape -o $@ refcard.dvi
+
+## No dependency on emacsver.tex, pdflayout.sty; no need for ENVADD.
+ru_refcard_deps = ru-refcard.tex
+ru-refcard.pdf: $(ru_refcard_deps)
+       pdflatex ru-refcard.tex
+ru-refcard.dvi: $(ru_refcard_deps)
+       latex ru-refcard.tex
+ru-refcard.ps: ru-refcard.dvi
+       dvips -t a4 -o $@ ru-refcard.dvi
+
+sk_dired_ref_deps = sk-dired-ref.tex emacsver.tex pdflayout.sty
+sk-dired-ref.pdf: $(sk_dired_ref_deps)
+       input=sk-dired-ref.tex; $(make_cs)
+sk-dired-ref.dvi: $(sk_dired_ref_deps)
+       $(ENVADD) csplain sk-dired-ref.tex
+sk-dired-ref.ps: sk-dired-ref.dvi
+       dvips -t a4 -o $@ sk-dired-ref.dvi
+
+sk_refcard_deps = sk-refcard.tex emacsver.tex pdflayout.sty
+sk-refcard.pdf: $(sk_refcard_deps)
+       input=sk-refcard.tex; $(make_cs)
+sk-refcard.dvi: $(sk_refcard_deps)
+       $(ENVADD) csplain sk-refcard.tex
+sk-refcard.ps: sk-refcard.dvi
+       dvips -t a4 -o $@ sk-refcard.dvi
+
+sk_survival_deps = sk-survival.tex emacsver.tex pdflayout.sty
+sk-survival.pdf: $(sk_survival_deps)
+       input=sk-survival.tex; $(make_cs)
+sk-survival.dvi: $(sk_survival_deps)
+       $(ENVADD) csplain sk-survival.tex
+sk-survival.ps: sk-survival.dvi
+       dvips -t a4 -o $@ sk-survival.dvi
+
+survival_deps = survival.tex emacsver.tex pdflayout.sty
+survival.pdf: $(survival_deps)
+       $(ENVADD) pdftex survival.tex
+survival.dvi: $(survival_deps)
+       $(ENVADD) tex survival.tex
+
+vipcard_deps = vipcard.tex emacsver.tex pdflayout.sty
+vipcard.pdf: $(vipcard_deps)
+       $(ENVADD) pdftex vipcard.tex
+vipcard.dvi: $(vipcard_deps)
+       $(ENVADD) tex vipcard.tex
+
+vipercard_deps = viperCard.tex emacsver.tex pdflayout.sty
+viperCard.pdf: $(vipercard_deps)
+       $(ENVADD) pdftex viperCard.tex
+viperCard.dvi: $(vipercard_deps)
+       $(ENVADD) tex viperCard.tex
 
 
 .PHONY: clean
@@ -142,4 +339,19 @@ viperCard.ps: %.ps: %.dvi
 clean:
        -rm -f *.dvi *.log *.aux
 
+distclean: clean
+
+## This should really by maintainer-clean, but the handling of the
+## refcards is funny.  So abuse extraclean for this.
+extraclean: clean
+       -rm -f $(PDF_TARGETS) $(PS_TARGETS)
+
+## For the Emacs website.
+dist:
+       rm -rf emacs-refcards
+       mkdir emacs-refcards
+       cp Makefile README *.tex gnus-logo.* pdflayout.sty emacs-refcards/
+       tar -cf emacs-refcards.tar emacs-refcards
+       rm -rf emacs-refcards
+
 ### Makefile ends here
index 273f7ca317c976eff0a5b39d2b682302ffc7a91f..7a8c7c76bf41c45b24ca499d2b68d11ec6f9cdfc 100644 (file)
@@ -1,5 +1,11 @@
+Copyright (C) 2013 Free Software Foundation, Inc.
+See the end of the file for license conditions.
+
+
+REFERENCE CARDS FOR GNU EMACS
+
 To generate these refcards, you need to install the TeX document
-production system.  For example, http://www.tug.org/texlive/ .
+production system.  For example, <http://www.tug.org/texlive/>.
 
 All modern GNU/Linux distributions provide TeX packages, so the
 easiest way is just to install those.  Your distribution may have
@@ -7,7 +13,18 @@ split some of the files needed to process non-English output into
 separate, optional packages such as: texlive-lang-cyrillic,
 texlive-lang-czechslovak, texlive-lang-german, and texlive-lang-polish.
 
+Type `make all' (or `make pdf') to generate PDF versions of all the cards.
+For PostScript format, use `make ps'.
+To only generate the cards for a specific language, use e.g.
+`make french' or `make french-ps'.  As mentioned above, you may need
+to install extra TeX packages for some languages.
+
+PDF and PS copies of these cards are also available at
+<http://www.gnu.org/software/emacs/refcards>.  The FSF online
+store <http://shop.fsf.org/> sometimes has printed copies for sale.
+
 
+\f
 COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
 
 The file gnus-logo.eps contains copyright and license information, but
@@ -17,3 +34,20 @@ File: gnus-logo.eps, gnus-logo.pdf
   Author: Luis Fernandes <elf@ee.ryerson.ca>
   Copyright (C) 2001-2013 Free Software Foundation, Inc.
   License: GNU General Public License version 3 or later (see COPYING)
+
+
+\f
+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 <http://www.gnu.org/licenses/>.
diff --git a/etc/refcards/calccard.pdf b/etc/refcards/calccard.pdf
deleted file mode 100644 (file)
index 8d39aa0..0000000
Binary files a/etc/refcards/calccard.pdf and /dev/null differ
diff --git a/etc/refcards/cs-dired-ref.pdf b/etc/refcards/cs-dired-ref.pdf
deleted file mode 100644 (file)
index 0e6232a..0000000
Binary files a/etc/refcards/cs-dired-ref.pdf and /dev/null differ
diff --git a/etc/refcards/cs-refcard.pdf b/etc/refcards/cs-refcard.pdf
deleted file mode 100644 (file)
index a032a7c..0000000
Binary files a/etc/refcards/cs-refcard.pdf and /dev/null differ
diff --git a/etc/refcards/de-refcard.pdf b/etc/refcards/de-refcard.pdf
deleted file mode 100644 (file)
index 84c0f4c..0000000
Binary files a/etc/refcards/de-refcard.pdf and /dev/null differ
diff --git a/etc/refcards/dired-ref.pdf b/etc/refcards/dired-ref.pdf
deleted file mode 100644 (file)
index b80daa9..0000000
Binary files a/etc/refcards/dired-ref.pdf and /dev/null differ
diff --git a/etc/refcards/fr-dired-ref.pdf b/etc/refcards/fr-dired-ref.pdf
deleted file mode 100644 (file)
index 77b36c3..0000000
Binary files a/etc/refcards/fr-dired-ref.pdf and /dev/null differ
diff --git a/etc/refcards/fr-refcard.pdf b/etc/refcards/fr-refcard.pdf
deleted file mode 100644 (file)
index 5fdf299..0000000
Binary files a/etc/refcards/fr-refcard.pdf and /dev/null differ
diff --git a/etc/refcards/gnus-booklet.pdf b/etc/refcards/gnus-booklet.pdf
deleted file mode 100644 (file)
index 6cc54ba..0000000
Binary files a/etc/refcards/gnus-booklet.pdf and /dev/null differ
diff --git a/etc/refcards/gnus-refcard.pdf b/etc/refcards/gnus-refcard.pdf
deleted file mode 100644 (file)
index 7a1c5b3..0000000
Binary files a/etc/refcards/gnus-refcard.pdf and /dev/null differ
diff --git a/etc/refcards/orgcard.pdf b/etc/refcards/orgcard.pdf
deleted file mode 100644 (file)
index 8fc57d9..0000000
Binary files a/etc/refcards/orgcard.pdf and /dev/null differ
diff --git a/etc/refcards/pl-refcard.pdf b/etc/refcards/pl-refcard.pdf
deleted file mode 100644 (file)
index b832990..0000000
Binary files a/etc/refcards/pl-refcard.pdf and /dev/null differ
diff --git a/etc/refcards/pt-br-refcard.pdf b/etc/refcards/pt-br-refcard.pdf
deleted file mode 100644 (file)
index 200425f..0000000
Binary files a/etc/refcards/pt-br-refcard.pdf and /dev/null differ
diff --git a/etc/refcards/refcard.pdf b/etc/refcards/refcard.pdf
deleted file mode 100644 (file)
index 1d3b630..0000000
Binary files a/etc/refcards/refcard.pdf and /dev/null differ
diff --git a/etc/refcards/ru-refcard.pdf b/etc/refcards/ru-refcard.pdf
deleted file mode 100644 (file)
index f415fd5..0000000
Binary files a/etc/refcards/ru-refcard.pdf and /dev/null differ
diff --git a/etc/refcards/sk-dired-ref.pdf b/etc/refcards/sk-dired-ref.pdf
deleted file mode 100644 (file)
index f3cb4f6..0000000
Binary files a/etc/refcards/sk-dired-ref.pdf and /dev/null differ
diff --git a/etc/refcards/sk-refcard.pdf b/etc/refcards/sk-refcard.pdf
deleted file mode 100644 (file)
index d4a85a3..0000000
Binary files a/etc/refcards/sk-refcard.pdf and /dev/null differ
index 290af08f765a101976bbd3b94aae9e6031ba37bf..28431e9a08da40a792cc1d9fac075b558e4066a6 100644 (file)
@@ -1,3 +1,196 @@
+2013-08-17  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp.el:
+       * net/tramp-adb.el:
+       * net/tramp-cmds.el:
+       * net/tramp-ftp.el:
+       * net/tramp-gvfs.el:
+       * net/tramp-gw.el:
+       * net/tramp-sh.el: Don't wrap external variable declarations by
+       `eval-when-compile'.
+
+2013-08-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * net/shr.el (shr-rescale-image): Use ImageMagick even for GIFs
+       now that Emacs supports ImageMagick animations.
+
+2013-08-16  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-cmds.el (top): Don't declare `buffer-name'.
+       (tramp-append-tramp-buffers): Rewrite buffer local variables part.
+
+2013-08-16  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (mouse-autoselect-window-select): Do autoselect when
+       mouse pointer is on margin.
+
+2013-08-16  William Parsons  <wbparsons@alum.mit.edu>  (tiny change)
+
+       * net/ange-ftp.el (ange-ftp-skip-msgs): Add 500 EPSV.  (Bug#1972)
+
+2013-08-16  Glenn Morris  <rgm@gnu.org>
+
+       * net/ange-ftp.el (ange-ftp-good-msgs, ange-ftp-get-pwd):
+       Handle "Remote Directory" response of some clients.  (Bug#15058)
+
+       * emacs-lisp/bytecomp.el (byte-compile-make-variable-buffer-local):
+       Tweak warning.  (Bug#14926)
+
+       * menu-bar.el (send-mail-item-name, read-mail-item-name): Remove.
+       (menu-bar-tools-menu): Simplify news and mail items.  (Bug#15095)
+
+       * image-mode.el (image-mode-map): Add menu items to reverse,
+       increase, decrease, reset animation speed.
+       (image--set-speed, image-increase-speed, image-decrease-speed)
+       (image-reverse-speed, image-reset-speed): New functions.
+       (image-mode-map): Add bindings for speed commands.
+
+       * image.el (image-animate-get-speed, image-animate-set-speed):
+       New functions.
+       (image-animate-timeout): Respect image :speed property.
+
+2013-08-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/debug.el (debugger-setup-buffer): Put point on the
+       previous line (bug#15101).
+       (debugger-eval-expression, debugger-record-expression):
+       Use read--expression (bug#15102).
+
+2013-08-15  Michael Albinus  <michael.albinus@gmx.de>
+
+       Remove byte compiler warnings, visible when compiling with
+       `byte-compile-force-lexical-warnings' set to t.
+
+       * net/tramp.el (tramp-debug-message, tramp-message, tramp-error)
+       (tramp-error-with-buffer): Rename ARGS to ARGUMENTS and BUFFER to BUF.
+       (tramp-handle-unhandled-file-name-directory)
+       (tramp-handle-file-notify-add-watch, tramp-action-login)
+       (tramp-action-succeed, tramp-action-permission-denied)
+       (tramp-action-terminal, tramp-action-process-alive): Prefix unused
+       arguments with "_".
+
+       * net/tramp-adb.el (tramp-adb-parse-device-names)
+       (tramp-adb-handle-insert-directory, tramp-adb-handle-delete-file)
+       (tramp-adb-handle-copy-file): Prefix unused arguments with "_".
+       (tramp-adb-handle-file-truename): Remove unused arguments.
+
+       * net/tramp-cache.el (tramp-flush-directory-property)
+       (tramp-flush-connection-property, tramp-list-connections)
+       (tramp-parse-connection-properties): Prefix unused arguments with "_".
+
+       * net/tramp-compat.el (tramp-compat-make-temp-file):
+       Rename FILENAME to F.
+
+       * net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch)
+       (tramp-gvfs-handle-write-region, tramp-bluez-parse-device-names)
+       (tramp-zeroconf-parse-workstation-device-names)
+       (tramp-zeroconf-parse-webdav-device-names)
+       (tramp-synce-parse-device-names): Prefix unused arguments with "_".
+
+       * net/tramp-gw.el (tramp-gw-gw-proc-sentinel)
+       (tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_".
+
+       * net/tramp-sh.el (tramp-sh-handle-file-truename): Remove unused
+       arguments.
+       (tramp-sh-handle-copy-file, tramp-sh-handle-dired-compress-file)
+       (tramp-sh-handle-insert-file-contents-literally)
+       (tramp-sh-handle-file-notify-add-watch): Prefix unused arguments
+       with "_".
+       (tramp-do-copy-or-rename-file, tramp-barf-if-no-shell-prompt):
+       Remove unused variables.
+
+       * net/tramp-smb.el (tramp-smb-handle-copy-directory)
+       (tramp-smb-handle-copy-file, tramp-smb-handle-delete-file)
+       (tramp-smb-read-file-entry): Prefix unused arguments with "_".
+
+       * net/tramp-uu.el (tramp-uu-b64-alphabet, tramp-uu-b64-char-to-byte):
+       Make them a defconst.
+       (tramp-uuencode-region): Remove unused variable.
+
+2013-08-14  Juanma Barranquero  <lekktu@gmail.com>
+
+       * frameset.el (frameset--prop-setter): New function.
+       (frameset-prop): Add gv-setter declaration.
+       (frameset-filter-minibuffer): Deal with the case that the minibuffer
+       parameter was already set in FILTERED.  Doc fix.
+       (frameset--record-minibuffer-relationships): Allow saving a
+       minibufferless frame without its corresponding minibuffer frame.
+       (frameset--reuse-frame): Accept a match from an orphaned minibufferless
+       frame, if the frame id matches.
+       (frameset--minibufferless-last-p): Sort non-orphaned minibufferless
+       frames before orphaned ones.
+       (frameset-restore): Warn about orphaned windows, instead of error out.
+
+2013-08-14  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (window-make-atom): Don't overwrite parameter
+       already present.
+       (display-buffer-in-atom-window): Handle special case where we
+       split an already atomic window.
+       (window--major-non-side-window, display-buffer-in-side-window)
+       (window--side-check): Ignore minibuffer window when walking
+       window tree.
+       (window-deletable-p): Return 'frame only if no other frame uses
+       our minibuffer window.
+       (record-window-buffer): Run buffer-list-update-hook.
+       (split-window): Make sure window--check-frame won't destroy an
+       existing atomic window in case the new window gets nested
+       inside.
+       (display-buffer-at-bottom): Ignore minibuffer window when
+       walking window tree.  Don't split a side window.
+       (pop-to-buffer): Don't set-buffer here, the select-window call
+       should do that.
+       (mouse-autoselect-window-select): Autoselect only if we are in the
+       text portion of the window.
+
+2013-08-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * net/shr.el (shr-parse-image-data): New function to grab both the
+       data itself and the Content-Type.
+       (shr-put-image): Use it.
+
+       * net/eww.el (eww-display-image): Ditto.
+
+       * image.el (image-content-type-suffixes): New variable.
+
+2013-08-13  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * progmodes/python.el (python-imenu--build-tree)
+       (python-imenu--put-parent): Simplify and Fix (GH bug 146).
+
+2013-08-13  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * simple.el (backward-word): Mention the optional argument.
+
+2013-08-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * frameset.el (frameset--make): Rename constructor from make-frameset.
+       (frameset-p, frameset-valid-p): Don't autoload.
+       (frameset-valid-p): Use normal accessors.
+
+2013-08-13  Glenn Morris  <rgm@gnu.org>
+
+       * progmodes/compile.el (compile-command): Tweak example in doc.
+       * obsolete/scribe.el (scribe-mode):
+       * progmodes/mixal-mode.el (mixal-mode): Quote buffer name.  (Bug#15053)
+
+       * mail/feedmail.el (feedmail-confirm-outgoing)
+       (feedmail-display-full-frame, feedmail-deduce-bcc-where): Fix types.
+
+       * cus-start.el (truncate-partial-width-windows): Fix type.
+
+       * emulation/viper-init.el (viper-search-scroll-threshold): Fix type.
+
+       * net/shr.el (shr-table-horizontal-line): Fix custom type.
+
+2013-08-13  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/timer.el (timer--time-setter): New function.
+       (timer--time): Use it as gv-setter.
+
+       * emacs-lisp/gv.el (gv-define-simple-setter): Output warning when
+       setter is not a symbol.
+
 2013-08-12  Grégoire Jadi  <daimrod@gmail.com>
 
        * mail/sendmail.el (sendmail-send-it): Don't kill the error buffer
 
 2013-08-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * net/eww.el (eww-display-html): Ignore coding system errors.  One
-       web site uses "utf-8lias" as the coding system.
+       * net/eww.el (eww-display-html): Ignore coding system errors.
+       One web site uses "utf-8lias" as the coding system.
 
 2013-08-11  Juanma Barranquero  <lekktu@gmail.com>
 
        (allout-up-current-level, allout-end-of-level, allout-reindent-body)
        (allout-yank-processing, allout-process-exposed)
        (allout-latex-verb-quote, allout-latexify-one-item, outlineify-sticky)
-       (allout-latex-verbatim-quote-curr-line): Removed unused variables.
+       (allout-latex-verbatim-quote-curr-line): Remove unused variables.
        * emacs-lisp/lisp-mode.el (lisp-eval-defun, last-sexp-toggle-display)
        (lisp-indent-defform): Mark ignored arguments.
        (lisp-indent-line): Mark ignored arguments.  Remove unused variables.
index cf94b6300ddecee1f06eee7fd0b87aa581d525f6..24f8ac3bade33f563dfdd4b028f012899f4dd564 100644 (file)
@@ -457,7 +457,12 @@ since it could result in memory overflow and make Emacs crash."
             (scroll-margin windows integer)
             (hscroll-margin windows integer "22.1")
             (hscroll-step windows number "22.1")
-            (truncate-partial-width-windows display boolean "23.1")
+            (truncate-partial-width-windows
+             display
+             (choice (integer :tag "Truncate if narrower than")
+                     (const :tag "Respect `truncate-lines'" nil)
+                     (other :tag "Truncate if not full-width" t))
+             "23.1")
             (make-cursor-line-fully-visible windows boolean)
             (mode-line-in-non-selected-windows mode-line boolean "22.1")
             (line-number-display-limit display
index b6e15e1a3ff1c484b8570dfdbcd665ebb33422bf..9667b512e7a6040badcd006b1c9e740f8528dcdb 100644 (file)
@@ -390,7 +390,7 @@ If `delete', frames on other displays are deleted instead of restored."
 
 (defcustom desktop-restore-forces-onscreen t
   "If t, offscreen frames are restored onscreen instead.
-If `:all', frames that are partially offscreen are also forced onscren.
+If `:all', frames that are partially offscreen are also forced onscreen.
 NOTE: Checking of frame boundaries is only approximate and can fail
 to reliably detect frames whose onscreen/offscreen state depends on a
 few pixels, especially near the right / bottom borders of the screen."
@@ -670,7 +670,7 @@ if different)."
             ;; which already takes care of frame restoration and deletion.
             (called-interactively-p 'any))
     (let* ((this (selected-frame))
-          (mini (window-frame (minibuffer-window this)))) ; in case they difer
+          (mini (window-frame (minibuffer-window this)))) ; in case they differ
       (dolist (frame (sort (frame-list) #'frameset-minibufferless-first-p))
        (condition-case err
            (unless (or (eq frame this)
@@ -1032,7 +1032,7 @@ being set (usually, by reading it from the desktop)."
                      :force-onscreen desktop-restore-forces-onscreen)))
 
 ;; Just to silence the byte compiler.
-;; Dynamicaly bound in `desktop-read'.
+;; Dynamically bound in `desktop-read'.
 (defvar desktop-first-buffer)
 (defvar desktop-buffer-ok-count)
 (defvar desktop-buffer-fail-count)
index 5baef042757688685b1f822d1d4c56c130a9b712..c6612024fa6a4ee558dcd6cc42ba0a4a0743ca2e 100644 (file)
@@ -4274,7 +4274,7 @@ binding slots have been popped."
   (if (and (eq (car-safe (car-safe (cdr-safe form))) 'quote)
            (byte-compile-warning-enabled-p 'make-local))
       (byte-compile-warn
-       "`make-variable-buffer-local' should be called at toplevel"))
+       "`make-variable-buffer-local' not called at toplevel"))
   (byte-compile-normal-call form))
 (put 'make-variable-buffer-local
      'byte-hunk-handler 'byte-compile-form-make-variable-buffer-local)
index c47c9b610303f536c3514a363e60a218af1c5534..d9d6658811fa57948728eded156b42195068944c 100644 (file)
@@ -616,7 +616,7 @@ The result of the body appears to the compiler as a quoted constant."
   (declare (debug (form &optional sexp)))
   (if (cl--compiling-file)
       (let* ((temp (cl-gentemp "--cl-load-time--"))
-            (set `(set ',temp ,form)))
+            (set `(set,temp ,form)))
        (if (and (fboundp 'byte-compile-file-form-defmumble)
                 (boundp 'this-kind) (boundp 'that-one))
            (fset 'byte-compile-file-form
index aee48eef668c4cb638ddec6c10f277fc8faa75b4..709a094e73b98a767110e498b04d34935258933a 100644 (file)
@@ -288,33 +288,41 @@ That buffer should be current already."
   (insert "Debugger entered")
   ;; lambda is for debug-on-call when a function call is next.
   ;; debug is for debug-on-entry function called.
-  (pcase (car args)
-    ((or `lambda `debug)
-     (insert "--entering a function:\n"))
-    ;; Exiting a function.
-    (`exit
-     (insert "--returning value: ")
-     (setq debugger-value (nth 1 args))
-     (prin1 debugger-value (current-buffer))
-     (insert ?\n)
-     (delete-char 1)
-     (insert ? )
-     (beginning-of-line))
-    ;; Debugger entered for an error.
-    (`error
-     (insert "--Lisp error: ")
-     (prin1 (nth 1 args) (current-buffer))
-     (insert ?\n))
-    ;; debug-on-call, when the next thing is an eval.
-    (`t
-     (insert "--beginning evaluation of function call form:\n"))
-    ;; User calls debug directly.
-    (_
-     (insert ": ")
-     (prin1 (if (eq (car args) 'nil)
-                (cdr args) args)
-            (current-buffer))
-     (insert ?\n)))
+  (let ((pos (point)))
+    (pcase (car args)
+      ((or `lambda `debug)
+       (insert "--entering a function:\n")
+       (setq pos (1- (point))))
+      ;; Exiting a function.
+      (`exit
+       (insert "--returning value: ")
+       (setq pos (point))
+       (setq debugger-value (nth 1 args))
+       (prin1 debugger-value (current-buffer))
+       (insert ?\n)
+       (delete-char 1)
+       (insert ? )
+       (beginning-of-line))
+      ;; Debugger entered for an error.
+      (`error
+       (insert "--Lisp error: ")
+       (setq pos (point))
+       (prin1 (nth 1 args) (current-buffer))
+       (insert ?\n))
+      ;; debug-on-call, when the next thing is an eval.
+      (`t
+       (insert "--beginning evaluation of function call form:\n")
+       (setq pos (1- (point))))
+      ;; User calls debug directly.
+      (_
+       (insert ": ")
+       (setq pos (point))
+       (prin1 (if (eq (car args) 'nil)
+                  (cdr args) args)
+              (current-buffer))
+       (insert ?\n)))
+    ;; Place point on "stack frame 0" (bug#15101).
+    (goto-char pos))
   ;; After any frame that uses eval-buffer,
   ;; insert a line that states the buffer position it's reading at.
   (save-excursion
@@ -533,16 +541,15 @@ Applies to the frame whose line point is on in the backtrace."
         (progn ,@body)
       (setq debugger-outer-match-data (match-data)))))
 
-(defun debugger-eval-expression (exp)
+(defun debugger-eval-expression (exp &optional nframe)
   "Eval an expression, in an environment like that outside the debugger.
 The environment used is the one when entering the activation frame at point."
   (interactive
-   (list (read-from-minibuffer "Eval: "
-                              nil read-expression-map t
-                              'read-expression-history)))
-  (let ((nframe (condition-case nil (1+ (debugger-frame-number 'skip-base))
-                  (error 0))) ;; If on first line.
-        (base (if (eq 'debug--implement-debug-on-entry
+   (list (read--expression "Eval in stack frame: ")))
+  (let ((nframe (or nframe
+                    (condition-case nil (1+ (debugger-frame-number 'skip-base))
+                      (error 0)))) ;; If on first line.
+         (base (if (eq 'debug--implement-debug-on-entry
                       (cadr (backtrace-frame 1 'debug)))
                   'debug--implement-debug-on-entry 'debug)))
     (debugger-env-macro
@@ -651,11 +658,7 @@ Complete list of commands:
 (defun debugger-record-expression  (exp)
   "Display a variable's value and record it in `*Backtrace-record*' buffer."
   (interactive
-   (list (read-from-minibuffer
-         "Record Eval: "
-         nil
-         read-expression-map t
-         'read-expression-history)))
+   (list (read--expression "Record Eval: ")))
   (let* ((buffer (get-buffer-create debugger-record-buffer))
         (standard-output buffer))
     (princ (format "Debugger Eval (%s): " exp))
index cf090e5e758c8270daa88f7c870abf13c77c5cd7..279ae582a059f97882a4748afd956d88b248de4e 100644 (file)
@@ -217,13 +217,15 @@ instead the assignment is turned into something equivalent to
     temp)
 so as to preserve the semantics of `setf'."
   (declare (debug (sexp (&or symbolp lambda-expr) &optional sexp)))
+  (when (eq 'lambda (car-safe setter))
+    (message "Use `gv-define-setter' or name %s's setter function" name))
   `(gv-define-setter ,name (val &rest args)
      ,(if fix-return
           `(macroexp-let2 nil v val
              `(progn
-                (,',setter ,@(append args (list v)))
+                (,',setter ,@args ,v)
                 ,v))
-        `(cons ',setter (append args (list val))))))
+        ``(,',setter ,@args ,val))))
 
 ;;; Typical operations on generalized variables.
 
index 410e43b16e6a44f1665dc13ec406b779c20a65be..1ee3cec15a6e7696ed87b6594d8e772d4769718b 100644 (file)
 (defsubst timer--check (timer)
   (or (timerp timer) (signal 'wrong-type-argument (list #'timerp timer))))
 
+(defun timer--time-setter (timer time)
+  (timer--check timer)
+  (setf (timer--high-seconds timer) (pop time))
+  (let ((low time) (usecs 0) (psecs 0))
+    (when (consp time)
+      (setq low (pop time))
+      (when time
+        (setq usecs (pop time))
+        (when time
+          (setq psecs (car time)))))
+    (setf (timer--low-seconds timer) low)
+    (setf (timer--usecs timer) usecs)
+    (setf (timer--psecs timer) psecs)
+    time))
+
 ;; Pseudo field `time'.
 (defun timer--time (timer)
+  (declare (gv-setter timer--time-setter))
   (list (timer--high-seconds timer)
         (timer--low-seconds timer)
        (timer--usecs timer)
        (timer--psecs timer)))
 
-(gv-define-setter timer--time (time timer)
-  (macroexp-let2 nil val time
-    `(progn
-       (timer--check ,timer)
-       (setf (timer--high-seconds ,timer) (pop ,val))
-       (let ((low ,val) (usecs 0) (psecs 0))
-        (when (consp ,val)
-          (setq low (pop ,val))
-          (when ,val
-            (setq usecs (pop ,val))
-            (when ,val
-              (setq psecs (car ,val)))))
-        (setf (timer--low-seconds ,timer) low)
-        (setf (timer--usecs ,timer) usecs)
-        (setf (timer--psecs ,timer) psecs))
-       ,val)))
-
 (defun timer-set-time (timer time &optional delta)
   "Set the trigger time of TIMER to TIME.
 TIME must be in the internal format returned by, e.g., `current-time'.
index 76d4632f8c0c9026868f9b00be571ecdc5db3e2e..aa90344d195bbcd60708af142e57dd0f1de8fa96 100644 (file)
@@ -690,7 +690,7 @@ to a new place after repeating previous Vi command."
 the window will be scrolled up or down appropriately, to reveal context.
 If you want Viper search to behave as usual in Vi, set this variable to a
 negative number."
-  :type 'boolean
+  :type 'integer
   :group 'viper-search)
 
 (defcustom viper-re-query-replace t
index 3fcdf24f4f20cd7be10341bfac60ebda3b833cca..2c9365b2ba6017bf797ee313a67d90e682b5667a 100644 (file)
@@ -1259,6 +1259,8 @@ non-first windows in Follow mode."
 
        ;; If the region is visible, make it look good when spanning
        ;; multiple windows.
+
+       ;; FIXME: Why not use `use-region-p' here?
        (when (region-active-p)
          (follow-maximize-region
           (selected-window) windows win-start-end)))
index 31a9123503d86962a6c6b1ee6d824bbaebd6617a..79394bd305beabcf8eef219f4b3dd51138d1d38a 100644 (file)
@@ -1442,6 +1442,8 @@ monitor, use `display-monitor-attributes-list'."
 
 (declare-function x-display-backing-store "xfns.c" (&optional terminal))
 
+;; In NS port, the return value may be `buffered', `retained', or
+;; `non-retained'.  See src/nsfns.m.
 (defun display-backing-store (&optional display)
   "Return the backing store capability of DISPLAY's screen.
 The value may be `always', `when-mapped', `not-useful', or nil if
index a347599bb51fa53e8c40c4893bb8c4bdab1c8d44..53ab0a5f0816d8c0101228ad134d411d8b9d8c48 100644 (file)
@@ -42,6 +42,7 @@
 
 \f
 (cl-defstruct (frameset (:type vector) :named
+                        (:constructor frameset--make)
                        ;; Copier is defined below.
                        (:copier nil))
 
@@ -129,36 +130,39 @@ root window of the frame.\n
 IMPORTANT: Modifying this slot may cause frameset functions to fail,
 unless the type constraints defined above are respected.\n\n(fn FRAMESET)")
 
-;;;###autoload (autoload 'frameset-p "frameset"
-;;;###autoload   "Return non-nil if OBJECT is a frameset, nil otherwise." nil)
+;; We autoloaded this for use in register.el, but now that we use registerv
+;; objects, this autoload is not useful any more.
+;; ;;;###autoload (autoload 'frameset-p "frameset"
+;; ;;;###autoload   "Return non-nil if OBJECT is a frameset, nil otherwise." nil)
 
 (defun frameset-copy (frameset)
   "Return a deep copy of FRAMESET.
 FRAMESET is copied with `copy-tree'."
   (copy-tree frameset t))
 
-;;;###autoload
 (defun frameset-valid-p (object)
-  "Return non-nil if OBJECT is a valid frameset, nil otherwise.
-
-The return value is nil if OBJECT is not a frameset, or not
-a valid one, and the frameset version if it is valid."
-  (and (vectorp object)                   ; a vector
-       (>= (length object) 8)             ; of the right length (future-proof)
-       (eq (aref object 0) 'frameset)     ; tagged as `frameset'
-       (integerp (aref object 1))         ; VERSION is an int
-       (consp (aref object 2))            ; TIMESTAMP is a non-null list
-       (let ((app (aref object 3)))
+  "Return non-nil if OBJECT is a valid frameset, nil otherwise."
+  (and (frameset-p object)
+       (integerp (frameset-version object))
+       (consp (frameset-timestamp object))
+       (let ((app (frameset-app object)))
         (or (null app)                   ; APP is nil
             (symbolp app)                ; or a symbol
             (and (consp app)             ; or a list
                  (symbolp (car app)))))  ; starting with a symbol
-       (stringp (or (aref object 4) ""))  ; NAME is a string or nil
-       (stringp (or (aref object 5) ""))  ; DESCRIPTION is a string or nil
-       (listp (aref object 6))            ; PROPERTIES is a list
-       (listp (aref object 7))            ; and STATES is, too
-       (cl-every #'consp (aref object 7)) ; and an alist
-       (aref object 1)))                  ; return VERSION
+       (stringp (or (frameset-name object) ""))
+       (stringp (or (frameset-description object) ""))
+       (listp (frameset-properties object))
+       (let ((states (frameset-states object)))
+         (and (listp states)
+              (cl-every #'consp (frameset-states object))))
+       (frameset-version object)))        ; And VERSION is non-nil.
+
+(defun frameset--prop-setter (frameset property value)
+  "Setter function for `frameset-prop'.  Internal use only."
+  (setf (frameset-properties frameset)
+       (plist-put (frameset-properties frameset) property value))
+  value)
 
 ;; A setf'able accessor to the frameset's properties
 (defun frameset-prop (frameset property)
@@ -167,15 +171,9 @@ a valid one, and the frameset version if it is valid."
 Properties can be set with
 
   (setf (frameset-prop FRAMESET PROPERTY) NEW-VALUE)"
+  (declare (gv-setter frameset--prop-setter))
   (plist-get (frameset-properties frameset) property))
 
-(gv-define-setter frameset-prop (val fs prop)
-  (macroexp-let2 nil v val
-    `(progn
-       (setf (frameset-properties ,fs)
-            (plist-put (frameset-properties ,fs) ,prop ,v))
-       ,v)))
-
 \f
 ;; Filtering
 
@@ -184,7 +182,7 @@ Properties can be set with
 ;; Let's say that Emacs' frame parameters were never designed as a tool to
 ;; precisely record (or restore) a frame's state.  They grew organically,
 ;; and their uses and behaviors reflect their history.  In using them to
-;; implement framesets, the unwary implementor, or the prospective package
+;; implement framesets, the unwary implementer, or the prospective package
 ;; writer willing to use framesets in their code, might fall victim of some
 ;; unexpected... oddities.
 ;;
@@ -572,15 +570,22 @@ see `frameset-filter-alist'."
       (not (stringp (cdr current)))
       (not (string-match-p "^unspecified-[fb]g$" (cdr current)))))
 
-(defun frameset-filter-minibuffer (current _filtered _parameters saving)
-  "When saving, convert (minibuffer . #<window>) to (minibuffer . t).
+(defun frameset-filter-minibuffer (current filtered _parameters saving)
+  "Force the minibuffer parameter to have a sensible value.
+
+When saving, convert (minibuffer . #<window>) to (minibuffer . t).
+When restoring, if there are two copies, keep the one pointing to
+a live window.
 
 For the meaning of CURRENT, FILTERED, PARAMETERS and SAVING,
 see `frameset-filter-alist'."
-  (or (not saving)
-      (if (windowp (cdr current))
-         '(minibuffer . t)
-       t)))
+  (let ((value (cdr current)) mini)
+    (cond (saving
+          (if (windowp value) '(minibuffer . t) t))
+         ((setq mini (assq 'minibuffer filtered))
+          (when (windowp value) (setcdr mini value))
+          nil)
+         (t t))))
 
 (defun frameset-filter-shelve-param (current _filtered parameters saving
                                             &optional prefix)
@@ -723,16 +728,18 @@ FRAME-LIST is a list of frames.  Internal use only."
   (dolist (frame frame-list)
     (unless (frame-parameter frame 'frameset--mini)
       (frameset--set-id frame)
-      (let* ((mb-frame (window-frame (minibuffer-window frame)))
-            (id (and mb-frame (frameset-frame-id mb-frame))))
-       (if (null id)
-           (error "Minibuffer frame %S for %S is not being saved" mb-frame frame)
-         ;; For minibufferless frames, frameset--mini is a cons
-         ;; (nil . FRAME-ID), where FRAME-ID is the frameset--id
-         ;; of the frame containing its minibuffer window.
-         (set-frame-parameter frame
-                              'frameset--mini
-                              (cons nil id)))))))
+      (let ((mb-frame (window-frame (minibuffer-window frame))))
+       ;; For minibufferless frames, frameset--mini is a cons
+       ;; (nil . FRAME-ID), where FRAME-ID is the frameset--id of
+       ;; the frame containing its minibuffer window.
+       ;; FRAME-ID can be set to nil, if FRAME-LIST doesn't contain
+       ;; the minibuffer frame of a minibufferless frame; we allow
+       ;; it without trying to second-guess the user.
+       (set-frame-parameter frame
+                            'frameset--mini
+                            (cons nil
+                                  (and mb-frame
+                                       (frameset-frame-id mb-frame))))))))
 
 ;;;###autoload
 (cl-defun frameset-save (frame-list
@@ -755,7 +762,7 @@ PROPERTIES is a user-defined property list to add to the frameset."
                                     list)))
         fs)
     (frameset--record-minibuffer-relationships frames)
-    (setq fs (make-frameset
+    (setq fs (frameset--make
              :app app
              :name name
              :description description
@@ -911,10 +918,12 @@ is the parameter alist of the frame being restored.  Internal use only."
           (setq frame (frameset--find-frame-if
                        (lambda (f id mini-id)
                          (and (frameset-frame-id-equal-p f id)
-                              (frameset-frame-id-equal-p (window-frame
-                                                          (minibuffer-window f))
-                                                         mini-id)))
-                       display (cdr (assq 'frameset--id parameters)) (cdr mini))))
+                              (or (null mini-id) ; minibuffer frame not saved
+                                  (frameset-frame-id-equal-p
+                                   (window-frame (minibuffer-window f))
+                                   mini-id))))
+                       display
+                       (cdr (assq 'frameset--id parameters)) (cdr mini))))
          (t
           ;; Default to just finding a frame in the same display.
           (setq frame (frameset--find-frame-if nil display))))
@@ -1009,7 +1018,7 @@ Internal use only."
     (cond ((eq id-def1 t) t)
          ((eq id-def2 t) nil)
          ((not (eq hasmini1 hasmini2)) (eq hasmini1 t))
-         ((eq hasmini1 nil) (string< id-def1 id-def2))
+         ((eq hasmini1 nil) (or id-def1 id-def2))
          (t t))))
 
 (defun frameset-keep-original-display-p (force-display)
@@ -1100,7 +1109,7 @@ All keyword parameters default to nil."
          (condition-case-unless-debug err
              (let* ((d-mini (cdr (assq 'frameset--mini frame-cfg)))
                     (mb-id (cdr d-mini))
-                    (default (and (booleanp mb-id) mb-id))
+                    (default (and (car d-mini) mb-id))
                     (force-display (if (functionp force-display)
                                        (funcall force-display frame-cfg window-cfg)
                                      force-display))
@@ -1144,16 +1153,22 @@ All keyword parameters default to nil."
                      (setq frame-cfg (append '((tool-bar-lines . 0) (menu-bar-lines . 0))
                                              frame-cfg))))
                   (t ;; Frame depends on other frame's minibuffer window.
-                   (let* ((mb-frame (or (frameset-frame-with-id mb-id)
-                                        (error "Minibuffer frame %S not found" mb-id)))
-                          (mb-param (assq 'minibuffer frame-cfg))
-                          (mb-window (minibuffer-window mb-frame)))
-                     (unless (and (window-live-p mb-window)
-                                  (window-minibuffer-p mb-window))
-                       (error "Not a minibuffer window %s" mb-window))
-                     (if mb-param
-                         (setcdr mb-param mb-window)
-                       (push (cons 'minibuffer mb-window) frame-cfg)))))
+                   (when mb-id
+                     (let ((mb-frame (frameset-frame-with-id mb-id))
+                           (mb-window nil))
+                       (if (not mb-frame)
+                           (delay-warning 'frameset
+                                          (format "Minibuffer frame %S not found" mb-id)
+                                          :warning)
+                         (setq mb-window (minibuffer-window mb-frame))
+                         (unless (and (window-live-p mb-window)
+                                      (window-minibuffer-p mb-window))
+                           (delay-warning 'frameset
+                                          (format "Not a minibuffer window %s" mb-window)
+                                          :warning)
+                           (setq mb-window nil)))
+                       (when mb-window
+                         (push (cons 'minibuffer mb-window) frame-cfg))))))
                  ;; OK, we're ready at last to create (or reuse) a frame and
                  ;; restore the window config.
                  (setq frame (frameset--restore-frame frame-cfg window-cfg
index 4fcf078e9d6a7555e29ad90f46b835817d6de1cc..950b73666e2d1f35ff2a0adbdb1f928f4522c305 100644 (file)
@@ -1,3 +1,16 @@
+2013-08-19  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mm-util.el (mm-coding-system-priorities): Exclude iso-2022-jp-2 and
+       shift_jis from the default value set for Japanese users.
+
+2013-08-13  Glenn Morris  <rgm@gnu.org>
+
+       * gnus-icalendar.el (gnus-icalendar-org-capture-file): Fix type.
+
+       * gnus.el (gnus-valid-select-methods): Fix type.
+
+       * nnimap.el (nnimap-request-articles-find-limit): Fix type, version.
+
 2013-08-12  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * mm-decode.el (mm-display-external): Run a timer for the temp files
index 3a9e743e8ed98a0b694a2a2f1d597a6e69ae3142..a946a586033906b32305d5e4b292cb2bc0e9dec3 100644 (file)
@@ -323,7 +323,7 @@ on the IDENTITIES list."
 
 (defcustom gnus-icalendar-org-capture-file nil
   "Target Org file for storing captured calendar events."
-  :type 'file
+  :type '(choice (const nil) file)
   :group 'gnus-icalendar-org)
 
 (defcustom gnus-icalendar-org-capture-headline nil
index 409b1cc62552781e00579ad87c132f533ca74bd9..266ee0fe7cb3135ccd8f19c01d77bc41b8b5c67f 100644 (file)
@@ -1649,6 +1649,7 @@ this variable.  I think."
                                             (const post-mail))
                        (checklist :inline t :greedy t
                                   (const :format "%v " address)
+                                  (const global)
                                   (const :format "%v " prompt-address)
                                   (const :format "%v " physical-address)
                                   (const virtual)
index 209c2949ea90fcf13906836829fc91f09540dd95..9c2f0df5f5928abc7caca993d9be78b659e2afef 100644 (file)
@@ -845,17 +845,17 @@ Valid elements include:
           (not lang) nil)
          ;; In XEmacs 21.5 it may be the one like "Japanese (UTF-8)".
          ((string-match "\\`Japanese" lang)
-          ;; Japanese users prefer iso-2022-jp to euc-japan or
-          ;; shift_jis, however iso-8859-1 should be used when
-          ;; there are only ASCII text and Latin-1 characters.
-          '(iso-8859-1 iso-2022-jp iso-2022-jp-2 shift_jis utf-8))))
+          ;; Japanese users prefer iso-2022-jp to others usually used
+          ;; for `buffer-file-coding-system', however iso-8859-1 should
+          ;; be used when there are only ASCII and Latin-1 characters.
+          '(iso-8859-1 iso-2022-jp utf-8))))
   "Preferred coding systems for encoding outgoing messages.
 
 More than one suitable coding system may be found for some text.
 By default, the coding system with the highest priority is used
 to encode outgoing messages (see `sort-coding-systems').  If this
 variable is set, it overrides the default priority."
-  :version "21.2"
+  :version "24.4"
   :type '(repeat (symbol :tag "Coding system"))
   :group 'mime)
 
index 4d9320b995f5236b3b09caa7c9fe93383b0bda37..f8c2b24cc9f860d6608ba6573575d7c6fe790576 100644 (file)
@@ -130,8 +130,8 @@ textual parts.")
 
 (defcustom nnimap-request-articles-find-limit nil
   "Limit the number of articles to look for after moving an article."
-  :type 'integer
-  :version "24.3"
+  :type '(choice (const nil) integer)
+  :version "24.4"
   :group 'nnimap)
 
 (defvar nnimap-process nil)
index 30dfd045b466e7105164b8544b42774154e900cb..f9bbbcdb1abf7e4a2ad24ee449c0e065e7622cbd 100644 (file)
@@ -354,6 +354,10 @@ call."
     (define-key map "b" 'image-previous-frame)
     (define-key map "n" 'image-next-file)
     (define-key map "p" 'image-previous-file)
+    (define-key map "a+" 'image-increase-speed)
+    (define-key map "a-" 'image-decrease-speed)
+    (define-key map "a0" 'image-reset-speed)
+    (define-key map "ar" 'image-reverse-speed)
     (define-key map [remap forward-char] 'image-forward-hscroll)
     (define-key map [remap backward-char] 'image-backward-hscroll)
     (define-key map [remap right-char] 'image-forward-hscroll)
@@ -412,7 +416,23 @@ call."
             (image-toggle-animation)))
         :style toggle :selected image-animate-loop
         :active image-multi-frame
-         :help "Animate images once, or forever?"]
+        :help "Animate images once, or forever?"]
+       ["Reverse Animation" image-reverse-speed
+        :style toggle :selected (let ((image (image-get-display-property)))
+                                  (and image (<
+                                              (image-animate-get-speed image)
+                                              0)))
+        :active image-multi-frame
+        :help "Reverse direction of this image's animation?"]
+       ["Speed Up Animation" image-increase-speed
+        :active image-multi-frame
+        :help "Speed up this image's animation"]
+       ["Slow Down Animation" image-decrease-speed
+        :active image-multi-frame
+        :help "Slow down this image's animation"]
+       ["Reset Animation Speed" image-reset-speed
+        :active image-multi-frame
+        :help "Reset the speed of this image's animation"]
        ["Next Frame" image-next-frame :active image-multi-frame
         :help "Show the next frame of this image"]
        ["Previous Frame" image-previous-frame :active image-multi-frame
@@ -437,7 +457,10 @@ call."
 (defun image-mode ()
   "Major mode for image files.
 You can use \\<image-mode-map>\\[image-toggle-display]
-to toggle between display as an image and display as text."
+to toggle between display as an image and display as text.
+
+Key bindings:
+\\{image-mode-map}"
   (interactive)
   (condition-case err
       (progn
@@ -703,6 +726,48 @@ Otherwise it plays once, then stops."
            (image-animate image index
                           (if image-animate-loop t)))))))))
 
+(defun image--set-speed (speed &optional multiply)
+  "Set speed of an animated image to SPEED.
+If MULTIPLY is non-nil, treat SPEED as a multiplication factor.
+If SPEED is `reset', reset the magnitude of the speed to 1."
+  (let ((image (image-get-display-property)))
+    (cond
+     ((null image)
+      (error "No image is present"))
+     ((null image-multi-frame)
+      (message "No image animation."))
+     (t
+      (if (eq speed 'reset)
+         (setq speed (if (< (image-animate-get-speed image) 0)
+                         -1 1)
+               multiply nil))
+      (image-animate-set-speed image speed multiply)
+      ;; FIXME Hack to refresh an active image.
+      (when (image-animate-timer image)
+       (image-toggle-animation)
+       (image-toggle-animation))
+      (message "Image speed is now %s" (image-animate-get-speed image))))))
+
+(defun image-increase-speed ()
+  "Increase the speed of current animated image by a factor of 2."
+  (interactive)
+  (image--set-speed 2 t))
+
+(defun image-decrease-speed ()
+  "Decrease the speed of current animated image by a factor of 2."
+  (interactive)
+  (image--set-speed 0.5 t))
+
+(defun image-reverse-speed ()
+  "Reverse the animation of the current image."
+  (interactive)
+  (image--set-speed -1 t))
+
+(defun image-reset-speed ()
+  "Reset the animation speed of the current image."
+  (interactive)
+  (image--set-speed 'reset))
+
 (defun image-goto-frame (n &optional relative)
   "Show frame N of a multi-frame image.
 Optional argument OFFSET non-nil means interpret N as relative to the
index 804dc3af5eaa824c7542537f72cb7598ddfcd9ac..6c15a7d0b96836d42421351727e4519d3085a7e6 100644 (file)
@@ -99,6 +99,14 @@ AUTODETECT can be
  - maybe  auto-detect only if the image type is available
            (see `image-type-available-p').")
 
+(defvar image-format-suffixes
+  '((image/x-icon "ico"))
+  "Alist of MIME Content-Type headers to file name suffixes.
+This is used as a hint by the ImageMagick library when detecting
+image types.  If `create-image' is called with a :format
+matching found in this alist, the ImageMagick library will be
+told that the data would have this suffix if saved to a file.")
+
 (defcustom image-load-path
   (list (file-name-as-directory (expand-file-name "images" data-directory))
         'data-directory 'load-path)
@@ -679,6 +687,19 @@ do not check N is within the range of frames present in the image."
   (plist-put (cdr image) :index n)
   (force-window-update))
 
+(defun image-animate-get-speed (image)
+  "Return the speed factor for animating IMAGE."
+  (or (plist-get (cdr image) :speed) 1))
+
+(defun image-animate-set-speed (image value &optional multiply)
+  "Set the speed factor for animating IMAGE to VALUE.
+With optional argument MULTIPLY non-nil, treat VALUE as a
+multiplication factor for the current value."
+  (plist-put (cdr image) :speed
+            (if multiply
+                (* value (image-animate-get-speed image))
+              value)))
+
 ;; FIXME? The delay may not be the same for different sub-images,
 ;; hence we need to call image-multi-frame-p to return it.
 ;; But it also returns count, so why do we bother passing that as an
@@ -692,21 +713,28 @@ TIME-ELAPSED is the total time that has elapsed since
 LIMIT determines when to stop.  If t, loop forever.  If nil, stop
  after displaying the last animation frame.  Otherwise, stop
  after LIMIT seconds have elapsed.
-The minimum delay between successive frames is `image-minimum-frame-delay'."
+The minimum delay between successive frames is `image-minimum-frame-delay'.
+
+If the image has a non-nil :speed property, it acts as a multiplier
+for the animation speed.  A negative value means to animate in reverse."
   (image-show-frame image n t)
-  (setq n (1+ n))
-  (let* ((time (float-time))
+  (let* ((speed (image-animate-get-speed image))
+        (time (float-time))
         (animation (image-multi-frame-p image))
         ;; Subtract off the time we took to load the image from the
         ;; stated delay time.
-        (delay (max (+ (or (cdr animation) image-default-frame-delay)
+        (delay (max (+ (* (or (cdr animation) image-default-frame-delay)
+                          (/ 1 (abs speed)))
                        time (- (float-time)))
                     image-minimum-frame-delay))
         done)
-    (if (>= n count)
-       (if limit
-           (setq n 0)
-         (setq done t)))
+    (setq n (if (< speed 0)
+               (1- n)
+             (1+ n)))
+    (if limit
+       (cond ((>= n count) (setq n 0))
+             ((< n 0) (setq n (1- count))))
+      (and (or (>= n count) (< n 0)) (setq done t)))
     (setq time-elapsed (+ delay time-elapsed))
     (if (numberp limit)
        (setq done (>= time-elapsed limit)))
index 091b1a03025de6dc7ef4456c599be0b48bab1b7b..7f27599edf2242e91286e2b942a94ca550cf0dd8 100644 (file)
@@ -407,8 +407,10 @@ sending immediately.  For any other non-nil value, prompt in both
 cases.  You can give a timeout for the prompt; see variable
 `feedmail-confirm-outgoing-timeout'."
   :group 'feedmail-misc
-  :type 'boolean
-  )
+  :type '(choice (const nil)
+                (const queued)
+                (const immediate)
+                (other t)))
 
 
 (defcustom feedmail-display-full-frame 'queued
@@ -425,8 +427,10 @@ it can still be interesting to see a lot about them as they are
 shuttled robotically onward."
   :version "24.1"
   :group 'feedmail-misc
-  :type 'boolean
-  )
+  :type '(choice (const nil)
+                (const queued)
+                (const immediate)
+                (other t)))
 
 
 (defcustom feedmail-confirm-outgoing-timeout nil
@@ -483,8 +487,9 @@ and serially, so slow SMTP conversations can add up to a delay.  There
 is an option for either 'first or 'last because you might have a
 delivery agent that processes the addresses backwards."
   :group 'feedmail-headers
-  :type 'boolean
-  )
+  :type '(choice (const nil)
+                (const first)
+                (const last)))
 
 
 (defcustom feedmail-fill-to-cc t
index be459fe38d5d0ea4ecf374e7689dd58ba869f070..34cfc68295e0bd9c52e2bc48999aa4333acf8827 100644 (file)
@@ -1307,26 +1307,6 @@ mail status in mode line"))
 \f
 ;; The "Tools" menu items
 
-(defun send-mail-item-name ()
-  (let* ((known-send-mail-commands '((sendmail-user-agent . "sendmail")
-                                    (mh-e-user-agent . "MH")
-                                    (message-user-agent . "Gnus Message")
-                                    (gnus-user-agent . "Gnus")))
-        (name (assq mail-user-agent known-send-mail-commands)))
-    (if name
-       (setq name (cdr name))
-      (setq name (symbol-name mail-user-agent))
-      (if (string-match "\\(.+\\)-user-agent" name)
-         (setq name (match-string 1 name))))
-    name))
-
-(defun read-mail-item-name ()
-  (let* ((known-rmail-commands '((rmail . "RMAIL")
-                                (mh-rmail . "MH")
-                                (gnus . "Gnus")))
-        (known (assq read-mail-command known-rmail-commands)))
-    (if known (cdr known) (symbol-name read-mail-command))))
-
 (defvar menu-bar-games-menu
   (let ((menu (make-sparse-keymap "Games")))
 
@@ -1473,18 +1453,17 @@ mail status in mode line"))
     (bindings--define-key menu [directory-search]
       '(menu-item "Directory Search" eudc-tools-menu))
     (bindings--define-key menu [compose-mail]
-      '(menu-item (format "Send Mail (with %s)" (send-mail-item-name)) compose-mail
+      '(menu-item "Compose New Mail" compose-mail
                   :visible (and mail-user-agent (not (eq mail-user-agent 'ignore)))
-                  :help "Send a mail message"))
+                  :help "Start writing a new mail message"))
     (bindings--define-key menu [rmail]
-      '(menu-item (format "Read Mail (with %s)" (read-mail-item-name))
-                  menu-bar-read-mail
+      '(menu-item "Read Mail" menu-bar-read-mail
                   :visible (and read-mail-command
                                 (not (eq read-mail-command 'ignore)))
-                  :help "Read your mail and reply to it"))
+                  :help "Read your mail"))
 
     (bindings--define-key menu [gnus]
-      '(menu-item "Read Net News (Gnus)" gnus
+      '(menu-item "Read Net News" gnus
                   :help "Read network news groups"))
 
     (bindings--define-key menu [separator-vc]
index c3adb7208e9c8e5b0138b4b885b7ff57cdfb4254..177fdaca15044767441169734f69db83252be7a1 100644 (file)
@@ -1,7 +1,6 @@
 ;;; ange-ftp.el --- transparent FTP support for GNU Emacs
 
-;; Copyright (C) 1989-1996, 1998, 2000-2013 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1989-1996, 1998, 2000-2013 Free Software Foundation, Inc.
 
 ;; Author: Andy Norman (ange@hplb.hpl.hp.com)
 ;; Maintainer: FSF
@@ -700,7 +699,7 @@ parenthesized expressions in REGEXP for the components (in that order)."
   "Regular expression matching the start of a multiline FTP reply.")
 
 (defvar ange-ftp-good-msgs
-  "^220 \\|^230 \\|^226 \\|^25. \\|^221 \\|^200 \\|^[Hh]ash mark"
+  "^220 \\|^230 \\|^226 \\|^25. \\|^221 \\|^200 \\|^[Hh]ash mark\\|^Remote directory:"
   "Regular expression matching FTP \"success\" messages.")
 
 ;; CMS and the odd VMS machine say 200 Port rather than 200 PORT.
@@ -724,9 +723,10 @@ parenthesized expressions in REGEXP for the components (in that order)."
           "^504 Unknown security mechanism\\|"
          "^530 Please login with USER and PASS\\|" ; non kerberized vsFTPd
          "^534 Kerberos Authentication not enabled\\|"
-         "^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT")
+         "^22[789] .*[Pp]assive\\|^200 EPRT\\|^500 .*EPRT\\|^500 .*EPSV")
   "Regular expression matching FTP messages that can be ignored."
   :group 'ange-ftp
+  :version "24.4"                      ; add EPSV
   :type 'regexp)
 
 (defcustom ange-ftp-fatal-msgs
@@ -3021,6 +3021,9 @@ and LINE is the relevant success or fail line from the FTP-client."
     (if (car result)
        (save-match-data
          (and (or (string-match "\"\\([^\"]*\\)\"" line)
+                  ;; Some clients cache the value and return it in
+                  ;; this way without asking the server.  (Bug#15058)
+                  (string-match "^Remote directory: \\(.*\\)" line)
                   (string-match " \\([^ ]+\\) " line)) ; stone-age VMS servers!
               (setq dir (match-string 1 line)))))
     (cons dir line)))
index a689ff2ae9f945e90874600262f532dee8b8a137..34934a03549248bd7b8d02ae1ac4cb4a404ce1ad 100644 (file)
@@ -304,7 +304,7 @@ word(s) will be searched for via `eww-search-prefix'."
     (goto-char (point-min))))
 
 (defun eww-display-image ()
-  (let ((data (buffer-substring (point) (point-max))))
+  (let ((data (shr-parse-image-data)))
     (eww-setup-buffer)
     (let ((inhibit-read-only t))
       (shr-put-image data nil))
index 7eda2554e06fe9ba9041a1492c36a7ca05aa58fb..9cac618b159d42bb4edd2964344b57d51156debe 100644 (file)
@@ -59,7 +59,7 @@ fit these criteria."
   "Character used to draw horizontal table lines.
 If nil, don't draw horizontal table lines."
   :group 'shr
-  :type 'character)
+  :type '(choice (const nil) character))
 
 (defcustom shr-table-vertical-line ?\s
   "Character used to draw vertical table lines."
@@ -705,7 +705,7 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
       (url-store-in-cache image-buffer)
       (when (or (search-forward "\n\n" nil t)
                (search-forward "\r\n\r\n" nil t))
-       (let ((data (buffer-substring (point) (point-max))))
+       (let ((data (shr-parse-image-data)))
          (with-current-buffer buffer
            (save-excursion
              (let ((alt (buffer-substring start end))
@@ -732,20 +732,28 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
        (setq payload (base64-decode-string payload)))
       payload)))
 
-(defun shr-put-image (data alt &optional flags)
-  "Put image DATA with a string ALT.  Return image."
+(defun shr-put-image (spec alt &optional flags)
+  "Insert image SPEC with a string ALT.  Return image.
+SPEC is either an image data blob, or a list where the first
+element is the data blob and the second element is the content-type."
   (if (display-graphic-p)
       (let* ((size (cdr (assq 'size flags)))
+            (data (if (consp spec)
+                      (car spec)
+                    spec))
+            (content-type (and (consp spec)
+                               (cadr spec)))
             (start (point))
             (image (cond
                     ((eq size 'original)
-                     (create-image data nil t :ascent 100))
+                     (create-image data nil t :ascent 100
+                                   :format content-type))
                     ((eq size 'full)
                      (ignore-errors
-                       (shr-rescale-image data t)))
+                       (shr-rescale-image data t content-type)))
                     (t
                      (ignore-errors
-                       (shr-rescale-image data))))))
+                       (shr-rescale-image data nil content-type))))))
         (when image
          ;; When inserting big-ish pictures, put them at the
          ;; beginning of the line.
@@ -767,11 +775,10 @@ If EXTERNAL, browse the URL using `shr-external-browser'."
        image)
     (insert alt)))
 
-(defun shr-rescale-image (data &optional force)
+(defun shr-rescale-image (data &optional force content-type)
   "Rescale DATA, if too big, to fit the current buffer.
 If FORCE, rescale the image anyway."
   (if (or (not (fboundp 'imagemagick-types))
-         (eq (image-type-from-data data) 'gif)
          (not (get-buffer-window (current-buffer))))
       (create-image data nil t :ascent 100)
     (let ((edges (window-inside-pixel-edges
@@ -782,7 +789,8 @@ If FORCE, rescale the image anyway."
        :max-width (truncate (* shr-max-image-proportion
                               (- (nth 2 edges) (nth 0 edges))))
        :max-height (truncate (* shr-max-image-proportion
-                               (- (nth 3 edges) (nth 1 edges))))))))
+                               (- (nth 3 edges) (nth 1 edges))))
+       :format content-type))))
 
 ;; url-cache-extract autoloads url-cache.
 (declare-function url-cache-create-filename "url-cache" (url))
@@ -799,7 +807,17 @@ Return a string with image data."
            t)
       (when (or (search-forward "\n\n" nil t)
                (search-forward "\r\n\r\n" nil t))
-       (buffer-substring (point) (point-max))))))
+       (shr-parse-image-data)))))
+
+(defun shr-parse-image-data ()
+  (list
+   (buffer-substring (point) (point-max))
+   (save-excursion
+     (save-restriction
+       (narrow-to-region (point-min) (point))
+       (let ((content-type (mail-fetch-field "content-type")))
+        (and content-type
+             (intern content-type obarray)))))))
 
 (defun shr-image-displayer (content-function)
   "Return a function to display an image.
index 33e9e5aa44b651939cb796ca36153be85042e45a..8ddbe25438097f15a17728a419f65bc819d0c064 100644 (file)
@@ -36,6 +36,8 @@
 (require 'tramp)
 (require 'time-date)
 
+;; Pacify byte-compiler.
+(defvar directory-sep-char)
 (defvar dired-move-to-filename-regexp)
 
 (defcustom tramp-adb-program "adb"
@@ -174,7 +176,7 @@ pass to the OPERATION."
       (tramp-run-real-handler operation args))))
 
 ;;;###tramp-autoload
-(defun tramp-adb-parse-device-names (ignore)
+(defun tramp-adb-parse-device-names (_ignore)
   "Return a list of (nil host) tuples allowed to access."
   (with-timeout (10)
     (with-temp-buffer
@@ -224,7 +226,7 @@ pass to the OPERATION."
 
 ;; This is derived from `tramp-sh-handle-file-truename'.  Maybe the
 ;; code could be shared?
-(defun tramp-adb-handle-file-truename (filename &optional counter prev-dirs)
+(defun tramp-adb-handle-file-truename (filename)
   "Like `file-truename' for Tramp files."
   (with-parsed-tramp-file-name (expand-file-name filename) nil
     (with-tramp-file-property v localname "file-truename"
@@ -416,7 +418,7 @@ Convert (\"-al\") to (\"-a\" \"-l\").  Remove arguments like \"--dired\"."
                         switches))))))
 
 (defun tramp-adb-handle-insert-directory
-  (filename switches &optional wildcard full-directory-p)
+  (filename switches &optional _wildcard _full-directory-p)
   "Like `insert-directory' for Tramp files."
   (when (stringp switches)
     (setq switches (tramp-adb--gnu-switches-to-ash (split-string switches))))
@@ -518,7 +520,7 @@ Emacs dired can't find files."
               (tramp-shell-quote-argument localname))
      "Couldn't delete %s" directory)))
 
-(defun tramp-adb-handle-delete-file (filename &optional trash)
+(defun tramp-adb-handle-delete-file (filename &optional _trash)
   "Like `delete-file' for Tramp files."
   (setq filename (expand-file-name filename))
   (with-parsed-tramp-file-name filename nil
@@ -651,7 +653,7 @@ But handle the case, if the \"test\" command is not available."
 
 (defun tramp-adb-handle-copy-file
   (filename newname &optional ok-if-already-exists keep-date
-           preserve-uid-gid preserve-extended-attributes)
+           _preserve-uid-gid _preserve-extended-attributes)
   "Like `copy-file' for Tramp files.
 PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
   (setq filename (expand-file-name filename)
index f7f570590c80c5b7fbd68d508703ea2e1f38c751..118be5974339e375c4655652d6680856fa553d08 100644 (file)
@@ -187,7 +187,7 @@ Remove also properties of all files in subdirectories."
                    'directory-file-name (list directory))))
     (tramp-message key 8 "%s" directory)
     (maphash
-     (lambda (key value)
+     (lambda (key _value)
        (when (and (stringp (tramp-file-name-localname key))
                  (string-match directory (tramp-file-name-localname key)))
         (remhash key tramp-cache-data)))
@@ -273,7 +273,7 @@ KEY identifies the connection, it is either a process or a vector."
    (let ((hash (gethash key tramp-cache-data))
         properties)
      (when (hash-table-p hash)
-       (maphash (lambda (x y) (add-to-list 'properties x 'append)) hash))
+       (maphash (lambda (x _y) (add-to-list 'properties x 'append)) hash))
      properties))
   (setq tramp-cache-data-changed t)
   (remhash key tramp-cache-data))
@@ -304,7 +304,7 @@ KEY identifies the connection, it is either a process or a vector."
   "Return a list of all known connection vectors according to `tramp-cache'."
     (let (result)
       (maphash
-       (lambda (key value)
+       (lambda (key _value)
         (when (and (vectorp key) (null (aref key 3)))
           (add-to-list 'result key)))
        tramp-cache-data)
@@ -368,7 +368,7 @@ This function is added always in `tramp-get-completion-function'
 for all methods.  Resulting data are derived from connection history."
   (let (res)
     (maphash
-     (lambda (key value)
+     (lambda (key _value)
        (if (and (vectorp key)
                (string-equal method (tramp-file-name-method key))
                (not (tramp-file-name-localname key)))
index 462f0d88367c2702d7df639aaba9527fb37daeee..937db34a3460e89128e69ef11a109790e638c1b7 100644 (file)
 
 (require 'tramp)
 
+;; Pacify byte-compiler.
+(defvar reporter-eval-buffer)
+(defvar reporter-prompt-for-summary-p)
+
 (defun tramp-list-tramp-buffers ()
   "Return a list of all Tramp connection buffers."
   (append
@@ -266,6 +270,7 @@ buffer in your bug report.
   (goto-char (point-max))
 
   ;; Dump buffer local variables.
+  (insert "\nlocal variables:\n================")
   (dolist (buffer
           (delq nil
                 (mapcar
@@ -273,21 +278,23 @@ buffer in your bug report.
                     (when (string-match "\\*tramp/" (buffer-name b)) b))
                  (buffer-list))))
     (let ((reporter-eval-buffer buffer)
-         (buffer-name (buffer-name buffer))
          (elbuf (get-buffer-create " *tmp-reporter-buffer*")))
       (with-current-buffer elbuf
        (emacs-lisp-mode)
        (erase-buffer)
-       (insert "\n(setq\n")
+       (insert (format "\n;; %s\n(setq-local\n" (buffer-name buffer)))
        (lisp-indent-line)
-       (tramp-compat-funcall
-        'reporter-dump-variable 'buffer-name (current-buffer))
-       (dolist (varsym-or-cons-cell (buffer-local-variables buffer))
-         (let ((varsym (or (car-safe varsym-or-cons-cell)
-                           varsym-or-cons-cell)))
-           (when (string-match "tramp" (symbol-name varsym))
-             (tramp-compat-funcall
-              'reporter-dump-variable varsym (current-buffer)))))
+       (dolist
+           (varsym
+            (sort
+             (append
+              (mapcar
+               'intern
+               (all-completions "tramp-" (buffer-local-variables buffer)))
+              ;; Non-tramp variables of interest.
+              '(default-directory))
+             'string<))
+           (tramp-compat-funcall 'reporter-dump-variable varsym elbuf))
        (lisp-indent-line)
        (insert ")\n"))
       (insert-buffer-substring elbuf)))
index 2b0ea74c49203c99bb6b4113eb11e6ec668d6d3c..71703fe6ab1184dfa93f54d739ea7280e148d76e 100644 (file)
@@ -29,9 +29,8 @@
 
 ;;; Code:
 
+;; Pacify byte-compiler.
 (eval-when-compile
-
-  ;; Pacify byte-compiler.
   (require 'cl))
 
 (eval-and-compile
@@ -238,14 +237,14 @@ this is the function `temp-directory'."
 ;; `make-temp-file' exists in Emacs only.  On XEmacs, we use our own
 ;; implementation with `make-temp-name', creating the temporary file
 ;; immediately in order to avoid a security hole.
-(defsubst tramp-compat-make-temp-file (filename &optional dir-flag)
+(defsubst tramp-compat-make-temp-file (f &optional dir-flag)
   "Create a temporary file (compat function).
-Add the extension of FILENAME, if existing."
+Add the extension of F, if existing."
   (let* (file-name-handler-alist
         (prefix (expand-file-name
                  (symbol-value 'tramp-temp-name-prefix)
                  (tramp-compat-temporary-file-directory)))
-        (extension (file-name-extension filename t))
+        (extension (file-name-extension f t))
         result)
     (condition-case nil
        (setq result
index 7d266d4d172e25e0850ec3a241f4a9421ee9d44e..9e1be06a2b1c4d2cec7f6447a56e5bbb35180ae4 100644 (file)
 
 (require 'tramp)
 
+;; Pacify byte-compiler.
 (eval-when-compile
-
-  ;; Pacify byte-compiler.
   (require 'cl)
   (require 'custom))
+(defvar ange-ftp-ftp-name-arg)
+(defvar ange-ftp-ftp-name-res)
+(defvar ange-ftp-name-format)
 
 ;; Disable Ange-FTP from file-name-handler-alist.
 ;; To handle EFS, the following functions need to be dealt with:
index 5bb30b04643ed61fd897e7758baf61942129398e..f70074ba6e901d2ef2f34c456f24fa602e8f39c6 100644 (file)
 ;; option "--without-dbus".  Declare used subroutines and variables.
 (declare-function dbus-get-unique-name "dbusbind.c")
 
-;; Pacify byte-compiler
-(eval-when-compile
-  (require 'cl)
-  (require 'custom))
-
 (require 'tramp)
 
 (require 'dbus)
 (require 'url-util)
 (require 'zeroconf)
 
+;; Pacify byte-compiler.
+(eval-when-compile
+  (require 'cl)
+  (require 'custom))
+(defvar ls-lisp-use-insert-directory-program)
+
 ;;;###tramp-autoload
 (defcustom tramp-gvfs-methods '("dav" "davs" "obex" "synce")
   "List of methods for remote files, accessed with GVFS."
@@ -923,7 +924,7 @@ is no information where to trace the message.")
             v (concat localname filename)
            "file-name-all-completions" result))))))))
 
-(defun tramp-gvfs-handle-file-notify-add-watch (file-name flags callback)
+(defun tramp-gvfs-handle-file-notify-add-watch (file-name _flags _callback)
   "Like `file-notify-add-watch' for Tramp files."
   (setq file-name (expand-file-name file-name))
   (with-parsed-tramp-file-name file-name nil
@@ -1093,7 +1094,7 @@ is no information where to trace the message.")
          (tramp-flush-file-property v localname))))))
 
 (defun tramp-gvfs-handle-write-region
-  (start end filename &optional append visit lockname confirm)
+  (start end filename &optional _append visit _lockname confirm)
   "Like `write-region' for Tramp files."
   (with-parsed-tramp-file-name filename nil
     ;; XEmacs takes a coding system as the seventh argument, not `confirm'.
@@ -1653,7 +1654,7 @@ be used."
  :system nil nil tramp-bluez-interface-adapter "DeviceFound"
  'tramp-bluez-device-found)
 
-(defun tramp-bluez-parse-device-names (ignore)
+(defun tramp-bluez-parse-device-names (_ignore)
   "Return a list of (nil host) tuples allowed to access."
   (mapcar
    (lambda (x) (list nil (car x)))
@@ -1667,14 +1668,14 @@ be used."
 \f
 ;; D-Bus zeroconf functions.
 
-(defun tramp-zeroconf-parse-workstation-device-names (ignore)
+(defun tramp-zeroconf-parse-workstation-device-names (_ignore)
   "Return a list of (user host) tuples allowed to access."
   (mapcar
    (lambda (x)
      (list nil (zeroconf-service-host x)))
    (zeroconf-list-services "_workstation._tcp")))
 
-(defun tramp-zeroconf-parse-webdav-device-names (ignore)
+(defun tramp-zeroconf-parse-webdav-device-names (_ignore)
   "Return a list of (user host) tuples allowed to access."
   (mapcar
    (lambda (x)
@@ -1724,7 +1725,7 @@ They are retrieved from the hal daemon."
     (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices)
     tramp-synce-devices))
 
-(defun tramp-synce-parse-device-names (ignore)
+(defun tramp-synce-parse-device-names (_ignore)
   "Return a list of (nil host) tuples allowed to access."
   (mapcar
    (lambda (x) (list nil x))
index 13f2964f9389ce93bed2266c789683a1ba735f10..53dbdbc45d472f72ce4dc5d25e5b344669683ef9 100644 (file)
 
 (require 'tramp)
 
-;; Pacify byte-compiler
+;; Pacify byte-compiler.
 (eval-when-compile
   (require 'cl)
   (require 'custom))
-
-;; Avoid byte-compiler warnings if the byte-compiler supports this.
-;; Currently, XEmacs supports this.
-(eval-when-compile
-  (when (featurep 'xemacs)
-      (byte-compiler-options (warnings (- unused-vars)))))
+(defvar socks-noproxy)
 
 ;; We don't add the following methods to `tramp-methods', in order to
 ;; exclude them from file name completion.
@@ -96,7 +91,7 @@
 (defvar tramp-gw-aux-proc nil
   "Process listening on local port, as mediation between SSH and the gateway.")
 
-(defun tramp-gw-gw-proc-sentinel (proc event)
+(defun tramp-gw-gw-proc-sentinel (proc _event)
   "Delete auxiliary process when we are deleted."
   (unless (memq (process-status proc) '(run open))
     (tramp-message
           (p (tramp-get-connection-property proc "process" nil)))
       (when (processp p) (delete-process p)))))
 
-(defun tramp-gw-aux-proc-sentinel (proc event)
+(defun tramp-gw-aux-proc-sentinel (proc _event)
   "Activate the different filters for involved gateway and auxiliary processes."
   (when (memq (process-status proc) '(run open))
     ;; A new process has been spawned from `tramp-gw-aux-proc'.
index f9e68d0dad0a94cad6b62e8e1e5277bf6ca50268..e41ed36f59798eea83503821abffc19e92489d24 100644 (file)
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))      ; ignore-errors
 (require 'tramp)
 
-;; Pacify byte-compiler.  The function is needed on XEmacs only.  I'm
-;; not sure at all that this is the right way to do it, but let's hope
-;; it works for now, and wait for a guru to point out the Right Way to
-;; achieve this.
-;;(eval-when-compile
-;;  (unless (fboundp 'dired-insert-set-properties)
-;;    (fset 'dired-insert-set-properties 'ignore)))
-;; Gerd suggests this:
-(eval-when-compile (require 'dired))
-;; Note that dired is required at run-time, too, when it is needed.
-;; It is only needed on XEmacs for the function
-;; `dired-insert-set-properties'.
+;; Pacify byte-compiler.
+(eval-when-compile
+  (require 'cl)
+  (require 'dired))
+(defvar directory-sep-char)
+(defvar tramp-gw-tunnel-method)
+(defvar tramp-gw-socks-method)
 
 (defcustom tramp-inline-compress-start-size 4096
   "The minimum size of compressing where inline transfer.
@@ -938,7 +932,7 @@ target of the symlink differ."
        (tramp-shell-quote-argument l-localname))
        t))))
 
-(defun tramp-sh-handle-file-truename (filename &optional counter prev-dirs)
+(defun tramp-sh-handle-file-truename (filename)
   "Like `file-truename' for Tramp files."
   (with-parsed-tramp-file-name (expand-file-name filename) nil
     (tramp-make-tramp-file-name method user host
@@ -1837,7 +1831,7 @@ tramp-sh-handle-file-name-all-completions: internal error accessing `%s': `%s'"
      'copy-file (list filename newname ok-if-already-exists keep-date)))))
 
 (defun tramp-sh-handle-copy-directory
-  (dirname newname &optional keep-date parents copy-contents)
+  (dirname newname &optional keep-date parents _copy-contents)
   "Like `copy-directory' for Tramp files."
   (let ((t1 (tramp-tramp-file-p dirname))
        (t2 (tramp-tramp-file-p newname)))
@@ -1911,8 +1905,7 @@ file names."
        (t2 (tramp-tramp-file-p newname))
        (length (nth 7 (file-attributes (file-truename filename))))
        (attributes (and preserve-extended-attributes
-                        (apply 'file-extended-attributes (list filename))))
-       pr tm)
+                        (apply 'file-extended-attributes (list filename)))))
 
     (with-parsed-tramp-file-name (if t1 filename newname) nil
       (when (and (not ok-if-already-exists) (file-exists-p newname))
@@ -2433,7 +2426,7 @@ This is like `dired-recursive-delete-directory' for Tramp files."
         (tramp-error
          v 'file-error "Failed to recursively delete %s" filename))))
 
-(defun tramp-sh-handle-dired-compress-file (file &rest ok-flag)
+(defun tramp-sh-handle-dired-compress-file (file &rest _ok-flag)
   "Like `dired-compress-file' for Tramp files."
   ;; OK-FLAG is valid for XEmacs only, but not implemented.
   ;; Code stolen mainly from dired-aux.el.
@@ -2978,7 +2971,7 @@ the result will be a local, non-Tramp, filename."
        (inhibit-file-name-operation 'insert-file-contents))
     (unwind-protect
        (progn
-         (fset 'find-buffer-file-type (lambda (filename) t))
+         (fset 'find-buffer-file-type (lambda (_filename) t))
          (insert-file-contents filename visit beg end replace))
       ;; Save exit.
       (if find-buffer-file-type-function
@@ -3383,7 +3376,7 @@ Fall back to normal file name handler if no Tramp handler exists."
         ;; Default file name handlers, we don't care.
         (t (tramp-run-real-handler operation args)))))))
 
-(defun tramp-sh-handle-file-notify-add-watch (file-name flags callback)
+(defun tramp-sh-handle-file-notify-add-watch (file-name flags _callback)
   "Like `file-notify-add-watch' for Tramp files."
   (setq file-name (expand-file-name file-name))
   (with-parsed-tramp-file-name file-name nil
@@ -3749,7 +3742,7 @@ file exists and nonzero exit status otherwise."
 Looks at process PROC to see if a shell prompt appears in TIMEOUT
 seconds.  If not, it produces an error message with the given ERROR-ARGS."
   (let ((vec (tramp-get-connection-property proc "vector" nil)))
-    (condition-case err
+    (condition-case nil
        (tramp-wait-for-regexp
         proc timeout
         (format
@@ -4204,9 +4197,6 @@ Goes through the list `tramp-inline-compress-commands'."
        (tramp-message
         vec 2 "Couldn't find an inline transfer compress command")))))
 
-(defvar tramp-gw-tunnel-method)
-(defvar tramp-gw-socks-method)
-
 (defun tramp-compute-multi-hops (vec)
   "Expands VEC according to `tramp-default-proxies-alist'.
 Gateway hops are already opened."
index 29847556dfe6954f7382cbd0a865000bca159e0d..39e87f994c25cd38079abbc18b1577682397dce3 100644 (file)
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))      ; block, return
 (require 'tramp)
 
+;; Pacify byte-compiler.
+(eval-when-compile
+  (require 'cl))
+
 ;; Define SMB method ...
 ;;;###tramp-autoload
 (defconst tramp-smb-method "smb"
@@ -355,7 +358,7 @@ pass to the OPERATION."
        (throw 'tramp-action 'ok)))))
 
 (defun tramp-smb-handle-copy-directory
-  (dirname newname &optional keep-date parents copy-contents)
+  (dirname newname &optional keep-date parents _copy-contents)
   "Like `copy-directory' for Tramp files."
   (setq dirname (expand-file-name dirname)
        newname (expand-file-name newname))
@@ -492,7 +495,7 @@ pass to the OPERATION."
 
 (defun tramp-smb-handle-copy-file
   (filename newname &optional ok-if-already-exists keep-date
-           preserve-uid-gid preserve-extended-attributes)
+           _preserve-uid-gid _preserve-extended-attributes)
   "Like `copy-file' for Tramp files.
 KEEP-DATE has no effect in case NEWNAME resides on an SMB server.
 PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
@@ -571,7 +574,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
          (tramp-error
           v 'file-error "%s `%s'" (match-string 0) directory))))))
 
-(defun tramp-smb-handle-delete-file (filename &optional trash)
+(defun tramp-smb-handle-delete-file (filename &optional _trash)
   "Like `delete-file' for Tramp files."
   (setq filename (expand-file-name filename))
   (when (file-exists-p filename)
@@ -1497,7 +1500,7 @@ Result is the list (LOCALNAME MODE SIZE MTIME)."
                    "%s%s"
                    (if (string-match "D" mode) "d" "-")
                    (mapconcat
-                    (lambda (x) "") "    "
+                    (lambda (_x) "") "    "
                     (concat "r" (if (string-match "R" mode) "-" "w") "x"))))
             line (substring line 0 -6))
          (return))
index c64d8dfa04699d9a68c1036e5eb412adfffa941d..6cf5baeccd818a8760627d958be6a4d52dea9f41 100644 (file)
 
 ;;; Code:
 
-(defvar tramp-uu-b64-alphabet
+(defconst tramp-uu-b64-alphabet
   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
   "Mapping from base64-encoded character to the byte it represents.")
 
-(defvar tramp-uu-b64-char-to-byte
+(defconst tramp-uu-b64-char-to-byte
   (let ((i 0))
     (mapcar (lambda (c)
              (prog1
@@ -55,7 +55,6 @@
   ;; First we base64 encode the region, then we transmogrify that into
   ;; uu encoding.
   (let ((len (base64-encode-region beg end t))
-       (padding 0)
        i c)
     (save-excursion
       (goto-char beg)
index 8ce5f2eae9b69ca25f38191caa432049e7d826f7..cd7d17b130c118dae222a3e800a15424a21cdb74 100644 (file)
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))      ; ignore-errors
 (require 'tramp-compat)
 
+;; Pacify byte-compiler.
+(eval-when-compile
+  (require 'cl))
+(defvar bkup-backup-directory-info)
+(defvar directory-sep-char)
+(defvar eshell-path-env)
+(defvar file-notify-descriptors)
+(defvar outline-regexp)
+
 ;;; User Customizable Internal Variables:
 
 (defgroup tramp nil
@@ -1417,10 +1425,10 @@ The outline level is equal to the verbosity of the Tramp message."
       (set (make-local-variable 'outline-level) 'tramp-debug-outline-level))
     (current-buffer)))
 
-(defsubst tramp-debug-message (vec fmt-string &rest args)
+(defsubst tramp-debug-message (vec fmt-string &rest arguments)
   "Append message to debug buffer.
 Message is formatted with FMT-STRING as control string and the remaining
-ARGS to actually emit the message (if applicable)."
+ARGUMENTS to actually emit the message (if applicable)."
   (when (get-buffer (tramp-buffer-name vec))
     (with-current-buffer (tramp-get-debug-buffer vec)
       (goto-char (point-max))
@@ -1480,14 +1488,14 @@ ARGS to actually emit the message (if applicable)."
 ;            (1+ (count-lines (point-min) (cdr ffn)))))))
        (insert (format "%s " fn)))
       ;; The message.
-      (insert (apply 'format fmt-string args)))))
+      (insert (apply 'format fmt-string arguments)))))
 
 (defvar tramp-message-show-message t
   "Show Tramp message in the minibuffer.
 This variable is used to disable messages from `tramp-error'.
 The messages are visible anyway, because an error is raised.")
 
-(defsubst tramp-message (vec-or-proc level fmt-string &rest args)
+(defsubst tramp-message (vec-or-proc level fmt-string &rest arguments)
   "Emit a message depending on verbosity level.
 VEC-OR-PROC identifies the Tramp buffer to use.  It can be either a
 vector or a process.  LEVEL says to be quiet if `tramp-verbose' is
@@ -1498,7 +1506,7 @@ The message is also logged into the debug buffer when `tramp-verbose'
 is greater than or equal 4.
 
 Calls functions `message' and `tramp-debug-message' with FMT-STRING as
-control string and the remaining ARGS to actually emit the message (if
+control string and the remaining ARGUMENTS to actually emit the message (if
 applicable)."
   (ignore-errors
     (when (<= level tramp-verbose)
@@ -1514,7 +1522,7 @@ applicable)."
                   ((= level 2) "Warning: ")
                   (t           "Tramp: "))
                  fmt-string)
-                args))
+                arguments))
        ;; Log only when there is a minimum level.
        (when (>= tramp-verbose 4)
          (when (and vec-or-proc
@@ -1527,17 +1535,17 @@ applicable)."
            (apply 'tramp-debug-message
                   vec-or-proc
                   (concat (format "(%d) # " level) fmt-string)
-                  args)))))))
+                  arguments)))))))
 
 (defsubst tramp-backtrace (vec-or-proc)
   "Dump a backtrace into the debug buffer.
 This function is meant for debugging purposes."
   (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))))
 
-(defsubst tramp-error (vec-or-proc signal fmt-string &rest args)
+(defsubst tramp-error (vec-or-proc signal fmt-string &rest arguments)
   "Emit an error.
 VEC-OR-PROC identifies the connection to use, SIGNAL is the
-signal identifier to be raised, remaining args passed to
+signal identifier to be raised, remaining arguments passed to
 `tramp-message'.  Finally, signal SIGNAL is raised."
   (let (tramp-message-show-message)
     (tramp-backtrace vec-or-proc)
@@ -1546,16 +1554,16 @@ signal identifier to be raised, remaining args passed to
      (error-message-string
       (list signal
            (get signal 'error-message)
-           (apply 'format fmt-string args))))
-    (signal signal (list (apply 'format fmt-string args)))))
+           (apply 'format fmt-string arguments))))
+    (signal signal (list (apply 'format fmt-string arguments)))))
 
 (defsubst tramp-error-with-buffer
-  (buffer vec-or-proc signal fmt-string &rest args)
-  "Emit an error, and show BUFFER.
-If BUFFER is nil, show the connection buffer.  Wait for 30\", or until
+  (buf vec-or-proc signal fmt-string &rest arguments)
+  "Emit an error, and show BUF.
+If BUF is nil, show the connection buf.  Wait for 30\", or until
 an input event arrives.  The other arguments are passed to `tramp-error'."
   (save-window-excursion
-    (let* ((buf (or (and (bufferp buffer) buffer)
+    (let* ((buf (or (and (bufferp buf) buf)
                    (and (processp vec-or-proc) (process-buffer vec-or-proc))
                    (and (vectorp vec-or-proc)
                         (tramp-get-connection-buffer vec-or-proc))))
@@ -1563,7 +1571,7 @@ an input event arrives.  The other arguments are passed to `tramp-error'."
                    (and buf (with-current-buffer buf
                               (tramp-dissect-file-name default-directory))))))
       (unwind-protect
-         (apply 'tramp-error vec-or-proc signal fmt-string args)
+         (apply 'tramp-error vec-or-proc signal fmt-string arguments)
        ;; Save exit.
        (when (and buf
                   tramp-message-show-message
@@ -1572,7 +1580,7 @@ an input event arrives.  The other arguments are passed to `tramp-error'."
          (let ((enable-recursive-minibuffers t))
            ;; `tramp-error' does not show messages.  So we must do it
            ;; ourselves.
-           (message fmt-string args)
+           (message fmt-string arguments)
            ;; Show buffer.
            (pop-to-buffer buf)
            (discard-input)
@@ -3281,7 +3289,7 @@ beginning of local filename are not substituted."
          (setq filename (concat filename "/"))))
       (tramp-run-real-handler 'substitute-in-file-name (list filename)))))
 
-(defun tramp-handle-unhandled-file-name-directory (filename)
+(defun tramp-handle-unhandled-file-name-directory (_filename)
   "Like `unhandled-file-name-directory' for Tramp files."
   ;; With Emacs 23, we could simply return `nil'.  But we must keep it
   ;; for backward compatibility.
@@ -3341,7 +3349,7 @@ of."
             ;; only if that agrees with the buffer's record.
             (t (equal mt '(-1 65535))))))))))
 
-(defun tramp-handle-file-notify-add-watch (filename flags callback)
+(defun tramp-handle-file-notify-add-watch (filename _flags _callback)
   "Like `file-notify-add-watch' for Tramp files."
   ;; This is the default handler.  tramp-gvfs.el and tramp-sh.el have
   ;; its own one.
@@ -3350,7 +3358,6 @@ of."
     (tramp-error
      v 'file-notify-error "File notification not supported for `%s'" filename)))
 
-(defvar file-notify-descriptors)
 (defun tramp-handle-file-notify-rm-watch (proc)
   "Like `file-notify-rm-watch' for Tramp files."
   ;; The descriptor must be a process object.
@@ -3365,7 +3372,7 @@ of."
 ;; prompts from the remote host.  See the variable
 ;; `tramp-actions-before-shell' for usage of these functions.
 
-(defun tramp-action-login (proc vec)
+(defun tramp-action-login (_proc vec)
   "Send the login name."
   (when (not (stringp tramp-current-user))
     (setq tramp-current-user
@@ -3392,11 +3399,11 @@ of."
       ;; Hide password prompt.
       (narrow-to-region (point-max) (point-max)))))
 
-(defun tramp-action-succeed (proc vec)
+(defun tramp-action-succeed (_proc _vec)
   "Signal success in finding shell prompt."
   (throw 'tramp-action 'ok))
 
-(defun tramp-action-permission-denied (proc vec)
+(defun tramp-action-permission-denied (proc _vec)
   "Signal permission denied."
   (kill-process proc)
   (throw 'tramp-action 'permission-denied))
@@ -3429,7 +3436,7 @@ See also `tramp-action-yesno'."
        (tramp-message vec 6 "\n%s" (buffer-string)))
       (tramp-send-string vec (concat "y" tramp-local-end-of-line)))))
 
-(defun tramp-action-terminal (proc vec)
+(defun tramp-action-terminal (_proc vec)
   "Tell the remote host which terminal type to use.
 The terminal type can be configured with `tramp-terminal-type'."
   (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type)
@@ -3437,7 +3444,7 @@ The terminal type can be configured with `tramp-terminal-type'."
     (tramp-message vec 6 "\n%s" (buffer-string)))
   (tramp-send-string vec (concat tramp-terminal-type tramp-local-end-of-line)))
 
-(defun tramp-action-process-alive (proc vec)
+(defun tramp-action-process-alive (proc _vec)
   "Check, whether a process has finished."
   (unless (memq (process-status proc) '(run open))
     (throw 'tramp-action 'process-died)))
@@ -4182,9 +4189,6 @@ Only works for Bourne-like shells."
 
 ;;; Integration of eshell.el:
 
-(eval-when-compile
-  (defvar eshell-path-env))
-
 ;; eshell.el keeps the path in `eshell-path-env'.  We must change it
 ;; when `default-directory' points to another host.
 (defun tramp-eshell-directory-change ()
index 8396cce3e274c9afed3517e4cdbf1924a3512555..2ba1bb4aa76d06d0217559533028d6c05b3083ae 100644 (file)
@@ -144,7 +144,9 @@ Interesting variables:
   (set (make-local-variable 'sentence-end)
        "\\([.?!]\\|@:\\)[]\"')}]*\\($\\| $\\|\t\\|  \\)[ \t\n]*")
   (set (make-local-variable 'compile-command)
-       (concat "scribe " (buffer-file-name))))
+       (concat "scribe "
+              (if buffer-file-name
+                  (shell-quote-argument (buffer-file-name))))))
 
 (defun scribe-tab ()
   (interactive)
index e909f1a5e5bca48c14cb5177564eac41b1335223..8c981b36e567e1583dbdf08bf46e142758b3cc65 100644 (file)
@@ -624,7 +624,9 @@ You might also use mode hooks to specify it in certain modes, like this:
                     (file-exists-p \"Makefile\"))
           (set (make-local-variable 'compile-command)
                (concat \"make -k \"
-                       (file-name-sans-extension buffer-file-name))))))"
+                       (if buffer-file-name
+                         (shell-quote-argument
+                           (file-name-sans-extension buffer-file-name))))))))"
   :type 'string
   :group 'compilation)
 ;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and (stringp a) (or (not (boundp 'compilation-read-command)) compilation-read-command))))
index 8814cdbba35a031434fdf79686f00ace0feba577..a14654cdd7c52e9960e2b250302d2e4207e4b64d 100644 (file)
@@ -1113,8 +1113,10 @@ Assumes that file has been compiled with debugging support."
        mixal-syntax-propertize-function)
   ;; might add an indent function in the future
   ;;  (set (make-local-variable 'indent-line-function) 'mixal-indent-line)
-  (set (make-local-variable 'compile-command) (concat "mixasm "
-                                                     buffer-file-name)))
+  (set (make-local-variable 'compile-command)
+       (concat "mixasm "
+              (if buffer-file-name
+                  (shell-quote-argument buffer-file-name)))))
 
 (provide 'mixal-mode)
 
index 62870f9085b40eb25d80dfabcdceaf94b4e40a57..01833ffd70b7de903bf38aba36f2c7bad1b4c543 100644 (file)
@@ -3042,32 +3042,22 @@ It must be a function with two arguments: TYPE and NAME.")
       "*class definition*"
     "*function definition*"))
 
-(defun python-imenu--put-parent (type name pos num-children tree &optional root)
-  "Add the parent with TYPE, NAME, POS and NUM-CHILDREN to TREE.
-Optional Argument ROOT must be non-nil when the node being
-processed is the root of the TREE."
+(defun python-imenu--put-parent (type name pos tree)
+  "Add the parent with TYPE, NAME and POS to TREE."
   (let ((label
          (funcall python-imenu-format-item-label-function type name))
         (jump-label
          (funcall python-imenu-format-parent-item-jump-label-function type name)))
-    (if root
-        ;; This is the root, everything is a children.
-        (cons label (cons (cons jump-label pos) tree))
-      ;; This is node a which may contain some children.
-      (cons
-       (cons label (cons (cons jump-label pos)
-                         ;; Append all the children
-                         (python-util-popn tree num-children)))
-       ;; All previous non-children nodes.
-       (nthcdr num-children tree)))))
+    (if (not tree)
+        (cons label pos)
+      (cons label (cons (cons jump-label pos) tree)))))
 
-(defun python-imenu--build-tree (&optional min-indent prev-indent num-children tree)
+(defun python-imenu--build-tree (&optional min-indent prev-indent tree)
   "Recursively build the tree of nested definitions of a node.
-Arguments MIN-INDENT PREV-INDENT NUM-CHILDREN and TREE are
-internal and should not be passed explicitly unless you know what
-you are doing."
-  (setq num-children (or num-children 0)
-        min-indent (or min-indent 0))
+Arguments MIN-INDENT PREV-INDENT and TREE are internal and should
+not be passed explicitly unless you know what you are doing."
+  (setq min-indent (or min-indent 0)
+        prev-indent (or prev-indent python-indent-offset))
   (let* ((pos (python-nav-backward-defun))
          (type)
          (name (when (and pos (looking-at python-nav-beginning-of-defun-regexp))
@@ -3076,73 +3066,33 @@ you are doing."
                    (cadr split))))
          (label (when name
                   (funcall python-imenu-format-item-label-function type name)))
-         (indent (current-indentation)))
+         (indent (current-indentation))
+         (children-indent-limit (+ python-indent-offset min-indent)))
     (cond ((not pos)
-           ;; No defun found, nothing to add.
-           tree)
-          ((equal indent 0)
-           (if (> num-children 0)
-               ;; Append it as the parent of everything collected to
-               ;; this point.
-               (python-imenu--put-parent type name pos num-children tree t)
-             ;; There are no children, this is a lonely defun.
-             (cons label pos)))
-          ((equal min-indent indent)
-           ;; Stop collecting nodes after moving to a position with
-           ;; indentation equaling min-indent. This is specially
-           ;; useful for navigating nested definitions recursively.
-           (if (> num-children 0)
-               tree
-             ;; When there are no children, the collected tree is a
-             ;; single node intended to be added in the list of defuns
-             ;; of its parent.
-             (car tree)))
+           ;; Nothing found, probably near to bobp.
+           nil)
+          ((<= indent min-indent)
+           ;; The current indentation points that this is a parent
+           ;; node, add it to the tree and stop recursing.
+           (python-imenu--put-parent type name pos tree))
           (t
            (python-imenu--build-tree
             min-indent
             indent
-            ;; Add another children, either when this is the
-            ;; first call or when indentation is
-            ;; less-or-equal than previous. And do not
-            ;; discard the number of children, because the
-            ;; way code is scanned, all children are
-            ;; collected until a root node yet to be found
-            ;; appears.
-            (if (or (not prev-indent)
-                    (and
-                     (> indent min-indent)
-                     (<= indent prev-indent)))
-                (1+ num-children)
-              num-children)
-            (cond ((not prev-indent)
-                   ;; First call to the function: append this
-                   ;; defun to the index.
-                   (list (cons label pos)))
-                  ((= indent prev-indent)
-                   ;; Add another defun with the same depth
-                   ;; as the previous.
-                   (cons (cons label pos) tree))
-                  ((and (< indent prev-indent)
-                        (< 0 num-children))
-                   ;; There are children to be appended and
-                   ;; the previous defun had more
-                   ;; indentation, the current one must be a
-                   ;; parent.
-                   (python-imenu--put-parent type name pos num-children tree))
-                  ((> indent prev-indent)
-                   ;; There are children defuns deeper than
-                   ;; current depth. Fear not, we already
-                   ;; know how to treat them.
-                   (cons
-                    (prog1
-                        (python-imenu--build-tree
-                         prev-indent indent 0 (list (cons label pos)))
-                      ;; Adjustment: after scanning backwards
-                      ;; for all deeper children, we need to
-                      ;; continue our scan for a parent from
-                      ;; the current defun we are looking at.
-                      (python-nav-forward-defun))
-                    tree))))))))
+            (if (<= indent children-indent-limit)
+                ;; This lies within the children indent offset range,
+                ;; so it's a normal child of its parent (i.e., not
+                ;; a child of a child).
+                (cons (cons label pos) tree)
+              ;; Oh no, a child of a child?!  Fear not, we
+              ;; know how to roll.  We recursively parse these by
+              ;; swapping prev-indent and min-indent plus adding this
+              ;; newly found item to a fresh subtree.  This works, I
+              ;; promise.
+              (cons
+               (python-imenu--build-tree
+                prev-indent indent (list (cons label pos)))
+               tree)))))))
 
 (defun python-imenu-create-index ()
   "Return tree Imenu alist for the current python buffer.
index 0edf5ca8d9c5618a45cec758328a4e4d0f3597a7..6825c41becc14e2dc5a73b36ea2db78b49a66116 100644 (file)
@@ -3338,6 +3338,7 @@ extract characters that are special to a buffer, and should not
 be copied into other buffers."
   (funcall filter-buffer-substring-function beg end delete))
 
+;; FIXME: `with-wrapper-hook' is obsolete
 (defun buffer-substring--filter (beg end &optional delete)
   (with-wrapper-hook filter-buffer-substring-functions (beg end delete)
     (cond
@@ -5670,7 +5671,8 @@ current object."
 \f
 (defun backward-word (&optional arg)
   "Move backward until encountering the beginning of a word.
-With argument ARG, do this that many times."
+With argument ARG, do this that many times.
+If ARG is omitted or nil, move point backward one word."
   (interactive "^p")
   (forward-word (- (or arg 1))))
 
index 2346803c6bf22ea50b5d052411a19aea471b3716..52a69690534e75128bb0d1eb720623dfc5145321 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-14  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * url-http.el (url-http-parse-headers): Always place point at the
+       start of the buffer instead of just 80% of the time.
+
 2013-08-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * url-http.el (url-handle-content-transfer-encoding): Renamed
index 07049591cf0c99d975b4715b30598b2140a6419d..7047e6b5f13ee33eb57ef7b08e5b6e774e3cc1b5 100644 (file)
@@ -855,6 +855,7 @@ should be shown to the user."
       (url-handle-content-transfer-encoding))
     (url-http-debug "Finished parsing HTTP headers: %S" success)
     (widen)
+    (goto-char (point-min))
     success))
 
 (defun url-handle-content-transfer-encoding ()
index b14d91cb9241d840c509fe6dff4b596865f68f74..64cf0a72110cbedcff914637b7b0cbb6c9f83c6f 100644 (file)
@@ -477,7 +477,8 @@ WINDOW must be an internal window.  Return WINDOW."
       (error "Window %s is not an internal window" window)
     (walk-window-subtree
      (lambda (window)
-       (set-window-parameter window 'window-atom t))
+       (unless (window-parameter window 'window-atom)
+        (set-window-parameter window 'window-atom t)))
      window t)
     window))
 
@@ -498,24 +499,39 @@ following symbols can be used.
   sibling of an atomic window's root.  If an internal window is
   specified here, all children of that window become part of the
   atomic window too.  If no window is specified, the new window
-  becomes a sibling of the selected window.
+  becomes a sibling of the selected window.  By default, the
+  `window-atom' parameter of the existing window is set to `main'
+  provided it is live and was not set before.
 
 `side' denotes the side of the existing window where the new
   window shall be located.  Valid values are `below', `right',
-  `above' and `left'.  The default is `below'.
+  `above' and `left'.  The default is `below'.  By default, the
+  `window-atom' parameter of the new window is set to this value.
 
 The return value is the new window, nil when creating that window
 failed."
-  (let ((ignore-window-parameters t)
-       (window-combination-limit t)
-       (window (cdr (assq 'window alist)))
-       (side (cdr (assq 'side alist)))
-       new)
+  (let* ((ignore-window-parameters t)
+        (window-combination-limit t)
+        (window-combination-resize 'atom)
+        (window (cdr (assq 'window alist)))
+        (side (cdr (assq 'side alist)))
+        (atom (when window (window-parameter window 'window-atom)))
+        root new)
     (setq window (window-normalize-window window))
-    ;; Split off new window
+    (setq root (window-atom-root window))
+    ;; Split off new window.
     (when (setq new (split-window window nil side))
-      ;; Make sure we have a valid atomic window.
-      (window-make-atom (window-parent window))
+      (window-make-atom
+       (if (and root (not (eq root window)))
+          ;; When WINDOW was part of an atomic window and we did not
+          ;; split its root, root atomic window at old root.
+          root
+        ;; Otherwise, root atomic window at WINDOW's new parent.
+        (window-parent window)))
+      ;; Assign `window-atom' parameters, if needed.
+      (when (and (not atom) (window-live-p window))
+       (set-window-parameter window 'window-atom 'main))
+      (set-window-parameter new 'window-atom side)
       ;; Display BUFFER in NEW and return NEW.
       (window--display-buffer
        buffer new 'window alist display-buffer-mark-dedicated))))
@@ -631,7 +647,7 @@ its root window."
                (and (setq sibling (window-next-sibling window))
                     (window-parameter sibling 'window-side)))
            (setq major window)))
-     frame t)
+     frame t 'nomini)
     (or major (frame-root-window frame))))
 
 (defun window--major-side-window (side)
@@ -762,7 +778,8 @@ following symbols can be used:
                (walk-window-tree
                 (lambda (window)
                   (when (eq (window-parameter window 'window-side) side)
-                    (setq windows (cons window windows)))))
+                    (setq windows (cons window windows))))
+                nil nil 'nomini)
                (nreverse windows))))
           (slots (when major (max 1 (window-child-count major))))
           (max-slots
@@ -919,14 +936,14 @@ of all windows on FRAME to nil."
                     (if bottom (throw 'reset t) (setq bottom t)))
                    (t
                     (throw 'reset t))))
-                frame t))
+                frame t 'nomini))
              ;; If there's a side window, there must be at least one
              ;; non-side window.
              (and (or left top right bottom) (not none)))
       (walk-window-tree
        (lambda (window)
         (set-window-parameter window 'window-side nil))
-       frame t))))
+       frame t 'nomini))))
 
 (defun window--check (&optional frame)
   "Check atomic and side windows on FRAME.
@@ -980,8 +997,8 @@ means ignore all of the above restrictions for all windows."
                (setq value (+ value
                               (window--min-size-1 sub horizontal ignore)))
                (setq sub (window-right sub)))
-           ;; The minimum size of an ortho-combination is the maximum of
-           ;; the minimum sizes of its child windows.
+           ;; The minimum size of an ortho-combination is the maximum
+           ;; of the minimum sizes of its child windows.
            (while sub
              (setq value (max value
                               (window--min-size-1 sub horizontal ignore)))
@@ -2808,10 +2825,11 @@ and no others."
 (defun window-deletable-p (&optional window)
   "Return t if WINDOW can be safely deleted from its frame.
 WINDOW must be a valid window and defaults to the selected one.
-Return `frame' if deleting WINDOW should also delete its frame."
+Return 'frame if deleting WINDOW should also delete its frame."
   (setq window (window-normalize-window window))
 
-  (unless ignore-window-parameters
+  (unless (or ignore-window-parameters
+             (eq (window-parameter window 'delete-window) t)) 
     ;; Handle atomicity.
     (when (window-parameter window 'window-atom)
       (setq window (window-atom-root window))))
@@ -2823,6 +2841,14 @@ Return `frame' if deleting WINDOW should also delete its frame."
       ;; on the same terminal, and it does not contain the active
       ;; minibuffer.
       (unless (or (eq frame (next-frame frame 0))
+                 ;; We can delete our frame only if no other frame
+                 ;; currently uses our minibuffer window.
+                 (catch 'other
+                   (dolist (other (frame-list))
+                     (when (and (not (eq other frame))
+                                (eq (window-frame (minibuffer-window other))
+                                    frame))
+                       (throw 'other t))))
                  (let ((minibuf (active-minibuffer-window)))
                    (and minibuf (eq frame (window-frame minibuf)))))
        'frame))
@@ -3060,7 +3086,9 @@ WINDOW must be a live window and defaults to the selected one."
                               ;; (Bug#12588).
                               point window-point-insertion-type)))))
          (set-window-prev-buffers
-          window (cons entry (window-prev-buffers window))))))))
+          window (cons entry (window-prev-buffers window)))))
+
+      (run-hooks 'buffer-list-update-hook))))
 
 (defun unrecord-window-buffer (&optional window buffer)
   "Unrecord BUFFER in WINDOW.
@@ -3894,7 +3922,8 @@ frame.  The selected window is not changed by this function."
 
        (let* ((new (split-window-internal window new-size side new-normal)))
          ;; Assign window-side parameters, if any.
-         (when (eq window-combination-resize 'side)
+         (cond
+          ((eq window-combination-resize 'side)
            (let ((window-side
                   (cond
                    (window-side window-side)
@@ -3908,6 +3937,14 @@ frame.  The selected window is not changed by this function."
                ;; new parent the same window-side parameter.
                (set-window-parameter
                 (window-parent new) 'window-side window-side))))
+          ((eq window-combination-resize 'atom)
+           ;; Make sure `window--check-frame' won't destroy an existing
+           ;; atomic window in case the new window gets nested inside.
+           (unless (window-parameter window 'window-atom)
+             (set-window-parameter window 'window-atom t))
+           (when new-parent
+             (set-window-parameter (window-parent new) 'window-atom t))
+           (set-window-parameter new 'window-atom t)))
 
          (run-window-configuration-change-hook frame)
          (window--check frame)
@@ -5676,7 +5713,8 @@ This either splits the window at the bottom of the frame or the
 frame's root window, or reuses an existing window at the bottom
 of the selected frame."
   (let (bottom-window window)
-    (walk-window-tree (lambda (window) (setq bottom-window window)))
+    (walk-window-tree
+     (lambda (window) (setq bottom-window window)) nil nil 'nomini)
     (or (and (not (frame-parameter nil 'unsplittable))
             (setq window (window--try-to-split-window bottom-window alist))
             (window--display-buffer
@@ -5684,7 +5722,7 @@ of the selected frame."
        (and (not (frame-parameter nil 'unsplittable))
             (setq window
                   (condition-case nil
-                      (split-window (frame-root-window))
+                      (split-window (window--major-non-side-window))
                     (error nil)))
             (window--display-buffer
              buffer window 'window alist display-buffer-mark-dedicated))
@@ -5803,7 +5841,8 @@ at the front of the list of recently selected ones."
   (interactive (list (read-buffer "Pop to buffer: " (other-buffer))
                     (if current-prefix-arg t)))
   (setq buffer (window-normalize-buffer-to-switch-to buffer))
-  (set-buffer buffer)
+  ;; This should be done by `select-window' below.
+  ;; (set-buffer buffer)
   (let* ((old-frame (selected-frame))
         (window (display-buffer buffer action))
         (frame (window-frame window)))
@@ -6641,9 +6680,12 @@ is active.  This function is run by `mouse-autoselect-window-timer'."
      (cond
       ((or (menu-or-popup-active-p)
           (and window
-               (not (coordinates-in-window-p (cdr mouse-position) window))))
-       ;; A menu / popup dialog is active or the mouse is on the scroll-bar
-       ;; of WINDOW, temporarily suspend delayed autoselection.
+               (let ((coords (coordinates-in-window-p
+                              (cdr mouse-position) window)))
+                 (and (not (consp coords))
+                      (not (memq coords '(left-margin right-margin)))))))
+       ;; A menu / popup dialog is active or the mouse is not on the
+       ;; text region of WINDOW: Suspend autoselection temporarily.
        (mouse-autoselect-window-start mouse-position nil t))
       ((eq mouse-autoselect-window-state 'suspend)
        ;; Delayed autoselection was temporarily suspended, reenable it.
index 184873283bbc51b4c4e7330a922926bcd71e8723..5f5da51606b2f905205512b57601a6e4c83a7216 100644 (file)
@@ -1,4 +1,4 @@
-# warnings.m4 serial 8
+# warnings.m4 serial 10
 dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -25,15 +25,24 @@ m4_ifdef([AS_VAR_APPEND],
 AC_DEFUN([gl_COMPILER_OPTION_IF],
 [AS_VAR_PUSHDEF([gl_Warn], [gl_cv_warn_[]_AC_LANG_ABBREV[]_$1])dnl
 AS_VAR_PUSHDEF([gl_Flags], [_AC_LANG_PREFIX[]FLAGS])dnl
+AS_LITERAL_IF([$1],
+  [m4_pushdef([gl_Positive], m4_bpatsubst([$1], [^-Wno-], [-W]))],
+  [gl_positive="$1"
+case $gl_positive in
+  -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
+esac
+m4_pushdef([gl_Positive], [$gl_positive])])dnl
 AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], m4_defn([gl_Warn]), [
   gl_save_compiler_FLAGS="$gl_Flags"
-  gl_AS_VAR_APPEND(m4_defn([gl_Flags]), [" $gl_unknown_warnings_are_errors $1"])
+  gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
+    [" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
   AC_COMPILE_IFELSE([m4_default([$4], [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], [$2], [$3])
+m4_popdef([gl_Positive])dnl
 AS_VAR_POPDEF([gl_Flags])dnl
 AS_VAR_POPDEF([gl_Warn])dnl
 ])
index 523ce319b1708d71448a81ecbb45c4f69bdf62af..ed53f933de386487547c6dc9891e2d2db2056e9b 100755 (executable)
--- a/make-dist
+++ b/make-dist
@@ -476,6 +476,9 @@ echo "Making links to \`etc' and its subdirectories"
 for f in `find etc -type f`; do
   case $f in
     etc/DOC*|etc/*.pyc) continue ;;
+    ## Arguably we should not exclude *.ps.
+    etc/refcards/*.aux|etc/refcards/*.dvi|etc/refcards/*.log|etc/refcards/*.ps)
+      continue ;;
   esac
   ln $f $tempdir/$f
 done
index 04c89b63fa44bf3e765d7265c77eae6d33d504eb..2171f2b874827f4e18884beb1f2bb465dcb148bd 100644 (file)
@@ -1,3 +1,372 @@
+2013-08-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c (imagemagick_get_animation_cache): Don't segfault on
+       each invocation.
+       (imagemagick_get_animation_cache): Revert to previous definition
+       so that it actually works.  But keep the memory leak fix.
+       (imagemagick_get_animation_cache): Fix memory leak.
+
+2013-08-19  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * image.c: Fix animation cache signature memory leak.
+       Fix some other minor performance problems while we're at it.
+       (imagemagick_create_cache): Clear just the members that
+       need clearing.  Don't set update_time, as caller does that now.
+       (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
+       Simplify by using pointer-to-pointer instead of a prev pointer.
+       (imagemagick_prune_animation_cache): Use make_emacs_time rather
+       than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
+       (imagemagick_get_animation_cache): Don't xstrdup the image signature;
+       it's already a copy.  Free the signature probe unless it's cached.
+
+       * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
+       This was introduced by my 2013-08-12 fix for Bug#15035.
+
+2013-08-19  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
+       (imagemagick_prune_animation_cache): Now static.
+
+2013-08-18  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c (imagemagick_get_animation_cache): Don't segfault when
+       pruning all entries.
+
+2013-08-18  Ken Brown  <kbrown@cornell.edu>
+
+       * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
+       static heap if ENABLE_CHECKING is defined.
+       (max_bss_sbrk_ptr): New variable.
+       (bss_sbrk): Use it.
+       (report_sheap_usage): Report maximum static heap usage instead of
+       ending static heap usage.
+
+2013-08-17  Eli Zaretskii  <eliz@gnu.org>
+
+       * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
+       of zlib_initialized according to the results of calling
+       init_zlib_functions.
+
+2013-08-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c: Implement an ImageMagick per-image cache.
+       (imagemagick_get_animation_cache): Fix a double-free error.
+       (imagemagick_load_image): Remove the ping_wand code, which only
+       apparently saved time on invalid animated images, and slowed down
+       everything else.  Optimise for the common case.
+
+2013-08-16  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
+
+       * editfns.c (insert_before_markers): Mention overlay in the doc string.
+
+       * marker.c (set_marker): Remove documentation of undefined behavior.
+
+2013-08-15  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c (imagemagick_compute_animated_image): Animate correctly
+       when sub-images are smaller than the main image.
+       (imagemagick_compute_animated_image): Setting the iterator row to
+       zero is apparently not allowed.
+       (imagemagick_compute_animated_image): Allow images that say they
+       have sub-images that are bigger than the main image, but just crop
+       them.
+
+2013-08-15  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
+
+2013-08-15  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c (imagemagick_compute_animated_image): Respect the GIF
+       disposal methods.
+
+2013-08-15  Ken Brown  <kbrown@cornell.edu>
+
+       * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
+       * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
+       needed.
+
+2013-08-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix minor problems found by static checking.
+       * frame.c (delete_frame):
+       * xdisp.c (next_element_from_display_vector):
+       Avoid uninitialized local.
+       * image.c (imagemagick_compute_animated_image): Port to C89.
+       Prefer usual GNU indentation style for loops.
+       Be more careful about bizarrely large sizes, by using ptrdiff_t
+       instead of int.
+
+2013-08-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Fix infinite frame selection loop (Bug#15025).
+       * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
+
+2013-08-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (compute_window_start_on_continuation_line): When
+       WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
+       to make sure we end up setting the window start at the leftmost
+       visible character of the display line.  This avoids funky
+       horizontal shifting because the window start is not kept on the
+       same position.  (Bug#15090)
+       (next_element_from_display_vector): Support 'box' face attribute
+       in the face definitions of a display vector.  (Bug#15099)
+
+2013-08-15  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c (imagemagick_compute_animated_image): Implement animated
+       images (bug#14700).
+       (imagemagick_compute_animated_image): Fix some compilation
+       warnings.  Implement a very simple cache to make the animation
+       usable at all, but it should be replaced with a per-image cache.
+
+2013-08-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * lisp.h (FOR_EACH_ALIST_VALUE): New macro
+       to do `for' loops over alist values.
+       * buffer.h (FOR_EACH_BUFFER):
+       * process.c (FOR_EACH_PROCESS): Use it.
+       (handle_child_signal, status_notify, Fget_buffer_process)
+       (kill_buffer_processes): Use FOR_EACH_PROCESS.
+
+2013-08-15  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
+       (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
+       * image.c (make_image_cache): For struct image_cache, prefer xmalloc
+       to xzalloc and so avoid redundant call to memset.
+       * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
+       members because it is allocated with xzalloc and so already zeroed.
+
+2013-08-14  Ken Brown  <kbrown@cornell.edu>
+
+       * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
+       (Bug#15094).
+
+2013-08-14  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Utility function and macro to copy Lisp string to C string.
+       * lisp.h (xlispstrdupa): New macro.
+       (xlispstrdup): New prototype.
+       * alloc.c (xlispstrdup): New function.
+       * callint.c (Fcall_interactively):
+       * fileio.c (Ffile_name_directory, Fexpand_file_name)
+       (Fsubstitute_in_file_name):
+       * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
+       * image.c (x_create_bitmap_from_file):
+       * w32term.c (w32_term_init):
+       * xterm.c (x_term_init): Use xlispstrdup.
+
+2013-08-14  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c (imagemagick_load_image): Make animated pictures work.
+       There's still some problems with background color settings, though
+       (bug#14700).
+
+       * decompress.c (unwind_decompress): Always restore point.
+
+2013-08-14  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * marker.c (set_marker): Reformat documentation.
+
+2013-08-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xdisp.c (cursor_type_changed): Now static.
+
+       * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
+       Use changed.  This avoids the need to call xmalloc and for the
+       caller to call xfree, and avoids memory leaks in some situations.
+
+2013-08-14  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * xdisp.c (adjust_window_ends): Move duplicated code to new function.
+       (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
+       (redisplay_window): If window_end_valid is cleared due to non-zero
+       windows_or_buffers_changed, clear current_matrix_up_to_date_p and
+       so do not call to try_cursor_movement for that window.
+
+2013-08-14  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * window.h (struct window): Convert window_end_pos and
+       window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
+       (wset_window_end_pos, wset_window_end_vpos): Remove.
+       * dispnew.c (adjust_glyph_matrix):
+       * window.c (Fwindow_end, replace_window, set_window_buffer)
+       (make_window):
+       * xdisp.c (check_window_end, move_it_to, redisplay_internal)
+       (set_vertical_scroll_bar, redisplay_window, try_window)
+       (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
+       (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
+       (note_mouse_highlight): Adjust users.
+       (try_cursor_movement): Likewise.  Convert old precondition to eassert.
+       Add comment.
+
+2013-08-14  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
+       * image.c (imagemagick_filename_hint): Use `const char *' and
+       prefer SSDATA to SDATA to avoid warnings.
+
+2013-08-14  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Cleanup window fringes, margins and scroll bars adjustments.
+       * window.c (set_window_fringes, set_window_margins)
+       (set_window_scroll_bars, apply_window_adjustment): New functions.
+       (set_window_buffer, Fset_window_margins, Fset_window_fringes)
+       (Fset_window_scroll_bars): Use them.
+
+2013-08-14  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * window.h (struct window): Convert scroll_bar_width
+       from Lisp_Object to integer.  Adjust comment.
+       (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
+       Adjust users.
+       * window.c (wset_scroll_bar_width): Remove.
+       (make_window): Initialize scroll_bar_width.
+       (Fsplit_window_internal): Use direct assignment.
+       (Fset_window_configuration, save_window_save):
+       Convert Lisp_Object to integer and back where appropriate.
+       (Fset_window_scroll_bars): Adjust user.  Return t if any scroll
+       bar was actually changed, and mention this in docstring.
+
+2013-08-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * decompress.c: Minor simplifications.
+       (Fzlib_decompress_region): Don't bother verifying
+       that avail_out <= UINT_MAX, as that was confusing.
+       Mention the restriction in a comment instead.
+       Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
+
+2013-08-13  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
+       (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
+
+2013-08-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c (imagemagick_filename_hint): Check for errors in the
+       alist structure.
+
+2013-08-13  Eli Zaretskii  <eliz@gnu.org>
+
+       * window.c (Fwindow_margins): Return nil when there's no marginal
+       area, as per the documented API.
+
+       * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
+       Fmake_vector, as scroll bar's struct members are not all Lisp
+       objects now.  This avoids crashes in GC.
+
+       * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
+       bool, so its address could be taken.
+
+2013-08-13  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * image.c (imagemagick_filename_hint): New function to possibly
+       apply `image-content-type-suffixes'.
+       (imagemagick_load_image): Use it.
+
+2013-08-13  Eli Zaretskii  <eliz@gnu.org>
+
+       * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
+       if loading zlib failed.
+
+2013-08-13  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
+       2013-08-13 checkin below.  Change bool to BOOL, rule is:
+       All Obj-C code uses BOOL, except for interfaces callable from C.
+
+       * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
+
+2013-08-13  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
+       * nsterm.m (ns_set_vertical_scroll_bar): Use it.  Use convenient
+       bool instead of BOOL.
+       * w32term.h (struct scroll_bar): Convert fringe_extended_p
+       from Lisp_Object to bitfield.  Adjust comment.
+       * w32term.c (x_scroll_bar_create): Adjust user.
+       Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
+       * xterm.c (XTset_vertical_scroll_bar): Likewise.
+       Use bool for boolean.
+       * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
+       to `unsigned int' when defining a bitfield.
+
+2013-08-13  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
+
+2013-08-13  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * window.h (struct window): Convert left_margin_cols and
+       right_margin_cols from Lisp_Objects to integers.  Adjust comment.
+       (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
+       (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
+       Adjust users.
+       * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
+       Adjust comment.
+       (showing_window_margins_p, update_window_line, update_frame_1):
+       * fringe.c (draw_fringe_bitmap_1):
+       * xdisp.c (window_box_width): Adjust users.
+       * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
+       (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
+       Use direct assignment.
+       (Fset_window_configuration, save_window_save, Fwindow_margins):
+       Convert Lisp_Object to integer and back where appropriate.
+       (Fset_window_margins): Adjust user.  Return t if any margin
+       was actually changed, and mention this in docstring.
+
+2013-08-13  Xue Fuqiao  <xfq.free@gmail.com>
+
+       * syntax.c (forward_word):
+       * cmds.c (forward_char, backward_char): Mention the optional argument.
+
+2013-08-13  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * window.h (struct window): Convert left_fringe_width
+       and right_fringe_width from Lisp_Objects to integers.
+       Adjust comment.
+       (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
+       (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
+       * window.c (wset_left_fringe_width, wset_right_fringe_width):
+       Remove.
+       (make_window): Initialize new integer fields to -1.
+       (Fsplit_window_internal): Use direct assignment.
+       (Fset_window_configuration, save_window_save): Convert
+       Lisp_Object to integer and back where appropriate.
+       (Fset_window_fringes): Adjust user.  Return t if any fringe
+       was actually changed, and mention this in docstring.
+
+2013-08-13  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
+       * nsfns.m (x_set_cursor_type):
+       * w32fns.c (x_set_cursor_type):
+       * xfns.m (x_set_cursor_type): Do not set cursor_type_changed here...
+       * xdisp.c (set_frame_cursor_types): ...but in common code.
+
+2013-08-13  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * font.c (clear_font_cache): New function, stripped from...
+       (Fclear_font_cache): ...here, which now uses the function
+       above.  Adjust comment.
+       * font.h (clear_font_cache): Add prototype.
+       * xfaces.c (clear_face_cache): Use clear_font_cache.
+
+2013-08-13  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       * window.c (Fset_window_start): Compare `w', not `window' because
+       `w' might not be equal to `window' after call to decode_live_window.
+
+2013-08-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
+       This fixes a problem introduced by the Bug#15035 patch
+       when using GPG.  Reported by Herbert J. Skuhra.
+
 2013-08-12  Eli Zaretskii  <eliz@gnu.org>
 
        * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
index 2c2232601cbf6a87a8ed498d7db90685652a2bfe..c0d8c32b440b57254687fb0c6ef9aa71e8a0e0fd 100644 (file)
@@ -802,6 +802,15 @@ xstrdup (const char *s)
   return memcpy (xmalloc (size), s, size);
 }
 
+/* Like above, but duplicates Lisp string to C string.  */
+
+char *
+xlispstrdup (Lisp_Object string)
+{
+  ptrdiff_t size = SBYTES (string) + 1;
+  return memcpy (xmalloc (size), SSDATA (string), size);
+}
+
 /* Like putenv, but (1) use the equivalent of xmalloc and (2) the
    argument is a const pointer.  */
 
index f6e61cd28eedb6dfad332368494da5701f9e6d91..d9525f247d02a147750f371f3004dd5ca36089ae 100644 (file)
@@ -6115,7 +6115,7 @@ An entry (apply FUN-NAME . ARGS) means undo the change with
 
 An entry (apply DELTA BEG END FUN-NAME . ARGS) supports selective undo
 in the active region.  BEG and END is the range affected by this entry
-and DELTA is the number of bytes added or deleted in that range by
+and DELTA is the number of characters added or deleted in that range by
 this change.
 
 An entry (MARKER . DISTANCE) indicates that the marker MARKER
index 221db39329aaf4744b45065a268f6b21151ee638..55a9e8d2a1cdf1b131c31c750aefdfd17f8ac4b3 100644 (file)
@@ -1132,10 +1132,8 @@ extern Lisp_Object Qpriority, Qbefore_string, Qafter_string;
 /* FOR_EACH_LIVE_BUFFER (LIST_VAR, BUF_VAR) followed by a statement is
    a `for' loop which iterates over the buffers from Vbuffer_alist.  */
 
-#define FOR_EACH_LIVE_BUFFER(list_var, buf_var)                                \
-  for (list_var = Vbuffer_alist;                                       \
-       (CONSP (list_var) && (buf_var = XCDR (XCAR (list_var)), 1));    \
-       list_var = XCDR (list_var))
+#define FOR_EACH_LIVE_BUFFER(list_var, buf_var)                        \
+  FOR_EACH_ALIST_VALUE (Vbuffer_alist, list_var, buf_var)
 
 /* Get text properties of B.  */
 
index f43a5a990db003b260b5dfe70a6877c651b9155b..25096af506846b1885fee62b5bb245eb3136840d 100644 (file)
@@ -331,12 +331,9 @@ invoke it.  If KEYS is omitted or nil, the return value of
 
   /* If SPECS is set to a string, use it as an interactive prompt.  */
   if (STRINGP (specs))
-    {
-      /* Make a copy of string so that if a GC relocates specs,
-        `string' will still be valid.  */
-      string = alloca (SBYTES (specs) + 1);
-      memcpy (string, SSDATA (specs), SBYTES (specs) + 1);
-    }
+    /* Make a copy of string so that if a GC relocates specs,
+       `string' will still be valid.  */
+    string = xlispstrdupa (specs);
   else
     {
       Lisp_Object input;
index 3ebad50184a06b49026131338c3e630476dd8355..ce91877f85e85f051a7fba22dbaf09895d6ab0ca 100644 (file)
@@ -86,6 +86,7 @@ DEFUN ("forward-char", Fforward_char, Sforward_char, 0, 1, "^p",
        doc: /* Move point N characters forward (backward if N is negative).
 On reaching end or beginning of buffer, stop and signal error.
 Interactively, N is the numeric prefix argument.
+If N is omitted or nil, move point 1 character forward.
 
 Depending on the bidirectional context, the movement may be to the
 right or to the left on the screen.  This is in contrast with
@@ -99,6 +100,7 @@ DEFUN ("backward-char", Fbackward_char, Sbackward_char, 0, 1, "^p",
        doc: /* Move point N characters backward (forward if N is negative).
 On attempt to pass beginning or end of buffer, stop and signal error.
 Interactively, N is the numeric prefix argument.
+If N is omitted or nil, move point 1 character backward.
 
 Depending on the bidirectional context, the movement may be to the
 right or to the left on the screen.  This is in contrast with
index a09033ab8c33ffdb803ea66e01b51af31f1e7bbe..c49f39a8ba1cd44b1bd4ae1ccfbd1110b1c5b42a 100644 (file)
@@ -26,6 +26,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "character.h"
 #include "buffer.h"
 
+#include <verify.h>
+
 static Lisp_Object Qzlib_dll;
 
 #ifdef WINDOWSNT
@@ -93,12 +95,14 @@ unwind_decompress (void *ddata)
   struct decompress_unwind_data *data = ddata;
   fn_inflateEnd (data->stream);
 
-  /* Delete any uncompressed data already inserted and restore point.  */
+  /* Delete any uncompressed data already inserted on error.  */
   if (data->start)
-    {
-      del_range (data->start, PT);
-      SET_PT (data->old_point);
-    }
+    del_range (data->start, PT);
+
+  /* Put point where it was, or if the buffer has shrunk because the
+     compressed data is bigger than the uncompressed, at
+     point-max.  */
+  SET_PT (min (data->old_point, ZV));
 }
 
 DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0,
@@ -112,7 +116,8 @@ DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0,
   else
     {
       Lisp_Object status;
-      status = init_zlib_functions () ? Qt : Qnil;
+      zlib_initialized = init_zlib_functions ();
+      status = zlib_initialized ? Qt : Qnil;
       Vlibrary_cache = Fcons (Fcons (Qzlib_dll, status), Vlibrary_cache);
       return status;
     }
@@ -144,6 +149,8 @@ This function can be called only in unibyte buffers.  */)
 #ifdef WINDOWSNT
   if (!zlib_initialized)
     zlib_initialized = init_zlib_functions ();
+  if (!zlib_initialized)
+    return Qnil;
 #endif
 
   /* This is a unibyte buffer, so character positions and bytes are
@@ -158,7 +165,7 @@ This function can be called only in unibyte buffers.  */)
   stream.avail_in = 0;
   stream.next_in = Z_NULL;
 
-  /* The magic number 32 apparently means "autodect both the gzip and
+  /* The magic number 32 apparently means "autodetect both the gzip and
      zlib formats" according to zlib.h.  */
   if (fn_inflateInit2 (&stream, MAX_WBITS + 32) != Z_OK)
     return Qnil;
@@ -178,12 +185,11 @@ This function can be called only in unibyte buffers.  */)
   do
     {
       /* Maximum number of bytes that one 'inflate' call should read and write.
-        zlib requires that these values not exceed UINT_MAX.
-        Do not make avail_out too large, as that might unduly delay C-g.  */
+        Do not make avail_out too large, as that might unduly delay C-g.
+        zlib requires that avail_in and avail_out not exceed UINT_MAX.  */
       ptrdiff_t avail_in = min (iend - pos_byte, UINT_MAX);
-      ptrdiff_t avail_out = min (1 << 14, UINT_MAX);
-
-      ptrdiff_t decompressed;
+      int avail_out = 16 * 1024;
+      int decompressed;
 
       if (GAP_SIZE < avail_out)
        make_gap (avail_out - GAP_SIZE);
index 3959c303adbc6af5ec78eb0050c46e161a707b25..54d7a7461a0978d3dd1f13caff72c73663c77c14 100644 (file)
@@ -361,25 +361,19 @@ free_glyph_matrix (struct glyph_matrix *matrix)
 /* Return the number of glyphs to reserve for a marginal area of
    window W.  TOTAL_GLYPHS is the number of glyphs in a complete
    display line of window W.  MARGIN gives the width of the marginal
-   area in canonical character units.  MARGIN should be an integer
-   or a float.  */
+   area in canonical character units.  */
 
 static int
-margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin)
+margin_glyphs_to_reserve (struct window *w, int total_glyphs, int margin)
 {
-  int n;
-
-  if (NUMBERP (margin))
+  if (margin > 0)
     {
       int width = w->total_cols;
-      double d = max (0, XFLOATINT (margin));
+      double d = max (0, margin);
       d = min (width / 2 - 1, d);
-      n = (int) ((double) total_glyphs / width * d);
+      return (int) ((double) total_glyphs / width * d);
     }
-  else
-    n = 0;
-
-  return n;
+  return 0;
 }
 
 /* Return true if ROW's hash value is correct.
@@ -606,8 +600,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
 
              /* Window end is invalid, if inside of the rows that
                 are invalidated below.  */
-             if (INTEGERP (w->window_end_vpos)
-                 && XFASTINT (w->window_end_vpos) >= i)
+             if (w->window_end_vpos >= i)
                w->window_end_valid = 0;
 
              while (i < matrix->nrows)
@@ -1869,7 +1862,7 @@ showing_window_margins_p (struct window *w)
          if (showing_window_margins_p (XWINDOW (w->contents)))
            return 1;
        }
-      else if (!NILP (w->left_margin_cols) || !NILP (w->right_margin_cols))
+      else if (w->left_margin_cols > 0 || w->right_margin_cols > 0)
        return 1;
 
       w = NILP (w->next) ? 0 : XWINDOW (w->next);
@@ -3812,8 +3805,7 @@ update_window_line (struct window *w, int vpos, bool *mouse_face_overwritten_p)
       eassert (desired_row->enabled_p);
 
       /* Update display of the left margin area, if there is one.  */
-      if (!desired_row->full_width_p
-         && !NILP (w->left_margin_cols))
+      if (!desired_row->full_width_p && w->left_margin_cols > 0)
        {
          changed_p = 1;
          update_marginal_area (w, LEFT_MARGIN_AREA, vpos);
@@ -3833,8 +3825,7 @@ update_window_line (struct window *w, int vpos, bool *mouse_face_overwritten_p)
        }
 
       /* Update display of the right margin area, if there is one.  */
-      if (!desired_row->full_width_p
-         && !NILP (w->right_margin_cols))
+      if (!desired_row->full_width_p && w->right_margin_cols > 0)
        {
          changed_p = 1;
          update_marginal_area (w, RIGHT_MARGIN_AREA, vpos);
@@ -4617,10 +4608,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p)
              int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos);
              int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
 
-             if (INTEGERP (w->left_margin_cols))
-               x += XFASTINT (w->left_margin_cols);
-
-             /* x = max (min (x, FRAME_TOTAL_COLS (f) - 1), 0); */
+             x += max (0, w->left_margin_cols);
              cursor_to (f, y, x);
            }
        }
index 90346a88eb20d01f6a3c990fd2a6dd92bf75de1c..bbaeaea5240f8bca9787fe48d6ffb8594614ac33 100644 (file)
@@ -2330,6 +2330,10 @@ to multibyte for insertion (see `unibyte-char-to-multibyte').
 If the current buffer is unibyte, multibyte strings are converted
 to unibyte for insertion.
 
+If an overlay begins at the insertion point, the inserted text falls
+outside the overlay; if a nonempty overlay ends at the insertion
+point, the inserted text falls inside that overlay.
+
 usage: (insert-before-markers &rest ARGS)  */)
   (ptrdiff_t nargs, Lisp_Object *args)
 {
index 9b8283cd64c7bd588059ed26e44e165b963645e9..96a5d33f3635c2a7b8b6c11f65c6df744d74f234 100644 (file)
@@ -699,7 +699,8 @@ main (int argc, char **argv)
 #endif
 
 #ifdef G_SLICE_ALWAYS_MALLOC
-  /* This is used by the Cygwin build.  */
+  /* This is used by the Cygwin build.  It's not needed starting with
+     cygwin-1.7.24, but it doesn't do any harm.  */
   xputenv ("G_SLICE=always-malloc");
 #endif
 
index 6ec5f78c2cf19e1eae4797d6ce7db27cb5abb7ab..08caf1022667d37a6fce32d76a9ec93ad43d9268 100644 (file)
@@ -366,8 +366,7 @@ Given a Unix syntax file name, returns a string ending in slash.  */)
     }
 
 #ifdef DOS_NT
-  beg = alloca (SBYTES (filename) + 1);
-  memcpy (beg, SSDATA (filename), SBYTES (filename) + 1);
+  beg = xlispstrdupa (filename);
 #else
   beg = SSDATA (filename);
 #endif
@@ -944,8 +943,7 @@ filesystem tree, not (expand-file-name ".."  dirname).  */)
 #endif
 
   /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below.  */
-  nm = alloca (SBYTES (name) + 1);
-  memcpy (nm, SSDATA (name), SBYTES (name) + 1);
+  nm = xlispstrdupa (name);
 
 #ifdef DOS_NT
   /* Note if special escape prefix is present, but remove for now.  */
@@ -1693,8 +1691,7 @@ those `/' is discarded.  */)
   /* Always work on a copy of the string, in case GC happens during
      decode of environment variables, causing the original Lisp_String
      data to be relocated.  */
-  nm = alloca (SBYTES (filename) + 1);
-  memcpy (nm, SDATA (filename), SBYTES (filename) + 1);
+  nm = xlispstrdupa (filename);
 
 #ifdef DOS_NT
   dostounix_filename (nm, multibyte);
index 073487b540d28abb93e3de7a8a2e4332444d4ffc..6a8262623dc5170f0999bcb90fd1e4fc2c3c2209 100644 (file)
@@ -4226,36 +4226,38 @@ the consecutive wildcards are folded into one.  */)
   return make_string (name, namelen);
 }
 
+void
+clear_font_cache (struct frame *f)
+{
+  struct font_driver_list *driver_list = f->font_driver_list;
+
+  for (; driver_list; driver_list = driver_list->next)
+    if (driver_list->on)
+      {
+       Lisp_Object val, tmp, cache = driver_list->driver->get_cache (f);
+
+       val = XCDR (cache);
+       while (! NILP (val)
+              && ! EQ (XCAR (XCAR (val)), driver_list->driver->type))
+         val = XCDR (val);
+       eassert (! NILP (val));
+       tmp = XCDR (XCAR (val));
+       if (XINT (XCAR (tmp)) == 0)
+         {
+           font_clear_cache (f, XCAR (val), driver_list->driver);
+           XSETCDR (cache, XCDR (val));
+         }
+      }
+}
+
 DEFUN ("clear-font-cache", Fclear_font_cache, Sclear_font_cache, 0, 0, 0,
-       doc: /* Clear font cache.  */)
+       doc: /* Clear font cache of each frame.  */)
   (void)
 {
   Lisp_Object list, frame;
 
   FOR_EACH_FRAME (list, frame)
-    {
-      struct frame *f = XFRAME (frame);
-      struct font_driver_list *driver_list = f->font_driver_list;
-
-      for (; driver_list; driver_list = driver_list->next)
-       if (driver_list->on)
-         {
-           Lisp_Object cache = driver_list->driver->get_cache (f);
-           Lisp_Object val, tmp;
-
-           val = XCDR (cache);
-           while (! NILP (val)
-                  && ! EQ (XCAR (XCAR (val)), driver_list->driver->type))
-             val = XCDR (val);
-           eassert (! NILP (val));
-           tmp = XCDR (XCAR (val));
-           if (XINT (XCAR (tmp)) == 0)
-             {
-               font_clear_cache (f, XCAR (val), driver_list->driver);
-               XSETCDR (cache, XCDR (val));
-             }
-         }
-    }
+    clear_font_cache (XFRAME (frame));
 
   return Qnil;
 }
index daeb320c1ab8f4438d7bb298cfba51d2d20f479f..adb4a582fd821eefbe4b94b034024e38557383eb 100644 (file)
@@ -760,6 +760,7 @@ extern Lisp_Object font_load_for_lface (struct frame *f, Lisp_Object *lface,
                                         Lisp_Object spec);
 extern void font_prepare_for_face (struct frame *f, struct face *face);
 extern void font_done_for_face (struct frame *f, struct face *face);
+extern void clear_font_cache (struct frame *);
 
 extern Lisp_Object font_open_by_spec (struct frame *f, Lisp_Object spec);
 extern Lisp_Object font_open_by_name (struct frame *f, Lisp_Object name);
index a1f151a221e5cced029e27a979d3ff9af366d274..5ee001f4d98beab7fa76ca678ab76ff13bacf89e 100644 (file)
@@ -692,22 +692,14 @@ affects all frames on the same terminal device.  */)
                        ? FRAME_TTY (XFRAME (selected_frame))->name
                        : NULL));
       if (!NILP (tty))
-        {
-          name = alloca (SBYTES (tty) + 1);
-          memcpy (name, SSDATA (tty), SBYTES (tty));
-          name[SBYTES (tty)] = 0;
-        }
+       name = xlispstrdupa (tty);
 
       tty_type = get_future_frame_param
         (Qtty_type, parms, (FRAME_TERMCAP_P (XFRAME (selected_frame))
                             ? FRAME_TTY (XFRAME (selected_frame))->type
                             : NULL));
       if (!NILP (tty_type))
-        {
-          type = alloca (SBYTES (tty_type) + 1);
-          memcpy (type, SSDATA (tty_type), SBYTES (tty_type));
-          type[SBYTES (tty_type)] = 0;
-        }
+       type = xlispstrdupa (tty_type);
 
       t = init_tty (name, type, 0); /* Errors are not fatal.  */
     }
@@ -1205,10 +1197,18 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
   /* Don't let the frame remain selected.  */
   if (f == sf)
     {
-      Lisp_Object tail, frame1;
-
-      /* Look for another visible frame on the same terminal.  */
-      frame1 = next_frame (frame, Qvisible);
+      Lisp_Object tail;
+      Lisp_Object frame1 = Qnil;
+
+      /* Look for another visible frame on the same terminal.
+        Do not call next_frame here because it may loop forever.
+        See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15025.  */
+      FOR_EACH_FRAME (tail, frame1)
+       if (!EQ (frame, frame1)
+           && (FRAME_TERMINAL (XFRAME (frame))
+               == FRAME_TERMINAL (XFRAME (frame1)))
+           && FRAME_VISIBLE_P (XFRAME (frame1)))
+         break;
 
       /* If there is none, find *some* other frame.  */
       if (NILP (frame1) || EQ (frame1, frame))
index 1d05244e64ed8d7f0eeee2474caa1ea5cf5ba404..492eddae8d4b277f381ea5918bc2b461a0ba6a83 100644 (file)
@@ -666,7 +666,7 @@ draw_fringe_bitmap_1 (struct window *w, struct glyph_row *row, int left_p, int o
                     and OTOH leaving out that one pixel leaves behind
                     traces of the cursor, if it was in column zero
                     before drawing non-empty margin area.  */
-                 && NILP (w->left_margin_cols))
+                 && w->left_margin_cols == 0)
                 ? 1 : 0);
          p.bx = x - wd;
          p.nx = wd;
index ae38b4f764880fed5e5810a357e263959030ca89..7a6323ad33255ec8ab025c2a849efda8109a2bad 100644 (file)
@@ -302,11 +302,10 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
   id = x_allocate_bitmap_record (f);
   dpyinfo->bitmaps[id - 1].img = bitmap;
   dpyinfo->bitmaps[id - 1].refcount = 1;
-  dpyinfo->bitmaps[id - 1].file = xmalloc (SBYTES (file) + 1);
+  dpyinfo->bitmaps[id - 1].file = xlispstrdup (file);
   dpyinfo->bitmaps[id - 1].depth = 1;
   dpyinfo->bitmaps[id - 1].height = ns_image_width (bitmap);
   dpyinfo->bitmaps[id - 1].width = ns_image_height (bitmap);
-  strcpy (dpyinfo->bitmaps[id - 1].file, SSDATA (file));
   return id;
 #endif
 
@@ -345,11 +344,10 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
   dpyinfo->bitmaps[id - 1].pixmap = bitmap;
   dpyinfo->bitmaps[id - 1].have_mask = 0;
   dpyinfo->bitmaps[id - 1].refcount = 1;
-  dpyinfo->bitmaps[id - 1].file = xmalloc (SBYTES (file) + 1);
+  dpyinfo->bitmaps[id - 1].file = xlispstrdup (file);
   dpyinfo->bitmaps[id - 1].depth = 1;
   dpyinfo->bitmaps[id - 1].height = height;
   dpyinfo->bitmaps[id - 1].width = width;
-  strcpy (dpyinfo->bitmaps[id - 1].file, SSDATA (file));
 
   return id;
 #endif /* HAVE_X_WINDOWS */
@@ -1362,14 +1360,12 @@ static void cache_image (struct frame *f, struct image *img);
 struct image_cache *
 make_image_cache (void)
 {
-  struct image_cache *c = xzalloc (sizeof *c);
-  int size;
+  struct image_cache *c = xmalloc (sizeof *c);
 
-  size = 50;
-  c->images = xmalloc (size * sizeof *c->images);
-  c->size = size;
-  size = IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets;
-  c->buckets = xzalloc (size);
+  c->size = 50;
+  c->used = c->refcount = 0;
+  c->images = xmalloc (c->size * sizeof *c->images);
+  c->buckets = xzalloc (IMAGE_CACHE_BUCKETS_SIZE * sizeof *c->buckets);
   return c;
 }
 
@@ -7740,6 +7736,7 @@ enum imagemagick_keyword_index
     IMAGEMAGICK_WIDTH,
     IMAGEMAGICK_MAX_HEIGHT,
     IMAGEMAGICK_MAX_WIDTH,
+    IMAGEMAGICK_FORMAT,
     IMAGEMAGICK_ROTATION,
     IMAGEMAGICK_CROP,
     IMAGEMAGICK_LAST
@@ -7764,6 +7761,7 @@ static struct image_keyword imagemagick_format[IMAGEMAGICK_LAST] =
     {":width",         IMAGE_INTEGER_VALUE,                    0},
     {":max-height",    IMAGE_INTEGER_VALUE,                    0},
     {":max-width",     IMAGE_INTEGER_VALUE,                    0},
+    {":format",                IMAGE_SYMBOL_VALUE,                     0},
     {":rotation",      IMAGE_NUMBER_VALUE,                     0},
     {":crop",          IMAGE_DONT_CHECK_VALUE_TYPE,            0}
   };
@@ -7842,6 +7840,236 @@ imagemagick_error (MagickWand *wand)
   description = (char *) MagickRelinquishMemory (description);
 }
 
+/* Possibly give ImageMagick some extra help to determine the image
+   type by supplying a "dummy" filename based on the Content-Type.  */
+
+static char *
+imagemagick_filename_hint (Lisp_Object spec, char hint_buffer[MaxTextExtent])
+{
+  Lisp_Object symbol = intern ("image-format-suffixes");
+  Lisp_Object val = find_symbol_value (symbol);
+  Lisp_Object format;
+
+  if (! CONSP (val))
+    return NULL;
+
+  format = image_spec_value (spec, intern (":format"), NULL);
+  val = Fcar_safe (Fcdr_safe (Fassq (format, val)));
+  if (! STRINGP (val))
+    return NULL;
+
+  /* It's OK to truncate the hint if it has MaxTextExtent or more bytes,
+     as ImageMagick would ignore the extra bytes anyway.  */
+  snprintf (hint_buffer, MaxTextExtent, "/tmp/foo.%s", SSDATA (val));
+  return hint_buffer;
+}
+
+/* Animated images (e.g., GIF89a) are composed from one "master image"
+   (which is the first one, and then there's a number of images that
+   follow.  If following images have non-transparent colors, these are
+   composed "on top" of the master image.  So, in general, one has to
+   compute ann the preceding images to be able to display a particular
+   sub-image.
+
+   Computing all the preceding images is too slow, so we maintain a
+   cache of previously computed images.  We have to maintain a cache
+   separate from the image cache, because the images may be scaled
+   before display. */
+
+struct animation_cache
+{
+  char *signature;
+  MagickWand *wand;
+  int index;
+  EMACS_TIME update_time;
+  struct animation_cache *next;
+};
+
+static struct animation_cache *animation_cache = NULL;
+
+static struct animation_cache *
+imagemagick_create_cache (char *signature)
+{
+  struct animation_cache *cache = xmalloc (sizeof *cache);
+  cache->signature = signature;
+  cache->wand = 0;
+  cache->index = 0;
+  cache->next = 0;
+  cache->update_time = current_emacs_time ();
+  return cache;
+}
+
+/* Discard cached images that haven't been used for a minute. */
+static void
+imagemagick_prune_animation_cache (void)
+{
+  struct animation_cache **pcache = &animation_cache;
+  EMACS_TIME old = sub_emacs_time (current_emacs_time (),
+                                  make_emacs_time (60, 0));
+
+  while (*pcache)
+    {
+      struct animation_cache *cache = *pcache;
+      if (EMACS_TIME_LE (old, cache->update_time))
+       pcache = &cache->next;
+      else
+       {
+         DestroyString (cache->signature);
+         if (cache->wand)
+           DestroyMagickWand (cache->wand);
+         *pcache = cache->next;
+         xfree (cache);
+       }
+    }
+}
+
+static struct animation_cache *
+imagemagick_get_animation_cache (MagickWand *wand)
+{
+  char *signature = MagickGetImageSignature (wand);
+  struct animation_cache *cache;
+
+  imagemagick_prune_animation_cache ();
+  cache = animation_cache;
+
+  if (! cache)
+    {
+      animation_cache = imagemagick_create_cache (signature);
+      return animation_cache;
+    }
+
+  while (strcmp (signature, cache->signature) &&
+        cache->next)
+    cache = cache->next;
+
+  if (strcmp (signature, cache->signature))
+    {
+      cache->next = imagemagick_create_cache (signature);
+      return cache->next;
+    }
+
+  DestroyString (signature);
+  cache->update_time = current_emacs_time ();
+  return cache;
+}
+
+static MagickWand *
+imagemagick_compute_animated_image (MagickWand *super_wand, int ino)
+{
+  int i;
+  MagickWand *composite_wand;
+  size_t dest_width, dest_height;
+  struct animation_cache *cache = imagemagick_get_animation_cache (super_wand);
+
+  MagickSetIteratorIndex (super_wand, 0);
+
+  if (ino == 0 || cache->wand == NULL || cache->index > ino)
+    {
+      composite_wand = MagickGetImage (super_wand);
+      if (cache->wand)
+       DestroyMagickWand (cache->wand);
+    }
+  else
+    composite_wand = cache->wand;
+
+  dest_width = MagickGetImageWidth (composite_wand);
+  dest_height = MagickGetImageHeight (composite_wand);
+
+  for (i = max (1, cache->index + 1); i <= ino; i++)
+    {
+      MagickWand *sub_wand;
+      PixelIterator *source_iterator, *dest_iterator;
+      PixelWand **source, **dest;
+      size_t source_width, source_height;
+      ssize_t source_left, source_top;
+      MagickPixelPacket pixel;
+      DisposeType dispose;
+      ptrdiff_t lines = 0;
+
+      MagickSetIteratorIndex (super_wand, i);
+      sub_wand = MagickGetImage (super_wand);
+
+      MagickGetImagePage (sub_wand, &source_width, &source_height,
+                         &source_left, &source_top);
+
+      /* This flag says how to handle transparent pixels.  */
+      dispose = MagickGetImageDispose (sub_wand);
+
+      source_iterator = NewPixelIterator (sub_wand);
+      if (! source_iterator)
+       {
+         DestroyMagickWand (composite_wand);
+         DestroyMagickWand (sub_wand);
+         cache->wand = NULL;
+         image_error ("Imagemagick pixel iterator creation failed",
+                      Qnil, Qnil);
+         return NULL;
+       }
+
+      dest_iterator = NewPixelIterator (composite_wand);
+      if (! dest_iterator)
+       {
+         DestroyMagickWand (composite_wand);
+         DestroyMagickWand (sub_wand);
+         DestroyPixelIterator (source_iterator);
+         cache->wand = NULL;
+         image_error ("Imagemagick pixel iterator creation failed",
+                      Qnil, Qnil);
+         return NULL;
+       }
+
+      /* The sub-image may not start at origin, so move the destination
+        iterator to where the sub-image should start. */
+      if (source_top > 0)
+       {
+         PixelSetIteratorRow (dest_iterator, source_top);
+         lines = source_top;
+       }
+
+      while ((source = PixelGetNextIteratorRow (source_iterator, &source_width))
+            != NULL)
+       {
+         ptrdiff_t x;
+
+         /* Sanity check.  This shouldn't happen, but apparently
+            does in some pictures.  */
+         if (++lines >= dest_height)
+           break;
+
+         dest = PixelGetNextIteratorRow (dest_iterator, &dest_width);
+         for (x = 0; x < source_width; x++)
+           {
+             /* Sanity check.  This shouldn't happen, but apparently
+                also does in some pictures.  */
+             if (x + source_left > dest_width)
+               break;
+             /* Normally we only copy over non-transparent pixels,
+                but if the disposal method is "Background", then we
+                copy over all pixels.  */
+             if (dispose == BackgroundDispose ||
+                 PixelGetAlpha (source[x]))
+               {
+                 PixelGetMagickColor (source[x], &pixel);
+                 PixelSetMagickColor (dest[x + source_left], &pixel);
+               }
+           }
+         PixelSyncIterator (dest_iterator);
+       }
+
+      DestroyPixelIterator (source_iterator);
+      DestroyPixelIterator (dest_iterator);
+      DestroyMagickWand (sub_wand);
+    }
+
+  /* Cache a copy for the next iteration.  The current wand will be
+     destroyed by the caller. */
+  cache->wand = CloneMagickWand (composite_wand);
+  cache->index = ino;
+
+  return composite_wand;
+}
+
+
 /* Helper function for imagemagick_load, which does the actual loading
    given contents and size, apart from frame and image structures,
    passed from imagemagick_load.  Uses librimagemagick to do most of
@@ -7864,7 +8092,6 @@ imagemagick_load_image (struct frame *f, struct image *img,
   XImagePtr ximg;
   int x, y;
   MagickWand *image_wand;
-  MagickWand *ping_wand;
   PixelIterator *iterator;
   PixelWand **pixels, *bg_wand = NULL;
   MagickPixelPacket  pixel;
@@ -7875,6 +8102,8 @@ imagemagick_load_image (struct frame *f, struct image *img,
   int desired_width, desired_height;
   double rotation;
   int pixelwidth;
+  char hint_buffer[MaxTextExtent];
+  char *filename_hint = NULL;
 
   /* Handle image index for image types who can contain more than one image.
      Interface :index is same as for GIF.  First we "ping" the image to see how
@@ -7885,48 +8114,48 @@ imagemagick_load_image (struct frame *f, struct image *img,
   MagickWandGenesis ();
   image = image_spec_value (img->spec, QCindex, NULL);
   ino = INTEGERP (image) ? XFASTINT (image) : 0;
-  ping_wand = NewMagickWand ();
-  /* MagickSetResolution (ping_wand, 2, 2);   (Bug#10112)  */
+  image_wand = NewMagickWand ();
 
-  status = filename
-    ? MagickPingImage (ping_wand, filename)
-    : MagickPingImageBlob (ping_wand, contents, size);
+  if (filename)
+    status = MagickReadImage (image_wand, filename);
+  else
+    {
+      filename_hint = imagemagick_filename_hint (img->spec, hint_buffer);
+      MagickSetFilename (image_wand, filename_hint);
+      status = MagickReadImageBlob (image_wand, contents, size);
+    }
 
   if (status == MagickFalse)
     {
-      imagemagick_error (ping_wand);
-      DestroyMagickWand (ping_wand);
+      imagemagick_error (image_wand);
+      DestroyMagickWand (image_wand);
       return 0;
     }
 
-  if (ino < 0 || ino >= MagickGetNumberImages (ping_wand))
+  if (ino < 0 || ino >= MagickGetNumberImages (image_wand))
     {
       image_error ("Invalid image number `%s' in image `%s'",
                   image, img->spec);
-      DestroyMagickWand (ping_wand);
+      DestroyMagickWand (image_wand);
       return 0;
     }
 
-  if (MagickGetNumberImages (ping_wand) > 1)
+  if (MagickGetNumberImages (image_wand) > 1)
     img->lisp_data =
       Fcons (Qcount,
-             Fcons (make_number (MagickGetNumberImages (ping_wand)),
+             Fcons (make_number (MagickGetNumberImages (image_wand)),
                     img->lisp_data));
 
-  DestroyMagickWand (ping_wand);
-
-  /* Now we know how many images are inside the file.  If it's not a
-     bundle, the number is one.  Load the image data.  */
-
-  image_wand = NewMagickWand ();
-
-  if ((filename
-       ? MagickReadImage (image_wand, filename)
-       : MagickReadImageBlob (image_wand, contents, size))
-      == MagickFalse)
+  /* If we have an animated image, get the new wand based on the
+     "super-wand". */
+  if (MagickGetNumberImages (image_wand) > 1)
     {
-      imagemagick_error (image_wand);
-      goto imagemagick_error;
+      MagickWand *super_wand = image_wand;
+      image_wand = imagemagick_compute_animated_image (super_wand, ino);
+      if (! image_wand)
+       image_wand = super_wand;
+      else
+       DestroyMagickWand (super_wand);
     }
 
   /* Retrieve the frame's background color, for use later.  */
index 30707e5b3dba3e4154c6b36a3917b6900fd7a0c3..1aa25669b5b9c81ccb689a6f9d44294d37005440 100644 (file)
@@ -10150,8 +10150,6 @@ Also end any kbd macro being defined.  */)
       end_kbd_macro ();
     }
 
-  update_mode_lines++;
-
   Vunread_command_events = Qnil;
 
   discard_tty_input ();
index 981ab3f6f0ba3c34470ef3fd09f479aa2075e971..c672b5f31923d145bf871ac4c0f11bcf50f4355f 100644 (file)
@@ -4260,10 +4260,17 @@ extern void *xnrealloc (void *, ptrdiff_t, ptrdiff_t);
 extern void *xpalloc (void *, ptrdiff_t *, ptrdiff_t, ptrdiff_t, ptrdiff_t);
 
 extern char *xstrdup (const char *);
+extern char *xlispstrdup (Lisp_Object);
 extern void xputenv (const char *);
 
 extern char *egetenv (const char *);
 
+/* Copy Lisp string to temporary (allocated on stack) C string.  */
+
+#define xlispstrdupa(string)                   \
+  memcpy (alloca (SBYTES (string) + 1),                \
+         SSDATA (string), SBYTES (string) + 1)
+
 /* Set up the name of the machine we're running on.  */
 extern void init_system_name (void);
 
@@ -4340,6 +4347,12 @@ extern void *record_xmalloc (size_t);
       memory_full (SIZE_MAX);                                 \
   } while (0)
 
+/* Do a `for' loop over alist values.  */
+
+#define FOR_EACH_ALIST_VALUE(head_var, list_var, value_var)            \
+  for (list_var = head_var;                                            \
+       (CONSP (list_var) && (value_var = XCDR (XCAR (list_var)), 1));  \
+       list_var = XCDR (list_var))
 
 /* Check whether it's time for GC, and run it if so.  */
 
index 6c50def51a304187bb5509471d2578eca77224fa..2f91bdf9727803f7d6a74e1548afa2e3e4b0332f 100644 (file)
@@ -534,9 +534,9 @@ set_marker_internal (Lisp_Object marker, Lisp_Object position,
 }
 
 DEFUN ("set-marker", Fset_marker, Sset_marker, 2, 3, 0,
-       doc: /* Position MARKER before character number POSITION in BUFFER,
-which defaults to the current buffer.  If POSITION is nil,
-makes marker point nowhere so it no longer slows down
+       doc: /* Position MARKER before character number POSITION in BUFFER.
+If BUFFER is omitted or nil, it defaults to the current buffer.  If
+POSITION is nil, makes marker point nowhere so it no longer slows down
 editing in any buffer.  Returns MARKER.  */)
   (Lisp_Object marker, Lisp_Object position, Lisp_Object buffer)
 {
index ba0dba8c7e7e81be3039e38cf9e05b58ed3d9c59..fc276c2b12d482b0e5b6d341a49ff2c2fb91f180 100644 (file)
@@ -860,11 +860,7 @@ static void
 x_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   set_frame_cursor_types (f, arg);
-
-  /* Make sure the cursor gets redrawn.  */
-  cursor_type_changed = 1;
 }
-\f
 
 /* called to set mouse pointer color, but all other terms use it to
    initialize pointer types (and don't set the color ;) */
index 2850f0ed97d2753ce117cdcd935f410a3f8ede86..5af813ac7586a96cc05b3816829214cda9c2e7ff 100644 (file)
@@ -504,9 +504,11 @@ void
 x_activate_menubar (struct frame *f)
 {
 #ifdef NS_IMPL_COCOA
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
   ns_update_menubar (f, true, nil);
   ns_check_pending_open_menu ();
 #endif
+#endif
 }
 
 
@@ -563,7 +565,9 @@ extern NSString *NSMenuDidBeginTrackingNotification;
   /* Update menu in menuNeedsUpdate only while tracking menus.  */
   trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification
                   ? 1 : 0);
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
   if (! trackingMenu) ns_check_menu_open (nil);
+#endif
 }
 
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
@@ -571,7 +575,7 @@ extern NSString *NSMenuDidBeginTrackingNotification;
 {
   ++trackingMenu;
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_6
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
   // On 10.6 we get repeated calls, only the one for NSSystemDefined is "real".
   if ([[NSApp currentEvent] type] != NSSystemDefined) return;
 #endif
index 7843f369d24c5a785ae5ef08e6402bc2d6e67fc4..c34067991f62bc583231990a993bccc8addc4d5f 100644 (file)
@@ -53,9 +53,24 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 /* CGFloat on GNUStep may be 4 or 8 byte, but functions expect float* for some
    versions.
-   On Cocoa, functions expect CGFloat*. Make compatible type.  */
-#if defined (NS_IMPL_COCOA) || GNUSTEP_GUI_MAJOR_VERSION > 0 || \
-    GNUSTEP_GUI_MINOR_VERSION >= 22
+   On Cocoa >= 10.5, functions expect CGFloat*. Make compatible type.  */
+#ifdef NS_IMPL_COCOA
+
+#ifndef NS_HAVE_NSINTEGER
+#if defined (__LP64__) && __LP64__
+typedef double CGFloat;
+typedef long NSInteger;
+typedef unsigned long NSUInteger;
+#else
+typedef float CGFloat;
+typedef int NSInteger;
+typedef unsigned int NSUInteger;
+#endif /* not LP64 */
+#endif /* not NS_HAVE_NSINTEGER */
+
+typedef CGFloat EmacsCGFloat;
+
+#elif GNUSTEP_GUI_MAJOR_VERSION > 0 || GNUSTEP_GUI_MINOR_VERSION >= 22
 typedef CGFloat EmacsCGFloat;
 #else
 typedef float EmacsCGFloat;
@@ -424,18 +439,6 @@ extern EmacsMenu *mainMenu, *svcsMenu, *dockMenu;
 @end
 #endif
 
-#ifndef NS_HAVE_NSINTEGER
-#if defined (__LP64__) && __LP64__
-typedef double CGFloat;
-typedef long NSInteger;
-typedef unsigned long NSUInteger;
-#else
-typedef float CGFloat;
-typedef int NSInteger;
-typedef unsigned int NSUInteger;
-#endif /* not LP64 */
-#endif /* not NS_HAVE_NSINTEGER */
-
 #endif  /* __OBJC__ */
 
 
index e519244ac9997c9c130986b3d070b4f256ed9024..f374bfd90c630f9a521dba44bacd5d024cc0b0be 100644 (file)
@@ -3740,16 +3740,7 @@ ns_set_vertical_scroll_bar (struct window *window,
   v = [view frame];
   r.origin.y = (v.size.height - r.size.height - r.origin.y);
 
-  if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (window))
-    fringe_extended_p = (WINDOW_LEFTMOST_P (window)
-                        && WINDOW_LEFT_FRINGE_WIDTH (window)
-                        && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (window)
-                            || WINDOW_LEFT_MARGIN_COLS (window) == 0));
-  else
-    fringe_extended_p = (WINDOW_RIGHTMOST_P (window)
-                        && WINDOW_RIGHT_FRINGE_WIDTH (window)
-                        && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (window)
-                            || WINDOW_RIGHT_MARGIN_COLS (window) == 0));
+  fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (window);
 
   XSETWINDOW (win, window);
   block_input ();
index a2bcffe5160783109a591bf6f546a4310687778b..c4dd87a6b4850e984cd8c3ef46ad2cec058c5a84 100644 (file)
@@ -361,6 +361,12 @@ static struct sockaddr_and_len {
 #define DATAGRAM_CONN_P(proc)  (0)
 #endif
 
+/* FOR_EACH_PROCESS (LIST_VAR, PROC_VAR) followed by a statement is
+   a `for' loop which iterates over processes from Vprocess_alist.  */
+
+#define FOR_EACH_PROCESS(list_var, proc_var)                   \
+  FOR_EACH_ALIST_VALUE (Vprocess_alist, list_var, proc_var)
+
 /* These setters are used only in this file, so they can be private.  */
 static void
 pset_buffer (struct Lisp_Process *p, Lisp_Object val)
@@ -1887,7 +1893,7 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir)
 #ifndef WINDOWSNT
       /* Wait for child_setup to complete in case that vfork is
         actually defined as fork.  The descriptor
-        XPROCESS (proc)->open_fd[EXEC_MOINTOR_OUTPUT]
+        XPROCESS (proc)->open_fd[EXEC_MONITOR_OUTPUT]
         of a pipe is closed at the child side either by close-on-exec
         on successful execve or the _exit call in child_setup.  */
       {
@@ -3842,6 +3848,8 @@ deactivate_process (Lisp_Object proc)
 
   if (inchannel >= 0)
     {
+      p->infd  = -1;
+      p->outfd = -1;
 #ifdef DATAGRAM_SOCKETS
       if (DATAGRAM_CHAN_P (inchannel))
        {
@@ -6133,7 +6141,7 @@ static signal_handler_t volatile lib_child_handler;
 static void
 handle_child_signal (int sig)
 {
-  Lisp_Object tail;
+  Lisp_Object tail, proc;
 
   /* Find the process that signaled us, and record its status.  */
 
@@ -6145,7 +6153,10 @@ handle_child_signal (int sig)
        = (MOST_NEGATIVE_FIXNUM <= TYPE_MINIMUM (pid_t)
           && TYPE_MAXIMUM (pid_t) <= MOST_POSITIVE_FIXNUM);
       Lisp_Object head = XCAR (tail);
-      Lisp_Object xpid = XCAR (head);
+      Lisp_Object xpid;
+      if (! CONSP (head))
+       continue;
+      xpid = XCAR (head);
       if (all_pids_are_fixnums ? INTEGERP (xpid) : NUMBERP (xpid))
        {
          pid_t deleted_pid;
@@ -6163,9 +6174,8 @@ handle_child_signal (int sig)
     }
 
   /* Otherwise, if it is asynchronous, it is in Vprocess_alist.  */
-  for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
+  FOR_EACH_PROCESS (tail, proc)
     {
-      Lisp_Object proc = XCDR (XCAR (tail));
       struct Lisp_Process *p = XPROCESS (proc);
       int status;
 
@@ -6320,13 +6330,10 @@ status_notify (struct Lisp_Process *deleting_process)
      that we run, we get called again to handle their status changes.  */
   update_tick = process_tick;
 
-  for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
+  FOR_EACH_PROCESS (tail, proc)
     {
       Lisp_Object symbol;
-      register struct Lisp_Process *p;
-
-      proc = Fcdr (XCAR (tail));
-      p = XPROCESS (proc);
+      register struct Lisp_Process *p = XPROCESS (proc);
 
       if (p->tick != p->update_tick)
        {
@@ -6849,12 +6856,9 @@ BUFFER may be a buffer or the name of one.  */)
   buf = Fget_buffer (buffer);
   if (NILP (buf)) return Qnil;
 
-  for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
-    {
-      proc = Fcdr (XCAR (tail));
-      if (PROCESSP (proc) && EQ (XPROCESS (proc)->buffer, buf))
-       return proc;
-    }
+  FOR_EACH_PROCESS (tail, proc)
+    if (EQ (XPROCESS (proc)->buffer, buf))
+      return proc;
 #endif /* subprocesses */
   return Qnil;
 }
@@ -6887,18 +6891,14 @@ kill_buffer_processes (Lisp_Object buffer)
 #ifdef subprocesses
   Lisp_Object tail, proc;
 
-  for (tail = Vprocess_alist; CONSP (tail); tail = XCDR (tail))
-    {
-      proc = XCDR (XCAR (tail));
-      if (PROCESSP (proc)
-         && (NILP (buffer) || EQ (XPROCESS (proc)->buffer, buffer)))
-       {
-         if (NETCONN_P (proc) || SERIALCONN_P (proc))
-           Fdelete_process (proc);
-         else if (XPROCESS (proc)->infd >= 0)
-           process_send_signal (proc, SIGHUP, Qnil, 1);
-       }
-    }
+  FOR_EACH_PROCESS (tail, proc)
+    if (NILP (buffer) || EQ (XPROCESS (proc)->buffer, buffer))
+      {
+       if (NETCONN_P (proc) || SERIALCONN_P (proc))
+         Fdelete_process (proc);
+       else if (XPROCESS (proc)->infd >= 0)
+         process_send_signal (proc, SIGHUP, Qnil, 1);
+      }
 #else  /* subprocesses */
   /* Since we have no subprocesses, this does nothing.  */
 #endif /* subprocesses */
index 54eef60c27df554b2afd23faeb05aa50a55df595..daff0c1d700a6b0bc9f207ccabfe429f0337cbff 100644 (file)
@@ -26,10 +26,18 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <unistd.h>
 
 #ifdef __x86_64__
+#ifdef ENABLE_CHECKING
+#define STATIC_HEAP_SIZE       (28 * 1024 * 1024)
+#else
+#define STATIC_HEAP_SIZE       (19 * 1024 * 1024)
+#endif
+#else  /* x86 */
+#ifdef ENABLE_CHECKING
 #define STATIC_HEAP_SIZE       (18 * 1024 * 1024)
 #else
 #define STATIC_HEAP_SIZE       (13 * 1024 * 1024)
 #endif
+#endif /* x86 */
 
 int debug_sheap = 0;
 
@@ -37,6 +45,7 @@ int debug_sheap = 0;
 
 char bss_sbrk_buffer[STATIC_HEAP_SIZE];
 char *bss_sbrk_ptr;
+char *max_bss_sbrk_ptr;
 int bss_sbrk_did_unexec;
 
 void *
@@ -44,7 +53,7 @@ bss_sbrk (ptrdiff_t request_size)
 {
   if (!bss_sbrk_ptr)
     {
-      bss_sbrk_ptr = bss_sbrk_buffer;
+      max_bss_sbrk_ptr = bss_sbrk_ptr = bss_sbrk_buffer;
 #ifdef CYGWIN
       sbrk (BLOCKSIZE);                /* force space for fork to work */
 #endif
@@ -85,6 +94,8 @@ bss_sbrk (ptrdiff_t request_size)
       if (debug_sheap)
        printf ("allocated 0x%08x size %d\n", ret, request_size);
       bss_sbrk_ptr += (int) request_size;
+      if (bss_sbrk_ptr > max_bss_sbrk_ptr)
+       max_bss_sbrk_ptr = bss_sbrk_ptr;
       return ret;
     }
 }
@@ -93,8 +104,8 @@ void
 report_sheap_usage (int die_if_pure_storage_exceeded)
 {
   char buf[200];
-  sprintf (buf, "Static heap usage: %d of %d bytes",
-          bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE);
+  sprintf (buf, "Maximum static heap usage: %d of %d bytes",
+          max_bss_sbrk_ptr - bss_sbrk_buffer, STATIC_HEAP_SIZE);
   /* Don't log messages, cause at this point, we're not allowed to create
      buffers.  */
   message1_nolog (buf);
index 6d52d115889065777da232c88a1d5edd05d6cce0..f5b37303a4a06ec4f832e189232b2f28408f0055 100644 (file)
@@ -1464,6 +1464,7 @@ scan_words (register ptrdiff_t from, register EMACS_INT count)
 
 DEFUN ("forward-word", Fforward_word, Sforward_word, 0, 1, "^p",
        doc: /* Move point forward ARG words (backward if ARG is negative).
+If ARG is omitted or nil, move point forward one word.
 Normally returns t.
 If an edge of the buffer or a field boundary is reached, point is left there
 and the function returns nil.  Field boundaries are not noticed if
index fb69aefbe7a2c9c99a57f267041f0f9430949772..2966466aed216ee1004571b3a61fda16a9464f2e 100644 (file)
@@ -2233,8 +2233,7 @@ get_named_tty (const char *name)
 {
   struct terminal *t;
 
-  if (!name)
-    emacs_abort ();
+  eassert (name);
 
   for (t = terminal_list; t; t = t->next_terminal)
     {
@@ -2786,8 +2785,7 @@ create_tty_output (struct frame *f)
 {
   struct tty_output *t = xzalloc (sizeof *t);
 
-  if (! FRAME_TERMCAP_P (f))
-    emacs_abort ();
+  eassert (FRAME_TERMCAP_P (f));
 
   t->display_info = FRAME_TERMINAL (f)->display_info.tty;
 
@@ -2799,8 +2797,7 @@ create_tty_output (struct frame *f)
 static void
 tty_free_frame_resources (struct frame *f)
 {
-  if (! FRAME_TERMCAP_P (f))
-    emacs_abort ();
+  eassert (FRAME_TERMCAP_P (f));
 
   if (FRAME_FACE_CACHE (f))
     free_frame_faces (f);
@@ -2815,8 +2812,7 @@ tty_free_frame_resources (struct frame *f)
 static void
 tty_free_frame_resources (struct frame *f)
 {
-  if (! FRAME_TERMCAP_P (f) && ! FRAME_MSDOS_P (f))
-    emacs_abort ();
+  eassert (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f));
 
   if (FRAME_FACE_CACHE (f))
     free_frame_faces (f);
@@ -3443,8 +3439,7 @@ delete_tty (struct terminal *terminal)
   if (!terminal->name)
     return;
 
-  if (terminal->type != output_termcap)
-    emacs_abort ();
+  eassert (terminal->type == output_termcap);
 
   tty = terminal->display_info.tty;
 
index c43b7d4adf371e75315f59325ff02ac2a986fe37..b8c445a3a360f8eee02b9dad7a0517f4020da313 100644 (file)
@@ -1528,11 +1528,8 @@ void
 x_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   set_frame_cursor_types (f, arg);
-
-  /* Make sure the cursor gets redrawn.  */
-  cursor_type_changed = 1;
 }
-\f
+
 void
 x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
index 15812f93ff5fc784ec3595b18c690a7bba830e19..7d51850559bae1ad1da94b330675a8679316e3cd 100644 (file)
@@ -3757,7 +3757,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
   HWND hwnd;
   SCROLLINFO si;
   struct scroll_bar *bar
-    = XSCROLL_BAR (Fmake_vector (make_number (VECSIZE (struct scroll_bar)), Qnil));
+    = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, fringe_extended_p, PVEC_OTHER);
   Lisp_Object barobj;
 
   block_input ();
@@ -3770,7 +3770,7 @@ x_scroll_bar_create (struct window *w, int top, int left, int width, int height)
   XSETINT (bar->start, 0);
   XSETINT (bar->end, 0);
   bar->dragging = Qnil;
-  bar->fringe_extended_p = Qnil;
+  bar->fringe_extended_p = 0;
 
   /* Requires geometry to be set before call to create the real window */
 
@@ -3834,7 +3834,7 @@ w32_set_vertical_scroll_bar (struct window *w,
   struct scroll_bar *bar;
   int top, height, left, sb_left, width, sb_width;
   int window_y, window_height;
-  int fringe_extended_p;
+  bool fringe_extended_p;
 
   /* Get window dimensions.  */
   window_box (w, -1, 0, &window_y, 0, &window_height);
@@ -3858,16 +3858,7 @@ w32_set_vertical_scroll_bar (struct window *w,
   else
     sb_left = left + (WINDOW_LEFTMOST_P (w) ? 0 : width - sb_width);
 
-  if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
-    fringe_extended_p = (WINDOW_LEFTMOST_P (w)
-                        && WINDOW_LEFT_FRINGE_WIDTH (w)
-                        && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
-                            || WINDOW_LEFT_MARGIN_COLS (w) == 0));
-  else
-    fringe_extended_p = (WINDOW_RIGHTMOST_P (w)
-                        && WINDOW_RIGHT_FRINGE_WIDTH (w)
-                        && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
-                            || WINDOW_RIGHT_MARGIN_COLS (w) == 0));
+  fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (w);
 
   /* Does the scroll bar exist yet?  */
   if (NILP (w->vertical_scroll_bar))
@@ -3896,11 +3887,11 @@ w32_set_vertical_scroll_bar (struct window *w,
       hwnd = SCROLL_BAR_W32_WINDOW (bar);
 
       /* If already correctly positioned, do nothing.  */
-      if ( XINT (bar->left) == sb_left
-           && XINT (bar->top) == top
-           && XINT (bar->width) ==  sb_width
-           && XINT (bar->height) == height
-          && !NILP (bar->fringe_extended_p) == fringe_extended_p )
+      if (XINT (bar->left) == sb_left
+         && XINT (bar->top) == top
+         && XINT (bar->width) == sb_width
+         && XINT (bar->height) == height
+         && bar->fringe_extended_p == fringe_extended_p)
         {
           /* Redraw after clear_frame. */
           if (!my_show_window (f, hwnd, SW_NORMAL))
@@ -3950,7 +3941,7 @@ w32_set_vertical_scroll_bar (struct window *w,
           unblock_input ();
         }
     }
-  bar->fringe_extended_p = fringe_extended_p ? Qt : Qnil;
+  bar->fringe_extended_p = fringe_extended_p;
 
   w32_set_scroll_bar_thumb (bar, portion, position, whole);
   XSETVECTOR (barobj, bar);
@@ -6472,9 +6463,7 @@ w32_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
   terminal = w32_create_terminal (dpyinfo);
 
   /* Set the name of the terminal. */
-  terminal->name = xmalloc (SBYTES (display_name) + 1);
-  strncpy (terminal->name, SDATA (display_name), SBYTES (display_name));
-  terminal->name[SBYTES (display_name)] = 0;
+  terminal->name = xlispstrdup (display_name);
 
   dpyinfo->xrdb = xrm_option ? w32_make_rdb (xrm_option) : NULL;
 
index 3c9cce35221c846fca2e8cf9e19e1d193686d347..41c5c71832a922ae620499760d295b15dff56f5a 100644 (file)
@@ -451,9 +451,11 @@ struct scroll_bar {
      being dragged, this is Qnil.  */
   Lisp_Object dragging;
 
-  /* t if the background of the fringe that is adjacent to a scroll
+  /* 1 if the background of the fringe that is adjacent to a scroll
      bar is extended to the gap between the fringe and the bar.  */
-  Lisp_Object fringe_extended_p;
+  /* Note: this could be a bit field, but we need to take its address
+     in ALLOCATE_PSEUDOVECTOR (see x_scroll_bar_create).  */
+  bool fringe_extended_p;
 };
 
 /* Turning a lisp vector value into a pointer to a struct scroll_bar.  */
index 82639b6d8ce43ebe37408ba82d4a21fb8db8229a..887c3a92ab7b02f87cd76e3583d6ff583aeb4bf5 100644 (file)
@@ -90,6 +90,14 @@ static void window_resize_apply (struct window *, bool);
 static Lisp_Object select_window (Lisp_Object, Lisp_Object, int);
 static void select_window_1 (Lisp_Object, bool);
 
+static struct window *set_window_fringes (struct window *, Lisp_Object,
+                                         Lisp_Object, Lisp_Object);
+static struct window *set_window_margins (struct window *, Lisp_Object,
+                                         Lisp_Object);
+static struct window *set_window_scroll_bars (struct window *, Lisp_Object,
+                                             Lisp_Object, Lisp_Object);
+static void apply_window_adjustment (struct window *);
+
 /* This is the window in which the terminal's cursor should
    be left when nothing is being done with it.  This must
    always be a leaf window, and its buffer is selected by
@@ -154,16 +162,6 @@ wset_display_table (struct window *w, Lisp_Object val)
   w->display_table = val;
 }
 static void
-wset_left_fringe_width (struct window *w, Lisp_Object val)
-{
-  w->left_fringe_width = val;
-}
-static void
-wset_left_margin_cols (struct window *w, Lisp_Object val)
-{
-  w->left_margin_cols = val;
-}
-static void
 wset_new_normal (struct window *w, Lisp_Object val)
 {
   w->new_normal = val;
@@ -194,21 +192,6 @@ wset_pointm (struct window *w, Lisp_Object val)
   w->pointm = val;
 }
 static void
-wset_right_fringe_width (struct window *w, Lisp_Object val)
-{
-  w->right_fringe_width = val;
-}
-static void
-wset_right_margin_cols (struct window *w, Lisp_Object val)
-{
-  w->right_margin_cols = val;
-}
-static void
-wset_scroll_bar_width (struct window *w, Lisp_Object val)
-{
-  w->scroll_bar_width = val;
-}
-static void
 wset_start (struct window *w, Lisp_Object val)
 {
   w->start = val;
@@ -1559,7 +1542,7 @@ if it isn't already recorded.  */)
        set_buffer_internal (old_buffer);
     }
   else
-    XSETINT (value, BUF_Z (b) - XFASTINT (w->window_end_pos));
+    XSETINT (value, BUF_Z (b) - w->window_end_pos);
 
   return value;
 }
@@ -1615,7 +1598,7 @@ overriding motion of point in order to display at this exact start.  */)
   if (NILP (noforce))
     w->force_start = 1;
   w->update_mode_line = 1;
-  if (!EQ (window, selected_window))
+  if (w != XWINDOW (selected_window))
     /* Enforce full redisplay.  FIXME: make it more selective.  */
     windows_or_buffers_changed++;
 
@@ -2053,8 +2036,8 @@ replace_window (Lisp_Object old, Lisp_Object new, int setflag)
       n->phys_cursor_width = -1;
       n->must_be_updated_p = 0;
       n->pseudo_window_p = 0;
-      wset_window_end_vpos (n, make_number (0));
-      wset_window_end_pos (n, make_number (0));
+      n->window_end_vpos = 0;
+      n->window_end_pos = 0;
       n->window_end_valid = 0;
     }
 
@@ -3071,15 +3054,12 @@ adjust_window_margins (struct window *w)
   if (WINDOW_RIGHT_MARGIN_COLS (w) > 0)
     {
       if (WINDOW_LEFT_MARGIN_COLS (w) > 0)
-       {
-         wset_left_margin_cols (w, make_number (margin_cols / 2));
-         wset_right_margin_cols (w, make_number (margin_cols / 2));
-       }
+       w->left_margin_cols = w->right_margin_cols = margin_cols / 2;
       else
-       wset_right_margin_cols (w, make_number (margin_cols));
+       w->right_margin_cols = margin_cols;
     }
   else
-    wset_left_margin_cols (w, make_number (margin_cols));
+    w->left_margin_cols = margin_cols;
   return 1;
 }
 \f
@@ -3193,8 +3173,8 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer,
     bset_display_count (b, make_number (XINT (BVAR (b, display_count)) + 1));
   bset_display_time (b, Fcurrent_time ());
 
-  wset_window_end_pos (w, make_number (0));
-  wset_window_end_vpos (w, make_number (0));
+  w->window_end_pos = 0;
+  w->window_end_vpos = 0;
   memset (&w->last_cursor, 0, sizeof w->last_cursor);
 
   if (!(keep_margins_p && samebuf))
@@ -3233,28 +3213,14 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer,
   if (!keep_margins_p)
     {
       /* Set left and right marginal area width etc. from buffer.  */
-
-      /* This may call adjust_window_margins three times, so
-        temporarily disable window margins.  */
-      Lisp_Object save_left = w->left_margin_cols;
-      Lisp_Object save_right = w->right_margin_cols;
-
-      wset_left_margin_cols (w, Qnil);
-      wset_right_margin_cols (w, Qnil);
-
-      Fset_window_fringes (window,
-                          BVAR (b, left_fringe_width), BVAR (b, right_fringe_width),
-                          BVAR (b, fringes_outside_margins));
-
-      Fset_window_scroll_bars (window,
-                              BVAR (b, scroll_bar_width),
-                              BVAR (b, vertical_scroll_bar_type), Qnil);
-
-      wset_left_margin_cols (w, save_left);
-      wset_right_margin_cols (w, save_right);
-
-      Fset_window_margins (window,
-                          BVAR (b, left_margin_cols), BVAR (b, right_margin_cols));
+      set_window_fringes (w, BVAR (b, left_fringe_width),
+                         BVAR (b, right_fringe_width),
+                         BVAR (b, fringes_outside_margins));
+      set_window_scroll_bars (w, BVAR (b, scroll_bar_width),
+                             BVAR (b, vertical_scroll_bar_type), Qnil);
+      set_window_margins (w, BVAR (b, left_margin_cols),
+                         BVAR (b, right_margin_cols));
+      apply_window_adjustment (w);
     }
 
   if (run_hooks_p)
@@ -3474,8 +3440,6 @@ make_window (void)
   wset_start (w, Fmake_marker ());
   wset_pointm (w, Fmake_marker ());
   wset_vertical_scroll_bar_type (w, Qt);
-  wset_window_end_pos (w, make_number (0));
-  wset_window_end_vpos (w, make_number (0));
   /* These Lisp fields are marked specially so they're not set to nil by
      allocate_window.  */
   wset_prev_buffers (w, Qnil);
@@ -3484,8 +3448,10 @@ make_window (void)
   /* Initialize non-Lisp data.  Note that allocate_window zeroes out all
      non-Lisp data, so do it only for slots which should not be zero.  */
   w->nrows_scale_factor = w->ncols_scale_factor = 1;
+  w->left_fringe_width = w->right_fringe_width = -1;
   w->phys_cursor_type = -1;
   w->phys_cursor_width = -1;
+  w->scroll_bar_width = -1;
   w->column_number_displayed = -1;
 
   /* Reset window_list.  */
@@ -3951,12 +3917,12 @@ set correctly.  See the code of `split-window' for how this is done.  */)
   memset (&n->last_cursor, 0, sizeof n->last_cursor);
 
   /* Get special geometry settings from reference window.  */
-  wset_left_margin_cols (n, r->left_margin_cols);
-  wset_right_margin_cols (n, r->right_margin_cols);
-  wset_left_fringe_width (n, r->left_fringe_width);
-  wset_right_fringe_width (n, r->right_fringe_width);
+  n->left_margin_cols = r->left_margin_cols;
+  n->right_margin_cols = r->right_margin_cols;
+  n->left_fringe_width = r->left_fringe_width;
+  n->right_fringe_width = r->right_fringe_width;
   n->fringes_outside_margins = r->fringes_outside_margins;
-  wset_scroll_bar_width (n, r->scroll_bar_width);
+  n->scroll_bar_width = r->scroll_bar_width;
   wset_vertical_scroll_bar_type (n, r->vertical_scroll_bar_type);
 
   /* Directly assign orthogonal coordinates and sizes.  */
@@ -5697,12 +5663,12 @@ the return value is nil.  Otherwise the value is t.  */)
          w->hscroll = XFASTINT (p->hscroll);
          w->min_hscroll = XFASTINT (p->min_hscroll);
          wset_display_table (w, p->display_table);
-         wset_left_margin_cols (w, p->left_margin_cols);
-         wset_right_margin_cols (w, p->right_margin_cols);
-         wset_left_fringe_width (w, p->left_fringe_width);
-         wset_right_fringe_width (w, p->right_fringe_width);
+         w->left_margin_cols = XINT (p->left_margin_cols);
+         w->right_margin_cols = XINT (p->right_margin_cols);
+         w->left_fringe_width = XINT (p->left_fringe_width);
+         w->right_fringe_width = XINT (p->right_fringe_width);
          w->fringes_outside_margins = !NILP (p->fringes_outside_margins);
-         wset_scroll_bar_width (w, p->scroll_bar_width);
+         w->scroll_bar_width = XINT (p->scroll_bar_width);
          wset_vertical_scroll_bar_type (w, p->vertical_scroll_bar_type);
          wset_dedicated (w, p->dedicated);
          wset_combination_limit (w, p->combination_limit);
@@ -5998,12 +5964,12 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i)
       XSETFASTINT (p->hscroll, w->hscroll);
       XSETFASTINT (p->min_hscroll, w->min_hscroll);
       p->display_table = w->display_table;
-      p->left_margin_cols = w->left_margin_cols;
-      p->right_margin_cols = w->right_margin_cols;
-      p->left_fringe_width = w->left_fringe_width;
-      p->right_fringe_width = w->right_fringe_width;
+      p->left_margin_cols = make_number (w->left_margin_cols);
+      p->right_margin_cols = make_number (w->right_margin_cols);
+      p->left_fringe_width = make_number (w->left_fringe_width);
+      p->right_fringe_width = make_number (w->right_fringe_width);
       p->fringes_outside_margins = w->fringes_outside_margins ? Qt : Qnil;
-      p->scroll_bar_width = w->scroll_bar_width;
+      p->scroll_bar_width = make_number (w->scroll_bar_width);
       p->vertical_scroll_bar_type = w->vertical_scroll_bar_type;
       p->dedicated = w->dedicated;
       p->combination_limit = w->combination_limit;
@@ -6144,11 +6110,46 @@ saved by this function.  */)
   XSETWINDOW_CONFIGURATION (tem, data);
   return (tem);
 }
+
+/* Called after W's margins, fringes or scroll bars was adjusted.  */
+
+static void
+apply_window_adjustment (struct window *w)
+{
+  eassert (w);
+  adjust_window_margins (w);
+  clear_glyph_matrix (w->current_matrix);
+  w->window_end_valid = 0;
+  windows_or_buffers_changed++;
+  adjust_glyphs (XFRAME (WINDOW_FRAME (w)));
+}
+
 \f
 /***********************************************************************
                            Marginal Areas
  ***********************************************************************/
 
+static struct window *
+set_window_margins (struct window *w, Lisp_Object left_width,
+                   Lisp_Object right_width)
+{
+  int left, right;
+
+  /* FIXME: what about margins that are too wide?  */
+  left = (NILP (left_width) ? 0
+         : (CHECK_NATNUM (left_width), XINT (left_width)));
+  right = (NILP (right_width) ? 0
+          : (CHECK_NATNUM (right_width), XINT (right_width)));
+
+  if (w->left_margin_cols != left || w->right_margin_cols != right)
+    {
+      w->left_margin_cols = left;
+      w->right_margin_cols = right;
+      return w;
+    }
+  return NULL;
+}
+
 DEFUN ("set-window-margins", Fset_window_margins, Sset_window_margins,
        2, 3, 0,
        doc: /* Set width of marginal areas of window WINDOW.
@@ -6157,41 +6158,14 @@ WINDOW must be a live window and defaults to the selected one.
 Second arg LEFT-WIDTH specifies the number of character cells to
 reserve for the left marginal area.  Optional third arg RIGHT-WIDTH
 does the same for the right marginal area.  A nil width parameter
-means no margin.  */)
+means no margin.
+
+Return t if any margin was actually changed and nil otherwise.  */)
   (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width)
 {
-  struct window *w = decode_live_window (window);
-
-  /* Translate negative or zero widths to nil.
-     Margins that are too wide have to be checked elsewhere.  */
-
-  if (!NILP (left_width))
-    {
-      CHECK_NUMBER (left_width);
-      if (XINT (left_width) <= 0)
-       left_width = Qnil;
-    }
-
-  if (!NILP (right_width))
-    {
-      CHECK_NUMBER (right_width);
-      if (XINT (right_width) <= 0)
-       right_width = Qnil;
-    }
-
-  if (!EQ (w->left_margin_cols, left_width)
-      || !EQ (w->right_margin_cols, right_width))
-    {
-      wset_left_margin_cols (w, left_width);
-      wset_right_margin_cols (w, right_width);
-
-      adjust_window_margins (w);
-
-      ++windows_or_buffers_changed;
-      adjust_glyphs (XFRAME (WINDOW_FRAME (w)));
-    }
-
-  return Qnil;
+  struct window *w = set_window_margins (decode_live_window (window),
+                                        left_width, right_width);
+  return w ? (apply_window_adjustment (w), Qt) : Qnil;
 }
 
 
@@ -6206,7 +6180,8 @@ as nil.  */)
   (Lisp_Object window)
 {
   struct window *w = decode_live_window (window);
-  return Fcons (w->left_margin_cols, w->right_margin_cols);
+  return Fcons (w->left_margin_cols ? make_number (w->left_margin_cols) : Qnil,
+               w->right_margin_cols ? make_number (w->right_margin_cols) : Qnil);
 }
 
 
@@ -6215,6 +6190,31 @@ as nil.  */)
                            Fringes
  ***********************************************************************/
 
+static struct window *
+set_window_fringes (struct window *w, Lisp_Object left_width,
+                   Lisp_Object right_width, Lisp_Object outside_margins)
+{
+  int left, right, outside = !NILP (outside_margins);
+
+  left = (NILP (left_width) ? -1
+         : (CHECK_NATNUM (left_width), XINT (left_width)));
+  right = (NILP (right_width) ? -1
+          : (CHECK_NATNUM (right_width), XINT (right_width)));
+
+  /* Do nothing on a tty or if nothing to actually change.  */
+  if (FRAME_WINDOW_P (WINDOW_XFRAME (w))
+      && (w->left_fringe_width != left
+         || w->right_fringe_width != right
+         || w->fringes_outside_margins != outside))
+    {
+      w->left_fringe_width = left;
+      w->right_fringe_width = right;
+      w->fringes_outside_margins = outside;
+      return w;
+    }
+  return NULL;
+}
+
 DEFUN ("set-window-fringes", Fset_window_fringes, Sset_window_fringes,
        2, 4, 0,
        doc: /* Set the fringe widths of window WINDOW.
@@ -6227,37 +6227,16 @@ frame's default fringe width.  Default fringe widths can be set with
 the command `set-fringe-style'.
 If optional fourth arg OUTSIDE-MARGINS is non-nil, draw the fringes
 outside of the display margins.  By default, fringes are drawn between
-display marginal areas and the text area.  */)
-  (Lisp_Object window, Lisp_Object left_width, Lisp_Object right_width, Lisp_Object outside_margins)
-{
-  struct window *w = decode_live_window (window);
-  int outside = !NILP (outside_margins);
-
-  if (!NILP (left_width))
-    CHECK_NATNUM (left_width);
-  if (!NILP (right_width))
-    CHECK_NATNUM (right_width);
-
-  /* Do nothing on a tty.  */
-  if (FRAME_WINDOW_P (WINDOW_XFRAME (w))
-      && (!EQ (w->left_fringe_width, left_width)
-         || !EQ (w->right_fringe_width, right_width)
-         || w->fringes_outside_margins != outside))
-    {
-      wset_left_fringe_width (w, left_width);
-      wset_right_fringe_width (w, right_width);
-      w->fringes_outside_margins = outside;
-
-      adjust_window_margins (w);
-
-      clear_glyph_matrix (w->current_matrix);
-      w->window_end_valid = 0;
-
-      ++windows_or_buffers_changed;
-      adjust_glyphs (XFRAME (WINDOW_FRAME (w)));
-    }
+display marginal areas and the text area.
 
-  return Qnil;
+Return t if any fringe was actually changed and nil otherwise.  */)
+  (Lisp_Object window, Lisp_Object left_width,
+   Lisp_Object right_width, Lisp_Object outside_margins)
+{
+  struct window *w
+    = set_window_fringes (decode_live_window (window),
+                         left_width, right_width, outside_margins);
+  return w ? (apply_window_adjustment (w), Qt) : Qnil;
 }
 
 
@@ -6282,29 +6261,14 @@ Value is a list of the form (LEFT-WIDTH RIGHT-WIDTH OUTSIDE-MARGINS).  */)
                            Scroll bars
  ***********************************************************************/
 
-DEFUN ("set-window-scroll-bars", Fset_window_scroll_bars,
-       Sset_window_scroll_bars, 2, 4, 0,
-       doc: /* Set width and type of scroll bars of window WINDOW.
-WINDOW must be a live window and defaults to the selected one.
-
-Second parameter WIDTH specifies the pixel width for the scroll bar;
-this is automatically adjusted to a multiple of the frame column width.
-Third parameter VERTICAL-TYPE specifies the type of the vertical scroll
-bar: left, right, or nil.
-If WIDTH is nil, use the frame's scroll-bar width.
-If VERTICAL-TYPE is t, use the frame's scroll-bar type.
-Fourth parameter HORIZONTAL-TYPE is currently unused.  */)
-  (Lisp_Object window, Lisp_Object width, Lisp_Object vertical_type, Lisp_Object horizontal_type)
+static struct window *
+set_window_scroll_bars (struct window *w, Lisp_Object width,
+                       Lisp_Object vertical_type, Lisp_Object horizontal_type)
 {
-  struct window *w = decode_live_window (window);
+  int iwidth = (NILP (width) ? -1 : (CHECK_NATNUM (width), XINT (width)));
 
-  if (!NILP (width))
-    {
-      CHECK_RANGED_INTEGER (width, 0, INT_MAX);
-
-      if (XINT (width) == 0)
-       vertical_type = Qnil;
-    }
+  if (iwidth == 0)
+    vertical_type = Qnil;
 
   if (!(NILP (vertical_type)
        || EQ (vertical_type, Qleft)
@@ -6312,22 +6276,37 @@ Fourth parameter HORIZONTAL-TYPE is currently unused.  */)
        || EQ (vertical_type, Qt)))
     error ("Invalid type of vertical scroll bar");
 
-  if (!EQ (w->scroll_bar_width, width)
+  if (w->scroll_bar_width != iwidth
       || !EQ (w->vertical_scroll_bar_type, vertical_type))
     {
-      wset_scroll_bar_width (w, width);
+      w->scroll_bar_width = iwidth;
       wset_vertical_scroll_bar_type (w, vertical_type);
+      return w;
+    }
+  return NULL;
+}
 
-      adjust_window_margins (w);
-
-      clear_glyph_matrix (w->current_matrix);
-      w->window_end_valid = 0;
+DEFUN ("set-window-scroll-bars", Fset_window_scroll_bars,
+       Sset_window_scroll_bars, 2, 4, 0,
+       doc: /* Set width and type of scroll bars of window WINDOW.
+WINDOW must be a live window and defaults to the selected one.
 
-      ++windows_or_buffers_changed;
-      adjust_glyphs (XFRAME (WINDOW_FRAME (w)));
-    }
+Second parameter WIDTH specifies the pixel width for the scroll bar;
+this is automatically adjusted to a multiple of the frame column width.
+Third parameter VERTICAL-TYPE specifies the type of the vertical scroll
+bar: left, right, or nil.
+If WIDTH is nil, use the frame's scroll-bar width.
+If VERTICAL-TYPE is t, use the frame's scroll-bar type.
+Fourth parameter HORIZONTAL-TYPE is currently unused.
 
-  return Qnil;
+Return t if scroll bars was actually changed and nil otherwise.  */)
+  (Lisp_Object window, Lisp_Object width,
+   Lisp_Object vertical_type, Lisp_Object horizontal_type)
+{
+  struct window *w
+    = set_window_scroll_bars (decode_live_window (window),
+                             width, vertical_type, horizontal_type);
+  return w ? (apply_window_adjustment (w), Qt) : Qnil;
 }
 
 
index 260a672d93ad51a00ef6dff84c0389664b93bf6f..c64641825e3838edcb3cf9efacba2b9ce6340a39 100644 (file)
@@ -141,32 +141,10 @@ struct window
        it yet, or if the frame doesn't have any scroll bars, this is nil.  */
     Lisp_Object vertical_scroll_bar;
 
-    /* Width of left and right marginal areas.  A value of nil means
-       no margin.  */
-    Lisp_Object left_margin_cols;
-    Lisp_Object right_margin_cols;
-
-    /* Width of left and right fringes.
-       A value of nil or t means use frame values.  */
-    Lisp_Object left_fringe_width;
-    Lisp_Object right_fringe_width;
-
-    /* Pixel width of scroll bars.
-       A value of nil or t means use frame values.  */
-    Lisp_Object scroll_bar_width;
-
     /* Type of vertical scroll bar.  A value of nil means
        no scroll bar.  A value of t means use frame value.  */
     Lisp_Object vertical_scroll_bar_type;
 
-    /* Z - the buffer position of the last glyph in the current
-       matrix of W.  Only valid if window_end_valid is nonzero.  */
-    Lisp_Object window_end_pos;
-
-    /* Glyph matrix row of the last glyph in the current matrix
-       of W.  Only valid if window_end_valid is nonzero.  */
-    Lisp_Object window_end_vpos;
-
     /* Display-table to use for displaying chars in this window.
        Nil means use the buffer's own display-table.  */
     Lisp_Object display_table;
@@ -269,6 +247,28 @@ struct window
     /* This is handy for undrawing the cursor.  */
     int phys_cursor_ascent, phys_cursor_height;
 
+    /* Width of left and right fringes, in pixels.
+       A value of -1 means use frame values.  */
+    int left_fringe_width;
+    int right_fringe_width;
+
+    /* Width of left and right marginal areas in columns.
+       A value of 0 means no margin.  */
+    int left_margin_cols;
+    int right_margin_cols;
+
+    /* Pixel width of scroll bars.
+       A value of -1 means use frame values.  */
+    int scroll_bar_width;
+
+    /* Z - the buffer position of the last glyph in the current
+       matrix of W.  Only valid if window_end_valid is nonzero.  */
+    ptrdiff_t window_end_pos;
+
+    /* Glyph matrix row of the last glyph in the current matrix
+       of W.  Only valid if window_end_valid is nonzero.  */
+    int window_end_vpos;
+
     /* Non-zero if this window is a minibuffer window.  */
     unsigned mini : 1;
 
@@ -366,16 +366,6 @@ wset_vertical_scroll_bar (struct window *w, Lisp_Object val)
   w->vertical_scroll_bar = val;
 }
 WINDOW_INLINE void
-wset_window_end_pos (struct window *w, Lisp_Object val)
-{
-  w->window_end_pos = val;
-}
-WINDOW_INLINE void
-wset_window_end_vpos (struct window *w, Lisp_Object val)
-{
-  w->window_end_vpos = val;
-}
-WINDOW_INLINE void
 wset_prev_buffers (struct window *w, Lisp_Object val)
 {
   w->prev_buffers = val;
@@ -600,33 +590,21 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 
 /* Width of left margin area in columns.  */
 
-#define WINDOW_LEFT_MARGIN_COLS(W)     \
-  (NILP (W->left_margin_cols)          \
-   ? 0                                 \
-   : XINT (W->left_margin_cols))
+#define WINDOW_LEFT_MARGIN_COLS(W) (W->left_margin_cols)
 
 /* Width of right marginal area in columns.  */
 
-#define WINDOW_RIGHT_MARGIN_COLS(W)    \
-  (NILP (W->right_margin_cols)         \
-   ? 0                                 \
-   : XINT (W->right_margin_cols))
+#define WINDOW_RIGHT_MARGIN_COLS(W) (W->right_margin_cols)
 
 /* Width of left margin area in pixels.  */
 
-#define WINDOW_LEFT_MARGIN_WIDTH(W)    \
-  (NILP (W->left_margin_cols)          \
-   ? 0                                 \
-   : (XINT (W->left_margin_cols)       \
-      * WINDOW_FRAME_COLUMN_WIDTH (W)))
+#define WINDOW_LEFT_MARGIN_WIDTH(W)                    \
+  (W->left_margin_cols * WINDOW_FRAME_COLUMN_WIDTH (W))
 
 /* Width of right marginal area in pixels.  */
 
-#define WINDOW_RIGHT_MARGIN_WIDTH(W)   \
-  (NILP (W->right_margin_cols)         \
-   ? 0                                 \
-   : (XINT (W->right_margin_cols)      \
-      * WINDOW_FRAME_COLUMN_WIDTH (W)))
+#define WINDOW_RIGHT_MARGIN_WIDTH(W)                   \
+  (W->right_margin_cols * WINDOW_FRAME_COLUMN_WIDTH (W))
 
 /* Total width of fringes reserved for drawing truncation bitmaps,
    continuation bitmaps and alike.  The width is in canonical char
@@ -635,10 +613,10 @@ wset_next_buffers (struct window *w, Lisp_Object val)
    able to split windows horizontally nicely.  */
 
 #define WINDOW_FRINGE_COLS(W)                  \
-  ((INTEGERP (W->left_fringe_width)            \
-    || INTEGERP (W->right_fringe_width))       \
-   ? ((WINDOW_LEFT_FRINGE_WIDTH (W)            \
-       + WINDOW_RIGHT_FRINGE_WIDTH (W)         \
+  ((W->left_fringe_width >= 0                  \
+    && W->right_fringe_width >= 0)             \
+   ? ((W->left_fringe_width                    \
+       + W->right_fringe_width                 \
        + WINDOW_FRAME_COLUMN_WIDTH (W) - 1)    \
       / WINDOW_FRAME_COLUMN_WIDTH (W))         \
    : FRAME_FRINGE_COLS (WINDOW_XFRAME (W)))
@@ -658,13 +636,11 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 /* Pixel-width of the left and right fringe.  */
 
 #define WINDOW_LEFT_FRINGE_WIDTH(W)                    \
-  (INTEGERP (W->left_fringe_width)                     \
-   ? XFASTINT (W->left_fringe_width)                   \
+  (W->left_fringe_width >= 0 ? W->left_fringe_width    \
    : FRAME_LEFT_FRINGE_WIDTH (WINDOW_XFRAME (W)))
 
 #define WINDOW_RIGHT_FRINGE_WIDTH(W)                   \
-  (INTEGERP (W->right_fringe_width)                    \
-   ? XFASTINT (W->right_fringe_width)                  \
+  (W->right_fringe_width >= 0 ? W->right_fringe_width  \
    : FRAME_RIGHT_FRINGE_WIDTH (WINDOW_XFRAME (W)))
 
 /* Total width of fringes in pixels.  */
@@ -709,8 +685,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
    nonzero.  */
 
 #define WINDOW_CONFIG_SCROLL_BAR_WIDTH(w)              \
-  (INTEGERP (w->scroll_bar_width)                      \
-   ? XFASTINT (w->scroll_bar_width)                    \
+  (w->scroll_bar_width >= 0 ? w->scroll_bar_width      \
    : FRAME_CONFIG_SCROLL_BAR_WIDTH (WINDOW_XFRAME (w)))
 
 /* Width that a scroll bar in window W should have, if there is one.
@@ -718,8 +693,8 @@ wset_next_buffers (struct window *w, Lisp_Object val)
    this is still nonzero.  */
 
 #define WINDOW_CONFIG_SCROLL_BAR_COLS(w)               \
-  (INTEGERP (w->scroll_bar_width)                      \
-   ? ((XFASTINT (w->scroll_bar_width)                  \
+  (w->scroll_bar_width >= 0                            \
+   ? ((w->scroll_bar_width                             \
        + WINDOW_FRAME_COLUMN_WIDTH (w) - 1)            \
       / WINDOW_FRAME_COLUMN_WIDTH (w))                 \
    : FRAME_CONFIG_SCROLL_BAR_COLS (WINDOW_XFRAME (w)))
@@ -842,13 +817,25 @@ wset_next_buffers (struct window *w, Lisp_Object val)
 #define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X)     \
   (window_box_left ((W), TEXT_AREA) + (X))
 
-/* This is the window in which the terminal's cursor should
-   be left when nothing is being done with it.  This must
-   always be a leaf window, and its buffer is selected by
-   the top level editing loop at the end of each command.
+/* Nonzero if the background of the window W's fringe that is adjacent to
+   a scroll bar is extended to the gap between the fringe and the bar.  */
+
+#define WINDOW_FRINGE_EXTENDED_P(w)                    \
+  (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)          \
+   ? (WINDOW_LEFTMOST_P (w)                            \
+      && WINDOW_LEFT_FRINGE_WIDTH (w)                  \
+      && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)       \
+         || WINDOW_LEFT_MARGIN_COLS (w) == 0))         \
+   : (WINDOW_RIGHTMOST_P (w)                           \
+      && WINDOW_RIGHT_FRINGE_WIDTH (w)                 \
+      && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)       \
+         || WINDOW_RIGHT_MARGIN_COLS (w) == 0)))
 
-   This value is always the same as
-    FRAME_SELECTED_WINDOW (selected_frame).  */
+/* This is the window in which the terminal's cursor should be left when
+   nothing is being done with it.  This must always be a leaf window, and its
+   buffer is selected by the top level editing loop at the end of each command.
+
+   This value is always the same as FRAME_SELECTED_WINDOW (selected_frame).  */
 
 extern Lisp_Object selected_window;
 
@@ -919,10 +906,6 @@ extern int update_mode_lines;
 
 extern int windows_or_buffers_changed;
 
-/* Nonzero means a frame's cursor type has been changed.  */
-
-extern int cursor_type_changed;
-
 /* If *ROWS or *COLS are too small a size for FRAME, set them to the
    minimum allowable size.  */
 
index 42b7977687e50aada088565359af901fa95b748c..5faa2abd72a59ec25c8383a95091166c60f105f3 100644 (file)
@@ -528,7 +528,7 @@ int windows_or_buffers_changed;
 
 /* Nonzero means a frame's cursor type has been changed.  */
 
-int cursor_type_changed;
+static int cursor_type_changed;
 
 /* Nonzero after display_mode_line if %l was used and it displayed a
    line number.  */
@@ -989,22 +989,18 @@ window_box_width (struct window *w, int area)
 
       if (area == TEXT_AREA)
        {
-         if (INTEGERP (w->left_margin_cols))
-           cols -= XFASTINT (w->left_margin_cols);
-         if (INTEGERP (w->right_margin_cols))
-           cols -= XFASTINT (w->right_margin_cols);
+         cols -= max (0, w->left_margin_cols);
+         cols -= max (0, w->right_margin_cols);
          pixels = -WINDOW_TOTAL_FRINGE_WIDTH (w);
        }
       else if (area == LEFT_MARGIN_AREA)
        {
-         cols = (INTEGERP (w->left_margin_cols)
-                  ? XFASTINT (w->left_margin_cols) : 0);
+         cols = max (0, w->left_margin_cols);
          pixels = 0;
        }
       else if (area == RIGHT_MARGIN_AREA)
        {
-         cols = (INTEGERP (w->right_margin_cols)
-                  ? XFASTINT (w->right_margin_cols) : 0);
+         cols = max (0, w->right_margin_cols);
          pixels = 0;
        }
     }
@@ -2472,7 +2468,16 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
 
 #endif /* HAVE_WINDOW_SYSTEM */
 
-\f
+static void
+adjust_window_ends (struct window *w, struct glyph_row *row, bool current)
+{
+  eassert (w);
+  w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (row);
+  w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
+  w->window_end_vpos
+    = MATRIX_ROW_VPOS (row, current ? w->current_matrix : w->desired_matrix);
+}
+
 /***********************************************************************
                        Lisp form evaluation
  ***********************************************************************/
@@ -2608,8 +2613,7 @@ check_window_end (struct window *w)
   if (!MINI_WINDOW_P (w) && w->window_end_valid)
     {
       struct glyph_row *row;
-      eassert ((row = MATRIX_ROW (w->current_matrix,
-                                 XFASTINT (w->window_end_vpos)),
+      eassert ((row = MATRIX_ROW (w->current_matrix, w->window_end_vpos),
                !row->enabled_p
                || MATRIX_ROW_DISPLAYS_TEXT_P (row)
                || MATRIX_ROW_VPOS (row, w->current_matrix) == 0));
@@ -7500,6 +7504,8 @@ static int
 next_element_from_display_vector (struct it *it)
 {
   Lisp_Object gc;
+  int prev_face_id = it->face_id;
+  int next_face_id;
 
   /* Precondition.  */
   eassert (it->dpvec && it->current.dpvec_index >= 0);
@@ -7512,6 +7518,8 @@ next_element_from_display_vector (struct it *it)
 
   if (GLYPH_CODE_P (gc))
     {
+      struct face *this_face, *prev_face, *next_face;
+
       it->c = GLYPH_CODE_CHAR (gc);
       it->len = CHAR_BYTES (it->c);
 
@@ -7527,6 +7535,41 @@ next_element_from_display_vector (struct it *it)
            it->face_id = merge_faces (it->f, Qt, lface_id,
                                       it->saved_face_id);
        }
+
+      /* Glyphs in the display vector could have the box face, so we
+        need to set the related flags in the iterator, as
+        appropriate.  */
+      this_face = FACE_FROM_ID (it->f, it->face_id);
+      prev_face = FACE_FROM_ID (it->f, prev_face_id);
+
+      /* Is this character the first character of a box-face run?  */
+      it->start_of_box_run_p = (this_face && this_face->box != FACE_NO_BOX
+                               && (!prev_face
+                                   || prev_face->box == FACE_NO_BOX));
+
+      /* For the last character of the box-face run, we need to look
+        either at the next glyph from the display vector, or at the
+        face we saw before the display vector.  */
+      next_face_id = it->saved_face_id;
+      if (it->current.dpvec_index < it->dpend - it->dpvec - 1)
+       {
+         if (it->dpvec_face_id >= 0)
+           next_face_id = it->dpvec_face_id;
+         else
+           {
+             int lface_id =
+               GLYPH_CODE_FACE (it->dpvec[it->current.dpvec_index + 1]);
+
+             if (lface_id > 0)
+               next_face_id = merge_faces (it->f, Qt, lface_id,
+                                           it->saved_face_id);
+           }
+       }
+      next_face = FACE_FROM_ID (it->f, next_face_id);
+      it->end_of_box_run_p = (this_face && this_face->box != FACE_NO_BOX
+                             && (!next_face
+                                 || next_face->box == FACE_NO_BOX));
+      it->face_box_p = this_face && this_face->box != FACE_NO_BOX;
     }
   else
     /* Display table entry is invalid.  Return a space.  */
@@ -9114,7 +9157,7 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos
       && it->current_x == it->last_visible_x - 1
       && it->c != '\n'
       && it->c != '\t'
-      && it->vpos < XFASTINT (it->w->window_end_vpos))
+      && it->vpos < it->w->window_end_vpos)
     {
       it->continuation_lines_width += it->current_x;
       it->current_x = it->hpos = it->max_ascent = it->max_descent = 0;
@@ -13328,12 +13371,12 @@ redisplay_internal (void)
                 adjusted.  */
              if (MATRIX_ROW_DISPLAYS_TEXT_P (it.glyph_row - 1))
                {
-                 if (XFASTINT (w->window_end_vpos) < this_line_vpos)
-                   wset_window_end_vpos (w, make_number (this_line_vpos));
+                 if (w->window_end_vpos < this_line_vpos)
+                   w->window_end_vpos = this_line_vpos;
                }
-             else if (XFASTINT (w->window_end_vpos) == this_line_vpos
+             else if (w->window_end_vpos == this_line_vpos
                       && this_line_vpos > 0)
-               wset_window_end_vpos (w, make_number (this_line_vpos - 1));
+               w->window_end_vpos = this_line_vpos - 1;
              w->window_end_valid = 0;
 
              /* Update hint: No need to try to scroll in update_window.  */
@@ -14971,7 +15014,25 @@ compute_window_start_on_continuation_line (struct window *w)
            {
              min_distance = distance;
              pos = it.current.pos;
-             move_it_by_lines (&it, 1);
+             if (it.line_wrap == WORD_WRAP)
+               {
+                 /* Under WORD_WRAP, move_it_by_lines is likely to
+                    overshoot and stop not at the first, but the
+                    second character from the left margin.  So in
+                    that case, we need a more tight control on the X
+                    coordinate of the iterator than move_it_by_lines
+                    promises in its contract.  The method is to first
+                    go to the last (rightmost) visible character of a
+                    line, then move to the leftmost character on the
+                    next line in a separate call.  */
+                 move_it_to (&it, ZV, it.last_visible_x, it.current_y, -1,
+                             MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
+                 move_it_to (&it, ZV, 0,
+                             it.current_y + it.max_ascent + it.max_descent, -1,
+                             MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
+               }
+             else
+               move_it_by_lines (&it, 1);
            }
 
          /* Set the window start there.  */
@@ -15023,6 +15084,10 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
      if-statement below. Now, this field is converted to
      ptrdiff_t, thus zero means invalid position in a buffer.  */
   eassert (w->last_point > 0);
+  /* Likewise there was a check whether window_end_vpos is nil or larger
+     than the window.  Now window_end_vpos is int and so never nil, but
+     let's leave eassert to check whether it fits in the window.  */
+  eassert (w->window_end_vpos < w->current_matrix->nrows);
 
   /* Handle case where text has not changed, only point, and it has
      not moved off the frame.  */
@@ -15050,13 +15115,6 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
         since the handling of this_line_start_pos, etc., in redisplay
         handles the same cases.  */
       && !EQ (window, minibuf_window)
-      /* When splitting windows or for new windows, it happens that
-        redisplay is called with a nil window_end_vpos or one being
-        larger than the window.  This should really be fixed in
-        window.c.  I don't have this on my list, now, so we do
-        approximately the same as the old redisplay code.  --gerd.  */
-      && INTEGERP (w->window_end_vpos)
-      && XFASTINT (w->window_end_vpos) < w->current_matrix->nrows
       && (FRAME_WINDOW_P (f)
          || !overlay_arrow_in_current_buffer_p ()))
     {
@@ -15370,7 +15428,7 @@ set_vertical_scroll_bar (struct window *w)
       start = marker_position (w->start) - BUF_BEGV (buf);
       /* I don't think this is guaranteed to be right.  For the
         moment, we'll pretend it is.  */
-      end = BUF_Z (buf) - XFASTINT (w->window_end_pos) - BUF_BEGV (buf);
+      end = BUF_Z (buf) - w->window_end_pos - BUF_BEGV (buf);
 
       if (end < start)
        end = start;
@@ -15511,8 +15569,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
        && !current_buffer->clip_changed
        && !window_outdated (w));
 
-  /* When windows_or_buffers_changed is non-zero, we can't rely on
-     the window end being valid, so set it to nil there.  */
+  /* When windows_or_buffers_changed is non-zero, we can't rely
+     on the window end being valid, so set it to zero there.  */
   if (windows_or_buffers_changed)
     {
       /* If window starts on a continuation line, maybe adjust the
@@ -15521,6 +15579,9 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
        compute_window_start_on_continuation_line (w);
 
       w->window_end_valid = 0;
+      /* If so, we also can't rely on current matrix
+        and should not fool try_cursor_movement below.  */
+      current_matrix_up_to_date_p = 0;
     }
 
   /* Some sanity checks.  */
@@ -16060,7 +16121,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
      line.)  */
   if (w->cursor.vpos < 0)
     {
-      if (w->window_end_valid && PT >= Z - XFASTINT (w->window_end_pos))
+      if (w->window_end_valid && PT >= Z - w->window_end_pos)
        {
          clear_glyph_matrix (w->desired_matrix);
          move_it_by_lines (&it, 1);
@@ -16360,8 +16421,7 @@ try_window (Lisp_Object window, struct text_pos pos, int flags)
     }
 
   /* If bottom moved off end of frame, change mode line percentage.  */
-  if (XFASTINT (w->window_end_pos) <= 0
-      && Z != IT_CHARPOS (it))
+  if (w->window_end_pos <= 0 && Z != IT_CHARPOS (it))
     w->update_mode_line = 1;
 
   /* Set window_end_pos to the offset of the last character displayed
@@ -16370,21 +16430,16 @@ try_window (Lisp_Object window, struct text_pos pos, int flags)
   if (last_text_row)
     {
       eassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row));
-      w->window_end_bytepos
-       = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
-      wset_window_end_pos
-       (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
-      wset_window_end_vpos
-       (w, make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)));
+      adjust_window_ends (w, last_text_row, 0);
       eassert
        (MATRIX_ROW_DISPLAYS_TEXT_P (MATRIX_ROW (w->desired_matrix,
-                                                XFASTINT (w->window_end_vpos))));
+                                                w->window_end_vpos)));
     }
   else
     {
       w->window_end_bytepos = Z_BYTE - ZV_BYTE;
-      wset_window_end_pos (w, make_number (Z - ZV));
-      wset_window_end_vpos (w, make_number (0));
+      w->window_end_pos = Z - ZV;
+      w->window_end_vpos = 0;
     }
 
   /* But that is not valid info until redisplay finishes.  */
@@ -16615,32 +16670,15 @@ try_window_reusing_current_matrix (struct window *w)
         The value of last_text_row is the last displayed line
         containing text.  */
       if (last_reused_text_row)
-       {
-         w->window_end_bytepos
-           = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_reused_text_row);
-         wset_window_end_pos
-           (w, make_number (Z
-                            - MATRIX_ROW_END_CHARPOS (last_reused_text_row)));
-         wset_window_end_vpos
-           (w, make_number (MATRIX_ROW_VPOS (last_reused_text_row,
-                                             w->current_matrix)));
-       }
+       adjust_window_ends (w, last_reused_text_row, 1);
       else if (last_text_row)
-       {
-         w->window_end_bytepos
-           = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
-         wset_window_end_pos
-           (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
-         wset_window_end_vpos
-           (w, make_number (MATRIX_ROW_VPOS (last_text_row,
-                                             w->desired_matrix)));
-       }
+       adjust_window_ends (w, last_text_row, 0);
       else
        {
          /* This window must be completely empty.  */
          w->window_end_bytepos = Z_BYTE - ZV_BYTE;
-         wset_window_end_pos (w, make_number (Z - ZV));
-         wset_window_end_vpos (w, make_number (0));
+         w->window_end_pos = Z - ZV;
+         w->window_end_vpos = 0;
        }
       w->window_end_valid = 0;
 
@@ -16825,20 +16863,9 @@ try_window_reusing_current_matrix (struct window *w)
         the window end is in reused rows which in turn means that
         only its vpos can have changed.  */
       if (last_text_row)
-       {
-         w->window_end_bytepos
-           = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
-         wset_window_end_pos
-           (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
-         wset_window_end_vpos
-           (w, make_number (MATRIX_ROW_VPOS (last_text_row,
-                                             w->desired_matrix)));
-       }
+       adjust_window_ends (w, last_text_row, 0);
       else
-       {
-         wset_window_end_vpos
-           (w, make_number (XFASTINT (w->window_end_vpos) - nrows_scrolled));
-       }
+       w->window_end_vpos -= nrows_scrolled;
 
       w->window_end_valid = 0;
       w->desired_matrix->no_scrolling_p = 1;
@@ -16978,11 +17005,11 @@ find_first_unchanged_at_end_row (struct window *w,
   /* A value of window_end_pos >= END_UNCHANGED means that the window
      end is in the range of changed text.  If so, there is no
      unchanged row at the end of W's current matrix.  */
-  if (XFASTINT (w->window_end_pos) >= END_UNCHANGED)
+  if (w->window_end_pos >= END_UNCHANGED)
     return NULL;
 
   /* Set row to the last row in W's current matrix displaying text.  */
-  row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
+  row = MATRIX_ROW (w->current_matrix, w->window_end_vpos);
 
   /* If matrix is entirely empty, no unchanged row exists.  */
   if (MATRIX_ROW_DISPLAYS_TEXT_P (row))
@@ -16993,7 +17020,7 @@ find_first_unchanged_at_end_row (struct window *w,
         buffer positions in the current matrix to current buffer
         positions for characters not in changed text.  */
       ptrdiff_t Z_old =
-       MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos);
+       MATRIX_ROW_END_CHARPOS (row) + w->window_end_pos;
       ptrdiff_t Z_BYTE_old =
        MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos;
       ptrdiff_t last_unchanged_pos, last_unchanged_pos_old;
@@ -17334,7 +17361,7 @@ try_window_id (struct window *w)
      This case happens with stealth-fontification.  Note that although
      the display is unchanged, glyph positions in the matrix have to
      be adjusted, of course.  */
-  row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
+  row = MATRIX_ROW (w->current_matrix, w->window_end_vpos);
   if (MATRIX_ROW_DISPLAYS_TEXT_P (row)
       && ((last_changed_charpos < CHARPOS (start)
           && CHARPOS (start) == BEGV)
@@ -17346,7 +17373,7 @@ try_window_id (struct window *w)
 
       /* Compute how many chars/bytes have been added to or removed
         from the buffer.  */
-      Z_old = MATRIX_ROW_END_CHARPOS (row) + XFASTINT (w->window_end_pos);
+      Z_old = MATRIX_ROW_END_CHARPOS (row) + w->window_end_pos;
       Z_BYTE_old = MATRIX_ROW_END_BYTEPOS (row) + w->window_end_bytepos;
       Z_delta = Z - Z_old;
       Z_delta_bytes = Z_BYTE - Z_BYTE_old;
@@ -17417,10 +17444,8 @@ try_window_id (struct window *w)
        {
          /* We have to compute the window end anew since text
             could have been added/removed after it.  */
-         wset_window_end_pos
-           (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
-         w->window_end_bytepos
-           = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
+         w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (row);
+         w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
 
          /* Set the cursor.  */
          row = row_containing_pos (w, PT, r0, NULL, 0);
@@ -17453,7 +17478,7 @@ try_window_id (struct window *w)
 
   /* Give up if the window ends in strings.  Overlay strings
      at the end are difficult to handle, so don't try.  */
-  row = MATRIX_ROW (current_matrix, XFASTINT (w->window_end_vpos));
+  row = MATRIX_ROW (current_matrix, w->window_end_vpos);
   if (MATRIX_ROW_START_CHARPOS (row) == MATRIX_ROW_END_CHARPOS (row))
     GIVE_UP (20);
 
@@ -17799,7 +17824,7 @@ try_window_id (struct window *w)
       /* Set last_row to the glyph row in the current matrix where the
         window end line is found.  It has been moved up or down in
         the matrix by dvpos.  */
-      int last_vpos = XFASTINT (w->window_end_vpos) + dvpos;
+      int last_vpos = w->window_end_vpos + dvpos;
       struct glyph_row *last_row = MATRIX_ROW (current_matrix, last_vpos);
 
       /* If last_row is the window end line, it should display text.  */
@@ -17843,8 +17868,7 @@ try_window_id (struct window *w)
     }
 
   /* Update window_end_pos and window_end_vpos.  */
-  if (first_unchanged_at_end_row
-      && !last_text_row_at_end)
+  if (first_unchanged_at_end_row && !last_text_row_at_end)
     {
       /* Window end line if one of the preserved rows from the current
         matrix.  Set row to the last row displaying text in current
@@ -17854,23 +17878,13 @@ try_window_id (struct window *w)
       row = find_last_row_displaying_text (w->current_matrix, &it,
                                           first_unchanged_at_end_row);
       eassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row));
-
-      wset_window_end_pos (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
-      w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
-      wset_window_end_vpos
-       (w, make_number (MATRIX_ROW_VPOS (row, w->current_matrix)));
+      adjust_window_ends (w, row, 1);
       eassert (w->window_end_bytepos >= 0);
       IF_DEBUG (debug_method_add (w, "A"));
     }
   else if (last_text_row_at_end)
     {
-      wset_window_end_pos
-       (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row_at_end)));
-      w->window_end_bytepos
-       = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row_at_end);
-      wset_window_end_vpos
-       (w, make_number (MATRIX_ROW_VPOS (last_text_row_at_end,
-                                         desired_matrix)));
+      adjust_window_ends (w, last_text_row_at_end, 0);
       eassert (w->window_end_bytepos >= 0);
       IF_DEBUG (debug_method_add (w, "B"));
     }
@@ -17879,12 +17893,7 @@ try_window_id (struct window *w)
       /* We have displayed either to the end of the window or at the
         end of the window, i.e. the last row with text is to be found
         in the desired matrix.  */
-      wset_window_end_pos
-       (w, make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)));
-      w->window_end_bytepos
-       = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row);
-      wset_window_end_vpos
-       (w, make_number (MATRIX_ROW_VPOS (last_text_row, desired_matrix)));
+      adjust_window_ends (w, last_text_row, 0);
       eassert (w->window_end_bytepos >= 0);
     }
   else if (first_unchanged_at_end_row == NULL
@@ -17894,7 +17903,7 @@ try_window_id (struct window *w)
       /* Displayed to end of window, but no line containing text was
         displayed.  Lines were deleted at the end of the window.  */
       int first_vpos = WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0;
-      int vpos = XFASTINT (w->window_end_vpos);
+      int vpos = w->window_end_vpos;
       struct glyph_row *current_row = current_matrix->rows + vpos;
       struct glyph_row *desired_row = desired_matrix->rows + vpos;
 
@@ -17912,8 +17921,8 @@ try_window_id (struct window *w)
        }
 
       eassert (row != NULL);
-      wset_window_end_vpos (w, make_number (vpos + 1));
-      wset_window_end_pos (w, make_number (Z - MATRIX_ROW_END_CHARPOS (row)));
+      w->window_end_vpos = vpos + 1;
+      w->window_end_pos = Z - MATRIX_ROW_END_CHARPOS (row);
       w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row);
       eassert (w->window_end_bytepos >= 0);
       IF_DEBUG (debug_method_add (w, "C"));
@@ -17921,8 +17930,8 @@ try_window_id (struct window *w)
   else
     emacs_abort ();
 
-  IF_DEBUG (debug_end_pos = XFASTINT (w->window_end_pos);
-           debug_end_vpos = XFASTINT (w->window_end_vpos));
+  IF_DEBUG (debug_end_pos = w->window_end_pos;
+           debug_end_vpos = w->window_end_vpos);
 
   /* Record that display has not been completed.  */
   w->window_end_valid = 0;
@@ -22113,7 +22122,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
        ptrdiff_t pos = marker_position (w->start);
        ptrdiff_t total = BUF_ZV (b) - BUF_BEGV (b);
 
-       if (XFASTINT (w->window_end_pos) <= BUF_Z (b) - BUF_ZV (b))
+       if (w->window_end_pos <= BUF_Z (b) - BUF_ZV (b))
          {
            if (pos <= BUF_BEGV (b))
              return "All";
@@ -22142,7 +22151,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
     case 'P':
       {
        ptrdiff_t toppos = marker_position (w->start);
-       ptrdiff_t botpos = BUF_Z (b) - XFASTINT (w->window_end_pos);
+       ptrdiff_t botpos = BUF_Z (b) - w->window_end_pos;
        ptrdiff_t total = BUF_ZV (b) - BUF_BEGV (b);
 
        if (botpos >= BUF_ZV (b))
@@ -26250,6 +26259,9 @@ set_frame_cursor_types (struct frame *f, Lisp_Object arg)
     }
   else
     FRAME_BLINK_OFF_CURSOR (f) = DEFAULT_CURSOR;
+
+  /* Make sure the cursor gets redrawn.  */
+  cursor_type_changed = 1;
 }
 
 
@@ -27295,7 +27307,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
   /* Find the rows corresponding to START_CHARPOS and END_CHARPOS.  */
   rows_from_pos_range (w, start_charpos, end_charpos, disp_string, &r1, &r2);
   if (r1 == NULL)
-    r1 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
+    r1 = MATRIX_ROW (w->current_matrix, w->window_end_vpos);
   /* If the before-string or display-string contains newlines,
      rows_from_pos_range skips to its last row.  Move back.  */
   if (!NILP (before_string) || !NILP (disp_string))
@@ -27317,7 +27329,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
     }
   if (r2 == NULL)
     {
-      r2 = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
+      r2 = MATRIX_ROW (w->current_matrix, w->window_end_vpos);
       hlinfo->mouse_face_past_end = 1;
     }
   else if (!NILP (after_string))
@@ -27325,7 +27337,7 @@ mouse_face_from_buffer_pos (Lisp_Object window,
       /* If the after-string has newlines, advance to its last row.  */
       struct glyph_row *next;
       struct glyph_row *last
-       = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos));
+       = MATRIX_ROW (w->current_matrix, w->window_end_vpos);
 
       for (next = r2 + 1;
           next <= last
@@ -28631,8 +28643,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
                    : Qnil;
                  Lisp_Object lim2 =
                    NILP (BVAR (XBUFFER (buffer), bidi_display_reordering))
-                   ? make_number (BUF_Z (XBUFFER (buffer))
-                                  - XFASTINT (w->window_end_pos))
+                   ? make_number (BUF_Z (XBUFFER (buffer)) - w->window_end_pos)
                    : Qnil;
 
                  if (NILP (overlay))
index acd2d2b11167844b1d3cee3cbba6764164782f5b..b76f9d24180d0d053e78297ed013351aad512744 100644 (file)
@@ -759,11 +759,6 @@ clear_face_cache (int clear_fonts_p)
   if (clear_fonts_p
       || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT)
     {
-#if 0
-      /* Not yet implemented.  */
-      clear_font_cache (frame);
-#endif
-
       /* From time to time see if we can unload some fonts.  This also
         frees all realized faces on all frames.  Fonts needed by
         faces will be loaded again when faces are realized again.  */
@@ -774,7 +769,10 @@ clear_face_cache (int clear_fonts_p)
          struct frame *f = XFRAME (frame);
          if (FRAME_WINDOW_P (f)
              && FRAME_X_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS)
-           free_all_realized_faces (frame);
+           {
+             clear_font_cache (f);
+             free_all_realized_faces (frame);
+           }
        }
     }
   else
index 4f728ad59b0b51bd055375333b9b5a41818116e1..0c91e298ec8068fa188a5135a22256bf8eb35c09 100644 (file)
@@ -1053,11 +1053,8 @@ static void
 x_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   set_frame_cursor_types (f, arg);
-
-  /* Make sure the cursor gets redrawn.  */
-  cursor_type_changed = 1;
 }
-\f
+
 static void
 x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
index f845deabd824846fe2a24e20db734a50c21d44f4..f75d92109d614d30f3ff42d09d77967c38a6e5d0 100644 (file)
@@ -5164,7 +5164,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
   int top, height, left, sb_left, width, sb_width;
   int window_y, window_height;
 #ifdef USE_TOOLKIT_SCROLL_BARS
-  int fringe_extended_p;
+  bool fringe_extended_p;
 #endif
 
   /* Get window dimensions.  */
@@ -5197,16 +5197,7 @@ XTset_vertical_scroll_bar (struct window *w, int portion, int whole, int positio
 #endif
 
 #ifdef USE_TOOLKIT_SCROLL_BARS
-  if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w))
-    fringe_extended_p = (WINDOW_LEFTMOST_P (w)
-                        && WINDOW_LEFT_FRINGE_WIDTH (w)
-                        && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
-                            || WINDOW_LEFT_MARGIN_COLS (w) == 0));
-  else
-    fringe_extended_p = (WINDOW_RIGHTMOST_P (w)
-                        && WINDOW_RIGHT_FRINGE_WIDTH (w)
-                        && (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
-                            || WINDOW_RIGHT_MARGIN_COLS (w) == 0));
+  fringe_extended_p = WINDOW_FRINGE_EXTENDED_P (w);
 #endif
 
   /* Does the scroll bar exist yet?  */
@@ -10065,9 +10056,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
   dpyinfo->display = dpy;
 
   /* Set the name of the terminal. */
-  terminal->name = xmalloc (SBYTES (display_name) + 1);
-  memcpy (terminal->name, SSDATA (display_name), SBYTES (display_name));
-  terminal->name[SBYTES (display_name)] = 0;
+  terminal->name = xlispstrdup (display_name);
 
 #if 0
   XSetAfterFunction (x_current_display, x_trace_wire);
@@ -10109,33 +10098,15 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
   select_visual (dpyinfo);
   dpyinfo->cmap = DefaultColormapOfScreen (dpyinfo->screen);
   dpyinfo->root_window = RootWindowOfScreen (dpyinfo->screen);
-  dpyinfo->client_leader_window = 0;
-  dpyinfo->grabbed = 0;
-  dpyinfo->reference_count = 0;
   dpyinfo->icon_bitmap_id = -1;
-  dpyinfo->n_fonts = 0;
-  dpyinfo->bitmaps = 0;
-  dpyinfo->bitmaps_size = 0;
-  dpyinfo->bitmaps_last = 0;
-  dpyinfo->scratch_cursor_gc = 0;
-  hlinfo->mouse_face_mouse_frame = 0;
   hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
   hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
   hlinfo->mouse_face_face_id = DEFAULT_FACE_ID;
   hlinfo->mouse_face_window = Qnil;
   hlinfo->mouse_face_overlay = Qnil;
-  hlinfo->mouse_face_mouse_x = hlinfo->mouse_face_mouse_y = 0;
-  hlinfo->mouse_face_defer = 0;
-  hlinfo->mouse_face_hidden = 0;
-  dpyinfo->x_focus_frame = 0;
-  dpyinfo->x_focus_event_frame = 0;
-  dpyinfo->x_highlight_frame = 0;
   dpyinfo->wm_type = X_WMTYPE_UNKNOWN;
 
   /* See if we can construct pixel values from RGB values.  */
-  dpyinfo->red_bits = dpyinfo->blue_bits = dpyinfo->green_bits = 0;
-  dpyinfo->red_offset = dpyinfo->blue_offset = dpyinfo->green_offset = 0;
-
   if (dpyinfo->visual->class == TrueColor)
     {
       get_bits_and_offset (dpyinfo->visual->red_mask,
@@ -10296,14 +10267,9 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
   }
 
   dpyinfo->x_dnd_atoms_size = 8;
-  dpyinfo->x_dnd_atoms_length = 0;
   dpyinfo->x_dnd_atoms = xmalloc (sizeof *dpyinfo->x_dnd_atoms
                                   * dpyinfo->x_dnd_atoms_size);
 
-  dpyinfo->net_supported_atoms = NULL;
-  dpyinfo->nr_net_supported_atoms = 0;
-  dpyinfo->net_supported_window = 0;
-
   connection = ConnectionNumber (dpyinfo->display);
   dpyinfo->connection = connection;
   dpyinfo->gray
index 5324ef628e7cea18b265dffa0a861ba15395b775..fbc2f05a37507a94ed5b0bffa088da841010720f 100644 (file)
@@ -815,7 +815,7 @@ struct scroll_bar
 
   /* 1 if the background of the fringe that is adjacent to a scroll
      bar is extended to the gap between the fringe and the bar.  */
-  unsigned int fringe_extended_p : 1;
+  unsigned fringe_extended_p : 1;
 };
 
 /* Turning a lisp vector value into a pointer to a struct scroll_bar.  */
index 2e4d19e7a36a558d44eb0815582ab3ecbdb528b2..5f3006ec7bf9a76ee7e02f8176d7d398afec9f9a 100644 (file)
@@ -1,3 +1,15 @@
+2013-08-14  Daniel Hackney  <dan@haxney.org>
+
+       * package-test.el: Remove tar-package-building functions.  Tar file
+       used for testing is included in the repository.
+       (package-test-install-texinfo, package-test-cleanup-built-files):
+       Remove.
+
+2013-08-13  Fabián Ezequiel Gallina  <fgallina@gnu.org>
+
+       * automated/python-tests.el (python-imenu-create-index-4)
+       (python-imenu-create-flat-index-2): New tests.
+
 2013-08-05  Glenn Morris  <rgm@gnu.org>
 
        * automated/mule-util.el: New file, with tests extracted from
index a5f0ebb1f94c58425bb2efe11c7573afed3aa441..799009063e1df4027a9ddce051372741dc327b7e 100755 (executable)
@@ -85,9 +85,6 @@
   (expand-file-name "archive-contents" package-test-data-dir)
   "Path to a static copy of \"archive-contents\".")
 
-(defvar package-test-built-file-suffixes '(".tar" "/dir" "/*.info")
-  "Remove these files when cleaning up a built package.")
-
 (cl-defmacro with-package-test ((&optional &key file
                                            basedir
                                            install
     (let ((help-xref-following t))
       ,@body)))
 
-(autoload 'makeinfo-buffer "makeinfo")
-(defvar compilation-in-progress)
-
-(defun package-test-install-texinfo (file)
-  "Install from texinfo FILE.
-
-FILE should be a .texinfo file relative to the current
-`default-directory'"
-  (require 'info)
-  (let* ((full-file (expand-file-name file))
-         (info-file (replace-regexp-in-string "\\.texi\\'" ".info" full-file))
-         (old-info-defn (symbol-function 'Info-revert-find-node)))
-    (require 'info)
-    (setf (symbol-function 'Info-revert-find-node) #'ignore)
-    (with-current-buffer (find-file-literally full-file)
-      (unwind-protect
-          (progn
-            (makeinfo-buffer)
-            ;; Give `makeinfo-buffer' a chance to finish
-            (while compilation-in-progress
-              (sit-for 0.1))
-            (call-process "ginstall-info" nil nil nil
-                          (format "--info-dir=%s" default-directory)
-                          (format "%s" info-file)))
-        (kill-buffer)
-        (setf (symbol-function 'Info-revert-find-node) old-info-defn)))))
-
 (defun package-test-strip-version (dir)
   (replace-regexp-in-string "-pkg\\.el\\'" "" (package--description-file dir)))
 
@@ -178,14 +148,6 @@ FILE should be a .texinfo file relative to the current
    '(lambda (item) (file-expand-wildcards (concat base item)))
    suffix-list))
 
-(defun package-test-cleanup-built-files (dir)
-  "Remove files which were the result of creating a tar archive.
-
-DIR is the base name of the package directory, without the trailing slash"
-  (let* ((pkg-dirname (file-name-nondirectory dir)))
-    (dolist (file (package-test-suffix-matches dir package-test-built-file-suffixes))
-      (delete-file file))))
-
 (defvar tar-parse-info)
 (declare-function tar-header-name "tar-mode" (cl-x) t) ; defstruct
 
index fdae235ad3835c0519869a39977192828a8642fc..ef1c0155ab50c4a1e51a12071494b938147504b8 100644 (file)
@@ -1792,6 +1792,34 @@ class Foo(object):
                (cons "foo2 (def)" (copy-marker 77)))))
             (python-imenu-create-index)))))
 
+(ert-deftest python-imenu-create-index-4 ()
+  (python-tests-with-temp-buffer
+   "
+class Foo(object):
+    class Bar(object):
+        def __init__(self):
+            pass
+
+        def __str__(self):
+            pass
+
+    def __init__(self):
+            pass
+"
+   (goto-char (point-max))
+   (should (equal
+            (list
+             (list
+              "Foo (class)"
+              (cons "*class definition*" (copy-marker 2))
+              (list
+               "Bar (class)"
+               (cons "*class definition*" (copy-marker 21))
+               (cons "__init__ (def)" (copy-marker 44))
+               (cons "__str__ (def)" (copy-marker 90)))
+              (cons "__init__ (def)" (copy-marker 135))))
+            (python-imenu-create-index)))))
+
 (ert-deftest python-imenu-create-flat-index-1 ()
   (python-tests-with-temp-buffer
    "
@@ -1851,6 +1879,30 @@ class Baz(object):
                   (cons "Baz.Frob.c" (copy-marker 626)))
             (python-imenu-create-flat-index)))))
 
+(ert-deftest python-imenu-create-flat-index-2 ()
+  (python-tests-with-temp-buffer
+   "
+class Foo(object):
+    class Bar(object):
+        def __init__(self):
+            pass
+
+        def __str__(self):
+            pass
+
+    def __init__(self):
+            pass
+"
+   (goto-char (point-max))
+   (should (equal
+            (list
+             (cons "Foo" (copy-marker 2))
+             (cons "Foo.Bar" (copy-marker 21))
+             (cons "Foo.Bar.__init__" (copy-marker 44))
+             (cons "Foo.Bar.__str__" (copy-marker 90))
+             (cons "Foo.__init__"  (copy-marker 135)))
+            (python-imenu-create-flat-index)))))
+
 \f
 ;;; Misc helpers