Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 100946. ------------------------------------------------------------ revno: 100946 committer: Dan Nicolaescu branch nick: trunk timestamp: Thu 2010-07-29 21:42:38 -0700 message: * src/buffer.c (Qwindow): Do not define, already defined in data.c. (syms_of_buffer): Do not intern and staticpro Qwindow. (Bug#6760) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-29 20:16:18 +0000 +++ src/ChangeLog 2010-07-30 04:42:38 +0000 @@ -1,3 +1,8 @@ +2010-07-30 Dan Nicolaescu + + * buffer.c (Qwindow): Do not define, already defined in data.c. + (syms_of_buffer): Do not intern and staticpro Qwindow. (Bug#6760) + 2010-07-29 Chad Brown Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf. === modified file 'src/buffer.c' --- src/buffer.c 2010-07-29 05:48:06 +0000 +++ src/buffer.c 2010-07-30 04:42:38 +0000 @@ -162,7 +162,7 @@ Lisp_Object Qoverlayp; -Lisp_Object Qpriority, Qwindow, Qevaporate, Qbefore_string, Qafter_string; +Lisp_Object Qpriority, Qevaporate, Qbefore_string, Qafter_string; Lisp_Object Qmodification_hooks; Lisp_Object Qinsert_in_front_hooks; @@ -5345,8 +5345,6 @@ staticpro (&Qget_file_buffer); Qpriority = intern_c_string ("priority"); staticpro (&Qpriority); - Qwindow = intern_c_string ("window"); - staticpro (&Qwindow); Qbefore_string = intern_c_string ("before-string"); staticpro (&Qbefore_string); Qafter_string = intern_c_string ("after-string"); ------------------------------------------------------------ revno: 100945 [merge] committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-07-30 02:02:05 +0000 message: Encode names of nnml groups that nnmail-get-new-mail creates in active file. 2010-07-30 Katsumi Yamaoka * nnmail.el (nnmail-get-new-mail-1): Encode group names possibly containing non-ASCII characters in active file for nnml back end. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-07-25 10:29:49 +0000 +++ lisp/gnus/ChangeLog 2010-07-30 02:01:04 +0000 @@ -1,3 +1,8 @@ +2010-07-30 Katsumi Yamaoka + + * nnmail.el (nnmail-get-new-mail-1): Encode group names possibly + containing non-ASCII characters in active file for nnml back end. + 2010-07-24 David Engster * mml-smime.el (mml-smime-epg-verify): Also accept the older === modified file 'lisp/gnus/nnmail.el' --- lisp/gnus/nnmail.el 2010-01-13 08:35:10 +0000 +++ lisp/gnus/nnmail.el 2010-07-30 02:01:04 +0000 @@ -1844,9 +1844,20 @@ (if (zerop total) (nnheader-message 4 "%s: Reading incoming mail (no new mail)...done" method (car source)) - (nnmail-save-active - (nnmail-get-value "%s-group-alist" method) - (nnmail-get-value "%s-active-file" method)) + (let ((group-alist (nnmail-get-value "%s-group-alist" method)) + (active-file (nnmail-get-value "%s-active-file" method)) + encoded) + ;; Encode group names possibly containing non-ASCII characters. + (cond ((eq method 'nnml) + (nnmail-save-active + (dolist (elem group-alist (nreverse encoded)) + (push (cons (nnml-encoded-group-name (car elem) + gnus-command-method) + (cdr elem)) + encoded)) + active-file)) + (t + (nnmail-save-active group-alist active-file)))) (when exit-func (funcall exit-func)) (run-hooks 'nnmail-read-incoming-hook) ------------------------------------------------------------ revno: 100944 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2010-07-29 22:16:18 +0200 message: Fix typos in ChangeLogs. diff: === modified file 'ChangeLog' --- ChangeLog 2010-07-29 20:01:08 +0000 +++ ChangeLog 2010-07-29 20:16:18 +0000 @@ -1,6 +1,6 @@ -2010-07-29 Chad Brown +2010-07-29 Chad Brown - * configure.in: Check for dirent.h + * configure.in: Check for dirent.h. 2010-07-29 Dan Nicolaescu === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2010-07-29 20:01:08 +0000 +++ msdos/ChangeLog 2010-07-29 20:16:18 +0000 @@ -1,6 +1,6 @@ -2010-07-27 Chad Brown +2010-07-29 Chad Brown - * sed2v2.inp (HAVE_DIRENT_H): Edit to 1 + * sed2v2.inp (HAVE_DIRENT_H): Edit to 1. 2010-07-12 Eli Zaretskii === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-29 20:01:08 +0000 +++ src/ChangeLog 2010-07-29 20:16:18 +0000 @@ -1,10 +1,10 @@ -2010-07-27 Chad Brown - - Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf - * dired.c, sysdep.c: test HAVE_DIRENT_H instead of SYSV_SYSTEM_DIR - +2010-07-29 Chad Brown + + Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf. + * dired.c, sysdep.c: Test HAVE_DIRENT_H instead of SYSV_SYSTEM_DIR. + * config.in: Undef HAVE_DIRENT_H. * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, - s/msdos.h, s/usg5-4.h: don't define SYSV_SYSTEM_DIR + * s/msdos.h, s/usg5-4.h: Don't define SYSV_SYSTEM_DIR. 2010-07-29 Dan Nicolaescu ------------------------------------------------------------ revno: 100943 committer: Jan D branch nick: trunk timestamp: Thu 2010-07-29 22:01:08 +0200 message: Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf * configure.in: Check for dirent.h * dired.c, sysdep.c: test HAVE_DIRENT_H instead of SYSV_SYSTEM_DIR * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/msdos.h, s/usg5-4.h: don't define SYSV_SYSTEM_DIR * sed2v2.inp (HAVE_DIRENT_H): Edit to 1 diff: === modified file 'ChangeLog' --- ChangeLog 2010-07-29 03:41:28 +0000 +++ ChangeLog 2010-07-29 20:01:08 +0000 @@ -1,3 +1,7 @@ +2010-07-29 Chad Brown + + * configure.in: Check for dirent.h + 2010-07-29 Dan Nicolaescu * configure.in: Remove reference to usg5-4, unused. === modified file 'configure' --- configure 2010-07-29 03:41:28 +0000 +++ configure 2010-07-29 20:01:08 +0000 @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.66 for emacs 24.0.50. +# Generated by GNU Autoconf 2.65 for emacs 24.0.50. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -316,7 +316,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -356,19 +356,19 @@ fi # as_fn_arith -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. +# script with status $?, using 1 if that was 0. as_fn_error () { - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -530,7 +530,7 @@ exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -950,7 +950,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -976,7 +976,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1180,7 +1180,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1196,7 +1196,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1226,8 +1226,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information." ;; *=*) @@ -1235,7 +1235,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1253,13 +1253,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" + as_fn_error "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1282,7 +1282,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1296,8 +1296,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1312,9 +1312,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" + as_fn_error "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" + as_fn_error "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1353,11 +1353,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1397,7 +1397,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1613,9 +1613,9 @@ if $ac_init_version; then cat <<\_ACEOF emacs configure 24.0.50 -generated by GNU Autoconf 2.66 +generated by GNU Autoconf 2.65 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1755,10 +1755,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1821,7 +1821,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1885,7 +1885,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1907,18 +1907,15 @@ } # ac_fn_c_check_header_compile -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR +# ------------------------------------ +# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 +$as_echo_n "checking whether $2 is declared... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1927,12 +1924,8 @@ int main () { -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif +#ifndef $2 + (void) $2; #endif ; @@ -1961,7 +1954,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1991,7 +1984,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if eval "test \"\${$4+set}\"" = set; then : +if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2047,7 +2040,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2115,7 +2108,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2164,7 +2157,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.66. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2274,9 +2267,11 @@ { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -2310,9 +2305,11 @@ ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -2325,9 +2322,11 @@ echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -2341,9 +2340,11 @@ fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -2398,12 +2399,7 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2418,11 +2414,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } + . "$ac_site_file" fi done @@ -2503,7 +2495,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2677,7 +2669,7 @@ g | gt | gtk ) val=gtk ;; gtk3 ) val=gtk3 ;; * ) -as_fn_error $? "\`--with-x-toolkit=$withval' is invalid; +as_fn_error "\`--with-x-toolkit=$withval' is invalid; this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 ;; @@ -2956,7 +2948,7 @@ stringfreelist) ac_gc_check_string_free_list=1 ;; xmallocoverrun) ac_xmalloc_overrun=1 ;; conslist) ac_gc_check_cons_list=1 ;; - *) as_fn_error $? "unknown check category $check" "$LINENO" 5 ;; + *) as_fn_error "unknown check category $check" "$LINENO" 5 ;; esac done IFS="$ac_save_IFS" @@ -3074,22 +3066,16 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3103,7 +3089,7 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } @@ -3114,16 +3100,16 @@ test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3148,7 +3134,7 @@ ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3156,7 +3142,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3450,7 +3436,7 @@ if test $unported = yes; then - as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems. + as_fn_error "Emacs hasn't been ported to \`${canonical}' systems. Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 fi @@ -3764,8 +3750,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "no acceptable C compiler found in \$PATH +See \`config.log' for more details." "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3879,8 +3865,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } +{ as_fn_set_status 77 +as_fn_error "C compiler cannot create executables +See \`config.log' for more details." "$LINENO" 5; }; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3922,8 +3909,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3980,9 +3967,9 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. +as_fn_error "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details." "$LINENO" 5; } fi fi fi @@ -4033,8 +4020,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "cannot compute suffix of object files: cannot compile +See \`config.log' for more details." "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -4445,8 +4432,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -4507,7 +4494,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -4573,7 +4560,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -4705,7 +4692,8 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5002,8 +4990,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +as_fn_error "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." "$LINENO" 5; } fi ac_ext=c @@ -5440,7 +5428,7 @@ if test "x${with_makeinfo}" = "xno"; then MAKEINFO=off elif test ! -e $srcdir/info/emacs; then - as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your + as_fn_error "You do not seem to have makeinfo >= 4.6, and your source tree does not seem to have pre-built manuals in the \`info' directory. Either install a suitable version of makeinfo, or re-run configure with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 @@ -5594,7 +5582,7 @@ if test "x$GCC" = "xyes"; then C_SWITCH_MACHINE="-fno-common" else - as_fn_error $? "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 + as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 fi else UNEXEC_OBJ=unexalpha.o @@ -5872,7 +5860,7 @@ ## Some platforms don't use any of these files, so it is not ## appropriate to put this test outside the if block. test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ - as_fn_error $? "crt*.o not found in specified location." "$LINENO" 5 + as_fn_error "crt*.o not found in specified location." "$LINENO" 5 fi @@ -5927,7 +5915,8 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6118,7 +6107,7 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$emacs_alsa_subdir" != yes; then - as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 + as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 fi ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" fi @@ -6149,11 +6138,12 @@ linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ - sys/utsname.h pwd.h utmp.h + sys/utsname.h pwd.h utmp.h dirent.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6995,7 +6985,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -7003,7 +6993,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -7139,7 +7129,7 @@ have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( + *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -7157,7 +7147,7 @@ @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done @@ -7426,7 +7416,7 @@ if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : HAVE_NS=yes else - as_fn_error $? "\`--with-ns' was specified, but the include + as_fn_error "\`--with-ns' was specified, but the include files are missing or cannot be compiled." "$LINENO" 5 fi @@ -7542,7 +7532,7 @@ if test "$HAVE_XSERVER" = true || test -n "$DISPLAY" || test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then - as_fn_error $? "You seem to be running X, but no X development libraries + as_fn_error "You seem to be running X, but no X development libraries were found. You should install the relevant development files for X and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make sure you have development files for image handling, i.e. @@ -7665,7 +7655,8 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7771,7 +7762,6 @@ main () { char *data, *data2, *data3; - const char *cdata2; int i, pagesize; int fd, fd2; @@ -7796,10 +7786,10 @@ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; - cdata2 = ""; - if (write (fd2, cdata2, 1) != 1) + data2 = ""; + if (write (fd2, data2, 1) != 1) return 5; - data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) @@ -8172,7 +8162,8 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -8453,7 +8444,7 @@ fi if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 + as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 fi fi @@ -8559,7 +8550,7 @@ fi if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 + as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 fi fi fi @@ -8586,7 +8577,7 @@ if test "${GTK_COMPILES}" != "yes"; then if test "$USE_X_TOOLKIT" != "maybe"; then - as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; + as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5; fi else HAVE_GTK=yes @@ -8716,7 +8707,8 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -9081,7 +9073,7 @@ USE_X_TOOLKIT=LUCID LUCID_LIBW=-lXaw elif test x"${USE_X_TOOLKIT}" = xLUCID; then - as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 + as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5 $as_echo "no; do not use toolkit by default" >&6; } @@ -10258,7 +10250,8 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : +eval as_val=\$$as_ac_Header + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -10510,7 +10503,7 @@ MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" if test "X${MISSING}" != X; then - as_fn_error $? "The following required libraries were not found: + as_fn_error "The following required libraries were not found: $MISSING Maybe some development libraries/packages are missing? If you don't want to link with them give @@ -10845,7 +10838,8 @@ for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -10909,7 +10903,7 @@ if test x"$ac_cv_func_alloca_works" != xyes; then - as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5 + as_fn_error "a system implementation of alloca is required " "$LINENO" 5 fi # fmod, logb, and frexp are found in -lm on most systems. @@ -11105,7 +11099,7 @@ if test $ac_cv_prog_liblockfile = yes; then - as_fn_error $? "Shared liblockfile found but can't link against it. + as_fn_error "Shared liblockfile found but can't link against it. This probably means that movemail could lose mail. There may be a \`development' package to install containing liblockfile." "$LINENO" 5 fi @@ -11194,7 +11188,8 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -11225,7 +11220,8 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -11277,8 +11273,8 @@ static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ -static const char *tz_strings[] = { - (const char *) 0, "TZ=GMT0", "TZ=JST-9", +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) @@ -11295,7 +11291,7 @@ instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; @@ -11308,14 +11304,16 @@ } static int -mktime_test1 (time_t now) +mktime_test1 (now) + time_t now; { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int -mktime_test (time_t now) +mktime_test (now) + time_t now; { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) @@ -11339,7 +11337,8 @@ } static int -bigtime_test (int j) +bigtime_test (j) + int j; { struct tm tm; time_t now; @@ -11383,7 +11382,7 @@ instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); @@ -11418,7 +11417,7 @@ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) - putenv ((char*) tz_strings[i]); + putenv (tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) @@ -11470,7 +11469,7 @@ # Make sure getloadavg.c is where it belongs, at configure-time. test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || - as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 + as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 ac_save_LIBS=$LIBS @@ -12339,7 +12338,7 @@ fi if test "$have_tputs_et_al" != true; then - as_fn_error $? "I couldn't find termcap functions (tputs and friends). + as_fn_error "I couldn't find termcap functions (tputs and friends). Maybe some development libraries/packages are missing? Try installing libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 fi @@ -13486,7 +13485,8 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -13860,14 +13860,14 @@ && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then - as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 + as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 fi #### Find out which version of Emacs this is. version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \ | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` if test x"${version}" = x; then - as_fn_error $? "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5 + as_fn_error "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5 fi if test x"${version}" != x"$PACKAGE_VERSION"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5 @@ -14425,7 +14425,6 @@ ac_libobjs= ac_ltlibobjs= -U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' @@ -14587,19 +14586,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- +# as_fn_error ERROR [LINENO LOG_FD] +# --------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. +# script with status $?, using 1 if that was 0. as_fn_error () { - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + as_status=$?; test $as_status -eq 0 && as_status=1 + if test "$3"; then + as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi - $as_echo "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $1" >&2 as_fn_exit $as_status } # as_fn_error @@ -14795,7 +14794,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -14849,7 +14848,7 @@ # values after options handling. ac_log=" This file was extended by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.66. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14915,10 +14914,10 @@ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ emacs config.status 24.0.50 -configured by $0, generated by GNU Autoconf 2.66, +configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14972,7 +14971,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' + as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -14981,7 +14980,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' + -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -15049,7 +15048,7 @@ "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -15087,7 +15086,7 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -15121,7 +15120,7 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' + ac_cs_awk_cr='\r' else ac_cs_awk_cr=$ac_cr fi @@ -15138,7 +15137,7 @@ echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 rm -f conf$$files.sh { @@ -15146,18 +15145,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15252,28 +15251,20 @@ else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 + || as_fn_error "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// s/^[^=]*=[ ]*$// }' fi @@ -15301,7 +15292,7 @@ if test -z "$ac_t"; then break elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -15386,7 +15377,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 + as_fn_error "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -15399,7 +15390,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -15427,7 +15418,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -15454,7 +15445,7 @@ case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -15590,22 +15581,22 @@ else $AWK -f "$tmp/subs.awk" | $SHELL fi >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 +which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} +which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -15616,19 +15607,19 @@ $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 + || as_fn_error "could not create -" "$LINENO" 5 fi ;; @@ -15665,7 +15656,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -15686,7 +15677,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 + $ac_cs_success || as_fn_exit $? fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 === modified file 'configure.in' --- configure.in 2010-07-29 03:41:28 +0000 +++ configure.in 2010-07-29 20:01:08 +0000 @@ -1204,7 +1204,7 @@ linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ - sys/utsname.h pwd.h utmp.h) + sys/utsname.h pwd.h utmp.h dirent.h) AC_MSG_CHECKING(if personality LINUX32 can be set) AC_TRY_COMPILE([#include ], [personality (PER_LINUX32)], === modified file 'msdos/ChangeLog' --- msdos/ChangeLog 2010-07-24 11:53:19 +0000 +++ msdos/ChangeLog 2010-07-29 20:01:08 +0000 @@ -1,3 +1,7 @@ +2010-07-27 Chad Brown + + * sed2v2.inp (HAVE_DIRENT_H): Edit to 1 + 2010-07-12 Eli Zaretskii * sed1v2.inp (C_WARNINGS_SWITCH, PROFILING_CFLAGS, PROFILING_LDFLAGS): === modified file 'msdos/sed2v2.inp' --- msdos/sed2v2.inp 2010-07-11 13:43:10 +0000 +++ msdos/sed2v2.inp 2010-07-29 20:01:08 +0000 @@ -57,6 +57,7 @@ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ /^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION ""/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ +/^#undef HAVE_DIRENT_H/s/^.*$/#define HAVE_DIRENT_H 1/ /^#undef GNU_MALLOC *$/s/^.*$/#define GNU_MALLOC 1/ /^#undef REL_ALLOC *$/s/^.*$/#define REL_ALLOC 1/ === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-29 18:34:39 +0000 +++ src/ChangeLog 2010-07-29 20:01:08 +0000 @@ -1,3 +1,11 @@ +2010-07-27 Chad Brown + + Replace tests for SYSV_SYSTEM_DIR with HAVE_DIRENT_H, set via autoconf + * dired.c, sysdep.c: test HAVE_DIRENT_H instead of SYSV_SYSTEM_DIR + + * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, + s/msdos.h, s/usg5-4.h: don't define SYSV_SYSTEM_DIR + 2010-07-29 Dan Nicolaescu Rename s/usg5-4.h -> s/usg5-4-common.h. === modified file 'src/config.in' --- src/config.in 2010-07-25 19:09:54 +0000 +++ src/config.in 2010-07-29 20:01:08 +0000 @@ -150,6 +150,9 @@ /* Define to 1 if you have the `difftime' function. */ #undef HAVE_DIFFTIME +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRENT_H + /* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 === modified file 'src/dired.c' --- src/dired.c 2010-07-29 05:48:06 +0000 +++ src/dired.c 2010-07-29 20:01:08 +0000 @@ -48,29 +48,22 @@ Since applying strlen to the name always works, we'll just do that. */ #define NAMLEN(p) strlen (p->d_name) -#ifdef SYSV_SYSTEM_DIR +#ifdef HAVE_DIRENT_H #include #define DIRENTRY struct dirent -#else /* not SYSV_SYSTEM_DIR */ +#else /* not HAVE_DIRENT_H */ -#ifdef MSDOS -#include -#else #include -#endif - #include -#ifndef MSDOS #define DIRENTRY struct direct extern DIR *opendir (char *); extern struct direct *readdir (DIR *); -#endif /* not MSDOS */ -#endif /* not SYSV_SYSTEM_DIR */ +#endif /* HAVE_DIRENT_H */ /* Some versions of Cygwin don't have d_ino in `struct dirent'. */ #if defined(MSDOS) || defined(__CYGWIN__) === modified file 'src/s/aix4-2.h' --- src/s/aix4-2.h 2010-06-30 02:48:54 +0000 +++ src/s/aix4-2.h 2010-07-29 20:01:08 +0000 @@ -47,11 +47,6 @@ /* Define HAVE_SOCKETS if system supports 4.2-compatible sockets. */ #define HAVE_SOCKETS - -/* Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir library - functions. Almost, but not quite the same as the 4.2 functions. */ -#define SYSV_SYSTEM_DIR - /* The file containing the kernel's symbol table is called /unix. */ #define KERNEL_FILE "/unix" === modified file 'src/s/bsd-common.h' --- src/s/bsd-common.h 2010-06-06 08:57:39 +0000 +++ src/s/bsd-common.h 2010-07-29 20:01:08 +0000 @@ -45,8 +45,6 @@ #define HAVE_TERMIOS #define NO_TERMIO -#define SYSV_SYSTEM_DIR - /* If the system's imake configuration file defines `NeedWidePrototypes' as `NO', we must define NARROWPROTO manually. Such a define is generated in the Makefile generated by `xmkmf'. If we don't === modified file 'src/s/cygwin.h' --- src/s/cygwin.h 2010-06-06 08:57:39 +0000 +++ src/s/cygwin.h 2010-07-29 20:01:08 +0000 @@ -89,7 +89,6 @@ #define CYGWIN 1 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) -#define SYSV_SYSTEM_DIR 1 #define HAVE_SOCKETS === modified file 'src/s/gnu-linux.h' --- src/s/gnu-linux.h 2010-06-06 08:57:39 +0000 +++ src/s/gnu-linux.h 2010-07-29 20:01:08 +0000 @@ -124,8 +124,6 @@ #define INTERRUPT_INPUT #endif /* emacs */ -#define SYSV_SYSTEM_DIR /* use dirent.h */ - #define POSIX /* affects getpagesize.h and systty.h */ /* This is to work around mysterious gcc failures in some system versions. === modified file 'src/s/msdos.h' --- src/s/msdos.h 2010-07-29 03:25:08 +0000 +++ src/s/msdos.h 2010-07-29 20:01:08 +0000 @@ -38,8 +38,6 @@ It sets the Lisp variable system-type. */ #define SYSTEM_TYPE "ms-dos" -#define SYSV_SYSTEM_DIR - /* subprocesses should be defined if you want to have code for asynchronous subprocesses (as used in M-x compile and M-x shell). This is the only system that needs this. */ === modified file 'src/s/usg5-4-common.h' --- src/s/usg5-4-common.h 2010-07-29 18:34:39 +0000 +++ src/s/usg5-4-common.h 2010-07-29 20:01:08 +0000 @@ -35,10 +35,6 @@ for terminal control. */ #define HAVE_TERMIO -/* Define SYSV_SYSTEM_DIR to use the V.3 getdents/readir library - functions. Almost, but not quite the same as the 4.2 functions. */ -#define SYSV_SYSTEM_DIR - /* The file containing the kernel's symbol table is called /unix. */ #define KERNEL_FILE "/unix" === modified file 'src/sysdep.c' --- src/sysdep.c 2010-07-13 10:57:00 +0000 +++ src/sysdep.c 2010-07-29 20:01:08 +0000 @@ -2447,7 +2447,7 @@ /* Directory routines for systems that don't have them. */ -#ifdef SYSV_SYSTEM_DIR +#ifdef HAVE_DIRENT_H #include @@ -2464,7 +2464,7 @@ return rtnval; } #endif /* not HAVE_CLOSEDIR */ -#endif /* SYSV_SYSTEM_DIR */ +#endif /* HAVE_DIRENT_H */ int ------------------------------------------------------------ revno: 100942 committer: Dan Nicolaescu branch nick: trunk timestamp: Thu 2010-07-29 11:34:39 -0700 message: Rename s/usg5-4.h -> s/usg5-4-common.h. * s/usg5-4.h: Rename file to ... * src/s/usg5-4-common.h: ... this for consistency with what we do for BSD. * src/s/unixware.h: * src/s/sol2-6.h: * src/s/irix6-5.h: Update includes accordingly. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-29 18:08:51 +0000 +++ src/ChangeLog 2010-07-29 18:34:39 +0000 @@ -1,3 +1,12 @@ +2010-07-29 Dan Nicolaescu + + Rename s/usg5-4.h -> s/usg5-4-common.h. + * s/usg5-4.h: Rename file to ... + * s/usg5-4-common.h: ... this for consistency with what we do for BSD. + * s/unixware.h: + * s/sol2-6.h: + * s/irix6-5.h: Update includes accordingly. + 2010-07-29 Jan Djärv * xfns.c (x_set_tool_bar_position): Remove debug fprintf. === modified file 'src/s/irix6-5.h' --- src/s/irix6-5.h 2010-06-30 02:48:54 +0000 +++ src/s/irix6-5.h 2010-07-29 18:34:39 +0000 @@ -20,7 +20,7 @@ #define IRIX6_5 /* used in m/iris4d */ -#include "usg5-4.h" +#include "usg5-4-common.h" #undef _longjmp /* use system versions, not conservative aliases */ #undef _setjmp @@ -91,7 +91,7 @@ #undef SA_RESTART -#undef TIOCSIGSEND /* defined in usg5-4.h */ +#undef TIOCSIGSEND /* defined in usg5-4-common.h */ /* Tested on Irix 6.5. SCM worked on earlier versions. */ #define GC_SETJMP_WORKS 1 === modified file 'src/s/sol2-6.h' --- src/s/sol2-6.h 2010-06-30 03:43:30 +0000 +++ src/s/sol2-6.h 2010-07-29 18:34:39 +0000 @@ -18,7 +18,7 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ -#include "usg5-4.h" +#include "usg5-4-common.h" #define SOLARIS2 @@ -34,7 +34,7 @@ #define HAVE_LIBKSTAT #endif -/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock +/* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock rather than sighold/sigrelse, which appear to be BSD4.1 specific. It may also be appropriate for SVR4.x (x<2) but I'm not sure. fnf@cygnus.com */ === modified file 'src/s/unixware.h' --- src/s/unixware.h 2010-05-12 06:53:03 +0000 +++ src/s/unixware.h 2010-07-29 18:34:39 +0000 @@ -19,7 +19,7 @@ along with GNU Emacs. If not, see . */ -#include "usg5-4.h" +#include "usg5-4-common.h" /* fnf@cygnus.com says these exist. */ #define HAVE_TCATTR @@ -28,7 +28,7 @@ #undef HAVE_SYSV_SIGPAUSE -/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock +/* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock rather than sighold/sigrelse, which appear to be BSD4.1 specific. It may also be appropriate for SVR4.x (x<2) but I'm not sure. fnf@cygnus.com */ === renamed file 'src/s/usg5-4.h' => 'src/s/usg5-4-common.h' ------------------------------------------------------------ revno: 100941 committer: Jan D branch nick: trunk timestamp: Thu 2010-07-29 20:08:51 +0200 message: * xfns.c (x_set_tool_bar_position): Remove debug fprintf. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-29 16:49:59 +0000 +++ src/ChangeLog 2010-07-29 18:08:51 +0000 @@ -1,5 +1,7 @@ 2010-07-29 Jan Djärv + * xfns.c (x_set_tool_bar_position): Remove debug fprintf. + * xterm.h (struct x_output): Add toolbar_top_height, toolbar_bottom_height, toolbar_left_width, toolbar_right_width. Remove toolbar_height. === modified file 'src/xfns.c' --- src/xfns.c 2010-07-29 16:49:59 +0000 +++ src/xfns.c 2010-07-29 18:08:51 +0000 @@ -726,7 +726,6 @@ if (EQ (new_value, old_value)) return; #ifdef USE_GTK - fprintf (stderr, "Pos: %s\n", SDATA (SYMBOL_NAME (new_value))); if (xg_change_toolbar_position (f, new_value)) f->tool_bar_position = new_value; #endif ------------------------------------------------------------ revno: 100940 committer: Jan D. branch nick: trunk timestamp: Thu 2010-07-29 19:10:41 +0200 message: Add doc and NEWS for tool-bar-position. * doc/emacs/frames.texi (Tool Bars): Add doc for tool-bar-position. * doc/lispref/frames.texi (Layout Parameters): Add doc for tool-bar-position. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2010-07-24 11:53:19 +0000 +++ doc/emacs/ChangeLog 2010-07-29 17:10:41 +0000 @@ -1,3 +1,7 @@ +2010-07-29 Jan Djärv + + * frames.texi (Tool Bars): Add doc for tool-bar-position. + 2010-06-23 Glenn Morris * abbrevs.texi, basic.texi, buffers.texi, building.texi, calendar.texi: === modified file 'doc/emacs/frames.texi' --- doc/emacs/frames.texi 2010-07-10 18:52:53 +0000 +++ doc/emacs/frames.texi 2010-07-29 17:10:41 +0000 @@ -1270,6 +1270,12 @@ the same as for the desktop in the Gnome case. If no default is found, the tool bar uses just images. +@cindex Tool Bar position + You can also control the placement of the tool bar for the GTK+ tool bar +with the frame parameter @code{tool-bar-position}. +For a detailed description of frame parameters and customization, +see @ref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}. + @node Dialog Boxes @section Using Dialog Boxes @cindex dialog boxes === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2010-07-29 13:54:03 +0000 +++ doc/lispref/ChangeLog 2010-07-29 17:10:41 +0000 @@ -1,3 +1,7 @@ +2010-07-29 Jan Djärv + + * frames.texi (Layout Parameters): Add doc for tool-bar-position. + 2010-07-29 Michael Albinus * processes.texi (Process Information): Explain process property === modified file 'doc/lispref/frames.texi' --- doc/lispref/frames.texi 2010-06-23 03:36:56 +0000 +++ doc/lispref/frames.texi 2010-07-29 17:10:41 +0000 @@ -677,6 +677,11 @@ means don't display a tool bar. (GTK and Nextstep allow at most one tool bar line; they treat larger values as 1.) +@item tool-bar-position +The position of the tool bar. Currently only for the GTK tool bar. +Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}. +The default is @code{top}. + @item line-spacing Additional space to leave below each text line, in pixels (a positive integer). @xref{Line Height}, for more information. === modified file 'etc/NEWS' --- etc/NEWS 2010-07-24 13:35:31 +0000 +++ etc/NEWS 2010-07-29 17:10:41 +0000 @@ -99,6 +99,11 @@ Customize `tool-bar-style' to choose style. On a Gnome desktop, the default is taken from the desktop settings. +** GTK tool bars can be placed on the left/right or top/bottom of the frame. +The frame-parameter tool-bar-position controls this. It takes the values +top, left, tight or bottom. The Options => Show/Hide menu has entries +for this. + ** Lucid menus and dialogs can display antialiased fonts if Emacs is built with Xft. ------------------------------------------------------------ revno: 100939 committer: Jan D. branch nick: trunk timestamp: Thu 2010-07-29 18:49:59 +0200 message: Add ability to put Gtk+ tool bar on the left/right/bottom or top. Default top. * lisp/menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left) (menu-bar-showhide-tool-bar-menu-customize-disable) (menu-bar-showhide-tool-bar-menu-customize-enable-right) (menu-bar-showhide-tool-bar-menu-customize-enable-top) (menu-bar-showhide-tool-bar-menu-customize-enable-bottom): New functions (menu-bar-showhide-tool-bar-menu): If tool bar is moveable, make a menu for Options => toolbar that can move it. * src/frame.c (Qtool_bar_position): New variable. (make_frame): Set tool_bar_position to Qtop. (frame_parms): Add tool-bar-position. (x_report_frame_params): Store tool_bar_position. (x_set_fringe_width): Reset wm size hint after fringe changes. * src/frame.h (struct frame): Add tool_bar_position. (Qbottom): Declare. * src/gtkutil.c (FRAME_TOTAL_PIXEL_WIDTH): New macro. (xg_frame_set_char_size): Add FRAME_TOOLBAR_WIDTH to pixelwidth. (xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH. (xg_create_frame_widgets): Create a hobox for placing widgets vertically. Use gtk_box_pack_start. (xg_height_or_width_changed): Renamed from xg_height_changed. (x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width. (xg_update_frame_menubar, free_frame_menubar): Change to xg_height_or_width_changed. (xg_tool_bar_detach_callback): Update left/right/top/bottom tool bar size correctly. Remove hardcoded 4, instead use handlebox size - toolbar size. (xg_tool_bar_attach_callback): Update left/right/top/bottom tool bar size correctly. Use handlebox size + toolbar size as additional size. (xg_pack_tool_bar): POS is a new parameter. Set orientation of tool bar based on pos. Only make handlebox_widget if NULL. Check if tool bar goes to vbox or hbox depending on pos. (xg_update_tool_bar_sizes): New function. (update_frame_tool_bar): Remove old_req, new_req. Do not get tool bar height, call xg_update_tool_bar_sizes instead. (free_frame_tool_bar): Remove from hbox or vbox depending on toolbar_in_hbox, Set all FRAME_TOOLBAR_*_(WIDTH|HEIGHT) to zero. (xg_change_toolbar_position): New function. * src/gtkutil.h (xg_change_toolbar_position): Declare. * src/window.c (calc_absolute_offset): Check for FRAME_TOOLBAR_TOP_HEIGHT and FRAME_TOOLBAR_LEFT_WIDTH. * src/xfns.c (x_set_tool_bar_position): New function. (xic_set_statusarea): Use FRAME_TOOLBAR_TOP_HEIGHT. (x_frame_parm_handlers): Add x_set_tool_bar_position. (syms_of_xfns): if USE_GTK, provide move-toolbar. * src/xterm.c (x_set_window_size_1): Add FRAME_TOOLBAR_WIDTH to pixelwidth. * src/xterm.h (struct x_output): Add toolbar_top_height, toolbar_bottom_height, toolbar_left_width, toolbar_right_width. Remove toolbar_height. if USE_GTK: Add hbox_widget and toolbar_in_hbox. (FRAME_TOOLBAR_TOP_HEIGHT, FRAME_TOOLBAR_BOTTOM_HEIGHT) (FRAME_TOOLBAR_LEFT_WIDTH, FRAME_TOOLBAR_RIGHT_WIDTH): New macros. (FRAME_TOOLBAR_HEIGHT): Is now TOP_HEIGHT + BOTTOM_HEIGHT. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-29 16:01:14 +0000 +++ lisp/ChangeLog 2010-07-29 16:49:59 +0000 @@ -1,3 +1,13 @@ +2010-07-29 Jan Djärv + + * menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left) + (menu-bar-showhide-tool-bar-menu-customize-disable) + (menu-bar-showhide-tool-bar-menu-customize-enable-right) + (menu-bar-showhide-tool-bar-menu-customize-enable-top) + (menu-bar-showhide-tool-bar-menu-customize-enable-bottom): New functions + (menu-bar-showhide-tool-bar-menu): If tool bar is moveable, + make a menu for Options => toolbar that can move it. + 2010-07-29 Chong Yidong * emacs-lisp/package-x.el (package--make-rss-entry): === modified file 'lisp/menu-bar.el' --- lisp/menu-bar.el 2010-07-14 18:03:39 +0000 +++ lisp/menu-bar.el 2010-07-29 16:49:59 +0000 @@ -968,11 +968,95 @@ :help ,(purecopy "Turn menu-bar on/off") :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0)))) -(define-key menu-bar-showhide-menu [showhide-tool-bar] - `(menu-item ,(purecopy "Tool-bar") toggle-tool-bar-mode-from-frame - :help ,(purecopy "Turn tool-bar on/off") - :visible (display-graphic-p) - :button (:toggle . (> (frame-parameter nil 'tool-bar-lines) 0)))) +(defun menu-bar-showhide-tool-bar-menu-customize-disable () + "Do not display tool bars." + (interactive) + (customize-set-variable 'tool-bar-mode nil)) +(defun menu-bar-showhide-tool-bar-menu-customize-enable-left () + "Display tool bars on the left side." + (interactive) + (customize-set-variable 'tool-bar-mode t) + (set-frame-parameter nil 'tool-bar-position 'left)) + +(defun menu-bar-showhide-tool-bar-menu-customize-enable-right () + "Display tool bars on the right side." + (interactive) + (customize-set-variable 'tool-bar-mode t) + (set-frame-parameter nil 'tool-bar-position 'right)) +(defun menu-bar-showhide-tool-bar-menu-customize-enable-top () + "Display tool bars on the top side." + (interactive) + (customize-set-variable 'tool-bar-mode t) + (set-frame-parameter nil 'tool-bar-position 'top)) +(defun menu-bar-showhide-tool-bar-menu-customize-enable-bottom () + "Display tool bars on the bottom side." + (interactive) + (customize-set-variable 'tool-bar-mode t) + (set-frame-parameter nil 'tool-bar-position 'bottom)) + +(if (featurep 'move-toolbar) + (progn + (defvar menu-bar-showhide-tool-bar-menu (make-sparse-keymap "Tool-bar")) + + (define-key menu-bar-showhide-tool-bar-menu [showhide-tool-bar-left] + `(menu-item ,(purecopy "On the left") + menu-bar-showhide-tool-bar-menu-customize-enable-left + :help ,(purecopy "Tool-bar at the left side") + :visible (display-graphic-p) + :button + (:radio . (and tool-bar-mode + (eq (frame-parameter nil 'tool-bar-position) + 'left))))) + + (define-key menu-bar-showhide-tool-bar-menu [showhide-tool-bar-right] + `(menu-item ,(purecopy "On the right") + menu-bar-showhide-tool-bar-menu-customize-enable-right + :help ,(purecopy "Tool-bar at the right side") + :visible (display-graphic-p) + :button + (:radio . (and tool-bar-mode + (eq (frame-parameter nil 'tool-bar-position) + 'right))))) + + (define-key menu-bar-showhide-tool-bar-menu [showhide-tool-bar-bottom] + `(menu-item ,(purecopy "On the bottom") + menu-bar-showhide-tool-bar-menu-customize-enable-bottom + :help ,(purecopy "Tool-bar at the bottom") + :visible (display-graphic-p) + :button + (:radio . (and tool-bar-mode + (eq (frame-parameter nil 'tool-bar-position) + 'bottom))))) + + (define-key menu-bar-showhide-tool-bar-menu [showhide-tool-bar-top] + `(menu-item ,(purecopy "On the top") + menu-bar-showhide-tool-bar-menu-customize-enable-top + :help ,(purecopy "Tool-bar at the top") + :visible (display-graphic-p) + :button + (:radio . (and tool-bar-mode + (eq (frame-parameter nil 'tool-bar-position) + 'top))))) + + (define-key menu-bar-showhide-tool-bar-menu [showhide-tool-bar-none] + `(menu-item ,(purecopy "None") + menu-bar-showhide-tool-bar-menu-customize-disable + :help ,(purecopy "Turn tool-bar off") + :visible (display-graphic-p) + :button (:radio . (eq tool-bar-mode nil)))) + + (define-key menu-bar-showhide-menu [showhide-tool-bar] + `(menu-item ,(purecopy "Tool-bar") ,menu-bar-showhide-tool-bar-menu + :visible (display-graphic-p))) + + ) + ;; else not tool bar that can move. + (define-key menu-bar-showhide-menu [showhide-tool-bar] + `(menu-item ,(purecopy "Tool-bar") toggle-tool-bar-mode-from-frame + :help ,(purecopy "Turn tool-bar on/off") + :visible (display-graphic-p) + :button (:toggle . (> (frame-parameter nil 'tool-bar-lines) 0)))) +) (define-key menu-bar-options-menu [showhide] `(menu-item ,(purecopy "Show/Hide") ,menu-bar-showhide-menu)) === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-29 15:50:04 +0000 +++ src/ChangeLog 2010-07-29 16:49:59 +0000 @@ -1,3 +1,60 @@ +2010-07-29 Jan Djärv + + * xterm.h (struct x_output): Add toolbar_top_height, + toolbar_bottom_height, toolbar_left_width, toolbar_right_width. Remove + toolbar_height. + if USE_GTK: Add hbox_widget and toolbar_in_hbox. + (FRAME_TOOLBAR_TOP_HEIGHT, FRAME_TOOLBAR_BOTTOM_HEIGHT) + (FRAME_TOOLBAR_LEFT_WIDTH, FRAME_TOOLBAR_RIGHT_WIDTH): New macros. + (FRAME_TOOLBAR_HEIGHT): Is now TOP_HEIGHT + BOTTOM_HEIGHT. + + * xterm.c (x_set_window_size_1): Add FRAME_TOOLBAR_WIDTH to pixelwidth. + + * xfns.c (x_set_tool_bar_position): New function. + (xic_set_statusarea): Use FRAME_TOOLBAR_TOP_HEIGHT. + (x_frame_parm_handlers): Add x_set_tool_bar_position. + (syms_of_xfns): if USE_GTK, provide move-toolbar. + + * window.c (calc_absolute_offset): Check for FRAME_TOOLBAR_TOP_HEIGHT + and FRAME_TOOLBAR_LEFT_WIDTH. + + * gtkutil.h (xg_change_toolbar_position): Declare. + + * gtkutil.c (FRAME_TOTAL_PIXEL_WIDTH): New macro. + (xg_frame_set_char_size): Add FRAME_TOOLBAR_WIDTH to pixelwidth. + (xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH. + (xg_create_frame_widgets): Create a hobox for placing widgets + vertically. Use gtk_box_pack_start. + (xg_height_or_width_changed): Renamed from xg_height_changed. + (x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width. + (xg_update_frame_menubar, free_frame_menubar): Change to + xg_height_or_width_changed. + (xg_tool_bar_detach_callback): Update left/right/top/bottom tool bar + size correctly. Remove hardcoded 4, instead use handlebox size - + toolbar size. + (xg_tool_bar_attach_callback): Update left/right/top/bottom tool bar + size correctly. Use handlebox size + toolbar size as additional + size. + (xg_pack_tool_bar): POS is a new parameter. + Set orientation of tool bar based on pos. + Only make handlebox_widget if NULL. + Check if tool bar goes to vbox or hbox depending on pos. + (xg_update_tool_bar_sizes): New function. + (update_frame_tool_bar): Remove old_req, new_req. Do not get tool bar + height, call xg_update_tool_bar_sizes instead. + (free_frame_tool_bar): Remove from hbox or vbox depending on + toolbar_in_hbox, Set all FRAME_TOOLBAR_*_(WIDTH|HEIGHT) to zero. + (xg_change_toolbar_position): New function. + + * frame.h (struct frame): Add tool_bar_position. + (Qbottom): Declare. + + * frame.c (Qtool_bar_position): New variable. + (make_frame): Set tool_bar_position to Qtop. + (frame_parms): Add tool-bar-position. + (x_report_frame_params): Store tool_bar_position. + (x_set_fringe_width): Reset wm size hint after fringe changes. + 2010-07-29 Dan Nicolaescu Make lisp_time_argument declaration work on all systems. === modified file 'src/frame.c' --- src/frame.c 2010-07-29 05:48:06 +0000 +++ src/frame.c 2010-07-29 16:49:59 +0000 @@ -119,7 +119,7 @@ Lisp_Object Qtitle, Qname; Lisp_Object Qexplicit_name; Lisp_Object Qunsplittable; -Lisp_Object Qmenu_bar_lines, Qtool_bar_lines; +Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position; Lisp_Object Vmenu_bar_mode, Vtool_bar_mode; Lisp_Object Qleft_fringe, Qright_fringe; Lisp_Object Qbuffer_predicate, Qbuffer_list, Qburied_buffer_list; @@ -323,6 +323,7 @@ f->menu_bar_window = Qnil; f->tool_bar_window = Qnil; f->tool_bar_items = Qnil; + f->tool_bar_position = Qtop; f->desired_tool_bar_string = f->current_tool_bar_string = Qnil; f->n_tool_bar_items = 0; f->left_fringe_width = f->right_fringe_width = 0; @@ -2816,6 +2817,7 @@ {"font-backend", &Qfont_backend}, {"alpha", &Qalpha}, {"sticky", &Qsticky}, + {"tool-bar-position", &Qtool_bar_position}, }; #ifdef HAVE_WINDOW_SYSTEM @@ -3209,6 +3211,7 @@ XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc); store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil)); store_in_alist (alistptr, Qparent_id, tem); + store_in_alist (alistptr, Qtool_bar_position, f->tool_bar_position); } @@ -3441,6 +3444,11 @@ x_set_fringe_width (struct frame *f, Lisp_Object new_value, Lisp_Object old_value) { compute_fringe_widths (f, 1); +#ifdef HAVE_X_WINDOWS + /* Must adjust this so window managers report correct number of columns. */ + if (FRAME_X_WINDOW (f) != 0) + x_wm_set_size_hint (f, 0, 0); +#endif } void === modified file 'src/frame.h' --- src/frame.h 2010-07-29 06:59:29 +0000 +++ src/frame.h 2010-07-29 16:49:59 +0000 @@ -191,6 +191,10 @@ /* Desired and current tool-bar items. */ Lisp_Object tool_bar_items; + /* Where tool bar is, can be left, right, top or bottom. The native + tool bar only supports top. */ + Lisp_Object tool_bar_position; + /* Desired and current contents displayed in tool_bar_window. */ Lisp_Object desired_tool_bar_string, current_tool_bar_string; @@ -1071,7 +1075,7 @@ extern Lisp_Object Qx_resource_name; -extern Lisp_Object Qleft, Qright, Qtop, Qbox; +extern Lisp_Object Qleft, Qright, Qtop, Qbox, Qbottom; extern Lisp_Object Qdisplay; #ifdef HAVE_WINDOW_SYSTEM === modified file 'src/gtkutil.c' --- src/gtkutil.c 2010-07-28 17:34:51 +0000 +++ src/gtkutil.c 2010-07-29 16:49:59 +0000 @@ -44,6 +44,9 @@ #define FRAME_TOTAL_PIXEL_HEIGHT(f) \ (FRAME_PIXEL_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f)) +#define FRAME_TOTAL_PIXEL_WIDTH(f) \ + (FRAME_PIXEL_WIDTH (f) + FRAME_TOOLBAR_WIDTH (f)) + /* Avoid "differ in sign" warnings */ #define SSDATA(x) ((char *) SDATA (x)) @@ -640,7 +643,8 @@ /* FRAME_TEXT_COLS_TO_PIXEL_WIDTH uses scroll_bar_actual_width, so call it after calculating that value. */ - pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols); + pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols) + + FRAME_TOOLBAR_WIDTH (f); /* Do this before resize, as we don't know yet if we will be resized. */ @@ -677,14 +681,15 @@ } } -/* Handle height changes (i.e. add/remove menu/toolbar). +/* Handle height/width changes (i.e. add/remove/move menu/toolbar). The policy is to keep the number of editable lines. */ static void -xg_height_changed (FRAME_PTR f) +xg_height_or_width_changed (FRAME_PTR f) { gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), - FRAME_PIXEL_WIDTH (f), FRAME_TOTAL_PIXEL_HEIGHT (f)); + FRAME_TOTAL_PIXEL_WIDTH (f), + FRAME_TOTAL_PIXEL_HEIGHT (f)); f->output_data.x->hint_flags = 0; x_wm_set_size_hint (f, 0, 0); } @@ -733,7 +738,7 @@ xg_create_frame_widgets (FRAME_PTR f) { GtkWidget *wtop; - GtkWidget *wvbox; + GtkWidget *wvbox, *whbox; GtkWidget *wfixed; GdkColor bg; GtkRcStyle *style; @@ -749,12 +754,14 @@ xg_set_screen (wtop, f); wvbox = gtk_vbox_new (FALSE, 0); + whbox = gtk_hbox_new (FALSE, 0); wfixed = gtk_fixed_new (); /* Must have this to place scroll bars */ - if (! wtop || ! wvbox || ! wfixed) + if (! wtop || ! wvbox || ! whbox || ! wfixed) { if (wtop) gtk_widget_destroy (wtop); if (wvbox) gtk_widget_destroy (wvbox); + if (whbox) gtk_widget_destroy (whbox); if (wfixed) gtk_widget_destroy (wfixed); UNBLOCK_INPUT; @@ -775,11 +782,13 @@ FRAME_GTK_OUTER_WIDGET (f) = wtop; FRAME_GTK_WIDGET (f) = wfixed; f->output_data.x->vbox_widget = wvbox; + f->output_data.x->hbox_widget = whbox; gtk_widget_set_has_window (wfixed, TRUE); gtk_container_add (GTK_CONTAINER (wtop), wvbox); - gtk_box_pack_end (GTK_BOX (wvbox), wfixed, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (wvbox), whbox, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (whbox), wfixed, TRUE, TRUE, 0); if (FRAME_EXTERNAL_TOOL_BAR (f)) update_frame_tool_bar (f); @@ -889,7 +898,7 @@ size_hints.height_inc = FRAME_LINE_HEIGHT (f); hint_flags |= GDK_HINT_BASE_SIZE; - base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0); + base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0) + FRAME_TOOLBAR_WIDTH (f); base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); @@ -2828,7 +2837,7 @@ gtk_widget_show_all (x->menubar_widget); gtk_widget_size_request (x->menubar_widget, &req); FRAME_MENUBAR_HEIGHT (f) = req.height; - xg_height_changed (f); + xg_height_or_width_changed (f); UNBLOCK_INPUT; return 1; @@ -2851,7 +2860,7 @@ the container. */ x->menubar_widget = 0; FRAME_MENUBAR_HEIGHT (f) = 0; - xg_height_changed (f); + xg_height_or_width_changed (f); UNBLOCK_INPUT; } } @@ -3548,13 +3557,21 @@ if (f) { + GtkRequisition req, req2; FRAME_X_OUTPUT (f)->toolbar_detached = 1; - - /* When detaching a tool bar, not everything dissapear. There are - a few pixels left that are used to drop the tool bar back into - place. */ - FRAME_TOOLBAR_HEIGHT (f) = 4; - xg_height_changed (f); + gtk_widget_size_request (GTK_WIDGET (wbox), &req); + gtk_widget_size_request (w, &req2); + req.width -= req2.width; + req.height -= req2.height; + if (FRAME_TOOLBAR_TOP_HEIGHT (f) != 0) + FRAME_TOOLBAR_TOP_HEIGHT (f) = req.height; + else if (FRAME_TOOLBAR_BOTTOM_HEIGHT (f) != 0) + FRAME_TOOLBAR_BOTTOM_HEIGHT (f) = req.height; + else if (FRAME_TOOLBAR_RIGHT_WIDTH (f) != 0) + FRAME_TOOLBAR_RIGHT_WIDTH (f) = req.width; + else if (FRAME_TOOLBAR_LEFT_WIDTH (f) != 0) + FRAME_TOOLBAR_LEFT_WIDTH (f) = req.width; + xg_height_or_width_changed (f); } } @@ -3575,13 +3592,21 @@ if (f) { - GtkRequisition req; - + GtkRequisition req, req2; FRAME_X_OUTPUT (f)->toolbar_detached = 0; - - gtk_widget_size_request (w, &req); - FRAME_TOOLBAR_HEIGHT (f) = req.height; - xg_height_changed (f); + gtk_widget_size_request (GTK_WIDGET (wbox), &req); + gtk_widget_size_request (w, &req2); + req.width += req2.width; + req.height += req2.height; + if (FRAME_TOOLBAR_TOP_HEIGHT (f) != 0) + FRAME_TOOLBAR_TOP_HEIGHT (f) = req.height; + else if (FRAME_TOOLBAR_BOTTOM_HEIGHT (f) != 0) + FRAME_TOOLBAR_BOTTOM_HEIGHT (f) = req.height; + else if (FRAME_TOOLBAR_RIGHT_WIDTH (f) != 0) + FRAME_TOOLBAR_RIGHT_WIDTH (f) = req.width; + else if (FRAME_TOOLBAR_LEFT_WIDTH (f) != 0) + FRAME_TOOLBAR_LEFT_WIDTH (f) = req.width; + xg_height_or_width_changed (f); } } @@ -3656,34 +3681,6 @@ return FALSE; } -/* Attach a tool bar to frame F. */ - -static void -xg_pack_tool_bar (FRAME_PTR f) -{ - struct x_output *x = f->output_data.x; - int vbox_pos = x->menubar_widget ? 1 : 0; - - x->handlebox_widget = gtk_handle_box_new (); - g_signal_connect (G_OBJECT (x->handlebox_widget), "child-detached", - G_CALLBACK (xg_tool_bar_detach_callback), f); - g_signal_connect (G_OBJECT (x->handlebox_widget), "child-attached", - G_CALLBACK (xg_tool_bar_attach_callback), f); - - gtk_container_add (GTK_CONTAINER (x->handlebox_widget), - x->toolbar_widget); - - gtk_box_pack_start (GTK_BOX (x->vbox_widget), x->handlebox_widget, - FALSE, FALSE, 0); - - gtk_box_reorder_child (GTK_BOX (x->vbox_widget), x->handlebox_widget, - vbox_pos); - - gtk_widget_show (x->toolbar_widget); - gtk_widget_show (x->handlebox_widget); -} - -/* Create a tool bar for frame F. */ #ifdef HAVE_GTK_ORIENTABLE_SET_ORIENTATION #define toolbar_set_orientation(w, o) \ gtk_orientable_set_orientation (GTK_ORIENTABLE (w), o) @@ -3692,6 +3689,56 @@ gtk_toolbar_set_orientation (GTK_TOOLBAR (w), o) #endif +/* Attach a tool bar to frame F. */ + +static void +xg_pack_tool_bar (FRAME_PTR f, Lisp_Object pos) +{ + struct x_output *x = f->output_data.x; + int into_hbox = EQ (pos, Qleft) || EQ (pos, Qright); + + toolbar_set_orientation (x->toolbar_widget, + into_hbox + ? GTK_ORIENTATION_VERTICAL + : GTK_ORIENTATION_HORIZONTAL); + if (!x->handlebox_widget) + { + x->handlebox_widget = gtk_handle_box_new (); + g_signal_connect (G_OBJECT (x->handlebox_widget), "child-detached", + G_CALLBACK (xg_tool_bar_detach_callback), f); + g_signal_connect (G_OBJECT (x->handlebox_widget), "child-attached", + G_CALLBACK (xg_tool_bar_attach_callback), f); + gtk_container_add (GTK_CONTAINER (x->handlebox_widget), + x->toolbar_widget); + } + + if (into_hbox) + { + gtk_box_pack_start (GTK_BOX (x->hbox_widget), x->handlebox_widget, + FALSE, FALSE, 0); + + if (EQ (pos, Qleft)) + gtk_box_reorder_child (GTK_BOX (x->hbox_widget), + x->handlebox_widget, + 0); + x->toolbar_in_hbox = 1; + } + else + { + int vbox_pos = x->menubar_widget ? 1 : 0; + gtk_box_pack_start (GTK_BOX (x->vbox_widget), x->handlebox_widget, + FALSE, FALSE, 0); + + if (EQ (pos, Qtop)) + gtk_box_reorder_child (GTK_BOX (x->vbox_widget), + x->handlebox_widget, + vbox_pos); + x->toolbar_in_hbox = 0; + } +} + +/* Create a tool bar for frame F. */ + static void xg_create_tool_bar (FRAME_PTR f) { @@ -3875,6 +3922,50 @@ gtk_widget_show (GTK_WIDGET (ti)); } +static int +xg_update_tool_bar_sizes (FRAME_PTR f) +{ + struct x_output *x = f->output_data.x; + GtkRequisition req; + int nl = 0, nr = 0, nt = 0, nb = 0; + + gtk_widget_size_request (GTK_WIDGET (x->handlebox_widget), &req); + if (x->toolbar_in_hbox) + { + int pos; + gtk_container_child_get (GTK_CONTAINER (x->hbox_widget), + x->handlebox_widget, + "position", &pos, NULL); + if (pos == 0) nl = req.width; + else nr = req.width; + } + else + { + int pos; + gtk_container_child_get (GTK_CONTAINER (x->vbox_widget), + x->handlebox_widget, + "position", &pos, NULL); + if (pos == 0 || (pos == 1 && x->menubar_widget)) nt = req.height; + else nb = req.height; + } + + if (nl != FRAME_TOOLBAR_LEFT_WIDTH (f) + || nr != FRAME_TOOLBAR_RIGHT_WIDTH (f) + || nt != FRAME_TOOLBAR_TOP_HEIGHT (f) + || nb != FRAME_TOOLBAR_BOTTOM_HEIGHT (f)) + { + FRAME_TOOLBAR_RIGHT_WIDTH (f) = FRAME_TOOLBAR_LEFT_WIDTH (f) + = FRAME_TOOLBAR_TOP_HEIGHT (f) = FRAME_TOOLBAR_BOTTOM_HEIGHT (f) = 0; + FRAME_TOOLBAR_LEFT_WIDTH (f) = nl; + FRAME_TOOLBAR_RIGHT_WIDTH (f) = nr; + FRAME_TOOLBAR_TOP_HEIGHT (f) = nt; + FRAME_TOOLBAR_BOTTOM_HEIGHT (f) = nb; + return 1; + } + + return 0; +} + /* Update the tool bar for frame F. Add new buttons and remove old. */ @@ -3884,7 +3975,6 @@ update_frame_tool_bar (FRAME_PTR f) { int i; - GtkRequisition old_req, new_req; struct x_output *x = f->output_data.x; int hmargin = 0, vmargin = 0; GtkToolbar *wtoolbar; @@ -3925,7 +4015,6 @@ xg_create_tool_bar (f); wtoolbar = GTK_TOOLBAR (x->toolbar_widget); - gtk_widget_size_request (GTK_WIDGET (wtoolbar), &old_req); dir = gtk_widget_get_direction (GTK_WIDGET (wtoolbar)); for (i = 0; i < f->n_tool_bar_items; ++i) @@ -4143,18 +4232,16 @@ if (ti) gtk_widget_hide_all (GTK_WIDGET (ti)); } while (ti != NULL); - new_req.height = 0; - if (pack_tool_bar && f->n_tool_bar_items != 0) - xg_pack_tool_bar (f); - - - gtk_widget_size_request (GTK_WIDGET (wtoolbar), &new_req); - if (old_req.height != new_req.height - && ! FRAME_X_OUTPUT (f)->toolbar_detached) + if (f->n_tool_bar_items != 0) { - FRAME_TOOLBAR_HEIGHT (f) = new_req.height; - xg_height_changed (f); + if (pack_tool_bar) + xg_pack_tool_bar (f, f->tool_bar_position); + gtk_widget_show (x->toolbar_widget); + gtk_widget_show (x->handlebox_widget); + if (xg_update_tool_bar_sizes (f)) + xg_height_or_width_changed (f); } + UNBLOCK_INPUT; } @@ -4172,21 +4259,54 @@ BLOCK_INPUT; /* We may have created the toolbar_widget in xg_create_tool_bar, but not the x->handlebox_widget which is created in xg_pack_tool_bar. */ - if (is_packed) - gtk_container_remove (GTK_CONTAINER (x->vbox_widget), - x->handlebox_widget); + if (is_packed) + { + if (x->toolbar_in_hbox) + gtk_container_remove (GTK_CONTAINER (x->hbox_widget), + x->handlebox_widget); + else + gtk_container_remove (GTK_CONTAINER (x->vbox_widget), + x->handlebox_widget); + } else gtk_widget_destroy (x->toolbar_widget); x->toolbar_widget = 0; x->handlebox_widget = 0; - FRAME_TOOLBAR_HEIGHT (f) = 0; - xg_height_changed (f); + FRAME_TOOLBAR_TOP_HEIGHT (f) = FRAME_TOOLBAR_BOTTOM_HEIGHT (f) = 0; + FRAME_TOOLBAR_LEFT_WIDTH (f) = FRAME_TOOLBAR_RIGHT_WIDTH (f) = 0; + + xg_height_or_width_changed (f); UNBLOCK_INPUT; } } +int +xg_change_toolbar_position (FRAME_PTR f, Lisp_Object pos) +{ + struct x_output *x = f->output_data.x; + + if (! x->toolbar_widget || ! x->handlebox_widget) + return 1; + + BLOCK_INPUT; + g_object_ref (x->handlebox_widget); + if (x->toolbar_in_hbox) + gtk_container_remove (GTK_CONTAINER (x->hbox_widget), + x->handlebox_widget); + else + gtk_container_remove (GTK_CONTAINER (x->vbox_widget), + x->handlebox_widget); + xg_pack_tool_bar (f, pos); + g_object_unref (x->handlebox_widget); + if (xg_update_tool_bar_sizes (f)) + xg_height_or_width_changed (f); + + UNBLOCK_INPUT; + return 1; +} + /*********************************************************************** === modified file 'src/gtkutil.h' --- src/gtkutil.h 2010-07-16 15:42:15 +0000 +++ src/gtkutil.h 2010-07-29 16:49:59 +0000 @@ -181,6 +181,7 @@ extern void update_frame_tool_bar (FRAME_PTR f); extern void free_frame_tool_bar (FRAME_PTR f); +extern int xg_change_toolbar_position (FRAME_PTR f, Lisp_Object pos); extern void xg_frame_resized (FRAME_PTR f, int pixelwidth, === modified file 'src/window.c' --- src/window.c 2010-07-27 02:10:05 +0000 +++ src/window.c 2010-07-29 16:49:59 +0000 @@ -645,13 +645,18 @@ #ifdef FRAME_MENUBAR_HEIGHT *add_y += FRAME_MENUBAR_HEIGHT (f); #endif -#ifdef FRAME_TOOLBAR_HEIGHT +#ifdef FRAME_TOOLBAR_TOP_HEIGHT + *add_y += FRAME_TOOLBAR_TOP_HEIGHT (f); +#elif FRAME_TOOLBAR_HEIGHT *add_y += FRAME_TOOLBAR_HEIGHT (f); #endif #ifdef FRAME_NS_TITLEBAR_HEIGHT *add_y += FRAME_NS_TITLEBAR_HEIGHT (f); #endif *add_x = f->left_pos; +#ifdef FRAME_TOOLBAR_LEFT_WIDTH + *add_x += FRAME_TOOLBAR_LEFT_WIDTH (f); +#endif } DEFUN ("window-absolute-pixel-edges", Fwindow_absolute_pixel_edges, === modified file 'src/xfns.c' --- src/xfns.c 2010-07-29 05:48:06 +0000 +++ src/xfns.c 2010-07-29 16:49:59 +0000 @@ -715,6 +715,23 @@ f->output_data.x->wait_for_wm = !NILP (new_value); } +static void +x_set_tool_bar_position (struct frame *f, + Lisp_Object new_value, + Lisp_Object old_value) +{ + if (! EQ (new_value, Qleft) && ! EQ (new_value, Qright) + && ! EQ (new_value, Qbottom) && ! EQ (new_value, Qtop)) + return; + if (EQ (new_value, old_value)) return; + +#ifdef USE_GTK + fprintf (stderr, "Pos: %s\n", SDATA (SYMBOL_NAME (new_value))); + if (xg_change_toolbar_position (f, new_value)) + f->tool_bar_position = new_value; +#endif +} + #ifdef USE_GTK /* Set icon from FILE for frame F. By using GTK functions the icon @@ -2344,7 +2361,7 @@ area.x = FRAME_PIXEL_WIDTH (f) - area.width - FRAME_INTERNAL_BORDER_WIDTH (f); area.y = (FRAME_PIXEL_HEIGHT (f) - area.height - FRAME_MENUBAR_HEIGHT (f) - - FRAME_TOOLBAR_HEIGHT (f) + - FRAME_TOOLBAR_TOP_HEIGHT (f) - FRAME_INTERNAL_BORDER_WIDTH (f)); XFree (needed); @@ -5747,6 +5764,7 @@ x_set_font_backend, x_set_alpha, x_set_sticky, + x_set_tool_bar_position, }; void @@ -5897,6 +5915,7 @@ accepts --with-x-toolkit=gtk. */ Fprovide (intern_c_string ("x-toolkit"), Qnil); Fprovide (intern_c_string ("gtk"), Qnil); + Fprovide (intern_c_string ("move-toolbar"), Qnil); DEFVAR_LISP ("gtk-version-string", &Vgtk_version_string, doc: /* Version info for GTK+. */); === modified file 'src/xterm.c' --- src/xterm.c 2010-07-29 05:48:06 +0000 +++ src/xterm.c 2010-07-29 16:49:59 +0000 @@ -8610,7 +8610,8 @@ compute_fringe_widths (f, 0); - pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols); + pixelwidth = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, cols) + + FRAME_TOOLBAR_WIDTH (f); pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); === modified file 'src/xterm.h' --- src/xterm.h 2010-07-29 05:48:06 +0000 +++ src/xterm.h 2010-07-29 16:49:59 +0000 @@ -433,9 +433,15 @@ if the menubar is turned off. */ int menubar_height; - /* Height of tool bar widget, in pixels. - Zero if not using an external tool bar. */ - int toolbar_height; + /* Height of tool bar widget, in pixels. top_height is used if tool bar + at top, bottom_height if tool bar is at the bottom. + Zero if not using an external tool bar or if tool bar is vertical. */ + int toolbar_top_height, toolbar_bottom_height; + + /* Width of tool bar widget, in pixels. left_width is used if tool bar + at left, right_width if tool bar is at the right. + Zero if not using an external tool bar or if tool bar is horizontal. */ + int toolbar_left_width, toolbar_right_width; /* The tiled border used when the mouse is out of the frame. */ Pixmap border_tile; @@ -480,6 +486,8 @@ GtkWidget *edit_widget; /* The widget used for laying out widgets vertically. */ GtkWidget *vbox_widget; + /* The widget used for laying out widgets horizontally. */ + GtkWidget *hbox_widget; /* The menubar in this frame. */ GtkWidget *menubar_widget; /* The tool bar in this frame */ @@ -488,6 +496,8 @@ GtkWidget *handlebox_widget; /* Non-zero if the tool bar is detached. */ int toolbar_detached; + /* Non-zero if tool bar is packed into the hbox widget (i.e. vertical). */ + int toolbar_in_hbox; /* The last size hints set. */ GdkGeometry size_hints; @@ -700,7 +710,15 @@ #define FRAME_FONT(f) ((f)->output_data.x->font) #define FRAME_FONTSET(f) ((f)->output_data.x->fontset) #define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height) -#define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.x->toolbar_height) +#define FRAME_TOOLBAR_TOP_HEIGHT(f) ((f)->output_data.x->toolbar_top_height) +#define FRAME_TOOLBAR_BOTTOM_HEIGHT(f) \ + ((f)->output_data.x->toolbar_bottom_height) +#define FRAME_TOOLBAR_HEIGHT(f) \ + (FRAME_TOOLBAR_TOP_HEIGHT (f) + FRAME_TOOLBAR_BOTTOM_HEIGHT (f)) +#define FRAME_TOOLBAR_LEFT_WIDTH(f) ((f)->output_data.x->toolbar_left_width) +#define FRAME_TOOLBAR_RIGHT_WIDTH(f) ((f)->output_data.x->toolbar_right_width) +#define FRAME_TOOLBAR_WIDTH(f) \ + (FRAME_TOOLBAR_LEFT_WIDTH (f) + FRAME_TOOLBAR_RIGHT_WIDTH (f)) #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset) /* This gives the x_display_info structure for the display F is on. */ ------------------------------------------------------------ revno: 100938 committer: Chong Yidong branch nick: trunk timestamp: Thu 2010-07-29 12:01:14 -0400 message: Update package-x to latest package.el changes. * emacs-lisp/package-x.el (package--make-rss-entry): (package-maint-add-news-item, package--update-news) (package-upload-buffer-internal): New arg ARCHIVE-URL. * emacs-lisp/package.el (package-archive-url): Rename from package-archive-id. (package-install): Doc fix. (package-download-single, package-download-tar, package-install) (package-menu-view-commentary): Callers changed. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-29 13:13:11 +0000 +++ lisp/ChangeLog 2010-07-29 16:01:14 +0000 @@ -1,3 +1,15 @@ +2010-07-29 Chong Yidong + + * emacs-lisp/package-x.el (package--make-rss-entry): + (package-maint-add-news-item, package--update-news) + (package-upload-buffer-internal): New arg ARCHIVE-URL. + + * emacs-lisp/package.el (package-archive-url): Rename from + package-archive-id. + (package-install): Doc fix. + (package-download-single, package-download-tar, package-install) + (package-menu-view-commentary): Callers changed. + 2010-07-29 Michael Albinus * net/tramp.el (tramp-handle-start-file-process): Check only for === modified file 'lisp/emacs-lisp/package-x.el' --- lisp/emacs-lisp/package-x.el 2010-06-19 22:36:51 +0000 +++ lisp/emacs-lisp/package-x.el 2010-07-29 16:01:14 +0000 @@ -56,12 +56,12 @@ (setq string (replace-match """ t nil string))) string) -(defun package--make-rss-entry (title text) +(defun package--make-rss-entry (title text archive-url) (let ((date-string (format-time-string "%a, %d %B %Y %T %z"))) (concat "\n" "" (package--encode title) "\n" ;; FIXME: should have a link in the web page. - "" package-archive-base "news.html\n" + "" archive-url "news.html\n" "" (package--encode text) "\n" "" date-string "\n" "\n"))) @@ -85,7 +85,7 @@ (unless old-buffer (kill-buffer (current-buffer))))))) -(defun package-maint-add-news-item (title description) +(defun package-maint-add-news-item (title description archive-url) "Add a news item to the ELPA web pages. TITLE is the title of the news item. DESCRIPTION is the text of the news item. @@ -93,21 +93,28 @@ (interactive "sTitle: \nsText: ") (package--update-file (concat package-archive-upload-base "elpa.rss") "" - (package--make-rss-entry title description)) + (package--make-rss-entry title description archive-url)) (package--update-file (concat package-archive-upload-base "news.html") "New entries go here" (package--make-html-entry title description))) -(defun package--update-news (package version description) +(defun package--update-news (package version description archive-url) "Update the ELPA web pages when a package is uploaded." (package-maint-add-news-item (concat package " version " version) - description)) + description + archive-url)) -(defun package-upload-buffer-internal (pkg-info extension) +(defun package-upload-buffer-internal (pkg-info extension &optional archive-url) "Upload a package whose contents are in the current buffer. PKG-INFO is the package info, see `package-buffer-info'. EXTENSION is the file extension, a string. It can be either -\"el\" or \"tar\"." +\"el\" or \"tar\". + +Optional arg ARCHIVE-URL is the URL of the destination archive. +If nil, the \"gnu\" archive is used." + (unless archive-url + (or (setq archive-url (cdr (assoc "gnu" package-archives))) + (error "No destination URL"))) (save-excursion (save-restriction (let* ((file-type (cond @@ -127,7 +134,7 @@ ;; Download latest archive-contents. (buffer (url-retrieve-synchronously - (concat package-archive-base "archive-contents")))) + (concat archive-url "archive-contents")))) ;; Parse archive-contents. (set-buffer buffer) @@ -178,7 +185,7 @@ ;; Write a news entry. (package--update-news (concat file-name "." extension) - pkg-version desc) + pkg-version desc archive-url) ;; special-case "package": write a second copy so that the ;; installer can easily find the latest version. === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2010-07-28 18:54:42 +0000 +++ lisp/emacs-lisp/package.el 2010-07-29 16:01:14 +0000 @@ -685,7 +685,7 @@ (defun package-download-single (name version desc requires) "Download and install a single-file package." (let ((buffer (url-retrieve-synchronously - (concat (package-archive-id name) + (concat (package-archive-url name) (symbol-name name) "-" version ".el")))) (with-current-buffer buffer (package-handle-response) @@ -698,7 +698,7 @@ (defun package-download-tar (name version) "Download and install a tar package." (let ((tar-buffer (url-retrieve-synchronously - (concat (package-archive-id name) + (concat (package-archive-url name) (symbol-name name) "-" version ".tar")))) (with-current-buffer tar-buffer (package-handle-response) @@ -856,7 +856,7 @@ (defun package-install (name) "Install the package named NAME. Interactively, prompt for the package name. -The package is found on one of the archives in `package-archive-base'." +The package is found on one of the archives in `package-archives'." (interactive (list (intern (completing-read "Install package: " (mapcar (lambda (elt) @@ -1030,7 +1030,7 @@ ;; FIXME: query user? 'always)) -(defun package-archive-id (name) +(defun package-archive-url (name) "Return the archive containing the package NAME." (let ((desc (cdr (assq (intern-soft name) package-archive-contents)))) (cdr (assoc (aref desc (- (length desc) 1)) package-archives)))) @@ -1350,7 +1350,7 @@ (interactive) (let* ((pkg-name (package-menu-get-package)) (buffer (url-retrieve-synchronously - (concat (package-archive-id pkg-name) + (concat (package-archive-url pkg-name) pkg-name "-readme.txt"))) start-point ok) ------------------------------------------------------------ revno: 100937 committer: Dan Nicolaescu branch nick: trunk timestamp: Thu 2010-07-29 08:50:04 -0700 message: Make lisp_time_argument work on all systems. * src/lisp.h (lisp_time_argument): Move declaration ... * src/systime.h (lisp_time_argument): ... here * src/editfns.c (lisp_time_argument): Remove declaration. (Bug#6751) diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-29 06:59:29 +0000 +++ src/ChangeLog 2010-07-29 15:50:04 +0000 @@ -1,3 +1,10 @@ +2010-07-29 Dan Nicolaescu + + Make lisp_time_argument declaration work on all systems. + * lisp.h (lisp_time_argument): Move declaration ... + * systime.h (lisp_time_argument): ... here + * editfns.c (lisp_time_argument): Remove declaration. (Bug#6751) + 2010-07-29 Jan Djärv * vm-limit.c (POINTER): Add typedef for it. === modified file 'src/editfns.c' --- src/editfns.c 2010-07-27 03:52:35 +0000 +++ src/editfns.c 2010-07-29 15:50:04 +0000 @@ -97,7 +97,6 @@ static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, int *, Lisp_Object, int *); static void update_buffer_properties (int, int); static Lisp_Object region_limit (int); -int lisp_time_argument (Lisp_Object, time_t *, int *); static size_t emacs_memftimeu (char *, size_t, const char *, size_t, const struct tm *, int); static void general_insert_function (void (*) (const unsigned char *, EMACS_INT), === modified file 'src/lisp.h' --- src/lisp.h 2010-07-29 05:48:06 +0000 +++ src/lisp.h 2010-07-29 15:50:04 +0000 @@ -2995,7 +2995,6 @@ EXFUN (Ffield_end, 3); EXFUN (Ffield_string_no_properties, 1); extern void set_time_zone_rule (const char *); -extern int lisp_time_argument (Lisp_Object, time_t *, int *); /* Defined in buffer.c */ extern int mouse_face_overlay_overlaps (Lisp_Object); === modified file 'src/systime.h' --- src/systime.h 2010-07-02 09:26:33 +0000 +++ src/systime.h 2010-07-29 15:50:04 +0000 @@ -147,6 +147,9 @@ #ifdef GCPRO1 /* defined in dired.c */ extern Lisp_Object make_time (time_t); + +/* defined in editfns.c*/ +extern int lisp_time_argument (Lisp_Object, time_t *, int *); #endif /* Compare times T1 and T2. Value is 0 if T1 and T2 are the same. ------------------------------------------------------------ revno: 100936 committer: Michael Albinus branch nick: trunk timestamp: Thu 2010-07-29 15:54:03 +0200 message: * processes.texi (Process Information): Explain process property `remote-tty'. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2010-07-27 02:10:05 +0000 +++ doc/lispref/ChangeLog 2010-07-29 13:54:03 +0000 @@ -1,3 +1,8 @@ +2010-07-29 Michael Albinus + + * processes.texi (Process Information): Explain process property + `remote-tty'. + 2010-07-27 Juanma Barranquero * modes.texi (Defining Minor Modes): Use C-delete in examples, === modified file 'doc/lispref/processes.texi' --- doc/lispref/processes.texi 2010-06-23 03:36:56 +0000 +++ doc/lispref/processes.texi 2010-07-29 13:54:03 +0000 @@ -868,7 +868,9 @@ This function returns the terminal name that @var{process} is using for its communication with Emacs---or @code{nil} if it is using pipes instead of a terminal (see @code{process-connection-type} in -@ref{Asynchronous Processes}). +@ref{Asynchronous Processes}). If @var{process} represents a program +running on a remote host, the terminal name used by that program on +the remote host is provided as process property @code{remote-tty}. @end defun @defun process-coding-system process ------------------------------------------------------------ revno: 100935 committer: Michael Albinus branch nick: trunk timestamp: Thu 2010-07-29 15:13:11 +0200 message: * net/tramp.el (tramp-handle-start-file-process): Check only for `remote-tty' process property. (tramp-open-shell): Don't check for tty. (tramp-open-connection-setup-interactive-shell): Set `remote-tty' process property. * progmodes/gdb-mi.el (gdb-init-1): Check also for tty on a remote host. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-07-28 18:54:42 +0000 +++ lisp/ChangeLog 2010-07-29 13:13:11 +0000 @@ -1,3 +1,14 @@ +2010-07-29 Michael Albinus + + * net/tramp.el (tramp-handle-start-file-process): Check only for + `remote-tty' process property. + (tramp-open-shell): Don't check for tty. + (tramp-open-connection-setup-interactive-shell): Set `remote-tty' + process property. + + * progmodes/gdb-mi.el (gdb-init-1): Check also for tty on a remote + host. + 2010-07-28 Chong Yidong * emacs-lisp/package.el (package-load-list, package-archives) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2010-07-28 10:02:18 +0000 +++ lisp/net/tramp.el 2010-07-29 13:13:11 +0000 @@ -4538,14 +4538,12 @@ (with-current-buffer (tramp-get-connection-buffer v) (clear-visited-file-modtime) (narrow-to-region (point-max) (point-max))) - (if (stringp program) - ;; Send the command. `tramp-send-command' opens a new - ;; connection. + (if command + ;; Send the command. (tramp-send-command v command nil t) ; nooutput - ;; Check, whether a pty is associated, and set it as - ;; process property. - (condition-case nil - (tramp-send-command-and-read v "echo \\\"`tty`\\\"") + ;; Check, whether a pty is associated. + (tramp-maybe-open-connection v) + (unless (process-get (tramp-get-connection-process v) 'remote-tty) (tramp-error v 'file-error "pty association is not supported for `%s'" name))) ;; Set query flag for this process. @@ -6631,10 +6629,7 @@ vec (format "PS1=%s" (shell-quote-argument tramp-end-of-output)) t) (tramp-send-command vec "PS2=''" t) (tramp-send-command vec "PS3=''" t) - (tramp-send-command vec "PROMPT_COMMAND=''" t) - ;; Dump tty in the traces. - (when (>= tramp-verbose 9) - (tramp-send-command vec "tty" t)))) + (tramp-send-command vec "PROMPT_COMMAND=''" t))) (defun tramp-find-shell (vec) "Opens a shell on the remote host which groks tilde expansion." @@ -7071,6 +7066,11 @@ (when (string-match "^IRIX64" (tramp-get-connection-property vec "uname" "")) (tramp-send-command vec "set +H" t)) + ;; Set `remote-tty' process property. + (ignore-errors + (let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\""))) + (unless (zerop (length tty)) (process-put proc 'remote-tty tty)))) + ;; Set the environment. (tramp-message vec 5 "Setting default environment") === modified file 'lisp/progmodes/gdb-mi.el' --- lisp/progmodes/gdb-mi.el 2010-03-28 19:22:52 +0000 +++ lisp/progmodes/gdb-mi.el 2010-07-29 13:13:11 +0000 @@ -795,7 +795,10 @@ (gdb-input ;; Needs GDB 6.4 onwards (list (concat "-inferior-tty-set " - (process-tty-name (get-process "gdb-inferior"))) + (or + ;; The process can run on a remote host. + (process-get (get-process "gdb-inferior") 'remote-tty) + (process-tty-name (get-process "gdb-inferior")))) 'ignore)) (if (eq window-system 'w32) (gdb-input (list "-gdb-set new-console off" 'ignore))) ------------------------------------------------------------ revno: 100934 committer: Jan D. branch nick: trunk timestamp: Thu 2010-07-29 08:59:29 +0200 message: Fix some stuff that didn't compile. * frame.h (Qtty_color_mode): Move declaration out of HAVE_WINDOW_SYSTEM. * vm-limit.c (POINTER): Add typedef for it. (start_of_data): Change return type from POINTER to char *. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-29 06:12:38 +0000 +++ src/ChangeLog 2010-07-29 06:59:29 +0000 @@ -1,3 +1,11 @@ +2010-07-29 Jan Djärv + + * vm-limit.c (POINTER): Add typedef for it. + (start_of_data): Change return type from POINTER to char *. + + * frame.h (Qtty_color_mode): Move declaration out of ifdef + HAVE_WINDOW_SYSTEM. + 2010-07-29 Dan Nicolaescu * vm-limit.c: Do not include sys/resource.h, mem-limits.h does it. === modified file 'src/frame.h' --- src/frame.h 2010-07-29 05:48:06 +0000 +++ src/frame.h 2010-07-29 06:59:29 +0000 @@ -823,6 +823,7 @@ extern Lisp_Object Qframep, Qframe_live_p; extern Lisp_Object Qtty, Qtty_type; +extern Lisp_Object Qtty_color_mode; extern Lisp_Object Qterminal, Qterminal_live_p; extern Lisp_Object Qnoelisp; @@ -1088,7 +1089,6 @@ /* These are in frame.c */ -extern Lisp_Object Qtty_color_mode; extern Lisp_Object Vx_resource_name; extern Lisp_Object Vx_resource_class; === modified file 'src/vm-limit.c' --- src/vm-limit.c 2010-07-29 06:12:38 +0000 +++ src/vm-limit.c 2010-07-29 06:59:29 +0000 @@ -33,9 +33,10 @@ 3 -- 95% warning issued; keep warning frequently. */ enum warnlevel { not_warned, warned_75, warned_85, warned_95 }; - static enum warnlevel warnlevel; +typedef POINTER_TYPE *POINTER; + /* Function to call to issue a warning; 0 means don't issue them. */ static void (*warn_function) (const char *); @@ -256,7 +257,7 @@ * */ -POINTER +char * start_of_data (void) { #ifdef BSD_SYSTEM ------------------------------------------------------------ revno: 100933 committer: Dan Nicolaescu branch nick: trunk timestamp: Wed 2010-07-28 23:12:38 -0700 message: * src/vm-limit.c: Do not include sys/resource.h, mem-limits.h does it. Remove reference to __osf__, unused. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-07-29 05:58:58 +0000 +++ src/ChangeLog 2010-07-29 06:12:38 +0000 @@ -1,5 +1,8 @@ 2010-07-29 Dan Nicolaescu + * vm-limit.c: Do not include sys/resource.h, mem-limits.h does it. + Remove reference to __osf__, unused. + * mem-limits.h: Remove duplicated includes. (NULL): Remove definition, unused. (POINTER): Remove definition. === modified file 'src/vm-limit.c' --- src/vm-limit.c 2010-07-25 14:13:30 +0000 +++ src/vm-limit.c 2010-07-29 06:12:38 +0000 @@ -25,10 +25,6 @@ #include "mem-limits.h" -#ifdef HAVE_GETRLIMIT -#include -#endif - /* Level number of warnings already issued. 0 -- no warnings issued. @@ -100,7 +96,7 @@ } #else -#if !defined (BSD4_2) && !defined (__osf__) && !defined (CYGWIN) +#if !defined (BSD4_2) && !defined (CYGWIN) #ifdef MSDOS void @@ -148,7 +144,7 @@ } #endif /* not MSDOS */ -#else /* BSD4_2 */ +#else /* BSD4_2 || CYGWIN */ static void get_lim_data (void) ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.