aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2011-09-14 11:45:59 +0200
committerJoakim Verona2011-09-14 11:45:59 +0200
commit8d07d23ecd32b9e9f07234313c2e712a8c42b524 (patch)
treed5d925a00733d9a6d1f637b8f3dfdd40c33a2fe7
parent8918dacdb34e848edcd894e32de5b7b4e2fa19ea (diff)
parent46888499da0bb61ce47d339275d5a0c757a02eb2 (diff)
downloademacs-8d07d23ecd32b9e9f07234313c2e712a8c42b524.tar.gz
emacs-8d07d23ecd32b9e9f07234313c2e712a8c42b524.zip
upstream
-rw-r--r--ChangeLog11
-rwxr-xr-xautogen/configure287
-rw-r--r--doc/emacs/ChangeLog9
-rw-r--r--doc/emacs/frames.texi12
-rw-r--r--doc/emacs/sending.texi11
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/processes.texi6
-rw-r--r--doc/misc/ChangeLog11
-rw-r--r--doc/misc/gnus.texi51
-rw-r--r--etc/ChangeLog9
-rw-r--r--etc/NEWS11
-rw-r--r--etc/themes/adwaita-theme.el106
-rw-r--r--etc/themes/deeper-blue-theme.el116
-rw-r--r--etc/themes/whiteboard-theme.el97
-rw-r--r--lib-src/ebrowse.c14
-rw-r--r--lib-src/etags.c86
-rw-r--r--lib-src/hexl.c2
-rw-r--r--lib-src/movemail.c4
-rw-r--r--lib-src/pop.c20
-rw-r--r--lib/lstat.c5
-rw-r--r--lib/stat.c5
-rw-r--r--lisp/ChangeLog315
-rw-r--r--lisp/buff-menu.el12
-rw-r--r--lisp/cmuscheme.el5
-rw-r--r--lisp/cus-edit.el79
-rw-r--r--lisp/dired-aux.el78
-rw-r--r--lisp/dired.el2
-rw-r--r--lisp/emacs-lisp/cl-indent.el1
-rw-r--r--lisp/emacs-lisp/debug.el129
-rw-r--r--lisp/emacs-lisp/lisp-mode.el28
-rw-r--r--lisp/facemenu.el10
-rw-r--r--lisp/faces.el2
-rw-r--r--lisp/files.el2
-rw-r--r--lisp/frame.el2
-rw-r--r--lisp/gnus/ChangeLog119
-rw-r--r--lisp/gnus/gnus-agent.el2
-rw-r--r--lisp/gnus/gnus-art.el68
-rw-r--r--lisp/gnus/gnus-dup.el4
-rw-r--r--lisp/gnus/gnus-ems.el4
-rw-r--r--lisp/gnus/gnus-group.el20
-rw-r--r--lisp/gnus/gnus-int.el10
-rw-r--r--lisp/gnus/gnus-msg.el2
-rw-r--r--lisp/gnus/gnus-spec.el6
-rw-r--r--lisp/gnus/gnus-sum.el32
-rw-r--r--lisp/gnus/gnus-util.el3
-rw-r--r--lisp/gnus/gnus.el19
-rw-r--r--lisp/gnus/message.el36
-rw-r--r--lisp/gnus/mm-encode.el1
-rw-r--r--lisp/gnus/mml.el2
-rw-r--r--lisp/gnus/nnimap.el35
-rw-r--r--lisp/gnus/nnrss.el3
-rw-r--r--lisp/gnus/plstore.el44
-rw-r--r--lisp/help.el4
-rw-r--r--lisp/ielm.el4
-rw-r--r--lisp/image-mode.el2
-rw-r--r--lisp/info.el26
-rw-r--r--lisp/international/mule-cmds.el11
-rw-r--r--lisp/isearch.el8
-rw-r--r--lisp/mail/reporter.el9
-rw-r--r--lisp/mail/rmail.el17
-rw-r--r--lisp/mail/sendmail.el58
-rw-r--r--lisp/net/rcirc.el10
-rw-r--r--lisp/net/rlogin.el4
-rw-r--r--lisp/net/telnet.el10
-rw-r--r--lisp/paren.el20
-rw-r--r--lisp/play/doctor.el1
-rw-r--r--lisp/progmodes/cc-mode.el4
-rw-r--r--lisp/progmodes/compile.el5
-rw-r--r--lisp/progmodes/gdb-mi.el14
-rw-r--r--lisp/progmodes/gud.el23
-rw-r--r--lisp/progmodes/inf-lisp.el3
-rw-r--r--lisp/progmodes/python.el1
-rw-r--r--lisp/progmodes/scheme.el14
-rw-r--r--lisp/replace.el15
-rw-r--r--lisp/shell.el9
-rw-r--r--lisp/simple.el30
-rw-r--r--lisp/subr.el14
-rw-r--r--lisp/textmodes/bibtex.el6
-rw-r--r--lisp/textmodes/flyspell.el3
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-http.el4
-rw-r--r--lisp/wdired.el7
-rw-r--r--lisp/window.el610
-rw-r--r--lisp/woman.el29
-rw-r--r--m4/include_next.m431
-rw-r--r--m4/nocrash.m430
-rw-r--r--m4/signal_h.m45
-rw-r--r--m4/time_h.m45
-rw-r--r--m4/unistd_h.m45
-rw-r--r--nt/config.nt2
-rw-r--r--src/ChangeLog90
-rw-r--r--src/alloc.c22
-rw-r--r--src/buffer.h2
-rw-r--r--src/callproc.c4
-rw-r--r--src/casefiddle.c6
-rw-r--r--src/ccl.c22
-rw-r--r--src/dbusbind.c2
-rw-r--r--src/dired.c2
-rw-r--r--src/dispextern.h4
-rw-r--r--src/dispnew.c10
-rw-r--r--src/doprnt.c4
-rw-r--r--src/dosfns.c6
-rw-r--r--src/editfns.c4
-rw-r--r--src/emacs.c24
-rw-r--r--src/emacsgtkfixed.c12
-rw-r--r--src/eval.c2
-rw-r--r--src/fileio.c18
-rw-r--r--src/filelock.c2
-rw-r--r--src/floatfns.c4
-rw-r--r--src/fns.c4
-rw-r--r--src/font.c6
-rw-r--r--src/frame.c22
-rw-r--r--src/fringe.c6
-rw-r--r--src/getpagesize.h2
-rw-r--r--src/gmalloc.c12
-rw-r--r--src/gtkutil.c2
-rw-r--r--src/image.c36
-rw-r--r--src/indent.c2
-rw-r--r--src/insdel.c4
-rw-r--r--src/keyboard.c12
-rw-r--r--src/keymap.h11
-rw-r--r--src/lisp.h70
-rw-r--r--src/lread.c2
-rw-r--r--src/m/alpha.h2
-rw-r--r--src/menu.c4
-rw-r--r--src/minibuf.c11
-rw-r--r--src/msdos.c34
-rw-r--r--src/nsgui.h2
-rw-r--r--src/nsterm.h2
-rw-r--r--src/print.c6
-rw-r--r--src/process.c40
-rw-r--r--src/ralloc.c6
-rw-r--r--src/regex.c22
-rw-r--r--src/s/gnu-linux.h2
-rw-r--r--src/s/gnu.h2
-rw-r--r--src/sound.c6
-rw-r--r--src/sysdep.c8
-rw-r--r--src/termcap.c2
-rw-r--r--src/termchar.h2
-rw-r--r--src/unexaix.c26
-rw-r--r--src/unexelf.c72
-rw-r--r--src/unexmacosx.c2
-rw-r--r--src/unexw32.c6
-rw-r--r--src/vm-limit.c2
-rw-r--r--src/w16select.c16
-rw-r--r--src/w32.c8
-rw-r--r--src/w32term.h2
-rw-r--r--src/widget.c24
-rw-r--r--src/window.c6
-rw-r--r--src/xdisp.c14
-rw-r--r--src/xfaces.c4
-rw-r--r--src/xfns.c8
-rw-r--r--src/xmenu.c4
-rw-r--r--src/xml.c12
-rw-r--r--src/xrdb.c4
-rw-r--r--src/xselect.c25
-rw-r--r--src/xsettings.c2
-rw-r--r--src/xterm.c2
-rw-r--r--src/xterm.h2
159 files changed, 2473 insertions, 1362 deletions
diff --git a/ChangeLog b/ChangeLog
index 437c6dba2f1..22f9955e98b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
12011-09-11 Paul Eggert <eggert@cs.ucla.edu>
2
3 Merge from gnulib, porting to Tru64.
4 * lib/lstat.c, lib/stat.c, m4/include_next.m4, m4/nocrash.m4:
5 * m4/signal_h.m4, m4/time_h.m4, m4/unistd_h.m4:
6 Merge from gnulib. This fixes a compilation error on Tru64 UNIX
7 aka OSF/1 5.1 DTK cc. There is also some mingw stuff here that
8 doesn't affect Emacs.
9
12011-09-06 Paul Eggert <eggert@cs.ucla.edu> 102011-09-06 Paul Eggert <eggert@cs.ucla.edu>
2 11
3 * configure.in (isnan): Remove now-unnecessary check. 12 * configure.in (isnan): Remove now-unnecessary check.
@@ -231,7 +240,7 @@
231 240
232 * m4/lstat.m4: Merge from gnulib (Bug#8878). 241 * m4/lstat.m4: Merge from gnulib (Bug#8878).
233 242
2342011-06-16 Miles Bader <miles@gnu.org> 2432011-06-16 Miles Bader <miles@gnu.org>
235 244
236 * configure.in: Try to determine CRT_DIR automatically when 245 * configure.in: Try to determine CRT_DIR automatically when
237 using gcc. 246 using gcc.
diff --git a/autogen/configure b/autogen/configure
index 31a0c29aa56..6ae1560c238 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -17091,13 +17091,24 @@ _ACEOF
17091 aix*) gl_absname_cpp="$ac_cpp -C" ;; 17091 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17092 *) gl_absname_cpp="$ac_cpp" ;; 17092 *) gl_absname_cpp="$ac_cpp" ;;
17093 esac 17093 esac
17094
17095 case "$host_os" in
17096 mingw*)
17097 gl_dirsep_regex='[/\\]'
17098 ;;
17099 *)
17100 gl_dirsep_regex='/'
17101 ;;
17102 esac
17103
17104 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'getopt.h#{
17105 s#.*"\(.*'"${gl_dirsep_regex}"'getopt.h\)".*#\1#
17106 s#^/[^/]#//&#
17107 p
17108 q
17109 }'
17094 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 17110 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17095 sed -n '\#/getopt.h#{ 17111 sed -n "$gl_absolute_header_sed"`'"'
17096 s#.*"\(.*/getopt.h\)".*#\1#
17097 s#^/[^/]#//&#
17098 p
17099 q
17100 }'`'"'
17101 else 17112 else
17102 gl_cv_next_getopt_h='<'getopt.h'>' 17113 gl_cv_next_getopt_h='<'getopt.h'>'
17103 fi 17114 fi
@@ -17418,6 +17429,34 @@ nocrash_init (void)
17418 } 17429 }
17419 } 17430 }
17420} 17431}
17432#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17433/* Avoid a crash on native Windows. */
17434#define WIN32_LEAN_AND_MEAN
17435#include <windows.h>
17436#include <winerror.h>
17437static LONG WINAPI
17438exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
17439{
17440 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
17441 {
17442 case EXCEPTION_ACCESS_VIOLATION:
17443 case EXCEPTION_IN_PAGE_ERROR:
17444 case EXCEPTION_STACK_OVERFLOW:
17445 case EXCEPTION_GUARD_PAGE:
17446 case EXCEPTION_PRIV_INSTRUCTION:
17447 case EXCEPTION_ILLEGAL_INSTRUCTION:
17448 case EXCEPTION_DATATYPE_MISALIGNMENT:
17449 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
17450 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
17451 exit (1);
17452 }
17453 return EXCEPTION_CONTINUE_SEARCH;
17454}
17455static void
17456nocrash_init (void)
17457{
17458 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
17459}
17421#else 17460#else
17422/* Avoid a crash on POSIX systems. */ 17461/* Avoid a crash on POSIX systems. */
17423#include <signal.h> 17462#include <signal.h>
@@ -17791,13 +17830,24 @@ _ACEOF
17791 aix*) gl_absname_cpp="$ac_cpp -C" ;; 17830 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17792 *) gl_absname_cpp="$ac_cpp" ;; 17831 *) gl_absname_cpp="$ac_cpp" ;;
17793 esac 17832 esac
17833
17834 case "$host_os" in
17835 mingw*)
17836 gl_dirsep_regex='[/\\]'
17837 ;;
17838 *)
17839 gl_dirsep_regex='/'
17840 ;;
17841 esac
17842
17843 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdint.h#{
17844 s#.*"\(.*'"${gl_dirsep_regex}"'stdint.h\)".*#\1#
17845 s#^/[^/]#//&#
17846 p
17847 q
17848 }'
17794 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 17849 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17795 sed -n '\#/stdint.h#{ 17850 sed -n "$gl_absolute_header_sed"`'"'
17796 s#.*"\(.*/stdint.h\)".*#\1#
17797 s#^/[^/]#//&#
17798 p
17799 q
17800 }'`'"'
17801 else 17851 else
17802 gl_cv_next_stdint_h='<'stdint.h'>' 17852 gl_cv_next_stdint_h='<'stdint.h'>'
17803 fi 17853 fi
@@ -18487,13 +18537,24 @@ _ACEOF
18487 aix*) gl_absname_cpp="$ac_cpp -C" ;; 18537 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18488 *) gl_absname_cpp="$ac_cpp" ;; 18538 *) gl_absname_cpp="$ac_cpp" ;;
18489 esac 18539 esac
18540
18541 case "$host_os" in
18542 mingw*)
18543 gl_dirsep_regex='[/\\]'
18544 ;;
18545 *)
18546 gl_dirsep_regex='/'
18547 ;;
18548 esac
18549
18550 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'inttypes.h#{
18551 s#.*"\(.*'"${gl_dirsep_regex}"'inttypes.h\)".*#\1#
18552 s#^/[^/]#//&#
18553 p
18554 q
18555 }'
18490 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 18556 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18491 sed -n '\#/inttypes.h#{ 18557 sed -n "$gl_absolute_header_sed"`'"'
18492 s#.*"\(.*/inttypes.h\)".*#\1#
18493 s#^/[^/]#//&#
18494 p
18495 q
18496 }'`'"'
18497 else 18558 else
18498 gl_cv_next_inttypes_h='<'inttypes.h'>' 18559 gl_cv_next_inttypes_h='<'inttypes.h'>'
18499 fi 18560 fi
@@ -19189,13 +19250,24 @@ _ACEOF
19189 aix*) gl_absname_cpp="$ac_cpp -C" ;; 19250 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19190 *) gl_absname_cpp="$ac_cpp" ;; 19251 *) gl_absname_cpp="$ac_cpp" ;;
19191 esac 19252 esac
19253
19254 case "$host_os" in
19255 mingw*)
19256 gl_dirsep_regex='[/\\]'
19257 ;;
19258 *)
19259 gl_dirsep_regex='/'
19260 ;;
19261 esac
19262
19263 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'time.h#{
19264 s#.*"\(.*'"${gl_dirsep_regex}"'time.h\)".*#\1#
19265 s#^/[^/]#//&#
19266 p
19267 q
19268 }'
19192 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 19269 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19193 sed -n '\#/time.h#{ 19270 sed -n "$gl_absolute_header_sed"`'"'
19194 s#.*"\(.*/time.h\)".*#\1#
19195 s#^/[^/]#//&#
19196 p
19197 q
19198 }'`'"'
19199 19271
19200 19272
19201fi 19273fi
@@ -19218,6 +19290,8 @@ $as_echo "$gl_cv_next_time_h" >&6; }
19218 19290
19219 19291
19220 19292
19293
19294
19221ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" 19295ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default"
19222if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : 19296if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
19223 ac_have_decl=1 19297 ac_have_decl=1
@@ -20728,13 +20802,24 @@ _ACEOF
20728 aix*) gl_absname_cpp="$ac_cpp -C" ;; 20802 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20729 *) gl_absname_cpp="$ac_cpp" ;; 20803 *) gl_absname_cpp="$ac_cpp" ;;
20730 esac 20804 esac
20805
20806 case "$host_os" in
20807 mingw*)
20808 gl_dirsep_regex='[/\\]'
20809 ;;
20810 *)
20811 gl_dirsep_regex='/'
20812 ;;
20813 esac
20814
20815 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'signal.h#{
20816 s#.*"\(.*'"${gl_dirsep_regex}"'signal.h\)".*#\1#
20817 s#^/[^/]#//&#
20818 p
20819 q
20820 }'
20731 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 20821 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20732 sed -n '\#/signal.h#{ 20822 sed -n "$gl_absolute_header_sed"`'"'
20733 s#.*"\(.*/signal.h\)".*#\1#
20734 s#^/[^/]#//&#
20735 p
20736 q
20737 }'`'"'
20738 20823
20739 20824
20740fi 20825fi
@@ -20772,6 +20857,8 @@ fi
20772 20857
20773 20858
20774 20859
20860
20861
20775 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " 20862 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
20776#include <signal.h> 20863#include <signal.h>
20777 20864
@@ -20960,13 +21047,24 @@ _ACEOF
20960 aix*) gl_absname_cpp="$ac_cpp -C" ;; 21047 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20961 *) gl_absname_cpp="$ac_cpp" ;; 21048 *) gl_absname_cpp="$ac_cpp" ;;
20962 esac 21049 esac
21050
21051 case "$host_os" in
21052 mingw*)
21053 gl_dirsep_regex='[/\\]'
21054 ;;
21055 *)
21056 gl_dirsep_regex='/'
21057 ;;
21058 esac
21059
21060 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdarg.h#{
21061 s#.*"\(.*'"${gl_dirsep_regex}"'stdarg.h\)".*#\1#
21062 s#^/[^/]#//&#
21063 p
21064 q
21065 }'
20963 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 21066 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20964 sed -n '\#/stdarg.h#{ 21067 sed -n "$gl_absolute_header_sed"`'"'
20965 s#.*"\(.*/stdarg.h\)".*#\1#
20966 s#^/[^/]#//&#
20967 p
20968 q
20969 }'`'"'
20970 21068
20971 21069
20972fi 21070fi
@@ -21149,13 +21247,24 @@ _ACEOF
21149 aix*) gl_absname_cpp="$ac_cpp -C" ;; 21247 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21150 *) gl_absname_cpp="$ac_cpp" ;; 21248 *) gl_absname_cpp="$ac_cpp" ;;
21151 esac 21249 esac
21250
21251 case "$host_os" in
21252 mingw*)
21253 gl_dirsep_regex='[/\\]'
21254 ;;
21255 *)
21256 gl_dirsep_regex='/'
21257 ;;
21258 esac
21259
21260 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stddef.h#{
21261 s#.*"\(.*'"${gl_dirsep_regex}"'stddef.h\)".*#\1#
21262 s#^/[^/]#//&#
21263 p
21264 q
21265 }'
21152 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 21266 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21153 sed -n '\#/stddef.h#{ 21267 sed -n "$gl_absolute_header_sed"`'"'
21154 s#.*"\(.*/stddef.h\)".*#\1#
21155 s#^/[^/]#//&#
21156 p
21157 q
21158 }'`'"'
21159 21268
21160 21269
21161fi 21270fi
@@ -21208,13 +21317,24 @@ _ACEOF
21208 aix*) gl_absname_cpp="$ac_cpp -C" ;; 21317 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21209 *) gl_absname_cpp="$ac_cpp" ;; 21318 *) gl_absname_cpp="$ac_cpp" ;;
21210 esac 21319 esac
21320
21321 case "$host_os" in
21322 mingw*)
21323 gl_dirsep_regex='[/\\]'
21324 ;;
21325 *)
21326 gl_dirsep_regex='/'
21327 ;;
21328 esac
21329
21330 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdio.h#{
21331 s#.*"\(.*'"${gl_dirsep_regex}"'stdio.h\)".*#\1#
21332 s#^/[^/]#//&#
21333 p
21334 q
21335 }'
21211 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 21336 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21212 sed -n '\#/stdio.h#{ 21337 sed -n "$gl_absolute_header_sed"`'"'
21213 s#.*"\(.*/stdio.h\)".*#\1#
21214 s#^/[^/]#//&#
21215 p
21216 q
21217 }'`'"'
21218 21338
21219 21339
21220fi 21340fi
@@ -21289,13 +21409,24 @@ _ACEOF
21289 aix*) gl_absname_cpp="$ac_cpp -C" ;; 21409 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21290 *) gl_absname_cpp="$ac_cpp" ;; 21410 *) gl_absname_cpp="$ac_cpp" ;;
21291 esac 21411 esac
21412
21413 case "$host_os" in
21414 mingw*)
21415 gl_dirsep_regex='[/\\]'
21416 ;;
21417 *)
21418 gl_dirsep_regex='/'
21419 ;;
21420 esac
21421
21422 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'stdlib.h#{
21423 s#.*"\(.*'"${gl_dirsep_regex}"'stdlib.h\)".*#\1#
21424 s#^/[^/]#//&#
21425 p
21426 q
21427 }'
21292 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 21428 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21293 sed -n '\#/stdlib.h#{ 21429 sed -n "$gl_absolute_header_sed"`'"'
21294 s#.*"\(.*/stdlib.h\)".*#\1#
21295 s#^/[^/]#//&#
21296 p
21297 q
21298 }'`'"'
21299 21430
21300 21431
21301fi 21432fi
@@ -21538,13 +21669,24 @@ _ACEOF
21538 aix*) gl_absname_cpp="$ac_cpp -C" ;; 21669 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21539 *) gl_absname_cpp="$ac_cpp" ;; 21670 *) gl_absname_cpp="$ac_cpp" ;;
21540 esac 21671 esac
21672
21673 case "$host_os" in
21674 mingw*)
21675 gl_dirsep_regex='[/\\]'
21676 ;;
21677 *)
21678 gl_dirsep_regex='/'
21679 ;;
21680 esac
21681
21682 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'sys/stat.h#{
21683 s#.*"\(.*'"${gl_dirsep_regex}"'sys/stat.h\)".*#\1#
21684 s#^/[^/]#//&#
21685 p
21686 q
21687 }'
21541 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 21688 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21542 sed -n '\#/sys/stat.h#{ 21689 sed -n "$gl_absolute_header_sed"`'"'
21543 s#.*"\(.*/sys/stat.h\)".*#\1#
21544 s#^/[^/]#//&#
21545 p
21546 q
21547 }'`'"'
21548 else 21690 else
21549 gl_cv_next_sys_stat_h='<'sys/stat.h'>' 21691 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
21550 fi 21692 fi
@@ -21705,13 +21847,24 @@ _ACEOF
21705 aix*) gl_absname_cpp="$ac_cpp -C" ;; 21847 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21706 *) gl_absname_cpp="$ac_cpp" ;; 21848 *) gl_absname_cpp="$ac_cpp" ;;
21707 esac 21849 esac
21850
21851 case "$host_os" in
21852 mingw*)
21853 gl_dirsep_regex='[/\\]'
21854 ;;
21855 *)
21856 gl_dirsep_regex='/'
21857 ;;
21858 esac
21859
21860 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"'unistd.h#{
21861 s#.*"\(.*'"${gl_dirsep_regex}"'unistd.h\)".*#\1#
21862 s#^/[^/]#//&#
21863 p
21864 q
21865 }'
21708 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 21866 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21709 sed -n '\#/unistd.h#{ 21867 sed -n "$gl_absolute_header_sed"`'"'
21710 s#.*"\(.*/unistd.h\)".*#\1#
21711 s#^/[^/]#//&#
21712 p
21713 q
21714 }'`'"'
21715 else 21868 else
21716 gl_cv_next_unistd_h='<'unistd.h'>' 21869 gl_cv_next_unistd_h='<'unistd.h'>'
21717 fi 21870 fi
@@ -21744,6 +21897,8 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
21744 21897
21745 21898
21746 21899
21900
21901
21747 gl_gnulib_enabled_dosname=false 21902 gl_gnulib_enabled_dosname=false
21748 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false 21903 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
21749 gl_gnulib_enabled_stat=false 21904 gl_gnulib_enabled_stat=false
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 56958417300..5fba9eda3b0 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,12 @@
12011-09-12 Eric Hanchrow <eric.hanchrow@gmail.com>
2
3 * frames.texi (Frame Commands): Note that delete-other-frames only
4 deletes frames on current terminal.
5
62011-09-10 Eli Zaretskii <eliz@gnu.org>
7
8 * sending.texi (Mail Misc): Document mail-add-attachment.
9
12011-09-04 Eli Zaretskii <eliz@gnu.org> 102011-09-04 Eli Zaretskii <eliz@gnu.org>
2 11
3 * basic.texi (Inserting Text): Add index entries. (Bug#9433) 12 * basic.texi (Inserting Text): Add index entries. (Bug#9433)
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 328deaec357..8ca598c3348 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -448,17 +448,23 @@ terminal.
448@item C-x 5 1 448@item C-x 5 1
449@kindex C-x 5 1 449@kindex C-x 5 1
450@findex delete-other-frames 450@findex delete-other-frames
451Delete all frames except the selected one. 451Delete all frames on the current terminal, except the selected one.
452@end table 452@end table
453 453
454 The @kbd{C-x 5 0} (@code{delete-frame}) command will never delete 454 The @kbd{C-x 5 0} (@code{delete-frame}) command never deletes the
455the last frame, to prevent you from losing the ability to interact 455last frame. This prevents you from losing the ability to interact
456with the Emacs process. Note that when Emacs is run as a daemon 456with the Emacs process. Note that when Emacs is run as a daemon
457(@pxref{Emacs Server}), there is always a ``virtual frame'' that 457(@pxref{Emacs Server}), there is always a ``virtual frame'' that
458remains after all the ordinary, interactive frames are deleted. In 458remains after all the ordinary, interactive frames are deleted. In
459this case, @kbd{C-x 5 0} can delete the last interactive frame; you 459this case, @kbd{C-x 5 0} can delete the last interactive frame; you
460can use @command{emacsclient} to reconnect to the Emacs session. 460can use @command{emacsclient} to reconnect to the Emacs session.
461 461
462 The @kbd{C-x 5 1} (@code{delete-other-frames}) command only deletes
463frames on the current terminal. For example, if you call it from an X
464frame, it deletes the other frames on that X display; if the Emacs
465process has frames open on other X displays or text terminals, those
466are not deleted.
467
462@vindex focus-follows-mouse 468@vindex focus-follows-mouse
463 On X, you may have to tell Emacs how the window manager handles 469 On X, you may have to tell Emacs how the window manager handles
464focus-switching between windows, in order for @kbd{C-x 5 o} 470focus-switching between windows, in order for @kbd{C-x 5 o}
diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi
index 02857459cc1..50ec852d740 100644
--- a/doc/emacs/sending.texi
+++ b/doc/emacs/sending.texi
@@ -556,8 +556,8 @@ package, which provides more flexible citation
556@cindex Multipurpose Internet Mail Extensions 556@cindex Multipurpose Internet Mail Extensions
557 You can @dfn{attach} a file to an outgoing message by typing 557 You can @dfn{attach} a file to an outgoing message by typing
558@kbd{C-c C-a} (@code{mml-attach-file}) in the mail buffer. Attaching 558@kbd{C-c C-a} (@code{mml-attach-file}) in the mail buffer. Attaching
559is done using the MIME (Multipurpose Internet Mail Extensions) 559is done using the Multipurpose Internet Mail Extensions
560standard. 560(@acronym{MIME}) standard.
561 561
562 The @code{mml-attach-file} command prompts for the name of the file, 562 The @code{mml-attach-file} command prompts for the name of the file,
563and for the attachment's @dfn{content type}, @dfn{description}, and 563and for the attachment's @dfn{content type}, @dfn{description}, and
@@ -570,6 +570,13 @@ recipient will see a link to the attachment within the message body,
570or @samp{attachment}, which means the link will be separate from the 570or @samp{attachment}, which means the link will be separate from the
571body. 571body.
572 572
573@findex mail-add-attachment
574 The @code{mml-attach-file} command is specific to Message mode; in
575Mail mode use @kbd{mail-add-attachment} instead. It will prompt only
576for the name of the file, and will determine the content type and the
577disposition automatically. If you want to include some description of
578the attached file, type that in the message body.
579
573 The actual contents of the attached file are not inserted into the 580 The actual contents of the attached file are not inserted into the
574mail buffer. Instead, some placeholder text is inserted into the mail 581mail buffer. Instead, some placeholder text is inserted into the mail
575buffer, like this: 582buffer, like this:
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 3f52d684683..4873680d0a1 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12011-09-11 Juanma Barranquero <lekktu@gmail.com>
2
3 * processes.texi (Network Servers): Clarify what the process
4 buffer is used for (bug#9233).
5
12011-08-30 Dani Moncayo <dmoncayo@gmail.com> (tiny change) 62011-08-30 Dani Moncayo <dmoncayo@gmail.com> (tiny change)
2 7
3 * lists.texi (Building Lists): Fix typo. 8 * lists.texi (Building Lists): Fix typo.
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 5d5b11497f7..d4f8ee9708b 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -1981,9 +1981,9 @@ not get a separate process buffer; otherwise, Emacs creates a new
1981buffer for the purpose. The buffer name is the server's buffer name 1981buffer for the purpose. The buffer name is the server's buffer name
1982or process name, concatenated with the client identification string. 1982or process name, concatenated with the client identification string.
1983 1983
1984The server's process buffer value is never used directly by Emacs, but 1984The server's process buffer value is never used directly, but the log
1985it is passed to the log function, which can log connections by 1985function can retrieve it and use it to log connections by inserting
1986inserting text there. 1986text there.
1987 1987
1988@item 1988@item
1989The communication type and the process filter and sentinel are 1989The communication type and the process filter and sentinel are
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 8260df911a8..9826523227c 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,14 @@
12011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnus.texi (Listing Groups): Explain `gnus-group-list-limit'.
4 (Finding the News): Doc clarification.
5 (Terminology): Mention naming.
6
72011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
8
9 * gnus.texi: Remove mentions of `recent', which are now obsolete.
10 (Interactive): Document `quiet'.
11
12011-08-15 Suvayu Ali <fatkasuvayu+linux@gmail.com> (tiny change) 122011-08-15 Suvayu Ali <fatkasuvayu+linux@gmail.com> (tiny change)
2 13
3 * org.texi (Images in LaTeX export): rewrite. 14 * org.texi (Images in LaTeX export): rewrite.
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 439ff7fbc55..59c39893c13 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -1011,7 +1011,7 @@ The @code{gnus-select-method} variable says where Gnus should look for
1011news. This variable should be a list where the first element says 1011news. This variable should be a list where the first element says
1012@dfn{how} and the second element says @dfn{where}. This method is your 1012@dfn{how} and the second element says @dfn{where}. This method is your
1013native method. All groups not fetched with this method are 1013native method. All groups not fetched with this method are
1014foreign groups. 1014secondary or foreign groups.
1015 1015
1016For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where 1016For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1017you want to get your daily dosage of news from, you'd say: 1017you want to get your daily dosage of news from, you'd say:
@@ -2983,7 +2983,7 @@ The available operators are @code{not}, @code{and} and @code{or}.
2983Predicates include @code{tick}, @code{unsend}, @code{undownload}, 2983Predicates include @code{tick}, @code{unsend}, @code{undownload},
2984@code{unread}, @code{dormant}, @code{expire}, @code{reply}, 2984@code{unread}, @code{dormant}, @code{expire}, @code{reply},
2985@code{killed}, @code{bookmark}, @code{score}, @code{save}, 2985@code{killed}, @code{bookmark}, @code{score}, @code{save},
2986@code{cache}, @code{forward}, @code{unseen} and @code{recent}. 2986@code{cache}, @code{forward}, and @code{unseen}.
2987 2987
2988@end table 2988@end table
2989 2989
@@ -3335,8 +3335,12 @@ List all groups with ticked articles (@code{gnus-group-list-ticked}).
3335@item A / 3335@item A /
3336@kindex A / (Group) 3336@kindex A / (Group)
3337@findex gnus-group-list-limit 3337@findex gnus-group-list-limit
3338List groups limited within the current selection 3338Further limit groups within the current selection
3339(@code{gnus-group-list-limit}). 3339(@code{gnus-group-list-limit}). If you've first limited to groups
3340with dormant articles with @kbd{A ?}, you can then further limit with
3341@kbd{A / c}, which will then limit to groups with cached articles,
3342giving you the groups that have both dormant articles and cached
3343articles.
3340 3344
3341@item A f 3345@item A f
3342@kindex A f (Group) 3346@kindex A f (Group)
@@ -6165,18 +6169,9 @@ religiously) are marked with an @samp{S} in the second column
6165(@code{gnus-saved-mark}). 6169(@code{gnus-saved-mark}).
6166 6170
6167@item 6171@item
6168@vindex gnus-recent-mark
6169Articles that according to the server haven't been shown to the user
6170before are marked with a @samp{N} in the second column
6171(@code{gnus-recent-mark}). Note that not all servers support this
6172mark, in which case it simply never appears. Compare with
6173@code{gnus-unseen-mark}.
6174
6175@item
6176@vindex gnus-unseen-mark 6172@vindex gnus-unseen-mark
6177Articles that haven't been seen before in Gnus by the user are marked 6173Articles that haven't been seen before in Gnus by the user are marked
6178with a @samp{.} in the second column (@code{gnus-unseen-mark}). 6174with a @samp{.} in the second column (@code{gnus-unseen-mark}).
6179Compare with @code{gnus-recent-mark}.
6180 6175
6181@item 6176@item
6182@vindex gnus-downloaded-mark 6177@vindex gnus-downloaded-mark
@@ -22265,8 +22260,9 @@ is @code{t} by default.
22265 22260
22266@item gnus-interactive-exit 22261@item gnus-interactive-exit
22267@vindex gnus-interactive-exit 22262@vindex gnus-interactive-exit
22268Require confirmation before exiting Gnus. This variable is @code{t} by 22263If non-@code{nil}, require a confirmation when exiting Gnus. If
22269default. 22264@code{quiet}, update any active summary buffers automatically without
22265querying. The default value is @code{t}.
22270@end table 22266@end table
22271 22267
22272 22268
@@ -27993,10 +27989,6 @@ non-@code{nil}, the summary buffer is shown and updated as it's being
27993built. 27989built.
27994 27990
27995@item 27991@item
27996The new @code{recent} mark @samp{.} indicates newly arrived messages (as
27997opposed to old but unread messages).
27998
27999@item
28000Gnus supports RFC 2369 mailing list headers, and adds a number of 27992Gnus supports RFC 2369 mailing list headers, and adds a number of
28001related commands in mailing list groups. @xref{Mailing List}. 27993related commands in mailing list groups. @xref{Mailing List}.
28002 27994
@@ -28584,18 +28576,21 @@ confusing.
28584@item native 28576@item native
28585@cindex native 28577@cindex native
28586Gnus will always use one method (and back end) as the @dfn{native}, or 28578Gnus will always use one method (and back end) as the @dfn{native}, or
28587default, way of getting news. 28579default, way of getting news. Groups from the native select method
28580have names like @samp{gnu.emacs.gnus}.
28588 28581
28589@item foreign 28582@item foreign
28590@cindex foreign 28583@cindex foreign
28591You can also have any number of foreign groups active at the same time. 28584You can also have any number of foreign groups active at the same
28592These are groups that use non-native non-secondary back ends for getting 28585time. These are groups that use non-native non-secondary back ends
28593news. 28586for getting news. Foreign groups have names like
28587@samp{nntp+news.gmane.org:gmane.emacs.gnus.devel}.
28594 28588
28595@item secondary 28589@item secondary
28596@cindex secondary 28590@cindex secondary
28597Secondary back ends are somewhere half-way between being native and being 28591Secondary back ends are somewhere half-way between being native and
28598foreign, but they mostly act like they are native. 28592being foreign, but they mostly act like they are native, but they, too
28593have names like @samp{nntp+news.gmane.org:gmane.emacs.gnus.devel}.
28599 28594
28600@item article 28595@item article
28601@cindex article 28596@cindex article
@@ -29572,9 +29567,9 @@ propagate the mark information to the server.
29572marks (preserving all marks not mentioned). @var{mark} is a list of 29567marks (preserving all marks not mentioned). @var{mark} is a list of
29573marks; where each mark is a symbol. Currently used marks are 29568marks; where each mark is a symbol. Currently used marks are
29574@code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed}, 29569@code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
29575@code{dormant}, @code{save}, @code{download}, @code{unsend}, 29570@code{dormant}, @code{save}, @code{download}, @code{unsend}, and
29576@code{forward} and @code{recent}, but your back end should, if 29571@code{forward}, but your back end should, if possible, not limit
29577possible, not limit itself to these. 29572itself to these.
29578 29573
29579Given contradictory actions, the last action in the list should be the 29574Given contradictory actions, the last action in the list should be the
29580effective one. That is, if your action contains a request to add the 29575effective one. That is, if your action contains a request to add the
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 0749862f676..52129803583 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,12 @@
12011-09-13 William Stevenson <yhvh2000@gmail.com>
2
3 * themes/adwaita-theme.el: New file.
4
52011-09-13 Scott Frazer <frazer.scott@gmail.com>
6
7 * themes/whiteboard-theme.el:
8 * themes/deeper-blue-theme.el: New files.
9
12011-09-05 Juri Linkov <juri@jurta.org> 102011-09-05 Juri Linkov <juri@jurta.org>
2 11
3 * grep.txt: Add `eval' to the Local Variables section that 12 * grep.txt: Add `eval' to the Local Variables section that
diff --git a/etc/NEWS b/etc/NEWS
index dbeca0b521b..9f5595a6341 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -156,6 +156,15 @@ If you had that set, then then you need to put
156 156
157in your ~/.authinfo file instead. 157in your ~/.authinfo file instead.
158 158
159*** sendmail changes
160+++
161You can now add MIME attachments to outgoing messages with the new
162command `mail-add-attachment'.
163
164---
165The command `mail-attach-file' was renamed to `mail-insert-file'; the
166old name is now an obsolete alias to the new name.
167
159** Emacs server and client changes 168** Emacs server and client changes
160+++ 169+++
161*** New option `server-port' specifies the port on which the Emacs 170*** New option `server-port' specifies the port on which the Emacs
@@ -484,7 +493,7 @@ between applications.
484To inhibit this, change `x-select-enable-clipboard-manager' to nil. 493To inhibit this, change `x-select-enable-clipboard-manager' to nil.
485 494
486** New command `rectangle-number-lines', bound to `C-x r N', numbers 495** New command `rectangle-number-lines', bound to `C-x r N', numbers
487the lines in the current rectangle. With an prefix argument, this 496the lines in the current rectangle. With a prefix argument, this
488prompts for a number to count from and for a format string. 497prompts for a number to count from and for a format string.
489 498
490** The command shell prompts for the shell path name, when the default 499** The command shell prompts for the shell path name, when the default
diff --git a/etc/themes/adwaita-theme.el b/etc/themes/adwaita-theme.el
new file mode 100644
index 00000000000..9e991847d5c
--- /dev/null
+++ b/etc/themes/adwaita-theme.el
@@ -0,0 +1,106 @@
1;;; adwaita-theme.el --- Tango-based custom theme for faces
2
3;; Copyright (C) 2010-2011 Free Software Foundation, Inc.
4
5;; Author: William Stevenson <yhvh2000@gmail.com>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Code:
23
24(deftheme adwaita
25 "Face colors similar to the default theme of Gnome 3 (Adwaita).
26The colors are chosen to match Adwaita window decorations and the
27default look of the Gnome 3 desktop.")
28
29(let ((class '((class color) (min-colors 89))))
30 (custom-theme-set-faces
31 'adwaita
32 `(cursor ((,class (:background "#00BBFF"))))
33 `(border-color ((,class (:background "#EDEDED"))))
34 `(default ((,class (:background "#EDEDED" :foreground "#2E3436"))))
35 `(fringe ((,class (:background "#E6E6E6"))))
36 `(mode-line ((,class (:box (:line-width -1 :style released-button)
37 :background "white" :foreground "#2E3436"))))
38 `(mode-line-inactive ((,class (:foreground "#C6C6C6" :background ,"white"))))
39 `(header-line ((,class (:foreground "#CCCCCC" :background "black"))))
40
41 `(minibuffer-prompt ((,class (:foreground "#0084C8" :bold t))))
42 `(region ((,class (:foreground unspecified :background "#C2D5E9"))))
43 `(dired-header ((,class (:bold t :foreground "#0084C8"))))
44 `(widget-button ((,class (:bold t :foreground "#0084C8"))))
45
46 `(success ((,class (:bold t :foreground "#4E9A06"))))
47 `(warning ((,class (:foreground "#CE5C00"))))
48 `(error ((,class (:foreground "#B50000"))))
49
50 `(font-lock-builtin-face ((,class (:foreground "#A020F0"))))
51 `(font-lock-constant-face ((,class (:foreground "#F5666D"))))
52 `(font-lock-comment-face ((,class (:foreground "#204A87"))))
53 `(font-lock-function-name-face ((,class (:foreground "#00578E" :bold t))))
54 `(font-lock-keyword-face ((,class (:bold t :foreground "#A52A2A"))))
55 `(font-lock-string-face ((,class (:foreground "#4E9A06"))))
56 `(font-lock-type-face ((,class (:foreground "#2F8B58" :bold t))))
57 `(font-lock-variable-name-face ((,class (:foreground "#0084C8" :bold t))))
58 `(font-lock-warning-face ((,class (:foreground "#F5666D" :bold t))))
59
60 `(link ((,class (:underline t :foreground "#0066CC"))))
61 `(link-visited ((,class (:underline t :foreground "#6799CC"))))
62 `(highlight ((,class (:foreground "white" :background "#4A90D9"))))
63 `(isearch ((,class (:foreground "white" :background "#77A4DD"))))
64
65 `(erc-action-face ((,class (:foreground "#F5666D"))))
66 `(erc-button ((,class (:foreground "#A8799C"))))
67 `(erc-current-nick-face ((,class (:bold t :foreground "#FF7092"))))
68 `(erc-error-face ((,class (:foreground "#F5666D" :bold t))))
69 `(erc-input-face ((,class (:foreground "black"))))
70 `(erc-keyword-face ((,class (:foreground "#F5666D"))))
71 `(erc-my-nick-face ((,class (:bold t :foreground "#FF8CA7"))))
72 `(erc-nick-default-face ((,class (:bold t :foreground "#0084C8"))))
73 `(erc-notice-face ((,class (:foreground "#0084C8"))))
74 `(erc-prompt-face ((,class (:foreground "black"))))
75 `(erc-timestamp-face ((,class (:foreground ,"#4CB64A"))))
76
77 `(magit-log-sha1 ((,class (:foreground "#FF7092"))))
78 `(magit-log-head-label-local ((,class (:foreground "#4F78B5"))))
79 `(magit-log-head-label-remote ((,class (:foreground ,"#4CB64A"))))
80 `(magit-branch ((,class (:bold t :foreground "#0084C8"))))
81 `(magit-section-title ((,class (:bold t :foreground "#00578E"))))
82 `(magit-item-highlight ((,class (:background "#FEFFBF"))))
83 `(magit-diff-add ((,class (:bold t :foreground "#4CB64A"))))
84 `(magit-diff-del ((,class (:bold nil :foreground "#F5666D"))))
85
86 `(gnus-group-mail-1-empty ((,class (:foreground "#00578E"))))
87 `(gnus-group-mail-1 ((,class (:bold t :foreground "#4F78B5"))))
88 `(gnus-group-mail-3-empty ((,class (:foreground "#00578E"))))
89 `(gnus-group-mail-3 ((,class (:bold t :foreground "#9CBB43"))))
90 `(gnus-group-news-3-empty ((,class (:foreground "#00578E"))))
91 `(gnus-group-news-3 ((,class (:bold t :foreground "#9CBB43"))))
92 `(gnus-header-name ((,class (:bold t :foreground "#0084C8"))))
93 `(gnus-header-subject ((,class (:bold t :foreground "#FF7092"))))
94 `(gnus-header-content ((,class (:foreground "#FF7092"))))
95 `(gnus-button ((,class (:bold t :foreground "#00578E"))))
96 `(gnus-cite-1 ((,class (:foreground "#00578E"))))
97 `(gnus-cite-2 ((,class (:foreground "#0084C8"))))
98
99 `(diff-added ((,class (:bold t :foreground "#4E9A06"))))
100 `(diff-removed ((,class (:bold t :foreground "#F5666D"))))))
101
102;; Local Variables:
103;; no-byte-compile: t
104;; End:
105
106;;; adwaita-theme.el ends here
diff --git a/etc/themes/deeper-blue-theme.el b/etc/themes/deeper-blue-theme.el
new file mode 100644
index 00000000000..5c93e84d078
--- /dev/null
+++ b/etc/themes/deeper-blue-theme.el
@@ -0,0 +1,116 @@
1;;; deeper-blue-theme.el --- Custom theme for faces
2
3;; Copyright (C) 2011 Free Software Foundation, Inc.
4
5;; Author: Scott Frazer <frazer.scott@gmail.com>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Code:
23
24(deftheme deeper-blue
25 "Face colors using a deep blue backgound.")
26
27(let ((class '((class color) (min-colors 89))))
28 (custom-theme-set-faces
29 'deeper-blue
30 `(Info-title-1-face ((,class (:family "helv" :weight bold :height 1.728))))
31 `(Info-title-2-face ((,class (:family "helv" :weight bold :height 1.44))))
32 `(Info-title-3-face ((,class (:family "helv" :weight bold :height 1.2))))
33 `(Info-title-4-face ((,class (:family "helv" :weight bold))))
34 `(compilation-column-number ((,class (:foreground "LightGreen"))))
35 `(compilation-error ((,class (:foreground "Red1"))))
36 `(compilation-info ((,class (:weight normal :foreground "LightSkyBlue"))))
37 `(compilation-line-number ((,class (:foreground "LightGreen"))))
38 `(cperl-array-face ((,class (:foreground "yellow2"))))
39 `(cperl-hash-face ((,class (:foreground "coral1"))))
40 `(cursor ((,class (:background "green" :foreground "black"))))
41 `(default ((,class (:background "#181a26" :foreground "gray80"))))
42 `(diff-added ((,class (nil))))
43 `(diff-changed ((,class (nil))))
44 `(diff-context ((,class (:foreground "seashell4"))))
45 `(diff-file-header ((,class (:background "grey60"))))
46 `(diff-function ((,class (:inherit diff-header))))
47 `(diff-header ((,class (:background "grey45"))))
48 `(diff-hunk-header ((,class (:inherit diff-header))))
49 `(diff-index ((,class (:inherit diff-file-header))))
50 `(diff-indicator-added ((,class (:foreground "white" :background "darkolivegreen"))))
51 `(diff-indicator-changed ((,class (:foreground "white" :background "dodgerblue4"))))
52 `(diff-indicator-removed ((,class (:foreground "white" :background "indianred4"))))
53 `(diff-refine-change ((,class (:background "skyblue4"))))
54 `(diff-removed ((,class (nil))))
55 `(dired-marked ((,class (:background "dodgerblue3" :foreground "white"))))
56 `(ediff-current-diff-A ((,class (:background "green4" :foreground "white"))))
57 `(ediff-current-diff-B ((,class (:background "darkorange3" :foreground "white"))))
58 `(ediff-even-diff-B ((,class (:background "Grey50" :foreground "White"))))
59 `(ediff-fine-diff-A ((,class (:background "skyblue4" :foreground "white"))))
60 `(ediff-fine-diff-B ((,class (:background "cyan4" :foreground "white"))))
61 `(ediff-odd-diff-A ((,class (:background "Grey50" :foreground "White"))))
62 `(error ((,class (:foreground "red"))))
63 `(flymake-errline ((,class (:background nil :underline "red"))))
64 `(flymake-warnline ((,class (:background nil :underline "magenta3"))))
65 `(font-lock-builtin-face ((,class (:foreground "LightCoral"))))
66 `(font-lock-comment-delimiter-face ((,class (:foreground "gray50"))))
67 `(font-lock-comment-face ((,class (:foreground "gray50"))))
68 `(font-lock-constant-face ((,class (:foreground "DarkOliveGreen3"))))
69 `(font-lock-doc-face ((,class (:foreground "moccasin"))))
70 `(font-lock-doc-string-face ((,class (:foreground "moccasin"))))
71 `(font-lock-function-name-face ((,class (:foreground "goldenrod"))))
72 `(font-lock-keyword-face ((,class (:foreground "DeepSkyBlue1"))))
73 `(font-lock-preprocessor-face ((,class (:foreground "gold"))))
74 `(font-lock-reference-face ((,class (:foreground "LightCoral"))))
75 `(font-lock-regexp-grouping-backslash ((,class (:weight bold))))
76 `(font-lock-regexp-grouping-construct ((,class (:weight bold))))
77 `(font-lock-string-face ((,class (:foreground "burlywood"))))
78 `(font-lock-type-face ((,class (:foreground "CadetBlue1"))))
79 `(font-lock-variable-name-face ((,class (:foreground "SeaGreen2"))))
80 `(fringe ((,class (:background "black"))))
81 `(highlight ((,class (:background "DodgerBlue4"))))
82 `(ido-first-match ((,class (:weight normal :foreground "orange"))))
83 `(ido-only-match ((,class (:foreground "green"))))
84 `(ido-subdir ((,class (:foreground nil :inherit font-lock-keyword-face))))
85 `(info-header-node ((,class (:foreground "DeepSkyBlue1"))))
86 `(info-header-xref ((,class (:foreground "SeaGreen2"))))
87 `(info-menu-header ((,class (:family "helv" :weight bold))))
88 `(info-node ((,class (:foreground "DeepSkyBlue1"))))
89 `(info-xref ((,class (:foreground "SeaGreen2"))))
90 `(isearch ((,class (:background "coral2" :foreground "white"))))
91 `(isearch-lazy-highlight-face ((,class (:background "coral4" :foreground "white"))))
92 `(lazy-highlight ((,class (:background "cadetblue" :foreground "white"))))
93 `(match ((,class (:background "DeepPink4"))))
94 `(minibuffer-prompt ((,class (:foreground "CadetBlue1"))))
95 `(mode-line ((,class (:background "gray75" :foreground "black" :box (:line-width 1 :style released-button)))))
96 `(mode-line-buffer-id ((,class (:weight bold :background nil :foreground "blue4"))))
97 `(mode-line-inactive ((,class (:background "gray40" :foreground "black" :box (:line-width 1 :color "gray40" :style nil)))))
98 `(outline-1 ((,class (:foreground "SkyBlue1"))))
99 `(outline-2 ((,class (:foreground "CadetBlue1"))))
100 `(outline-3 ((,class (:foreground "LightSteelBlue1"))))
101 `(outline-4 ((,class (:foreground "turquoise2"))))
102 `(outline-5 ((,class (:foreground "aquamarine1"))))
103 `(primary-selection ((,class (:background "blue3"))))
104 `(region ((,class (:background "#103050"))))
105 `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white"))))
106 `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white"))))
107 `(success ((,class (:foreground "SeaGreen2"))))
108 `(warning ((,class (:foreground "Yellow"))))))
109
110(provide-theme 'deeper-blue)
111
112;; Local Variables:
113;; no-byte-compile: t
114;; End:
115
116;;; deeper-blue-theme.el ends here
diff --git a/etc/themes/whiteboard-theme.el b/etc/themes/whiteboard-theme.el
new file mode 100644
index 00000000000..e0fa7ff7ff7
--- /dev/null
+++ b/etc/themes/whiteboard-theme.el
@@ -0,0 +1,97 @@
1;;; whiteboard-theme.el --- Custom theme for faces
2
3;; Copyright (C) 2011 Free Software Foundation, Inc.
4
5;; Author: Scott Frazer <frazer.scott@gmail.com>
6
7;; This file is part of GNU Emacs.
8
9;; GNU Emacs is free software: you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation, either version 3 of the License, or
12;; (at your option) any later version.
13
14;; GNU Emacs is distributed in the hope that it will be useful,
15;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;; GNU General Public License for more details.
18
19;; You should have received a copy of the GNU General Public License
20;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22;;; Code:
23
24(deftheme whiteboard
25 "Face colors similar to markers on a whiteboard.")
26
27(let ((class '((class color) (min-colors 89))))
28 (custom-theme-set-faces
29 'whiteboard
30 `(Info-title-1-face ((,class (:family "helv" :weight bold :height 1.728))))
31 `(Info-title-2-face ((,class (:family "helv" :weight bold :height 1.44))))
32 `(Info-title-3-face ((,class (:family "helv" :weight bold :height 1.2))))
33 `(Info-title-4-face ((,class (:family "helv" :weight bold))))
34 `(compilation-column-number ((,class (:foreground "DarkGreen"))))
35 `(compilation-error ((,class (:foreground "Red1"))))
36 `(compilation-info ((,class (:weight normal :foreground "DeepSkyBlue4"))))
37 `(compilation-line-number ((,class (:foreground "DarkGreen"))))
38 `(cperl-array-face ((,class (:foreground "SlateBlue3"))))
39 `(cperl-hash-face ((,class (:foreground "turquoise3"))))
40 `(cperl-nonoverridable-face ((,class (:foreground "orchid3"))))
41 `(cursor ((,class (:background "Green4" :foreground "gainsboro"))))
42 `(default ((,class (:background "whitesmoke" :foreground "black"))))
43 `(dired-marked ((,class (:background "dodgerblue3" :foreground "white"))))
44 `(flymake-errline ((,class (:background nil :underline "red"))))
45 `(flymake-warnline ((,class (:background nil :underline "magenta3"))))
46 `(font-lock-builtin-face ((,class (:foreground "DarkOrange3"))))
47 `(font-lock-comment-delimiter-face ((,class (:foreground "gray50"))))
48 `(font-lock-comment-face ((,class (:foreground "gray50"))))
49 `(font-lock-constant-face ((,class (:foreground "DarkOliveGreen4"))))
50 `(font-lock-doc-face ((,class (:foreground "peru"))))
51 `(font-lock-doc-string-face ((,class (:foreground "peru"))))
52 `(font-lock-function-name-face ((,class (:foreground "goldenrod3"))))
53 `(font-lock-keyword-face ((,class (:foreground "DodgerBlue2"))))
54 `(font-lock-preprocessor-face ((,class (:foreground "gold3"))))
55 `(font-lock-reference-face ((,class (:foreground "salmon"))))
56 `(font-lock-regexp-grouping-backslash ((,class (:weight bold))))
57 `(font-lock-regexp-grouping-construct ((,class (:weight bold))))
58 `(font-lock-string-face ((,class (:foreground "burlywood4"))))
59 `(font-lock-type-face ((,class (:foreground "DeepSkyBlue4"))))
60 `(font-lock-variable-name-face ((,class (:foreground "SeaGreen4"))))
61 `(font-lock-warning-face ((,class (:foreground "red"))))
62 `(fringe ((,class (:background "gainsboro"))))
63 `(highlight ((,class (:background "SkyBlue1"))))
64 `(ido-first-match ((,class (:weight normal :foreground "DarkOrange3"))))
65 `(ido-only-match ((,class (:foreground "SeaGreen4"))))
66 `(ido-subdir ((,class (:foreground nil :inherit font-lock-keyword-face))))
67 `(info-header-node ((,class (:foreground "DeepSkyBlue1"))))
68 `(info-header-xref ((,class (:foreground "SeaGreen2"))))
69 `(info-menu-header ((,class (:family "helv" :weight bold))))
70 `(info-node ((,class (:foreground "DeepSkyBlue1"))))
71 `(info-xref ((,class (:foreground "SeaGreen4"))))
72 `(isearch ((,class (:background "coral2" :foreground "white"))))
73 `(isearch-lazy-highlight-face ((,class (:background "coral4" :foreground "white"))))
74 `(lazy-highlight ((,class (:background "cadetblue" :foreground "white"))))
75 `(match ((,class (:background "LightPink1"))))
76 `(minibuffer-prompt ((,class (:foreground "DodgerBlue4"))))
77 `(mode-line ((,class (:background "gray75" :foreground "black" :box (:line-width 1 :style released-button)))))
78 `(mode-line-buffer-id ((,class (:weight bold :background nil :foreground "blue4"))))
79 `(mode-line-inactive ((,class (:background "gray40" :foreground "black" :box (:line-width 1 :color "gray40" :style nil)))))
80 `(outline-1 ((,class (:foreground "Blue3"))))
81 `(outline-2 ((,class (:foreground "DodgerBlue"))))
82 `(outline-3 ((,class (:foreground "SteelBlue"))))
83 `(outline-4 ((,class (:foreground "RoyalBlue"))))
84 `(outline-5 ((,class (:foreground "DeepSkyBlue"))))
85 `(primary-selection ((,class (:background "blue3"))))
86 `(region ((,class (:background "SkyBlue1"))))
87 `(show-paren-match-face ((,class (:background "dodgerblue1" :foreground "white"))))
88 `(show-paren-mismatch-face ((,class (:background "red1" :foreground "white"))))
89 `(warning ((,class (:foreground "Yellow4"))))))
90
91(provide-theme 'whiteboard)
92
93;; Local Variables:
94;; no-byte-compile: t
95;; End:
96
97;;; whiteboard-theme.el ends here
diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c
index a997e56cc9f..7395f2c8fdd 100644
--- a/lib-src/ebrowse.c
+++ b/lib-src/ebrowse.c
@@ -45,16 +45,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
45 45
46/* The character used as a separator in path lists (like $PATH). */ 46/* The character used as a separator in path lists (like $PATH). */
47 47
48#if defined(__MSDOS__) 48#if defined (__MSDOS__)
49#define PATH_LIST_SEPARATOR ';' 49#define PATH_LIST_SEPARATOR ';'
50#define FILENAME_EQ(X,Y) (strcasecmp(X,Y) == 0) 50#define FILENAME_EQ(X,Y) (strcasecmp (X,Y) == 0)
51#else 51#else
52#if defined(WINDOWSNT) 52#if defined (WINDOWSNT)
53#define PATH_LIST_SEPARATOR ';' 53#define PATH_LIST_SEPARATOR ';'
54#define FILENAME_EQ(X,Y) (stricmp(X,Y) == 0) 54#define FILENAME_EQ(X,Y) (stricmp (X,Y) == 0)
55#else 55#else
56#define PATH_LIST_SEPARATOR ':' 56#define PATH_LIST_SEPARATOR ':'
57#define FILENAME_EQ(X,Y) (streq(X,Y)) 57#define FILENAME_EQ(X,Y) (streq (X,Y))
58#endif 58#endif
59#endif 59#endif
60/* The default output file name. */ 60/* The default output file name. */
@@ -2511,7 +2511,7 @@ member (struct sym *cls, int vis)
2511 2511
2512 /* A function or class may follow. */ 2512 /* A function or class may follow. */
2513 case TEMPLATE: 2513 case TEMPLATE:
2514 MATCH(); 2514 MATCH ();
2515 SET_FLAG (flags, F_TEMPLATE); 2515 SET_FLAG (flags, F_TEMPLATE);
2516 /* Skip over template argument list */ 2516 /* Skip over template argument list */
2517 SKIP_MATCHING_IF ('<'); 2517 SKIP_MATCHING_IF ('<');
@@ -2930,7 +2930,7 @@ parse_qualified_ident_or_type (char **last_id)
2930 } 2930 }
2931 2931
2932 while (enter--) 2932 while (enter--)
2933 leave_namespace(); 2933 leave_namespace ();
2934 2934
2935 return cls; 2935 return cls;
2936} 2936}
diff --git a/lib-src/etags.c b/lib-src/etags.c
index ac5ebee9b07..cdcc6461a64 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -103,7 +103,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
103# define PTR void * 103# define PTR void *
104# endif 104# endif
105#else /* no config.h */ 105#else /* no config.h */
106# if defined(__STDC__) && (__STDC__ || defined(__SUNPRO_C)) 106# if defined (__STDC__) && (__STDC__ || defined (__SUNPRO_C))
107# define PTR void * /* for generic pointers */ 107# define PTR void * /* for generic pointers */
108# else /* not standard C */ 108# else /* not standard C */
109# define const /* remove const for old compilers' sake */ 109# define const /* remove const for old compilers' sake */
@@ -202,25 +202,25 @@ If you want regular expression support, you should delete this notice and
202# define CTAGS FALSE 202# define CTAGS FALSE
203#endif 203#endif
204 204
205#define streq(s,t) (assert((s)!=NULL || (t)!=NULL), !strcmp (s, t)) 205#define streq(s,t) (assert ((s)!=NULL || (t)!=NULL), !strcmp (s, t))
206#define strcaseeq(s,t) (assert((s)!=NULL && (t)!=NULL), !etags_strcasecmp (s, t)) 206#define strcaseeq(s,t) (assert ((s)!=NULL && (t)!=NULL), !etags_strcasecmp (s, t))
207#define strneq(s,t,n) (assert((s)!=NULL || (t)!=NULL), !strncmp (s, t, n)) 207#define strneq(s,t,n) (assert ((s)!=NULL || (t)!=NULL), !strncmp (s, t, n))
208#define strncaseeq(s,t,n) (assert((s)!=NULL && (t)!=NULL), !etags_strncasecmp (s, t, n)) 208#define strncaseeq(s,t,n) (assert ((s)!=NULL && (t)!=NULL), !etags_strncasecmp (s, t, n))
209 209
210#define CHARS 256 /* 2^sizeof(char) */ 210#define CHARS 256 /* 2^sizeof(char) */
211#define CHAR(x) ((unsigned int)(x) & (CHARS - 1)) 211#define CHAR(x) ((unsigned int)(x) & (CHARS - 1))
212#define iswhite(c) (_wht[CHAR(c)]) /* c is white (see white) */ 212#define iswhite(c) (_wht[CHAR (c)]) /* c is white (see white) */
213#define notinname(c) (_nin[CHAR(c)]) /* c is not in a name (see nonam) */ 213#define notinname(c) (_nin[CHAR (c)]) /* c is not in a name (see nonam) */
214#define begtoken(c) (_btk[CHAR(c)]) /* c can start token (see begtk) */ 214#define begtoken(c) (_btk[CHAR (c)]) /* c can start token (see begtk) */
215#define intoken(c) (_itk[CHAR(c)]) /* c can be in token (see midtk) */ 215#define intoken(c) (_itk[CHAR (c)]) /* c can be in token (see midtk) */
216#define endtoken(c) (_etk[CHAR(c)]) /* c ends tokens (see endtk) */ 216#define endtoken(c) (_etk[CHAR (c)]) /* c ends tokens (see endtk) */
217 217
218#define ISALNUM(c) isalnum (CHAR(c)) 218#define ISALNUM(c) isalnum (CHAR (c))
219#define ISALPHA(c) isalpha (CHAR(c)) 219#define ISALPHA(c) isalpha (CHAR (c))
220#define ISDIGIT(c) isdigit (CHAR(c)) 220#define ISDIGIT(c) isdigit (CHAR (c))
221#define ISLOWER(c) islower (CHAR(c)) 221#define ISLOWER(c) islower (CHAR (c))
222 222
223#define lowcase(c) tolower (CHAR(c)) 223#define lowcase(c) tolower (CHAR (c))
224 224
225 225
226/* 226/*
@@ -1725,16 +1725,16 @@ init (void)
1725 register int i; 1725 register int i;
1726 1726
1727 for (i = 0; i < CHARS; i++) 1727 for (i = 0; i < CHARS; i++)
1728 iswhite(i) = notinname(i) = begtoken(i) = intoken(i) = endtoken(i) = FALSE; 1728 iswhite (i) = notinname (i) = begtoken (i) = intoken (i) = endtoken (i) = FALSE;
1729 for (sp = white; *sp != '\0'; sp++) iswhite (*sp) = TRUE; 1729 for (sp = white; *sp != '\0'; sp++) iswhite (*sp) = TRUE;
1730 for (sp = nonam; *sp != '\0'; sp++) notinname (*sp) = TRUE; 1730 for (sp = nonam; *sp != '\0'; sp++) notinname (*sp) = TRUE;
1731 notinname('\0') = notinname('\n'); 1731 notinname ('\0') = notinname ('\n');
1732 for (sp = begtk; *sp != '\0'; sp++) begtoken (*sp) = TRUE; 1732 for (sp = begtk; *sp != '\0'; sp++) begtoken (*sp) = TRUE;
1733 begtoken('\0') = begtoken('\n'); 1733 begtoken ('\0') = begtoken ('\n');
1734 for (sp = midtk; *sp != '\0'; sp++) intoken (*sp) = TRUE; 1734 for (sp = midtk; *sp != '\0'; sp++) intoken (*sp) = TRUE;
1735 intoken('\0') = intoken('\n'); 1735 intoken ('\0') = intoken ('\n');
1736 for (sp = endtk; *sp != '\0'; sp++) endtoken (*sp) = TRUE; 1736 for (sp = endtk; *sp != '\0'; sp++) endtoken (*sp) = TRUE;
1737 endtoken('\0') = endtoken('\n'); 1737 endtoken ('\0') = endtoken ('\n');
1738} 1738}
1739 1739
1740/* 1740/*
@@ -3959,16 +3959,16 @@ Yacc_entries (FILE *inf)
3959 ) 3959 )
3960 3960
3961#define LOOKING_AT(cp, kw) /* kw is the keyword, a literal string */ \ 3961#define LOOKING_AT(cp, kw) /* kw is the keyword, a literal string */ \
3962 ((assert("" kw), TRUE) /* syntax error if not a literal string */ \ 3962 ((assert ("" kw), TRUE) /* syntax error if not a literal string */ \
3963 && strneq ((cp), kw, sizeof(kw)-1) /* cp points at kw */ \ 3963 && strneq ((cp), kw, sizeof (kw)-1) /* cp points at kw */ \
3964 && notinname ((cp)[sizeof(kw)-1]) /* end of kw */ \ 3964 && notinname ((cp)[sizeof (kw)-1]) /* end of kw */ \
3965 && ((cp) = skip_spaces((cp)+sizeof(kw)-1))) /* skip spaces */ 3965 && ((cp) = skip_spaces ((cp)+sizeof (kw)-1))) /* skip spaces */
3966 3966
3967/* Similar to LOOKING_AT but does not use notinname, does not skip */ 3967/* Similar to LOOKING_AT but does not use notinname, does not skip */
3968#define LOOKING_AT_NOCASE(cp, kw) /* the keyword is a literal string */ \ 3968#define LOOKING_AT_NOCASE(cp, kw) /* the keyword is a literal string */ \
3969 ((assert("" kw), TRUE) /* syntax error if not a literal string */ \ 3969 ((assert ("" kw), TRUE) /* syntax error if not a literal string */ \
3970 && strncaseeq ((cp), kw, sizeof(kw)-1) /* cp points at kw */ \ 3970 && strncaseeq ((cp), kw, sizeof (kw)-1) /* cp points at kw */ \
3971 && ((cp) += sizeof(kw)-1)) /* skip spaces */ 3971 && ((cp) += sizeof (kw)-1)) /* skip spaces */
3972 3972
3973/* 3973/*
3974 * Read a file, but do no processing. This is used to do regexp 3974 * Read a file, but do no processing. This is used to do regexp
@@ -4141,7 +4141,7 @@ Ada_getit (FILE *inf, const char *name_qualifier)
4141 readline (&lb, inf); 4141 readline (&lb, inf);
4142 dbp = lb.buffer; 4142 dbp = lb.buffer;
4143 } 4143 }
4144 switch (lowcase(*dbp)) 4144 switch (lowcase (*dbp))
4145 { 4145 {
4146 case 'b': 4146 case 'b':
4147 if (nocase_tail ("body")) 4147 if (nocase_tail ("body"))
@@ -4245,7 +4245,7 @@ Ada_funcs (FILE *inf)
4245 } 4245 }
4246 4246
4247 /* We are at the beginning of a token. */ 4247 /* We are at the beginning of a token. */
4248 switch (lowcase(*dbp)) 4248 switch (lowcase (*dbp))
4249 { 4249 {
4250 case 'f': 4250 case 'f':
4251 if (!packages_only && nocase_tail ("function")) 4251 if (!packages_only && nocase_tail ("function"))
@@ -4371,7 +4371,7 @@ Perl_functions (FILE *inf)
4371 *cp = '\0'; 4371 *cp = '\0';
4372 name = concat (package, "::", sp); 4372 name = concat (package, "::", sp);
4373 *cp = savechar; 4373 *cp = savechar;
4374 make_tag (name, strlen(name), TRUE, 4374 make_tag (name, strlen (name), TRUE,
4375 lb.buffer, cp - lb.buffer + 1, lineno, linecharno); 4375 lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
4376 free (name); 4376 free (name);
4377 } 4377 }
@@ -4466,9 +4466,9 @@ PHP_functions (FILE *inf)
4466 } 4466 }
4467 else if (LOOKING_AT (cp, "function")) 4467 else if (LOOKING_AT (cp, "function"))
4468 { 4468 {
4469 if(*cp == '&') 4469 if (*cp == '&')
4470 cp = skip_spaces (cp+1); 4470 cp = skip_spaces (cp+1);
4471 if(*cp != '\0') 4471 if (*cp != '\0')
4472 { 4472 {
4473 name = cp; 4473 name = cp;
4474 while (!notinname (*cp)) 4474 while (!notinname (*cp))
@@ -4509,7 +4509,7 @@ PHP_functions (FILE *inf)
4509 && *cp == '$') 4509 && *cp == '$')
4510 { 4510 {
4511 name = cp; 4511 name = cp;
4512 while (!notinname(*cp)) 4512 while (!notinname (*cp))
4513 cp++; 4513 cp++;
4514 make_tag (name, cp - name, FALSE, 4514 make_tag (name, cp - name, FALSE,
4515 lb.buffer, cp - lb.buffer + 1, lineno, linecharno); 4515 lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
@@ -4890,13 +4890,13 @@ Forth_words (FILE *inf)
4890 4890
4891 LOOP_ON_INPUT_LINES (inf, lb, bp) 4891 LOOP_ON_INPUT_LINES (inf, lb, bp)
4892 while ((bp = skip_spaces (bp))[0] != '\0') 4892 while ((bp = skip_spaces (bp))[0] != '\0')
4893 if (bp[0] == '\\' && iswhite(bp[1])) 4893 if (bp[0] == '\\' && iswhite (bp[1]))
4894 break; /* read next line */ 4894 break; /* read next line */
4895 else if (bp[0] == '(' && iswhite(bp[1])) 4895 else if (bp[0] == '(' && iswhite (bp[1]))
4896 do /* skip to ) or eol */ 4896 do /* skip to ) or eol */
4897 bp++; 4897 bp++;
4898 while (*bp != ')' && *bp != '\0'); 4898 while (*bp != ')' && *bp != '\0');
4899 else if ((bp[0] == ':' && iswhite(bp[1]) && bp++) 4899 else if ((bp[0] == ':' && iswhite (bp[1]) && bp++)
4900 || LOOKING_AT_NOCASE (bp, "constant") 4900 || LOOKING_AT_NOCASE (bp, "constant")
4901 || LOOKING_AT_NOCASE (bp, "code") 4901 || LOOKING_AT_NOCASE (bp, "code")
4902 || LOOKING_AT_NOCASE (bp, "create") 4902 || LOOKING_AT_NOCASE (bp, "create")
@@ -5285,7 +5285,7 @@ Prolog_functions (FILE *inf)
5285 /* Predicate or rule. Store the function name so that we 5285 /* Predicate or rule. Store the function name so that we
5286 only generate a tag for the first clause. */ 5286 only generate a tag for the first clause. */
5287 if (last == NULL) 5287 if (last == NULL)
5288 last = xnew(len + 1, char); 5288 last = xnew (len + 1, char);
5289 else if (len + 1 > allocated) 5289 else if (len + 1 > allocated)
5290 xrnew (last, len + 1, char); 5290 xrnew (last, len + 1, char);
5291 allocated = len + 1; 5291 allocated = len + 1;
@@ -5309,7 +5309,7 @@ prolog_skip_comment (linebuffer *plb, FILE *inf)
5309 return; 5309 return;
5310 readline (plb, inf); 5310 readline (plb, inf);
5311 } 5311 }
5312 while (!feof(inf)); 5312 while (!feof (inf));
5313} 5313}
5314 5314
5315/* 5315/*
@@ -5368,11 +5368,11 @@ prolog_atom (char *s, size_t pos)
5368 5368
5369 origpos = pos; 5369 origpos = pos;
5370 5370
5371 if (ISLOWER(s[pos]) || (s[pos] == '_')) 5371 if (ISLOWER (s[pos]) || (s[pos] == '_'))
5372 { 5372 {
5373 /* The atom is unquoted. */ 5373 /* The atom is unquoted. */
5374 pos++; 5374 pos++;
5375 while (ISALNUM(s[pos]) || (s[pos] == '_')) 5375 while (ISALNUM (s[pos]) || (s[pos] == '_'))
5376 { 5376 {
5377 pos++; 5377 pos++;
5378 } 5378 }
@@ -5715,7 +5715,7 @@ add_regex (char *regexp_pattern, language *lang)
5715 single_line = FALSE; /* dot does not match newline */ 5715 single_line = FALSE; /* dot does not match newline */
5716 5716
5717 5717
5718 if (strlen(regexp_pattern) < 3) 5718 if (strlen (regexp_pattern) < 3)
5719 { 5719 {
5720 error ("null regexp", (char *)NULL); 5720 error ("null regexp", (char *)NULL);
5721 return; 5721 return;
@@ -6626,7 +6626,7 @@ filename_is_absolute (char *fn)
6626{ 6626{
6627 return (fn[0] == '/' 6627 return (fn[0] == '/'
6628#ifdef DOS_NT 6628#ifdef DOS_NT
6629 || (ISALPHA(fn[0]) && fn[1] == ':' && fn[2] == '/') 6629 || (ISALPHA (fn[0]) && fn[1] == ':' && fn[2] == '/')
6630#endif 6630#endif
6631 ); 6631 );
6632} 6632}
@@ -6641,7 +6641,7 @@ canonicalize_filename (register char *fn)
6641 6641
6642#ifdef DOS_NT 6642#ifdef DOS_NT
6643 /* Canonicalize drive letter case. */ 6643 /* Canonicalize drive letter case. */
6644# define ISUPPER(c) isupper (CHAR(c)) 6644# define ISUPPER(c) isupper (CHAR (c))
6645 if (fn[0] != '\0' && fn[1] == ':' && ISUPPER (fn[0])) 6645 if (fn[0] != '\0' && fn[1] == ':' && ISUPPER (fn[0]))
6646 fn[0] = lowcase (fn[0]); 6646 fn[0] = lowcase (fn[0]);
6647 6647
diff --git a/lib-src/hexl.c b/lib-src/hexl.c
index 89ea7d9f60c..f03663ef5be 100644
--- a/lib-src/hexl.c
+++ b/lib-src/hexl.c
@@ -48,7 +48,7 @@ int base = DEFAULT_BASE, un_flag = FALSE, iso_flag = FALSE, endian = 1;
48int group_by = DEFAULT_GROUPING; 48int group_by = DEFAULT_GROUPING;
49char *progname; 49char *progname;
50 50
51void usage(void) NO_RETURN; 51void usage (void) NO_RETURN;
52 52
53int 53int
54main (int argc, char **argv) 54main (int argc, char **argv)
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index 097bf23c202..b6ea51f6341 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -183,8 +183,8 @@ main (int argc, char **argv)
183# define ARGSTR "p" 183# define ARGSTR "p"
184#endif /* MAIL_USE_POP */ 184#endif /* MAIL_USE_POP */
185 185
186 uid_t real_gid = getgid(); 186 uid_t real_gid = getgid ();
187 uid_t priv_gid = getegid(); 187 uid_t priv_gid = getegid ();
188 188
189#ifdef WINDOWSNT 189#ifdef WINDOWSNT
190 /* Ensure all file i/o is in binary mode. */ 190 /* Ensure all file i/o is in binary mode. */
diff --git a/lib-src/pop.c b/lib-src/pop.c
index a94e06fbd87..ae1000742cc 100644
--- a/lib-src/pop.c
+++ b/lib-src/pop.c
@@ -34,15 +34,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
34#include "ntlib.h" 34#include "ntlib.h"
35#include <winsock.h> 35#include <winsock.h>
36#undef SOCKET_ERROR 36#undef SOCKET_ERROR
37#define RECV(s,buf,len,flags) recv(s,buf,len,flags) 37#define RECV(s,buf,len,flags) recv (s,buf,len,flags)
38#define SEND(s,buf,len,flags) send(s,buf,len,flags) 38#define SEND(s,buf,len,flags) send (s,buf,len,flags)
39#define CLOSESOCKET(s) closesocket(s) 39#define CLOSESOCKET(s) closesocket (s)
40#else 40#else
41#include <netinet/in.h> 41#include <netinet/in.h>
42#include <sys/socket.h> 42#include <sys/socket.h>
43#define RECV(s,buf,len,flags) read(s,buf,len) 43#define RECV(s,buf,len,flags) read (s,buf,len)
44#define SEND(s,buf,len,flags) write(s,buf,len) 44#define SEND(s,buf,len,flags) write (s,buf,len)
45#define CLOSESOCKET(s) close(s) 45#define CLOSESOCKET(s) close (s)
46#endif 46#endif
47#include <pop.h> 47#include <pop.h>
48 48
@@ -101,7 +101,7 @@ extern char *krb_realmofhost (/* char * */);
101#endif /* KERBEROS */ 101#endif /* KERBEROS */
102 102
103#ifndef WINDOWSNT 103#ifndef WINDOWSNT
104#if !defined(HAVE_H_ERRNO) || !defined(HAVE_CONFIG_H) 104#if !defined (HAVE_H_ERRNO) || !defined (HAVE_CONFIG_H)
105extern int h_errno; 105extern int h_errno;
106#endif 106#endif
107#endif 107#endif
@@ -1067,7 +1067,7 @@ socket_connection (char *host, int flags)
1067 } 1067 }
1068 1068
1069#ifdef HAVE_GETADDRINFO 1069#ifdef HAVE_GETADDRINFO
1070 memset (&hints, 0, sizeof(hints)); 1070 memset (&hints, 0, sizeof (hints));
1071 hints.ai_socktype = SOCK_STREAM; 1071 hints.ai_socktype = SOCK_STREAM;
1072 hints.ai_flags = AI_CANONNAME; 1072 hints.ai_flags = AI_CANONNAME;
1073 hints.ai_family = AF_INET; 1073 hints.ai_family = AF_INET;
@@ -1159,7 +1159,7 @@ socket_connection (char *host, int flags)
1159 krb5_free_context (kcontext); 1159 krb5_free_context (kcontext);
1160 strcpy (pop_error, KRB_ERROR); 1160 strcpy (pop_error, KRB_ERROR);
1161 strncat (pop_error, error_message (rem), 1161 strncat (pop_error, error_message (rem),
1162 ERROR_MAX - sizeof(KRB_ERROR)); 1162 ERROR_MAX - sizeof (KRB_ERROR));
1163 CLOSESOCKET (sock); 1163 CLOSESOCKET (sock);
1164 return (-1); 1164 return (-1);
1165 } 1165 }
@@ -1212,7 +1212,7 @@ socket_connection (char *host, int flags)
1212 ERROR_MAX - strlen (pop_error) - 1); 1212 ERROR_MAX - strlen (pop_error) - 1);
1213 } 1213 }
1214#elif defined HAVE_KRB5_ERROR_E_TEXT 1214#elif defined HAVE_KRB5_ERROR_E_TEXT
1215 if (err_ret && err_ret->e_text && strlen(*err_ret->e_text)) 1215 if (err_ret && err_ret->e_text && strlen (*err_ret->e_text))
1216 { 1216 {
1217 strncat (pop_error, " [server says '", 1217 strncat (pop_error, " [server says '",
1218 ERROR_MAX - strlen (pop_error) - 1); 1218 ERROR_MAX - strlen (pop_error) - 1);
diff --git a/lib/lstat.c b/lib/lstat.c
index 29fc6d25f90..d786288f2b7 100644
--- a/lib/lstat.c
+++ b/lib/lstat.c
@@ -42,7 +42,10 @@ orig_lstat (const char *filename, struct stat *buf)
42} 42}
43 43
44/* Specification. */ 44/* Specification. */
45# include <sys/stat.h> 45/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
46 eliminates this include because of the preliminary #include <sys/stat.h>
47 above. */
48# include "sys/stat.h"
46 49
47# include <string.h> 50# include <string.h>
48# include <errno.h> 51# include <errno.h>
diff --git a/lib/stat.c b/lib/stat.c
index 6c354d1d357..1002f161bfa 100644
--- a/lib/stat.c
+++ b/lib/stat.c
@@ -34,7 +34,10 @@ orig_stat (const char *filename, struct stat *buf)
34} 34}
35 35
36/* Specification. */ 36/* Specification. */
37#include <sys/stat.h> 37/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
38 eliminates this include because of the preliminary #include <sys/stat.h>
39 above. */
40#include "sys/stat.h"
38 41
39#include <errno.h> 42#include <errno.h>
40#include <limits.h> 43#include <limits.h>
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6d64950d64b..53ef2a1bbcd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,273 @@
12011-09-13 Glenn Morris <rgm@gnu.org>
2
3 * emacs-lisp/debug.el (debugger-make-xrefs):
4 Preserve point. (Bug#9462)
5
62011-09-13 Chong Yidong <cyd@stupidchicken.com>
7
8 * window.el (window-deletable-p): Use next-frame.
9
102011-09-13 Martin Rudalics <rudalics@gmx.at>
11
12 * window.el (window-auto-delete): Remove.
13 (window-deletable-p): Remove argument FORCE. Don't deal with
14 dedicatedness and previous buffers.
15 (switch-to-prev-buffer): Don't delete window.
16 (delete-windows-on): Delete a window's frame if and only if the
17 window is dedicated.
18 (replace-buffer-in-windows): Delete buffer's window or frame if
19 and only if window is dedicated.
20 (quit-window): Handle quit-restore as before last change.
21 (bury-buffer): Delete window only if window-deletable-p returns t.
22
232011-09-13 Chong Yidong <cyd@stupidchicken.com>
24
25 * window.el (window-deletable-p): Never delete the last frame on a
26 given terminal.
27
282011-09-13 Glenn Morris <rgm@gnu.org>
29
30 * help.el (describe-key-briefly): Copy previous standard-output change.
31
322011-09-13 PJ Weisberg <pj@irregularexpressions.net> (tiny change)
33
34 * help.el (where-is): Respect non-standard standard-output. (Bug#9030)
35
362011-09-13 Glenn Morris <rgm@gnu.org>
37
38 * emacs-lisp/lisp-mode.el (lisp-indent-function):
39 * progmodes/scheme.el (scheme-indent-function): Doc fixes.
40
412011-09-12 Chong Yidong <cyd@stupidchicken.com>
42
43 * dired-aux.el (dired-mark-read-string): Don't return default
44 value on empty input (Bug#9361).
45 (dired-do-chxxx): Treat empty input for "touch" as no -t option.
46 Omit initial minibuffer contents.
47 (dired-do-chmod): Signal an error on empty input.
48 (dired-mark-read-string): Don't return default on empty input.
49
50 * files.el (file-modes-symbolic-to-number): Doc fix.
51
522011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
53
54 * international/mule-cmds.el (ucs-completions): Remove.
55 (read-char-by-name): Use complete-with-action instead; add metadata.
56
572011-09-11 Chong Yidong <cyd@stupidchicken.com>
58
59 * window.el (display-buffer--action-function-custom-type)
60 (display-buffer--action-custom-type): New vars.
61 (display-buffer-alist, display-buffer-default-action)
62 (display-buffer-overriding-action): Add defcustom types.
63
64 * frame.el (delete-other-frames): Doc fix (Bug#276).
65
662011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
67
68 * play/doctor.el (make-doctor-variables): Define `doctor-sent'.
69
702011-09-11 Chong Yidong <cyd@stupidchicken.com>
71
72 Change modes that used same-window-* vars to use switch-to-buffer.
73
74 * progmodes/gdb-mi.el (gdb-restore-windows, gdb-setup-windows):
75 Use switch-to-buffer.
76
77 * cus-edit.el (customize-group, custom-buffer-create)
78 (customize-browse, custom-buffer-create-other-window):
79 Use switch-to-buffer or switch-to-buffer-other-window.
80
81 * info.el (info, Info-find-node, Info-revert-find-node, Info-next)
82 (Info-prev, Info-up, Info-speedbar-goto-node)
83 (info-display-manual): Use switch-to-buffer.
84 (Info-speedbar-goto-node): Use switch-to-buffer-other-frame.
85
86 * mail/sendmail.el (mail): Use switch-to-buffer.
87 (mail-recover): Use switch-to-buffer-other-window.
88
89 * cmuscheme.el (run-scheme, switch-to-scheme):
90 * ielm.el (ielm):
91 * shell.el (shell):
92 * net/rlogin.el (rlogin):
93 * net/telnet.el (telnet, rsh):
94 * progmodes/inf-lisp.el (inferior-lisp): Use switch-to-buffer.
95
962011-09-11 Andreas Schwab <schwab@linux-m68k.org>
97
98 * dired.el (dired-sort-toggle-or-edit): Revert last changes.
99
1002011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
101
102 * dired.el (dired-sort-toggle-or-edit): -o doesn't exist on *BSD,
103 so don't mention it (bug#9301).
104 (dired-sort-toggle-or-edit): Clarify string further.
105
106 * faces.el (face-spec-set-match-display): Make `(type graphic)'
107 match `x', `w32' and `ns', like the manual says (bug#9029).
108
109 * subr.el (eval-after-load): Doc string clarification (bug#9125).
110 (process-kill-buffer-query-function): Mention the buffer name in
111 the query.
112
113 * image-mode.el (image-next-line): The line parameter is mandatory
114 (bug#9258).
115
116 * dired.el (dired-sort-toggle-or-edit): Mention -o and -g, too,
117 which can be useful (bug#9301).
118
119 * textmodes/flyspell.el: Remove obsolete comment (bug#9368).
120
121 * subr.el (match-string): Mention that the current buffer should
122 be the same as the search was done in (bug#9282).
123
124 * facemenu.el: Disable the remove-* commands if the mark isn't
125 active (bug#9162).
126
1272011-09-10 Chong Yidong <cyd@stupidchicken.com>
128
129 * buff-menu.el (Buffer-menu-switch-other-window): Use second arg
130 of display-buffer.
131 (Buffer-menu-2-window): Use switch-to-buffer-other-window.
132
133 * replace.el (occur-mode-goto-occurrence)
134 (occur-mode-display-occurrence) Use second arg of pop-to-buffer
135 and display-buffer.
136
137 * mail/reporter.el (reporter-submit-bug-report): Use second arg of
138 display-buffer.
139
140 * mail/sendmail.el (sendmail-user-agent-compose): Don't bind the
141 special-display and same-window variables.
142 (mail-other-window): Use switch-to-buffer-other-window.
143 (mail-other-frame): USe switch-to-buffer-other-frame.
144
145 * progmodes/gdb-mi.el (gdb-frame-gdb-buffer):
146 Use display-buffer-other-frame.
147 (gdb-display-gdb-buffer): Use pop-to-buffer.
148
149 * progmodes/gud.el (gud-goto-info): Use info-other-window.
150
151 * progmodes/python.el: Don't set same-window-buffer-names.
152
153 * textmodes/bibtex.el (bibtex-search-entry): Use switch-to-buffer.
154
155 * window.el (display-buffer-alist): Add *Python*.
156
1572011-09-10 Chong Yidong <cyd@stupidchicken.com>
158
159 * window.el (display-buffer-alist): Add entry for buffers
160 previously handled same-window-*.
161 (display-buffer-alist, display-buffer-default-action)
162 (display-buffer-overriding-action): Mark as risky.
163 (display-buffer-alist): Document action function changes.
164 (display-buffer--same-window-action)
165 (display-buffer--other-frame-action): New variables.
166 (switch-to-buffer, display-buffer-other-frame): Use them.
167 (display-buffer): Rename reuse-frame entry to reusable-frames.
168 (display-buffer-reuse-selected-window): Function deleted.
169 (display-buffer-reuse-window): Handle reusable-frames alist entry.
170 If it's omitted, check pop-up-frames/display-buffer-reuse-frames.
171 (display-buffer-special): New function.
172 (display-buffer--maybe-pop-up-frame-or-window): Rename from
173 display-buffer-reuse-or-pop-window. Split off special-display
174 part into display-buffer-special.
175 (display-buffer-use-some-window): Don't perform any special
176 pop-up-frames handling.
177 (pop-to-buffer): Use window-normalize-buffer-to-switch-to.
178 (display-buffer--maybe-same-window): Rename from
179 display-buffer-maybe-same-window.
180
181 * info.el: Don't set same-window-regexps.
182 (info-setup): New function.
183 (info-other-window, info): Call it.
184
185 * cus-edit.el: Don't set same-window-regexps.
186 (customize-group): New argument.
187 (customize-group-other-window): Use it.
188 (customize-face, customize-face-other-window): Likewise.
189 (custom-buffer-create-other-window): Use pop-to-buffer directly.
190
191 * net/rlogin.el:
192 * net/telnet.el:
193 * progmodes/gud.el: Don't set same-window-regexps.
194
195 * cmuscheme.el:
196 * ielm.el:
197 * shell.el:
198 * mail/sendmail.el:
199 * progmodes/inf-lisp.el: Don't set same-window-buffer-names.
200
2012011-09-10 Juri Linkov <juri@jurta.org>
202
203 * isearch.el (isearch-edit-string): Remove obsolete mention of
204 `C-w' (`isearch-yank-word-or-char') from docstring.
205 (isearch-query-replace): Fix typo in docstring (bug#9466).
206
2072011-09-10 Juri Linkov <juri@jurta.org>
208
209 * paren.el (show-paren-function): Don't show escaped parens.
210 Let-bind `unescaped' to `t' when paren is not escaped. (Bug#9461)
211
2122011-09-10 Eli Zaretskii <eliz@gnu.org>
213
214 * mail/sendmail.el (mml-to-mime, mml-attach-file)
215 (mm-default-file-encoding): Remove autoload forms, they are
216 replaced with autoload cookies in mml.el and mm-encode.el.
217 (mail-add-attachment): New command.
218 (mail-mode-map): Add a menu-bar item for mail-add-attachment.
219 (mail-mode): Mention mail-insert-file and mail-add-attachment in
220 the doc string.
221 (mml-to-mime, mml-attach-file, mm-default-file-encoding): Declare.
222
2232011-09-10 Reuben Thomas <rrt@sc3d.org>
224
225 * simple.el (count-words-region): Use buffer if there's no region.
226
2272011-09-09 Juri Linkov <juri@jurta.org>
228
229 * wdired.el (wdired-change-to-wdired-mode): Set buffer-local
230 `isearch-filter-predicate' to `wdired-isearch-filter-read-only'.
231 (wdired-isearch-filter-read-only): New function. (Bug#6362)
232
2332011-09-09 Alan Mackenzie <acm@muc.de>
234
235 * progmodes/cc-mode.el (awk-mode): Prevent `define-derived-mode'
236 spuriously generating `awk-mode-syntax-table'. (Bug #9448).
237
2382011-09-09 Eli Zaretskii <eliz@gnu.org>
239
240 Fix for Savannah bug#9392.
241 * simple.el (mail-encode-mml): New defvar.
242
243 * mail/rmail.el (mail-encode-mml): Add a defvar.
244 (rmail-enable-mime-composing): Default to t.
245 (rmail-forward): Use MIME method of forwarding only if both
246 rmail-enable-mime-composing and rmail-enable-mime are non-nil.
247 Set mail-encode-mml non-nil if the MIME method was used.
248
249 * mail/sendmail.el (mml-to-mime): Add autoload form.
250 (mail-encode-mml): Add a defvar.
251 (mail-mode): Make mail-encode-mml buffer-local and initialize it
252 to nil.
253 (mail-send): If mail-encode-mml is non-nil, run the outgoing
254 message through mml-to-mime, and reset mail-encode-mml to nil.
255
2562011-09-09 Glenn Morris <rgm@gnu.org>
257
258 * woman.el (woman-if-body): When processing an .el block,
259 do not delete the next .el block as well. (Bug#9447)
260 (woman-special-characters): Add oq, cq, and hy characters.
261
2622011-09-08 Martin Rudalics <rudalics@gmx.at>
263
264 * window.el (window-deletable-p): Make sure window is live before
265 invoking window-prev-buffers.
266
2672011-09-08 Leo Liu <sdl.web@gmail.com>
268
269 * net/rcirc.el (rcirc-cmd-invite): New rcirc command. (Bug#9453)
270
12011-09-08 Juri Linkov <juri@jurta.org> 2712011-09-08 Juri Linkov <juri@jurta.org>
2 272
3 * progmodes/compile.el (compilation-environment): Make it 273 * progmodes/compile.el (compilation-environment): Make it
@@ -8,11 +278,11 @@
8 * window.el (frame-auto-delete): Rename to window-auto-delete. 278 * window.el (frame-auto-delete): Rename to window-auto-delete.
9 Make it control auto-deletion of windows and/or frames. 279 Make it control auto-deletion of windows and/or frames.
10 (window-deletable-p): New argument FORCE. Rewrite conditions 280 (window-deletable-p): New argument FORCE. Rewrite conditions
11 for deleting window/frame. (Bug#9419) 281 for deleting window/frame. (Bug#9419)
12 (switch-to-prev-buffer, replace-buffer-in-windows, quit-window): 282 (switch-to-prev-buffer, replace-buffer-in-windows, quit-window):
13 Rewrite handling of case when window/frame can be deleted. 283 Rewrite handling of case when window/frame can be deleted.
14 (delete-windows-on): Call window-deletable-p with new FORCE 284 (delete-windows-on): Call window-deletable-p with new FORCE
15 argument t. (Bug#9456) 285 argument t. (Bug#9456)
16 286
172011-09-07 Chong Yidong <cyd@stupidchicken.com> 2872011-09-07 Chong Yidong <cyd@stupidchicken.com>
18 288
@@ -103,7 +373,7 @@
103 373
1042011-09-03 Chong Yidong <cyd@stupidchicken.com> 3742011-09-03 Chong Yidong <cyd@stupidchicken.com>
105 375
106 * mail/sendmail.el (sendmail-query-once-function): Deleted. 376 * mail/sendmail.el (sendmail-query-once-function): Delete.
107 (sendmail-query-once): Save directly to send-mail-function. 377 (sendmail-query-once): Save directly to send-mail-function.
108 Update message-send-mail-function too. 378 Update message-send-mail-function too.
109 379
@@ -115,7 +385,7 @@
115 start python interpreter from menu-bar (as reported by Geert 385 start python interpreter from menu-bar (as reported by Geert
116 Kloosterman). 386 Kloosterman).
117 (inferior-python-mode-map): Fix typo. 387 (inferior-python-mode-map): Fix typo.
118 (python-shell-map): Removed. 388 (python-shell-map): Remove.
119 389
1202011-09-03 Deniz Dogan <deniz@dogan.se> 3902011-09-03 Deniz Dogan <deniz@dogan.se>
121 391
@@ -132,8 +402,8 @@
132 * window.el (window-deletable-p): Don't return a non-nil value 402 * window.el (window-deletable-p): Don't return a non-nil value
133 when there's a buffer that was shown in the window before. 403 when there's a buffer that was shown in the window before.
134 (Bug#9419) 404 (Bug#9419)
135 (display-buffer-pop-up-frame, display-buffer-pop-up-window): Set 405 (display-buffer-pop-up-frame, display-buffer-pop-up-window):
136 window's previous buffers to nil. 406 Set window's previous buffers to nil.
137 407
1382011-09-03 Eli Zaretskii <eliz@gnu.org> 4082011-09-03 Eli Zaretskii <eliz@gnu.org>
139 409
@@ -147,7 +417,7 @@
147 417
1482011-09-02 Chong Yidong <cyd@stupidchicken.com> 4182011-09-02 Chong Yidong <cyd@stupidchicken.com>
149 419
150 * window.el (pop-to-buffer-1, pop-to-buffer-same-window): Deleted. 420 * window.el (pop-to-buffer-1, pop-to-buffer-same-window): Delete.
151 (pop-to-buffer): Change interactive spec. Pass second argument 421 (pop-to-buffer): Change interactive spec. Pass second argument
152 directly to display-buffer. 422 directly to display-buffer.
153 (display-buffer): Fix interactive spec. Use functionp to 423 (display-buffer): Fix interactive spec. Use functionp to
@@ -174,7 +444,7 @@
174 (display-buffer-reuse-or-pop-window) 444 (display-buffer-reuse-or-pop-window)
175 (display-buffer-use-some-window): New functions. 445 (display-buffer-use-some-window): New functions.
176 (display-buffer-default-action): Use them. 446 (display-buffer-default-action): Use them.
177 (display-buffer-default): Deleted. 447 (display-buffer-default): Delete.
178 (pop-to-buffer-1): Fix choice of actions. 448 (pop-to-buffer-1): Fix choice of actions.
179 449
1802011-09-02 Stefan Monnier <monnier@iro.umontreal.ca> 4502011-09-02 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -304,7 +574,7 @@
3042011-08-28 Christoph Scholtes <cschol2112@googlemail.com> 5742011-08-28 Christoph Scholtes <cschol2112@googlemail.com>
305 575
306 * help-mode.el (help-mode-map): Add special-mode-map to parent. 576 * help-mode.el (help-mode-map): Add special-mode-map to parent.
307 (help-mode): Derive help-mode from special-mode. Don't invoke 577 (help-mode): Derive help-mode from special-mode. Don't invoke
308 view-mode from help-mode. 578 view-mode from help-mode.
309 (help-xref-override-view-map): Remove. 579 (help-xref-override-view-map): Remove.
310 (help-make-xrefs): Remove minor-mode-overriding-map-alist since 580 (help-make-xrefs): Remove minor-mode-overriding-map-alist since
@@ -577,14 +847,14 @@
577 847
578 Resolve invalid use of a regexp in regexp-opt. 848 Resolve invalid use of a regexp in regexp-opt.
579 849
580 * cc-fonts.el (c-complex-decl-matchers): Add in special detection 850 * progmodes/cc-fonts.el (c-complex-decl-matchers): Add in special
581 for a java annotation. 851 detection for a java annotation.
582 852
583 * cc-engine.el (c-forward-decl-or-cast-1): Add in special 853 * progmodes/cc-engine.el (c-forward-decl-or-cast-1): Add in special
584 detection for a java annotation. 854 detection for a java annotation.
585 855
586 * cc-langs.el (c-prefix-spec-kwds-re): Remove the special handling 856 * progmodes/cc-langs.el (c-prefix-spec-kwds-re): Remove the special
587 for java. 857 handling for java.
588 (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+". 858 (c-modifier-kwds): Remove the regexp "@[A-za-z0-9]+".
589 859
5902011-08-20 Chong Yidong <cyd@stupidchicken.com> 8602011-08-20 Chong Yidong <cyd@stupidchicken.com>
@@ -620,7 +890,7 @@
6202011-08-19 Glenn Morris <rgm@gnu.org> 8902011-08-19 Glenn Morris <rgm@gnu.org>
621 891
622 * files.el (hack-local-variables-prop-line, hack-local-variables): 892 * files.el (hack-local-variables-prop-line, hack-local-variables):
623 Downcase "Mode:". (Bug#9331) 893 Downcase "Mode:". (Bug#9331)
624 894
6252011-08-18 Chong Yidong <cyd@stupidchicken.com> 8952011-08-18 Chong Yidong <cyd@stupidchicken.com>
626 896
@@ -676,7 +946,7 @@
676 (epa-mail-expand-recipients-2, epa-mail-expand-recipients): 946 (epa-mail-expand-recipients-2, epa-mail-expand-recipients):
677 Remove. 947 Remove.
678 948
6792011-08-16 Feng Li <fengli@gmail.com> (tiny change) 9492011-08-16 Feng Li <fengli@gmail.com> (tiny change)
680 950
681 * calc/calc-ext.el (math-defintegral-2): Remove nested backquote. 951 * calc/calc-ext.el (math-defintegral-2): Remove nested backquote.
682 952
@@ -962,7 +1232,7 @@
962 * progmodes/cc-mode.el: Remove two autoload forms which loaded 1232 * progmodes/cc-mode.el: Remove two autoload forms which loaded
963 cc-langs. 1233 cc-langs.
964 1234
965 * /progmodes/cc-langs.el (c-make-init-lang-vars-fun): Don't emit 1235 * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Don't emit
966 "(require 'cc-langs)". Quote a form so it will evaluate at 1236 "(require 'cc-langs)". Quote a form so it will evaluate at
967 (cc-mode's) compilation time. 1237 (cc-mode's) compilation time.
968 1238
@@ -3626,7 +3896,7 @@
3626 3896
36272011-05-31 Helmut Eller <eller.helmut@gmail.com> 38972011-05-31 Helmut Eller <eller.helmut@gmail.com>
3628 3898
3629 * debug.el (debug): Restore the previous content of the 3899 * emacs-lisp/debug.el (debug): Restore the previous content of the
3630 *Backtrace* buffer when we exit with C-M-c. 3900 *Backtrace* buffer when we exit with C-M-c.
3631 3901
36322011-05-31 Stefan Monnier <monnier@iro.umontreal.ca> 39022011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -4275,7 +4545,8 @@
42752011-05-13 Didier Verna <didier@xemacs.org> 45452011-05-13 Didier Verna <didier@xemacs.org>
4276 4546
4277 Common Lisp indentation improvements on defmethod and lambda-lists. 4547 Common Lisp indentation improvements on defmethod and lambda-lists.
4278 * cl-indent.el: Advertise the changes and remove obsolete TODO entries. 4548 * emacs-lisp/cl-indent.el: Advertise the changes and remove obsolete
4549 TODO entries.
4279 (lisp-lambda-list-keyword-parameter-indentation) 4550 (lisp-lambda-list-keyword-parameter-indentation)
4280 (lisp-lambda-list-keyword-parameter-alignment) 4551 (lisp-lambda-list-keyword-parameter-alignment)
4281 (lisp-lambda-list-keyword-alignment): New customizable user options. 4552 (lisp-lambda-list-keyword-alignment): New customizable user options.
@@ -4325,7 +4596,7 @@
4325 4596
43262011-05-12 Eli Zaretskii <eliz@gnu.org> 45972011-05-12 Eli Zaretskii <eliz@gnu.org>
4327 4598
4328 * smerge-mode.el (smerge-resolve): Use null-device rather than a 4599 * vc/smerge-mode.el (smerge-resolve): Use null-device rather than a
4329 literal "/dev/null". 4600 literal "/dev/null".
4330 4601
43312011-05-12 Stefan Monnier <monnier@iro.umontreal.ca> 46022011-05-12 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -5769,7 +6040,7 @@
5769 6040
57702011-04-08 Juanma Barranquero <lekktu@gmail.com> 60412011-04-08 Juanma Barranquero <lekktu@gmail.com>
5771 6042
5772 * vc-annotate.el (vc-annotate-show-log-revision-at-line): 6043 * vc/vc-annotate.el (vc-annotate-show-log-revision-at-line):
5773 Fix typo in docstring. 6044 Fix typo in docstring.
5774 6045
57752011-04-08 Eli Zaretskii <eliz@gnu.org> 60462011-04-08 Eli Zaretskii <eliz@gnu.org>
@@ -6441,7 +6712,7 @@
6441 6712
64422011-03-19 Eli Zaretskii <eliz@gnu.org> 67132011-03-19 Eli Zaretskii <eliz@gnu.org>
6443 6714
6444 * emerge.el (emerge-metachars): Separate value for ms-dos and 6715 * vc/emerge.el (emerge-metachars): Separate value for ms-dos and
6445 windows-nt systems. 6716 windows-nt systems.
6446 (emerge-protect-metachars): Quote correctly for ms-dos and 6717 (emerge-protect-metachars): Quote correctly for ms-dos and
6447 windows-nt systems. 6718 windows-nt systems.
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 2be74cf5efb..d757453c051 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -586,22 +586,16 @@ in the selected frame."
586 "Make the other window select this line's buffer. 586 "Make the other window select this line's buffer.
587The current window remains selected." 587The current window remains selected."
588 (interactive) 588 (interactive)
589 (let ((pop-up-windows t) 589 (display-buffer (Buffer-menu-buffer t) t))
590 same-window-buffer-names
591 same-window-regexps)
592 (display-buffer (Buffer-menu-buffer t))))
593 590
594(defun Buffer-menu-2-window () 591(defun Buffer-menu-2-window ()
595 "Select this line's buffer, with previous buffer in second window." 592 "Select this line's buffer, with previous buffer in second window."
596 (interactive) 593 (interactive)
597 (let ((buff (Buffer-menu-buffer t)) 594 (let ((buff (Buffer-menu-buffer t))
598 (menu (current-buffer)) 595 (menu (current-buffer)))
599 (pop-up-windows t)
600 same-window-buffer-names
601 same-window-regexps)
602 (delete-other-windows) 596 (delete-other-windows)
603 (switch-to-buffer (other-buffer)) 597 (switch-to-buffer (other-buffer))
604 (pop-to-buffer buff) 598 (switch-to-buffer-other-window buff)
605 (bury-buffer menu))) 599 (bury-buffer menu)))
606 600
607(defun Buffer-menu-toggle-read-only () 601(defun Buffer-menu-toggle-read-only ()
diff --git a/lisp/cmuscheme.el b/lisp/cmuscheme.el
index f4d15689885..6eb2aa76135 100644
--- a/lisp/cmuscheme.el
+++ b/lisp/cmuscheme.el
@@ -246,8 +246,7 @@ is run).
246 (inferior-scheme-mode))) 246 (inferior-scheme-mode)))
247 (setq scheme-program-name cmd) 247 (setq scheme-program-name cmd)
248 (setq scheme-buffer "*scheme*") 248 (setq scheme-buffer "*scheme*")
249 (pop-to-buffer "*scheme*")) 249 (switch-to-buffer "*scheme*"))
250;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*scheme*"))
251 250
252(defun scheme-start-file (prog) 251(defun scheme-start-file (prog)
253 "Return the name of the start file corresponding to PROG. 252 "Return the name of the start file corresponding to PROG.
@@ -372,7 +371,7 @@ With argument, position cursor at end of buffer."
372 (interactive "P") 371 (interactive "P")
373 (if (or (and scheme-buffer (get-buffer scheme-buffer)) 372 (if (or (and scheme-buffer (get-buffer scheme-buffer))
374 (scheme-interactively-start-process)) 373 (scheme-interactively-start-process))
375 (pop-to-buffer scheme-buffer) 374 (switch-to-buffer scheme-buffer)
376 (error "No current process buffer. See variable `scheme-buffer'")) 375 (error "No current process buffer. See variable `scheme-buffer'"))
377 (when eob-p 376 (when eob-p
378 (push-mark) 377 (push-mark)
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 3e41a304f43..620ecdba40c 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -699,8 +699,6 @@ If `last', order groups after non-groups."
699 (const :tag "none" nil)) 699 (const :tag "none" nil))
700 :group 'custom-menu) 700 :group 'custom-menu)
701 701
702;;;###autoload (add-hook 'same-window-regexps (purecopy "\\`\\*Customiz.*\\*\\'"))
703
704(defun custom-sort-items (items sort-alphabetically order-groups) 702(defun custom-sort-items (items sort-alphabetically order-groups)
705 "Return a sorted copy of ITEMS. 703 "Return a sorted copy of ITEMS.
706ITEMS should be a `custom-group' property. 704ITEMS should be a `custom-group' property.
@@ -1103,8 +1101,9 @@ then prompt for the MODE to customize."
1103 t))) 1101 t)))
1104 1102
1105;;;###autoload 1103;;;###autoload
1106(defun customize-group (&optional group) 1104(defun customize-group (&optional group other-window)
1107 "Customize GROUP, which must be a customization group." 1105 "Customize GROUP, which must be a customization group.
1106If OTHER-WINDOW is non-nil, display in another window."
1108 (interactive (list (customize-read-group))) 1107 (interactive (list (customize-read-group)))
1109 (when (stringp group) 1108 (when (stringp group)
1110 (if (string-equal "" group) 1109 (if (string-equal "" group)
@@ -1113,21 +1112,20 @@ then prompt for the MODE to customize."
1113 (let ((name (format "*Customize Group: %s*" 1112 (let ((name (format "*Customize Group: %s*"
1114 (custom-unlispify-tag-name group)))) 1113 (custom-unlispify-tag-name group))))
1115 (if (get-buffer name) 1114 (if (get-buffer name)
1116 (pop-to-buffer name) 1115 (switch-to-buffer name other-window)
1117 (custom-buffer-create 1116 (funcall (if other-window
1118 (list (list group 'custom-group)) 1117 'custom-buffer-create-other-window
1119 name 1118 'custom-buffer-create)
1120 (concat " for group " 1119 (list (list group 'custom-group))
1121 (custom-unlispify-tag-name group)))))) 1120 name
1121 (concat " for group "
1122 (custom-unlispify-tag-name group))))))
1122 1123
1123;;;###autoload 1124;;;###autoload
1124(defun customize-group-other-window (&optional group) 1125(defun customize-group-other-window (&optional group)
1125 "Customize GROUP, which must be a customization group, in another window." 1126 "Customize GROUP, which must be a customization group, in another window."
1126 (interactive (list (customize-read-group))) 1127 (interactive (list (customize-read-group)))
1127 (let ((pop-up-windows t) 1128 (customize-group group t))
1128 (same-window-buffer-names nil)
1129 (same-window-regexps nil))
1130 (customize-group group)))
1131 1129
1132;;;###autoload 1130;;;###autoload
1133(defalias 'customize-variable 'customize-option) 1131(defalias 'customize-variable 'customize-option)
@@ -1308,11 +1306,13 @@ Emacs that is associated with version VERSION of PACKAGE."
1308 (< minor1 minor2))))) 1306 (< minor1 minor2)))))
1309 1307
1310;;;###autoload 1308;;;###autoload
1311(defun customize-face (&optional face) 1309(defun customize-face (&optional face other-window)
1312 "Customize FACE, which should be a face name or nil. 1310 "Customize FACE, which should be a face name or nil.
1313If FACE is nil, customize all faces. If FACE is actually a 1311If FACE is nil, customize all faces. If FACE is actually a
1314face-alias, customize the face it is aliased to. 1312face-alias, customize the face it is aliased to.
1315 1313
1314If OTHER-WINDOW is non-nil, display in another window.
1315
1316Interactively, when point is on text which has a face specified, 1316Interactively, when point is on text which has a face specified,
1317suggest to customize that face, if it's customizable." 1317suggest to customize that face, if it's customizable."
1318 (interactive (list (read-face-name "Customize face" "all faces" t))) 1318 (interactive (list (read-face-name "Customize face" "all faces" t)))
@@ -1320,21 +1320,24 @@ suggest to customize that face, if it's customizable."
1320 (setq face (face-list))) 1320 (setq face (face-list)))
1321 (if (and (listp face) (null (cdr face))) 1321 (if (and (listp face) (null (cdr face)))
1322 (setq face (car face))) 1322 (setq face (car face)))
1323 (if (listp face) 1323 (let ((display-fun (if other-window
1324 (custom-buffer-create 1324 'custom-buffer-create-other-window
1325 (custom-sort-items 1325 'custom-buffer-create)))
1326 (mapcar (lambda (s) (list s 'custom-face)) face) 1326 (if (listp face)
1327 t nil) 1327 (funcall display-fun
1328 "*Customize Faces*") 1328 (custom-sort-items
1329 ;; If FACE is actually an alias, customize the face it is aliased to. 1329 (mapcar (lambda (s) (list s 'custom-face)) face)
1330 (if (get face 'face-alias) 1330 t nil)
1331 (setq face (get face 'face-alias))) 1331 "*Customize Faces*")
1332 (unless (facep face) 1332 ;; If FACE is actually an alias, customize the face it is aliased to.
1333 (error "Invalid face %S" face)) 1333 (if (get face 'face-alias)
1334 (custom-buffer-create 1334 (setq face (get face 'face-alias)))
1335 (list (list face 'custom-face)) 1335 (unless (facep face)
1336 (format "*Customize Face: %s*" 1336 (error "Invalid face %S" face))
1337 (custom-unlispify-tag-name face))))) 1337 (funcall display-fun
1338 (list (list face 'custom-face))
1339 (format "*Customize Face: %s*"
1340 (custom-unlispify-tag-name face))))))
1338 1341
1339;;;###autoload 1342;;;###autoload
1340(defun customize-face-other-window (&optional face) 1343(defun customize-face-other-window (&optional face)
@@ -1344,10 +1347,7 @@ If FACE is actually a face-alias, customize the face it is aliased to.
1344Interactively, when point is on text which has a face specified, 1347Interactively, when point is on text which has a face specified,
1345suggest to customize that face, if it's customizable." 1348suggest to customize that face, if it's customizable."
1346 (interactive (list (read-face-name "Customize face" "all faces" t))) 1349 (interactive (list (read-face-name "Customize face" "all faces" t)))
1347 (let ((pop-up-windows t) 1350 (customize-face face t))
1348 (same-window-buffer-names nil)
1349 (same-window-regexps nil))
1350 (customize-face face)))
1351 1351
1352(defalias 'customize-customized 'customize-unsaved) 1352(defalias 'customize-customized 'customize-unsaved)
1353 1353
@@ -1533,7 +1533,7 @@ Optional NAME is the name of the buffer.
1533OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where 1533OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
1534SYMBOL is a customization option, and WIDGET is a widget for editing 1534SYMBOL is a customization option, and WIDGET is a widget for editing
1535that option." 1535that option."
1536 (pop-to-buffer (custom-get-fresh-buffer (or name "*Customization*"))) 1536 (switch-to-buffer (custom-get-fresh-buffer (or name "*Customization*")))
1537 (custom-buffer-create-internal options description)) 1537 (custom-buffer-create-internal options description))
1538 1538
1539;;;###autoload 1539;;;###autoload
@@ -1545,11 +1545,8 @@ OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
1545SYMBOL is a customization option, and WIDGET is a widget for editing 1545SYMBOL is a customization option, and WIDGET is a widget for editing
1546that option." 1546that option."
1547 (unless name (setq name "*Customization*")) 1547 (unless name (setq name "*Customization*"))
1548 (let ((pop-up-windows t) 1548 (switch-to-buffer-other-window (custom-get-fresh-buffer name))
1549 (same-window-buffer-names nil) 1549 (custom-buffer-create-internal options description))
1550 (same-window-regexps nil))
1551 (pop-to-buffer (custom-get-fresh-buffer name))
1552 (custom-buffer-create-internal options description)))
1553 1550
1554(defcustom custom-reset-button-menu nil 1551(defcustom custom-reset-button-menu nil
1555 "If non-nil, only show a single reset button in customize buffers. 1552 "If non-nil, only show a single reset button in customize buffers.
@@ -1724,7 +1721,7 @@ Otherwise use brackets."
1724 (unless group 1721 (unless group
1725 (setq group 'emacs)) 1722 (setq group 'emacs))
1726 (let ((name "*Customize Browser*")) 1723 (let ((name "*Customize Browser*"))
1727 (pop-to-buffer (custom-get-fresh-buffer name))) 1724 (switch-to-buffer (custom-get-fresh-buffer name)))
1728 (Custom-mode) 1725 (Custom-mode)
1729 (widget-insert (format "\ 1726 (widget-insert (format "\
1730%s buttons; type RET or click mouse-1 1727%s buttons; type RET or click mouse-1
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index ec157fc4939..2f2d28e596c 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -236,18 +236,16 @@ List has a form of (file-name full-file-name (attribute-list))."
236 ;; OP-SYMBOL is the type of operation (for use in `dired-mark-pop-up'). 236 ;; OP-SYMBOL is the type of operation (for use in `dired-mark-pop-up').
237 ;; ARG describes which files to use, as in `dired-get-marked-files'. 237 ;; ARG describes which files to use, as in `dired-get-marked-files'.
238 (let* ((files (dired-get-marked-files t arg)) 238 (let* ((files (dired-get-marked-files t arg))
239 (initial 239 (default (and (eq op-symbol 'touch)
240 (if (eq op-symbol 'touch) 240 (stringp (car files))
241 (format-time-string "%Y%m%d%H%M.%S"))) 241 (format-time-string "%Y%m%d%H%M.%S"
242 (default 242 (nth 5 (file-attributes (car files))))))
243 (if (eq op-symbol 'touch) 243 (prompt (concat "Change " attribute-name " of %s to"
244 (and (stringp (car files)) 244 (if (eq op-symbol 'touch)
245 (format-time-string "%Y%m%d%H%M.%S" 245 " (default now): "
246 (nth 5 (file-attributes (car files))))))) 246 ": ")))
247 (new-attribute 247 (new-attribute (dired-mark-read-string prompt nil op-symbol
248 (dired-mark-read-string 248 arg files default))
249 (concat "Change " attribute-name " of %s to: ")
250 initial op-symbol arg files default))
251 (operation (concat program " " new-attribute)) 249 (operation (concat program " " new-attribute))
252 failures) 250 failures)
253 (setq failures 251 (setq failures
@@ -255,9 +253,10 @@ List has a form of (file-name full-file-name (attribute-list))."
255 (function dired-check-process) 253 (function dired-check-process)
256 (append 254 (append
257 (list operation program) 255 (list operation program)
258 (if (eq op-symbol 'touch) 256 (unless (string-equal new-attribute "")
259 '("-t") nil) 257 (if (eq op-symbol 'touch)
260 (list new-attribute) 258 (list "-t" new-attribute)
259 (list new-attribute)))
261 (if (string-match "gnu" system-configuration) 260 (if (string-match "gnu" system-configuration)
262 '("--") nil)) 261 '("--") nil))
263 files)) 262 files))
@@ -285,10 +284,19 @@ Symbolic modes like `g+w' are allowed."
285 (match-string 2 modestr) 284 (match-string 2 modestr)
286 (match-string 3 modestr))))) 285 (match-string 3 modestr)))))
287 (modes (dired-mark-read-string 286 (modes (dired-mark-read-string
288 "Change mode of %s to: " nil 287 "Change mode of %s to: "
288 ;; Insert initial input if there's only one file.
289 (unless (cadr files) default)
289 'chmod arg files default)) 290 'chmod arg files default))
290 (num-modes (if (string-match "^[0-7]+" modes) 291 num-modes)
291 (string-to-number modes 8)))) 292
293 (cond ((equal modes "")
294 ;; We used to treat empty input as DEFAULT, but that is not
295 ;; such a good idea (Bug#9361).
296 (error "No file mode specified"))
297 ((string-match "^[0-7]+" modes)
298 (setq num-modes (string-to-number modes 8))))
299
292 (dolist (file files) 300 (dolist (file files)
293 (set-file-modes 301 (set-file-modes
294 file 302 file
@@ -379,22 +387,24 @@ Uses the shell command coming from variables `lpr-command' and
379 'print arg file-list))) 387 'print arg file-list)))
380 (dired-run-shell-command (dired-shell-stuff-it command file-list nil)))) 388 (dired-run-shell-command (dired-shell-stuff-it command file-list nil))))
381 389
382;; Read arguments for a marked-files command that wants a string 390(defun dired-mark-read-string (prompt initial op-symbol arg files
383;; that is not a file name, 391 &optional standard-value)
384;; perhaps popping up the list of marked files. 392 "Read args for a Dired marked-files command, prompting with PROMPT.
385;; ARG is the prefix arg and indicates whether the files came from 393Return the user input (a string).
386;; marks (ARG=nil) or a repeat factor (integerp ARG). 394
387;; If the current file was used, the list has but one element and ARG 395INITIAL, if non-nil, is the initial minibuffer input.
388;; does not matter. (It is non-nil, non-integer in that case, namely '(4)). 396OP-SYMBOL is an operation symbol (see `dired-no-confirm').
389 397ARG is normally the prefix argument for the calling command.
390(defun dired-mark-read-string (prompt initial op-symbol arg files &optional default) 398FILES should be a list of file names.
391 ;; PROMPT for a string, with INITIAL input and DEFAULT value. 399
392 ;; Other args are used to give user feedback and pop-up: 400STANDARD-VALUE, if non-nil, should be a \"standard\" value or
393 ;; OP-SYMBOL of command, prefix ARG, marked FILES. 401list of such values, available via history commands. Note that
394 (dired-mark-pop-up 402if the user enters empty input, this function returns the empty
395 nil op-symbol files 403string, not STANDARD-VALUE."
396 (function read-string) 404 (dired-mark-pop-up nil op-symbol files
397 (format prompt (dired-mark-prompt arg files)) initial nil default)) 405 'read-from-minibuffer
406 (format prompt (dired-mark-prompt arg files))
407 initial nil nil nil standard-value))
398 408
399;;; Cleaning a directory: flagging some backups for deletion. 409;;; Cleaning a directory: flagging some backups for deletion.
400 410
diff --git a/lisp/dired.el b/lisp/dired.el
index ecb626a275e..3428f5bef8b 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -3663,7 +3663,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3663;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command 3663;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
3664;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown 3664;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
3665;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff 3665;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
3666;;;;;; dired-diff) "dired-aux" "dired-aux.el" "bbb53a5b6bf56c413fe0f898559bef8d") 3666;;;;;; dired-diff) "dired-aux" "dired-aux.el" "bbc9babe193843cad535d73492326c48")
3667;;; Generated autoloads from dired-aux.el 3667;;; Generated autoloads from dired-aux.el
3668 3668
3669(autoload 'dired-diff "dired-aux" "\ 3669(autoload 'dired-diff "dired-aux" "\
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index 40434636e62..287bb531538 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -167,6 +167,7 @@ is set to `defun'.")
167 (+ loop-indentation lisp-loop-forms-indentation))))) 167 (+ loop-indentation lisp-loop-forms-indentation)))))
168 168
169 169
170;; Cf (info "(elisp)Specification List")
170;;;###autoload 171;;;###autoload
171(defun common-lisp-indent-function (indent-point state) 172(defun common-lisp-indent-function (indent-point state)
172 "Function to indent the arguments of a Lisp function call. 173 "Function to indent the arguments of a Lisp function call.
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index 8276030ccf8..16258a5a3a1 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -342,71 +342,72 @@ That buffer should be current already."
342 "Attach cross-references to function names in the `*Backtrace*' buffer." 342 "Attach cross-references to function names in the `*Backtrace*' buffer."
343 (interactive "b") 343 (interactive "b")
344 (with-current-buffer (or buffer (current-buffer)) 344 (with-current-buffer (or buffer (current-buffer))
345 (setq buffer (current-buffer)) 345 (save-excursion
346 (let ((inhibit-read-only t) 346 (setq buffer (current-buffer))
347 (old-end (point-min)) (new-end (point-min))) 347 (let ((inhibit-read-only t)
348 ;; If we saved an old backtrace, find the common part 348 (old-end (point-min)) (new-end (point-min)))
349 ;; between the new and the old. 349 ;; If we saved an old backtrace, find the common part
350 ;; Compare line by line, starting from the end, 350 ;; between the new and the old.
351 ;; because that's the part that is likely to be unchanged. 351 ;; Compare line by line, starting from the end,
352 (if debugger-previous-backtrace 352 ;; because that's the part that is likely to be unchanged.
353 (let (old-start new-start (all-match t)) 353 (if debugger-previous-backtrace
354 (goto-char (point-max)) 354 (let (old-start new-start (all-match t))
355 (with-temp-buffer 355 (goto-char (point-max))
356 (insert debugger-previous-backtrace) 356 (with-temp-buffer
357 (while (and all-match (not (bobp))) 357 (insert debugger-previous-backtrace)
358 (setq old-end (point)) 358 (while (and all-match (not (bobp)))
359 (forward-line -1) 359 (setq old-end (point))
360 (setq old-start (point))
361 (with-current-buffer buffer
362 (setq new-end (point))
363 (forward-line -1) 360 (forward-line -1)
364 (setq new-start (point))) 361 (setq old-start (point))
365 (if (not (zerop 362 (with-current-buffer buffer
366 (let ((case-fold-search nil)) 363 (setq new-end (point))
367 (compare-buffer-substrings 364 (forward-line -1)
368 (current-buffer) old-start old-end 365 (setq new-start (point)))
369 buffer new-start new-end)))) 366 (if (not (zerop
370 (setq all-match nil)))) 367 (let ((case-fold-search nil))
371 ;; Now new-end is the position of the start of the 368 (compare-buffer-substrings
372 ;; unchanged part in the current buffer, and old-end is 369 (current-buffer) old-start old-end
373 ;; the position of that same text in the saved old 370 buffer new-start new-end))))
374 ;; backtrace. But we must subtract (point-min) since strings are 371 (setq all-match nil))))
375 ;; indexed in origin 0. 372 ;; Now new-end is the position of the start of the
376 373 ;; unchanged part in the current buffer, and old-end is
377 ;; Replace the unchanged part of the backtrace 374 ;; the position of that same text in the saved old
378 ;; with the text from debugger-previous-backtrace, 375 ;; backtrace. But we must subtract (point-min) since strings are
379 ;; since that already has the proper xrefs. 376 ;; indexed in origin 0.
380 ;; With this optimization, we only need to scan 377
381 ;; the changed part of the backtrace. 378 ;; Replace the unchanged part of the backtrace
382 (delete-region new-end (point-max)) 379 ;; with the text from debugger-previous-backtrace,
383 (goto-char (point-max)) 380 ;; since that already has the proper xrefs.
384 (insert (substring debugger-previous-backtrace 381 ;; With this optimization, we only need to scan
385 (- old-end (point-min)))) 382 ;; the changed part of the backtrace.
386 ;; Make the unchanged part of the backtrace inaccessible 383 (delete-region new-end (point-max))
387 ;; so it won't be scanned. 384 (goto-char (point-max))
388 (narrow-to-region (point-min) new-end))) 385 (insert (substring debugger-previous-backtrace
389 386 (- old-end (point-min))))
390 ;; Scan the new part of the backtrace, inserting xrefs. 387 ;; Make the unchanged part of the backtrace inaccessible
391 (goto-char (point-min)) 388 ;; so it won't be scanned.
392 (while (progn 389 (narrow-to-region (point-min) new-end)))
393 (goto-char (+ (point) 2)) 390
394 (skip-syntax-forward "^w_") 391 ;; Scan the new part of the backtrace, inserting xrefs.
395 (not (eobp))) 392 (goto-char (point-min))
396 (let* ((beg (point)) 393 (while (progn
397 (end (progn (skip-syntax-forward "w_") (point))) 394 (goto-char (+ (point) 2))
398 (sym (intern-soft (buffer-substring-no-properties 395 (skip-syntax-forward "^w_")
399 beg end))) 396 (not (eobp)))
400 (file (and sym (symbol-file sym 'defun)))) 397 (let* ((beg (point))
401 (when file 398 (end (progn (skip-syntax-forward "w_") (point)))
402 (goto-char beg) 399 (sym (intern-soft (buffer-substring-no-properties
403 ;; help-xref-button needs to operate on something matched 400 beg end)))
404 ;; by a regexp, so set that up for it. 401 (file (and sym (symbol-file sym 'defun))))
405 (re-search-forward "\\(\\sw\\|\\s_\\)+") 402 (when file
406 (help-xref-button 0 'help-function-def sym file))) 403 (goto-char beg)
407 (forward-line 1)) 404 ;; help-xref-button needs to operate on something matched
408 (widen)) 405 ;; by a regexp, so set that up for it.
409 (setq debugger-previous-backtrace (buffer-string)))) 406 (re-search-forward "\\(\\sw\\|\\s_\\)+")
407 (help-xref-button 0 'help-function-def sym file)))
408 (forward-line 1))
409 (widen))
410 (setq debugger-previous-backtrace (buffer-string)))))
410 411
411(defun debugger-step-through () 412(defun debugger-step-through ()
412 "Proceed, stepping through subexpressions of this expression. 413 "Proceed, stepping through subexpressions of this expression.
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index c8620aaa439..f2bea30ea39 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1102,25 +1102,31 @@ is the buffer position of the start of the containing expression."
1102 1102
1103(defun lisp-indent-function (indent-point state) 1103(defun lisp-indent-function (indent-point state)
1104 "This function is the normal value of the variable `lisp-indent-function'. 1104 "This function is the normal value of the variable `lisp-indent-function'.
1105It is used when indenting a line within a function call, to see if the 1105The function `calculate-lisp-indent' calls this to determine
1106called function says anything special about how to indent the line. 1106if the arguments of a Lisp function call should be indented specially.
1107 1107
1108INDENT-POINT is the position where the user typed TAB, or equivalent. 1108INDENT-POINT is the position where the user typed TAB, or equivalent.
1109Point is located at the point to indent under (for default indentation); 1109Point is located at the point to indent under (for default indentation);
1110STATE is the `parse-partial-sexp' state for that position. 1110STATE is the `parse-partial-sexp' state for that position.
1111 1111
1112If the current line is in a call to a Lisp function 1112If the current line is in a call to a Lisp function that has a non-nil
1113which has a non-nil property `lisp-indent-function', 1113property `lisp-indent-function' (or the deprecated `lisp-indent-hook'),
1114that specifies how to do the indentation. The property value can be 1114it specifies how to indent. The property value can be:
1115* `defun', meaning indent `defun'-style; 1115
1116* `defun', meaning indent `defun'-style
1117 \(this is also the case if there is no property and the function
1118 has a name that begins with \"def\", and three or more arguments);
1119
1116* an integer N, meaning indent the first N arguments specially 1120* an integer N, meaning indent the first N arguments specially
1117 like ordinary function arguments and then indent any further 1121 (like ordinary function arguments), and then indent any further
1118 arguments like a body; 1122 arguments like a body;
1119* a function to call just as this function was called.
1120 If that function returns nil, that means it doesn't specify
1121 the indentation.
1122 1123
1123This function also returns nil meaning don't specify the indentation." 1124* a function to call that returns the indentation (or nil).
1125 `lisp-indent-function' calls this function with the same two arguments
1126 that it itself received.
1127
1128This function returns either the indentation to use, or nil if the
1129Lisp function does not specify a special indentation."
1124 (let ((normal-indent (current-column))) 1130 (let ((normal-indent (current-column)))
1125 (goto-char (1+ (elt state 1))) 1131 (goto-char (1+ (elt state 1)))
1126 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) 1132 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 1b42aa9ea73..a18b892efe8 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -241,10 +241,12 @@ it will remove any faces not explicitly in the list."
241 (define-key map [df] (cons (purecopy "Display Faces") 'list-faces-display)) 241 (define-key map [df] (cons (purecopy "Display Faces") 'list-faces-display))
242 (define-key map [dp] (cons (purecopy "Describe Properties") 242 (define-key map [dp] (cons (purecopy "Describe Properties")
243 'describe-text-properties)) 243 'describe-text-properties))
244 (define-key map [ra] (cons (purecopy "Remove Text Properties") 244 (define-key map [ra] (list 'menu-item (purecopy "Remove Text Properties")
245 'facemenu-remove-all)) 245 'facemenu-remove-all
246 (define-key map [rm] (cons (purecopy "Remove Face Properties") 246 :enable 'mark-active))
247 'facemenu-remove-face-props)) 247 (define-key map [rm] (list 'menu-item (purecopy "Remove Face Properties")
248 'facemenu-remove-face-props
249 :enable 'mark-active))
248 (define-key map [s1] (list (purecopy "--")))) 250 (define-key map [s1] (list (purecopy "--"))))
249(let ((map facemenu-menu)) 251(let ((map facemenu-menu))
250 (define-key map [in] (cons (purecopy "Indentation") 252 (define-key map [in] (cons (purecopy "Indentation")
diff --git a/lisp/faces.el b/lisp/faces.el
index 3c4a3330c81..fbe0f30ae6e 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1445,6 +1445,8 @@ If FRAME is nil, the current FRAME is used."
1445 options (cdr conjunct) 1445 options (cdr conjunct)
1446 match (cond ((eq req 'type) 1446 match (cond ((eq req 'type)
1447 (or (memq (window-system frame) options) 1447 (or (memq (window-system frame) options)
1448 (and (memq 'graphic options)
1449 (memq (window-system frame) '(x w32 ns)))
1448 ;; FIXME: This should be revisited to use 1450 ;; FIXME: This should be revisited to use
1449 ;; display-graphic-p, provided that the 1451 ;; display-graphic-p, provided that the
1450 ;; color selection depends on the number 1452 ;; color selection depends on the number
diff --git a/lisp/files.el b/lisp/files.el
index a0f55517546..5ca9af6783d 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6301,7 +6301,7 @@ as in \"og+rX-w\"."
6301 "Convert symbolic file modes to numeric file modes. 6301 "Convert symbolic file modes to numeric file modes.
6302MODES is the string to convert, it should match 6302MODES is the string to convert, it should match
6303\"[ugoa]*([+-=][rwxXstugo]*)+,...\". 6303\"[ugoa]*([+-=][rwxXstugo]*)+,...\".
6304See (info \"(coreutils)File permissions\") for more information on this 6304See Info node `(coreutils)File permissions' for more information on this
6305notation. 6305notation.
6306FROM (or 0 if nil) gives the mode bits on which to base permissions if 6306FROM (or 0 if nil) gives the mode bits on which to base permissions if
6307MODES request to add, remove, or set permissions based on existing ones, 6307MODES request to add, remove, or set permissions based on existing ones,
diff --git a/lisp/frame.el b/lisp/frame.el
index 8fea4f05147..ab9b085f1d9 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1457,7 +1457,7 @@ the opposite frame edge from the edge indicated in the input spec."
1457 1457
1458 1458
1459(defun delete-other-frames (&optional frame) 1459(defun delete-other-frames (&optional frame)
1460 "Delete all frames except FRAME. 1460 "Delete all frames on the current terminal, except FRAME.
1461If FRAME uses another frame's minibuffer, the minibuffer frame is 1461If FRAME uses another frame's minibuffer, the minibuffer frame is
1462left untouched. FRAME nil or omitted means use the selected frame." 1462left untouched. FRAME nil or omitted means use the selected frame."
1463 (interactive) 1463 (interactive)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 2e0cc11279a..a89dc713dd8 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,100 @@
12011-09-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * gnus.el (gnus-interactive-exit): Update defcustom spec.
4
52011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
6
7 * gnus.el (gnus-nntp-server): Move to gnus-int.el to silence bytecomp.
8 * gnus-int.el (gnus-nntp-server): Move from gnus.el.
9
102011-09-12 Andrew Cohen <cohen@andy.bu.edu>
11
12 * gnus-group.el (gnus-group-list-limit-map, gnus-group-list-flush-map)
13 (gnus-group-list-plus-map): Allow limiting, flushing and plusing ticked
14 articles.
15
162011-09-11 Chong Yidong <cyd@stupidchicken.com>
17
18 * message.el (message-pop-to-buffer): Default to switch-to-buffer.
19 (message-mail-other-window, message-mail-other-frame)
20 (message-news-other-window, message-news-other-frame):
21 Use switch-to-buffer-other-frame and switch-to-buffer-other-window
22 instead of setting buffer display varibles.
23
242011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
25
26 * gnus-group.el (gnus-group-list-limit): Explain what the command does.
27
28 * gnus-sum.el (gnus-fetch-headers): Bump message level.
29
302011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
31
32 * gnus-dup.el (gnus-dup-suppress-articles): Move "Suppressing
33 duplicates" to a higher level.
34
35 * gnus-util.el (gnus-verbose): Lower default to 6 to get rid of the
36 most egregious messages.
37
382011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
39
40 * gnus-msg.el (gnus-summary-mail-forward): Minuscule doc fix.
41
422011-09-10 Tetsuo Tsukamoto <tt.tetsuo.tsukamoto@gmail.com> (tiny change)
43
44 * nnrss.el (nnrss-retrieve-groups): Decode the charset before looking
45 up the file (bug#9351).
46
472011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
48
49 * nnimap.el: Redo the charset handling. Let Gnus encode the names, as
50 it does with all other backends, but decode the names immediately after
51 getting them.
52
53 * gnus-group.el (gnus-group-name-charset): Always return `utf-7' when
54 decoding nnimap groups.
55
56 * gnus.el (gnus-variable-list): Don't save `gnus-format-specs' in the
57 newsrc file. It doesn't seem like an important optimisation any more.
58
592011-09-10 Dave Abrahams <dave@boostpro.com> (tiny change)
60
61 * nnimap.el (nnimap-transform-headers): Fix regexp to be less prone to
62 overflows.
63
642011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
65
66 * gnus.el (gnus-article-mark-lists): Remove `recent'.
67 (gnus-interactive-exit): Extend to `quiet'.
68
69 * gnus-sum.el (gnus-offer-save-summaries): Use it.
70
71 * gnus-art.el (gnus-treat-hide-citation-maybe): Add more doc to the
72 string.
73
74 * plstore.el (plstore--get-buffer): Silence compiler warnings by
75 renaming function arguments from `this'.
76
77 * gnus-sum.el (gnus-newsgroup-recent): Remove.
78
79 * gnus-spec.el (gnus-lrm-string-p): `bidi-string-mark-left-to-right'
80 has been renamed.
81 (gnus-lrm-string-p): Include RLM and PDF, too.
82
83 * gnus-int.el (gnus-open-server): Make the "denied" message clearer
84 (bug#9225).
85
862011-09-10 Eli Zaretskii <eliz@gnu.org>
87
88 Add autoload cookies for functions used by sendmail.el.
89 * mm-encode.el (mm-default-file-encoding): Add autoload cookie.
90
91 * mml.el (mml-to-mime, mml-attach-file): Add autoload cookies.
92
932011-09-09 Katsumi Yamaoka <yamaoka@jpl.org>
94
95 * gnus-art.el (article-date-ut): Work properly even when there are
96 things like Date header in the body; work for forwarded parts.
97
12011-09-05 Andrew Cohen <cohen@andy.bu.edu> 982011-09-05 Andrew Cohen <cohen@andy.bu.edu>
2 99
3 * gnus-sum.el (gnus-summary-exit): Ensure we kill the proper 100 * gnus-sum.el (gnus-summary-exit): Ensure we kill the proper
@@ -107,8 +204,8 @@
107 * nnmairix.el (nnmairix-request-set-mark) 204 * nnmairix.el (nnmairix-request-set-mark)
108 (nnmairix-goto-original-article): Remove adding of article to registry, 205 (nnmairix-goto-original-article): Remove adding of article to registry,
109 since `gnus-registry-add-group' isn't available anymore. 206 since `gnus-registry-add-group' isn't available anymore.
110 (nnmairix-determine-original-group-from-registry): Use 207 (nnmairix-determine-original-group-from-registry):
111 `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't 208 Use `gnus-registry-get-id-key' since `gnus-registry-fetch-groups' isn't
112 available anymore. 209 available anymore.
113 210
1142011-08-12 Simon Josefsson <simon@josefsson.org> 2112011-08-12 Simon Josefsson <simon@josefsson.org>
@@ -219,7 +316,7 @@
219 316
2202011-08-02 Lars Magne Ingebrigtsen <larsi@gnus.org> 3172011-08-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
221 318
222 * starttls.el (starttls-available-p): Renamed from 319 * starttls.el (starttls-available-p): Rename from
223 `starttls-any-program-available' and changed return convention. 320 `starttls-any-program-available' and changed return convention.
224 321
2252011-07-31 Lars Ingebrigtsen <larsi@gnus.org> 3222011-07-31 Lars Ingebrigtsen <larsi@gnus.org>
@@ -275,8 +372,8 @@
275 372
276 * nnir.el (gnus-group-make-nnir-group): Allow optional search query 373 * nnir.el (gnus-group-make-nnir-group): Allow optional search query
277 argument. 374 argument.
278 (gnus-group-make-nnir-group, nnir-request-group, nnir-run-query): Use 375 (gnus-group-make-nnir-group, nnir-request-group, nnir-run-query):
279 `nnir-address' to handle server info rather than passing an arg. 376 Use `nnir-address' to handle server info rather than passing an arg.
280 377
281 * nnimap.el (nnimap-make-thread-query): New utility function to format 378 * nnimap.el (nnimap-make-thread-query): New utility function to format
282 an imap thread search query. 379 an imap thread search query.
@@ -329,7 +426,7 @@
329 426
3302011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org> 4272011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
331 428
332 * gnus.el (debbugs-gnu): Renamed from debbugs-emacs. 429 * gnus.el (debbugs-gnu): Rename from debbugs-emacs.
333 430
334 * message.el (message-reply): Work around mysterious bug where 431 * message.el (message-reply): Work around mysterious bug where
335 `message-mode' seems to overwrite the locally bound `subject' variable. 432 `message-mode' seems to overwrite the locally bound `subject' variable.
@@ -358,9 +455,9 @@
358 455
359 * gnus-msg.el (gnus-bug): Don't insert user variables. It usually 456 * gnus-msg.el (gnus-bug): Don't insert user variables. It usually
360 isn't very interesting any more, and it leaks potentially secret data. 457 isn't very interesting any more, and it leaks potentially secret data.
361 (gnus-debug): Removed. 458 (gnus-debug): Remove.
362 459
363 * gnus-art.el (gnus-ignored-headers): Removed obsolete and non-working 460 * gnus-art.el (gnus-ignored-headers): Remove obsolete and non-working
364 use of :custom-show. 461 use of :custom-show.
365 462
3662011-07-07 Daiki Ueno <ueno@unixuser.org> 4632011-07-07 Daiki Ueno <ueno@unixuser.org>
@@ -547,8 +644,8 @@
547 * gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Take an optional 644 * gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Take an optional
548 quit window configuration. 645 quit window configuration.
549 646
550 * auth-source.el (epg-context-set-passphrase-callback): Remove 647 * auth-source.el (epg-context-set-passphrase-callback):
551 duplicate autoload. 648 Remove duplicate autoload.
552 649
5532011-06-30 Andrew Cohen <cohen@andy.bu.edu> 6502011-06-30 Andrew Cohen <cohen@andy.bu.edu>
554 651
@@ -665,7 +762,7 @@
665 * spam.el (spam-stat): Require in a normal fashion without binding 762 * spam.el (spam-stat): Require in a normal fashion without binding
666 `spam-stat-install-hooks' to avoid compilation warnings. 763 `spam-stat-install-hooks' to avoid compilation warnings.
667 764
668 * spam-stat.el (spam-stat-install-hooks): Removed. 765 * spam-stat.el (spam-stat-install-hooks): Remove.
669 (spam-stat-install-hooks): Don't run automatically. 766 (spam-stat-install-hooks): Don't run automatically.
670 767
6712011-06-26 Timo Juhani Lindfors <timo.lindfors@iki.fi> (tiny change) 7682011-06-26 Timo Juhani Lindfors <timo.lindfors@iki.fi> (tiny change)
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 26222119b98..669f9675536 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -1933,7 +1933,7 @@ article numbers will be returned."
1933 (with-current-buffer nntp-server-buffer 1933 (with-current-buffer nntp-server-buffer
1934 (if articles 1934 (if articles
1935 (progn 1935 (progn
1936 (gnus-message 7 "Fetching headers for %s..." 1936 (gnus-message 8 "Fetching headers for %s..."
1937 (gnus-agent-decoded-group-name group)) 1937 (gnus-agent-decoded-group-name group))
1938 1938
1939 ;; Fetch them. 1939 ;; Fetch them.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 9d962fc6d99..8149e555276 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1237,9 +1237,12 @@ predicate. See Info node `(gnus)Customizing Articles'."
1237 :type gnus-article-treat-custom) 1237 :type gnus-article-treat-custom)
1238 1238
1239(defcustom gnus-treat-hide-citation-maybe nil 1239(defcustom gnus-treat-hide-citation-maybe nil
1240 "Hide cited text. 1240 "Hide cited text according to certain conditions.
1241Valid values are nil, t, `head', `first', `last', an integer or a 1241Valid values are nil, t, `head', `first', `last', an integer or a
1242predicate. See Info node `(gnus)Customizing Articles'." 1242predicate. See Info node `(gnus)Customizing Articles'.
1243
1244See `gnus-cite-hide-percentage' and `gnus-cite-hide-absolute' for
1245how to control what it hides."
1243 :group 'gnus-article-treat 1246 :group 'gnus-article-treat
1244 :link '(custom-manual "(gnus)Customizing Articles") 1247 :link '(custom-manual "(gnus)Customizing Articles")
1245 :type gnus-article-treat-custom) 1248 :type gnus-article-treat-custom)
@@ -3429,32 +3432,43 @@ possible values."
3429 (visible-date (mail-fetch-field "Date")) 3432 (visible-date (mail-fetch-field "Date"))
3430 pos date bface eface) 3433 pos date bface eface)
3431 (save-excursion 3434 (save-excursion
3432 (save-restriction 3435 (goto-char (point-min))
3433 (goto-char (point-min)) 3436 (when (re-search-forward "^Date:" nil t)
3434 (when (re-search-forward "^Date:" nil t) 3437 (setq bface (get-text-property (point-at-bol) 'face)
3435 (setq bface (get-text-property (point-at-bol) 'face) 3438 eface (get-text-property (1- (point-at-eol)) 'face)))
3436 eface (get-text-property (1- (point-at-eol)) 'face))) 3439 ;; Delete any old Date headers.
3437 (goto-char (point-min)) 3440 (if date-position
3438 ;; Delete any old Date headers. 3441 (progn
3439 (if date-position 3442 (goto-char date-position)
3440 (progn 3443 (setq date (get-text-property (point) 'original-date))
3441 (goto-char date-position) 3444 (delete-region (point)
3442 (setq date (get-text-property (point) 'original-date)) 3445 (progn
3443 (delete-region (point) 3446 (gnus-article-forward-header)
3444 (progn 3447 (point)))
3445 (gnus-article-forward-header) 3448 (article-transform-date date type bface eface))
3446 (point))) 3449 (save-restriction
3450 (widen)
3451 (goto-char (point-min))
3452 (while (or (get-text-property (setq pos (point)) 'original-date)
3453 (and (setq pos (next-single-property-change
3454 (point) 'original-date))
3455 (goto-char pos)))
3456 (narrow-to-region pos (if (search-forward "\n\n" nil t)
3457 (1+ (match-beginning 0))
3458 (point-max)))
3459 (goto-char (point-min))
3460 (while (re-search-forward "^Date:" nil t)
3461 (setq date (get-text-property (match-beginning 0) 'original-date))
3462 (delete-region (point-at-bol) (progn
3463 (gnus-article-forward-header)
3464 (point))))
3465 (when (and (not date)
3466 visible-date)
3467 (setq date visible-date))
3468 (when date
3447 (article-transform-date date type bface eface)) 3469 (article-transform-date date type bface eface))
3448 (while (re-search-forward "^Date:" nil t) 3470 (goto-char (point-max))
3449 (setq date (get-text-property (match-beginning 0) 'original-date)) 3471 (widen)))))))
3450 (delete-region (point-at-bol) (progn
3451 (gnus-article-forward-header)
3452 (point))))
3453 (when (and (not date)
3454 visible-date)
3455 (setq date visible-date))
3456 (when date
3457 (article-transform-date date type bface eface)))))))
3458 3472
3459(defun article-transform-date (date type bface eface) 3473(defun article-transform-date (date type bface eface)
3460 (dolist (this-type (cond 3474 (dolist (this-type (cond
diff --git a/lisp/gnus/gnus-dup.el b/lisp/gnus/gnus-dup.el
index eaecc07d767..8db1905ef8b 100644
--- a/lisp/gnus/gnus-dup.el
+++ b/lisp/gnus/gnus-dup.el
@@ -131,7 +131,7 @@ seen in the same session."
131 "Mark duplicate articles as read." 131 "Mark duplicate articles as read."
132 (unless gnus-dup-list 132 (unless gnus-dup-list
133 (gnus-dup-open)) 133 (gnus-dup-open))
134 (gnus-message 6 "Suppressing duplicates...") 134 (gnus-message 8 "Suppressing duplicates...")
135 (let ((auto (and gnus-newsgroup-auto-expire 135 (let ((auto (and gnus-newsgroup-auto-expire
136 (memq gnus-duplicate-mark gnus-auto-expirable-marks))) 136 (memq gnus-duplicate-mark gnus-auto-expirable-marks)))
137 number) 137 number)
@@ -145,7 +145,7 @@ seen in the same session."
145 (push (cons number gnus-duplicate-mark) gnus-newsgroup-reads) 145 (push (cons number gnus-duplicate-mark) gnus-newsgroup-reads)
146 (push number gnus-newsgroup-expirable) 146 (push number gnus-newsgroup-expirable)
147 (push (cons number gnus-expirable-mark) gnus-newsgroup-reads))))) 147 (push (cons number gnus-expirable-mark) gnus-newsgroup-reads)))))
148 (gnus-message 6 "Suppressing duplicates...done")) 148 (gnus-message 8 "Suppressing duplicates...done"))
149 149
150(defun gnus-dup-unsuppress-article (article) 150(defun gnus-dup-unsuppress-article (article)
151 "Stop suppression of ARTICLE." 151 "Stop suppression of ARTICLE."
diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el
index aed471c38f4..5acc9d117e4 100644
--- a/lisp/gnus/gnus-ems.el
+++ b/lisp/gnus/gnus-ems.el
@@ -210,8 +210,8 @@
210 end nil)))))) 210 end nil))))))
211 211
212(defmacro gnus-string-mark-left-to-right (string) 212(defmacro gnus-string-mark-left-to-right (string)
213 (if (fboundp 'string-mark-left-to-right) 213 (if (fboundp 'bidi-string-mark-left-to-right)
214 `(string-mark-left-to-right ,string) 214 `(bidi-string-mark-left-to-right ,string)
215 string)) 215 string))
216 216
217(eval-and-compile 217(eval-and-compile
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 5cc01759a04..720881acd98 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -710,7 +710,8 @@ simple manner.")
710 "M" gnus-group-list-limit 710 "M" gnus-group-list-limit
711 "l" gnus-group-list-limit 711 "l" gnus-group-list-limit
712 "c" gnus-group-list-limit 712 "c" gnus-group-list-limit
713 "?" gnus-group-list-limit) 713 "?" gnus-group-list-limit
714 "!" gnus-group-list-limit)
714 715
715(gnus-define-keys (gnus-group-list-flush-map "f" gnus-group-list-map) 716(gnus-define-keys (gnus-group-list-flush-map "f" gnus-group-list-map)
716 "k" gnus-group-list-flush 717 "k" gnus-group-list-flush
@@ -722,7 +723,8 @@ simple manner.")
722 "M" gnus-group-list-flush 723 "M" gnus-group-list-flush
723 "l" gnus-group-list-flush 724 "l" gnus-group-list-flush
724 "c" gnus-group-list-flush 725 "c" gnus-group-list-flush
725 "?" gnus-group-list-flush) 726 "?" gnus-group-list-flush
727 "!" gnus-group-list-flush)
726 728
727(gnus-define-keys (gnus-group-list-plus-map "p" gnus-group-list-map) 729(gnus-define-keys (gnus-group-list-plus-map "p" gnus-group-list-map)
728 "k" gnus-group-list-plus 730 "k" gnus-group-list-plus
@@ -734,7 +736,8 @@ simple manner.")
734 "M" gnus-group-list-plus 736 "M" gnus-group-list-plus
735 "l" gnus-group-list-plus 737 "l" gnus-group-list-plus
736 "c" gnus-group-list-plus 738 "c" gnus-group-list-plus
737 "?" gnus-group-list-plus) 739 "?" gnus-group-list-plus
740 "!" gnus-group-list-plus)
738 741
739(gnus-define-keys (gnus-group-score-map "W" gnus-group-mode-map) 742(gnus-define-keys (gnus-group-score-map "W" gnus-group-mode-map)
740 "f" gnus-score-flush-cache 743 "f" gnus-score-flush-cache
@@ -1201,7 +1204,7 @@ The following commands are available:
1201 (if (eq (car method) 'nnimap) 1204 (if (eq (car method) 'nnimap)
1202 ;; IMAP groups should not be encoded, since they do the encoding 1205 ;; IMAP groups should not be encoded, since they do the encoding
1203 ;; in utf7 in the protocol. 1206 ;; in utf7 in the protocol.
1204 nil 1207 'utf-8
1205 (let ((item (or (assoc method gnus-group-name-charset-method-alist) 1208 (let ((item (or (assoc method gnus-group-name-charset-method-alist)
1206 (and (consp method) 1209 (and (consp method)
1207 (assoc (list (car method) (cadr method)) 1210 (assoc (list (car method) (cadr method))
@@ -4069,7 +4072,7 @@ If DONT-SCAN is non-nil, scan non-activated groups as well."
4069 (gnus-group-update-group group nil t)) 4072 (gnus-group-update-group group nil t))
4070 (if (eq (gnus-server-status (gnus-find-method-for-group group)) 4073 (if (eq (gnus-server-status (gnus-find-method-for-group group))
4071 'denied) 4074 'denied)
4072 (gnus-error 3 "Server denied access") 4075 (gnus-error 3 "Server previously determined to be down; not retrying")
4073 (gnus-error 3 "%s error: %s" group (gnus-status-message group))))) 4076 (gnus-error 3 "%s error: %s" group (gnus-status-message group)))))
4074 (when beg 4077 (when beg
4075 (goto-char beg)) 4078 (goto-char beg))
@@ -4636,7 +4639,12 @@ This command may read the active file."
4636 (gnus-group-list-plus args))) 4639 (gnus-group-list-plus args)))
4637 4640
4638(defun gnus-group-list-limit (&optional args) 4641(defun gnus-group-list-limit (&optional args)
4639 "List groups limited within the current selection." 4642 "List groups limited within the current selection.
4643If you've limited the groups, you can further limit the selection
4644with this command. If you've first limited to groups with
4645dormant articles with `A ?', you can then further limit with
4646`A / c', which will then limit to groups with cached articles, giving
4647you the groups that have both dormant articles and cached articles."
4640 (interactive "P") 4648 (interactive "P")
4641 (let ((gnus-group-list-option 'limit)) 4649 (let ((gnus-group-list-option 'limit))
4642 (gnus-group-list-plus args))) 4650 (gnus-group-list-plus args)))
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index b9b191cd09c..2e102634727 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -63,6 +63,13 @@ server denied."
63 (const :tag "Deny server" denied) 63 (const :tag "Deny server" denied)
64 (const :tag "Unplug Agent" offline))) 64 (const :tag "Unplug Agent" offline)))
65 65
66(defcustom gnus-nntp-server nil
67 "The name of the host running the NNTP server."
68 :group 'gnus-server
69 :type '(choice (const :tag "disable" nil)
70 string))
71(make-obsolete-variable 'gnus-nntp-server 'gnus-select-method "24.1")
72
66(defvar gnus-internal-registry-spool-current-method nil 73(defvar gnus-internal-registry-spool-current-method nil
67 "The current method, for the registry.") 74 "The current method, for the registry.")
68 75
@@ -255,7 +262,8 @@ If it is down, start it up (again)."
255 ;; If this method was previously denied, we just return nil. 262 ;; If this method was previously denied, we just return nil.
256 (if (eq (nth 1 elem) 'denied) 263 (if (eq (nth 1 elem) 'denied)
257 (progn 264 (progn
258 (gnus-message 1 "Denied server %s" server) 265 (gnus-message
266 1 "Server %s previously determined to be down; not retrying" server)
259 nil) 267 nil)
260 ;; Open the server. 268 ;; Open the server.
261 (let* ((open-server-function 269 (let* ((open-server-function
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index d60c7165abd..e6a06a0500d 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1225,7 +1225,7 @@ if ARG is 3, decode message and forward as an rfc822 MIME section;
1225if ARG is 4, forward message directly inline; 1225if ARG is 4, forward message directly inline;
1226otherwise, use flipped `message-forward-as-mime'. 1226otherwise, use flipped `message-forward-as-mime'.
1227If POST, post instead of mail. 1227If POST, post instead of mail.
1228For the `inline' alternatives, also see the variable 1228For the \"inline\" alternatives, also see the variable
1229`message-forward-ignored-headers'." 1229`message-forward-ignored-headers'."
1230 (interactive "P") 1230 (interactive "P")
1231 (if (cdr (gnus-summary-work-articles nil)) 1231 (if (cdr (gnus-summary-work-articles nil))
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index 31cb9864ff2..2345c4fc141 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -91,8 +91,10 @@ text properties. This is only needed on XEmacs, as Emacs does this anyway."
91 (header gnus-tmp-from)) 91 (header gnus-tmp-from))
92 92
93(defmacro gnus-lrm-string-p (string) 93(defmacro gnus-lrm-string-p (string)
94 (if (fboundp 'string-mark-left-to-rigth) 94 (if (fboundp 'bidi-string-mark-left-to-right)
95 `(eq (aref ,string (1- (length ,string))) 8206) 95 ;; LRM, RLM, PDF characters as integers to avoid breaking Emacs
96 ;; 23.
97 `(memq (aref ,string (1- (length ,string))) '(8206 8207 8236))
96 nil)) 98 nil))
97 99
98(defvar gnus-lrm-string (if (ignore-errors (string 8206)) 100(defvar gnus-lrm-string (if (ignore-errors (string 8206))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index bb8c719a4fd..8651b583757 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1499,9 +1499,6 @@ the type of the variable (string, integer, character, etc).")
1499(defvar gnus-newsgroup-forwarded nil 1499(defvar gnus-newsgroup-forwarded nil
1500 "List of articles that have been forwarded in the current newsgroup.") 1500 "List of articles that have been forwarded in the current newsgroup.")
1501 1501
1502(defvar gnus-newsgroup-recent nil
1503 "List of articles that have are recent in the current newsgroup.")
1504
1505(defvar gnus-newsgroup-expirable nil 1502(defvar gnus-newsgroup-expirable nil
1506 "Sorted list of articles in the current newsgroup that can be expired.") 1503 "Sorted list of articles in the current newsgroup that can be expired.")
1507 1504
@@ -1578,7 +1575,6 @@ This list will always be a subset of gnus-newsgroup-undownloaded.")
1578 gnus-newsgroup-saved 1575 gnus-newsgroup-saved
1579 gnus-newsgroup-replied 1576 gnus-newsgroup-replied
1580 gnus-newsgroup-forwarded 1577 gnus-newsgroup-forwarded
1581 gnus-newsgroup-recent
1582 gnus-newsgroup-expirable 1578 gnus-newsgroup-expirable
1583 gnus-newsgroup-killed 1579 gnus-newsgroup-killed
1584 gnus-newsgroup-unseen 1580 gnus-newsgroup-unseen
@@ -3743,8 +3739,6 @@ buffer that was in action when the last article was fetched."
3743 gnus-forwarded-mark) 3739 gnus-forwarded-mark)
3744 ((memq gnus-tmp-current gnus-newsgroup-saved) 3740 ((memq gnus-tmp-current gnus-newsgroup-saved)
3745 gnus-saved-mark) 3741 gnus-saved-mark)
3746 ((memq gnus-tmp-number gnus-newsgroup-recent)
3747 gnus-recent-mark)
3748 ((memq gnus-tmp-number gnus-newsgroup-unseen) 3742 ((memq gnus-tmp-number gnus-newsgroup-unseen)
3749 gnus-unseen-mark) 3743 gnus-unseen-mark)
3750 (t gnus-no-mark))) 3744 (t gnus-no-mark)))
@@ -5395,8 +5389,6 @@ or a straight list of headers."
5395 gnus-forwarded-mark) 5389 gnus-forwarded-mark)
5396 ((memq number gnus-newsgroup-saved) 5390 ((memq number gnus-newsgroup-saved)
5397 gnus-saved-mark) 5391 gnus-saved-mark)
5398 ((memq number gnus-newsgroup-recent)
5399 gnus-recent-mark)
5400 ((memq number gnus-newsgroup-unseen) 5392 ((memq number gnus-newsgroup-unseen)
5401 gnus-unseen-mark) 5393 gnus-unseen-mark)
5402 (t gnus-no-mark)) 5394 (t gnus-no-mark))
@@ -5551,7 +5543,7 @@ or a straight list of headers."
5551(defun gnus-fetch-headers (articles &optional limit force-new dependencies) 5543(defun gnus-fetch-headers (articles &optional limit force-new dependencies)
5552 "Fetch headers of ARTICLES." 5544 "Fetch headers of ARTICLES."
5553 (let ((name (gnus-group-decoded-name gnus-newsgroup-name))) 5545 (let ((name (gnus-group-decoded-name gnus-newsgroup-name)))
5554 (gnus-message 5 "Fetching headers for %s..." name) 5546 (gnus-message 7 "Fetching headers for %s..." name)
5555 (prog1 5547 (prog1
5556 (if (eq 'nov 5548 (if (eq 'nov
5557 (setq gnus-headers-retrieved-by 5549 (setq gnus-headers-retrieved-by
@@ -5568,7 +5560,7 @@ or a straight list of headers."
5568 (gnus-get-newsgroup-headers-xover 5560 (gnus-get-newsgroup-headers-xover
5569 articles force-new dependencies gnus-newsgroup-name t) 5561 articles force-new dependencies gnus-newsgroup-name t)
5570 (gnus-get-newsgroup-headers dependencies force-new)) 5562 (gnus-get-newsgroup-headers dependencies force-new))
5571 (gnus-message 5 "Fetching headers for %s...done" name)))) 5563 (gnus-message 7 "Fetching headers for %s...done" name))))
5572 5564
5573(defun gnus-select-newsgroup (group &optional read-all select-articles) 5565(defun gnus-select-newsgroup (group &optional read-all select-articles)
5574 "Select newsgroup GROUP. 5566 "Select newsgroup GROUP.
@@ -5807,8 +5799,6 @@ If SELECT-ARTICLES, only select those articles from GROUP."
5807 (memq article gnus-newsgroup-forwarded)) 5799 (memq article gnus-newsgroup-forwarded))
5808 ((eq type 'seen) 5800 ((eq type 'seen)
5809 (not (memq article gnus-newsgroup-unseen))) 5801 (not (memq article gnus-newsgroup-unseen)))
5810 ((eq type 'recent)
5811 (memq article gnus-newsgroup-recent))
5812 (t t)))) 5802 (t t))))
5813 5803
5814(defun gnus-articles-to-read (group &optional read-all) 5804(defun gnus-articles-to-read (group &optional read-all)
@@ -10985,8 +10975,6 @@ If NO-EXPIRE, auto-expiry will be inhibited."
10985 gnus-forwarded-mark) 10975 gnus-forwarded-mark)
10986 ((memq article gnus-newsgroup-saved) 10976 ((memq article gnus-newsgroup-saved)
10987 gnus-saved-mark) 10977 gnus-saved-mark)
10988 ((memq article gnus-newsgroup-recent)
10989 gnus-recent-mark)
10990 ((memq article gnus-newsgroup-unseen) 10978 ((memq article gnus-newsgroup-unseen)
10991 gnus-unseen-mark) 10979 gnus-unseen-mark)
10992 (t gnus-no-mark)) 10980 (t gnus-no-mark))
@@ -12594,12 +12582,16 @@ UNREAD is a sorted list."
12594 ;; Go through all these summary buffers and offer to save them. 12582 ;; Go through all these summary buffers and offer to save them.
12595 (when buffers 12583 (when buffers
12596 (save-excursion 12584 (save-excursion
12597 (map-y-or-n-p 12585 (if (eq gnus-interactive-exit 'quiet)
12598 "Update summary buffer %s? " 12586 (dolist (buffer buffers)
12599 (lambda (buf) 12587 (switch-to-buffer buffer)
12600 (switch-to-buffer buf) 12588 (gnus-summary-exit))
12601 (gnus-summary-exit)) 12589 (map-y-or-n-p
12602 buffers))))) 12590 "Update summary buffer %s? "
12591 (lambda (buf)
12592 (switch-to-buffer buf)
12593 (gnus-summary-exit))
12594 buffers))))))
12603 12595
12604(defun gnus-summary-setup-default-charset () 12596(defun gnus-summary-setup-default-charset ()
12605 "Setup newsgroup default charset." 12597 "Setup newsgroup default charset."
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 34953611966..e9d6ba423fd 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -471,12 +471,13 @@ Cache the result as a text property stored in DATE."
471 (setq i (* 2 i))) 471 (setq i (* 2 i)))
472 i)) 472 i))
473 473
474(defcustom gnus-verbose 7 474(defcustom gnus-verbose 6
475 "*Integer that says how verbose Gnus should be. 475 "*Integer that says how verbose Gnus should be.
476The higher the number, the more messages Gnus will flash to say what 476The higher the number, the more messages Gnus will flash to say what
477it's doing. At zero, Gnus will be totally mute; at five, Gnus will 477it's doing. At zero, Gnus will be totally mute; at five, Gnus will
478display most important messages; and at ten, Gnus will keep on 478display most important messages; and at ten, Gnus will keep on
479jabbering all the time." 479jabbering all the time."
480 :version "24.1"
480 :group 'gnus-start 481 :group 'gnus-start
481 :type 'integer) 482 :type 'integer)
482 483
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 34759cee06f..924d974eb3c 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -1395,13 +1395,6 @@ non-numeric prefix - `C-u M-x gnus', in short."
1395 :type '(repeat string)) 1395 :type '(repeat string))
1396(make-obsolete-variable 'gnus-secondary-servers 'gnus-select-method "24.1") 1396(make-obsolete-variable 'gnus-secondary-servers 'gnus-select-method "24.1")
1397 1397
1398(defcustom gnus-nntp-server nil
1399 "The name of the host running the NNTP server."
1400 :group 'gnus-server
1401 :type '(choice (const :tag "disable" nil)
1402 string))
1403(make-obsolete-variable 'gnus-nntp-server 'gnus-select-method "24.1")
1404
1405(defcustom gnus-secondary-select-methods nil 1398(defcustom gnus-secondary-select-methods nil
1406 "A list of secondary methods that will be used for reading news. 1399 "A list of secondary methods that will be used for reading news.
1407This is a list where each element is a complete select method (see 1400This is a list where each element is a complete select method (see
@@ -1591,9 +1584,12 @@ commands will still require prompting."
1591 :type 'boolean) 1584 :type 'boolean)
1592 1585
1593(defcustom gnus-interactive-exit t 1586(defcustom gnus-interactive-exit t
1594 "*If non-nil, require your confirmation when exiting Gnus." 1587 "*If non-nil, require your confirmation when exiting Gnus.
1588If `quiet', update any active summary buffers automatically
1589first before exiting."
1595 :group 'gnus-exit 1590 :group 'gnus-exit
1596 :type 'boolean) 1591 :type '(choice boolean
1592 (const quiet)))
1597 1593
1598(defcustom gnus-extract-address-components 'gnus-extract-address-components 1594(defcustom gnus-extract-address-components 'gnus-extract-address-components
1599 "*Function for extracting address components from a From header. 1595 "*Function for extracting address components from a From header.
@@ -2623,7 +2619,7 @@ a string, be sure to use a valid format, see RFC 2616."
2623 (scored . score) (saved . save) 2619 (scored . score) (saved . save)
2624 (cached . cache) (downloadable . download) 2620 (cached . cache) (downloadable . download)
2625 (unsendable . unsend) (forwarded . forward) 2621 (unsendable . unsend) (forwarded . forward)
2626 (recent . recent) (seen . seen))) 2622 (seen . seen)))
2627 2623
2628(defconst gnus-article-special-mark-lists 2624(defconst gnus-article-special-mark-lists
2629 '((seen range) 2625 '((seen range)
@@ -2689,8 +2685,7 @@ such as a mark that says whether an article is stored in the cache
2689 gnus-newsrc-last-checked-date 2685 gnus-newsrc-last-checked-date
2690 gnus-newsrc-alist gnus-server-alist 2686 gnus-newsrc-alist gnus-server-alist
2691 gnus-killed-list gnus-zombie-list 2687 gnus-killed-list gnus-zombie-list
2692 gnus-topic-topology gnus-topic-alist 2688 gnus-topic-topology gnus-topic-alist)
2693 gnus-format-specs)
2694 "Gnus variables saved in the quick startup file.") 2689 "Gnus variables saved in the quick startup file.")
2695 2690
2696(defvar gnus-newsrc-alist nil 2691(defvar gnus-newsrc-alist nil
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 194ebf81873..f78e2b0339d 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -6329,7 +6329,7 @@ between beginning of field and beginning of line."
6329 (progn 6329 (progn
6330 (gnus-select-frame-set-input-focus (window-frame window)) 6330 (gnus-select-frame-set-input-focus (window-frame window))
6331 (select-window window)) 6331 (select-window window))
6332 (funcall (or switch-function 'pop-to-buffer) buffer) 6332 (funcall (or switch-function 'switch-to-buffer) buffer)
6333 (set-buffer buffer)) 6333 (set-buffer buffer))
6334 (when (and (buffer-modified-p) 6334 (when (and (buffer-modified-p)
6335 (not (prog1 6335 (not (prog1
@@ -6337,7 +6337,7 @@ between beginning of field and beginning of line."
6337 "Message already being composed; erase? ") 6337 "Message already being composed; erase? ")
6338 (message nil)))) 6338 (message nil))))
6339 (error "Message being composed"))) 6339 (error "Message being composed")))
6340 (funcall (or switch-function 'pop-to-buffer) name) 6340 (funcall (or switch-function 'switch-to-buffer) name)
6341 (set-buffer name)) 6341 (set-buffer name))
6342 (erase-buffer) 6342 (erase-buffer)
6343 (message-mode))) 6343 (message-mode)))
@@ -7619,12 +7619,8 @@ you."
7619 "Like `message-mail' command, but display mail buffer in another window." 7619 "Like `message-mail' command, but display mail buffer in another window."
7620 (interactive) 7620 (interactive)
7621 (unless (message-mail-user-agent) 7621 (unless (message-mail-user-agent)
7622 (let ((pop-up-windows t) 7622 (message-pop-to-buffer (message-buffer-name "mail" to)
7623 (special-display-buffer-names nil) 7623 'switch-to-buffer-other-window))
7624 (special-display-regexps nil)
7625 (same-window-buffer-names nil)
7626 (same-window-regexps nil))
7627 (message-pop-to-buffer (message-buffer-name "mail" to))))
7628 (let ((message-this-is-mail t)) 7624 (let ((message-this-is-mail t))
7629 (message-setup `((To . ,(or to "")) (Subject . ,(or subject ""))) 7625 (message-setup `((To . ,(or to "")) (Subject . ,(or subject "")))
7630 nil nil nil 'switch-to-buffer-other-window))) 7626 nil nil nil 'switch-to-buffer-other-window)))
@@ -7634,12 +7630,8 @@ you."
7634 "Like `message-mail' command, but display mail buffer in another frame." 7630 "Like `message-mail' command, but display mail buffer in another frame."
7635 (interactive) 7631 (interactive)
7636 (unless (message-mail-user-agent) 7632 (unless (message-mail-user-agent)
7637 (let ((pop-up-frames t) 7633 (message-pop-to-buffer (message-buffer-name "mail" to)
7638 (special-display-buffer-names nil) 7634 'switch-to-buffer-other-frame))
7639 (special-display-regexps nil)
7640 (same-window-buffer-names nil)
7641 (same-window-regexps nil))
7642 (message-pop-to-buffer (message-buffer-name "mail" to))))
7643 (let ((message-this-is-mail t)) 7635 (let ((message-this-is-mail t))
7644 (message-setup `((To . ,(or to "")) (Subject . ,(or subject ""))) 7636 (message-setup `((To . ,(or to "")) (Subject . ,(or subject "")))
7645 nil nil nil 'switch-to-buffer-other-frame))) 7637 nil nil nil 'switch-to-buffer-other-frame)))
@@ -7648,12 +7640,8 @@ you."
7648(defun message-news-other-window (&optional newsgroups subject) 7640(defun message-news-other-window (&optional newsgroups subject)
7649 "Start editing a news article to be sent." 7641 "Start editing a news article to be sent."
7650 (interactive) 7642 (interactive)
7651 (let ((pop-up-windows t) 7643 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)
7652 (special-display-buffer-names nil) 7644 'switch-to-buffer-other-window)
7653 (special-display-regexps nil)
7654 (same-window-buffer-names nil)
7655 (same-window-regexps nil))
7656 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)))
7657 (let ((message-this-is-news t)) 7645 (let ((message-this-is-news t))
7658 (message-setup `((Newsgroups . ,(or newsgroups "")) 7646 (message-setup `((Newsgroups . ,(or newsgroups ""))
7659 (Subject . ,(or subject "")))))) 7647 (Subject . ,(or subject ""))))))
@@ -7662,12 +7650,8 @@ you."
7662(defun message-news-other-frame (&optional newsgroups subject) 7650(defun message-news-other-frame (&optional newsgroups subject)
7663 "Start editing a news article to be sent." 7651 "Start editing a news article to be sent."
7664 (interactive) 7652 (interactive)
7665 (let ((pop-up-frames t) 7653 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)
7666 (special-display-buffer-names nil) 7654 'switch-to-buffer-other-frame)
7667 (special-display-regexps nil)
7668 (same-window-buffer-names nil)
7669 (same-window-regexps nil))
7670 (message-pop-to-buffer (message-buffer-name "posting" nil newsgroups)))
7671 (let ((message-this-is-news t)) 7655 (let ((message-this-is-news t))
7672 (message-setup `((Newsgroups . ,(or newsgroups "")) 7656 (message-setup `((Newsgroups . ,(or newsgroups ""))
7673 (Subject . ,(or subject "")))))) 7657 (Subject . ,(or subject ""))))))
diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el
index 055ba475b8e..0fb0e7a0795 100644
--- a/lisp/gnus/mm-encode.el
+++ b/lisp/gnus/mm-encode.el
@@ -97,6 +97,7 @@ This variable should never be set directly, but bound before a call to
97 (insert "Content-Type: multipart/mixed; boundary=\"" boundary "\"\n") 97 (insert "Content-Type: multipart/mixed; boundary=\"" boundary "\"\n")
98 boundary)) 98 boundary))
99 99
100;;;###autoload
100(defun mm-default-file-encoding (file) 101(defun mm-default-file-encoding (file)
101 "Return a default encoding for FILE." 102 "Return a default encoding for FILE."
102 (if (not (string-match "\\.[^.]+$" file)) 103 (if (not (string-match "\\.[^.]+$" file))
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 8b196fa26fc..e3939188a7b 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -897,6 +897,7 @@ If HANDLES is non-nil, use it instead reparsing the buffer."
897(autoload 'message-encode-message-body "message") 897(autoload 'message-encode-message-body "message")
898(declare-function message-narrow-to-headers-or-head "message" ()) 898(declare-function message-narrow-to-headers-or-head "message" ())
899 899
900;;;###autoload
900(defun mml-to-mime () 901(defun mml-to-mime ()
901 "Translate the current buffer from MML to MIME." 902 "Translate the current buffer from MML to MIME."
902 ;; `message-encode-message-body' will insert an encoded Content-Description 903 ;; `message-encode-message-body' will insert an encoded Content-Description
@@ -1294,6 +1295,7 @@ to specify options."
1294 :version "22.1" ;; Gnus 5.10.9 1295 :version "22.1" ;; Gnus 5.10.9
1295 :group 'message) 1296 :group 'message)
1296 1297
1298;;;###autoload
1297(defun mml-attach-file (file &optional type description disposition) 1299(defun mml-attach-file (file &optional type description disposition)
1298 "Attach a file to the outgoing MIME message. 1300 "Attach a file to the outgoing MIME message.
1299The file is not inserted or encoded until you send the message with 1301The file is not inserted or encoded until you send the message with
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 52c4b3c4290..d26df2395ec 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -168,6 +168,8 @@ textual parts.")
168 nnmail-extra-headers)))) 168 nnmail-extra-headers))))
169 169
170(deffoo nnimap-retrieve-headers (articles &optional group server fetch-old) 170(deffoo nnimap-retrieve-headers (articles &optional group server fetch-old)
171 (when group
172 (setq group (nnimap-decode-gnus-group group)))
171 (with-current-buffer nntp-server-buffer 173 (with-current-buffer nntp-server-buffer
172 (erase-buffer) 174 (erase-buffer)
173 (when (nnimap-possibly-change-group group server) 175 (when (nnimap-possibly-change-group group server)
@@ -190,7 +192,7 @@ textual parts.")
190 (let (article bytes lines size string) 192 (let (article bytes lines size string)
191 (block nil 193 (block nil
192 (while (not (eobp)) 194 (while (not (eobp))
193 (while (not (looking-at "\\* [0-9]+ FETCH.+UID \\([0-9]+\\)")) 195 (while (not (looking-at "\\* [0-9]+ FETCH.+?UID \\([0-9]+\\)"))
194 (delete-region (point) (progn (forward-line 1) (point))) 196 (delete-region (point) (progn (forward-line 1) (point)))
195 (when (eobp) 197 (when (eobp)
196 (return))) 198 (return)))
@@ -523,6 +525,8 @@ textual parts.")
523 nnimap-status-string) 525 nnimap-status-string)
524 526
525(deffoo nnimap-request-article (article &optional group server to-buffer) 527(deffoo nnimap-request-article (article &optional group server to-buffer)
528 (when group
529 (setq group (nnimap-decode-gnus-group group)))
526 (with-current-buffer nntp-server-buffer 530 (with-current-buffer nntp-server-buffer
527 (let ((result (nnimap-possibly-change-group group server)) 531 (let ((result (nnimap-possibly-change-group group server))
528 parts structure) 532 parts structure)
@@ -554,6 +558,8 @@ textual parts.")
554 (cons group article))))))) 558 (cons group article)))))))
555 559
556(deffoo nnimap-request-head (article &optional group server to-buffer) 560(deffoo nnimap-request-head (article &optional group server to-buffer)
561 (when group
562 (setq group (nnimap-decode-gnus-group group)))
557 (when (nnimap-possibly-change-group group server) 563 (when (nnimap-possibly-change-group group server)
558 (with-current-buffer (nnimap-buffer) 564 (with-current-buffer (nnimap-buffer)
559 (when (stringp article) 565 (when (stringp article)
@@ -700,7 +706,11 @@ textual parts.")
700 (incf num))) 706 (incf num)))
701 (nreverse parts))) 707 (nreverse parts)))
702 708
709(defun nnimap-decode-gnus-group (group)
710 (decode-coding-string group 'utf-8))
711
703(deffoo nnimap-request-group (group &optional server dont-check info) 712(deffoo nnimap-request-group (group &optional server dont-check info)
713 (setq group (nnimap-decode-gnus-group group))
704 (let ((result (nnimap-possibly-change-group 714 (let ((result (nnimap-possibly-change-group
705 ;; Don't SELECT the group if we're going to select it 715 ;; Don't SELECT the group if we're going to select it
706 ;; later, anyway. 716 ;; later, anyway.
@@ -750,16 +760,19 @@ textual parts.")
750 t)))) 760 t))))
751 761
752(deffoo nnimap-request-create-group (group &optional server args) 762(deffoo nnimap-request-create-group (group &optional server args)
763 (setq group (nnimap-decode-gnus-group group))
753 (when (nnimap-possibly-change-group nil server) 764 (when (nnimap-possibly-change-group nil server)
754 (with-current-buffer (nnimap-buffer) 765 (with-current-buffer (nnimap-buffer)
755 (car (nnimap-command "CREATE %S" (utf7-encode group t)))))) 766 (car (nnimap-command "CREATE %S" (utf7-encode group t))))))
756 767
757(deffoo nnimap-request-delete-group (group &optional force server) 768(deffoo nnimap-request-delete-group (group &optional force server)
769 (setq group (nnimap-decode-gnus-group group))
758 (when (nnimap-possibly-change-group nil server) 770 (when (nnimap-possibly-change-group nil server)
759 (with-current-buffer (nnimap-buffer) 771 (with-current-buffer (nnimap-buffer)
760 (car (nnimap-command "DELETE %S" (utf7-encode group t)))))) 772 (car (nnimap-command "DELETE %S" (utf7-encode group t))))))
761 773
762(deffoo nnimap-request-rename-group (group new-name &optional server) 774(deffoo nnimap-request-rename-group (group new-name &optional server)
775 (setq group (nnimap-decode-gnus-group group))
763 (when (nnimap-possibly-change-group nil server) 776 (when (nnimap-possibly-change-group nil server)
764 (with-current-buffer (nnimap-buffer) 777 (with-current-buffer (nnimap-buffer)
765 (nnimap-unselect-group) 778 (nnimap-unselect-group)
@@ -774,6 +787,7 @@ textual parts.")
774 (nnimap-command "EXAMINE DOES.NOT.EXIST")) 787 (nnimap-command "EXAMINE DOES.NOT.EXIST"))
775 788
776(deffoo nnimap-request-expunge-group (group &optional server) 789(deffoo nnimap-request-expunge-group (group &optional server)
790 (setq group (nnimap-decode-gnus-group group))
777 (when (nnimap-possibly-change-group group server) 791 (when (nnimap-possibly-change-group group server)
778 (with-current-buffer (nnimap-buffer) 792 (with-current-buffer (nnimap-buffer)
779 (car (nnimap-command "EXPUNGE"))))) 793 (car (nnimap-command "EXPUNGE")))))
@@ -801,6 +815,7 @@ textual parts.")
801 815
802(deffoo nnimap-request-move-article (article group server accept-form 816(deffoo nnimap-request-move-article (article group server accept-form
803 &optional last internal-move-group) 817 &optional last internal-move-group)
818 (setq group (nnimap-decode-gnus-group group))
804 (with-temp-buffer 819 (with-temp-buffer
805 (mm-disable-multibyte) 820 (mm-disable-multibyte)
806 (when (funcall (if internal-move-group 821 (when (funcall (if internal-move-group
@@ -829,6 +844,7 @@ textual parts.")
829 result))))))) 844 result)))))))
830 845
831(deffoo nnimap-request-expire-articles (articles group &optional server force) 846(deffoo nnimap-request-expire-articles (articles group &optional server force)
847 (setq group (nnimap-decode-gnus-group group))
832 (cond 848 (cond
833 ((null articles) 849 ((null articles)
834 nil) 850 nil)
@@ -956,6 +972,8 @@ textual parts.")
956 "delete this article now")))))) 972 "delete this article now"))))))
957 973
958(deffoo nnimap-request-scan (&optional group server) 974(deffoo nnimap-request-scan (&optional group server)
975 (when group
976 (setq group (nnimap-decode-gnus-group group)))
959 (when (and (nnimap-possibly-change-group nil server) 977 (when (and (nnimap-possibly-change-group nil server)
960 nnimap-inbox 978 nnimap-inbox
961 nnimap-split-methods) 979 nnimap-split-methods)
@@ -971,6 +989,7 @@ textual parts.")
971 flags)) 989 flags))
972 990
973(deffoo nnimap-request-update-group-status (group status &optional server) 991(deffoo nnimap-request-update-group-status (group status &optional server)
992 (setq group (nnimap-decode-gnus-group group))
974 (when (nnimap-possibly-change-group nil server) 993 (when (nnimap-possibly-change-group nil server)
975 (let ((command (assoc 994 (let ((command (assoc
976 status 995 status
@@ -981,6 +1000,7 @@ textual parts.")
981 (nnimap-command "%s %S" (cadr command) (utf7-encode group t))))))) 1000 (nnimap-command "%s %S" (cadr command) (utf7-encode group t)))))))
982 1001
983(deffoo nnimap-request-set-mark (group actions &optional server) 1002(deffoo nnimap-request-set-mark (group actions &optional server)
1003 (setq group (nnimap-decode-gnus-group group))
984 (when (nnimap-possibly-change-group group server) 1004 (when (nnimap-possibly-change-group group server)
985 (let (sequence) 1005 (let (sequence)
986 (with-current-buffer (nnimap-buffer) 1006 (with-current-buffer (nnimap-buffer)
@@ -1005,6 +1025,7 @@ textual parts.")
1005 (nnimap-wait-for-response sequence)))))) 1025 (nnimap-wait-for-response sequence))))))
1006 1026
1007(deffoo nnimap-request-accept-article (group &optional server last) 1027(deffoo nnimap-request-accept-article (group &optional server last)
1028 (setq group (nnimap-decode-gnus-group group))
1008 (when (nnimap-possibly-change-group nil server) 1029 (when (nnimap-possibly-change-group nil server)
1009 (nnmail-check-syntax) 1030 (nnmail-check-syntax)
1010 (let ((message-id (message-field-value "message-id")) 1031 (let ((message-id (message-field-value "message-id"))
@@ -1081,6 +1102,7 @@ textual parts.")
1081 result)) 1102 result))
1082 1103
1083(deffoo nnimap-request-replace-article (article group buffer) 1104(deffoo nnimap-request-replace-article (article group buffer)
1105 (setq group (nnimap-decode-gnus-group group))
1084 (let (group-art) 1106 (let (group-art)
1085 (when (and (nnimap-possibly-change-group group nil) 1107 (when (and (nnimap-possibly-change-group group nil)
1086 ;; Put the article into the group. 1108 ;; Put the article into the group.
@@ -1186,7 +1208,8 @@ textual parts.")
1186 ;; what and how to request the data. 1208 ;; what and how to request the data.
1187 (dolist (info infos) 1209 (dolist (info infos)
1188 (setq params (gnus-info-params info) 1210 (setq params (gnus-info-params info)
1189 group (gnus-group-real-name (gnus-info-group info)) 1211 group (nnimap-decode-gnus-group
1212 (gnus-group-real-name (gnus-info-group info)))
1190 active (cdr (assq 'active params)) 1213 active (cdr (assq 'active params))
1191 uidvalidity (cdr (assq 'uidvalidity params)) 1214 uidvalidity (cdr (assq 'uidvalidity params))
1192 modseq (cdr (assq 'modseq params))) 1215 modseq (cdr (assq 'modseq params)))
@@ -1262,13 +1285,15 @@ textual parts.")
1262 (active (gnus-active group))) 1285 (active (gnus-active group)))
1263 (when active 1286 (when active
1264 (insert (format "%S %d %d y\n" 1287 (insert (format "%S %d %d y\n"
1265 (gnus-group-real-name group) 1288 (decode-coding-string
1289 (gnus-group-real-name group) 'utf-8)
1266 (cdr active) 1290 (cdr active)
1267 (car active))))))))))) 1291 (car active)))))))))))
1268 1292
1269(defun nnimap-update-infos (flags infos) 1293(defun nnimap-update-infos (flags infos)
1270 (dolist (info infos) 1294 (dolist (info infos)
1271 (let* ((group (gnus-group-real-name (gnus-info-group info))) 1295 (let* ((group (nnimap-decode-gnus-group
1296 (gnus-group-real-name (gnus-info-group info))))
1272 (marks (cdr (assoc group flags)))) 1297 (marks (cdr (assoc group flags))))
1273 (when marks 1298 (when marks
1274 (nnimap-update-info info marks))))) 1299 (nnimap-update-info info marks)))))
@@ -1570,6 +1595,8 @@ textual parts.")
1570 (articles &optional limit force-new dependencies)) 1595 (articles &optional limit force-new dependencies))
1571 1596
1572(deffoo nnimap-request-thread (header &optional group server) 1597(deffoo nnimap-request-thread (header &optional group server)
1598 (when group
1599 (setq group (nnimap-decode-gnus-group group)))
1573 (if gnus-refer-thread-use-nnir 1600 (if gnus-refer-thread-use-nnir
1574 (nnir-search-thread header) 1601 (nnir-search-thread header)
1575 (when (nnimap-possibly-change-group group server) 1602 (when (nnimap-possibly-change-group group server)
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el
index b12700fac64..3e3b7326f29 100644
--- a/lisp/gnus/nnrss.el
+++ b/lisp/gnus/nnrss.el
@@ -363,12 +363,13 @@ for decoding when the cdr that the data specify is not available.")
363 363
364(deffoo nnrss-retrieve-groups (groups &optional server) 364(deffoo nnrss-retrieve-groups (groups &optional server)
365 (dolist (group groups) 365 (dolist (group groups)
366 (setq group (nnrss-decode-group-name group))
366 (nnrss-possibly-change-group group server) 367 (nnrss-possibly-change-group group server)
367 (nnrss-check-group group server)) 368 (nnrss-check-group group server))
368 (with-current-buffer nntp-server-buffer 369 (with-current-buffer nntp-server-buffer
369 (erase-buffer) 370 (erase-buffer)
370 (dolist (group groups) 371 (dolist (group groups)
371 (let ((elem (assoc group nnrss-server-data))) 372 (let ((elem (assoc (gnus-group-decoded-name group) nnrss-server-data)))
372 (insert (format "%S %s 1 y\n" group (or (cadr elem) 0))))) 373 (insert (format "%S %s 1 y\n" group (or (cadr elem) 0)))))
373 'active)) 374 'active))
374 375
diff --git a/lisp/gnus/plstore.el b/lisp/gnus/plstore.el
index 5f9a61aa843..ab78e508480 100644
--- a/lisp/gnus/plstore.el
+++ b/lisp/gnus/plstore.el
@@ -135,38 +135,38 @@ May either be a string or a list of strings.")
135 (message "%s...%d%%" handback 135 (message "%s...%d%%" handback
136 (if (> total 0) (floor (* (/ current (float total)) 100)) 0)))) 136 (if (> total 0) (floor (* (/ current (float total)) 100)) 0))))
137 137
138(defun plstore--get-buffer (this) 138(defun plstore--get-buffer (arg)
139 (aref this 0)) 139 (aref arg 0))
140 140
141(defun plstore--get-alist (this) 141(defun plstore--get-alist (arg)
142 (aref this 1)) 142 (aref arg 1))
143 143
144(defun plstore--get-encrypted-data (this) 144(defun plstore--get-encrypted-data (arg)
145 (aref this 2)) 145 (aref arg 2))
146 146
147(defun plstore--get-secret-alist (this) 147(defun plstore--get-secret-alist (arg)
148 (aref this 3)) 148 (aref arg 3))
149 149
150(defun plstore--get-merged-alist (this) 150(defun plstore--get-merged-alist (arg)
151 (aref this 4)) 151 (aref arg 4))
152 152
153(defun plstore--set-buffer (this buffer) 153(defun plstore--set-buffer (arg buffer)
154 (aset this 0 buffer)) 154 (aset arg 0 buffer))
155 155
156(defun plstore--set-alist (this plist) 156(defun plstore--set-alist (arg plist)
157 (aset this 1 plist)) 157 (aset arg 1 plist))
158 158
159(defun plstore--set-encrypted-data (this encrypted-data) 159(defun plstore--set-encrypted-data (arg encrypted-data)
160 (aset this 2 encrypted-data)) 160 (aset arg 2 encrypted-data))
161 161
162(defun plstore--set-secret-alist (this secret-alist) 162(defun plstore--set-secret-alist (arg secret-alist)
163 (aset this 3 secret-alist)) 163 (aset arg 3 secret-alist))
164 164
165(defun plstore--set-merged-alist (this merged-alist) 165(defun plstore--set-merged-alist (arg merged-alist)
166 (aset this 4 merged-alist)) 166 (aset arg 4 merged-alist))
167 167
168(defun plstore-get-file (this) 168(defun plstore-get-file (arg)
169 (buffer-file-name (plstore--get-buffer this))) 169 (buffer-file-name (plstore--get-buffer arg)))
170 170
171(defun plstore--make (&optional buffer alist encrypted-data secret-alist 171(defun plstore--make (&optional buffer alist encrypted-data secret-alist
172 merged-alist) 172 merged-alist)
diff --git a/lisp/help.el b/lisp/help.el
index 3ed6f79275a..ca8f76515cf 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -527,7 +527,7 @@ If INSERT (the prefix arg) is non-nil, insert the message in the buffer."
527 (unless definition (error "No command")) 527 (unless definition (error "No command"))
528 (let ((func (indirect-function definition)) 528 (let ((func (indirect-function definition))
529 (defs nil) 529 (defs nil)
530 (standard-output (if insert (current-buffer) t))) 530 (standard-output (if insert (current-buffer) standard-output)))
531 ;; In DEFS, find all symbols that are aliases for DEFINITION. 531 ;; In DEFS, find all symbols that are aliases for DEFINITION.
532 (mapatoms (lambda (symbol) 532 (mapatoms (lambda (symbol)
533 (and (fboundp symbol) 533 (and (fboundp symbol)
@@ -625,7 +625,7 @@ temporarily enables it to allow getting help on disabled items and buttons."
625 (aref key 1) 625 (aref key 1)
626 (aref key 0))) 626 (aref key 0)))
627 (modifiers (event-modifiers event)) 627 (modifiers (event-modifiers event))
628 (standard-output (if insert (current-buffer) t)) 628 (standard-output (if insert (current-buffer) standard-output))
629 (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers) 629 (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers)
630 (memq 'drag modifiers)) " at that spot" "")) 630 (memq 'drag modifiers)) " at that spot" ""))
631 (defn (key-binding key t)) 631 (defn (key-binding key t))
diff --git a/lisp/ielm.el b/lisp/ielm.el
index 4397ea0b413..94bb299eaac 100644
--- a/lisp/ielm.el
+++ b/lisp/ielm.el
@@ -553,8 +553,6 @@ Customized bindings may be defined in `ielm-map', which currently contains:
553 553
554;;; User command 554;;; User command
555 555
556;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*ielm*"))
557
558;;;###autoload 556;;;###autoload
559(defun ielm nil 557(defun ielm nil
560 "Interactively evaluate Emacs Lisp expressions. 558 "Interactively evaluate Emacs Lisp expressions.
@@ -565,7 +563,7 @@ Switches to the buffer `*ielm*', or creates it if it does not exist."
565 (with-current-buffer (get-buffer-create "*ielm*") 563 (with-current-buffer (get-buffer-create "*ielm*")
566 (unless (zerop (buffer-size)) (setq old-point (point))) 564 (unless (zerop (buffer-size)) (setq old-point (point)))
567 (inferior-emacs-lisp-mode))) 565 (inferior-emacs-lisp-mode)))
568 (pop-to-buffer "*ielm*") 566 (switch-to-buffer "*ielm*")
569 (when old-point (push-mark old-point)))) 567 (when old-point (push-mark old-point))))
570 568
571(provide 'ielm) 569(provide 'ielm)
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index f75f4e20219..cffa2592aa1 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -163,7 +163,7 @@ Stop if the left edge of the image is reached."
163 (interactive "p") 163 (interactive "p")
164 (image-forward-hscroll (- n))) 164 (image-forward-hscroll (- n)))
165 165
166(defun image-next-line (&optional n) 166(defun image-next-line (n)
167 "Scroll image in current window upward by N lines. 167 "Scroll image in current window upward by N lines.
168Stop if the bottom edge of the image is reached." 168Stop if the bottom edge of the image is reached."
169 (interactive "p") 169 (interactive "p")
diff --git a/lisp/info.el b/lisp/info.el
index 191e75f9750..40959885edb 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -610,10 +610,7 @@ in `Info-file-supports-index-cookies-list'."
610 "Like `info' but show the Info buffer in another window." 610 "Like `info' but show the Info buffer in another window."
611 (interactive (if current-prefix-arg 611 (interactive (if current-prefix-arg
612 (list (read-file-name "Info file name: " nil nil t)))) 612 (list (read-file-name "Info file name: " nil nil t))))
613 (let (same-window-buffer-names same-window-regexps) 613 (info-setup file-or-node (switch-to-buffer-other-window "*info*")))
614 (info file-or-node)))
615
616;;;###autoload (add-hook 'same-window-regexps (purecopy "\\*info\\*\\(\\|<[0-9]+>\\)"))
617 614
618;;;###autoload (put 'info 'info-file (purecopy "emacs")) 615;;;###autoload (put 'info 'info-file (purecopy "emacs"))
619;;;###autoload 616;;;###autoload
@@ -643,7 +640,10 @@ See a list of available Info commands in `Info-mode'."
643 (read-file-name "Info file name: " nil nil t)) 640 (read-file-name "Info file name: " nil nil t))
644 (if (numberp current-prefix-arg) 641 (if (numberp current-prefix-arg)
645 (format "*info*<%s>" current-prefix-arg)))) 642 (format "*info*<%s>" current-prefix-arg))))
646 (pop-to-buffer (or buffer "*info*")) 643 (info-setup file-or-node (switch-to-buffer (or buffer "*info*"))))
644
645(defun info-setup (file-or-node buffer)
646 "Display Info node FILE-OR-NODE in BUFFER."
647 (if (and buffer (not (eq major-mode 'Info-mode))) 647 (if (and buffer (not (eq major-mode 'Info-mode)))
648 (Info-mode)) 648 (Info-mode))
649 (if file-or-node 649 (if file-or-node
@@ -775,7 +775,7 @@ it says do not attempt further (recursive) error recovery."
775 (info-initialize) 775 (info-initialize)
776 (setq filename (Info-find-file filename)) 776 (setq filename (Info-find-file filename))
777 ;; Go into Info buffer. 777 ;; Go into Info buffer.
778 (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) 778 (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*"))
779 ;; Record the node we are leaving, if we were in one. 779 ;; Record the node we are leaving, if we were in one.
780 (and (not no-going-back) 780 (and (not no-going-back)
781 Info-current-file 781 Info-current-file
@@ -809,7 +809,7 @@ otherwise, that defaults to `Top'."
809 "Go to an Info node FILENAME and NODENAME, re-reading disk contents. 809 "Go to an Info node FILENAME and NODENAME, re-reading disk contents.
810When *info* is already displaying FILENAME and NODENAME, the window position 810When *info* is already displaying FILENAME and NODENAME, the window position
811is preserved, if possible." 811is preserved, if possible."
812 (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) 812 (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*"))
813 (let ((old-filename Info-current-file) 813 (let ((old-filename Info-current-file)
814 (old-nodename Info-current-node) 814 (old-nodename Info-current-node)
815 (old-buffer-name (buffer-name)) 815 (old-buffer-name (buffer-name))
@@ -821,7 +821,7 @@ is preserved, if possible."
821 (new-history (and Info-current-file 821 (new-history (and Info-current-file
822 (list Info-current-file Info-current-node (point))))) 822 (list Info-current-file Info-current-node (point)))))
823 (kill-buffer (current-buffer)) 823 (kill-buffer (current-buffer))
824 (pop-to-buffer (or old-buffer-name "*info*")) 824 (switch-to-buffer (or old-buffer-name "*info*"))
825 (Info-mode) 825 (Info-mode)
826 (Info-find-node filename nodename) 826 (Info-find-node filename nodename)
827 (setq Info-history-forward old-history-forward) 827 (setq Info-history-forward old-history-forward)
@@ -2021,7 +2021,7 @@ End of submatch 0, 1, and 3 are the same, so you can safely concat."
2021 (interactive) 2021 (interactive)
2022 ;; In case another window is currently selected 2022 ;; In case another window is currently selected
2023 (save-window-excursion 2023 (save-window-excursion
2024 (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) 2024 (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*"))
2025 (Info-goto-node (Info-extract-pointer "next")))) 2025 (Info-goto-node (Info-extract-pointer "next"))))
2026 2026
2027(defun Info-prev () 2027(defun Info-prev ()
@@ -2029,7 +2029,7 @@ End of submatch 0, 1, and 3 are the same, so you can safely concat."
2029 (interactive) 2029 (interactive)
2030 ;; In case another window is currently selected 2030 ;; In case another window is currently selected
2031 (save-window-excursion 2031 (save-window-excursion
2032 (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) 2032 (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*"))
2033 (Info-goto-node (Info-extract-pointer "prev[ious]*" "previous")))) 2033 (Info-goto-node (Info-extract-pointer "prev[ious]*" "previous"))))
2034 2034
2035(defun Info-up (&optional same-file) 2035(defun Info-up (&optional same-file)
@@ -2038,7 +2038,7 @@ If SAME-FILE is non-nil, do not move to a different Info file."
2038 (interactive) 2038 (interactive)
2039 ;; In case another window is currently selected 2039 ;; In case another window is currently selected
2040 (save-window-excursion 2040 (save-window-excursion
2041 (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*")) 2041 (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*"))
2042 (let ((old-node Info-current-node) 2042 (let ((old-node Info-current-node)
2043 (old-file Info-current-file) 2043 (old-file Info-current-file)
2044 (node (Info-extract-pointer "up")) p) 2044 (node (Info-extract-pointer "up")) p)
@@ -4775,7 +4775,7 @@ The INDENT level is ignored."
4775 (select-window bwin) 4775 (select-window bwin)
4776 (raise-frame (window-frame bwin))) 4776 (raise-frame (window-frame bwin)))
4777 (if speedbar-power-click 4777 (if speedbar-power-click
4778 (let ((pop-up-frames t)) (select-window (display-buffer buff))) 4778 (switch-to-buffer-other-frame buff)
4779 (speedbar-select-attached-frame) 4779 (speedbar-select-attached-frame)
4780 (switch-to-buffer buff))) 4780 (switch-to-buffer buff)))
4781 (if (not (string-match "^(\\([^)]+\\))\\([^.]+\\)$" node)) 4781 (if (not (string-match "^(\\([^)]+\\))\\([^.]+\\)$" node))
@@ -4954,7 +4954,7 @@ type returned by `Info-bookmark-make-record', which see."
4954 (setq found buffer 4954 (setq found buffer
4955 blist nil)))) 4955 blist nil))))
4956 (if found 4956 (if found
4957 (pop-to-buffer found) 4957 (switch-to-buffer found)
4958 (info-initialize) 4958 (info-initialize)
4959 (info (Info-find-file manual))))) 4959 (info (Info-find-file manual)))))
4960 4960
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 128fb86b7b4..3276447e72f 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2914,10 +2914,6 @@ on encoding."
2914 (setq c (1+ c)))) 2914 (setq c (1+ c))))
2915 (setq ucs-names names)))) 2915 (setq ucs-names names))))
2916 2916
2917(defvar ucs-completions (lazy-completion-table ucs-completions ucs-names)
2918 "Lazy completion table for completing on Unicode character names.")
2919(put 'ucs-completions 'risky-local-variable t)
2920
2921(defun read-char-by-name (prompt) 2917(defun read-char-by-name (prompt)
2922 "Read a character by its Unicode name or hex number string. 2918 "Read a character by its Unicode name or hex number string.
2923Display PROMPT and read a string that represents a character by its 2919Display PROMPT and read a string that represents a character by its
@@ -2935,7 +2931,12 @@ This function also accepts a hexadecimal number of Unicode code
2935point or a number in hash notation, e.g. #o21430 for octal, 2931point or a number in hash notation, e.g. #o21430 for octal,
2936#x2318 for hex, or #10r8984 for decimal." 2932#x2318 for hex, or #10r8984 for decimal."
2937 (let* ((completion-ignore-case t) 2933 (let* ((completion-ignore-case t)
2938 (input (completing-read prompt ucs-completions))) 2934 (input (completing-read
2935 prompt
2936 (lambda (string pred action)
2937 (if (eq action 'metadata)
2938 '(metadata (category . unicode-name))
2939 (complete-with-action action (ucs-names) string pred))))))
2939 (cond 2940 (cond
2940 ((string-match-p "^[0-9a-fA-F]+$" input) 2941 ((string-match-p "^[0-9a-fA-F]+$" input)
2941 (string-to-number input 16)) 2942 (string-to-number input 16))
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 7f54067f9aa..00ed9b4aed2 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1087,9 +1087,7 @@ The following additional command keys are active while editing.
1087\\[isearch-nonincremental-exit-minibuffer] to do one nonincremental search. 1087\\[isearch-nonincremental-exit-minibuffer] to do one nonincremental search.
1088\\[isearch-forward-exit-minibuffer] to resume isearching forward. 1088\\[isearch-forward-exit-minibuffer] to resume isearching forward.
1089\\[isearch-reverse-exit-minibuffer] to resume isearching backward. 1089\\[isearch-reverse-exit-minibuffer] to resume isearching backward.
1090\\[isearch-complete-edit] to complete the search string using the search ring. 1090\\[isearch-complete-edit] to complete the search string using the search ring."
1091\\<isearch-mode-map>
1092If first char entered is \\[isearch-yank-word-or-char], then do word search instead."
1093 1091
1094 ;; This code is very hairy for several reasons, explained in the code. 1092 ;; This code is very hairy for several reasons, explained in the code.
1095 ;; Mainly, isearch-mode must be terminated while editing and then restarted. 1093 ;; Mainly, isearch-mode must be terminated while editing and then restarted.
@@ -1381,8 +1379,8 @@ Use `isearch-exit' to quit without signaling."
1381 "Start `query-replace' with string to replace from last search string. 1379 "Start `query-replace' with string to replace from last search string.
1382The arg DELIMITED (prefix arg if interactive), if non-nil, means replace 1380The arg DELIMITED (prefix arg if interactive), if non-nil, means replace
1383only matches surrounded by word boundaries. Note that using the prefix arg 1381only matches surrounded by word boundaries. Note that using the prefix arg
1384is possible only when `isearch-allow-scroll' is non-nil, and it don't 1382is possible only when `isearch-allow-scroll' is non-nil, and it doesn't
1385always provides the correct matches for `query-replace', so the preferred 1383always provide the correct matches for `query-replace', so the preferred
1386way to run word replacements from Isearch is `M-s w ... M-%'." 1384way to run word replacements from Isearch is `M-s w ... M-%'."
1387 (interactive 1385 (interactive
1388 (list current-prefix-arg)) 1386 (list current-prefix-arg))
diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el
index 45700d4d60d..6c5448aca83 100644
--- a/lisp/mail/reporter.el
+++ b/lisp/mail/reporter.el
@@ -332,12 +332,11 @@ mail-sending package is used for editing and sending the message."
332 hookvar) 332 hookvar)
333 ;; do the work 333 ;; do the work
334 (require 'sendmail) 334 (require 'sendmail)
335 ;; Just in case the original buffer is not visible now, bring it
336 ;; back somewhere
337 (display-buffer reporter-eval-buffer)
335 ;; If mailbuf did not get made visible before, make it visible now. 338 ;; If mailbuf did not get made visible before, make it visible now.
336 (let (same-window-buffer-names same-window-regexps) 339 (pop-to-buffer mailbuf)
337 (pop-to-buffer mailbuf)
338 ;; Just in case the original buffer is not visible now, bring it
339 ;; back somewhere
340 (and pop-up-windows (display-buffer reporter-eval-buffer)))
341 (goto-char (point-min)) 340 (goto-char (point-min))
342 (mail-position-on-field "to") 341 (mail-position-on-field "to")
343 (insert address) 342 (insert address)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index ac07f07a76b..db06de9be76 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -91,6 +91,7 @@ its character representation and its display representation.")
91(defvar messages-head) 91(defvar messages-head)
92(defvar total-messages) 92(defvar total-messages)
93(defvar tool-bar-map) 93(defvar tool-bar-map)
94(defvar mail-encode-mml)
94 95
95(defvar rmail-header-style 'normal 96(defvar rmail-header-style 'normal
96 "The current header display style choice, one of 97 "The current header display style choice, one of
@@ -642,7 +643,7 @@ unless the feature specified by `rmail-mime-feature' is available."
642 :version "23.3" 643 :version "23.3"
643 :group 'rmail) 644 :group 'rmail)
644 645
645(defvar rmail-enable-mime-composing nil 646(defvar rmail-enable-mime-composing t
646 "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.") 647 "*If non-nil, RMAIL uses `rmail-insert-mime-forwarded-message-function' to forward.")
647 648
648;; FIXME unused. 649;; FIXME unused.
@@ -3794,9 +3795,17 @@ see the documentation of `rmail-resend'."
3794 ;; Insert after header separator--before signature if any. 3795 ;; Insert after header separator--before signature if any.
3795 (rfc822-goto-eoh) 3796 (rfc822-goto-eoh)
3796 (forward-line 1) 3797 (forward-line 1)
3797 (if (or rmail-enable-mime rmail-enable-mime-composing) 3798 (if (and rmail-enable-mime rmail-enable-mime-composing)
3798 (funcall rmail-insert-mime-forwarded-message-function 3799 (prog1
3799 forward-buffer) 3800 (funcall rmail-insert-mime-forwarded-message-function
3801 forward-buffer)
3802 ;; rmail-insert-mime-forwarded-message-function
3803 ;; works by inserting MML tags into forward-buffer.
3804 ;; The MUA will need to convert it to MIME before
3805 ;; sending. mail-encode-mml tells them to do that.
3806 ;; message.el does that automagically.
3807 (or (eq mail-user-agent 'message-user-agent)
3808 (setq mail-encode-mml t)))
3800 (insert "------- Start of forwarded message -------\n") 3809 (insert "------- Start of forwarded message -------\n")
3801 ;; Quote lines with `- ' if they start with `-'. 3810 ;; Quote lines with `- ' if they start with `-'.
3802 (let ((beg (point)) end) 3811 (let ((beg (point)) end)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index cb02a4b374d..6bcf65945b5 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -307,6 +307,9 @@ The default value matches citations like `foo-bar>' plus whitespace."
307 (define-key map [menu-bar mail] 307 (define-key map [menu-bar mail]
308 (cons "Mail" (make-sparse-keymap "Mail"))) 308 (cons "Mail" (make-sparse-keymap "Mail")))
309 309
310 (define-key map [menu-bar mail attachment]
311 '("Attach File" . mail-add-attachment))
312
310 (define-key map [menu-bar mail fill] 313 (define-key map [menu-bar mail fill]
311 '("Fill Citation" . mail-fill-yanked-message)) 314 '("Fill Citation" . mail-fill-yanked-message))
312 315
@@ -562,11 +565,7 @@ To change your decision later, customize `send-mail-function'.\n")
562 send-actions return-action 565 send-actions return-action
563 &rest ignored) 566 &rest ignored)
564 (if switch-function 567 (if switch-function
565 (let ((special-display-buffer-names nil) 568 (funcall switch-function "*mail*"))
566 (special-display-regexps nil)
567 (same-window-buffer-names nil)
568 (same-window-regexps nil))
569 (funcall switch-function "*mail*")))
570 (let ((cc (cdr (assoc-string "cc" other-headers t))) 569 (let ((cc (cdr (assoc-string "cc" other-headers t)))
571 (in-reply-to (cdr (assoc-string "in-reply-to" other-headers t))) 570 (in-reply-to (cdr (assoc-string "in-reply-to" other-headers t)))
572 (body (cdr (assoc-string "body" other-headers t)))) 571 (body (cdr (assoc-string "body" other-headers t))))
@@ -678,6 +677,7 @@ switching to, the `*mail*' buffer. See also `mail-setup-hook'."
678 :options '(footnote-mode)) 677 :options '(footnote-mode))
679 678
680(defvar mail-mode-abbrev-table text-mode-abbrev-table) 679(defvar mail-mode-abbrev-table text-mode-abbrev-table)
680(defvar mail-encode-mml)
681;;;###autoload 681;;;###autoload
682(define-derived-mode mail-mode text-mode "Mail" 682(define-derived-mode mail-mode text-mode "Mail"
683 "Major mode for editing mail to be sent. 683 "Major mode for editing mail to be sent.
@@ -696,11 +696,15 @@ Here are commands that move to a header field (and create it if there isn't):
696\\[mail-signature] mail-signature (insert `mail-signature-file' file). 696\\[mail-signature] mail-signature (insert `mail-signature-file' file).
697\\[mail-yank-original] mail-yank-original (insert current message, in Rmail). 697\\[mail-yank-original] mail-yank-original (insert current message, in Rmail).
698\\[mail-fill-yanked-message] mail-fill-yanked-message (fill what was yanked). 698\\[mail-fill-yanked-message] mail-fill-yanked-message (fill what was yanked).
699\\[mail-insert-file] insert a text file into the message.
700\\[mail-add-attachment] attach to the message a file as binary attachment.
699Turning on Mail mode runs the normal hooks `text-mode-hook' and 701Turning on Mail mode runs the normal hooks `text-mode-hook' and
700`mail-mode-hook' (in that order)." 702`mail-mode-hook' (in that order)."
701 (make-local-variable 'mail-reply-action) 703 (make-local-variable 'mail-reply-action)
702 (make-local-variable 'mail-send-actions) 704 (make-local-variable 'mail-send-actions)
703 (make-local-variable 'mail-return-action) 705 (make-local-variable 'mail-return-action)
706 (make-local-variable 'mail-encode-mml)
707 (setq mail-encode-mml nil)
704 (setq buffer-offer-save t) 708 (setq buffer-offer-save t)
705 (make-local-variable 'font-lock-defaults) 709 (make-local-variable 'font-lock-defaults)
706 (setq font-lock-defaults '(mail-font-lock-keywords t t)) 710 (setq font-lock-defaults '(mail-font-lock-keywords t t))
@@ -862,6 +866,7 @@ header when sending a message to a mailing list."
862 :type '(repeat string) 866 :type '(repeat string)
863 :group 'sendmail) 867 :group 'sendmail)
864 868
869(declare-function mml-to-mime "mml" ())
865 870
866(defun mail-send () 871(defun mail-send ()
867 "Send the message in the current buffer. 872 "Send the message in the current buffer.
@@ -934,6 +939,9 @@ the user from the mailer."
934 (error "Invalid header line (maybe a continuation line lacks initial whitespace)")) 939 (error "Invalid header line (maybe a continuation line lacks initial whitespace)"))
935 (forward-line 1))) 940 (forward-line 1)))
936 (goto-char opoint) 941 (goto-char opoint)
942 (when mail-encode-mml
943 (mml-to-mime)
944 (setq mail-encode-mml nil))
937 (run-hooks 'mail-send-hook) 945 (run-hooks 'mail-send-hook)
938 (message "Sending...") 946 (message "Sending...")
939 (funcall send-mail-function) 947 (funcall send-mail-function)
@@ -1688,7 +1696,7 @@ If the current line has `mail-yank-prefix', insert it on the new line."
1688 (split-line mail-yank-prefix)) 1696 (split-line mail-yank-prefix))
1689 1697
1690 1698
1691(defun mail-attach-file (&optional file) 1699(defun mail-insert-file (&optional file)
1692 "Insert a file at the end of the buffer, with separator lines around it." 1700 "Insert a file at the end of the buffer, with separator lines around it."
1693 (interactive "fAttach file: ") 1701 (interactive "fAttach file: ")
1694 (save-excursion 1702 (save-excursion
@@ -1707,13 +1715,25 @@ If the current line has `mail-yank-prefix', insert it on the new line."
1707 (insert-file-contents file) 1715 (insert-file-contents file)
1708 (or (bolp) (newline)) 1716 (or (bolp) (newline))
1709 (goto-char start)))) 1717 (goto-char start))))
1718
1719(define-obsolete-function-alias 'mail-attach-file 'mail-insert-file "24.1")
1720
1721(declare-function mml-attach-file "mml"
1722 (file &optional type description disposition))
1723(declare-function mm-default-file-encoding "mm-encode" (file))
1724
1725(defun mail-add-attachment (file)
1726 "Add FILE as a MIME attachment to the end of the mail message being composed."
1727 (interactive "fAttach file: ")
1728 (mml-attach-file file
1729 (or (mm-default-file-encoding file)
1730 "application/octet-stream") nil)
1731 (setq mail-encode-mml t))
1732
1710 1733
1711;; Put these commands last, to reduce chance of lossage from quitting 1734;; Put these commands last, to reduce chance of lossage from quitting
1712;; in middle of loading the file. 1735;; in middle of loading the file.
1713 1736
1714;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*mail*"))
1715;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*unsent mail*"))
1716
1717;;;###autoload 1737;;;###autoload
1718(defun mail (&optional noerase to subject in-reply-to cc replybuffer 1738(defun mail (&optional noerase to subject in-reply-to cc replybuffer
1719 actions return-action) 1739 actions return-action)
@@ -1765,11 +1785,11 @@ The seventh argument ACTIONS is a list of actions to take
1765 This is how Rmail arranges to mark messages `answered'." 1785 This is how Rmail arranges to mark messages `answered'."
1766 (interactive "P") 1786 (interactive "P")
1767 (if (eq noerase 'new) 1787 (if (eq noerase 'new)
1768 (pop-to-buffer (generate-new-buffer "*mail*")) 1788 (switch-to-buffer (generate-new-buffer "*mail*"))
1769 (and noerase 1789 (and noerase
1770 (not (get-buffer "*mail*")) 1790 (not (get-buffer "*mail*"))
1771 (setq noerase nil)) 1791 (setq noerase nil))
1772 (pop-to-buffer "*mail*")) 1792 (switch-to-buffer "*mail*"))
1773 1793
1774 ;; Avoid danger that the auto-save file can't be written. 1794 ;; Avoid danger that the auto-save file can't be written.
1775 (let ((dir (expand-file-name 1795 (let ((dir (expand-file-name
@@ -1919,7 +1939,7 @@ you can move to one of them and type C-c C-c to recover that one."
1919 (dired-noselect file-name 1939 (dired-noselect file-name
1920 (concat dired-listing-switches " -t")))) 1940 (concat dired-listing-switches " -t"))))
1921 (save-selected-window 1941 (save-selected-window
1922 (select-window (display-buffer dispbuf t)) 1942 (switch-to-buffer-other-window dispbuf)
1923 (goto-char (point-min)) 1943 (goto-char (point-min))
1924 (forward-line 2) 1944 (forward-line 2)
1925 (dired-move-to-filename) 1945 (dired-move-to-filename)
@@ -1942,24 +1962,14 @@ you can move to one of them and type C-c C-c to recover that one."
1942(defun mail-other-window (&optional noerase to subject in-reply-to cc replybuffer sendactions) 1962(defun mail-other-window (&optional noerase to subject in-reply-to cc replybuffer sendactions)
1943 "Like `mail' command, but display mail buffer in another window." 1963 "Like `mail' command, but display mail buffer in another window."
1944 (interactive "P") 1964 (interactive "P")
1945 (let ((pop-up-windows t) 1965 (switch-to-buffer-other-window "*mail*")
1946 (special-display-buffer-names nil)
1947 (special-display-regexps nil)
1948 (same-window-buffer-names nil)
1949 (same-window-regexps nil))
1950 (pop-to-buffer "*mail*"))
1951 (mail noerase to subject in-reply-to cc replybuffer sendactions)) 1966 (mail noerase to subject in-reply-to cc replybuffer sendactions))
1952 1967
1953;;;###autoload 1968;;;###autoload
1954(defun mail-other-frame (&optional noerase to subject in-reply-to cc replybuffer sendactions) 1969(defun mail-other-frame (&optional noerase to subject in-reply-to cc replybuffer sendactions)
1955 "Like `mail' command, but display mail buffer in another frame." 1970 "Like `mail' command, but display mail buffer in another frame."
1956 (interactive "P") 1971 (interactive "P")
1957 (let ((pop-up-frames t) 1972 (switch-to-buffer-other-frame "*mail*")
1958 (special-display-buffer-names nil)
1959 (special-display-regexps nil)
1960 (same-window-buffer-names nil)
1961 (same-window-regexps nil))
1962 (pop-to-buffer "*mail*"))
1963 (mail noerase to subject in-reply-to cc replybuffer sendactions)) 1973 (mail noerase to subject in-reply-to cc replybuffer sendactions))
1964 1974
1965;; Do not add anything but external entries on this page. 1975;; Do not add anything but external entries on this page.
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 51a087bc084..6a912cd6273 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2141,6 +2141,16 @@ CHANNELS is a comma- or space-separated string of channel names."
2141 (dolist (b buffers) ;; order the new channel buffers in the buffer list 2141 (dolist (b buffers) ;; order the new channel buffers in the buffer list
2142 (switch-to-buffer b))))) 2142 (switch-to-buffer b)))))
2143 2143
2144(defun-rcirc-command invite (nick-channel)
2145 "Invite NICK to CHANNEL."
2146 (interactive (list
2147 (concat
2148 (completing-read "Invite nick: "
2149 (with-rcirc-server-buffer rcirc-nick-table))
2150 " "
2151 (read-string "Channel: "))))
2152 (rcirc-send-string process (concat "INVITE " nick-channel)))
2153
2144;; TODO: /part #channel reason, or consider removing #channel altogether 2154;; TODO: /part #channel reason, or consider removing #channel altogether
2145(defun-rcirc-command part (channel) 2155(defun-rcirc-command part (channel)
2146 "Part CHANNEL." 2156 "Part CHANNEL."
diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el
index e2619e3bf79..effdcabfb65 100644
--- a/lisp/net/rlogin.el
+++ b/lisp/net/rlogin.el
@@ -125,8 +125,6 @@ this variable is set from that."
125 125
126 126
127 127
128;;;###autoload (add-hook 'same-window-regexps (purecopy "^\\*rlogin-.*\\*\\(\\|<[0-9]+>\\)"))
129
130(defvar rlogin-history nil) 128(defvar rlogin-history nil)
131 129
132;;;###autoload 130;;;###autoload
@@ -196,7 +194,7 @@ variable."
196 (t 194 (t
197 (setq buffer-name (generate-new-buffer-name buffer-name)))) 195 (setq buffer-name (generate-new-buffer-name buffer-name))))
198 (setq buffer (get-buffer-create buffer-name)) 196 (setq buffer (get-buffer-create buffer-name))
199 (pop-to-buffer buffer-name) 197 (switch-to-buffer buffer-name)
200 (unless (comint-check-proc buffer-name) 198 (unless (comint-check-proc buffer-name)
201 (comint-exec buffer buffer-name rlogin-program nil args) 199 (comint-exec buffer buffer-name rlogin-program nil args)
202 (rlogin-mode) 200 (rlogin-mode)
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el
index d4850fed345..59850f68d44 100644
--- a/lisp/net/telnet.el
+++ b/lisp/net/telnet.el
@@ -190,8 +190,6 @@ rejecting one login and prompting again for a username and password.")
190 (delete-region comint-last-input-start 190 (delete-region comint-last-input-start
191 comint-last-input-end))) 191 comint-last-input-end)))
192 192
193;;;###autoload (add-hook 'same-window-regexps (purecopy "\\*telnet-.*\\*\\(\\|<[0-9]+>\\)"))
194
195;;;###autoload 193;;;###autoload
196(defun telnet (host &optional port) 194(defun telnet (host &optional port)
197 "Open a network login connection to host named HOST (a string). 195 "Open a network login connection to host named HOST (a string).
@@ -219,8 +217,8 @@ Normally input is edited in Emacs and sent a line at a time."
219 (telnet-options (if (cdr properties) (cons "-l" (cdr properties)))) 217 (telnet-options (if (cdr properties) (cons "-l" (cdr properties))))
220 process) 218 process)
221 (if (and buffer (get-buffer-process buffer)) 219 (if (and buffer (get-buffer-process buffer))
222 (pop-to-buffer (concat "*" name "*")) 220 (switch-to-buffer (concat "*" name "*"))
223 (pop-to-buffer 221 (switch-to-buffer
224 (apply 'make-comint name telnet-program nil telnet-options)) 222 (apply 'make-comint name telnet-program nil telnet-options))
225 (setq process (get-buffer-process (current-buffer))) 223 (setq process (get-buffer-process (current-buffer)))
226 (set-process-filter process 'telnet-initial-filter) 224 (set-process-filter process 'telnet-initial-filter)
@@ -246,8 +244,6 @@ Data is sent to the remote host when RET is typed."
246 (set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern) 244 (set (make-local-variable 'comint-prompt-regexp) telnet-prompt-pattern)
247 (set (make-local-variable 'comint-use-prompt-regexp) t)) 245 (set (make-local-variable 'comint-use-prompt-regexp) t))
248 246
249;;;###autoload (add-hook 'same-window-regexps (purecopy "\\*rsh-[^-]*\\*\\(\\|<[0-9]*>\\)"))
250
251;;;###autoload 247;;;###autoload
252(defun rsh (host) 248(defun rsh (host)
253 "Open a network login connection to host named HOST (a string). 249 "Open a network login connection to host named HOST (a string).
@@ -256,7 +252,7 @@ Normally input is edited in Emacs and sent a line at a time."
256 (interactive "sOpen rsh connection to host: ") 252 (interactive "sOpen rsh connection to host: ")
257 (require 'shell) 253 (require 'shell)
258 (let ((name (concat "rsh-" host ))) 254 (let ((name (concat "rsh-" host )))
259 (pop-to-buffer (make-comint name remote-shell-program nil host)) 255 (switch-to-buffer (make-comint name remote-shell-program nil host))
260 (set-process-filter (get-process name) 'telnet-initial-filter) 256 (set-process-filter (get-process name) 'telnet-initial-filter)
261 (telnet-mode) 257 (telnet-mode)
262 (setq telnet-count -16))) 258 (setq telnet-count -16)))
diff --git a/lisp/paren.el b/lisp/paren.el
index 8bd96b9317a..fb5c0bf36e9 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -135,13 +135,23 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
135;; and show it until input arrives. 135;; and show it until input arrives.
136(defun show-paren-function () 136(defun show-paren-function ()
137 (if show-paren-mode 137 (if show-paren-mode
138 (let ((oldpos (point)) 138 (let* ((oldpos (point))
139 (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1) 139 (dir (cond ((eq (syntax-class (syntax-after (1- (point)))) 5) -1)
140 ((eq (syntax-class (syntax-after (point))) 4) 1))) 140 ((eq (syntax-class (syntax-after (point))) 4) 1)))
141 pos mismatch face) 141 (unescaped
142 (when dir
143 ;; Verify an even number of quoting characters precede the paren.
144 ;; Follow the same logic as in `blink-matching-open'.
145 (= (if (= dir -1) 1 0)
146 (logand 1 (- (point)
147 (save-excursion
148 (if (= dir -1) (forward-char -1))
149 (skip-syntax-backward "/\\")
150 (point)))))))
151 pos mismatch face)
142 ;; 152 ;;
143 ;; Find the other end of the sexp. 153 ;; Find the other end of the sexp.
144 (when dir 154 (when unescaped
145 (save-excursion 155 (save-excursion
146 (save-restriction 156 (save-restriction
147 ;; Determine the range within which to look for a match. 157 ;; Determine the range within which to look for a match.
diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el
index 54a5a4ef6c9..b20f6968088 100644
--- a/lisp/play/doctor.el
+++ b/lisp/play/doctor.el
@@ -163,6 +163,7 @@ reads the sentence before point, and prints the Doctor's answer."
163 (you7re you\'re (i am)) 163 (you7re you\'re (i am))
164 (you7ve you\'ve (i have)) 164 (you7ve you\'ve (i have))
165 (you7ll you\'ll (i will))))) 165 (you7ll you\'ll (i will)))))
166 (set (make-local-variable 'doctor-sent) nil)
166 (set (make-local-variable 'doctor-found) nil) 167 (set (make-local-variable 'doctor-found) nil)
167 (set (make-local-variable 'doctor-owner) nil) 168 (set (make-local-variable 'doctor-owner) nil)
168 (set (make-local-variable 'doctor--history) nil) 169 (set (make-local-variable 'doctor--history) nil)
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 4299c413312..eec63b4fa3b 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1545,6 +1545,10 @@ initialization, then `awk-mode-hook'.
1545 1545
1546Key bindings: 1546Key bindings:
1547\\{awk-mode-map}" 1547\\{awk-mode-map}"
1548 ;; We need the next line to stop the macro defining
1549 ;; `awk-mode-syntax-table'. This would mask the real table which is
1550 ;; declared in cc-awk.el and hasn't yet been loaded.
1551 :syntax-table nil
1548 (require 'cc-awk) ; Added 2003/6/10. 1552 (require 'cc-awk) ; Added 2003/6/10.
1549 (c-initialize-cc-mode t) 1553 (c-initialize-cc-mode t)
1550 (set-syntax-table awk-mode-syntax-table) 1554 (set-syntax-table awk-mode-syntax-table)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index cd891a8df60..619c423902c 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2408,9 +2408,8 @@ and overlay is highlighted between MK and END-MK."
2408 ;; also do this while we change buffer 2408 ;; also do this while we change buffer
2409 (compilation-set-window w msg) 2409 (compilation-set-window w msg)
2410 compilation-highlight-regexp))) 2410 compilation-highlight-regexp)))
2411 ;; Ideally, the window-size should be passed to `display-buffer' (via 2411 ;; Ideally, the window-size should be passed to `display-buffer'
2412 ;; something like special-display-buffer) so it's only used when 2412 ;; so it's only used when creating a new window.
2413 ;; creating a new window.
2414 (unless pre-existing (compilation-set-window-height w)) 2413 (unless pre-existing (compilation-set-window-height w))
2415 2414
2416 (if from-compilation-buffer 2415 (if from-compilation-buffer
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 87209a78ffb..a4d7cff4127 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -3980,18 +3980,12 @@ SPLIT-HORIZONTAL and show BUF in the new window."
3980(defun gdb-frame-gdb-buffer () 3980(defun gdb-frame-gdb-buffer ()
3981 "Display GUD buffer in a new frame." 3981 "Display GUD buffer in a new frame."
3982 (interactive) 3982 (interactive)
3983 (let ((special-display-regexps (append special-display-regexps '(".*"))) 3983 (display-buffer-other-frame gud-comint-buffer))
3984 (special-display-frame-alist
3985 (remove '(menu-bar-lines) (remove '(tool-bar-lines)
3986 gdb-frame-parameters)))
3987 (same-window-regexps nil))
3988 (display-buffer gud-comint-buffer)))
3989 3984
3990(defun gdb-display-gdb-buffer () 3985(defun gdb-display-gdb-buffer ()
3991 "Display GUD buffer." 3986 "Display GUD buffer."
3992 (interactive) 3987 (interactive)
3993 (let ((same-window-regexps nil)) 3988 (pop-to-buffer gud-comint-buffer nil 0))
3994 (select-window (display-buffer gud-comint-buffer nil 0))))
3995 3989
3996(defun gdb-set-window-buffer (name &optional ignore-dedicated window) 3990(defun gdb-set-window-buffer (name &optional ignore-dedicated window)
3997 "Set buffer of selected window to NAME and dedicate window. 3991 "Set buffer of selected window to NAME and dedicate window.
@@ -4012,7 +4006,7 @@ window is dedicated."
4012 (gdb-display-breakpoints-buffer) 4006 (gdb-display-breakpoints-buffer)
4013 (delete-other-windows) 4007 (delete-other-windows)
4014 ;; Don't dedicate. 4008 ;; Don't dedicate.
4015 (pop-to-buffer gud-comint-buffer) 4009 (switch-to-buffer gud-comint-buffer)
4016 (let ((win0 (selected-window)) 4010 (let ((win0 (selected-window))
4017 (win1 (split-window nil ( / ( * (window-height) 3) 4))) 4011 (win1 (split-window nil ( / ( * (window-height) 3) 4)))
4018 (win2 (split-window nil ( / (window-height) 3))) 4012 (win2 (split-window nil ( / (window-height) 3)))
@@ -4071,7 +4065,7 @@ With arg, display additional buffers iff arg is positive."
4071 "Restore the basic arrangement of windows used by gdb. 4065 "Restore the basic arrangement of windows used by gdb.
4072This arrangement depends on the value of `gdb-many-windows'." 4066This arrangement depends on the value of `gdb-many-windows'."
4073 (interactive) 4067 (interactive)
4074 (pop-to-buffer gud-comint-buffer) ;Select the right window and frame. 4068 (switch-to-buffer gud-comint-buffer) ;Select the right window and frame.
4075 (delete-other-windows) 4069 (delete-other-windows)
4076 (if gdb-many-windows 4070 (if gdb-many-windows
4077 (gdb-setup-windows) 4071 (gdb-setup-windows)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index a54d1438368..25a23fed293 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -112,20 +112,9 @@ Used to grey out relevant toolbar icons.")
112(defun gud-goto-info () 112(defun gud-goto-info ()
113 "Go to relevant Emacs info node." 113 "Go to relevant Emacs info node."
114 (interactive) 114 (interactive)
115 (let ((same-window-regexps same-window-regexps) 115 (if (eq gud-minor-mode 'gdbmi)
116 (display-buffer-reuse-frames t)) 116 (info-other-window "(emacs)GDB Graphical Interface")
117 (catch 'info-found 117 (info-other-window "(emacs)Debuggers")))
118 (walk-windows
119 (lambda (window)
120 (if (eq (window-buffer window) (get-buffer "*info*"))
121 (progn
122 (setq same-window-regexps nil)
123 (throw 'info-found nil))))
124 nil 0)
125 (select-frame (make-frame)))
126 (if (eq gud-minor-mode 'gdbmi)
127 (info "(emacs)GDB Graphical Interface")
128 (info "(emacs)Debuggers"))))
129 118
130(defun gud-tool-bar-item-visible-no-fringe () 119(defun gud-tool-bar-item-visible-no-fringe ()
131 (not (or (eq (buffer-local-value 'major-mode (window-buffer)) 'speedbar-mode) 120 (not (or (eq (buffer-local-value 'major-mode (window-buffer)) 'speedbar-mode)
@@ -2466,10 +2455,6 @@ comint mode, which see."
2466 (set (make-local-variable 'gud-delete-prompt-marker) (make-marker)) 2455 (set (make-local-variable 'gud-delete-prompt-marker) (make-marker))
2467 (add-hook 'kill-buffer-hook 'gud-kill-buffer-hook nil t)) 2456 (add-hook 'kill-buffer-hook 'gud-kill-buffer-hook nil t))
2468 2457
2469;; Cause our buffers to be displayed, by default,
2470;; in the selected window.
2471;;;###autoload (add-hook 'same-window-regexps (purecopy "\\*gud-.*\\*\\(\\|<[0-9]+>\\)"))
2472
2473(defcustom gud-chdir-before-run t 2458(defcustom gud-chdir-before-run t
2474 "Non-nil if GUD should `cd' to the debugged executable." 2459 "Non-nil if GUD should `cd' to the debugged executable."
2475 :group 'gud 2460 :group 'gud
@@ -2511,7 +2496,7 @@ comint mode, which see."
2511 file-subst))) 2496 file-subst)))
2512 (filepart (and file-word (concat "-" (file-name-nondirectory file)))) 2497 (filepart (and file-word (concat "-" (file-name-nondirectory file))))
2513 (existing-buffer (get-buffer (concat "*gud" filepart "*")))) 2498 (existing-buffer (get-buffer (concat "*gud" filepart "*"))))
2514 (pop-to-buffer (concat "*gud" filepart "*")) 2499 (switch-to-buffer (concat "*gud" filepart "*"))
2515 (when (and existing-buffer (get-buffer-process existing-buffer)) 2500 (when (and existing-buffer (get-buffer-process existing-buffer))
2516 (error "This program is already being debugged")) 2501 (error "This program is already being debugged"))
2517 ;; Set the dir, in case the buffer already existed with a different dir. 2502 ;; Set the dir, in case the buffer already existed with a different dir.
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index e4e56054f9d..0765f74a1cf 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -297,8 +297,7 @@ of `inferior-lisp-program'). Runs the hooks from
297 "inferior-lisp" (car cmdlist) nil (cdr cmdlist))) 297 "inferior-lisp" (car cmdlist) nil (cdr cmdlist)))
298 (inferior-lisp-mode))) 298 (inferior-lisp-mode)))
299 (setq inferior-lisp-buffer "*inferior-lisp*") 299 (setq inferior-lisp-buffer "*inferior-lisp*")
300 (pop-to-buffer "*inferior-lisp*")) 300 (switch-to-buffer "*inferior-lisp*"))
301;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*inferior-lisp*"))
302 301
303;;;###autoload 302;;;###autoload
304(defalias 'run-lisp 'inferior-lisp) 303(defalias 'run-lisp 'inferior-lisp)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 3f923f496b9..38bf9552b2a 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -86,7 +86,6 @@
86(add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode)) 86(add-to-list 'interpreter-mode-alist (cons (purecopy "python") 'python-mode))
87;;;###autoload 87;;;###autoload
88(add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode)) 88(add-to-list 'auto-mode-alist (cons (purecopy "\\.py\\'") 'python-mode))
89(add-to-list 'same-window-buffer-names (purecopy "*Python*"))
90 89
91;;;; Font lock 90;;;; Font lock
92 91
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index 470b309434c..66300d97621 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -442,9 +442,19 @@ that variable's value is a string."
442 442
443(defvar calculate-lisp-indent-last-sexp) 443(defvar calculate-lisp-indent-last-sexp)
444 444
445;; Copied from lisp-indent-function, but with gets of 445
446;; scheme-indent-{function,hook}. 446;; FIXME this duplicates almost all of lisp-indent-function.
447;; Extract common code to a subroutine.
447(defun scheme-indent-function (indent-point state) 448(defun scheme-indent-function (indent-point state)
449 "Scheme mode function for the value of the variable `lisp-indent-function'.
450This behaves like the function `lisp-indent-function', except that:
451
452i) it checks for a non-nil value of the property `scheme-indent-function'
453\(or the deprecated `scheme-indent-hook'), rather than `lisp-indent-function'.
454
455ii) if that property specifies a function, it is called with three
456arguments (not two), the third argument being the default (i.e., current)
457indentation."
448 (let ((normal-indent (current-column))) 458 (let ((normal-indent (current-column)))
449 (goto-char (1+ (elt state 1))) 459 (goto-char (1+ (elt state 1)))
450 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) 460 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
diff --git a/lisp/replace.el b/lisp/replace.el
index fb98a714dff..ee430fd9855 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -928,7 +928,7 @@ To return to ordinary Occur mode, use \\[occur-mode]."
928 928
929(defalias 'occur-mode-mouse-goto 'occur-mode-goto-occurrence) 929(defalias 'occur-mode-mouse-goto 'occur-mode-goto-occurrence)
930(defun occur-mode-goto-occurrence (&optional event) 930(defun occur-mode-goto-occurrence (&optional event)
931 "Go to the occurrence the current line describes." 931 "Go to the occurrence on the current line."
932 (interactive (list last-nonmenu-event)) 932 (interactive (list last-nonmenu-event))
933 (let ((pos 933 (let ((pos
934 (if (null event) 934 (if (null event)
@@ -939,10 +939,8 @@ To return to ordinary Occur mode, use \\[occur-mode]."
939 (with-current-buffer (window-buffer (posn-window (event-end event))) 939 (with-current-buffer (window-buffer (posn-window (event-end event)))
940 (save-excursion 940 (save-excursion
941 (goto-char (posn-point (event-end event))) 941 (goto-char (posn-point (event-end event)))
942 (occur-mode-find-occurrence))))) 942 (occur-mode-find-occurrence))))))
943 same-window-buffer-names 943 (pop-to-buffer (marker-buffer pos) t)
944 same-window-regexps)
945 (pop-to-buffer (marker-buffer pos))
946 (goto-char pos) 944 (goto-char pos)
947 (run-hooks 'occur-mode-find-occurrence-hook))) 945 (run-hooks 'occur-mode-find-occurrence-hook)))
948 946
@@ -958,11 +956,8 @@ To return to ordinary Occur mode, use \\[occur-mode]."
958 "Display in another window the occurrence the current line describes." 956 "Display in another window the occurrence the current line describes."
959 (interactive) 957 (interactive)
960 (let ((pos (occur-mode-find-occurrence)) 958 (let ((pos (occur-mode-find-occurrence))
961 window 959 window)
962 ;; Bind these to ensure `display-buffer' puts it in another window. 960 (setq window (display-buffer (marker-buffer pos) t))
963 same-window-buffer-names
964 same-window-regexps)
965 (setq window (display-buffer (marker-buffer pos)))
966 ;; This is the way to set point in the proper window. 961 ;; This is the way to set point in the proper window.
967 (save-selected-window 962 (save-selected-window
968 (select-window window) 963 (select-window window)
diff --git a/lisp/shell.el b/lisp/shell.el
index 909ebb48afc..8c5781f9333 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -650,9 +650,9 @@ Otherwise, one argument `-i' is passed to the shell.
650 t shell-file-name)) 650 t shell-file-name))
651 'localname)))) 651 'localname))))
652 652
653 ;; Pop to buffer, so that the buffer's window will be correctly set 653 ;; The buffer's window must be correctly set when we call comint (so
654 ;; when we call comint (so that comint sets the COLUMNS env var properly). 654 ;; that comint sets the COLUMNS env var properly).
655 (pop-to-buffer buffer) 655 (switch-to-buffer buffer)
656 (unless (comint-check-proc buffer) 656 (unless (comint-check-proc buffer)
657 (let* ((prog (or explicit-shell-file-name 657 (let* ((prog (or explicit-shell-file-name
658 (getenv "ESHELL") shell-file-name)) 658 (getenv "ESHELL") shell-file-name))
@@ -669,9 +669,6 @@ Otherwise, one argument `-i' is passed to the shell.
669 (shell-mode))) 669 (shell-mode)))
670 buffer) 670 buffer)
671 671
672;; Don't do this when shell.el is loaded, only while dumping.
673;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*shell*"))
674
675;;; Directory tracking 672;;; Directory tracking
676;; 673;;
677;; This code provides the shell mode input sentinel 674;; This code provides the shell mode input sentinel
diff --git a/lisp/simple.el b/lisp/simple.el
index 2d4f883f1ed..74343496c72 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -938,9 +938,10 @@ rather than line counts."
938 (forward-line (1- line))))) 938 (forward-line (1- line)))))
939 939
940(defun count-words-region (start end) 940(defun count-words-region (start end)
941 "Print the number of words in the region. 941 "Count the number of words in the active region.
942When called interactively, the word count is printed in echo area." 942If the region is not active, counts the number of words in the buffer."
943 (interactive "r") 943 (interactive (if (use-region-p) (list (region-beginning) (region-end))
944 (list (point-min) (point-max))))
944 (let ((count 0)) 945 (let ((count 0))
945 (save-excursion 946 (save-excursion
946 (save-restriction 947 (save-restriction
@@ -948,8 +949,10 @@ When called interactively, the word count is printed in echo area."
948 (goto-char (point-min)) 949 (goto-char (point-min))
949 (while (forward-word 1) 950 (while (forward-word 1)
950 (setq count (1+ count))))) 951 (setq count (1+ count)))))
951 (if (called-interactively-p 'interactive) 952 (when (called-interactively-p 'interactive)
952 (message "Region has %d words" count)) 953 (message "%s has %d words"
954 (if (use-region-p) "Region" "Buffer")
955 count))
953 count)) 956 count))
954 957
955(defun count-lines-region (start end) 958(defun count-lines-region (start end)
@@ -983,12 +986,12 @@ and the greater of them is not at the start of a line."
983 (if (eq selective-display t) 986 (if (eq selective-display t)
984 (save-match-data 987 (save-match-data
985 (let ((done 0)) 988 (let ((done 0))
986 (while (re-search-forward "[\n\C-m]" nil t 40) 989 (while (re-search-forward "[\n\C-m]" nil t 40)
987 (setq done (+ 40 done))) 990 (setq done (+ 40 done)))
988 (while (re-search-forward "[\n\C-m]" nil t 1) 991 (while (re-search-forward "[\n\C-m]" nil t 1)
989 (setq done (+ 1 done))) 992 (setq done (+ 1 done)))
990 (goto-char (point-max)) 993 (goto-char (point-max))
991 (if (and (/= start end) 994 (if (and (/= start end)
992 (not (bolp))) 995 (not (bolp)))
993 (1+ done) 996 (1+ done)
994 done))) 997 done)))
@@ -5729,6 +5732,11 @@ else the end of the last line. This function obeys RFC822."
5729 "^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move) 5732 "^\\([:\n]\\|[^: \t\n]+[ \t\n]\\)" nil 'move)
5730 (goto-char (match-beginning 0)))) 5733 (goto-char (match-beginning 0))))
5731 5734
5735;; Used by Rmail (e.g., rmail-forward).
5736(defvar mail-encode-mml nil
5737 "If non-nil, mail-user-agent's `sendfunc' command should mml-encode
5738the outgoing message before sending it.")
5739
5732(defun compose-mail (&optional to subject other-headers continue 5740(defun compose-mail (&optional to subject other-headers continue
5733 switch-function yank-action send-actions 5741 switch-function yank-action send-actions
5734 return-action) 5742 return-action)
diff --git a/lisp/subr.el b/lisp/subr.el
index a2676b1173d..0d8797b6f63 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1747,7 +1747,7 @@ Return nil if there isn't one."
1747 1747
1748(put 'eval-after-load 'lisp-indent-function 1) 1748(put 'eval-after-load 'lisp-indent-function 1)
1749(defun eval-after-load (file form) 1749(defun eval-after-load (file form)
1750 "Arrange that, if FILE is ever loaded, FORM will be run at that time. 1750 "Arrange that if FILE is loaded, FORM will be run immediately afterwards.
1751If FILE is already loaded, evaluate FORM right now. 1751If FILE is already loaded, evaluate FORM right now.
1752 1752
1753If a matching file is loaded again, FORM will be evaluated again. 1753If a matching file is loaded again, FORM will be evaluated again.
@@ -1904,7 +1904,9 @@ Value is t if a query was formerly required."
1904 (or (not process) 1904 (or (not process)
1905 (not (memq (process-status process) '(run stop open listen))) 1905 (not (memq (process-status process) '(run stop open listen)))
1906 (not (process-query-on-exit-flag process)) 1906 (not (process-query-on-exit-flag process))
1907 (yes-or-no-p "Buffer has a running process; kill it? ")))) 1907 (yes-or-no-p
1908 (format "Buffer %S has a running process; kill it? "
1909 (buffer-name (current-buffer)))))))
1908 1910
1909(add-hook 'kill-buffer-query-functions 'process-kill-buffer-query-function) 1911(add-hook 'kill-buffer-query-functions 'process-kill-buffer-query-function)
1910 1912
@@ -3249,7 +3251,9 @@ The value returned is the value of the last form in BODY."
3249NUM specifies which parenthesized expression in the last regexp. 3251NUM specifies which parenthesized expression in the last regexp.
3250 Value is nil if NUMth pair didn't match, or there were less than NUM pairs. 3252 Value is nil if NUMth pair didn't match, or there were less than NUM pairs.
3251Zero means the entire text matched by the whole regexp or whole string. 3253Zero means the entire text matched by the whole regexp or whole string.
3252STRING should be given if the last search was by `string-match' on STRING." 3254STRING should be given if the last search was by `string-match' on STRING.
3255If STRING is nil, the current buffer should be the same buffer
3256the search/match was performed in."
3253 (if (match-beginning num) 3257 (if (match-beginning num)
3254 (if string 3258 (if string
3255 (substring string (match-beginning num) (match-end num)) 3259 (substring string (match-beginning num) (match-end num))
@@ -3260,7 +3264,9 @@ STRING should be given if the last search was by `string-match' on STRING."
3260NUM specifies which parenthesized expression in the last regexp. 3264NUM specifies which parenthesized expression in the last regexp.
3261 Value is nil if NUMth pair didn't match, or there were less than NUM pairs. 3265 Value is nil if NUMth pair didn't match, or there were less than NUM pairs.
3262Zero means the entire text matched by the whole regexp or whole string. 3266Zero means the entire text matched by the whole regexp or whole string.
3263STRING should be given if the last search was by `string-match' on STRING." 3267STRING should be given if the last search was by `string-match' on STRING.
3268If STRING is nil, the current buffer should be the same buffer
3269the search/match was performed in."
3264 (if (match-beginning num) 3270 (if (match-beginning num)
3265 (if string 3271 (if string
3266 (substring-no-properties string (match-beginning num) 3272 (substring-no-properties string (match-beginning num)
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 0383251523f..3efb2f158c0 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -4038,10 +4038,8 @@ A prefix arg negates the value of `bibtex-search-entry-globally'."
4038 ;; `bibtex-search-entry' moves point if key found 4038 ;; `bibtex-search-entry' moves point if key found
4039 (setq found (bibtex-search-entry key))))) 4039 (setq found (bibtex-search-entry key)))))
4040 (cond ((and found display) 4040 (cond ((and found display)
4041 (let ((same-window-buffer-names 4041 (switch-to-buffer buffer)
4042 (cons (buffer-name buffer) same-window-buffer-names))) 4042 (bibtex-reposition-window))
4043 (pop-to-buffer buffer)
4044 (bibtex-reposition-window)))
4045 (found (set-buffer buffer)) 4043 (found (set-buffer buffer))
4046 (display (message "Key `%s' not found" key))) 4044 (display (message "Key `%s' not found" key)))
4047 found) 4045 found)
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index e6837d0abde..4eb4efc3766 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -33,9 +33,6 @@
33;; M-x flyspell-prog-mode. 33;; M-x flyspell-prog-mode.
34;; In that mode only text inside comments is checked. 34;; In that mode only text inside comments is checked.
35;; 35;;
36;; Note: consider setting the variable ispell-parser to `tex' to
37;; avoid TeX command checking; use `(setq ispell-parser 'tex)'.
38;;
39;; Some user variables control the behavior of flyspell. They are 36;; Some user variables control the behavior of flyspell. They are
40;; those defined under the `User variables' comment. 37;; those defined under the `User variables' comment.
41 38
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 5714179fcfe..8ad0a8ee43f 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
12011-09-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * url-http.el (url-http-find-free-connection): If there was an
4 error on connect, make sure the user isn't bothered with
5 irrelevant questions.
6
12011-08-07 Chong Yidong <cyd@stupidchicken.com> 72011-08-07 Chong Yidong <cyd@stupidchicken.com>
2 8
3 * url-http.el (url-http-parse-headers): For HTTP 301/302/307, 9 * url-http.el (url-http-parse-headers): For HTTP 301/302/307,
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index a21aed21436..0ba3aa2c5fe 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -180,6 +180,10 @@ request.")
180 ;; Drop the temp buffer link before killing the buffer. 180 ;; Drop the temp buffer link before killing the buffer.
181 (set-process-buffer proc nil)) 181 (set-process-buffer proc nil))
182 proc) 182 proc)
183 ;; If there was an error on connect, make sure we don't
184 ;; get queried.
185 (when (get-buffer-process buf)
186 (set-process-query-on-exit-flag (get-buffer-process buf) nil))
183 (kill-buffer buf))))))) 187 (kill-buffer buf)))))))
184 188
185;; Building an HTTP request 189;; Building an HTTP request
diff --git a/lisp/wdired.el b/lisp/wdired.el
index f71979e2727..cc99bd40628 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -216,6 +216,8 @@ See `wdired-mode'."
216 (buffer-substring (point-min) (point-max))) 216 (buffer-substring (point-min) (point-max)))
217 (set (make-local-variable 'wdired-old-point) (point)) 217 (set (make-local-variable 'wdired-old-point) (point))
218 (set (make-local-variable 'query-replace-skip-read-only) t) 218 (set (make-local-variable 'query-replace-skip-read-only) t)
219 (set (make-local-variable 'isearch-filter-predicate)
220 'wdired-isearch-filter-read-only)
219 (use-local-map wdired-mode-map) 221 (use-local-map wdired-mode-map)
220 (force-mode-line-update) 222 (force-mode-line-update)
221 (setq buffer-read-only nil) 223 (setq buffer-read-only nil)
@@ -241,6 +243,11 @@ See `wdired-mode'."
241 "Press \\[wdired-finish-edit] when finished \ 243 "Press \\[wdired-finish-edit] when finished \
242or \\[wdired-abort-changes] to abort changes"))) 244or \\[wdired-abort-changes] to abort changes")))
243 245
246(defun wdired-isearch-filter-read-only (beg end)
247 "Skip matches that have a read-only property."
248 (and (isearch-filter-visible beg end)
249 (not (text-property-not-all (min beg end) (max beg end)
250 'read-only nil))))
244 251
245;; Protect the buffer so only the filenames can be changed, and put 252;; Protect the buffer so only the filenames can be changed, and put
246;; properties so filenames (old and new) can be easily found. 253;; properties so filenames (old and new) can be easily found.
diff --git a/lisp/window.el b/lisp/window.el
index d771f9ffdcd..3a229a4e447 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2258,40 +2258,10 @@ and no others."
2258 (next-window base-window (if nomini 'arg) all-frames)))) 2258 (next-window base-window (if nomini 'arg) all-frames))))
2259 2259
2260;;; Deleting windows. 2260;;; Deleting windows.
2261(defcustom window-auto-delete t 2261(defun window-deletable-p (&optional window)
2262 "If non-nil, quitting a window can delete the window.
2263If this variable is t, functions that quit a window can delete
2264the window and, if applicable, the corresponding frame. If it is
2265'frame, these functions can delete a window and its frame,
2266provided there are no other windows on the frame. If it is
2267'window, these functions can delete the window, provided there
2268are other windows on the corresponding frame. If this variable
2269is nil, functions that quit a window never delete the window or
2270the associated frame.
2271
2272Note that a frame can be effectively deleted if and only if
2273another frame still exists.
2274
2275Functions quitting a window and consequently affected by this
2276variable are `switch-to-prev-buffer' including its callers like
2277`bury-buffer', `replace-buffer-in-windows' and its callers like
2278`kill-buffer', and `quit-window'."
2279 :type '(choice
2280 (const :tag "Always" t)
2281 (const :tag "Window" window)
2282 (const :tag "Frame" frame)
2283 (const :tag "Never" nil))
2284 :group 'windows)
2285
2286(defun window-deletable-p (&optional window force)
2287 "Return t if WINDOW can be safely deleted from its frame. 2262 "Return t if WINDOW can be safely deleted from its frame.
2288Return `frame' if deleting WINDOW should also delete its 2263Return `frame' if deleting WINDOW should also delete its
2289frame. 2264frame."
2290
2291Optional argument FORCE non-nil means return non-nil unless
2292WINDOW is the root window of the only visible frame. FORCE nil
2293or omitted means return nil unless WINDOW is either dedicated to
2294its buffer or has no previous buffer to show instead."
2295 (setq window (window-normalize-any-window window)) 2265 (setq window (window-normalize-any-window window))
2296 2266
2297 (unless ignore-window-parameters 2267 (unless ignore-window-parameters
@@ -2301,32 +2271,18 @@ its buffer or has no previous buffer to show instead."
2301 2271
2302 (let* ((parent (window-parent window)) 2272 (let* ((parent (window-parent window))
2303 (frame (window-frame window)) 2273 (frame (window-frame window))
2304 (buffer (window-buffer window)) 2274 (buffer (window-buffer window)))
2305 (dedicated (and (window-buffer window) (window-dedicated-p window)))
2306 ;; prev non-nil means there is another buffer we can show
2307 ;; in WINDOW instead.
2308 (prev (and (window-prev-buffers window)
2309 (or (cdr (window-prev-buffers window))
2310 (not (eq (caar (window-prev-buffers window))
2311 buffer))))))
2312 (cond 2275 (cond
2313 ((frame-root-window-p window) 2276 ((frame-root-window-p window)
2314 (when (and (or force dedicated 2277 ;; WINDOW's frame can be deleted only if there are other frames
2315 (and (not prev) (memq window-auto-delete '(t frame)))) 2278 ;; on the same terminal.
2316 (other-visible-frames-p frame)) 2279 (unless (eq frame (next-frame frame 0))
2317 ;; We can delete WINDOW's frame if (1) either FORCE is non-nil,
2318 ;; WINDOW is dedicated to its buffer, or there are no previous
2319 ;; buffers to show and (2) there are other visible frames left.
2320 'frame)) 2280 'frame))
2321 ((and (or force dedicated 2281 ((or ignore-window-parameters
2322 (and (not prev) (memq window-auto-delete '(t window)))) 2282 (not (eq (window-parameter window 'window-side) 'none))
2323 (or ignore-window-parameters 2283 (and parent (eq (window-parameter parent 'window-side) 'none)))
2324 (not (eq (window-parameter window 'window-side) 'none)) 2284 ;; WINDOW can be deleted unless it is the main window of its
2325 (and parent 2285 ;; frame.
2326 (eq (window-parameter parent 'window-side) 'none))))
2327 ;; We can delete WINDOW if (1) either FORCE is non-nil, WINDOW is
2328 ;; dedicated to its buffer, or there are no previous buffers to
2329 ;; show and (2) WINDOW is not the main window of its frame.
2330 t)))) 2286 t))))
2331 2287
2332(defun window-or-subwindow-p (subwindow window) 2288(defun window-or-subwindow-p (subwindow window)
@@ -2594,84 +2550,75 @@ shall not be switched to in future invocations of this command."
2594 (old-buffer (window-buffer window)) 2550 (old-buffer (window-buffer window))
2595 ;; Save this since it's destroyed by `set-window-buffer'. 2551 ;; Save this since it's destroyed by `set-window-buffer'.
2596 (next-buffers (window-next-buffers window)) 2552 (next-buffers (window-next-buffers window))
2597 entry new-buffer killed-buffers deletable visible) 2553 entry new-buffer killed-buffers visible)
2598 (cond 2554 (when (window-dedicated-p window)
2599 ;; When BURY-OR-KILL is non-nil, there's no previous buffer for 2555 (error "Window %s is dedicated to buffer %s" window old-buffer))
2600 ;; this window, and we can delete the window (or the frame) do 2556
2601 ;; that. 2557 (catch 'found
2602 ((and bury-or-kill (setq deletable (window-deletable-p window))) 2558 ;; Scan WINDOW's previous buffers first, skipping entries of next
2603 (if (eq deletable 'frame) 2559 ;; buffers.
2604 (delete-frame (window-frame window)) 2560 (dolist (entry (window-prev-buffers window))
2605 (delete-window window))) 2561 (when (and (setq new-buffer (car entry))
2606 ((window-dedicated-p window) 2562 (or (buffer-live-p new-buffer)
2607 (error "Window %s is dedicated to buffer %s" window old-buffer))) 2563 (not (setq killed-buffers
2608 2564 (cons new-buffer killed-buffers))))
2609 (unless deletable 2565 (not (eq new-buffer old-buffer))
2610 (catch 'found 2566 (or bury-or-kill
2611 ;; Scan WINDOW's previous buffers first, skipping entries of next 2567 (not (memq new-buffer next-buffers))))
2612 ;; buffers. 2568 (set-window-buffer-start-and-point
2613 (dolist (entry (window-prev-buffers window)) 2569 window new-buffer (nth 1 entry) (nth 2 entry))
2614 (when (and (setq new-buffer (car entry)) 2570 (throw 'found t)))
2615 (or (buffer-live-p new-buffer) 2571 ;; Scan reverted buffer list of WINDOW's frame next, skipping
2572 ;; entries of next buffers. Note that when we bury or kill a
2573 ;; buffer we don't reverse the global buffer list to avoid showing
2574 ;; a buried buffer instead. Otherwise, we must reverse the global
2575 ;; buffer list in order to make sure that switching to the
2576 ;; previous/next buffer traverse it in opposite directions.
2577 (dolist (buffer (if bury-or-kill
2578 (buffer-list (window-frame window))
2579 (nreverse (buffer-list (window-frame window)))))
2580 (when (and (buffer-live-p buffer)
2581 (not (eq buffer old-buffer))
2582 (not (eq (aref (buffer-name buffer) 0) ?\s))
2583 (or bury-or-kill (not (memq buffer next-buffers))))
2584 (if (get-buffer-window buffer)
2585 ;; Try to avoid showing a buffer visible in some other window.
2586 (setq visible buffer)
2587 (setq new-buffer buffer)
2588 (set-window-buffer-start-and-point window new-buffer)
2589 (throw 'found t))))
2590 (unless bury-or-kill
2591 ;; Scan reverted next buffers last (must not use nreverse
2592 ;; here!).
2593 (dolist (buffer (reverse next-buffers))
2594 ;; Actually, buffer _must_ be live here since otherwise it
2595 ;; would have been caught in the scan of previous buffers.
2596 (when (and (or (buffer-live-p buffer)
2616 (not (setq killed-buffers 2597 (not (setq killed-buffers
2617 (cons new-buffer killed-buffers)))) 2598 (cons buffer killed-buffers))))
2618 (not (eq new-buffer old-buffer))
2619 (or bury-or-kill
2620 (not (memq new-buffer next-buffers))))
2621 (set-window-buffer-start-and-point
2622 window new-buffer (nth 1 entry) (nth 2 entry))
2623 (throw 'found t)))
2624 ;; Scan reverted buffer list of WINDOW's frame next, skipping
2625 ;; entries of next buffers. Note that when we bury or kill a
2626 ;; buffer we don't reverse the global buffer list to avoid showing
2627 ;; a buried buffer instead. Otherwise, we must reverse the global
2628 ;; buffer list in order to make sure that switching to the
2629 ;; previous/next buffer traverse it in opposite directions.
2630 (dolist (buffer (if bury-or-kill
2631 (buffer-list (window-frame window))
2632 (nreverse (buffer-list (window-frame window)))))
2633 (when (and (buffer-live-p buffer)
2634 (not (eq buffer old-buffer)) 2599 (not (eq buffer old-buffer))
2635 (not (eq (aref (buffer-name buffer) 0) ?\s)) 2600 (setq entry (assq buffer (window-prev-buffers window))))
2636 (or bury-or-kill (not (memq buffer next-buffers))))
2637 (if (get-buffer-window buffer)
2638 ;; Try to avoid showing a buffer visible in some other window.
2639 (setq visible buffer)
2640 (setq new-buffer buffer) 2601 (setq new-buffer buffer)
2641 (set-window-buffer-start-and-point window new-buffer) 2602 (set-window-buffer-start-and-point
2603 window new-buffer (nth 1 entry) (nth 2 entry))
2642 (throw 'found t)))) 2604 (throw 'found t))))
2643 (unless bury-or-kill 2605
2644 ;; Scan reverted next buffers last (must not use nreverse 2606 ;; Show a buffer visible in another window.
2645 ;; here!). 2607 (when visible
2646 (dolist (buffer (reverse next-buffers)) 2608 (setq new-buffer visible)
2647 ;; Actually, buffer _must_ be live here since otherwise it 2609 (set-window-buffer-start-and-point window new-buffer)))
2648 ;; would have been caught in the scan of previous buffers. 2610
2649 (when (and (or (buffer-live-p buffer) 2611 (if bury-or-kill
2650 (not (setq killed-buffers 2612 ;; Remove `old-buffer' from WINDOW's previous and (restored list
2651 (cons buffer killed-buffers)))) 2613 ;; of) next buffers.
2652 (not (eq buffer old-buffer)) 2614 (progn
2653 (setq entry (assq buffer (window-prev-buffers window)))) 2615 (set-window-prev-buffers
2654 (setq new-buffer buffer) 2616 window (assq-delete-all old-buffer (window-prev-buffers window)))
2655 (set-window-buffer-start-and-point 2617 (set-window-next-buffers window (delq old-buffer next-buffers)))
2656 window new-buffer (nth 1 entry) (nth 2 entry)) 2618 ;; Move `old-buffer' to head of WINDOW's restored list of next
2657 (throw 'found t)))) 2619 ;; buffers.
2658 2620 (set-window-next-buffers
2659 ;; Show a buffer visible in another window. 2621 window (cons old-buffer (delq old-buffer next-buffers))))
2660 (when visible
2661 (setq new-buffer visible)
2662 (set-window-buffer-start-and-point window new-buffer)))
2663
2664 (if bury-or-kill
2665 ;; Remove `old-buffer' from WINDOW's previous and (restored list
2666 ;; of) next buffers.
2667 (progn
2668 (set-window-prev-buffers
2669 window (assq-delete-all old-buffer (window-prev-buffers window)))
2670 (set-window-next-buffers window (delq old-buffer next-buffers)))
2671 ;; Move `old-buffer' to head of WINDOW's restored list of next
2672 ;; buffers.
2673 (set-window-next-buffers
2674 window (cons old-buffer (delq old-buffer next-buffers)))))
2675 2622
2676 ;; Remove killed buffers from WINDOW's previous and next buffers. 2623 ;; Remove killed buffers from WINDOW's previous and next buffers.
2677 (when killed-buffers 2624 (when killed-buffers
@@ -2816,8 +2763,9 @@ displayed there."
2816 ;; Don't iconify if it's the only frame. 2763 ;; Don't iconify if it's the only frame.
2817 (not (eq (next-frame nil 0) (selected-frame)))) 2764 (not (eq (next-frame nil 0) (selected-frame))))
2818 (iconify-frame (window-frame (selected-window)))) 2765 (iconify-frame (window-frame (selected-window))))
2819 ((window-deletable-p) 2766 ((eq (window-deletable-p) t)
2820 (delete-window))) 2767 (delete-window)))
2768
2821 ;; Always return nil. 2769 ;; Always return nil.
2822 nil)) 2770 nil))
2823 2771
@@ -2871,13 +2819,13 @@ frames left."
2871 (all-frames (cond ((not frame) t) ((eq frame t) nil) (t frame)))) 2819 (all-frames (cond ((not frame) t) ((eq frame t) nil) (t frame))))
2872 (dolist (window (window-list-1 nil nil all-frames)) 2820 (dolist (window (window-list-1 nil nil all-frames))
2873 (if (eq (window-buffer window) buffer) 2821 (if (eq (window-buffer window) buffer)
2874 (let ((deletable (window-deletable-p window t))) 2822 (let ((deletable (window-deletable-p window)))
2875 (cond 2823 (cond
2876 ((eq deletable 'frame) 2824 ((and (eq deletable 'frame) (window-dedicated-p window))
2877 ;; Delete frame. 2825 ;; Delete frame if and only if window is dedicated.
2878 (delete-frame (window-frame window))) 2826 (delete-frame (window-frame window)))
2879 (deletable 2827 ((eq deletable t)
2880 ;; Delete window only. 2828 ;; Delete window.
2881 (delete-window window)) 2829 (delete-window window))
2882 (t 2830 (t
2883 ;; In window switch to previous buffer. 2831 ;; In window switch to previous buffer.
@@ -2902,7 +2850,8 @@ all window-local buffer lists."
2902 (let ((buffer (window-normalize-buffer buffer-or-name))) 2850 (let ((buffer (window-normalize-buffer buffer-or-name)))
2903 (dolist (window (window-list-1 nil nil t)) 2851 (dolist (window (window-list-1 nil nil t))
2904 (if (eq (window-buffer window) buffer) 2852 (if (eq (window-buffer window) buffer)
2905 (let ((deletable (window-deletable-p window))) 2853 (let ((deletable (and (window-dedicated-p window)
2854 (window-deletable-p window))))
2906 (cond 2855 (cond
2907 ((eq deletable 'frame) 2856 ((eq deletable 'frame)
2908 ;; Delete frame. 2857 ;; Delete frame.
@@ -2931,13 +2880,21 @@ one. If non-nil, reset `quit-restore' parameter to nil."
2931 (setq window (window-normalize-live-window window)) 2880 (setq window (window-normalize-live-window window))
2932 (let ((buffer (window-buffer window)) 2881 (let ((buffer (window-buffer window))
2933 (quit-restore (window-parameter window 'quit-restore)) 2882 (quit-restore (window-parameter window 'quit-restore))
2934 deletable resize) 2883 resize)
2935 (cond 2884 (cond
2936 ((setq deletable (window-deletable-p window)) 2885 ((and (eq (car-safe quit-restore) 'new-frame)
2937 ;; Check if WINDOW's frame can be deleted. 2886 (eq (nth 1 quit-restore) (window-buffer window))
2938 (if (eq deletable 'frame) 2887 (eq (window-deletable-p window) 'frame))
2939 (delete-frame (window-frame window)) 2888 ;; WINDOW's frame can be deleted.
2940 (delete-window window)) 2889 (delete-frame (window-frame window))
2890 ;; If the previously selected window is still alive, select it.
2891 (when (window-live-p (nth 2 quit-restore))
2892 (select-window (nth 2 quit-restore))))
2893 ((and (eq (car-safe quit-restore) 'new-window)
2894 (eq (nth 1 quit-restore) (window-buffer window))
2895 (eq (window-deletable-p window) t))
2896 ;; WINDOW's can be deleted.
2897 (delete-window window)
2941 ;; If the previously selected window is still alive, select it. 2898 ;; If the previously selected window is still alive, select it.
2942 (when (window-live-p (nth 2 quit-restore)) 2899 (when (window-live-p (nth 2 quit-restore))
2943 (select-window (nth 2 quit-restore)))) 2900 (select-window (nth 2 quit-restore))))
@@ -4497,53 +4454,80 @@ BUFFER-OR-NAME and return that buffer."
4497 buffer)) 4454 buffer))
4498 (current-buffer))) 4455 (current-buffer)))
4499 4456
4500(defvar display-buffer-alist nil 4457(defconst display-buffer--action-function-custom-type
4458 '(choice :tag "Function"
4459 (const :tag "--" ignore) ; default for insertion
4460 (const display-buffer--maybe-same-window)
4461 (const display-buffer-reuse-window)
4462 (const display-buffer--special)
4463 (const display-buffer--maybe-pop-up-frame-or-window)
4464 (const display-buffer-use-some-window)
4465 (const display-buffer-same-window)
4466 (const display-buffer-pop-up-frame)
4467 (const display-buffer-use-some-window)
4468 (function :tag "Other function"))
4469 "Custom type for `display-buffer' action functions.")
4470
4471(defconst display-buffer--action-custom-type
4472 `(cons :tag "Action"
4473 (choice :tag "Action functions"
4474 ,display-buffer--action-function-custom-type
4475 (repeat
4476 :tag "List of functions"
4477 ,display-buffer--action-function-custom-type))
4478 (alist :tag "Action arguments"
4479 :key-type symbol
4480 :value-type (sexp :tag "Value")))
4481 "Custom type for `display-buffer' actions.")
4482
4483(defcustom display-buffer-alist nil
4501 "Alist of conditional actions for `display-buffer'. 4484 "Alist of conditional actions for `display-buffer'.
4502This is a list of elements (CONDITION . ACTION), where: 4485This is a list of elements (CONDITION . ACTION), where:
4503 4486
4504 CONDITION is either a regexp matching buffer names, or a function 4487 CONDITION is either a regexp matching buffer names, or a function
4505 that takes a buffer and returns a boolean. 4488 that takes a buffer and returns a boolean.
4506 4489
4507 ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is 4490 ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a
4508 either a function or a list of functions. Each such function 4491 function or a list of functions. Each such function should
4509 should accept 2 arguments: a buffer to display and an alist of 4492 accept 2 arguments: a buffer to display and an alist of the
4510 the same form as ALIST. It should return the window used, or 4493 same form as ALIST. See `display-buffer' for details."
4511 nil if it fails to display the window. See `display-buffer' 4494 :type `(alist :key-type
4512 for more details. 4495 (choice :tag "Condition"
4513 4496 regexp
4514Usable action functions include: 4497 (function :tag "Matcher function"))
4515 `display-buffer-reuse-selected-window' 4498 :value-type ,display-buffer--action-custom-type)
4516 `display-buffer-same-window' 4499 :risky t
4517 `display-buffer-maybe-same-window' 4500 :version "24.1"
4518 `display-buffer-reuse-window' 4501 :group 'windows)
4519 `display-buffer-pop-up-frame'
4520 `display-buffer-pop-up-window'
4521 `display-buffer-reuse-or-pop-window'
4522 `display-buffer-use-some-window'
4523 4502
4524The above functions recognize the following alist entries: 4503(defcustom display-buffer-default-action
4525 - `inhibit-same-window', if non-nil, prevents the same window 4504 '((display-buffer--maybe-same-window
4526 from being used for display. 4505 display-buffer-reuse-window
4527 - `reuse-frame' specifies the frames that can be searched for a 4506 display-buffer--special
4528 window displaying the buffer. Its values have the same 4507 display-buffer--maybe-pop-up-frame-or-window
4529 meaning as the ALL-FRAMES arg to `get-buffer-window-list'.")
4530
4531(defvar display-buffer-default-action
4532 '((display-buffer-reuse-selected-window
4533 display-buffer-maybe-same-window
4534 display-buffer-reuse-or-pop-window
4535 display-buffer-use-some-window 4508 display-buffer-use-some-window
4536 ;; If all else fails, pop up a new frame regardless of 4509 ;; If all else fails, pop up a new frame.
4537 ;; restrictions.
4538 display-buffer-pop-up-frame)) 4510 display-buffer-pop-up-frame))
4539 "List of default actions for `display-buffer'. 4511 "List of default actions for `display-buffer'.
4540It should be a cons cell of the form (FUNCTION . ALIST), which 4512It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a
4541has the same meaning as in `display-buffer-alist'.") 4513function or a list of functions. Each function should accept 2
4514arguments: a buffer to display and an alist similar to ALIST.
4515See `display-buffer' for details."
4516 :type display-buffer--action-custom-type
4517 :risky t
4518 :version "24.1"
4519 :group 'windows)
4542 4520
4543(defvar display-buffer-overriding-action nil 4521(defcustom display-buffer-overriding-action '(nil . nil)
4544 "Overriding action to perform to display a buffer. 4522 "Overriding action to perform to display a buffer.
4545If non-nil, it should be a cons cell (FUNCTION . ALIST), which 4523It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a
4546has the same meaning as in `display-buffer-alist'.") 4524function or a list of functions. Each function should accept 2
4525arguments: a buffer to display and an alist similar to ALIST.
4526See `display-buffer' for details."
4527 :type display-buffer--action-custom-type
4528 :risky t
4529 :version "24.1"
4530 :group 'windows)
4547 4531
4548(defun display-buffer-assq-regexp (buffer-name alist) 4532(defun display-buffer-assq-regexp (buffer-name alist)
4549 "Retrieve ALIST entry corresponding to BUFFER-NAME." 4533 "Retrieve ALIST entry corresponding to BUFFER-NAME."
@@ -4557,8 +4541,23 @@ has the same meaning as in `display-buffer-alist'.")
4557 (funcall key buffer-name alist))) 4541 (funcall key buffer-name alist)))
4558 (throw 'match (cdr entry))))))) 4542 (throw 'match (cdr entry)))))))
4559 4543
4544(defvar display-buffer--same-window-action
4545 '(display-buffer-same-window
4546 (inhibit-same-window . nil))
4547 "A `display-buffer' action for displaying in the same window.")
4548(put 'display-buffer--same-window-action 'risky-local-variable t)
4549
4550(defvar display-buffer--other-frame-action
4551 '((display-buffer-reuse-window
4552 display-buffer--special
4553 display-buffer-pop-up-frame)
4554 (reusable-frames . 0)
4555 (inhibit-same-window . t))
4556 "A `display-buffer' action for displaying in another frame.")
4557(put 'display-buffer--other-frame-action 'risky-local-variable t)
4558
4560(defun display-buffer (&optional buffer-or-name action frame) 4559(defun display-buffer (&optional buffer-or-name action frame)
4561 "Display BUFFER-OR-NAME in some window. 4560 "Display BUFFER-OR-NAME in some window, without selecting it.
4562BUFFER-OR-NAME must be a buffer or the name of an existing 4561BUFFER-OR-NAME must be a buffer or the name of an existing
4563buffer. Return the window chosen for displaying BUFFER-OR-NAME, 4562buffer. Return the window chosen for displaying BUFFER-OR-NAME,
4564or nil if no such window is found. 4563or nil if no such window is found.
@@ -4567,14 +4566,30 @@ Optional argument ACTION should have the form (FUNCTION . ALIST).
4567FUNCTION is either a function or a list of functions. Each such 4566FUNCTION is either a function or a list of functions. Each such
4568function is called with 2 arguments: the buffer to display and an 4567function is called with 2 arguments: the buffer to display and an
4569alist. It should either display the buffer and return the 4568alist. It should either display the buffer and return the
4570window, or return nil if it is unable to display the buffer. 4569window, or return nil if unable to display the buffer.
4570
4571`display-buffer' builds a function list and an alist from
4572`display-buffer-overriding-action', `display-buffer-alist',
4573ACTION, and `display-buffer-default-action' (in that order).
4574Then it calls each function in the combined function list in
4575turn, passing the buffer as the first argument and the combined
4576alist as the second argument, until a function returns non-nil.
4571 4577
4572`display-buffer' constructs a list of action functions and an 4578Available action functions include:
4573action alist by combining `display-buffer-overriding-action', 4579 `display-buffer-same-window'
4574`display-buffer-alist', the ACTION argument, and 4580 `display-buffer-reuse-window'
4575`display-buffer-default-action' (in that order). It calls each 4581 `display-buffer-pop-up-frame'
4576action function in turn, passing the combined action alist as the 4582 `display-buffer-pop-up-window'
4577second argument, until one of the functions returns non-nil. 4583 `display-buffer-use-some-window'
4584
4585Recognized alist entries include:
4586
4587 `inhibit-same-window' -- A non-nil value prevents the same
4588 window from being used for display.
4589
4590 `reusable-frames' -- Value specifies frame(s) to search for a
4591 window that already displays the buffer.
4592 See `display-buffer-reuse-window'.
4578 4593
4579The ACTION argument to `display-buffer' can also have a non-nil 4594The ACTION argument to `display-buffer' can also have a non-nil
4580and non-list value. This means to display the buffer in a window 4595and non-list value. This means to display the buffer in a window
@@ -4582,14 +4597,10 @@ other than the selected one, even if it is already displayed in
4582the selected window. If called interactively with a prefix 4597the selected window. If called interactively with a prefix
4583argument, ACTION is t. 4598argument, ACTION is t.
4584 4599
4585Optional argument FRAME specifies where to look for a window that 4600Optional argument FRAME, if non-nil, acts like an additional
4586already displays the buffer. If nil, check only the selected 4601ALIST entry (reusable-frames . FRAME), specifying the frame(s) to
4587frame (actually the last non-minibuffer frame), except if 4602search for a window that is already displaying the buffer. See
4588`display-buffer-reuse-frames' or `pop-up-frames' is non-nil 4603`display-buffer-reuse-window'."
4589\(non-nil and not graphic-only on a text-only terminal), in which
4590case check all visible or iconified frames. Otherwise, FRAME can
4591be a specific frame, `visible' (all visible frames), 0 (all
4592frames on the current terminal), or t (all frames)."
4593 (interactive (list (read-buffer "Display buffer: " (other-buffer)) 4604 (interactive (list (read-buffer "Display buffer: " (other-buffer))
4594 (if current-prefix-arg t))) 4605 (if current-prefix-arg t)))
4595 (let ((buffer (window-normalize-buffer-to-display buffer-or-name)) 4606 (let ((buffer (window-normalize-buffer-to-display buffer-or-name))
@@ -4608,7 +4619,7 @@ frames on the current terminal), or t (all frames)."
4608 (cons nil (append (if inhibit-same-window 4619 (cons nil (append (if inhibit-same-window
4609 '((inhibit-same-window . t))) 4620 '((inhibit-same-window . t)))
4610 (if frame 4621 (if frame
4611 `((reuse-frame . ,frame)))))) 4622 `((reusable-frames . ,frame))))))
4612 ;; Construct action function list and action alist. 4623 ;; Construct action function list and action alist.
4613 (actions (list display-buffer-overriding-action 4624 (actions (list display-buffer-overriding-action
4614 user-action action extra-action 4625 user-action action extra-action
@@ -4632,88 +4643,83 @@ frames on the current terminal), or t (all frames)."
4632This uses the function `display-buffer' as a subroutine; see 4643This uses the function `display-buffer' as a subroutine; see
4633its documentation for additional customization information." 4644its documentation for additional customization information."
4634 (interactive "BDisplay buffer in other frame: ") 4645 (interactive "BDisplay buffer in other frame: ")
4635 (let ((pop-up-frames t) 4646 (display-buffer buffer display-buffer--other-frame-action t))
4636 same-window-buffer-names same-window-regexps
4637 ;;(old-window (selected-window))
4638 new-window)
4639 (setq new-window (display-buffer buffer t))
4640 ;; This may have been here in order to prevent the new frame from hiding
4641 ;; the old frame. But it does more harm than good.
4642 ;; Maybe we should call `raise-window' on the old-frame instead? --Stef
4643 ;;(lower-frame (window-frame new-window))
4644
4645 ;; This may have been here in order to make sure the old-frame gets the
4646 ;; focus. But not only can it cause an annoying flicker, with some
4647 ;; window-managers it just makes the window invisible, with no easy
4648 ;; way to recover it. --Stef
4649 ;;(make-frame-invisible (window-frame old-window))
4650 ;;(make-frame-visible (window-frame old-window))
4651 ))
4652 4647
4653;;; `display-buffer' action functions: 4648;;; `display-buffer' action functions:
4654 4649
4655(defun display-buffer-reuse-selected-window (buffer alist)
4656 "Try to display BUFFER in the selected window if it is already there.
4657If this succeeds, return the selected window.
4658
4659This fails if BUFFER is not displayed in the selected window, or
4660if ALIST has a non-nil `inhibit-same-window' entry. In that
4661case, return nil."
4662 (when (and (not (cdr (assq 'inhibit-same-window alist)))
4663 (eq buffer (window-buffer)))
4664 (display-buffer-record-window 'reuse-window (selected-window) buffer)
4665 (window--display-buffer-1 (selected-window))))
4666
4667(defun display-buffer-same-window (buffer alist) 4650(defun display-buffer-same-window (buffer alist)
4668 "Try to display BUFFER in the selected window. 4651 "Display BUFFER in the selected window.
4669If this succeeds, return the selected window. 4652This fails if ALIST has a non-nil `inhibit-same-window' entry, or
4670 4653if the selected window is a minibuffer window or is dedicated to
4671This fails if the selected window is a minibuffer window or is 4654another buffer; in that case, return nil. Otherwise, return the
4672dedicated to another buffer, or if ALIST has a non-nil 4655selected window."
4673`inhibit-same-window' entry. In that case, return nil."
4674 (unless (or (cdr (assq 'inhibit-same-window alist)) 4656 (unless (or (cdr (assq 'inhibit-same-window alist))
4675 (window-minibuffer-p) 4657 (window-minibuffer-p)
4676 (window-dedicated-p)) 4658 (window-dedicated-p))
4677 (display-buffer-record-window 'reuse-window (selected-window) buffer) 4659 (display-buffer-record-window 'reuse-window (selected-window) buffer)
4678 (window--display-buffer-2 buffer (selected-window)))) 4660 (window--display-buffer-2 buffer (selected-window))))
4679 4661
4680(defun display-buffer-maybe-same-window (buffer alist) 4662(defun display-buffer--maybe-same-window (buffer alist)
4681 "Try to display BUFFER in the selected window. 4663 "Conditionally display BUFFER in the selected window.
4682This acts like `display-buffer-same-window', except that it also 4664If `same-window-p' returns non-nil for BUFFER's name, call
4683fails if `same-window-p' returns nil for this buffer." 4665`display-buffer-same-window' and return its value. Otherwise,
4666return nil."
4684 (and (same-window-p (buffer-name buffer)) 4667 (and (same-window-p (buffer-name buffer))
4685 (display-buffer-same-window buffer alist))) 4668 (display-buffer-same-window buffer alist)))
4686 4669
4687(defun display-buffer-reuse-window (buffer alist) 4670(defun display-buffer-reuse-window (buffer alist)
4688 "Return a window that is already displaying BUFFER. 4671 "Return a window that is already displaying BUFFER.
4689If no usable window is found, return nil. 4672Return nil if no usable window is found.
4690 4673
4691If ALIST has a non-nil `inhibit-same-window' entry, the same 4674If ALIST has a non-nil `inhibit-same-window' entry, the selected
4692window cannot be reused. 4675window is not eligible for reuse.
4693 4676
4694If ALIST contains a `reuse-frame' entry, that determines the 4677If ALIST contains a `reusable-frames' entry, its value determines
4695frames to check for a window displaying the buffer. If the entry 4678which frames to search for a reusable window:
4696is omitted or the value is nil, check only this frame. The value 4679 nil -- the selected frame (actually the last non-minibuffer frame)
4697can also be a specific frame, `visible' (all visible frames), 4680 A frame -- just that frame
46980 (all frames on the current terminal), or t (all frames)." 4681 `visible' -- all visible frames
4699 (let* ((can-use-selected-window 4682 0 -- all frames on the current terminal
4700 (not (cdr (assq 'inhibit-same-window alist)))) 4683 t -- all frames.
4701 (frames (or (cdr (assq 'reuse-frame alist)) 4684
4702 (last-nonminibuffer-frame))) 4685If ALIST contains no `reusable-frames' entry, search just the
4703 (window (catch 'found 4686selected frame if `display-buffer-reuse-frames' and
4704 (dolist (window (get-buffer-window-list 4687`pop-up-frames' are both nil; search all frames on the current
4705 buffer 'nomini frames)) 4688terminal if either of those variables is non-nil."
4706 (when (or can-use-selected-window 4689 (let* ((alist-entry (assq 'reusable-frames alist))
4707 (not (eq (selected-window) window))) 4690 (frames (cond (alist-entry (cdr alist-entry))
4708 (throw 'found window)))))) 4691 ((if (eq pop-up-frames 'graphic-only)
4692 (display-graphic-p)
4693 pop-up-frames)
4694 0)
4695 (display-buffer-reuse-frames 0)
4696 (t (last-nonminibuffer-frame))))
4697 (window (if (and (eq buffer (window-buffer))
4698 (not (cdr (assq 'inhibit-same-window alist))))
4699 (selected-window)
4700 (car (delq (selected-window)
4701 (get-buffer-window-list buffer 'nomini
4702 frames))))))
4709 (when window 4703 (when window
4710 (display-buffer-record-window 'reuse-window window buffer) 4704 (display-buffer-record-window 'reuse-window window buffer)
4711 (window--display-buffer-1 window)))) 4705 (window--display-buffer-1 window))))
4712 4706
4707(defun display-buffer--special (buffer alist)
4708 "Try to display BUFFER using `special-display-function'.
4709Call `special-display-p' on BUFFER's name, and if that returns
4710non-nil, call `special-display-function' on BUFFER."
4711 (and special-display-function
4712 ;; `special-display-p' returns either t or a list of frame
4713 ;; parameters to pass to `special-display-function'.
4714 (let ((pars (special-display-p (buffer-name buffer))))
4715 (when pars
4716 (funcall special-display-function
4717 buffer (if (listp pars) pars))))))
4718
4713(defun display-buffer-pop-up-frame (buffer alist) 4719(defun display-buffer-pop-up-frame (buffer alist)
4714 "Display BUFFER in a new frame. 4720 "Display BUFFER in a new frame.
4715This works by calling `pop-up-frame-function'. If sucessful, 4721This works by calling `pop-up-frame-function'. If successful,
4716return the window on the new frame; otherwise return nil." 4722return the window used; otherwise return nil."
4717 (let ((fun pop-up-frame-function) 4723 (let ((fun pop-up-frame-function)
4718 frame window) 4724 frame window)
4719 (when (and fun 4725 (when (and fun
@@ -4751,42 +4757,20 @@ If sucessful, return the new window; otherwise return nil."
4751 (set-window-prev-buffers window nil) 4757 (set-window-prev-buffers window nil)
4752 window))) 4758 window)))
4753 4759
4754;; This display action function groups together some lower-level ones: 4760(defun display-buffer--maybe-pop-up-frame-or-window (buffer alist)
4755(defun display-buffer-reuse-or-pop-window (buffer alist) 4761 "Try displaying BUFFER based on `pop-up-frames' or `pop-up-windows'.
4756 "Display BUFFER in some window other than the selected one. 4762
4757This attempts to call the following functions (in order): 4763If `pop-up-frames' is non-nil (and not `graphic-only' on a
4758 - `display-buffer-reuse-window', ensuring that it checks all 4764text-only terminal), try with `display-buffer-pop-up-frame'.
4759 frames on this terminal if `display-buffer-reuse-frames' or 4765
4760 `pop-up-frames' is non-nil. 4766If that cannot be done, and `pop-up-windows' is non-nil, try
4761 - `special-display-function', if it is available. 4767again with `display-buffer-pop-up-window'."
4762 - `display-buffer-pop-up-frame', if specified by `pop-up-frames'. 4768 (or (and (if (eq pop-up-frames 'graphic-only)
4763 - `display-buffer-pop-up-window', if specified by `pop-up-windows'. 4769 (display-graphic-p)
4764 4770 pop-up-frames)
4765If BUFFER is sucessfully display, return its window; otherwise 4771 (display-buffer-pop-up-frame buffer alist))
4766return nil." 4772 (and pop-up-windows
4767 (let ((use-pop-up-frames (if (eq pop-up-frames 'graphic-only) 4773 (display-buffer-pop-up-window buffer alist))))
4768 (display-graphic-p)
4769 pop-up-frames)))
4770 (or (display-buffer-reuse-window
4771 buffer
4772 ;; If `display-buffer-reuse-frames' or `pop-up-frames' is
4773 ;; non-nil, check all frames on this terminal.
4774 (if (and (null (cdr (assq 'reuse-frame alist)))
4775 (or use-pop-up-frames display-buffer-reuse-frames))
4776 (cons '(reuse-frame . 0) alist)
4777 alist))
4778 ;; Try with `special-display-function':
4779 (and special-display-function
4780 ;; `special-display-p' returns either t or a list of frame
4781 ;; parameters to pass to `special-display-function'.
4782 (let ((pars (special-display-p (buffer-name buffer))))
4783 (when pars
4784 (funcall special-display-function
4785 buffer (if (listp pars) pars)))))
4786 (and use-pop-up-frames
4787 (display-buffer-pop-up-frame buffer alist))
4788 (and pop-up-windows
4789 (display-buffer-pop-up-window buffer alist)))))
4790 4774
4791(defun display-buffer-use-some-window (buffer alist) 4775(defun display-buffer-use-some-window (buffer alist)
4792 "Display BUFFER in an existing window. 4776 "Display BUFFER in an existing window.
@@ -4802,10 +4786,7 @@ return the window. If no suitable window is found, return nil."
4802 (selected-window))) 4786 (selected-window)))
4803 (frame (or (window--frame-usable-p (selected-frame)) 4787 (frame (or (window--frame-usable-p (selected-frame))
4804 (window--frame-usable-p (last-nonminibuffer-frame)))) 4788 (window--frame-usable-p (last-nonminibuffer-frame))))
4805 (use-pop-up-frames (if (eq pop-up-frames 'graphic-only) 4789 window)
4806 (display-graphic-p)
4807 pop-up-frames))
4808 window popped-up-frame)
4809 (unwind-protect 4790 (unwind-protect
4810 (setq window 4791 (setq window
4811 ;; Reuse an existing window. 4792 ;; Reuse an existing window.
@@ -4819,17 +4800,12 @@ return the window. If no suitable window is found, return nil."
4819 (unless (and not-this-window 4800 (unless (and not-this-window
4820 (eq window (selected-window))) 4801 (eq window (selected-window)))
4821 window)) 4802 window))
4822 (get-largest-window 0) 4803 (get-largest-window 0)))
4823 (and use-pop-up-frames
4824 (prog1
4825 (frame-selected-window (funcall pop-up-frame-function))
4826 (setq popped-up-frame t)))))
4827 (when (window-live-p window-to-undedicate) 4804 (when (window-live-p window-to-undedicate)
4828 ;; Restore dedicated status of selected window. 4805 ;; Restore dedicated status of selected window.
4829 (set-window-dedicated-p window-to-undedicate nil))) 4806 (set-window-dedicated-p window-to-undedicate nil)))
4830 (when window 4807 (when window
4831 (display-buffer-record-window 4808 (display-buffer-record-window 'reuse-window window buffer)
4832 (if popped-up-frame 'pop-up-frame 'reuse-window) window buffer)
4833 (window--even-window-heights window) 4809 (window--even-window-heights window)
4834 (window--display-buffer-2 buffer window)))) 4810 (window--display-buffer-2 buffer window))))
4835 4811
@@ -4856,13 +4832,11 @@ Optional third arg NORECORD non-nil means do not put this buffer
4856at the front of the list of recently selected ones." 4832at the front of the list of recently selected ones."
4857 (interactive (list (read-buffer "Pop to buffer: " (other-buffer)) 4833 (interactive (list (read-buffer "Pop to buffer: " (other-buffer))
4858 (if current-prefix-arg t))) 4834 (if current-prefix-arg t)))
4859 (setq buffer (window-normalize-buffer-to-display 4835 (setq buffer (window-normalize-buffer-to-switch-to buffer))
4860 ;; BUFFER nil means another buffer.
4861 (or buffer (other-buffer))))
4862 (set-buffer buffer) 4836 (set-buffer buffer)
4863 (let* ((old-window (selected-window)) 4837 (let* ((old-window (selected-window))
4864 (old-frame (selected-frame)) 4838 (old-frame (selected-frame))
4865 (window (display-buffer (current-buffer) action)) 4839 (window (display-buffer buffer action))
4866 (frame (window-frame window))) 4840 (frame (window-frame window)))
4867 (if (eq frame old-frame) 4841 (if (eq frame old-frame)
4868 ;; Make sure new window is selected (Bug#8615), (Bug#6954). 4842 ;; Make sure new window is selected (Bug#8615), (Bug#6954).
@@ -4936,18 +4910,7 @@ Return the buffer switched to."
4936 (list (read-buffer-to-switch "Switch to buffer: ") nil nil)) 4910 (list (read-buffer-to-switch "Switch to buffer: ") nil nil))
4937 (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name))) 4911 (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)))
4938 (if (null force-same-window) 4912 (if (null force-same-window)
4939 (cond 4913 (pop-to-buffer buffer display-buffer--same-window-action norecord)
4940 ((eq buffer (window-buffer))
4941 (unless norecord
4942 (select-window (selected-window)))
4943 (set-buffer buffer))
4944 ((or (window-minibuffer-p) (window-dedicated-p))
4945 (pop-to-buffer buffer))
4946 (t
4947 (set-window-buffer nil buffer)
4948 (unless norecord
4949 (select-window (selected-window)))
4950 (set-buffer buffer)))
4951 (cond 4914 (cond
4952 ;; Don't call set-window-buffer if it's not needed since it 4915 ;; Don't call set-window-buffer if it's not needed since it
4953 ;; might signal an error (e.g. if the window is dedicated). 4916 ;; might signal an error (e.g. if the window is dedicated).
@@ -4983,10 +4946,8 @@ This uses the function `display-buffer' as a subroutine; see its
4983documentation for additional customization information." 4946documentation for additional customization information."
4984 (interactive 4947 (interactive
4985 (list (read-buffer-to-switch "Switch to buffer in other window: "))) 4948 (list (read-buffer-to-switch "Switch to buffer in other window: ")))
4986 (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)) 4949 (let ((pop-up-windows t))
4987 (pop-up-windows t) 4950 (pop-to-buffer buffer-or-name t norecord)))
4988 same-window-buffer-names same-window-regexps)
4989 (pop-to-buffer buffer t norecord)))
4990 4951
4991(defun switch-to-buffer-other-frame (buffer-or-name &optional norecord) 4952(defun switch-to-buffer-other-frame (buffer-or-name &optional norecord)
4992 "Switch to buffer BUFFER-OR-NAME in another frame. 4953 "Switch to buffer BUFFER-OR-NAME in another frame.
@@ -5009,10 +4970,7 @@ This uses the function `display-buffer' as a subroutine; see its
5009documentation for additional customization information." 4970documentation for additional customization information."
5010 (interactive 4971 (interactive
5011 (list (read-buffer-to-switch "Switch to buffer in other frame: "))) 4972 (list (read-buffer-to-switch "Switch to buffer in other frame: ")))
5012 (let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)) 4973 (pop-to-buffer buffer-or-name display-buffer--other-frame-action norecord))
5013 (pop-up-frames t)
5014 same-window-buffer-names same-window-regexps)
5015 (pop-to-buffer buffer t norecord)))
5016 4974
5017(defun set-window-text-height (window height) 4975(defun set-window-text-height (window height)
5018 "Set the height in lines of the text display area of WINDOW to HEIGHT. 4976 "Set the height in lines of the text display area of WINDOW to HEIGHT.
diff --git a/lisp/woman.el b/lisp/woman.el
index c6bd4a4c8d1..75a36d6ac36 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -2621,15 +2621,27 @@ If DELETE is non-nil then delete from point."
2621 ;; Process matching .el anything: 2621 ;; Process matching .el anything:
2622 (cond ((string= request "ie") 2622 (cond ((string= request "ie")
2623 ;; Discard unless previous .ie c `evaluated to false'. 2623 ;; Discard unless previous .ie c `evaluated to false'.
2624 ;; IIUC, an .ie must be followed by an .el.
2625 ;; (An if with no else uses .if rather than .ie.)
2626 ;; TODO warn if no .el found?
2627 ;; The .el should come immediately after the .ie (modulo
2628 ;; comments etc), but this searches to eob.
2624 (cond ((re-search-forward "^[.'][ \t]*el[ \t]*" nil t) 2629 (cond ((re-search-forward "^[.'][ \t]*el[ \t]*" nil t)
2625 (woman-delete-match 0) 2630 (woman-delete-match 0)
2626 (woman-if-body "el" nil (not delete))))) 2631 (woman-if-body "el" nil (not delete)))))
2632;;; FIXME neither the comment nor the code here make sense to me.
2633;;; This branch was executed for an else (any else, AFAICS).
2634;;; At this point, the else in question has already been processed above.
2635;;; The re-search will find the _next_ else, if there is one, and
2636;;; delete it. If there is one, it belongs to another if block. (Bug#9447)
2637;;; woman0-el does not need this bit either.
2627 ;; Got here after processing a single-line `.ie' as a body 2638 ;; Got here after processing a single-line `.ie' as a body
2628 ;; clause to be discarded: 2639 ;; clause to be discarded:
2629 ((string= request "el") 2640;;; ((string= request "el")
2630 (cond ((re-search-forward "^[.'][ \t]*el[ \t]*" nil t) 2641;;; (cond ((re-search-forward "^[.'][ \t]*el[ \t]*" nil t)
2631 (woman-delete-match 0) 2642;;; (woman-delete-match 0)
2632 (woman-if-body "el" nil t))))) 2643;;; (woman-if-body "el" nil t)))))
2644 )
2633 (goto-char from))) 2645 (goto-char from)))
2634 2646
2635(defun woman0-el () 2647(defun woman0-el ()
@@ -2925,11 +2937,15 @@ interpolated by `\*x' and `\*(xx' escapes."
2925 ("bv" "|") ; bold vertical 2937 ("bv" "|") ; bold vertical
2926 2938
2927 ;; groff etc. extensions: 2939 ;; groff etc. extensions:
2940 ;; List these via eg man -Tdvi groff_char > groff_char.dvi.
2928 ("lq" "\"") 2941 ("lq" "\"")
2929 ("rq" "\"") 2942 ("rq" "\"")
2930 ("aq" "'") 2943 ("aq" "'")
2931 ("ha" "^") 2944 ("ha" "^")
2932 ("ti" "~") 2945 ("ti" "~")
2946 ("oq" "‘") ; u2018
2947 ("cq" "’") ; u2019
2948 ("hy" "‐") ; u2010
2933 ) 2949 )
2934 "Alist of special character codes with ASCII and extended-font equivalents. 2950 "Alist of special character codes with ASCII and extended-font equivalents.
2935Each alist elements has the form 2951Each alist elements has the form
@@ -4582,4 +4598,9 @@ logging the message."
4582 4598
4583(provide 'woman) 4599(provide 'woman)
4584 4600
4601
4602;; Local Variables:
4603;; coding: utf-8
4604;; End:
4605
4585;;; woman.el ends here 4606;;; woman.el ends here
diff --git a/m4/include_next.m4 b/m4/include_next.m4
index ebf081a1101..14a1009b5d4 100644
--- a/m4/include_next.m4
+++ b/m4/include_next.m4
@@ -1,4 +1,4 @@
1# include_next.m4 serial 20 1# include_next.m4 serial 21
2dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -207,17 +207,34 @@ dnl until we can assume autoconf 2.64 or newer.
207 aix*) gl_absname_cpp="$ac_cpp -C" ;; 207 aix*) gl_absname_cpp="$ac_cpp -C" ;;
208 *) gl_absname_cpp="$ac_cpp" ;; 208 *) gl_absname_cpp="$ac_cpp" ;;
209 esac 209 esac
210changequote(,)
211 case "$host_os" in
212 mingw*)
213 dnl For the sake of native Windows compilers (excluding gcc),
214 dnl treat backslash as a directory separator, like /.
215 dnl Actually, these compilers use a double-backslash as
216 dnl directory separator, inside the
217 dnl # line "filename"
218 dnl directives.
219 gl_dirsep_regex='[/\\]'
220 ;;
221 *)
222 gl_dirsep_regex='/'
223 ;;
224 esac
225changequote([,])
226 gl_absolute_header_sed='\#'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[#{
227 s#.*"\(.*'"${gl_dirsep_regex}"']m4_defn([gl_HEADER_NAME])[\)".*#\1#
228 s#^/[^/]#//&#
229 p
230 q
231 }'
210 dnl eval is necessary to expand gl_absname_cpp. 232 dnl eval is necessary to expand gl_absname_cpp.
211 dnl Ultrix and Pyramid sh refuse to redirect output of eval, 233 dnl Ultrix and Pyramid sh refuse to redirect output of eval,
212 dnl so use subshell. 234 dnl so use subshell.
213 AS_VAR_SET(gl_next_header, 235 AS_VAR_SET(gl_next_header,
214 ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | 236 ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
215 sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{ 237 sed -n "$gl_absolute_header_sed"`'"'])
216 s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
217 s#^/[^/]#//&#
218 p
219 q
220 }'`'"'])
221 m4_if([$2], [check], 238 m4_if([$2], [check],
222 [else 239 [else
223 AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) 240 AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
diff --git a/m4/nocrash.m4 b/m4/nocrash.m4
index 0cc0d53ebf7..60aad952956 100644
--- a/m4/nocrash.m4
+++ b/m4/nocrash.m4
@@ -1,4 +1,4 @@
1# nocrash.m4 serial 2 1# nocrash.m4 serial 3
2dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -79,6 +79,34 @@ nocrash_init (void)
79 } 79 }
80 } 80 }
81} 81}
82#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
83/* Avoid a crash on native Windows. */
84#define WIN32_LEAN_AND_MEAN
85#include <windows.h>
86#include <winerror.h>
87static LONG WINAPI
88exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
89{
90 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
91 {
92 case EXCEPTION_ACCESS_VIOLATION:
93 case EXCEPTION_IN_PAGE_ERROR:
94 case EXCEPTION_STACK_OVERFLOW:
95 case EXCEPTION_GUARD_PAGE:
96 case EXCEPTION_PRIV_INSTRUCTION:
97 case EXCEPTION_ILLEGAL_INSTRUCTION:
98 case EXCEPTION_DATATYPE_MISALIGNMENT:
99 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
100 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
101 exit (1);
102 }
103 return EXCEPTION_CONTINUE_SEARCH;
104}
105static void
106nocrash_init (void)
107{
108 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
109}
82#else 110#else
83/* Avoid a crash on POSIX systems. */ 111/* Avoid a crash on POSIX systems. */
84#include <signal.h> 112#include <signal.h>
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
index b9536fb0e3c..c3f25386ca2 100644
--- a/m4/signal_h.m4
+++ b/m4/signal_h.m4
@@ -1,4 +1,4 @@
1# signal_h.m4 serial 16 1# signal_h.m4 serial 17
2dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -17,6 +17,9 @@ AC_DEFUN([gl_SIGNAL_H],
17#include <signal.h> 17#include <signal.h>
18 ]]) 18 ]])
19 19
20 dnl Ensure the type pid_t gets defined.
21 AC_REQUIRE([AC_TYPE_PID_T])
22
20 AC_REQUIRE([AC_TYPE_UID_T]) 23 AC_REQUIRE([AC_TYPE_UID_T])
21 24
22 dnl Persuade glibc <signal.h> to define sighandler_t. 25 dnl Persuade glibc <signal.h> to define sighandler_t.
diff --git a/m4/time_h.m4 b/m4/time_h.m4
index 615da1cfd39..6e6394fdc90 100644
--- a/m4/time_h.m4
+++ b/m4/time_h.m4
@@ -2,7 +2,7 @@
2 2
3# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. 3# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
4 4
5# serial 4 5# serial 5
6 6
7# This file is free software; the Free Software Foundation 7# This file is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it, 8# gives unlimited permission to copy and/or distribute it,
@@ -23,6 +23,9 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
23 AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) 23 AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
24 gl_NEXT_HEADERS([time.h]) 24 gl_NEXT_HEADERS([time.h])
25 AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) 25 AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
26
27 dnl Ensure the type pid_t gets defined.
28 AC_REQUIRE([AC_TYPE_PID_T])
26]) 29])
27 30
28dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared 31dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
index fb6fe077265..6483b815d60 100644
--- a/m4/unistd_h.m4
+++ b/m4/unistd_h.m4
@@ -1,4 +1,4 @@
1# unistd_h.m4 serial 56 1# unistd_h.m4 serial 57
2dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. 2dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
@@ -21,6 +21,9 @@ AC_DEFUN([gl_UNISTD_H],
21 fi 21 fi
22 AC_SUBST([HAVE_UNISTD_H]) 22 AC_SUBST([HAVE_UNISTD_H])
23 23
24 dnl Ensure the type pid_t gets defined.
25 AC_REQUIRE([AC_TYPE_PID_T])
26
24 dnl Check for declarations of anything we want to poison if the 27 dnl Check for declarations of anything we want to poison if the
25 dnl corresponding gnulib module is not in use. 28 dnl corresponding gnulib module is not in use.
26 gl_WARN_ON_USE_PREPARE([[#include <unistd.h> 29 gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
diff --git a/nt/config.nt b/nt/config.nt
index ae3807538c0..1b56289bbc0 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -470,7 +470,7 @@ extern char *getenv ();
470#define BITS_PER_LONG 32 470#define BITS_PER_LONG 32
471#endif 471#endif
472 472
473#if defined(__MINGW32__) || _MSC_VER >= 1400 473#if defined (__MINGW32__) || _MSC_VER >= 1400
474 474
475/* Define to 1 if the system has the type `long long int'. */ 475/* Define to 1 if the system has the type `long long int'. */
476# define HAVE_LONG_LONG_INT 1 476# define HAVE_LONG_LONG_INT 1
diff --git a/src/ChangeLog b/src/ChangeLog
index a4c985b1a0c..9f8361153a1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,83 @@
12011-09-14 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
4 computation of loop end. Reported by Johan Bockgård
5 <bojohan@gnu.org>.
6
72011-09-13 Chong Yidong <cyd@stupidchicken.com>
8
9 * frame.c (Fother_visible_frames_p): Function deleted.
10
112011-09-12 Eli Zaretskii <eliz@gnu.org>
12
13 * indent.c (compute_motion): Process display vector front to back
14 rather than the other way around. (Bug#2496)
15
162011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
17
18 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
19
202011-09-11 Chong Yidong <cyd@stupidchicken.com>
21
22 * minibuf.c (Fread_from_minibuffer): Doc fix.
23
242011-09-11 Eli Zaretskii <eliz@gnu.org>
25
26 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
27 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
28
292011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
30
31 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
32 value for non-existent files.
33
342011-09-11 Eli Zaretskii <eliz@gnu.org>
35
36 * fileio.c (Finsert_file_contents): If the file cannot be opened,
37 set its "size" to -1. This will set the modtime_size field of
38 the corresponding buffer to -1, which is what
39 verify-visited-file-modtime expects for files that do not exist.
40 (Bug#9139)
41
422011-09-11 Paul Eggert <eggert@cs.ucla.edu>
43
44 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
45 here ...
46 * lisp.h: ... from here. push_key_description is no longer
47 defined in keyboard.c, so its declaration should not be in
48 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
49 logically belongs with push_key_description.
50
512011-09-10 Paul Eggert <eggert@cs.ucla.edu>
52
53 * buffer.h: Include <sys/types.h> instead of <time.h>.
54 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
55 Problem reported by Herbert J. Skuhra.
56
572011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
58
59 * xml.c (parse_region): Make the parsing work for
60 non-comment-starting XML files again (bug#9144).
61
622011-09-10 Andreas Schwab <schwab@linux-m68k.org>
63
64 * image.c (gif_load): Fix calculation of bottom and right corner.
65 (Bug#9468)
66
672011-09-10 Eli Zaretskii <eliz@gnu.org>
68
69 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
70 redisplay in small windows.
71
722011-09-09 Eli Zaretskii <eliz@gnu.org>
73
74 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
75
762011-09-08 Martin Rudalics <rudalics@gmx.at>
77
78 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
79 Operate on live windows only.
80
12011-09-08 Juanma Barranquero <lekktu@gmail.com> 812011-09-08 Juanma Barranquero <lekktu@gmail.com>
2 82
3 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused. 83 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
@@ -891,7 +971,7 @@
891 971
892 * nsfns.m (as_script, as_result, as_status): New static variables. 972 * nsfns.m (as_script, as_result, as_status): New static variables.
893 (ns_run_ascript): New function. 973 (ns_run_ascript): New function.
894 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined 974 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
895 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start 975 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
896 the event loop. Get status from as_status (Bug#7276). 976 the event loop. Get status from as_status (Bug#7276).
897 977
@@ -1067,7 +1147,7 @@
1067 1147
1068 * xdisp.c: Remove one-slot cache of display string positions. 1148 * xdisp.c: Remove one-slot cache of display string positions.
1069 (compute_display_string_pos): Accept an additional argument 1149 (compute_display_string_pos): Accept an additional argument
1070 DISP_PROP_P; callers changed. Scan at most 5K characters forward 1150 DISP_PROP_P; callers changed. Scan at most 5K characters forward
1071 for a display string or property. If found, set DISP_PROP_P 1151 for a display string or property. If found, set DISP_PROP_P
1072 non-zero. 1152 non-zero.
1073 1153
@@ -2085,7 +2165,7 @@
2085 (Fput_unicode_property_internal): New functions. 2165 (Fput_unicode_property_internal): New functions.
2086 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr 2166 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
2087 Sunicode_property_table_internal, Sget_unicode_property_internal, 2167 Sunicode_property_table_internal, Sget_unicode_property_internal,
2088 and Sput_unicode_property_internal. Defvar_lisp 2168 and Sput_unicode_property_internal. Defvar_lisp
2089 char-code-property-alist. 2169 char-code-property-alist.
2090 2170
2091 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of 2171 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
@@ -2117,7 +2197,7 @@
2117 (store_config_changed_event): Add comment. 2197 (store_config_changed_event): Add comment.
2118 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style) 2198 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
2119 (store_tool_bar_style_changed): New functions. 2199 (store_tool_bar_style_changed): New functions.
2120 (store_monospaced_changed): Add comment. Call dpyinfo_valid. 2200 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
2121 (struct xsettings): Move font inside HAVE_XFT. 2201 (struct xsettings): Move font inside HAVE_XFT.
2122 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines. 2202 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
2123 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT. 2203 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
@@ -2126,7 +2206,7 @@
2126 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME 2206 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
2127 also. 2207 also.
2128 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines. 2208 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
2129 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT. 2209 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
2130 (something_changed_gconfCB): Rename from something_changedCB. 2210 (something_changed_gconfCB): Rename from something_changedCB.
2131 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also. 2211 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
2132 (parse_settings): Move check for font inside HAVE_XFT. 2212 (parse_settings): Move check for font inside HAVE_XFT.
diff --git a/src/alloc.c b/src/alloc.c
index 2d256800466..ad1741e308f 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1880,7 +1880,7 @@ check_string_free_list (void)
1880 while (s != NULL) 1880 while (s != NULL)
1881 { 1881 {
1882 if ((uintptr_t) s < 1024) 1882 if ((uintptr_t) s < 1024)
1883 abort(); 1883 abort ();
1884 s = NEXT_FREE_LISP_STRING (s); 1884 s = NEXT_FREE_LISP_STRING (s);
1885 } 1885 }
1886} 1886}
@@ -2531,17 +2531,17 @@ make_uninit_multibyte_string (EMACS_INT nchars, EMACS_INT nbytes)
2531 / (sizeof (struct Lisp_Float) * CHAR_BIT + 1)) 2531 / (sizeof (struct Lisp_Float) * CHAR_BIT + 1))
2532 2532
2533#define GETMARKBIT(block,n) \ 2533#define GETMARKBIT(block,n) \
2534 (((block)->gcmarkbits[(n) / (sizeof(int) * CHAR_BIT)] \ 2534 (((block)->gcmarkbits[(n) / (sizeof (int) * CHAR_BIT)] \
2535 >> ((n) % (sizeof(int) * CHAR_BIT))) \ 2535 >> ((n) % (sizeof (int) * CHAR_BIT))) \
2536 & 1) 2536 & 1)
2537 2537
2538#define SETMARKBIT(block,n) \ 2538#define SETMARKBIT(block,n) \
2539 (block)->gcmarkbits[(n) / (sizeof(int) * CHAR_BIT)] \ 2539 (block)->gcmarkbits[(n) / (sizeof (int) * CHAR_BIT)] \
2540 |= 1 << ((n) % (sizeof(int) * CHAR_BIT)) 2540 |= 1 << ((n) % (sizeof (int) * CHAR_BIT))
2541 2541
2542#define UNSETMARKBIT(block,n) \ 2542#define UNSETMARKBIT(block,n) \
2543 (block)->gcmarkbits[(n) / (sizeof(int) * CHAR_BIT)] \ 2543 (block)->gcmarkbits[(n) / (sizeof (int) * CHAR_BIT)] \
2544 &= ~(1 << ((n) % (sizeof(int) * CHAR_BIT))) 2544 &= ~(1 << ((n) % (sizeof (int) * CHAR_BIT)))
2545 2545
2546#define FLOAT_BLOCK(fptr) \ 2546#define FLOAT_BLOCK(fptr) \
2547 ((struct float_block *) (((uintptr_t) (fptr)) & ~(BLOCK_ALIGN - 1))) 2547 ((struct float_block *) (((uintptr_t) (fptr)) & ~(BLOCK_ALIGN - 1)))
@@ -2553,7 +2553,7 @@ struct float_block
2553{ 2553{
2554 /* Place `floats' at the beginning, to ease up FLOAT_INDEX's job. */ 2554 /* Place `floats' at the beginning, to ease up FLOAT_INDEX's job. */
2555 struct Lisp_Float floats[FLOAT_BLOCK_SIZE]; 2555 struct Lisp_Float floats[FLOAT_BLOCK_SIZE];
2556 int gcmarkbits[1 + FLOAT_BLOCK_SIZE / (sizeof(int) * CHAR_BIT)]; 2556 int gcmarkbits[1 + FLOAT_BLOCK_SIZE / (sizeof (int) * CHAR_BIT)];
2557 struct float_block *next; 2557 struct float_block *next;
2558}; 2558};
2559 2559
@@ -2659,7 +2659,7 @@ struct cons_block
2659{ 2659{
2660 /* Place `conses' at the beginning, to ease up CONS_INDEX's job. */ 2660 /* Place `conses' at the beginning, to ease up CONS_INDEX's job. */
2661 struct Lisp_Cons conses[CONS_BLOCK_SIZE]; 2661 struct Lisp_Cons conses[CONS_BLOCK_SIZE];
2662 int gcmarkbits[1 + CONS_BLOCK_SIZE / (sizeof(int) * CHAR_BIT)]; 2662 int gcmarkbits[1 + CONS_BLOCK_SIZE / (sizeof (int) * CHAR_BIT)];
2663 struct cons_block *next; 2663 struct cons_block *next;
2664}; 2664};
2665 2665
@@ -2964,7 +2964,7 @@ allocate_hash_table (void)
2964struct window * 2964struct window *
2965allocate_window (void) 2965allocate_window (void)
2966{ 2966{
2967 return ALLOCATE_PSEUDOVECTOR(struct window, current_matrix, PVEC_WINDOW); 2967 return ALLOCATE_PSEUDOVECTOR (struct window, current_matrix, PVEC_WINDOW);
2968} 2968}
2969 2969
2970 2970
@@ -4159,7 +4159,7 @@ mark_maybe_pointer (void *p)
4159 break; 4159 break;
4160 4160
4161 case MEM_TYPE_BUFFER: 4161 case MEM_TYPE_BUFFER:
4162 if (live_buffer_p (m, p) && !VECTOR_MARKED_P((struct buffer *)p)) 4162 if (live_buffer_p (m, p) && !VECTOR_MARKED_P ((struct buffer *)p))
4163 XSETVECTOR (obj, p); 4163 XSETVECTOR (obj, p);
4164 break; 4164 break;
4165 4165
diff --git a/src/buffer.h b/src/buffer.h
index c50cfe56c77..73628fe6dfc 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -18,7 +18,7 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21#include <time.h> /* for time_t */ 21#include <sys/types.h> /* for off_t, time_t */
22 22
23/* Accessing the parameters of the current buffer. */ 23/* Accessing the parameters of the current buffer. */
24 24
diff --git a/src/callproc.c b/src/callproc.c
index 1bdb57a27d0..97531f73848 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -691,7 +691,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
691 /* Enable sending signal if user quits below. */ 691 /* Enable sending signal if user quits below. */
692 call_process_exited = 0; 692 call_process_exited = 0;
693 693
694#if defined(MSDOS) 694#if defined (MSDOS)
695 /* MSDOS needs different cleanup information. */ 695 /* MSDOS needs different cleanup information. */
696 record_unwind_protect (call_process_cleanup, 696 record_unwind_protect (call_process_cleanup,
697 Fcons (Fcurrent_buffer (), 697 Fcons (Fcurrent_buffer (),
@@ -1315,7 +1315,7 @@ child_setup (int in, int out, int err, register char **new_argv, int set_pgrp, L
1315 if (err != in && err != out) 1315 if (err != in && err != out)
1316 emacs_close (err); 1316 emacs_close (err);
1317 1317
1318#if defined(USG) 1318#if defined (USG)
1319#ifndef SETPGRP_RELEASES_CTTY 1319#ifndef SETPGRP_RELEASES_CTTY
1320 setpgrp (); /* No arguments but equivalent in this case */ 1320 setpgrp (); /* No arguments but equivalent in this case */
1321#endif 1321#endif
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 50ad4eeda74..77222c9e0a3 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -223,7 +223,7 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e)
223 record_change (start, end - start); 223 record_change (start, end - start);
224 start_byte = CHAR_TO_BYTE (start); 224 start_byte = CHAR_TO_BYTE (start);
225 225
226 SETUP_BUFFER_SYNTAX_TABLE(); /* For syntax_prefix_flag_p. */ 226 SETUP_BUFFER_SYNTAX_TABLE (); /* For syntax_prefix_flag_p. */
227 227
228 while (start < end) 228 while (start < end)
229 { 229 {
@@ -434,9 +434,9 @@ syms_of_casefiddle (void)
434void 434void
435keys_of_casefiddle (void) 435keys_of_casefiddle (void)
436{ 436{
437 initial_define_key (control_x_map, Ctl('U'), "upcase-region"); 437 initial_define_key (control_x_map, Ctl ('U'), "upcase-region");
438 Fput (intern ("upcase-region"), Qdisabled, Qt); 438 Fput (intern ("upcase-region"), Qdisabled, Qt);
439 initial_define_key (control_x_map, Ctl('L'), "downcase-region"); 439 initial_define_key (control_x_map, Ctl ('L'), "downcase-region");
440 Fput (intern ("downcase-region"), Qdisabled, Qt); 440 Fput (intern ("downcase-region"), Qdisabled, Qt);
441 441
442 initial_define_key (meta_map, 'u', "upcase-word"); 442 initial_define_key (meta_map, 'u', "upcase-word");
diff --git a/src/ccl.c b/src/ccl.c
index b28a284f70a..cb96eece5ee 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -61,7 +61,7 @@ static Lisp_Object Vccl_program_table;
61 61
62/* Return a hash table of id number ID. */ 62/* Return a hash table of id number ID. */
63#define GET_HASH_TABLE(id) \ 63#define GET_HASH_TABLE(id) \
64 (XHASH_TABLE (XCDR(XVECTOR(Vtranslation_hash_table_vector)->contents[(id)]))) 64 (XHASH_TABLE (XCDR (XVECTOR (Vtranslation_hash_table_vector)->contents[(id)])))
65 65
66/* CCL (Code Conversion Language) is a simple language which has 66/* CCL (Code Conversion Language) is a simple language which has
67 operations on one input buffer, one output buffer, and 7 registers. 67 operations on one input buffer, one output buffer, and 7 registers.
@@ -706,7 +706,7 @@ do \
706 ccl->status = CCL_STAT_SUCCESS; \ 706 ccl->status = CCL_STAT_SUCCESS; \
707 goto ccl_finish; \ 707 goto ccl_finish; \
708 } \ 708 } \
709while(0) 709while (0)
710 710
711/* Suspend CCL program because of reading from empty input buffer or 711/* Suspend CCL program because of reading from empty input buffer or
712 writing to full output buffer. When this program is resumed, the 712 writing to full output buffer. When this program is resumed, the
@@ -730,7 +730,7 @@ do \
730 ccl->status = CCL_STAT_INVALID_CMD; \ 730 ccl->status = CCL_STAT_INVALID_CMD; \
731 goto ccl_error_handler; \ 731 goto ccl_error_handler; \
732 } \ 732 } \
733while(0) 733while (0)
734 734
735#else 735#else
736 736
@@ -741,7 +741,7 @@ do \
741 ccl->status = CCL_STAT_INVALID_CMD; \ 741 ccl->status = CCL_STAT_INVALID_CMD; \
742 goto ccl_error_handler; \ 742 goto ccl_error_handler; \
743 } \ 743 } \
744while(0) 744while (0)
745 745
746#endif 746#endif
747 747
@@ -1419,7 +1419,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1419 else if (INTEGERP (content) && IN_INT_RANGE (XINT (content))) 1419 else if (INTEGERP (content) && IN_INT_RANGE (XINT (content)))
1420 { 1420 {
1421 reg[RRR] = i; 1421 reg[RRR] = i;
1422 reg[rrr] = XINT(content); 1422 reg[rrr] = XINT (content);
1423 break; 1423 break;
1424 } 1424 }
1425 else if (EQ (content, Qt) || EQ (content, Qlambda)) 1425 else if (EQ (content, Qt) || EQ (content, Qlambda))
@@ -1692,7 +1692,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1692 value = XCDR (content); 1692 value = XCDR (content);
1693 if (!INTEGERP (attrib) || !INTEGERP (value)) 1693 if (!INTEGERP (attrib) || !INTEGERP (value))
1694 continue; 1694 continue;
1695 reg[rrr] = XINT(value); 1695 reg[rrr] = XINT (value);
1696 break; 1696 break;
1697 } 1697 }
1698 else if (SYMBOLP (content)) 1698 else if (SYMBOLP (content))
@@ -1729,8 +1729,8 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1729 switch (ccl->status) 1729 switch (ccl->status)
1730 { 1730 {
1731 case CCL_STAT_INVALID_CMD: 1731 case CCL_STAT_INVALID_CMD:
1732 sprintf(msg, "\nCCL: Invalid command %x (ccl_code = %x) at %d.", 1732 sprintf (msg, "\nCCL: Invalid command %x (ccl_code = %x) at %d.",
1733 code & 0x1F, code, this_ic); 1733 code & 0x1F, code, this_ic);
1734#ifdef CCL_DEBUG 1734#ifdef CCL_DEBUG
1735 { 1735 {
1736 int i = ccl_backtrace_idx - 1; 1736 int i = ccl_backtrace_idx - 1;
@@ -1748,7 +1748,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1748 if (i < 0) i = CCL_DEBUG_BACKTRACE_LEN - 1; 1748 if (i < 0) i = CCL_DEBUG_BACKTRACE_LEN - 1;
1749 if (ccl_backtrace_table[i] == 0) 1749 if (ccl_backtrace_table[i] == 0)
1750 break; 1750 break;
1751 sprintf(msg, " %d", ccl_backtrace_table[i]); 1751 sprintf (msg, " %d", ccl_backtrace_table[i]);
1752 msglen = strlen (msg); 1752 msglen = strlen (msg);
1753 if (dst + msglen > (dst_bytes ? dst_end : src)) 1753 if (dst + msglen > (dst_bytes ? dst_end : src))
1754 break; 1754 break;
@@ -1762,11 +1762,11 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1762 1762
1763 case CCL_STAT_QUIT: 1763 case CCL_STAT_QUIT:
1764 if (! ccl->quit_silently) 1764 if (! ccl->quit_silently)
1765 sprintf(msg, "\nCCL: Quited."); 1765 sprintf (msg, "\nCCL: Quited.");
1766 break; 1766 break;
1767 1767
1768 default: 1768 default:
1769 sprintf(msg, "\nCCL: Unknown error type (%d)", ccl->status); 1769 sprintf (msg, "\nCCL: Unknown error type (%d)", ccl->status);
1770 } 1770 }
1771 1771
1772 msglen = strlen (msg); 1772 msglen = strlen (msg);
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 2a38d15873c..227d4e647e9 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -1880,7 +1880,7 @@ xd_read_queued_messages (int fd, void *data, int for_read)
1880 busp = CDR_SAFE (busp); 1880 busp = CDR_SAFE (busp);
1881 } 1881 }
1882 1882
1883 if (NILP(bus)) 1883 if (NILP (bus))
1884 return; 1884 return;
1885 1885
1886 /* We ignore all Lisp errors during the call. */ 1886 /* We ignore all Lisp errors during the call. */
diff --git a/src/dired.c b/src/dired.c
index 415f9ac5ae5..be94b16cf75 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -1003,7 +1003,7 @@ so last access time will always be midnight of that day. */)
1003 values[10] = INTEGER_TO_CONS (s.st_ino); 1003 values[10] = INTEGER_TO_CONS (s.st_ino);
1004 values[11] = INTEGER_TO_CONS (s.st_dev); 1004 values[11] = INTEGER_TO_CONS (s.st_dev);
1005 1005
1006 return Flist (sizeof(values) / sizeof(values[0]), values); 1006 return Flist (sizeof (values) / sizeof (values[0]), values);
1007} 1007}
1008 1008
1009DEFUN ("file-attributes-lessp", Ffile_attributes_lessp, Sfile_attributes_lessp, 2, 2, 0, 1009DEFUN ("file-attributes-lessp", Ffile_attributes_lessp, Sfile_attributes_lessp, 2, 2, 0,
diff --git a/src/dispextern.h b/src/dispextern.h
index 1b2df45086c..bc75dc5d2e6 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1290,10 +1290,10 @@ struct glyph_string
1290 unsigned padding_p : 1; 1290 unsigned padding_p : 1;
1291 1291
1292 /* The GC to use for drawing this glyph string. */ 1292 /* The GC to use for drawing this glyph string. */
1293#if defined(HAVE_X_WINDOWS) 1293#if defined (HAVE_X_WINDOWS)
1294 GC gc; 1294 GC gc;
1295#endif 1295#endif
1296#if defined(HAVE_NTGUI) 1296#if defined (HAVE_NTGUI)
1297 XGCValues *gc; 1297 XGCValues *gc;
1298 HDC hdc; 1298 HDC hdc;
1299#endif 1299#endif
diff --git a/src/dispnew.c b/src/dispnew.c
index abe09ed6a49..50b96b699f9 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -92,7 +92,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
92#endif 92#endif
93#endif /* not __GNU_LIBRARY__ */ 93#endif /* not __GNU_LIBRARY__ */
94 94
95#if defined(HAVE_TERM_H) && defined (GNU_LINUX) && defined (HAVE_LIBNCURSES) 95#if defined (HAVE_TERM_H) && defined (GNU_LINUX) && defined (HAVE_LIBNCURSES)
96#include <term.h> /* for tgetent */ 96#include <term.h> /* for tgetent */
97#endif 97#endif
98 98
@@ -4925,7 +4925,7 @@ count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct
4925 4925
4926/* Char insertion/deletion cost vector, from term.c */ 4926/* Char insertion/deletion cost vector, from term.c */
4927 4927
4928#define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_TOTAL_COLS((f))]) 4928#define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_TOTAL_COLS ((f))])
4929 4929
4930 4930
4931/* Perform a frame-based update on line VPOS in frame FRAME. */ 4931/* Perform a frame-based update on line VPOS in frame FRAME. */
@@ -5377,7 +5377,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p
5377 } 5377 }
5378 5378
5379 /* Add extra (default width) columns if clicked after EOL. */ 5379 /* Add extra (default width) columns if clicked after EOL. */
5380 x1 = max(0, it.current_x + it.pixel_width - it.first_visible_x); 5380 x1 = max (0, it.current_x + it.pixel_width - it.first_visible_x);
5381 if (x0 > x1) 5381 if (x0 > x1)
5382 it.hpos += (x0 - x1) / WINDOW_FRAME_COLUMN_WIDTH (w); 5382 it.hpos += (x0 - x1) / WINDOW_FRAME_COLUMN_WIDTH (w);
5383 5383
@@ -6241,7 +6241,7 @@ init_display (void)
6241 ) 6241 )
6242 { 6242 {
6243 Vinitial_window_system = Qns; 6243 Vinitial_window_system = Qns;
6244 Vwindow_system_version = make_number(10); 6244 Vwindow_system_version = make_number (10);
6245 adjust_frame_glyphs_initially (); 6245 adjust_frame_glyphs_initially ();
6246 return; 6246 return;
6247 } 6247 }
@@ -6340,7 +6340,7 @@ init_display (void)
6340 { 6340 {
6341 /* For the initial frame, we don't have any way of knowing what 6341 /* For the initial frame, we don't have any way of knowing what
6342 are the foreground and background colors of the terminal. */ 6342 are the foreground and background colors of the terminal. */
6343 struct frame *sf = SELECTED_FRAME(); 6343 struct frame *sf = SELECTED_FRAME ();
6344 6344
6345 FRAME_FOREGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_FG_COLOR; 6345 FRAME_FOREGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_FG_COLOR;
6346 FRAME_BACKGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_BG_COLOR; 6346 FRAME_BACKGROUND_PIXEL (sf) = FACE_TTY_DEFAULT_BG_COLOR;
diff --git a/src/doprnt.c b/src/doprnt.c
index 638fa4d6312..8db7c0f2ada 100644
--- a/src/doprnt.c
+++ b/src/doprnt.c
@@ -347,7 +347,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
347 case 'e': 347 case 'e':
348 case 'g': 348 case 'g':
349 { 349 {
350 double d = va_arg(ap, double); 350 double d = va_arg (ap, double);
351 sprintf (sprintf_buffer, fmtcpy, d); 351 sprintf (sprintf_buffer, fmtcpy, d);
352 /* Now copy into final output, truncating as necessary. */ 352 /* Now copy into final output, truncating as necessary. */
353 string = sprintf_buffer; 353 string = sprintf_buffer;
@@ -427,7 +427,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
427 427
428 case 'c': 428 case 'c':
429 { 429 {
430 int chr = va_arg(ap, int); 430 int chr = va_arg (ap, int);
431 tem = CHAR_STRING (chr, (unsigned char *) charbuf); 431 tem = CHAR_STRING (chr, (unsigned char *) charbuf);
432 string = charbuf; 432 string = charbuf;
433 string[tem] = 0; 433 string[tem] = 0;
diff --git a/src/dosfns.c b/src/dosfns.c
index e903ef20af0..ab3433b7902 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -343,13 +343,13 @@ init_dosfns (void)
343 { 343 {
344 dpmiregs.x.ax = 0x168e; 344 dpmiregs.x.ax = 0x168e;
345 dpmiregs.x.dx = 3; /* get VM title */ 345 dpmiregs.x.dx = 3; /* get VM title */
346 dpmiregs.x.cx = sizeof(parent_vm_title) - 1; 346 dpmiregs.x.cx = sizeof (parent_vm_title) - 1;
347 dpmiregs.x.es = __tb >> 4; 347 dpmiregs.x.es = __tb >> 4;
348 dpmiregs.x.di = __tb & 15; 348 dpmiregs.x.di = __tb & 15;
349 dpmiregs.x.sp = dpmiregs.x.ss = dpmiregs.x.flags = 0; 349 dpmiregs.x.sp = dpmiregs.x.ss = dpmiregs.x.flags = 0;
350 _go32_dpmi_simulate_int (0x2f, &dpmiregs); 350 _go32_dpmi_simulate_int (0x2f, &dpmiregs);
351 if (dpmiregs.x.ax == 1) 351 if (dpmiregs.x.ax == 1)
352 dosmemget (__tb, sizeof(parent_vm_title), parent_vm_title); 352 dosmemget (__tb, sizeof (parent_vm_title), parent_vm_title);
353 } 353 }
354 } 354 }
355 else 355 else
@@ -573,7 +573,7 @@ system_process_attributes (Lisp_Object pid)
573 Fsymbol_value (intern ("before-init-time"))), 573 Fsymbol_value (intern ("before-init-time"))),
574 attrs); 574 attrs);
575 attrs = Fcons (Fcons (Qvsize, 575 attrs = Fcons (Fcons (Qvsize,
576 make_fixnum_or_float ((unsigned long)sbrk(0)/1024)), 576 make_fixnum_or_float ((unsigned long)sbrk (0)/1024)),
577 attrs); 577 attrs);
578 attrs = Fcons (Fcons (Qetime, tem), attrs); 578 attrs = Fcons (Fcons (Qetime, tem), attrs);
579#ifndef SYSTEM_MALLOC 579#ifndef SYSTEM_MALLOC
diff --git a/src/editfns.c b/src/editfns.c
index 580298c6e7d..596765d899e 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -146,7 +146,7 @@ init_editfns (void)
146 /* If the user name claimed in the environment vars differs from 146 /* If the user name claimed in the environment vars differs from
147 the real uid, use the claimed name to find the full name. */ 147 the real uid, use the claimed name to find the full name. */
148 tem = Fstring_equal (Vuser_login_name, Vuser_real_login_name); 148 tem = Fstring_equal (Vuser_login_name, Vuser_real_login_name);
149 Vuser_full_name = Fuser_full_name (NILP (tem)? make_number (geteuid()) 149 Vuser_full_name = Fuser_full_name (NILP (tem)? make_number (geteuid ())
150 : Vuser_login_name); 150 : Vuser_login_name);
151 151
152 p = getenv ("NAME"); 152 p = getenv ("NAME");
@@ -3254,7 +3254,7 @@ save_restriction_save (void)
3254 end = buildmark (ZV, ZV_BYTE); 3254 end = buildmark (ZV, ZV_BYTE);
3255 3255
3256 /* END must move forward if text is inserted at its exact location. */ 3256 /* END must move forward if text is inserted at its exact location. */
3257 XMARKER(end)->insertion_type = 1; 3257 XMARKER (end)->insertion_type = 1;
3258 3258
3259 return Fcons (beg, end); 3259 return Fcons (beg, end);
3260 } 3260 }
diff --git a/src/emacs.c b/src/emacs.c
index c766523b1c3..d0e7a748849 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -165,7 +165,7 @@ int inhibit_window_system;
165 data on the first attempt to change it inside asynchronous code. */ 165 data on the first attempt to change it inside asynchronous code. */
166int running_asynch_code; 166int running_asynch_code;
167 167
168#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) 168#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
169/* If non-zero, -d was specified, meaning we're using some window system. */ 169/* If non-zero, -d was specified, meaning we're using some window system. */
170int display_arg; 170int display_arg;
171#endif 171#endif
@@ -811,7 +811,7 @@ main (int argc, char **argv)
811 { 811 {
812 static char heapexec[] = "EMACS_HEAP_EXEC=true"; 812 static char heapexec[] = "EMACS_HEAP_EXEC=true";
813 /* Set this so we only do this once. */ 813 /* Set this so we only do this once. */
814 putenv(heapexec); 814 putenv (heapexec);
815 815
816 /* A flag to turn off address randomization which is introduced 816 /* A flag to turn off address randomization which is introduced
817 in linux kernel shipped with fedora core 4 */ 817 in linux kernel shipped with fedora core 4 */
@@ -851,7 +851,7 @@ main (int argc, char **argv)
851 stack allocation routine for new process that the allocation 851 stack allocation routine for new process that the allocation
852 fails if stack limit is not on page boundary. So, round up the 852 fails if stack limit is not on page boundary. So, round up the
853 new limit to page boundary. */ 853 new limit to page boundary. */
854 newlim = (newlim + getpagesize () - 1) / getpagesize () * getpagesize(); 854 newlim = (newlim + getpagesize () - 1) / getpagesize () * getpagesize ();
855#endif 855#endif
856 if (newlim > rlim.rlim_max) 856 if (newlim > rlim.rlim_max)
857 { 857 {
@@ -1100,7 +1100,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1100 || strlen (dname_arg) < 1 || strlen (dname_arg) > 70) 1100 || strlen (dname_arg) < 1 || strlen (dname_arg) > 70)
1101 { 1101 {
1102 fprintf (stderr, "emacs daemon: daemon name absent or too long\n"); 1102 fprintf (stderr, "emacs daemon: daemon name absent or too long\n");
1103 exit(1); 1103 exit (1);
1104 } 1104 }
1105 dname_arg2[0] = '\0'; 1105 dname_arg2[0] = '\0';
1106 sscanf (dname_arg, "\n%d,%d\n%s", &(daemon_pipe[0]), &(daemon_pipe[1]), 1106 sscanf (dname_arg, "\n%d,%d\n%s", &(daemon_pipe[0]), &(daemon_pipe[1]),
@@ -1118,7 +1118,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1118 fcntl (daemon_pipe[1], F_SETFD, FD_CLOEXEC); 1118 fcntl (daemon_pipe[1], F_SETFD, FD_CLOEXEC);
1119 1119
1120#ifdef HAVE_SETSID 1120#ifdef HAVE_SETSID
1121 setsid(); 1121 setsid ();
1122#endif 1122#endif
1123#else /* DOS_NT */ 1123#else /* DOS_NT */
1124 fprintf (stderr, "This platform does not support the -daemon flag.\n"); 1124 fprintf (stderr, "This platform does not support the -daemon flag.\n");
@@ -1319,7 +1319,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1319 = argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args); 1319 = argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args);
1320 1320
1321#ifdef HAVE_NS 1321#ifdef HAVE_NS
1322 ns_alloc_autorelease_pool(); 1322 ns_alloc_autorelease_pool ();
1323 if (!noninteractive) 1323 if (!noninteractive)
1324 { 1324 {
1325#ifdef NS_IMPL_COCOA 1325#ifdef NS_IMPL_COCOA
@@ -1327,12 +1327,12 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1327 { 1327 {
1328 /* FIXME: Do the right thing if getenv returns NULL, or if 1328 /* FIXME: Do the right thing if getenv returns NULL, or if
1329 chdir fails. */ 1329 chdir fails. */
1330 if (!strncmp(argv[skip_args], "-psn", 4)) 1330 if (!strncmp (argv[skip_args], "-psn", 4))
1331 { 1331 {
1332 skip_args += 1; 1332 skip_args += 1;
1333 chdir (getenv ("HOME")); 1333 chdir (getenv ("HOME"));
1334 } 1334 }
1335 else if (skip_args+1 < argc && !strncmp(argv[skip_args+1], "-psn", 4)) 1335 else if (skip_args+1 < argc && !strncmp (argv[skip_args+1], "-psn", 4))
1336 { 1336 {
1337 skip_args += 2; 1337 skip_args += 2;
1338 chdir (getenv ("HOME")); 1338 chdir (getenv ("HOME"));
@@ -1560,9 +1560,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1560 1560
1561#ifdef MSDOS 1561#ifdef MSDOS
1562 syms_of_xmenu (); 1562 syms_of_xmenu ();
1563 syms_of_dosfns(); 1563 syms_of_dosfns ();
1564 syms_of_msdos(); 1564 syms_of_msdos ();
1565 syms_of_win16select(); 1565 syms_of_win16select ();
1566#endif /* MSDOS */ 1566#endif /* MSDOS */
1567 1567
1568#ifdef HAVE_NS 1568#ifdef HAVE_NS
@@ -1661,7 +1661,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1661 GNU/Linux and MinGW. It might work on some other systems too. 1661 GNU/Linux and MinGW. It might work on some other systems too.
1662 Give it a try and tell us if it works on your system. To compile 1662 Give it a try and tell us if it works on your system. To compile
1663 for profiling, use the configure option --enable-profiling. */ 1663 for profiling, use the configure option --enable-profiling. */
1664#if defined (__FreeBSD__) || defined (GNU_LINUX) || defined(__MINGW32__) 1664#if defined (__FreeBSD__) || defined (GNU_LINUX) || defined (__MINGW32__)
1665#ifdef PROFILING 1665#ifdef PROFILING
1666 if (initialized) 1666 if (initialized)
1667 { 1667 {
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index 7b93319e978..8cde68d8303 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -1,4 +1,4 @@
1/* A Gtk Widget that inherits GtkFixed, but can be shrinked. 1/* A Gtk Widget that inherits GtkFixed, but can be shrinked.
2This file is only use when compiling with Gtk+ 3. 2This file is only use when compiling with Gtk+ 3.
3 3
4Copyright (C) 2011 Free Software Foundation, Inc. 4Copyright (C) 2011 Free Software Foundation, Inc.
@@ -237,10 +237,10 @@ emacs_fixed_get_preferred_height (GtkWidget *widget,
237 (Bug#8919), and so users can resize our frames as they wish. */ 237 (Bug#8919), and so users can resize our frames as they wish. */
238 238
239void 239void
240XSetWMSizeHints(Display* d, 240XSetWMSizeHints (Display* d,
241 Window w, 241 Window w,
242 XSizeHints* hints, 242 XSizeHints* hints,
243 Atom prop) 243 Atom prop)
244{ 244{
245 struct x_display_info *dpyinfo = x_display_info_for_display (d); 245 struct x_display_info *dpyinfo = x_display_info_for_display (d);
246 struct frame *f = x_top_window_to_frame (dpyinfo, w); 246 struct frame *f = x_top_window_to_frame (dpyinfo, w);
@@ -279,7 +279,7 @@ XSetWMSizeHints(Display* d,
279/* Override this X11 function. 279/* Override this X11 function.
280 This function is in the same X11 file as the one above. So we must 280 This function is in the same X11 file as the one above. So we must
281 provide it also. */ 281 provide it also. */
282 282
283void 283void
284XSetWMNormalHints (Display *d, Window w, XSizeHints *hints) 284XSetWMNormalHints (Display *d, Window w, XSizeHints *hints)
285{ 285{
diff --git a/src/eval.c b/src/eval.c
index f2407cede31..57a273cd4aa 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -467,7 +467,7 @@ usage: (setq [SYM VAL]...) */)
467 467
468 args_left = Fcdr (Fcdr (args_left)); 468 args_left = Fcdr (Fcdr (args_left));
469 } 469 }
470 while (!NILP(args_left)); 470 while (!NILP (args_left));
471 471
472 UNGCPRO; 472 UNGCPRO;
473 return val; 473 return val;
diff --git a/src/fileio.c b/src/fileio.c
index fe0fb593208..08be41f9fe4 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1472,7 +1472,7 @@ search_embedded_absfilename (char *nm, char *endp)
1472 if ((0 1472 if ((0
1473 || IS_DIRECTORY_SEP (p[-1])) 1473 || IS_DIRECTORY_SEP (p[-1]))
1474 && file_name_absolute_p (p) 1474 && file_name_absolute_p (p)
1475#if defined (WINDOWSNT) || defined(CYGWIN) 1475#if defined (WINDOWSNT) || defined (CYGWIN)
1476 /* // at start of file name is meaningful in Apollo, 1476 /* // at start of file name is meaningful in Apollo,
1477 WindowsNT and Cygwin systems. */ 1477 WindowsNT and Cygwin systems. */
1478 && !(IS_DIRECTORY_SEP (p[0]) && p - 1 == nm) 1478 && !(IS_DIRECTORY_SEP (p[0]) && p - 1 == nm)
@@ -2497,7 +2497,7 @@ See also `file-exists-p' and `file-attributes'. */)
2497 2497
2498 absname = ENCODE_FILE (absname); 2498 absname = ENCODE_FILE (absname);
2499 2499
2500#if defined(DOS_NT) || defined(macintosh) 2500#if defined (DOS_NT) || defined (macintosh)
2501 /* Under MS-DOS, Windows, and Macintosh, open does not work for 2501 /* Under MS-DOS, Windows, and Macintosh, open does not work for
2502 directories. */ 2502 directories. */
2503 if (access (SDATA (absname), 0) == 0) 2503 if (access (SDATA (absname), 0) == 0)
@@ -2782,7 +2782,7 @@ if file does not exist, is not accessible, or SELinux is disabled */)
2782 } 2782 }
2783#endif 2783#endif
2784 2784
2785 return Flist (sizeof(values) / sizeof(values[0]), values); 2785 return Flist (sizeof (values) / sizeof (values[0]), values);
2786} 2786}
2787 2787
2788DEFUN ("set-file-selinux-context", Fset_file_selinux_context, 2788DEFUN ("set-file-selinux-context", Fset_file_selinux_context,
@@ -2853,7 +2853,7 @@ is disabled. */)
2853 context_free (parsed_con); 2853 context_free (parsed_con);
2854 } 2854 }
2855 else 2855 else
2856 report_file_error("Doing lgetfilecon", Fcons (absname, Qnil)); 2856 report_file_error ("Doing lgetfilecon", Fcons (absname, Qnil));
2857 2857
2858 if (con) 2858 if (con)
2859 freecon (con); 2859 freecon (con);
@@ -3253,6 +3253,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
3253 if (NILP (visit)) 3253 if (NILP (visit))
3254 report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); 3254 report_file_error ("Opening input file", Fcons (orig_filename, Qnil));
3255 st.st_mtime = -1; 3255 st.st_mtime = -1;
3256 st.st_size = -1;
3256 how_much = 0; 3257 how_much = 0;
3257 if (!NILP (Vcoding_system_for_read)) 3258 if (!NILP (Vcoding_system_for_read))
3258 Fset (Qbuffer_file_coding_system, Vcoding_system_for_read); 3259 Fset (Qbuffer_file_coding_system, Vcoding_system_for_read);
@@ -3545,7 +3546,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
3545 immediate_quit = 0; 3546 immediate_quit = 0;
3546 /* If the file matches the buffer completely, 3547 /* If the file matches the buffer completely,
3547 there's no need to replace anything. */ 3548 there's no need to replace anything. */
3548 if (same_at_start - BEGV_BYTE == end_offset) 3549 if (same_at_start - BEGV_BYTE == end_offset - beg_offset)
3549 { 3550 {
3550 emacs_close (fd); 3551 emacs_close (fd);
3551 specpdl_ptr--; 3552 specpdl_ptr--;
@@ -5044,9 +5045,10 @@ Next attempt to save will certainly not complain of a discrepancy. */)
5044DEFUN ("visited-file-modtime", Fvisited_file_modtime, 5045DEFUN ("visited-file-modtime", Fvisited_file_modtime,
5045 Svisited_file_modtime, 0, 0, 0, 5046 Svisited_file_modtime, 0, 0, 0,
5046 doc: /* Return the current buffer's recorded visited file modification time. 5047 doc: /* Return the current buffer's recorded visited file modification time.
5047The value is a list of the form (HIGH LOW), like the time values 5048The value is a list of the form (HIGH LOW), like the time values that
5048that `file-attributes' returns. If the current buffer has no recorded 5049`file-attributes' returns. If the current buffer has no recorded file
5049file modification time, this function returns 0. 5050modification time, this function returns 0. If the visited file
5051doesn't exist, HIGH will be -1.
5050See Info node `(elisp)Modification Time' for more details. */) 5052See Info node `(elisp)Modification Time' for more details. */)
5051 (void) 5053 (void)
5052{ 5054{
diff --git a/src/filelock.c b/src/filelock.c
index 7235c862ef0..5ee2c039b81 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -630,7 +630,7 @@ unlock_all_files (void)
630 b = XBUFFER (XCDR (XCAR (tail))); 630 b = XBUFFER (XCDR (XCAR (tail)));
631 if (STRINGP (BVAR (b, file_truename)) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) 631 if (STRINGP (BVAR (b, file_truename)) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b))
632 { 632 {
633 unlock_file(BVAR (b, file_truename)); 633 unlock_file (BVAR (b, file_truename));
634 } 634 }
635 } 635 }
636} 636}
diff --git a/src/floatfns.c b/src/floatfns.c
index 81cf6bdb61f..2011b4d942d 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -71,7 +71,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
71extern double logb (double); 71extern double logb (double);
72#endif /* not HPUX and HAVE_LOGB and no logb macro */ 72#endif /* not HPUX and HAVE_LOGB and no logb macro */
73 73
74#if defined(DOMAIN) && defined(SING) && defined(OVERFLOW) 74#if defined (DOMAIN) && defined (SING) && defined (OVERFLOW)
75 /* If those are defined, then this is probably a `matherr' machine. */ 75 /* If those are defined, then this is probably a `matherr' machine. */
76# ifndef HAVE_MATHERR 76# ifndef HAVE_MATHERR
77# define HAVE_MATHERR 77# define HAVE_MATHERR
@@ -519,7 +519,7 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
519 if (f1 == 0.0 && f2 == 0.0) 519 if (f1 == 0.0 && f2 == 0.0)
520 f1 = 1.0; 520 f1 = 1.0;
521#ifdef FLOAT_CHECK_DOMAIN 521#ifdef FLOAT_CHECK_DOMAIN
522 else if ((f1 == 0.0 && f2 < 0.0) || (f1 < 0 && f2 != floor(f2))) 522 else if ((f1 == 0.0 && f2 < 0.0) || (f1 < 0 && f2 != floor (f2)))
523 domain_error2 ("expt", arg1, arg2); 523 domain_error2 ("expt", arg1, arg2);
524#endif 524#endif
525 IN_FLOAT2 (f3 = pow (f1, f2), "expt", arg1, arg2); 525 IN_FLOAT2 (f3 = pow (f1, f2), "expt", arg1, arg2);
diff --git a/src/fns.c b/src/fns.c
index a3af6b8c15a..392f447a6d8 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4704,13 +4704,13 @@ secure_hash (Lisp_Object algorithm, Lisp_Object object, Lisp_Object start, Lisp_
4704 force_raw_text = 1; 4704 force_raw_text = 1;
4705 } 4705 }
4706 4706
4707 if (NILP (coding_system) && !NILP (Fbuffer_file_name(object))) 4707 if (NILP (coding_system) && !NILP (Fbuffer_file_name (object)))
4708 { 4708 {
4709 /* Check file-coding-system-alist. */ 4709 /* Check file-coding-system-alist. */
4710 Lisp_Object args[4], val; 4710 Lisp_Object args[4], val;
4711 4711
4712 args[0] = Qwrite_region; args[1] = start; args[2] = end; 4712 args[0] = Qwrite_region; args[1] = start; args[2] = end;
4713 args[3] = Fbuffer_file_name(object); 4713 args[3] = Fbuffer_file_name (object);
4714 val = Ffind_operation_coding_system (4, args); 4714 val = Ffind_operation_coding_system (4, args);
4715 if (CONSP (val) && !NILP (XCDR (val))) 4715 if (CONSP (val) && !NILP (XCDR (val)))
4716 coding_system = XCDR (val); 4716 coding_system = XCDR (val);
diff --git a/src/font.c b/src/font.c
index 34cacb37ce4..1a4742ba959 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1334,7 +1334,7 @@ font_parse_fcname (char *name, Lisp_Object font)
1334 { 1334 {
1335 int decimal = 0, size_found = 1; 1335 int decimal = 0, size_found = 1;
1336 for (q = p + 1; *q && *q != ':'; q++) 1336 for (q = p + 1; *q && *q != ':'; q++)
1337 if (! isdigit(*q)) 1337 if (! isdigit (*q))
1338 { 1338 {
1339 if (*q != '.' || decimal) 1339 if (*q != '.' || decimal)
1340 { 1340 {
@@ -3239,7 +3239,7 @@ font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_O
3239 if (INTEGERP (height)) 3239 if (INTEGERP (height))
3240 pt = XINT (height); 3240 pt = XINT (height);
3241 else 3241 else
3242 abort(); /* We should never end up here. */ 3242 abort (); /* We should never end up here. */
3243 } 3243 }
3244 3244
3245 pt /= 10; 3245 pt /= 10;
@@ -3247,7 +3247,7 @@ font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_O
3247#ifdef HAVE_NS 3247#ifdef HAVE_NS
3248 if (size == 0) 3248 if (size == 0)
3249 { 3249 {
3250 Lisp_Object ffsize = get_frame_param(f, Qfontsize); 3250 Lisp_Object ffsize = get_frame_param (f, Qfontsize);
3251 size = NUMBERP (ffsize) ? POINT_TO_PIXEL (XINT (ffsize), f->resy) : 0; 3251 size = NUMBERP (ffsize) ? POINT_TO_PIXEL (XINT (ffsize), f->resy) : 0;
3252 } 3252 }
3253#endif 3253#endif
diff --git a/src/frame.c b/src/frame.c
index 66b857a73e9..112f102a1f2 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1155,17 +1155,6 @@ other_visible_frames (FRAME_PTR f)
1155 return 1; 1155 return 1;
1156} 1156}
1157 1157
1158DEFUN ("other-visible-frames-p", Fother_visible_frames_p, Sother_visible_frames_p, 0, 1, 0,
1159 doc: /* Return t if there are other visible frames beside FRAME.
1160FRAME defaults to the selected frame. */)
1161 (Lisp_Object frame)
1162{
1163 if (NILP (frame))
1164 frame = selected_frame;
1165 CHECK_LIVE_FRAME (frame);
1166 return other_visible_frames (XFRAME (frame)) ? Qt : Qnil;
1167}
1168
1169/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME 1158/* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME
1170 unconditionally. x_connection_closed and delete_terminal use 1159 unconditionally. x_connection_closed and delete_terminal use
1171 this. Any other value of FORCE implements the semantics 1160 this. Any other value of FORCE implements the semantics
@@ -3098,7 +3087,11 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
3098 for non-toolkit scroll bar. 3087 for non-toolkit scroll bar.
3099 ruler-mode.el depends on this. */ 3088 ruler-mode.el depends on this. */
3100 : Qnil)); 3089 : Qnil));
3101 w = FRAME_X_WINDOW (f); 3090 /* FRAME_X_WINDOW is not guaranteed to return an integer. E.g., on
3091 MS-Windows it returns a value whose type is HANDLE, which is
3092 actually a pointer. Explicit casting avoids compiler
3093 warnings. */
3094 w = (unsigned long) FRAME_X_WINDOW (f);
3102 sprintf (buf, "%lu", w); 3095 sprintf (buf, "%lu", w);
3103 store_in_alist (alistptr, Qwindow_id, 3096 store_in_alist (alistptr, Qwindow_id,
3104 build_string (buf)); 3097 build_string (buf));
@@ -3108,7 +3101,7 @@ x_report_frame_params (struct frame *f, Lisp_Object *alistptr)
3108 if (FRAME_X_OUTPUT (f)->widget) 3101 if (FRAME_X_OUTPUT (f)->widget)
3109#endif 3102#endif
3110 { 3103 {
3111 w = FRAME_OUTER_WINDOW (f); 3104 w = (unsigned long) FRAME_OUTER_WINDOW (f);
3112 sprintf (buf, "%lu", w); 3105 sprintf (buf, "%lu", w);
3113 } 3106 }
3114 store_in_alist (alistptr, Qouter_window_id, 3107 store_in_alist (alistptr, Qouter_window_id,
@@ -4370,7 +4363,7 @@ Setting this variable does not affect existing frames, only new ones. */);
4370 DEFVAR_LISP ("default-frame-scroll-bars", Vdefault_frame_scroll_bars, 4363 DEFVAR_LISP ("default-frame-scroll-bars", Vdefault_frame_scroll_bars,
4371 doc: /* Default position of scroll bars on this window-system. */); 4364 doc: /* Default position of scroll bars on this window-system. */);
4372#ifdef HAVE_WINDOW_SYSTEM 4365#ifdef HAVE_WINDOW_SYSTEM
4373#if defined(HAVE_NTGUI) || defined(NS_IMPL_COCOA) || (defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS)) 4366#if defined (HAVE_NTGUI) || defined (NS_IMPL_COCOA) || (defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS))
4374 /* MS-Windows, Mac OS X, and GTK have scroll bars on the right by 4367 /* MS-Windows, Mac OS X, and GTK have scroll bars on the right by
4375 default. */ 4368 default. */
4376 Vdefault_frame_scroll_bars = Qright; 4369 Vdefault_frame_scroll_bars = Qright;
@@ -4471,7 +4464,6 @@ automatically. See also `mouse-autoselect-window'. */);
4471 defsubr (&Sframe_list); 4464 defsubr (&Sframe_list);
4472 defsubr (&Snext_frame); 4465 defsubr (&Snext_frame);
4473 defsubr (&Sprevious_frame); 4466 defsubr (&Sprevious_frame);
4474 defsubr (&Sother_visible_frames_p);
4475 defsubr (&Sdelete_frame); 4467 defsubr (&Sdelete_frame);
4476 defsubr (&Smouse_position); 4468 defsubr (&Smouse_position);
4477 defsubr (&Smouse_pixel_position); 4469 defsubr (&Smouse_pixel_position);
diff --git a/src/fringe.c b/src/fringe.c
index 5878c541247..25fecca2334 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -456,7 +456,7 @@ static struct fringe_bitmap standard_bitmaps[] =
456 456
457#define NO_FRINGE_BITMAP 0 457#define NO_FRINGE_BITMAP 0
458#define UNDEF_FRINGE_BITMAP 1 458#define UNDEF_FRINGE_BITMAP 1
459#define MAX_STANDARD_FRINGE_BITMAPS (sizeof(standard_bitmaps)/sizeof(standard_bitmaps[0])) 459#define MAX_STANDARD_FRINGE_BITMAPS (sizeof (standard_bitmaps)/sizeof (standard_bitmaps[0]))
460 460
461static struct fringe_bitmap **fringe_bitmaps; 461static struct fringe_bitmap **fringe_bitmaps;
462static Lisp_Object *fringe_faces; 462static Lisp_Object *fringe_faces;
@@ -1165,7 +1165,7 @@ update_window_fringes (struct window *w, int keep_current_p)
1165 } 1165 }
1166 else if ((!row->reversed_p && row->truncated_on_left_p) 1166 else if ((!row->reversed_p && row->truncated_on_left_p)
1167 || (row->reversed_p && row->truncated_on_right_p)) 1167 || (row->reversed_p && row->truncated_on_right_p))
1168 left = LEFT_FRINGE(0, Qtruncation, 0); 1168 left = LEFT_FRINGE (0, Qtruncation, 0);
1169 else if (row->indicate_bob_p && EQ (boundary_top, Qleft)) 1169 else if (row->indicate_bob_p && EQ (boundary_top, Qleft))
1170 { 1170 {
1171 left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft)) 1171 left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft))
@@ -1787,7 +1787,7 @@ init_fringe_once (void)
1787 int bt; 1787 int bt;
1788 1788
1789 for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++) 1789 for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++)
1790 init_fringe_bitmap(bt, &standard_bitmaps[bt], 1); 1790 init_fringe_bitmap (bt, &standard_bitmaps[bt], 1);
1791} 1791}
1792 1792
1793void 1793void
diff --git a/src/getpagesize.h b/src/getpagesize.h
index 965d0bc0244..c0c4e504f0a 100644
--- a/src/getpagesize.h
+++ b/src/getpagesize.h
@@ -21,7 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21# include <unistd.h> 21# include <unistd.h>
22 22
23# ifdef _SC_PAGESIZE 23# ifdef _SC_PAGESIZE
24# define getpagesize() sysconf(_SC_PAGESIZE) 24# define getpagesize() sysconf (_SC_PAGESIZE)
25# else /* no _SC_PAGESIZE */ 25# else /* no _SC_PAGESIZE */
26# ifdef HAVE_SYS_PARAM_H 26# ifdef HAVE_SYS_PARAM_H
27# include <sys/param.h> 27# include <sys/param.h>
diff --git a/src/gmalloc.c b/src/gmalloc.c
index d49259b8ed7..7b5e6df009b 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -102,7 +102,7 @@ extern void malloc_enable_thread PP ((void));
102 receive a fragment of a block. Fragment sizes are powers of two, 102 receive a fragment of a block. Fragment sizes are powers of two,
103 and all fragments of a block are the same size. When all the 103 and all fragments of a block are the same size. When all the
104 fragments in a block have been freed, the block itself is freed. */ 104 fragments in a block have been freed, the block itself is freed. */
105#define INT_BIT (CHAR_BIT * sizeof(int)) 105#define INT_BIT (CHAR_BIT * sizeof (int))
106#define BLOCKLOG (INT_BIT > 16 ? 12 : 9) 106#define BLOCKLOG (INT_BIT > 16 ? 12 : 9)
107#define BLOCKSIZE (1 << BLOCKLOG) 107#define BLOCKSIZE (1 << BLOCKLOG)
108#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE) 108#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE)
@@ -445,7 +445,7 @@ protect_malloc_state (protect_p)
445 } 445 }
446} 446}
447 447
448#define PROTECT_MALLOC_STATE(PROT) protect_malloc_state(PROT) 448#define PROTECT_MALLOC_STATE(PROT) protect_malloc_state (PROT)
449 449
450#else 450#else
451#define PROTECT_MALLOC_STATE(PROT) /* empty */ 451#define PROTECT_MALLOC_STATE(PROT) /* empty */
@@ -1541,7 +1541,7 @@ _realloc_internal (ptr, size)
1541{ 1541{
1542 __ptr_t result; 1542 __ptr_t result;
1543 1543
1544 LOCK(); 1544 LOCK ();
1545 result = _realloc_internal_nolock (ptr, size); 1545 result = _realloc_internal_nolock (ptr, size);
1546 UNLOCK (); 1546 UNLOCK ();
1547 1547
@@ -1625,7 +1625,7 @@ MA 02110-1301, USA. */
1625 1625
1626/* uClibc defines __GNU_LIBRARY__, but it is not completely 1626/* uClibc defines __GNU_LIBRARY__, but it is not completely
1627 compatible. */ 1627 compatible. */
1628#if !defined(__GNU_LIBRARY__) || defined(__UCLIBC__) 1628#if !defined (__GNU_LIBRARY__) || defined (__UCLIBC__)
1629#define __sbrk sbrk 1629#define __sbrk sbrk
1630#else /* __GNU_LIBRARY__ && ! defined (__UCLIBC__) */ 1630#else /* __GNU_LIBRARY__ && ! defined (__UCLIBC__) */
1631/* It is best not to declare this and cast its result on foreign operating 1631/* It is best not to declare this and cast its result on foreign operating
@@ -1647,7 +1647,7 @@ __default_morecore (increment)
1647 __malloc_ptrdiff_t increment; 1647 __malloc_ptrdiff_t increment;
1648{ 1648{
1649 __ptr_t result; 1649 __ptr_t result;
1650#if defined(CYGWIN) 1650#if defined (CYGWIN)
1651 if (!bss_sbrk_did_unexec) 1651 if (!bss_sbrk_did_unexec)
1652 { 1652 {
1653 return bss_sbrk (increment); 1653 return bss_sbrk (increment);
@@ -1830,7 +1830,7 @@ extern size_t __getpagesize PP ((void));
1830#endif 1830#endif
1831#else 1831#else
1832#include "getpagesize.h" 1832#include "getpagesize.h"
1833#define __getpagesize() getpagesize() 1833#define __getpagesize() getpagesize ()
1834#endif 1834#endif
1835 1835
1836#ifndef _MALLOC_INTERNAL 1836#ifndef _MALLOC_INTERNAL
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 04d05d2a630..3cac8084dea 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -422,7 +422,7 @@ xg_get_image_for_pixmap (FRAME_PTR f,
422static void 422static void
423xg_set_cursor (GtkWidget *w, GdkCursor *cursor) 423xg_set_cursor (GtkWidget *w, GdkCursor *cursor)
424{ 424{
425 GdkWindow *window = gtk_widget_get_window(w); 425 GdkWindow *window = gtk_widget_get_window (w);
426 GList *children = gdk_window_peek_children (window); 426 GList *children = gdk_window_peek_children (window);
427 427
428 gdk_window_set_cursor (window, cursor); 428 gdk_window_set_cursor (window, cursor);
diff --git a/src/image.c b/src/image.c
index c5dcbb32e5d..db201d5a831 100644
--- a/src/image.c
+++ b/src/image.c
@@ -56,7 +56,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
56#define COLOR_TABLE_SUPPORT 1 56#define COLOR_TABLE_SUPPORT 1
57 57
58typedef struct x_bitmap_record Bitmap_Record; 58typedef struct x_bitmap_record Bitmap_Record;
59#define GET_PIXEL(ximg, x, y) XGetPixel(ximg, x, y) 59#define GET_PIXEL(ximg, x, y) XGetPixel (ximg, x, y)
60#define NO_PIXMAP None 60#define NO_PIXMAP None
61 61
62#define RGB_PIXEL_COLOR unsigned long 62#define RGB_PIXEL_COLOR unsigned long
@@ -74,7 +74,7 @@ typedef struct x_bitmap_record Bitmap_Record;
74#undef COLOR_TABLE_SUPPORT 74#undef COLOR_TABLE_SUPPORT
75 75
76typedef struct w32_bitmap_record Bitmap_Record; 76typedef struct w32_bitmap_record Bitmap_Record;
77#define GET_PIXEL(ximg, x, y) GetPixel(ximg, x, y) 77#define GET_PIXEL(ximg, x, y) GetPixel (ximg, x, y)
78#define NO_PIXMAP 0 78#define NO_PIXMAP 0
79 79
80#define RGB_PIXEL_COLOR COLORREF 80#define RGB_PIXEL_COLOR COLORREF
@@ -106,7 +106,7 @@ Lisp_Object Qlibpng_version;
106 106
107typedef struct ns_bitmap_record Bitmap_Record; 107typedef struct ns_bitmap_record Bitmap_Record;
108 108
109#define GET_PIXEL(ximg, x, y) XGetPixel(ximg, x, y) 109#define GET_PIXEL(ximg, x, y) XGetPixel (ximg, x, y)
110#define NO_PIXMAP 0 110#define NO_PIXMAP 0
111 111
112#define RGB_PIXEL_COLOR unsigned long 112#define RGB_PIXEL_COLOR unsigned long
@@ -115,7 +115,7 @@ typedef struct ns_bitmap_record Bitmap_Record;
115#define PIX_MASK_RETAIN 0 115#define PIX_MASK_RETAIN 0
116#define PIX_MASK_DRAW 1 116#define PIX_MASK_DRAW 1
117 117
118#define FRAME_X_VISUAL FRAME_NS_DISPLAY_INFO(f)->visual 118#define FRAME_X_VISUAL FRAME_NS_DISPLAY_INFO (f)->visual
119#define x_defined_color(f, name, color_def, alloc) \ 119#define x_defined_color(f, name, color_def, alloc) \
120 ns_defined_color (f, name, color_def, alloc, 0) 120 ns_defined_color (f, name, color_def, alloc, 0)
121#define FRAME_X_SCREEN(f) 0 121#define FRAME_X_SCREEN(f) 0
@@ -1106,8 +1106,8 @@ image_ascent (struct image *img, struct face *face, struct glyph_slice *slice)
1106 because a typical font is `top-heavy' (due to the presence 1106 because a typical font is `top-heavy' (due to the presence
1107 uppercase letters), so the image placement should err towards 1107 uppercase letters), so the image placement should err towards
1108 being top-heavy too. It also just generally looks better. */ 1108 being top-heavy too. It also just generally looks better. */
1109 ascent = (height + FONT_BASE(face->font) 1109 ascent = (height + FONT_BASE (face->font)
1110 - FONT_DESCENT(face->font) + 1) / 2; 1110 - FONT_DESCENT (face->font) + 1) / 2;
1111#endif /* HAVE_NTGUI */ 1111#endif /* HAVE_NTGUI */
1112 } 1112 }
1113 else 1113 else
@@ -5545,7 +5545,7 @@ init_png_functions (Lisp_Object libraries)
5545/* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908) */ 5545/* In libpng version 1.5, the jmpbuf member is hidden. (Bug#7908) */
5546#define PNG_LONGJMP(ptr) (fn_png_longjmp ((ptr), 1)) 5546#define PNG_LONGJMP(ptr) (fn_png_longjmp ((ptr), 1))
5547#define PNG_JMPBUF(ptr) \ 5547#define PNG_JMPBUF(ptr) \
5548 (*fn_png_set_longjmp_fn((ptr), longjmp, sizeof (jmp_buf))) 5548 (*fn_png_set_longjmp_fn ((ptr), longjmp, sizeof (jmp_buf)))
5549#endif 5549#endif
5550 5550
5551/* Error and warning handlers installed when the PNG library 5551/* Error and warning handlers installed when the PNG library
@@ -5966,9 +5966,9 @@ png_load (struct frame *f, struct image *img)
5966static int 5966static int
5967png_load (struct frame *f, struct image *img) 5967png_load (struct frame *f, struct image *img)
5968{ 5968{
5969 return ns_load_image(f, img, 5969 return ns_load_image (f, img,
5970 image_spec_value (img->spec, QCfile, NULL), 5970 image_spec_value (img->spec, QCfile, NULL),
5971 image_spec_value (img->spec, QCdata, NULL)); 5971 image_spec_value (img->spec, QCdata, NULL));
5972} 5972}
5973#endif /* HAVE_NS */ 5973#endif /* HAVE_NS */
5974 5974
@@ -6115,7 +6115,7 @@ jpeg_resync_to_restart_wrapper (j_decompress_ptr cinfo, int desired)
6115 6115
6116#else 6116#else
6117 6117
6118#define fn_jpeg_CreateDecompress(a,b,c) jpeg_create_decompress(a) 6118#define fn_jpeg_CreateDecompress(a,b,c) jpeg_create_decompress (a)
6119#define fn_jpeg_start_decompress jpeg_start_decompress 6119#define fn_jpeg_start_decompress jpeg_start_decompress
6120#define fn_jpeg_finish_decompress jpeg_finish_decompress 6120#define fn_jpeg_finish_decompress jpeg_finish_decompress
6121#define fn_jpeg_destroy_decompress jpeg_destroy_decompress 6121#define fn_jpeg_destroy_decompress jpeg_destroy_decompress
@@ -7229,8 +7229,10 @@ gif_load (struct frame *f, struct image *img)
7229 7229
7230 img->corners[TOP_CORNER] = gif->SavedImages[0].ImageDesc.Top; 7230 img->corners[TOP_CORNER] = gif->SavedImages[0].ImageDesc.Top;
7231 img->corners[LEFT_CORNER] = gif->SavedImages[0].ImageDesc.Left; 7231 img->corners[LEFT_CORNER] = gif->SavedImages[0].ImageDesc.Left;
7232 img->corners[BOT_CORNER] = img->corners[TOP_CORNER] + height; 7232 img->corners[BOT_CORNER]
7233 img->corners[RIGHT_CORNER] = img->corners[LEFT_CORNER] + width; 7233 = img->corners[TOP_CORNER] + gif->SavedImages[0].ImageDesc.Height;
7234 img->corners[RIGHT_CORNER]
7235 = img->corners[LEFT_CORNER] + gif->SavedImages[0].ImageDesc.Width;
7234 7236
7235 if (!check_image_size (f, width, height)) 7237 if (!check_image_size (f, width, height))
7236 { 7238 {
@@ -7623,7 +7625,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7623 return 0; 7625 return 0;
7624 } 7626 }
7625 7627
7626 if (MagickGetNumberImages(ping_wand) > 1) 7628 if (MagickGetNumberImages (ping_wand) > 1)
7627 img->lisp_data = 7629 img->lisp_data =
7628 Fcons (Qcount, 7630 Fcons (Qcount,
7629 Fcons (make_number (MagickGetNumberImages (ping_wand)), 7631 Fcons (make_number (MagickGetNumberImages (ping_wand)),
@@ -7648,7 +7650,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7648 if (im_image == NULL) 7650 if (im_image == NULL)
7649 goto imagemagick_no_wand; 7651 goto imagemagick_no_wand;
7650 image_wand = NewMagickWandFromImage (im_image); 7652 image_wand = NewMagickWandFromImage (im_image);
7651 DestroyImage(im_image); 7653 DestroyImage (im_image);
7652 } 7654 }
7653 else 7655 else
7654 { 7656 {
@@ -7769,7 +7771,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7769#ifdef COLOR_TABLE_SUPPORT 7771#ifdef COLOR_TABLE_SUPPORT
7770 free_color_table (); 7772 free_color_table ();
7771#endif 7773#endif
7772 image_error("Imagemagick X bitmap allocation failure", Qnil, Qnil); 7774 image_error ("Imagemagick X bitmap allocation failure", Qnil, Qnil);
7773 goto imagemagick_error; 7775 goto imagemagick_error;
7774 } 7776 }
7775 7777
@@ -7823,7 +7825,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7823#ifdef COLOR_TABLE_SUPPORT 7825#ifdef COLOR_TABLE_SUPPORT
7824 free_color_table (); 7826 free_color_table ();
7825#endif 7827#endif
7826 image_error("Imagemagick X bitmap allocation failure", Qnil, Qnil); 7828 image_error ("Imagemagick X bitmap allocation failure", Qnil, Qnil);
7827 goto imagemagick_error; 7829 goto imagemagick_error;
7828 } 7830 }
7829 7831
diff --git a/src/indent.c b/src/indent.c
index 6e602d28f60..bae9ab1b46d 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1543,7 +1543,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_
1543 n = 1; 1543 n = 1;
1544 } 1544 }
1545 1545
1546 for (i = n - 1; i >= 0; --i) 1546 for (i = 0; i < n; ++i)
1547 { 1547 {
1548 if (VECTORP (charvec)) 1548 if (VECTORP (charvec))
1549 { 1549 {
diff --git a/src/insdel.c b/src/insdel.c
index 0cae578925d..01e5c57b2b0 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -329,7 +329,7 @@ adjust_markers_for_insert (EMACS_INT from, EMACS_INT from_byte,
329 - disordered overlays in the slot `overlays_before' of current_buffer. */ 329 - disordered overlays in the slot `overlays_before' of current_buffer. */
330 if (adjusted) 330 if (adjusted)
331 { 331 {
332 fix_start_end_in_overlays(from, to); 332 fix_start_end_in_overlays (from, to);
333 fix_overlays_before (current_buffer, from, to); 333 fix_overlays_before (current_buffer, from, to);
334 } 334 }
335} 335}
@@ -1606,7 +1606,7 @@ del_range_1 (EMACS_INT from, EMACS_INT to, int prepare, int ret_string)
1606 to_byte = CHAR_TO_BYTE (to); 1606 to_byte = CHAR_TO_BYTE (to);
1607 1607
1608 deletion = del_range_2 (from, from_byte, to, to_byte, ret_string); 1608 deletion = del_range_2 (from, from_byte, to, to_byte, ret_string);
1609 GCPRO1(deletion); 1609 GCPRO1 (deletion);
1610 signal_after_change (from, to - from, 0); 1610 signal_after_change (from, to - from, 0);
1611 update_compositions (from, from, CHECK_HEAD); 1611 update_compositions (from, from, CHECK_HEAD);
1612 UNGCPRO; 1612 UNGCPRO;
diff --git a/src/keyboard.c b/src/keyboard.c
index 8705c3cd65f..b266da07a42 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -411,7 +411,7 @@ int interrupts_deferred;
411 411
412/* If we support a window system, turn on the code to poll periodically 412/* If we support a window system, turn on the code to poll periodically
413 to detect C-g. It isn't actually used when doing interrupt input. */ 413 to detect C-g. It isn't actually used when doing interrupt input. */
414#if defined(HAVE_WINDOW_SYSTEM) && !defined(USE_ASYNC_EVENTS) 414#if defined (HAVE_WINDOW_SYSTEM) && !defined (USE_ASYNC_EVENTS)
415#define POLL_FOR_INPUT 415#define POLL_FOR_INPUT
416#endif 416#endif
417 417
@@ -3958,7 +3958,7 @@ kbd_buffer_get_event (KBOARD **kbp,
3958 kbd_fetch_ptr = event + 1; 3958 kbd_fetch_ptr = event + 1;
3959 } 3959 }
3960#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ 3960#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
3961 || defined(HAVE_NS) || defined (USE_GTK) 3961 || defined (HAVE_NS) || defined (USE_GTK)
3962 else if (event->kind == MENU_BAR_ACTIVATE_EVENT) 3962 else if (event->kind == MENU_BAR_ACTIVATE_EVENT)
3963 { 3963 {
3964 kbd_fetch_ptr = event + 1; 3964 kbd_fetch_ptr = event + 1;
@@ -4075,7 +4075,7 @@ kbd_buffer_get_event (KBOARD **kbp,
4075 obj = make_lispy_event (event); 4075 obj = make_lispy_event (event);
4076 4076
4077#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ 4077#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
4078 || defined(HAVE_NS) || defined (USE_GTK) 4078 || defined (HAVE_NS) || defined (USE_GTK)
4079 /* If this was a menu selection, then set the flag to inhibit 4079 /* If this was a menu selection, then set the flag to inhibit
4080 writing to last_nonmenu_event. Don't do this if the event 4080 writing to last_nonmenu_event. Don't do this if the event
4081 we're returning is (menu-bar), though; that indicates the 4081 we're returning is (menu-bar), though; that indicates the
@@ -5891,7 +5891,7 @@ make_lispy_event (struct input_event *event)
5891#endif /* HAVE_MOUSE */ 5891#endif /* HAVE_MOUSE */
5892 5892
5893#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ 5893#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
5894 || defined(HAVE_NS) || defined (USE_GTK) 5894 || defined (HAVE_NS) || defined (USE_GTK)
5895 case MENU_BAR_EVENT: 5895 case MENU_BAR_EVENT:
5896 if (EQ (event->arg, event->frame_or_window)) 5896 if (EQ (event->arg, event->frame_or_window))
5897 /* This is the prefix key. We translate this to 5897 /* This is the prefix key. We translate this to
@@ -6012,7 +6012,7 @@ make_lispy_event (struct input_event *event)
6012 } 6012 }
6013} 6013}
6014 6014
6015#if defined(HAVE_MOUSE) || defined(HAVE_GPM) 6015#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
6016 6016
6017static Lisp_Object 6017static Lisp_Object
6018make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part, 6018make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part,
@@ -7024,7 +7024,7 @@ tty_read_avail_input (struct terminal *terminal,
7024 if (n_to_read > sizeof cbuf) 7024 if (n_to_read > sizeof cbuf)
7025 n_to_read = sizeof cbuf; 7025 n_to_read = sizeof cbuf;
7026#else /* no FIONREAD */ 7026#else /* no FIONREAD */
7027#if defined (USG) || defined(CYGWIN) 7027#if defined (USG) || defined (CYGWIN)
7028 /* Read some input if available, but don't wait. */ 7028 /* Read some input if available, but don't wait. */
7029 n_to_read = sizeof cbuf; 7029 n_to_read = sizeof cbuf;
7030 fcntl (fileno (tty->input), F_SETFL, O_NDELAY); 7030 fcntl (fileno (tty->input), F_SETFL, O_NDELAY);
diff --git a/src/keymap.h b/src/keymap.h
index ec9d4cadbb1..a989f124b14 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -19,6 +19,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19#ifndef KEYMAP_H 19#ifndef KEYMAP_H
20#define KEYMAP_H 20#define KEYMAP_H
21 21
22/* The maximum byte size consumed by push_key_description.
23 All callers should assure that at least this size of memory is
24 allocated at the place pointed by the second argument.
25
26 There are 6 modifiers, each consumes 2 chars.
27 The octal form of a character code consumes
28 (1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head).
29 We need one more byte for string terminator `\0'. */
30#define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1)
31
22#define KEYMAPP(m) (!NILP (get_keymap (m, 0, 0))) 32#define KEYMAPP(m) (!NILP (get_keymap (m, 0, 0)))
23extern Lisp_Object Qkeymap, Qmenu_bar; 33extern Lisp_Object Qkeymap, Qmenu_bar;
24extern Lisp_Object Qremap; 34extern Lisp_Object Qremap;
@@ -30,6 +40,7 @@ EXFUN (Fdefine_key, 3);
30EXFUN (Fcommand_remapping, 3); 40EXFUN (Fcommand_remapping, 3);
31EXFUN (Fkey_binding, 4); 41EXFUN (Fkey_binding, 4);
32EXFUN (Fkey_description, 2); 42EXFUN (Fkey_description, 2);
43extern char *push_key_description (EMACS_INT, char *, int);
33EXFUN (Fsingle_key_description, 2); 44EXFUN (Fsingle_key_description, 2);
34EXFUN (Fwhere_is_internal, 5); 45EXFUN (Fwhere_is_internal, 5);
35EXFUN (Fcurrent_active_maps, 2); 46EXFUN (Fcurrent_active_maps, 2);
diff --git a/src/lisp.h b/src/lisp.h
index 7936e6a6dec..64c94647f0e 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -132,9 +132,9 @@ extern int suppress_checking EXTERNALLY_VISIBLE;
132#define eassert(X) ((void) (0 && (X))) /* Check that X compiles. */ 132#define eassert(X) ((void) (0 && (X))) /* Check that X compiles. */
133#else /* ENABLE_CHECKING */ 133#else /* ENABLE_CHECKING */
134#if defined (__GNUC__) && __GNUC__ >= 2 && defined (__STDC__) 134#if defined (__GNUC__) && __GNUC__ >= 2 && defined (__STDC__)
135#define eassert(cond) CHECK(cond,"assertion failed: " #cond) 135#define eassert(cond) CHECK (cond, "assertion failed: " #cond)
136#else 136#else
137#define eassert(cond) CHECK(cond,"assertion failed") 137#define eassert(cond) CHECK (cond, "assertion failed")
138#endif 138#endif
139#endif /* ENABLE_CHECKING */ 139#endif /* ENABLE_CHECKING */
140 140
@@ -588,20 +588,20 @@ extern Lisp_Object make_number (EMACS_INT);
588 588
589/* Extract a value or address from a Lisp_Object. */ 589/* Extract a value or address from a Lisp_Object. */
590 590
591#define XCONS(a) (eassert (CONSP(a)),(struct Lisp_Cons *) XPNTR(a)) 591#define XCONS(a) (eassert (CONSP (a)), (struct Lisp_Cons *) XPNTR (a))
592#define XVECTOR(a) (eassert (VECTORLIKEP(a)),(struct Lisp_Vector *) XPNTR(a)) 592#define XVECTOR(a) (eassert (VECTORLIKEP (a)), (struct Lisp_Vector *) XPNTR (a))
593#define XSTRING(a) (eassert (STRINGP(a)),(struct Lisp_String *) XPNTR(a)) 593#define XSTRING(a) (eassert (STRINGP (a)), (struct Lisp_String *) XPNTR (a))
594#define XSYMBOL(a) (eassert (SYMBOLP(a)),(struct Lisp_Symbol *) XPNTR(a)) 594#define XSYMBOL(a) (eassert (SYMBOLP (a)), (struct Lisp_Symbol *) XPNTR (a))
595#define XFLOAT(a) (eassert (FLOATP(a)),(struct Lisp_Float *) XPNTR(a)) 595#define XFLOAT(a) (eassert (FLOATP (a)), (struct Lisp_Float *) XPNTR (a))
596 596
597/* Misc types. */ 597/* Misc types. */
598 598
599#define XMISC(a) ((union Lisp_Misc *) XPNTR(a)) 599#define XMISC(a) ((union Lisp_Misc *) XPNTR (a))
600#define XMISCANY(a) (eassert (MISCP (a)), &(XMISC(a)->u_any)) 600#define XMISCANY(a) (eassert (MISCP (a)), &(XMISC (a)->u_any))
601#define XMISCTYPE(a) (XMISCANY (a)->type) 601#define XMISCTYPE(a) (XMISCANY (a)->type)
602#define XMARKER(a) (eassert (MARKERP (a)), &(XMISC(a)->u_marker)) 602#define XMARKER(a) (eassert (MARKERP (a)), &(XMISC (a)->u_marker))
603#define XOVERLAY(a) (eassert (OVERLAYP (a)), &(XMISC(a)->u_overlay)) 603#define XOVERLAY(a) (eassert (OVERLAYP (a)), &(XMISC (a)->u_overlay))
604#define XSAVE_VALUE(a) (eassert (SAVE_VALUEP (a)), &(XMISC(a)->u_save_value)) 604#define XSAVE_VALUE(a) (eassert (SAVE_VALUEP (a)), &(XMISC (a)->u_save_value))
605 605
606/* Forwarding object types. */ 606/* Forwarding object types. */
607 607
@@ -616,14 +616,14 @@ extern Lisp_Object make_number (EMACS_INT);
616 616
617/* Pseudovector types. */ 617/* Pseudovector types. */
618 618
619#define XPROCESS(a) (eassert (PROCESSP(a)),(struct Lisp_Process *) XPNTR(a)) 619#define XPROCESS(a) (eassert (PROCESSP (a)), (struct Lisp_Process *) XPNTR (a))
620#define XWINDOW(a) (eassert (WINDOWP(a)),(struct window *) XPNTR(a)) 620#define XWINDOW(a) (eassert (WINDOWP (a)), (struct window *) XPNTR (a))
621#define XTERMINAL(a) (eassert (TERMINALP(a)),(struct terminal *) XPNTR(a)) 621#define XTERMINAL(a) (eassert (TERMINALP (a)), (struct terminal *) XPNTR (a))
622#define XSUBR(a) (eassert (SUBRP(a)),(struct Lisp_Subr *) XPNTR(a)) 622#define XSUBR(a) (eassert (SUBRP (a)), (struct Lisp_Subr *) XPNTR (a))
623#define XBUFFER(a) (eassert (BUFFERP(a)),(struct buffer *) XPNTR(a)) 623#define XBUFFER(a) (eassert (BUFFERP (a)), (struct buffer *) XPNTR (a))
624#define XCHAR_TABLE(a) (eassert (CHAR_TABLE_P (a)), (struct Lisp_Char_Table *) XPNTR(a)) 624#define XCHAR_TABLE(a) (eassert (CHAR_TABLE_P (a)), (struct Lisp_Char_Table *) XPNTR (a))
625#define XSUB_CHAR_TABLE(a) (eassert (SUB_CHAR_TABLE_P (a)), (struct Lisp_Sub_Char_Table *) XPNTR(a)) 625#define XSUB_CHAR_TABLE(a) (eassert (SUB_CHAR_TABLE_P (a)), (struct Lisp_Sub_Char_Table *) XPNTR (a))
626#define XBOOL_VECTOR(a) (eassert (BOOL_VECTOR_P (a)), (struct Lisp_Bool_Vector *) XPNTR(a)) 626#define XBOOL_VECTOR(a) (eassert (BOOL_VECTOR_P (a)), (struct Lisp_Bool_Vector *) XPNTR (a))
627 627
628/* Construct a Lisp_Object from a value or address. */ 628/* Construct a Lisp_Object from a value or address. */
629 629
@@ -641,7 +641,7 @@ extern Lisp_Object make_number (EMACS_INT);
641 641
642/* Pseudovector types. */ 642/* Pseudovector types. */
643 643
644#define XSETPVECTYPE(v, code) XSETTYPED_PVECTYPE(v, header.size, code) 644#define XSETPVECTYPE(v, code) XSETTYPED_PVECTYPE (v, header.size, code)
645#define XSETTYPED_PVECTYPE(v, size_member, code) \ 645#define XSETTYPED_PVECTYPE(v, size_member, code) \
646 ((v)->size_member |= PSEUDOVECTOR_FLAG | (code)) 646 ((v)->size_member |= PSEUDOVECTOR_FLAG | (code))
647#define XSETPVECTYPESIZE(v, code, sizeval) \ 647#define XSETPVECTYPESIZE(v, code, sizeval) \
@@ -753,8 +753,8 @@ struct Lisp_Cons
753#endif 753#endif
754 754
755/* Use these from normal code. */ 755/* Use these from normal code. */
756#define XCAR(c) LISP_MAKE_RVALUE(XCAR_AS_LVALUE(c)) 756#define XCAR(c) LISP_MAKE_RVALUE (XCAR_AS_LVALUE (c))
757#define XCDR(c) LISP_MAKE_RVALUE(XCDR_AS_LVALUE(c)) 757#define XCDR(c) LISP_MAKE_RVALUE (XCDR_AS_LVALUE (c))
758 758
759/* Use these to set the fields of a cons cell. 759/* Use these to set the fields of a cons cell.
760 760
@@ -762,8 +762,8 @@ struct Lisp_Cons
762 should not be read after 'c' is first modified. Also, neither 762 should not be read after 'c' is first modified. Also, neither
763 argument should be evaluated more than once; side effects are 763 argument should be evaluated more than once; side effects are
764 especially common in the second argument. */ 764 especially common in the second argument. */
765#define XSETCAR(c,n) (XCAR_AS_LVALUE(c) = (n)) 765#define XSETCAR(c,n) (XCAR_AS_LVALUE (c) = (n))
766#define XSETCDR(c,n) (XCDR_AS_LVALUE(c) = (n)) 766#define XSETCDR(c,n) (XCDR_AS_LVALUE (c) = (n))
767 767
768/* Take the car or cdr of something whose type is not known. */ 768/* Take the car or cdr of something whose type is not known. */
769#define CAR(c) \ 769#define CAR(c) \
@@ -876,14 +876,14 @@ struct Lisp_Vector
876 of the shortest vector that would hold that struct. */ 876 of the shortest vector that would hold that struct. */
877#define VECSIZE(type) ((sizeof (type) \ 877#define VECSIZE(type) ((sizeof (type) \
878 - offsetof (struct Lisp_Vector, contents[0]) \ 878 - offsetof (struct Lisp_Vector, contents[0]) \
879 + sizeof(Lisp_Object) - 1) /* round up */ \ 879 + sizeof (Lisp_Object) - 1) /* round up */ \
880 / sizeof (Lisp_Object)) 880 / sizeof (Lisp_Object))
881 881
882/* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields 882/* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields
883 at the end and we need to compute the number of Lisp_Object fields (the 883 at the end and we need to compute the number of Lisp_Object fields (the
884 ones that the GC needs to trace). */ 884 ones that the GC needs to trace). */
885#define PSEUDOVECSIZE(type, nonlispfield) \ 885#define PSEUDOVECSIZE(type, nonlispfield) \
886 ((offsetof(type, nonlispfield) - offsetof(struct Lisp_Vector, contents[0])) \ 886 ((offsetof (type, nonlispfield) - offsetof (struct Lisp_Vector, contents[0])) \
887 / sizeof (Lisp_Object)) 887 / sizeof (Lisp_Object))
888 888
889/* A char-table is a kind of vectorlike, with contents are like a 889/* A char-table is a kind of vectorlike, with contents are like a
@@ -1603,16 +1603,6 @@ typedef unsigned char UCHAR;
1603 itself. */ 1603 itself. */
1604#define CHARACTERBITS 22 1604#define CHARACTERBITS 22
1605 1605
1606/* The maximum byte size consumed by push_key_description.
1607 All callers should assure that at least this size of memory is
1608 allocated at the place pointed by the second argument.
1609
1610 There are 6 modifiers, each consumes 2 chars.
1611 The octal form of a character code consumes
1612 (1 + CHARACTERBITS / 3 + 1) chars (including backslash at the head).
1613 We need one more byte for string terminator `\0'. */
1614#define KEY_DESCRIPTION_SIZE ((2 * 6) + 1 + (CHARACTERBITS / 3) + 1 + 1)
1615
1616 1606
1617/* The glyph datatype, used to represent characters on the display. 1607/* The glyph datatype, used to represent characters on the display.
1618 It consists of a char code and a face id. */ 1608 It consists of a char code and a face id. */
@@ -3262,8 +3252,6 @@ extern void force_auto_save_soon (void);
3262extern void init_keyboard (void); 3252extern void init_keyboard (void);
3263extern void syms_of_keyboard (void); 3253extern void syms_of_keyboard (void);
3264extern void keys_of_keyboard (void); 3254extern void keys_of_keyboard (void);
3265extern char *push_key_description (EMACS_INT, char *, int);
3266
3267 3255
3268/* Defined in indent.c */ 3256/* Defined in indent.c */
3269EXFUN (Fvertical_motion, 2); 3257EXFUN (Fvertical_motion, 2);
@@ -3300,7 +3288,7 @@ extern void syms_of_frame (void);
3300/* Defined in emacs.c */ 3288/* Defined in emacs.c */
3301extern char **initial_argv; 3289extern char **initial_argv;
3302extern int initial_argc; 3290extern int initial_argc;
3303#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) 3291#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
3304extern int display_arg; 3292extern int display_arg;
3305#endif 3293#endif
3306extern Lisp_Object decode_env_path (const char *, const char *); 3294extern Lisp_Object decode_env_path (const char *, const char *);
@@ -3646,7 +3634,7 @@ extern void init_system_name (void);
3646/* We used to use `abs', but that clashes with system headers on some 3634/* We used to use `abs', but that clashes with system headers on some
3647 platforms, and using a name reserved by Standard C is a bad idea 3635 platforms, and using a name reserved by Standard C is a bad idea
3648 anyway. */ 3636 anyway. */
3649#if !defined(eabs) 3637#if !defined (eabs)
3650#define eabs(x) ((x) < 0 ? -(x) : (x)) 3638#define eabs(x) ((x) < 0 ? -(x) : (x))
3651#endif 3639#endif
3652 3640
diff --git a/src/lread.c b/src/lread.c
index ec65e881b0e..11c4cf8c8f4 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1284,7 +1284,7 @@ Return t if the file exists and loads successfully. */)
1284 } 1284 }
1285 1285
1286 if (! NILP (Vpurify_flag)) 1286 if (! NILP (Vpurify_flag))
1287 Vpreloaded_file_list = Fcons (Fpurecopy(file), Vpreloaded_file_list); 1287 Vpreloaded_file_list = Fcons (Fpurecopy (file), Vpreloaded_file_list);
1288 1288
1289 if (NILP (nomessage) || force_load_messages) 1289 if (NILP (nomessage) || force_load_messages)
1290 { 1290 {
diff --git a/src/m/alpha.h b/src/m/alpha.h
index 3a27cfd65d9..713598fa8b6 100644
--- a/src/m/alpha.h
+++ b/src/m/alpha.h
@@ -31,7 +31,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
31 31
32#ifdef __ELF__ 32#ifdef __ELF__
33 33
34#if !defined(GNU_LINUX) && !defined(__NetBSD__) 34#if !defined (GNU_LINUX) && !defined (__NetBSD__)
35#define DATA_START 0x140000000 35#define DATA_START 0x140000000
36#endif 36#endif
37 37
diff --git a/src/menu.c b/src/menu.c
index fa31c8a51c1..587f55e14db 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -364,7 +364,7 @@ single_menu_item (Lisp_Object key, Lisp_Object item, Lisp_Object dummy, void *sk
364 return; 364 return;
365 } 365 }
366 366
367#if defined(HAVE_X_WINDOWS) || defined(MSDOS) 367#if defined (HAVE_X_WINDOWS) || defined (MSDOS)
368#ifndef HAVE_BOXES 368#ifndef HAVE_BOXES
369 /* Simulate radio buttons and toggle boxes by putting a prefix in 369 /* Simulate radio buttons and toggle boxes by putting a prefix in
370 front of them. */ 370 front of them. */
@@ -977,7 +977,7 @@ find_and_return_menu_selection (FRAME_PTR f, int keymaps, void *client_data)
977 prefix = entry = Qnil; 977 prefix = entry = Qnil;
978 i = 0; 978 i = 0;
979 subprefix_stack = 979 subprefix_stack =
980 (Lisp_Object *)alloca(menu_items_used * sizeof (Lisp_Object)); 980 (Lisp_Object *)alloca (menu_items_used * sizeof (Lisp_Object));
981 981
982 while (i < menu_items_used) 982 while (i < menu_items_used)
983 { 983 {
diff --git a/src/minibuf.c b/src/minibuf.c
index ad8f3ed8b86..d3f43b06254 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -914,12 +914,11 @@ Fifth arg HIST, if non-nil, specifies a history list and optionally
914 history commands. For consistency, you should also specify that 914 history commands. For consistency, you should also specify that
915 element of the history as the value of INITIAL-CONTENTS. Positions 915 element of the history as the value of INITIAL-CONTENTS. Positions
916 are counted starting from 1 at the beginning of the list. 916 are counted starting from 1 at the beginning of the list.
917Sixth arg DEFAULT-VALUE is the default value or the list of default values. 917Sixth arg DEFAULT-VALUE is a default value or list of default values.
918 If non-nil, it is available for history commands, and as the value 918 If non-nil, it is available via history commands. If READ is
919 (or the first element of the list of default values) to return 919 non-nil, it is also the default to `read' if the user enters empty
920 if the user enters the empty string. But, unless READ is non-nil, 920 input. If READ is non-nil, `read-from-minibuffer' does NOT return
921 `read-from-minibuffer' does NOT return DEFAULT-VALUE if the user enters 921 DEFAULT-VALUE for empty input! It returns the empty string.
922 empty input! It returns the empty string.
923Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits 922Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
924 the current input method and the setting of `enable-multibyte-characters'. 923 the current input method and the setting of `enable-multibyte-characters'.
925If the variable `minibuffer-allow-text-properties' is non-nil, 924If the variable `minibuffer-allow-text-properties' is non-nil,
diff --git a/src/msdos.c b/src/msdos.c
index 3f12bc85cbe..6b6e365a165 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -296,7 +296,7 @@ mouse_get_pos (FRAME_PTR *f, int insist, Lisp_Object *bar_window,
296 FOR_EACH_FRAME (tail, frame) 296 FOR_EACH_FRAME (tail, frame)
297 XFRAME (frame)->mouse_moved = 0; 297 XFRAME (frame)->mouse_moved = 0;
298 298
299 *f = SELECTED_FRAME(); 299 *f = SELECTED_FRAME ();
300 *bar_window = Qnil; 300 *bar_window = Qnil;
301 mouse_get_xy (&ix, &iy); 301 mouse_get_xy (&ix, &iy);
302 *time = event_timestamp (); 302 *time = event_timestamp ();
@@ -310,7 +310,7 @@ mouse_check_moved (void)
310 int x, y; 310 int x, y;
311 311
312 mouse_get_xy (&x, &y); 312 mouse_get_xy (&x, &y);
313 SELECTED_FRAME()->mouse_moved |= (x != mouse_last_x || y != mouse_last_y); 313 SELECTED_FRAME ()->mouse_moved |= (x != mouse_last_x || y != mouse_last_y);
314 mouse_last_x = x; 314 mouse_last_x = x;
315 mouse_last_y = y; 315 mouse_last_y = y;
316} 316}
@@ -582,7 +582,7 @@ dos_set_window_size (int *rows, int *cols)
582 /* If the dimensions changed, the mouse highlight info is invalid. */ 582 /* If the dimensions changed, the mouse highlight info is invalid. */
583 if (current_rows != *rows || current_cols != *cols) 583 if (current_rows != *rows || current_cols != *cols)
584 { 584 {
585 struct frame *f = SELECTED_FRAME(); 585 struct frame *f = SELECTED_FRAME ();
586 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); 586 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
587 Lisp_Object window = hlinfo->mouse_face_window; 587 Lisp_Object window = hlinfo->mouse_face_window;
588 588
@@ -639,7 +639,7 @@ msdos_set_cursor_shape (struct frame *f, int start_line, int width)
639 /* Avoid the costly BIOS call if F isn't the currently selected 639 /* Avoid the costly BIOS call if F isn't the currently selected
640 frame. Allow for NULL as unconditionally meaning the selected 640 frame. Allow for NULL as unconditionally meaning the selected
641 frame. */ 641 frame. */
642 if (f && f != SELECTED_FRAME()) 642 if (f && f != SELECTED_FRAME ())
643 return; 643 return;
644 644
645 if (tty->termscript) 645 if (tty->termscript)
@@ -776,7 +776,7 @@ IT_ring_bell (struct frame *f)
776static void 776static void
777IT_set_face (int face) 777IT_set_face (int face)
778{ 778{
779 struct frame *sf = SELECTED_FRAME(); 779 struct frame *sf = SELECTED_FRAME ();
780 struct face *fp = FACE_FROM_ID (sf, face); 780 struct face *fp = FACE_FROM_ID (sf, face);
781 struct face *dfp = FACE_FROM_ID (sf, DEFAULT_FACE_ID); 781 struct face *dfp = FACE_FROM_ID (sf, DEFAULT_FACE_ID);
782 unsigned long fg, bg, dflt_fg, dflt_bg; 782 unsigned long fg, bg, dflt_fg, dflt_bg;
@@ -868,7 +868,7 @@ IT_write_glyphs (struct frame *f, struct glyph *str, int str_len)
868 868
869 if (str_len <= 0) return; 869 if (str_len <= 0) return;
870 870
871 sf = SELECTED_FRAME(); 871 sf = SELECTED_FRAME ();
872 872
873 /* Since faces get cached and uncached behind our back, we can't 873 /* Since faces get cached and uncached behind our back, we can't
874 rely on their indices in the cache being consistent across 874 rely on their indices in the cache being consistent across
@@ -1755,7 +1755,7 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object alist)
1755 if (redraw) 1755 if (redraw)
1756 { 1756 {
1757 face_change_count++; /* forces xdisp.c to recompute basic faces */ 1757 face_change_count++; /* forces xdisp.c to recompute basic faces */
1758 if (f == SELECTED_FRAME()) 1758 if (f == SELECTED_FRAME ())
1759 redraw_frame (f); 1759 redraw_frame (f);
1760 } 1760 }
1761} 1761}
@@ -1772,7 +1772,7 @@ internal_terminal_init (void)
1772{ 1772{
1773 static int init_needed = 1; 1773 static int init_needed = 1;
1774 char *term = getenv ("TERM"), *colors; 1774 char *term = getenv ("TERM"), *colors;
1775 struct frame *sf = SELECTED_FRAME(); 1775 struct frame *sf = SELECTED_FRAME ();
1776 struct tty_display_info *tty; 1776 struct tty_display_info *tty;
1777 1777
1778#ifdef HAVE_X_WINDOWS 1778#ifdef HAVE_X_WINDOWS
@@ -1923,7 +1923,7 @@ dos_get_saved_screen (char **screen, int *rows, int *cols)
1923void 1923void
1924check_x (void) 1924check_x (void)
1925{ 1925{
1926 if (! FRAME_MSDOS_P (SELECTED_FRAME())) 1926 if (! FRAME_MSDOS_P (SELECTED_FRAME ()))
1927 error ("Not running under a window system"); 1927 error ("Not running under a window system");
1928} 1928}
1929 1929
@@ -2442,12 +2442,12 @@ dos_rawgetc (void)
2442{ 2442{
2443 struct input_event event; 2443 struct input_event event;
2444 union REGS regs; 2444 union REGS regs;
2445 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (SELECTED_FRAME()); 2445 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (SELECTED_FRAME ());
2446 EVENT_INIT (event); 2446 EVENT_INIT (event);
2447 2447
2448#ifndef HAVE_X_WINDOWS 2448#ifndef HAVE_X_WINDOWS
2449 /* Maybe put the cursor where it should be. */ 2449 /* Maybe put the cursor where it should be. */
2450 IT_cmgoto (SELECTED_FRAME()); 2450 IT_cmgoto (SELECTED_FRAME ());
2451#endif 2451#endif
2452 2452
2453 /* The following condition is equivalent to `kbhit ()', except that 2453 /* The following condition is equivalent to `kbhit ()', except that
@@ -2692,7 +2692,7 @@ dos_rawgetc (void)
2692 /* Generate SELECT_WINDOW_EVENTs when needed. */ 2692 /* Generate SELECT_WINDOW_EVENTs when needed. */
2693 if (!NILP (Vmouse_autoselect_window)) 2693 if (!NILP (Vmouse_autoselect_window))
2694 { 2694 {
2695 mouse_window = window_from_coordinates (SELECTED_FRAME(), 2695 mouse_window = window_from_coordinates (SELECTED_FRAME (),
2696 mouse_last_x, 2696 mouse_last_x,
2697 mouse_last_y, 2697 mouse_last_y,
2698 0, 0); 2698 0, 0);
@@ -2718,7 +2718,7 @@ dos_rawgetc (void)
2718 previous_help_echo_string = help_echo_string; 2718 previous_help_echo_string = help_echo_string;
2719 help_echo_string = help_echo_object = help_echo_window = Qnil; 2719 help_echo_string = help_echo_object = help_echo_window = Qnil;
2720 help_echo_pos = -1; 2720 help_echo_pos = -1;
2721 note_mouse_highlight (SELECTED_FRAME(), mouse_last_x, mouse_last_y); 2721 note_mouse_highlight (SELECTED_FRAME (), mouse_last_x, mouse_last_y);
2722 /* If the contents of the global variable help_echo has 2722 /* If the contents of the global variable help_echo has
2723 changed, generate a HELP_EVENT. */ 2723 changed, generate a HELP_EVENT. */
2724 if (!NILP (help_echo_string) || !NILP (previous_help_echo_string)) 2724 if (!NILP (help_echo_string) || !NILP (previous_help_echo_string))
@@ -2913,7 +2913,7 @@ IT_menu_display (XMenu *menu, int y, int x, int pn, int *faces, int disp_help)
2913 int i, j, face, width, mx, my, enabled, mousehere, row, col; 2913 int i, j, face, width, mx, my, enabled, mousehere, row, col;
2914 struct glyph *text, *p; 2914 struct glyph *text, *p;
2915 const unsigned char *q; 2915 const unsigned char *q;
2916 struct frame *sf = SELECTED_FRAME(); 2916 struct frame *sf = SELECTED_FRAME ();
2917 2917
2918 menu_help_message = NULL; 2918 menu_help_message = NULL;
2919 2919
@@ -3092,7 +3092,7 @@ XMenuActivate (Display *foo, XMenu *menu, int *pane, int *selidx,
3092 int statecount, x, y, i, b, screensize, leave, result, onepane; 3092 int statecount, x, y, i, b, screensize, leave, result, onepane;
3093 int title_faces[4]; /* face to display the menu title */ 3093 int title_faces[4]; /* face to display the menu title */
3094 int faces[4], buffers_num_deleted = 0; 3094 int faces[4], buffers_num_deleted = 0;
3095 struct frame *sf = SELECTED_FRAME(); 3095 struct frame *sf = SELECTED_FRAME ();
3096 Lisp_Object saved_echo_area_message, selectface; 3096 Lisp_Object saved_echo_area_message, selectface;
3097 3097
3098 /* Just in case we got here without a mouse present... */ 3098 /* Just in case we got here without a mouse present... */
@@ -3539,10 +3539,10 @@ init_environment (int argc, char **argv, int skip_args)
3539 /* Some lusers set TMPDIR=e:, probably because some losing 3539 /* Some lusers set TMPDIR=e:, probably because some losing
3540 programs cannot handle multiple slashes if they use e:/. 3540 programs cannot handle multiple slashes if they use e:/.
3541 e: fails in `access' below, so we interpret e: as e:/. */ 3541 e: fails in `access' below, so we interpret e: as e:/. */
3542 tmp_len = strlen(tmp); 3542 tmp_len = strlen (tmp);
3543 if (tmp[tmp_len - 1] != '/' && tmp[tmp_len - 1] != '\\') 3543 if (tmp[tmp_len - 1] != '/' && tmp[tmp_len - 1] != '\\')
3544 { 3544 {
3545 strcpy(buf, tmp); 3545 strcpy (buf, tmp);
3546 buf[tmp_len++] = '/', buf[tmp_len] = 0; 3546 buf[tmp_len++] = '/', buf[tmp_len] = 0;
3547 tmp = buf; 3547 tmp = buf;
3548 } 3548 }
diff --git a/src/nsgui.h b/src/nsgui.h
index 999dc27e310..5cc2eee3230 100644
--- a/src/nsgui.h
+++ b/src/nsgui.h
@@ -134,7 +134,7 @@ typedef struct {
134} XRectangle; 134} XRectangle;
135 135
136#ifndef __OBJC__ 136#ifndef __OBJC__
137#if defined(__LP64__) && __LP64__ 137#if defined (__LP64__) && __LP64__
138typedef double CGFloat; 138typedef double CGFloat;
139#else 139#else
140typedef float CGFloat; 140typedef float CGFloat;
diff --git a/src/nsterm.h b/src/nsterm.h
index 188ec732e82..b54e182780a 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -362,7 +362,7 @@ extern EmacsMenu *mainMenu, *svcsMenu, *dockMenu;
362#endif 362#endif
363 363
364#ifndef NS_HAVE_NSINTEGER 364#ifndef NS_HAVE_NSINTEGER
365#if defined(__LP64__) && __LP64__ 365#if defined (__LP64__) && __LP64__
366typedef double CGFloat; 366typedef double CGFloat;
367typedef long NSInteger; 367typedef long NSInteger;
368typedef unsigned long NSUInteger; 368typedef unsigned long NSUInteger;
diff --git a/src/print.c b/src/print.c
index d15590a8880..1d6998d8f1a 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2029,9 +2029,9 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
2029 2029
2030 case Lisp_Misc_Save_Value: 2030 case Lisp_Misc_Save_Value:
2031 strout ("#<save_value ", -1, -1, printcharfun); 2031 strout ("#<save_value ", -1, -1, printcharfun);
2032 sprintf(buf, "ptr=%p int=%"pD"d", 2032 sprintf (buf, "ptr=%p int=%"pD"d",
2033 XSAVE_VALUE (obj)->pointer, 2033 XSAVE_VALUE (obj)->pointer,
2034 XSAVE_VALUE (obj)->integer); 2034 XSAVE_VALUE (obj)->integer);
2035 strout (buf, -1, -1, printcharfun); 2035 strout (buf, -1, -1, printcharfun);
2036 PRINTCHAR ('>'); 2036 PRINTCHAR ('>');
2037 break; 2037 break;
diff --git a/src/process.c b/src/process.c
index 058ad5f871f..90ad9c21681 100644
--- a/src/process.c
+++ b/src/process.c
@@ -54,16 +54,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
54#endif 54#endif
55 55
56#include <sys/ioctl.h> 56#include <sys/ioctl.h>
57#if defined(HAVE_NET_IF_H) 57#if defined (HAVE_NET_IF_H)
58#include <net/if.h> 58#include <net/if.h>
59#endif /* HAVE_NET_IF_H */ 59#endif /* HAVE_NET_IF_H */
60 60
61#if defined(HAVE_IFADDRS_H) 61#if defined (HAVE_IFADDRS_H)
62/* Must be after net/if.h */ 62/* Must be after net/if.h */
63#include <ifaddrs.h> 63#include <ifaddrs.h>
64 64
65/* We only use structs from this header when we use getifaddrs. */ 65/* We only use structs from this header when we use getifaddrs. */
66#if defined(HAVE_NET_IF_DL_H) 66#if defined (HAVE_NET_IF_DL_H)
67#include <net/if_dl.h> 67#include <net/if_dl.h>
68#endif 68#endif
69 69
@@ -256,7 +256,7 @@ static void create_pty (Lisp_Object);
256 256
257/* If we support a window system, turn on the code to poll periodically 257/* If we support a window system, turn on the code to poll periodically
258 to detect C-g. It isn't actually used when doing interrupt input. */ 258 to detect C-g. It isn't actually used when doing interrupt input. */
259#if defined(HAVE_WINDOW_SYSTEM) && !defined(USE_ASYNC_EVENTS) 259#if defined (HAVE_WINDOW_SYSTEM) && !defined (USE_ASYNC_EVENTS)
260#define POLL_FOR_INPUT 260#define POLL_FOR_INPUT
261#endif 261#endif
262 262
@@ -2921,7 +2921,7 @@ usage: (make-network-process &rest ARGS) */)
2921 { 2921 {
2922 /* Don't support network sockets when non-blocking mode is 2922 /* Don't support network sockets when non-blocking mode is
2923 not available, since a blocked Emacs is not useful. */ 2923 not available, since a blocked Emacs is not useful. */
2924#if !defined(O_NONBLOCK) && !defined(O_NDELAY) 2924#if !defined (O_NONBLOCK) && !defined (O_NDELAY)
2925 error ("Network servers not supported"); 2925 error ("Network servers not supported");
2926#else 2926#else
2927 is_server = 1; 2927 is_server = 1;
@@ -2975,7 +2975,7 @@ usage: (make-network-process &rest ARGS) */)
2975 tem = Fplist_get (contact, QCfamily); 2975 tem = Fplist_get (contact, QCfamily);
2976 if (NILP (tem)) 2976 if (NILP (tem))
2977 { 2977 {
2978#if defined(HAVE_GETADDRINFO) && defined(AF_INET6) 2978#if defined (HAVE_GETADDRINFO) && defined (AF_INET6)
2979 family = AF_UNSPEC; 2979 family = AF_UNSPEC;
2980#else 2980#else
2981 family = AF_INET; 2981 family = AF_INET;
@@ -3560,7 +3560,7 @@ usage: (make-network-process &rest ARGS) */)
3560} 3560}
3561 3561
3562 3562
3563#if defined(HAVE_NET_IF_H) 3563#if defined (HAVE_NET_IF_H)
3564 3564
3565#ifdef SIOCGIFCONF 3565#ifdef SIOCGIFCONF
3566DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0, 3566DEFUN ("network-interface-list", Fnetwork_interface_list, Snetwork_interface_list, 0, 0, 0,
@@ -3631,7 +3631,7 @@ format; see the description of ADDRESS in `make-network-process'. */)
3631} 3631}
3632#endif /* SIOCGIFCONF */ 3632#endif /* SIOCGIFCONF */
3633 3633
3634#if defined(SIOCGIFADDR) || defined(SIOCGIFHWADDR) || defined(SIOCGIFFLAGS) 3634#if defined (SIOCGIFADDR) || defined (SIOCGIFHWADDR) || defined (SIOCGIFFLAGS)
3635 3635
3636struct ifflag_def { 3636struct ifflag_def {
3637 int flag_bit; 3637 int flag_bit;
@@ -3738,7 +3738,7 @@ FLAGS is the current flags of the interface. */)
3738 return Qnil; 3738 return Qnil;
3739 3739
3740 elt = Qnil; 3740 elt = Qnil;
3741#if defined(SIOCGIFFLAGS) && defined(HAVE_STRUCT_IFREQ_IFR_FLAGS) 3741#if defined (SIOCGIFFLAGS) && defined (HAVE_STRUCT_IFREQ_IFR_FLAGS)
3742 if (ioctl (s, SIOCGIFFLAGS, &rq) == 0) 3742 if (ioctl (s, SIOCGIFFLAGS, &rq) == 0)
3743 { 3743 {
3744 int flags = rq.ifr_flags; 3744 int flags = rq.ifr_flags;
@@ -3772,7 +3772,7 @@ FLAGS is the current flags of the interface. */)
3772 res = Fcons (elt, res); 3772 res = Fcons (elt, res);
3773 3773
3774 elt = Qnil; 3774 elt = Qnil;
3775#if defined(SIOCGIFHWADDR) && defined(HAVE_STRUCT_IFREQ_IFR_HWADDR) 3775#if defined (SIOCGIFHWADDR) && defined (HAVE_STRUCT_IFREQ_IFR_HWADDR)
3776 if (ioctl (s, SIOCGIFHWADDR, &rq) == 0) 3776 if (ioctl (s, SIOCGIFHWADDR, &rq) == 0)
3777 { 3777 {
3778 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil); 3778 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil);
@@ -3784,7 +3784,7 @@ FLAGS is the current flags of the interface. */)
3784 p->contents[n] = make_number (((unsigned char *)&rq.ifr_hwaddr.sa_data[0])[n]); 3784 p->contents[n] = make_number (((unsigned char *)&rq.ifr_hwaddr.sa_data[0])[n]);
3785 elt = Fcons (make_number (rq.ifr_hwaddr.sa_family), hwaddr); 3785 elt = Fcons (make_number (rq.ifr_hwaddr.sa_family), hwaddr);
3786 } 3786 }
3787#elif defined(HAVE_GETIFADDRS) && defined(LLADDR) 3787#elif defined (HAVE_GETIFADDRS) && defined (LLADDR)
3788 if (getifaddrs (&ifap) != -1) 3788 if (getifaddrs (&ifap) != -1)
3789 { 3789 {
3790 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil); 3790 Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil);
@@ -3802,7 +3802,7 @@ FLAGS is the current flags of the interface. */)
3802 || sdl->sdl_alen != 6) 3802 || sdl->sdl_alen != 6)
3803 continue; 3803 continue;
3804 3804
3805 memcpy (linkaddr, LLADDR(sdl), sdl->sdl_alen); 3805 memcpy (linkaddr, LLADDR (sdl), sdl->sdl_alen);
3806 for (n = 0; n < 6; n++) 3806 for (n = 0; n < 6; n++)
3807 p->contents[n] = make_number (linkaddr[n]); 3807 p->contents[n] = make_number (linkaddr[n]);
3808 3808
@@ -3819,7 +3819,7 @@ FLAGS is the current flags of the interface. */)
3819 res = Fcons (elt, res); 3819 res = Fcons (elt, res);
3820 3820
3821 elt = Qnil; 3821 elt = Qnil;
3822#if defined(SIOCGIFNETMASK) && (defined(HAVE_STRUCT_IFREQ_IFR_NETMASK) || defined(HAVE_STRUCT_IFREQ_IFR_ADDR)) 3822#if defined (SIOCGIFNETMASK) && (defined (HAVE_STRUCT_IFREQ_IFR_NETMASK) || defined (HAVE_STRUCT_IFREQ_IFR_ADDR))
3823 if (ioctl (s, SIOCGIFNETMASK, &rq) == 0) 3823 if (ioctl (s, SIOCGIFNETMASK, &rq) == 0)
3824 { 3824 {
3825 any = 1; 3825 any = 1;
@@ -3833,7 +3833,7 @@ FLAGS is the current flags of the interface. */)
3833 res = Fcons (elt, res); 3833 res = Fcons (elt, res);
3834 3834
3835 elt = Qnil; 3835 elt = Qnil;
3836#if defined(SIOCGIFBRDADDR) && defined(HAVE_STRUCT_IFREQ_IFR_BROADADDR) 3836#if defined (SIOCGIFBRDADDR) && defined (HAVE_STRUCT_IFREQ_IFR_BROADADDR)
3837 if (ioctl (s, SIOCGIFBRDADDR, &rq) == 0) 3837 if (ioctl (s, SIOCGIFBRDADDR, &rq) == 0)
3838 { 3838 {
3839 any = 1; 3839 any = 1;
@@ -3843,7 +3843,7 @@ FLAGS is the current flags of the interface. */)
3843 res = Fcons (elt, res); 3843 res = Fcons (elt, res);
3844 3844
3845 elt = Qnil; 3845 elt = Qnil;
3846#if defined(SIOCGIFADDR) && defined(HAVE_STRUCT_IFREQ_IFR_ADDR) 3846#if defined (SIOCGIFADDR) && defined (HAVE_STRUCT_IFREQ_IFR_ADDR)
3847 if (ioctl (s, SIOCGIFADDR, &rq) == 0) 3847 if (ioctl (s, SIOCGIFADDR, &rq) == 0)
3848 { 3848 {
3849 any = 1; 3849 any = 1;
@@ -3857,7 +3857,7 @@ FLAGS is the current flags of the interface. */)
3857 return any ? res : Qnil; 3857 return any ? res : Qnil;
3858} 3858}
3859#endif 3859#endif
3860#endif /* defined(HAVE_NET_IF_H) */ 3860#endif /* defined (HAVE_NET_IF_H) */
3861 3861
3862/* Turn off input and output for process PROC. */ 3862/* Turn off input and output for process PROC. */
3863 3863
@@ -7280,7 +7280,7 @@ init_process (void)
7280#ifdef HAVE_GETSOCKNAME 7280#ifdef HAVE_GETSOCKNAME
7281 ADD_SUBFEATURE (QCservice, Qt); 7281 ADD_SUBFEATURE (QCservice, Qt);
7282#endif 7282#endif
7283#if defined(O_NONBLOCK) || defined(O_NDELAY) 7283#if defined (O_NONBLOCK) || defined (O_NDELAY)
7284 ADD_SUBFEATURE (QCserver, Qt); 7284 ADD_SUBFEATURE (QCserver, Qt);
7285#endif 7285#endif
7286 7286
@@ -7472,14 +7472,14 @@ The variable takes effect when `start-process' is called. */);
7472 defsubr (&Sset_network_process_option); 7472 defsubr (&Sset_network_process_option);
7473 defsubr (&Smake_network_process); 7473 defsubr (&Smake_network_process);
7474 defsubr (&Sformat_network_address); 7474 defsubr (&Sformat_network_address);
7475#if defined(HAVE_NET_IF_H) 7475#if defined (HAVE_NET_IF_H)
7476#ifdef SIOCGIFCONF 7476#ifdef SIOCGIFCONF
7477 defsubr (&Snetwork_interface_list); 7477 defsubr (&Snetwork_interface_list);
7478#endif 7478#endif
7479#if defined(SIOCGIFADDR) || defined(SIOCGIFHWADDR) || defined(SIOCGIFFLAGS) 7479#if defined (SIOCGIFADDR) || defined (SIOCGIFHWADDR) || defined (SIOCGIFFLAGS)
7480 defsubr (&Snetwork_interface_info); 7480 defsubr (&Snetwork_interface_info);
7481#endif 7481#endif
7482#endif /* defined(HAVE_NET_IF_H) */ 7482#endif /* defined (HAVE_NET_IF_H) */
7483#ifdef DATAGRAM_SOCKETS 7483#ifdef DATAGRAM_SOCKETS
7484 defsubr (&Sprocess_datagram_address); 7484 defsubr (&Sprocess_datagram_address);
7485 defsubr (&Sset_process_datagram_address); 7485 defsubr (&Sset_process_datagram_address);
diff --git a/src/ralloc.c b/src/ralloc.c
index 64a47416202..50d322523c1 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -100,7 +100,7 @@ static int extra_bytes;
100 & ~(page_size - 1)) 100 & ~(page_size - 1))
101#define ROUND_TO_PAGE(addr) (addr & (~(page_size - 1))) 101#define ROUND_TO_PAGE(addr) (addr & (~(page_size - 1)))
102 102
103#define MEM_ALIGN sizeof(double) 103#define MEM_ALIGN sizeof (double)
104#define MEM_ROUNDUP(addr) (((unsigned long int)(addr) + MEM_ALIGN - 1) \ 104#define MEM_ROUNDUP(addr) (((unsigned long int)(addr) + MEM_ALIGN - 1) \
105 & ~(MEM_ALIGN - 1)) 105 & ~(MEM_ALIGN - 1))
106 106
@@ -468,7 +468,7 @@ relocate_blocs (bloc_ptr bloc, heap_ptr heap, POINTER address)
468 468
469 /* No need to ever call this if arena is frozen, bug somewhere! */ 469 /* No need to ever call this if arena is frozen, bug somewhere! */
470 if (r_alloc_freeze_level) 470 if (r_alloc_freeze_level)
471 abort(); 471 abort ();
472 472
473 while (b) 473 while (b)
474 { 474 {
@@ -592,7 +592,7 @@ resize_bloc (bloc_ptr bloc, SIZE size)
592 592
593 /* No need to ever call this if arena is frozen, bug somewhere! */ 593 /* No need to ever call this if arena is frozen, bug somewhere! */
594 if (r_alloc_freeze_level) 594 if (r_alloc_freeze_level)
595 abort(); 595 abort ();
596 596
597 if (bloc == NIL_BLOC || size == bloc->size) 597 if (bloc == NIL_BLOC || size == bloc->size)
598 return 1; 598 return 1;
diff --git a/src/regex.c b/src/regex.c
index d1b835621d9..8033ab9edaa 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -67,7 +67,7 @@
67# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) 67# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
68# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) 68# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
69# define regerror(err_code, preg, errbuf, errbuf_size) \ 69# define regerror(err_code, preg, errbuf, errbuf_size) \
70 __regerror(err_code, preg, errbuf, errbuf_size) 70 __regerror (err_code, preg, errbuf, errbuf_size)
71# define re_set_registers(bu, re, nu, st, en) \ 71# define re_set_registers(bu, re, nu, st, en) \
72 __re_set_registers (bu, re, nu, st, en) 72 __re_set_registers (bu, re, nu, st, en)
73# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ 73# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
@@ -376,12 +376,12 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 };
376# define ISUPPER(c) isupper (c) 376# define ISUPPER(c) isupper (c)
377# define ISXDIGIT(c) isxdigit (c) 377# define ISXDIGIT(c) isxdigit (c)
378 378
379# define ISWORD(c) ISALPHA(c) 379# define ISWORD(c) ISALPHA (c)
380 380
381# ifdef _tolower 381# ifdef _tolower
382# define TOLOWER(c) _tolower(c) 382# define TOLOWER(c) _tolower (c)
383# else 383# else
384# define TOLOWER(c) tolower(c) 384# define TOLOWER(c) tolower (c)
385# endif 385# endif
386 386
387/* How many characters in the character set. */ 387/* How many characters in the character set. */
@@ -2112,7 +2112,7 @@ re_iswctype (int ch, re_wctype_t cc)
2112 case RECC_WORD: return ISWORD (ch) != 0; 2112 case RECC_WORD: return ISWORD (ch) != 0;
2113 case RECC_ERROR: return false; 2113 case RECC_ERROR: return false;
2114 default: 2114 default:
2115 abort(); 2115 abort ();
2116 } 2116 }
2117} 2117}
2118 2118
@@ -2133,7 +2133,7 @@ re_wctype_to_bit (re_wctype_t cc)
2133 case RECC_ASCII: case RECC_DIGIT: case RECC_XDIGIT: case RECC_CNTRL: 2133 case RECC_ASCII: case RECC_DIGIT: case RECC_XDIGIT: case RECC_CNTRL:
2134 case RECC_BLANK: case RECC_UNIBYTE: case RECC_ERROR: return 0; 2134 case RECC_BLANK: case RECC_UNIBYTE: case RECC_ERROR: return 0;
2135 default: 2135 default:
2136 abort(); 2136 abort ();
2137 } 2137 }
2138} 2138}
2139#endif 2139#endif
@@ -4537,10 +4537,10 @@ WEAK_ALIAS (__re_search_2, re_search_2)
4537 4537
4538/* Declarations and macros for re_match_2. */ 4538/* Declarations and macros for re_match_2. */
4539 4539
4540static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2, 4540static int bcmp_translate _RE_ARGS ((re_char *s1, re_char *s2,
4541 register ssize_t len, 4541 register ssize_t len,
4542 RE_TRANSLATE_TYPE translate, 4542 RE_TRANSLATE_TYPE translate,
4543 const int multibyte)); 4543 const int multibyte));
4544 4544
4545/* This converts PTR, a pointer into one of the search strings `string1' 4545/* This converts PTR, a pointer into one of the search strings `string1'
4546 and `string2' into an offset from the beginning of that string. */ 4546 and `string2' into an offset from the beginning of that string. */
@@ -6276,7 +6276,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1,
6276 goto fail; 6276 goto fail;
6277 6277
6278 default: 6278 default:
6279 abort(); 6279 abort ();
6280 } 6280 }
6281 6281
6282 assert (p >= bufp->buffer && p <= pend); 6282 assert (p >= bufp->buffer && p <= pend);
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 178d7082f72..3d78bf695bc 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -103,7 +103,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
103/* This is needed for dispnew.c:update_frame. */ 103/* This is needed for dispnew.c:update_frame. */
104#ifdef emacs 104#ifdef emacs
105#include <stdio.h> /* Get the definition of _IO_STDIO_H. */ 105#include <stdio.h> /* Get the definition of _IO_STDIO_H. */
106#if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) 106#if defined (_IO_STDIO_H) || defined (_STDIO_USES_IOSTREAM)
107/* New C libio names. */ 107/* New C libio names. */
108#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ 108#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
109 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) 109 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
diff --git a/src/s/gnu.h b/src/s/gnu.h
index 8f6035b36a7..c40f764f8bf 100644
--- a/src/s/gnu.h
+++ b/src/s/gnu.h
@@ -37,7 +37,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
37 37
38#ifdef emacs 38#ifdef emacs
39#include <stdio.h> /* Get the definition of _IO_STDIO_H. */ 39#include <stdio.h> /* Get the definition of _IO_STDIO_H. */
40#if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) 40#if defined (_IO_STDIO_H) || defined (_STDIO_USES_IOSTREAM)
41/* new C libio names */ 41/* new C libio names */
42#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ 42#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
43 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) 43 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
diff --git a/src/sound.c b/src/sound.c
index 07c7dab0ada..362c04b7d40 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1013,7 +1013,7 @@ alsa_configure (struct sound_device *sd)
1013 1013
1014 err = snd_pcm_hw_params_get_buffer_size (p->hwparams, &buffer_size); 1014 err = snd_pcm_hw_params_get_buffer_size (p->hwparams, &buffer_size);
1015 if (err < 0) 1015 if (err < 0)
1016 alsa_sound_perror("Unable to get buffer size for playback", err); 1016 alsa_sound_perror ("Unable to get buffer size for playback", err);
1017 1017
1018 err = snd_pcm_sw_params_current (p->handle, p->swparams); 1018 err = snd_pcm_sw_params_current (p->handle, p->swparams);
1019 if (err < 0) 1019 if (err < 0)
@@ -1071,7 +1071,7 @@ alsa_configure (struct sound_device *sd)
1071 snd_mixer_selem_set_playback_volume (e, chn, vol); 1071 snd_mixer_selem_set_playback_volume (e, chn, vol);
1072 } 1072 }
1073 } 1073 }
1074 snd_mixer_close(handle); 1074 snd_mixer_close (handle);
1075 } 1075 }
1076 } 1076 }
1077} 1077}
@@ -1182,7 +1182,7 @@ alsa_write (struct sound_device *sd, const char *buffer, EMACS_INT nbytes)
1182 else if (err == -ESTRPIPE) 1182 else if (err == -ESTRPIPE)
1183 { 1183 {
1184 while ((err = snd_pcm_resume (p->handle)) == -EAGAIN) 1184 while ((err = snd_pcm_resume (p->handle)) == -EAGAIN)
1185 sleep(1); /* wait until the suspend flag is released */ 1185 sleep (1); /* wait until the suspend flag is released */
1186 if (err < 0) 1186 if (err < 0)
1187 { 1187 {
1188 err = snd_pcm_prepare (p->handle); 1188 err = snd_pcm_prepare (p->handle);
diff --git a/src/sysdep.c b/src/sysdep.c
index e20bd591da1..f97a8585253 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -300,7 +300,7 @@ wait_for_termination_1 (int pid, int interruptible)
300{ 300{
301 while (1) 301 while (1)
302 { 302 {
303#if (defined (BSD_SYSTEM) || defined (HPUX)) && !defined(__GNU__) 303#if (defined (BSD_SYSTEM) || defined (HPUX)) && !defined (__GNU__)
304 /* Note that kill returns -1 even if the process is just a zombie now. 304 /* Note that kill returns -1 even if the process is just a zombie now.
305 But inevitably a SIGCHLD interrupt should be generated 305 But inevitably a SIGCHLD interrupt should be generated
306 and child_sig will do wait3 and make the process go away. */ 306 and child_sig will do wait3 and make the process go away. */
@@ -1326,7 +1326,7 @@ setup_pty (int fd)
1326 Since the latter lossage is more benign, we may as well 1326 Since the latter lossage is more benign, we may as well
1327 lose that way. -- cph */ 1327 lose that way. -- cph */
1328#ifdef FIONBIO 1328#ifdef FIONBIO
1329#if defined(UNIX98_PTYS) 1329#if defined (UNIX98_PTYS)
1330 { 1330 {
1331 int on = 1; 1331 int on = 1;
1332 ioctl (fd, FIONBIO, &on); 1332 ioctl (fd, FIONBIO, &on);
@@ -1499,7 +1499,7 @@ sys_signal (int signal_number, signal_handler_t action)
1499 after a signal that sets the interrupt_input_pending flag. */ 1499 after a signal that sets the interrupt_input_pending flag. */
1500 /* Non-interactive keyboard input goes through stdio, where we always 1500 /* Non-interactive keyboard input goes through stdio, where we always
1501 want restartable system calls. */ 1501 want restartable system calls. */
1502# if defined (BROKEN_SA_RESTART) || defined(SYNC_INPUT) 1502# if defined (BROKEN_SA_RESTART) || defined (SYNC_INPUT)
1503 if (noninteractive) 1503 if (noninteractive)
1504# endif 1504# endif
1505 new_action.sa_flags = SA_RESTART; 1505 new_action.sa_flags = SA_RESTART;
@@ -2040,7 +2040,7 @@ rename (const char *from, const char *to)
2040#endif 2040#endif
2041 2041
2042 2042
2043#if defined(HPUX) && !defined(HAVE_PERROR) 2043#if defined (HPUX) && !defined (HAVE_PERROR)
2044 2044
2045/* HPUX curses library references perror, but as far as we know 2045/* HPUX curses library references perror, but as far as we know
2046 it won't be called. Anyway this definition will do for now. */ 2046 it won't be called. Anyway this definition will do for now. */
diff --git a/src/termcap.c b/src/termcap.c
index 6f24817fa72..10c195eebe2 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -400,7 +400,7 @@ tgetent (char *bp, const char *name)
400 if (termcap_name && (*termcap_name == '\\' 400 if (termcap_name && (*termcap_name == '\\'
401 || *termcap_name == '/' 401 || *termcap_name == '/'
402 || termcap_name[1] == ':')) 402 || termcap_name[1] == ':'))
403 dostounix_filename(termcap_name); 403 dostounix_filename (termcap_name);
404#endif 404#endif
405 405
406 filep = termcap_name && valid_filename_p (termcap_name); 406 filep = termcap_name && valid_filename_p (termcap_name);
diff --git a/src/termchar.h b/src/termchar.h
index 035974a8ce6..5ca3cf305c1 100644
--- a/src/termchar.h
+++ b/src/termchar.h
@@ -207,6 +207,6 @@ extern struct tty_display_info *tty_list;
207 (((f)->output_method == output_termcap \ 207 (((f)->output_method == output_termcap \
208 || (f)->output_method == output_msdos_raw) \ 208 || (f)->output_method == output_msdos_raw) \
209 ? (f)->terminal->display_info.tty \ 209 ? (f)->terminal->display_info.tty \
210 : (abort(), (struct tty_display_info *) 0)) 210 : (abort (), (struct tty_display_info *) 0))
211 211
212#define CURTTY() FRAME_TTY (SELECTED_FRAME()) 212#define CURTTY() FRAME_TTY (SELECTED_FRAME())
diff --git a/src/unexaix.c b/src/unexaix.c
index df4c5b8905c..22120b0ea03 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -221,24 +221,24 @@ make_hdr (int new, int a_out,
221 } 221 }
222 222
223#define CHECK_SCNHDR(ptr, name, flags) \ 223#define CHECK_SCNHDR(ptr, name, flags) \
224 if (strcmp(s->s_name, name) == 0) { \ 224 if (strcmp (s->s_name, name) == 0) { \
225 if (s->s_flags != flags) { \ 225 if (s->s_flags != flags) { \
226 fprintf(stderr, "unexec: %lx flags where %x expected in %s section.\n", \ 226 fprintf (stderr, "unexec: %lx flags where %x expected in %s section.\n", \
227 (unsigned long)s->s_flags, flags, name); \ 227 (unsigned long)s->s_flags, flags, name); \
228 } \ 228 } \
229 if (ptr) { \ 229 if (ptr) { \
230 fprintf(stderr, "unexec: duplicate section header for section %s.\n", \ 230 fprintf (stderr, "unexec: duplicate section header for section %s.\n", \
231 name); \ 231 name); \
232 } \ 232 } \
233 ptr = s; \ 233 ptr = s; \
234 } 234 }
235 CHECK_SCNHDR(f_thdr, _TEXT, STYP_TEXT); 235 CHECK_SCNHDR (f_thdr, _TEXT, STYP_TEXT);
236 CHECK_SCNHDR(f_dhdr, _DATA, STYP_DATA); 236 CHECK_SCNHDR (f_dhdr, _DATA, STYP_DATA);
237 CHECK_SCNHDR(f_bhdr, _BSS, STYP_BSS); 237 CHECK_SCNHDR (f_bhdr, _BSS, STYP_BSS);
238 CHECK_SCNHDR(f_lhdr, _LOADER, STYP_LOADER); 238 CHECK_SCNHDR (f_lhdr, _LOADER, STYP_LOADER);
239 CHECK_SCNHDR(f_dbhdr, _DEBUG, STYP_DEBUG); 239 CHECK_SCNHDR (f_dbhdr, _DEBUG, STYP_DEBUG);
240 CHECK_SCNHDR(f_tchdr, _TYPCHK, STYP_TYPCHK); 240 CHECK_SCNHDR (f_tchdr, _TYPCHK, STYP_TYPCHK);
241 CHECK_SCNHDR(f_xhdr, _EXCEPT, STYP_EXCEPT); 241 CHECK_SCNHDR (f_xhdr, _EXCEPT, STYP_EXCEPT);
242 } 242 }
243 243
244 if (f_thdr == 0) 244 if (f_thdr == 0)
@@ -541,7 +541,7 @@ unrelocate_symbols (int new, int a_out, char *a_name, char *new_name)
541#else 541#else
542 /* This worked (and was needed) before AIX 4.2. 542 /* This worked (and was needed) before AIX 4.2.
543 I have no idea why. -- Mike */ 543 I have no idea why. -- Mike */
544 ulong d_reloc = (ulong) &_data - ALIGN(f_ohdr.data_start, 2); 544 ulong d_reloc = (ulong) &_data - ALIGN (f_ohdr.data_start, 2);
545#endif 545#endif
546 int * p; 546 int * p;
547 547
diff --git a/src/unexelf.c b/src/unexelf.c
index a169ffcb5c8..979d6dce629 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -453,7 +453,7 @@ typedef struct {
453 long cbRfdOffset; 453 long cbRfdOffset;
454 long cbExtOffset; 454 long cbExtOffset;
455} HDRR, *pHDRR; 455} HDRR, *pHDRR;
456#define cbHDRR sizeof(HDRR) 456#define cbHDRR sizeof (HDRR)
457#define hdrNil ((pHDRR)0) 457#define hdrNil ((pHDRR)0)
458#endif 458#endif
459 459
@@ -549,11 +549,11 @@ typedef struct {
549 */ 549 */
550 550
551#define OLD_SECTION_H(n) \ 551#define OLD_SECTION_H(n) \
552 (*(ElfW(Shdr) *) ((byte *) old_section_h + old_file_h->e_shentsize * (n))) 552 (*(ElfW (Shdr) *) ((byte *) old_section_h + old_file_h->e_shentsize * (n)))
553#define NEW_SECTION_H(n) \ 553#define NEW_SECTION_H(n) \
554 (*(ElfW(Shdr) *) ((byte *) new_section_h + new_file_h->e_shentsize * (n))) 554 (*(ElfW (Shdr) *) ((byte *) new_section_h + new_file_h->e_shentsize * (n)))
555#define NEW_PROGRAM_H(n) \ 555#define NEW_PROGRAM_H(n) \
556 (*(ElfW(Phdr) *) ((byte *) new_program_h + new_file_h->e_phentsize * (n))) 556 (*(ElfW (Phdr) *) ((byte *) new_program_h + new_file_h->e_phentsize * (n)))
557 557
558#define PATCH_INDEX(n) \ 558#define PATCH_INDEX(n) \
559 do { \ 559 do { \
@@ -563,8 +563,8 @@ typedef unsigned char byte;
563 563
564/* Round X up to a multiple of Y. */ 564/* Round X up to a multiple of Y. */
565 565
566static ElfW(Addr) 566static ElfW (Addr)
567round_up (ElfW(Addr) x, ElfW(Addr) y) 567round_up (ElfW (Addr) x, ElfW (Addr) y)
568{ 568{
569 int rem = x % y; 569 int rem = x % y;
570 if (rem == 0) 570 if (rem == 0)
@@ -581,7 +581,7 @@ round_up (ElfW(Addr) x, ElfW(Addr) y)
581 581
582static int 582static int
583find_section (const char *name, const char *section_names, const char *file_name, 583find_section (const char *name, const char *section_names, const char *file_name,
584 ElfW(Ehdr) *old_file_h, ElfW(Shdr) *old_section_h, int noerror) 584 ElfW (Ehdr) *old_file_h, ElfW (Shdr) *old_section_h, int noerror)
585{ 585{
586 int idx; 586 int idx;
587 587
@@ -635,19 +635,19 @@ unexec (const char *new_name, const char *old_name)
635 635
636 /* Pointers to the file, program and section headers for the old and 636 /* Pointers to the file, program and section headers for the old and
637 new files. */ 637 new files. */
638 ElfW(Ehdr) *old_file_h, *new_file_h; 638 ElfW (Ehdr) *old_file_h, *new_file_h;
639 ElfW(Phdr) *old_program_h, *new_program_h; 639 ElfW (Phdr) *old_program_h, *new_program_h;
640 ElfW(Shdr) *old_section_h, *new_section_h; 640 ElfW (Shdr) *old_section_h, *new_section_h;
641 641
642 /* Point to the section name table in the old file. */ 642 /* Point to the section name table in the old file. */
643 char *old_section_names; 643 char *old_section_names;
644 644
645 ElfW(Addr) old_bss_addr, new_bss_addr; 645 ElfW (Addr) old_bss_addr, new_bss_addr;
646 ElfW(Word) old_bss_size, new_data2_size; 646 ElfW (Word) old_bss_size, new_data2_size;
647 ElfW(Off) new_data2_offset; 647 ElfW (Off) new_data2_offset;
648 ElfW(Addr) new_data2_addr; 648 ElfW (Addr) new_data2_addr;
649 ElfW(Off) old_bss_offset; 649 ElfW (Off) old_bss_offset;
650 ElfW(Word) new_data2_incr; 650 ElfW (Word) new_data2_incr;
651 651
652 int n, nn; 652 int n, nn;
653 int old_bss_index, old_sbss_index, old_plt_index; 653 int old_bss_index, old_sbss_index, old_plt_index;
@@ -690,9 +690,9 @@ unexec (const char *new_name, const char *old_name)
690 690
691 /* Get pointers to headers & section names */ 691 /* Get pointers to headers & section names */
692 692
693 old_file_h = (ElfW(Ehdr) *) old_base; 693 old_file_h = (ElfW (Ehdr) *) old_base;
694 old_program_h = (ElfW(Phdr) *) ((byte *) old_base + old_file_h->e_phoff); 694 old_program_h = (ElfW (Phdr) *) ((byte *) old_base + old_file_h->e_phoff);
695 old_section_h = (ElfW(Shdr) *) ((byte *) old_base + old_file_h->e_shoff); 695 old_section_h = (ElfW (Shdr) *) ((byte *) old_base + old_file_h->e_shoff);
696 old_section_names = (char *) old_base 696 old_section_names = (char *) old_base
697 + OLD_SECTION_H (old_file_h->e_shstrndx).sh_offset; 697 + OLD_SECTION_H (old_file_h->e_shstrndx).sh_offset;
698 698
@@ -759,7 +759,7 @@ unexec (const char *new_name, const char *old_name)
759 759
760#if defined (emacs) || !defined (DEBUG) 760#if defined (emacs) || !defined (DEBUG)
761 new_break = sbrk (0); 761 new_break = sbrk (0);
762 new_bss_addr = (ElfW(Addr)) new_break; 762 new_bss_addr = (ElfW (Addr)) new_break;
763#else 763#else
764 new_bss_addr = old_bss_addr + old_bss_size + 0x1234; 764 new_bss_addr = old_bss_addr + old_bss_size + 0x1234;
765#endif 765#endif
@@ -806,9 +806,9 @@ unexec (const char *new_name, const char *old_name)
806 if (new_base == MAP_FAILED) 806 if (new_base == MAP_FAILED)
807 fatal ("Can't allocate buffer for %s\n", old_name, 0); 807 fatal ("Can't allocate buffer for %s\n", old_name, 0);
808 808
809 new_file_h = (ElfW(Ehdr) *) new_base; 809 new_file_h = (ElfW (Ehdr) *) new_base;
810 new_program_h = (ElfW(Phdr) *) ((byte *) new_base + old_file_h->e_phoff); 810 new_program_h = (ElfW (Phdr) *) ((byte *) new_base + old_file_h->e_phoff);
811 new_section_h = (ElfW(Shdr) *) 811 new_section_h = (ElfW (Shdr) *)
812 ((byte *) new_base + old_file_h->e_shoff + new_data2_incr); 812 ((byte *) new_base + old_file_h->e_shoff + new_data2_incr);
813 813
814 /* Make our new file, program and section headers as copies of the 814 /* Make our new file, program and section headers as copies of the
@@ -844,7 +844,7 @@ unexec (const char *new_name, const char *old_name)
844 for (n = new_file_h->e_phnum - 1; n >= 0; n--) 844 for (n = new_file_h->e_phnum - 1; n >= 0; n--)
845 { 845 {
846 /* Compute maximum of all requirements for alignment of section. */ 846 /* Compute maximum of all requirements for alignment of section. */
847 ElfW(Word) alignment = (NEW_PROGRAM_H (n)).p_align; 847 ElfW (Word) alignment = (NEW_PROGRAM_H (n)).p_align;
848 if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment) 848 if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment)
849 alignment = OLD_SECTION_H (old_bss_index).sh_addralign; 849 alignment = OLD_SECTION_H (old_bss_index).sh_addralign;
850 850
@@ -1078,8 +1078,8 @@ temacs:
1078 if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG 1078 if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG
1079 && old_mdebug_index != -1) 1079 && old_mdebug_index != -1)
1080 { 1080 {
1081 int diff = NEW_SECTION_H(nn).sh_offset 1081 int diff = NEW_SECTION_H (nn).sh_offset
1082 - OLD_SECTION_H(old_mdebug_index).sh_offset; 1082 - OLD_SECTION_H (old_mdebug_index).sh_offset;
1083 HDRR *phdr = (HDRR *)(NEW_SECTION_H (nn).sh_offset + new_base); 1083 HDRR *phdr = (HDRR *)(NEW_SECTION_H (nn).sh_offset + new_base);
1084 1084
1085 if (diff) 1085 if (diff)
@@ -1158,9 +1158,9 @@ temacs:
1158 if (NEW_SECTION_H (nn).sh_type == SHT_SYMTAB 1158 if (NEW_SECTION_H (nn).sh_type == SHT_SYMTAB
1159 || NEW_SECTION_H (nn).sh_type == SHT_DYNSYM) 1159 || NEW_SECTION_H (nn).sh_type == SHT_DYNSYM)
1160 { 1160 {
1161 ElfW(Shdr) *spt = &NEW_SECTION_H (nn); 1161 ElfW (Shdr) *spt = &NEW_SECTION_H (nn);
1162 unsigned int num = spt->sh_size / spt->sh_entsize; 1162 unsigned int num = spt->sh_size / spt->sh_entsize;
1163 ElfW(Sym) * sym = (ElfW(Sym) *) (NEW_SECTION_H (nn).sh_offset + 1163 ElfW (Sym) * sym = (ElfW (Sym) *) (NEW_SECTION_H (nn).sh_offset +
1164 new_base); 1164 new_base);
1165 for (; num--; sym++) 1165 for (; num--; sym++)
1166 { 1166 {
@@ -1178,7 +1178,7 @@ temacs:
1178 for (n = new_file_h->e_shnum - 1; n; n--) 1178 for (n = new_file_h->e_shnum - 1; n; n--)
1179 { 1179 {
1180 byte *symnames; 1180 byte *symnames;
1181 ElfW(Sym) *symp, *symendp; 1181 ElfW (Sym) *symp, *symendp;
1182 1182
1183 if (NEW_SECTION_H (n).sh_type != SHT_DYNSYM 1183 if (NEW_SECTION_H (n).sh_type != SHT_DYNSYM
1184 && NEW_SECTION_H (n).sh_type != SHT_SYMTAB) 1184 && NEW_SECTION_H (n).sh_type != SHT_SYMTAB)
@@ -1186,8 +1186,8 @@ temacs:
1186 1186
1187 symnames = ((byte *) new_base 1187 symnames = ((byte *) new_base
1188 + NEW_SECTION_H (NEW_SECTION_H (n).sh_link).sh_offset); 1188 + NEW_SECTION_H (NEW_SECTION_H (n).sh_link).sh_offset);
1189 symp = (ElfW(Sym) *) (NEW_SECTION_H (n).sh_offset + new_base); 1189 symp = (ElfW (Sym) *) (NEW_SECTION_H (n).sh_offset + new_base);
1190 symendp = (ElfW(Sym) *) ((byte *)symp + NEW_SECTION_H (n).sh_size); 1190 symendp = (ElfW (Sym) *) ((byte *)symp + NEW_SECTION_H (n).sh_size);
1191 1191
1192 for (; symp < symendp; symp ++) 1192 for (; symp < symendp; symp ++)
1193 { 1193 {
@@ -1231,7 +1231,7 @@ temacs:
1231 that it can undo relocations performed by the runtime linker. */ 1231 that it can undo relocations performed by the runtime linker. */
1232 for (n = new_file_h->e_shnum - 1; n; n--) 1232 for (n = new_file_h->e_shnum - 1; n; n--)
1233 { 1233 {
1234 ElfW(Shdr) section = NEW_SECTION_H (n); 1234 ElfW (Shdr) section = NEW_SECTION_H (n);
1235 1235
1236 /* Cause a compilation error if anyone uses n instead of nn below. */ 1236 /* Cause a compilation error if anyone uses n instead of nn below. */
1237 #define n ((void) 0); 1237 #define n ((void) 0);
@@ -1263,21 +1263,21 @@ temacs:
1263 || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), 1263 || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name),
1264 ".data1")) 1264 ".data1"))
1265 { 1265 {
1266 ElfW(Addr) offset = (NEW_SECTION_H (nn).sh_addr 1266 ElfW (Addr) offset = (NEW_SECTION_H (nn).sh_addr
1267 - NEW_SECTION_H (nn).sh_offset); 1267 - NEW_SECTION_H (nn).sh_offset);
1268 caddr_t reloc = old_base + section.sh_offset, end; 1268 caddr_t reloc = old_base + section.sh_offset, end;
1269 for (end = reloc + section.sh_size; reloc < end; 1269 for (end = reloc + section.sh_size; reloc < end;
1270 reloc += section.sh_entsize) 1270 reloc += section.sh_entsize)
1271 { 1271 {
1272 ElfW(Addr) addr = ((ElfW(Rel) *) reloc)->r_offset - offset; 1272 ElfW (Addr) addr = ((ElfW (Rel) *) reloc)->r_offset - offset;
1273#ifdef __alpha__ 1273#ifdef __alpha__
1274 /* The Alpha ELF binutils currently have a bug that 1274 /* The Alpha ELF binutils currently have a bug that
1275 sometimes results in relocs that contain all 1275 sometimes results in relocs that contain all
1276 zeroes. Work around this for now... */ 1276 zeroes. Work around this for now... */
1277 if (((ElfW(Rel) *) reloc)->r_offset == 0) 1277 if (((ElfW (Rel) *) reloc)->r_offset == 0)
1278 continue; 1278 continue;
1279#endif 1279#endif
1280 memcpy (new_base + addr, old_base + addr, sizeof(ElfW(Addr))); 1280 memcpy (new_base + addr, old_base + addr, sizeof (ElfW (Addr)));
1281 } 1281 }
1282 } 1282 }
1283 break; 1283 break;
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index 0751eeacb9b..a4c2f241c9f 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -478,7 +478,7 @@ find_emacs_zone_regions (void)
478{ 478{
479 num_unexec_regions = 0; 479 num_unexec_regions = 0;
480 480
481 emacs_zone->introspect->enumerator (mach_task_self(), 0, 481 emacs_zone->introspect->enumerator (mach_task_self (), 0,
482 MALLOC_PTR_REGION_RANGE_TYPE 482 MALLOC_PTR_REGION_RANGE_TYPE
483 | MALLOC_ADMIN_REGION_RANGE_TYPE, 483 | MALLOC_ADMIN_REGION_RANGE_TYPE,
484 (vm_address_t) emacs_zone, 484 (vm_address_t) emacs_zone,
diff --git a/src/unexw32.c b/src/unexw32.c
index e03fa6c9b9a..e5440c2f500 100644
--- a/src/unexw32.c
+++ b/src/unexw32.c
@@ -123,8 +123,8 @@ _start (void)
123 is finished. */ 123 is finished. */
124#ifdef HAVE_NTGUI 124#ifdef HAVE_NTGUI
125 /* determine WinMain args like crt0.c does */ 125 /* determine WinMain args like crt0.c does */
126 hinst = GetModuleHandle(NULL); 126 hinst = GetModuleHandle (NULL);
127 lpCmdLine = GetCommandLine(); 127 lpCmdLine = GetCommandLine ();
128 nCmdShow = SW_SHOWDEFAULT; 128 nCmdShow = SW_SHOWDEFAULT;
129#endif 129#endif
130 mainCRTStartup (); 130 mainCRTStartup ();
@@ -326,7 +326,7 @@ relocate_offset (DWORD offset,
326#define PTR_TO_RVA(ptr) ((DWORD)(ptr) - (DWORD) GetModuleHandle (NULL)) 326#define PTR_TO_RVA(ptr) ((DWORD)(ptr) - (DWORD) GetModuleHandle (NULL))
327 327
328#define RVA_TO_PTR(var,section,filedata) \ 328#define RVA_TO_PTR(var,section,filedata) \
329 ((void *)(RVA_TO_OFFSET(var,section) + (filedata).file_base)) 329 ((void *)(RVA_TO_OFFSET (var,section) + (filedata).file_base))
330 330
331#define PTR_TO_OFFSET(ptr, pfile_data) \ 331#define PTR_TO_OFFSET(ptr, pfile_data) \
332 ((unsigned char *)(ptr) - (pfile_data)->file_base) 332 ((unsigned char *)(ptr) - (pfile_data)->file_base)
diff --git a/src/vm-limit.c b/src/vm-limit.c
index 846946b41c1..fc847a295dd 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -237,7 +237,7 @@ check_memory_limits (void)
237 (*warn_function) ("Warning: memory in use exceeds lisp pointer size"); 237 (*warn_function) ("Warning: memory in use exceeds lisp pointer size");
238} 238}
239 239
240#if !defined(CANNOT_DUMP) || !defined(SYSTEM_MALLOC) 240#if !defined (CANNOT_DUMP) || !defined (SYSTEM_MALLOC)
241/* Some systems that cannot dump also cannot implement these. */ 241/* Some systems that cannot dump also cannot implement these. */
242 242
243/* 243/*
diff --git a/src/w16select.c b/src/w16select.c
index d5aae1b2e5c..cae7a6f82dd 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -110,7 +110,7 @@ identify_winoldap_version (void)
110 <> 1700H: AL = Major version number 110 <> 1700H: AL = Major version number
111 AH = Minor version number */ 111 AH = Minor version number */
112 regs.x.ax = 0x1700; 112 regs.x.ax = 0x1700;
113 __dpmi_int(0x2f, &regs); 113 __dpmi_int (0x2f, &regs);
114 return regs.x.ax; 114 return regs.x.ax;
115} 115}
116 116
@@ -133,7 +133,7 @@ open_clipboard (void)
133 Return Values AX == 0: Clipboard already open 133 Return Values AX == 0: Clipboard already open
134 <> 0: Clipboard opened */ 134 <> 0: Clipboard opened */
135 regs.x.ax = 0x1701; 135 regs.x.ax = 0x1701;
136 __dpmi_int(0x2f, &regs); 136 __dpmi_int (0x2f, &regs);
137 return regs.x.ax; 137 return regs.x.ax;
138} 138}
139 139
@@ -147,7 +147,7 @@ empty_clipboard (void)
147 Return Values AX == 0: Error occurred 147 Return Values AX == 0: Error occurred
148 <> 0: OK, Clipboard emptied */ 148 <> 0: OK, Clipboard emptied */
149 regs.x.ax = 0x1702; 149 regs.x.ax = 0x1702;
150 __dpmi_int(0x2f, &regs); 150 __dpmi_int (0x2f, &regs);
151 return regs.x.ax; 151 return regs.x.ax;
152} 152}
153 153
@@ -294,7 +294,7 @@ set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
294 regs.x.cx = truelen & 0xffff; 294 regs.x.cx = truelen & 0xffff;
295 regs.x.es = xbuf_addr >> 4; 295 regs.x.es = xbuf_addr >> 4;
296 regs.x.bx = xbuf_addr & 15; 296 regs.x.bx = xbuf_addr & 15;
297 __dpmi_int(0x2f, &regs); 297 __dpmi_int (0x2f, &regs);
298 298
299 free_xfer_buf (); 299 free_xfer_buf ();
300 300
@@ -320,7 +320,7 @@ get_clipboard_data_size (unsigned Format)
320 the clipboard. */ 320 the clipboard. */
321 regs.x.ax = 0x1704; 321 regs.x.ax = 0x1704;
322 regs.x.dx = Format; 322 regs.x.dx = Format;
323 __dpmi_int(0x2f, &regs); 323 __dpmi_int (0x2f, &regs);
324 return ( (((unsigned)regs.x.dx) << 16) | regs.x.ax); 324 return ( (((unsigned)regs.x.dx) << 16) | regs.x.ax);
325} 325}
326 326
@@ -353,7 +353,7 @@ get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
353 regs.x.dx = Format; 353 regs.x.dx = Format;
354 regs.x.es = xbuf_addr >> 4; 354 regs.x.es = xbuf_addr >> 4;
355 regs.x.bx = xbuf_addr & 15; 355 regs.x.bx = xbuf_addr & 15;
356 __dpmi_int(0x2f, &regs); 356 __dpmi_int (0x2f, &regs);
357 if (regs.x.ax != 0) 357 if (regs.x.ax != 0)
358 { 358 {
359 unsigned char null_char = '\0'; 359 unsigned char null_char = '\0';
@@ -415,7 +415,7 @@ close_clipboard (void)
415 Return Values AX == 0: Error occurred 415 Return Values AX == 0: Error occurred
416 <> 0: OK */ 416 <> 0: OK */
417 regs.x.ax = 0x1708; 417 regs.x.ax = 0x1708;
418 __dpmi_int(0x2f, &regs); 418 __dpmi_int (0x2f, &regs);
419 return regs.x.ax; 419 return regs.x.ax;
420} 420}
421 421
@@ -432,7 +432,7 @@ clipboard_compact (unsigned Size)
432 regs.x.ax = 0x1709; 432 regs.x.ax = 0x1709;
433 regs.x.si = Size >> 16; 433 regs.x.si = Size >> 16;
434 regs.x.cx = Size & 0xffff; 434 regs.x.cx = Size & 0xffff;
435 __dpmi_int(0x2f, &regs); 435 __dpmi_int (0x2f, &regs);
436 return ((unsigned)regs.x.dx << 16) | regs.x.ax; 436 return ((unsigned)regs.x.dx << 16) | regs.x.ax;
437} 437}
438 438
diff --git a/src/w32.c b/src/w32.c
index de72e180c62..91893ddfc61 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -95,7 +95,7 @@ typedef struct _MEMORY_STATUS_EX {
95#include <tlhelp32.h> 95#include <tlhelp32.h>
96#include <psapi.h> 96#include <psapi.h>
97#include <w32api.h> 97#include <w32api.h>
98#if !defined(__MINGW32__) || __W32API_MAJOR_VERSION < 3 || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 15) 98#if !defined (__MINGW32__) || __W32API_MAJOR_VERSION < 3 || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 15)
99/* This either is not in psapi.h or guarded by higher value of 99/* This either is not in psapi.h or guarded by higher value of
100 _WIN32_WINNT than what we use. w32api supplied with MinGW 3.15 100 _WIN32_WINNT than what we use. w32api supplied with MinGW 3.15
101 defines it in psapi.h */ 101 defines it in psapi.h */
@@ -6212,7 +6212,7 @@ emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz)
6212 6212
6213 for (;;) 6213 for (;;)
6214 { 6214 {
6215 n = sys_read(fd, (char*)buf, sz); 6215 n = sys_read (fd, (char*)buf, sz);
6216 6216
6217 if (n >= 0) 6217 if (n >= 0)
6218 return n; 6218 return n;
@@ -6222,7 +6222,7 @@ emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz)
6222 if (err == EWOULDBLOCK) 6222 if (err == EWOULDBLOCK)
6223 { 6223 {
6224 /* Set a small timeout. */ 6224 /* Set a small timeout. */
6225 EMACS_SET_SECS_USECS(timeout, 1, 0); 6225 EMACS_SET_SECS_USECS (timeout, 1, 0);
6226 FD_ZERO (&fdset); 6226 FD_ZERO (&fdset);
6227 FD_SET ((int)fd, &fdset); 6227 FD_SET ((int)fd, &fdset);
6228 6228
@@ -6252,7 +6252,7 @@ emacs_gnutls_push (gnutls_transport_ptr_t p, const void* buf, size_t sz)
6252{ 6252{
6253 struct Lisp_Process *process = (struct Lisp_Process *)p; 6253 struct Lisp_Process *process = (struct Lisp_Process *)p;
6254 int fd = process->outfd; 6254 int fd = process->outfd;
6255 ssize_t n = sys_write(fd, buf, sz); 6255 ssize_t n = sys_write (fd, buf, sz);
6256 6256
6257 /* 0 or more bytes written means everything went fine. */ 6257 /* 0 or more bytes written means everything went fine. */
6258 if (n >= 0) 6258 if (n >= 0)
diff --git a/src/w32term.h b/src/w32term.h
index 24a2be7dca9..710394583e4 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -68,7 +68,7 @@ struct w32_palette_entry {
68#endif 68#endif
69}; 69};
70 70
71extern void w32_regenerate_palette(struct frame *f); 71extern void w32_regenerate_palette (struct frame *f);
72 72
73 73
74/* For each display (currently only one on w32), we have a structure that 74/* For each display (currently only one on w32), we have a structure that
diff --git a/src/widget.c b/src/widget.c
index a09ec2631ad..0582718948d 100644
--- a/src/widget.c
+++ b/src/widget.c
@@ -86,12 +86,12 @@ static XtGeometryResult EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry
86#undef XtOffset 86#undef XtOffset
87#define XtOffset(p_type,field) \ 87#define XtOffset(p_type,field) \
88 ((Cardinal) (((char *) (&(((p_type)0)->field))) - ((char *)0))) 88 ((Cardinal) (((char *) (&(((p_type)0)->field))) - ((char *)0)))
89#define offset(field) XtOffset(EmacsFrame, emacs_frame.field) 89#define offset(field) XtOffset (EmacsFrame, emacs_frame.field)
90 90
91static XtResource resources[] = { 91static XtResource resources[] = {
92 {XtNgeometry, XtCGeometry, XtRString, sizeof(String), 92 {XtNgeometry, XtCGeometry, XtRString, sizeof (String),
93 offset (geometry), XtRString, (XtPointer) 0}, 93 offset (geometry), XtRString, (XtPointer) 0},
94 {XtNiconic, XtCIconic, XtRBoolean, sizeof(Boolean), 94 {XtNiconic, XtCIconic, XtRBoolean, sizeof (Boolean),
95 offset (iconic), XtRImmediate, (XtPointer) False}, 95 offset (iconic), XtRImmediate, (XtPointer) False},
96 96
97 {XtNemacsFrame, XtCEmacsFrame, XtRPointer, sizeof (XtPointer), 97 {XtNemacsFrame, XtCEmacsFrame, XtRPointer, sizeof (XtPointer),
@@ -105,12 +105,12 @@ static XtResource resources[] = {
105 offset (internal_border_width), XtRImmediate, (XtPointer)4}, 105 offset (internal_border_width), XtRImmediate, (XtPointer)4},
106 {XtNinterline, XtCInterline, XtRInt, sizeof (int), 106 {XtNinterline, XtCInterline, XtRInt, sizeof (int),
107 offset (interline), XtRImmediate, (XtPointer)0}, 107 offset (interline), XtRImmediate, (XtPointer)0},
108 {XtNfont, XtCFont, XtRFontStruct, sizeof(struct font *), 108 {XtNfont, XtCFont, XtRFontStruct, sizeof (struct font *),
109 offset(font),XtRString, DEFAULT_FACE_FONT}, 109 offset (font),XtRString, DEFAULT_FACE_FONT},
110 {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), 110 {XtNforeground, XtCForeground, XtRPixel, sizeof (Pixel),
111 offset(foreground_pixel), XtRString, "XtDefaultForeground"}, 111 offset (foreground_pixel), XtRString, "XtDefaultForeground"},
112 {XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel), 112 {XtNcursorColor, XtCForeground, XtRPixel, sizeof (Pixel),
113 offset(cursor_color), XtRString, "XtDefaultForeground"}, 113 offset (cursor_color), XtRString, "XtDefaultForeground"},
114 {XtNbarCursor, XtCBarCursor, XtRBoolean, sizeof (Boolean), 114 {XtNbarCursor, XtCBarCursor, XtRBoolean, sizeof (Boolean),
115 offset (bar_cursor), XtRImmediate, (XtPointer)0}, 115 offset (bar_cursor), XtRImmediate, (XtPointer)0},
116 {XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof (Boolean), 116 {XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof (Boolean),
@@ -141,7 +141,7 @@ static EmacsFrameClassRec emacsFrameClassRec = {
141 { /* core fields */ 141 { /* core fields */
142 /* superclass */ &widgetClassRec, 142 /* superclass */ &widgetClassRec,
143 /* class_name */ "EmacsFrame", 143 /* class_name */ "EmacsFrame",
144 /* widget_size */ sizeof(EmacsFrameRec), 144 /* widget_size */ sizeof (EmacsFrameRec),
145 /* class_initialize */ 0, 145 /* class_initialize */ 0,
146 /* class_part_initialize */ 0, 146 /* class_part_initialize */ 0,
147 /* class_inited */ FALSE, 147 /* class_inited */ FALSE,
@@ -151,7 +151,7 @@ static EmacsFrameClassRec emacsFrameClassRec = {
151 /* actions */ 0, /*emacsFrameActionsTable*/ 151 /* actions */ 0, /*emacsFrameActionsTable*/
152 /* num_actions */ 0, /*XtNumber (emacsFrameActionsTable)*/ 152 /* num_actions */ 0, /*XtNumber (emacsFrameActionsTable)*/
153 /* resources */ resources, 153 /* resources */ resources,
154 /* resource_count */ XtNumber(resources), 154 /* resource_count */ XtNumber (resources),
155 /* xrm_class */ NULLQUARK, 155 /* xrm_class */ NULLQUARK,
156 /* compress_motion */ TRUE, 156 /* compress_motion */ TRUE,
157 /* compress_exposure */ TRUE, 157 /* compress_exposure */ TRUE,
@@ -574,7 +574,7 @@ setup_frame_gcs (EmacsFrame ew)
574 never actually get used as a background tile! 574 never actually get used as a background tile!
575 */ 575 */
576 blank_tile 576 blank_tile
577 = XCreatePixmapFromBitmapData (XtDisplay(ew), 577 = XCreatePixmapFromBitmapData (XtDisplay (ew),
578 RootWindowOfScreen (XtScreen (ew)), 578 RootWindowOfScreen (XtScreen (ew)),
579 setup_frame_cursor_bits, 2, 2, 579 setup_frame_cursor_bits, 2, 2,
580 0, 1, ew->core.depth); 580 0, 1, ew->core.depth);
diff --git a/src/window.c b/src/window.c
index 33361b5ac1d..0f5aeb0cda9 100644
--- a/src/window.c
+++ b/src/window.c
@@ -777,7 +777,7 @@ of just the text area, use `window-inside-pixel-edges'. */)
777} 777}
778 778
779static void 779static void
780calc_absolute_offset(struct window *w, int *add_x, int *add_y) 780calc_absolute_offset (struct window *w, int *add_x, int *add_y)
781{ 781{
782 struct frame *f = XFRAME (w->frame); 782 struct frame *f = XFRAME (w->frame);
783 *add_y = f->top_pos; 783 *add_y = f->top_pos;
@@ -1684,7 +1684,7 @@ PREV-BUFFERS should be either nil or a list of <buffer, window-start,
1684window-point> triples where buffer was previously shown in WINDOW. */) 1684window-point> triples where buffer was previously shown in WINDOW. */)
1685 (Lisp_Object window, Lisp_Object prev_buffers) 1685 (Lisp_Object window, Lisp_Object prev_buffers)
1686{ 1686{
1687 return decode_any_window (window)->prev_buffers = prev_buffers; 1687 return decode_window (window)->prev_buffers = prev_buffers;
1688} 1688}
1689 1689
1690DEFUN ("window-next-buffers", Fwindow_next_buffers, Swindow_next_buffers, 1690DEFUN ("window-next-buffers", Fwindow_next_buffers, Swindow_next_buffers,
@@ -1706,7 +1706,7 @@ NEXT-BUFFERS should be either nil or a list of buffers that have been
1706recently re-shown in WINDOW. */) 1706recently re-shown in WINDOW. */)
1707 (Lisp_Object window, Lisp_Object next_buffers) 1707 (Lisp_Object window, Lisp_Object next_buffers)
1708{ 1708{
1709 return decode_any_window (window)->next_buffers = next_buffers; 1709 return decode_window (window)->next_buffers = next_buffers;
1710} 1710}
1711 1711
1712DEFUN ("window-parameters", Fwindow_parameters, Swindow_parameters, 1712DEFUN ("window-parameters", Fwindow_parameters, Swindow_parameters,
diff --git a/src/xdisp.c b/src/xdisp.c
index 2aa0dee02b8..241571cd9df 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -608,7 +608,7 @@ int current_mode_line_height, current_header_line_height;
608 if (CACHE) \ 608 if (CACHE) \
609 bidi_unshelve_cache (CACHE, 1); \ 609 bidi_unshelve_cache (CACHE, 1); \
610 ITCOPY = ITORIG; \ 610 ITCOPY = ITORIG; \
611 CACHE = bidi_shelve_cache(); \ 611 CACHE = bidi_shelve_cache (); \
612 } while (0) 612 } while (0)
613 613
614#define RESTORE_IT(pITORIG,pITCOPY,CACHE) \ 614#define RESTORE_IT(pITORIG,pITCOPY,CACHE) \
@@ -1921,7 +1921,7 @@ get_phys_cursor_geometry (struct window *w, struct glyph_row *row,
1921 rectangle as wide as the glyph, but use a canonical character 1921 rectangle as wide as the glyph, but use a canonical character
1922 width instead. */ 1922 width instead. */
1923 wd = glyph->pixel_width - 1; 1923 wd = glyph->pixel_width - 1;
1924#if defined(HAVE_NTGUI) || defined(HAVE_NS) 1924#if defined (HAVE_NTGUI) || defined (HAVE_NS)
1925 wd++; /* Why? */ 1925 wd++; /* Why? */
1926#endif 1926#endif
1927 1927
@@ -3137,9 +3137,9 @@ next_overlay_change (EMACS_INT pos)
3137} 3137}
3138 3138
3139/* How many characters forward to search for a display property or 3139/* How many characters forward to search for a display property or
3140 display string. Enough for a screenful of 100 lines x 50 3140 display string. Searching too far forward makes the bidi display
3141 characters in a line. */ 3141 sluggish, especially in small windows. */
3142#define MAX_DISP_SCAN 5000 3142#define MAX_DISP_SCAN 250
3143 3143
3144/* Return the character position of a display string at or after 3144/* Return the character position of a display string at or after
3145 position specified by POSITION. If no display string exists at or 3145 position specified by POSITION. If no display string exists at or
@@ -16152,7 +16152,7 @@ try_window_reusing_current_matrix (struct window *w)
16152 if (row < bottom_row) 16152 if (row < bottom_row)
16153 { 16153 {
16154 struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos; 16154 struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
16155 struct glyph *end = glyph + row->used[TEXT_AREA]; 16155 struct glyph *end = row->glyphs[TEXT_AREA] + row->used[TEXT_AREA];
16156 16156
16157 /* Can't use this optimization with bidi-reordered glyph 16157 /* Can't use this optimization with bidi-reordered glyph
16158 rows, unless cursor is already at point. */ 16158 rows, unless cursor is already at point. */
@@ -23479,6 +23479,7 @@ produce_stretch_glyph (struct it *it)
23479 if (FRAME_WINDOW_P (it->f)) 23479 if (FRAME_WINDOW_P (it->f))
23480 { 23480 {
23481 append_stretch_glyph (it, object, width, height, ascent); 23481 append_stretch_glyph (it, object, width, height, ascent);
23482 it->pixel_width = width;
23482 it->ascent = it->phys_ascent = ascent; 23483 it->ascent = it->phys_ascent = ascent;
23483 it->descent = it->phys_descent = height - it->ascent; 23484 it->descent = it->phys_descent = height - it->ascent;
23484 it->nglyphs = width > 0 && height > 0 ? 1 : 0; 23485 it->nglyphs = width > 0 && height > 0 ? 1 : 0;
@@ -23493,7 +23494,6 @@ produce_stretch_glyph (struct it *it)
23493 while (n--) 23494 while (n--)
23494 tty_append_glyph (it); 23495 tty_append_glyph (it);
23495 it->object = o_object; 23496 it->object = o_object;
23496 it->pixel_width = width;
23497 } 23497 }
23498 } 23498 }
23499} 23499}
diff --git a/src/xfaces.c b/src/xfaces.c
index 47d55f4da4b..9faa7c79e0b 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -2579,7 +2579,7 @@ merge_face_ref (struct frame *f, Lisp_Object face_ref, Lisp_Object *to,
2579 } 2579 }
2580 else if (EQ (keyword, QCstipple)) 2580 else if (EQ (keyword, QCstipple))
2581 { 2581 {
2582#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) 2582#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
2583 Lisp_Object pixmap_p = Fbitmap_spec_p (value); 2583 Lisp_Object pixmap_p = Fbitmap_spec_p (value);
2584 if (!NILP (pixmap_p)) 2584 if (!NILP (pixmap_p))
2585 to[LFACE_STIPPLE_INDEX] = value; 2585 to[LFACE_STIPPLE_INDEX] = value;
@@ -3095,7 +3095,7 @@ FRAME 0 means change the face on all frames, and change the default
3095 } 3095 }
3096 else if (EQ (attr, QCstipple)) 3096 else if (EQ (attr, QCstipple))
3097 { 3097 {
3098#if defined(HAVE_X_WINDOWS) || defined(HAVE_NS) 3098#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
3099 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value) 3099 if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value)
3100 && !NILP (value) 3100 && !NILP (value)
3101 && NILP (Fbitmap_spec_p (value))) 3101 && NILP (Fbitmap_spec_p (value)))
diff --git a/src/xfns.c b/src/xfns.c
index 194a8f063b7..998c803a7ad 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -105,7 +105,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
105#include "../lwlib/xlwmenu.h" 105#include "../lwlib/xlwmenu.h"
106#endif 106#endif
107 107
108#if !defined(NO_EDITRES) 108#if !defined (NO_EDITRES)
109#define HACK_EDITRES 109#define HACK_EDITRES
110extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *); 110extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *);
111#endif /* not defined NO_EDITRES */ 111#endif /* not defined NO_EDITRES */
@@ -3274,7 +3274,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3274 "internalBorderWidth", "internalBorderWidth", 3274 "internalBorderWidth", "internalBorderWidth",
3275 RES_TYPE_NUMBER); 3275 RES_TYPE_NUMBER);
3276 x_default_parameter (f, parms, Qvertical_scroll_bars, 3276 x_default_parameter (f, parms, Qvertical_scroll_bars,
3277#if defined(USE_GTK) && defined(USE_TOOLKIT_SCROLL_BARS) 3277#if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS)
3278 Qright, 3278 Qright,
3279#else 3279#else
3280 Qleft, 3280 Qleft,
@@ -3443,7 +3443,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3443 BLOCK_INPUT; 3443 BLOCK_INPUT;
3444 3444
3445 /* Set machine name and pid for the purpose of window managers. */ 3445 /* Set machine name and pid for the purpose of window managers. */
3446 set_machine_and_pid_properties(f); 3446 set_machine_and_pid_properties (f);
3447 3447
3448 /* Set the WM leader property. GTK does this itself, so this is not 3448 /* Set the WM leader property. GTK does this itself, so this is not
3449 needed when using GTK. */ 3449 needed when using GTK. */
@@ -5594,7 +5594,7 @@ If FRAME is omitted or nil, it defaults to the selected frame. */)
5594 5594
5595 BLOCK_INPUT; 5595 BLOCK_INPUT;
5596 5596
5597 GCPRO2(font_param, font); 5597 GCPRO2 (font_param, font);
5598 5598
5599 XSETFONT (font, FRAME_FONT (f)); 5599 XSETFONT (font, FRAME_FONT (f));
5600 font_param = Ffont_get (font, intern (":name")); 5600 font_param = Ffont_get (font, intern (":name"));
diff --git a/src/xmenu.c b/src/xmenu.c
index b4338c1d653..cf58e85af10 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1947,7 +1947,7 @@ create_and_show_dialog (FRAME_PTR f, widget_value *first_wv)
1947 LWLIB_ID dialog_id; 1947 LWLIB_ID dialog_id;
1948 1948
1949 if (!FRAME_X_P (f)) 1949 if (!FRAME_X_P (f))
1950 abort(); 1950 abort ();
1951 1951
1952 dialog_id = widget_id_tick++; 1952 dialog_id = widget_id_tick++;
1953#ifdef USE_LUCID 1953#ifdef USE_LUCID
@@ -2095,7 +2095,7 @@ xdialog_show (FRAME_PTR f,
2095 /* Frame title: 'Q' = Question, 'I' = Information. 2095 /* Frame title: 'Q' = Question, 'I' = Information.
2096 Can also have 'E' = Error if, one day, we want 2096 Can also have 'E' = Error if, one day, we want
2097 a popup for errors. */ 2097 a popup for errors. */
2098 if (NILP(header)) 2098 if (NILP (header))
2099 dialog_name[0] = 'Q'; 2099 dialog_name[0] = 'Q';
2100 else 2100 else
2101 dialog_name[0] = 'I'; 2101 dialog_name[0] = 'I';
diff --git a/src/xml.c b/src/xml.c
index 8b485e73649..f0422875f7e 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -124,6 +124,8 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html
124 124
125 if (doc != NULL) 125 if (doc != NULL)
126 { 126 {
127 /* If the document is just comments, then this should get us the
128 nodes anyway. */
127 xmlNode *n = doc->children->next; 129 xmlNode *n = doc->children->next;
128 Lisp_Object r = Qnil; 130 Lisp_Object r = Qnil;
129 131
@@ -134,9 +136,13 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html
134 n = n->next; 136 n = n->next;
135 } 137 }
136 138
137 if (NILP (result)) 139 if (NILP (result)) {
138 result = r; 140 /* The document isn't just comments, so get the tree the
139 else 141 proper way. */
142 xmlNode *node = xmlDocGetRootElement (doc);
143 if (node != NULL)
144 result = make_dom (node);
145 } else
140 result = Fcons (intern ("top"), 146 result = Fcons (intern ("top"),
141 Fcons (Qnil, Fnreverse (Fcons (r, result)))); 147 Fcons (Qnil, Fnreverse (Fcons (r, result))));
142 148
diff --git a/src/xrdb.c b/src/xrdb.c
index 63f06738b98..4237ed11c53 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -602,8 +602,8 @@ x_get_resource (XrmDatabase rdb, const char *name, const char *class,
602 XrmClass classlist[100]; 602 XrmClass classlist[100];
603 XrmRepresentation type; 603 XrmRepresentation type;
604 604
605 XrmStringToNameList(name, namelist); 605 XrmStringToNameList (name, namelist);
606 XrmStringToClassList(class, classlist); 606 XrmStringToClassList (class, classlist);
607 607
608 if (XrmQGetResource (rdb, namelist, classlist, &type, &value) == True 608 if (XrmQGetResource (rdb, namelist, classlist, &type, &value) == True
609 && (type == expected_type)) 609 && (type == expected_type))
diff --git a/src/xselect.c b/src/xselect.c
index 77bda79007c..241622e81b3 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -592,7 +592,8 @@ static int x_reply_selection_request_cnt;
592#endif /* TRACE_SELECTION */ 592#endif /* TRACE_SELECTION */
593 593
594static void 594static void
595x_reply_selection_request (struct input_event *event, struct x_display_info *dpyinfo) 595x_reply_selection_request (struct input_event *event,
596 struct x_display_info *dpyinfo)
596{ 597{
597 XEvent reply_base; 598 XEvent reply_base;
598 XSelectionEvent *reply = &(reply_base.xselection); 599 XSelectionEvent *reply = &(reply_base.xselection);
@@ -1079,7 +1080,8 @@ waiting_for_other_props_on_window (Display *display, Window window)
1079 this awaited property change. */ 1080 this awaited property change. */
1080 1081
1081static struct prop_location * 1082static struct prop_location *
1082expect_property_change (Display *display, Window window, Atom property, int state) 1083expect_property_change (Display *display, Window window,
1084 Atom property, int state)
1083{ 1085{
1084 struct prop_location *pl = (struct prop_location *) xmalloc (sizeof *pl); 1086 struct prop_location *pl = (struct prop_location *) xmalloc (sizeof *pl);
1085 pl->identifier = ++prop_location_identifier; 1087 pl->identifier = ++prop_location_identifier;
@@ -2472,7 +2474,8 @@ FRAME is on. If FRAME is nil, the selected frame is used. */)
2472/* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */ 2474/* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */
2473 2475
2474int 2476int
2475x_handle_dnd_message (struct frame *f, XClientMessageEvent *event, struct x_display_info *dpyinfo, struct input_event *bufp) 2477x_handle_dnd_message (struct frame *f, XClientMessageEvent *event,
2478 struct x_display_info *dpyinfo, struct input_event *bufp)
2476{ 2479{
2477 Lisp_Object vec; 2480 Lisp_Object vec;
2478 Lisp_Object frame; 2481 Lisp_Object frame;
@@ -2550,22 +2553,24 @@ the Atom is sent. If a value is a cons, it is converted to a 32 bit number
2550with the high 16 bits from the car and the lower 16 bit from the cdr. 2553with the high 16 bits from the car and the lower 16 bit from the cdr.
2551If more values than fits into the event is given, the excessive values 2554If more values than fits into the event is given, the excessive values
2552are ignored. */) 2555are ignored. */)
2553 (Lisp_Object display, Lisp_Object dest, Lisp_Object from, Lisp_Object message_type, Lisp_Object format, Lisp_Object values) 2556 (Lisp_Object display, Lisp_Object dest, Lisp_Object from,
2557 Lisp_Object message_type, Lisp_Object format, Lisp_Object values)
2554{ 2558{
2555 struct x_display_info *dpyinfo = check_x_display_info (display); 2559 struct x_display_info *dpyinfo = check_x_display_info (display);
2556 2560
2557 CHECK_STRING (message_type); 2561 CHECK_STRING (message_type);
2558 x_send_client_event(display, dest, from, 2562 x_send_client_event (display, dest, from,
2559 XInternAtom (dpyinfo->display, 2563 XInternAtom (dpyinfo->display,
2560 SSDATA (message_type), 2564 SSDATA (message_type),
2561 False), 2565 False),
2562 format, values); 2566 format, values);
2563 2567
2564 return Qnil; 2568 return Qnil;
2565} 2569}
2566 2570
2567void 2571void
2568x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from, Atom message_type, Lisp_Object format, Lisp_Object values) 2572x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from,
2573 Atom message_type, Lisp_Object format, Lisp_Object values)
2569{ 2574{
2570 struct x_display_info *dpyinfo = check_x_display_info (display); 2575 struct x_display_info *dpyinfo = check_x_display_info (display);
2571 Window wdest; 2576 Window wdest;
diff --git a/src/xsettings.c b/src/xsettings.c
index dadbe68b4cb..d57f3b5be81 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -812,7 +812,7 @@ init_gsettings (void)
812 g_type_init (); 812 g_type_init ();
813#endif 813#endif
814 814
815 schemas = g_settings_list_schemas(); 815 schemas = g_settings_list_schemas ();
816 if (schemas == NULL) return; 816 if (schemas == NULL) return;
817 while (! schema_found && *schemas != NULL) 817 while (! schema_found && *schemas != NULL)
818 schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0; 818 schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0;
diff --git a/src/xterm.c b/src/xterm.c
index 40dbe540903..29f1a85d2c6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -103,7 +103,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
103#endif 103#endif
104 104
105#ifdef USE_X_TOOLKIT 105#ifdef USE_X_TOOLKIT
106#if !defined(NO_EDITRES) 106#if !defined (NO_EDITRES)
107#define HACK_EDITRES 107#define HACK_EDITRES
108extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *); 108extern void _XEditResCheckMessages (Widget, XtPointer, XEvent *, Boolean *);
109#endif /* not NO_EDITRES */ 109#endif /* not NO_EDITRES */
diff --git a/src/xterm.h b/src/xterm.h
index fe86a32d09f..5c9365c1269 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -682,7 +682,7 @@ enum
682#define GDK_WINDOW_XID(w) GDK_WINDOW_XWINDOW (w) 682#define GDK_WINDOW_XID(w) GDK_WINDOW_XWINDOW (w)
683#define DEFAULT_GDK_DISPLAY() GDK_DISPLAY () 683#define DEFAULT_GDK_DISPLAY() GDK_DISPLAY ()
684#define gtk_widget_get_preferred_size(a, ign, b) \ 684#define gtk_widget_get_preferred_size(a, ign, b) \
685 gtk_widget_size_request(a, b) 685 gtk_widget_size_request (a, b)
686#endif 686#endif
687 687
688#define GTK_WIDGET_TO_X_WIN(w) \ 688#define GTK_WIDGET_TO_X_WIN(w) \