From 22770c84d5acd892c6a3302790f92f37f600c93e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 28 Feb 2011 22:29:00 -0500 Subject: [PATCH 001/383] Release logs for 23.3 release. Regenerate configure and other release files. --- ChangeLog | 4 ++ README | 2 +- admin/ChangeLog | 4 ++ configure | 18 ++++---- configure.in | 2 +- doc/emacs/ChangeLog | 4 ++ doc/emacs/emacs.texi | 2 +- doc/lispintro/ChangeLog | 4 ++ doc/lispref/ChangeLog | 4 ++ doc/lispref/book-spine.texinfo | 2 +- doc/lispref/elisp.texi | 2 +- doc/lispref/vol1.texi | 2 +- doc/lispref/vol2.texi | 2 +- doc/man/ChangeLog | 4 ++ doc/man/emacs.1 | 2 +- doc/misc/ChangeLog | 4 ++ doc/misc/faq.texi | 2 +- etc/AUTHORS | 14 +++---- etc/ChangeLog | 4 ++ leim/ChangeLog | 4 ++ lib-src/ChangeLog | 4 ++ lib-src/makefile.w32-in | 2 +- lisp/ChangeLog | 4 ++ lisp/cedet/ChangeLog | 4 ++ lisp/erc/ChangeLog | 4 ++ lisp/ldefs-boot.el | 42 +++++++++---------- lisp/mh-e/ChangeLog | 4 ++ lisp/org/ChangeLog | 4 ++ lisp/url/ChangeLog | 4 ++ lisp/version.el | 2 +- lwlib/ChangeLog | 4 ++ msdos/ChangeLog | 4 ++ nextstep/ChangeLog | 4 ++ nextstep/Cocoa/Emacs.base/Contents/Info.plist | 4 +- .../Resources/English.lproj/InfoPlist.strings | 4 +- .../Emacs.base/Resources/Emacs.desktop | 2 +- .../Emacs.base/Resources/Info-gnustep.plist | 4 +- nt/ChangeLog | 4 ++ nt/emacs.rc | 8 ++-- nt/emacsclient.rc | 8 ++-- oldXMenu/ChangeLog | 4 ++ src/ChangeLog | 4 ++ test/ChangeLog | 4 ++ 43 files changed, 155 insertions(+), 63 deletions(-) diff --git a/ChangeLog b/ChangeLog index a58004ec2be..0c70bf296a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-01-27 Chong Yidong * configure.in: Test existence of xaw3d library, not just the diff --git a/README b/README index db6104b0e06..a1cdd4e2bfc 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, See the end of the file for license conditions. -This directory tree holds version 23.2.94 of GNU Emacs, the extensible, +This directory tree holds version 23.3 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff --git a/admin/ChangeLog b/admin/ChangeLog index d0e7b78f2e8..741902d3249 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-02-22 Juanma Barranquero * notes/bugtracker (bugtracker_debbugs_url): Fix typo. diff --git a/configure b/configure index e87e7a184a6..8fbd738517f 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for emacs 23.2.94. +# Generated by GNU Autoconf 2.67 for emacs 23.3. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -549,8 +549,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='emacs' PACKAGE_TARNAME='emacs' -PACKAGE_VERSION='23.2.94' -PACKAGE_STRING='emacs 23.2.94' +PACKAGE_VERSION='23.3' +PACKAGE_STRING='emacs 23.3' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1320,7 +1320,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures emacs 23.2.94 to adapt to many kinds of systems. +\`configure' configures emacs 23.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1394,7 +1394,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of emacs 23.2.94:";; + short | recursive ) echo "Configuration of emacs 23.3:";; esac cat <<\_ACEOF @@ -1540,7 +1540,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -emacs configure 23.2.94 +emacs configure 23.3 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2091,7 +2091,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by emacs $as_me 23.2.94, which was +It was created by emacs $as_me 23.3, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -14056,7 +14056,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by emacs $as_me 23.2.94, which was +This file was extended by emacs $as_me 23.3, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14122,7 +14122,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -emacs config.status 23.2.94 +emacs config.status 23.3 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" diff --git a/configure.in b/configure.in index a89d6d596de..275e8125ab3 100644 --- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with GNU Emacs. If not, see . AC_PREREQ(2.62) -AC_INIT(emacs, 23.2.94) +AC_INIT(emacs, 23.3) AC_CONFIG_HEADER(src/config.h:src/config.in) AC_CONFIG_SRCDIR(src/lisp.h) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index fe3e17a2c91..73e2aca30f0 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-02-25 Eli Zaretskii * search.texi (Regexp Search): Move index entries about regexps to the diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index ec2d00e3c31..34a604f7654 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -5,7 +5,7 @@ @c The edition number appears in several places in this file @set EDITION Sixteenth -@set EMACSVER 23.2.94 +@set EMACSVER 23.3 @copying This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},@* diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index 19bb3195d66..50566340701 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-02-18 Eli Zaretskii * emacs-lisp-intro.texi: Sync @dircategory with ../../info/dir. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 2bb357cf8a1..e91cf93e3f0 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-02-25 Glenn Morris * variables.texi (Directory Local Variables): Mention the optional diff --git a/doc/lispref/book-spine.texinfo b/doc/lispref/book-spine.texinfo index 9a6f549dc49..3a8aa1c0705 100644 --- a/doc/lispref/book-spine.texinfo +++ b/doc/lispref/book-spine.texinfo @@ -11,7 +11,7 @@ @center @titlefont{GNU Emacs Lisp Reference Manual} @sp 5 @center GNU -@center Emacs Version 23.2.94 +@center Emacs Version 23.3 @center for Unix Users @sp 5 diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index cfc02a07068..2093806fa49 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -8,7 +8,7 @@ @c Please remember to update the edition number in README as well. @c And also the copies in vol1.texi and vol2.texi. @set VERSION 3.0 -@set EMACSVER 23.2.94 +@set EMACSVER 23.3 @set DATE July 2009 @c in general, keep the following line commented out, unless doing a diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index 9d6bb7da68c..392bfc5b5e9 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi @@ -27,7 +27,7 @@ @c Version of the manual and of Emacs. @c Please remember to update the edition number in README as well. @set VERSION 3.0 -@set EMACSVER 23.2.94 +@set EMACSVER 23.3 @set DATE July 2009 @dircategory Emacs diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 18027ee362f..63f35b7e531 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi @@ -27,7 +27,7 @@ @c Version of the manual and of Emacs. @c Please remember to update the edition number in README as well. @set VERSION 3.0 -@set EMACSVER 23.2.94 +@set EMACSVER 23.3 @set DATE July 2009 @dircategory Emacs diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog index 98b04de4177..0c7079b2913 100644 --- a/doc/man/ChangeLog +++ b/doc/man/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2010-12-29 Jari Aalto (tiny change) * emacsclient.1: Arrange options alphabetically (Bug#7620). diff --git a/doc/man/emacs.1 b/doc/man/emacs.1 index 8f01e4a2165..0baf3abe5e3 100644 --- a/doc/man/emacs.1 +++ b/doc/man/emacs.1 @@ -1,5 +1,5 @@ .\" See section COPYING for copyright and redistribution information. -.TH EMACS 1 "2007 April 13" "GNU Emacs 23.2.94" +.TH EMACS 1 "2007 April 13" "GNU Emacs 23.3" . . .SH NAME diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index c8d981125d2..122a9ae2920 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-02-23 Glenn Morris * dbus.texi (Type Conversion): Grammar fix. diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi index adacecbabd1..d3acccf1693 100644 --- a/doc/misc/faq.texi +++ b/doc/misc/faq.texi @@ -5,7 +5,7 @@ @c %**end of header @c This is used in many places -@set VER 23.2.94 +@set VER 23.3 @c This file is maintained by Romain Francoise . @c Feel free to install changes without prior permission (but I'd diff --git a/etc/AUTHORS b/etc/AUTHORS index ad9142931a6..56efcaa0ea5 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -442,7 +442,7 @@ and co-wrote longlines.el and changed xdisp.c simple.el files.el display.texi files.texi frames.texi emacs.texi xterm.c keyboard.c cus-edit.el faces.el Makefile.in font.c xfaces.c image.c misc.texi xfns.c startup.el - text.texi compile.el configure.in and 664 other files + text.texi compile.el configure.in and 665 other files Chris Chase: co-wrote idlw-shell.el idlwave.el @@ -882,8 +882,8 @@ Eli Tziperman: wrote rmail-spam-filter.el Eli Zaretskii: wrote rxvt.el tty-colors.el and changed msdos.c makefile.w32-in Makefile.in files.el info.el fileio.c rmail.el mainmake.v2 pc-win.el simple.el startup.el config.bat msdos.h - w32.c dired.c frame.c menu-bar.el process.c INSTALL internal.el xdisp.c - and 606 other files + w32.c dired.c frame.c menu-bar.el process.c INSTALL files.texi + internal.el and 642 other files Elias Oltmanns: changed tls.el gnus-agent.el gnus-int.el gnus-srvr.el gnus.el @@ -1150,7 +1150,7 @@ Glenn Morris: wrote check-declare.el and changed Makefile.in calendar.el diary-lib.el rmail.el f90.el cal-menu.el cal-hebrew.el fortran.el holidays.el configure.in calendar.texi cal-islam.el bytecomp.el cal-bahai.el appt.el emacs.texi - files.el cal-china.el simple.el rmailsum.el cal-tex.el + files.el simple.el cal-china.el rmailsum.el cal-tex.el and 1012 other files Glynn Clements: wrote gamegrid.el snake.el tetris.el @@ -1662,7 +1662,7 @@ and changed files.el perl-mode.el Juanma Barranquero: changed makefile.w32-in subr.el files.el faces.el w32fns.c bs.el help-fns.el server.el org.el simple.el emacsclient.c buffer.c desktop.el mule-cmds.el ido.el window.c xdisp.c allout.el - keyboard.c replace.el eval.c and 939 other files + keyboard.c replace.el eval.c and 942 other files Juergen Kreileder: changed imap.el nnimap.el @@ -2212,8 +2212,8 @@ Michael Albinus: wrote dbus.el tramp-cmds.el tramp-compat.el tramp-fish.el tramp-ftp.el tramp-gvfs.el tramp-gw.el tramp-smb.el xesam.el zeroconf.el and co-wrote tramp-cache.el tramp.el -and changed tramp.texi dbusbind.c dbus.texi trampver.el ange-ftp.el - trampver.texi files.el files.texi tramp-vc.el Makefile.in tramp-util.el +and changed tramp.texi dbusbind.c dbus.texi trampver.el trampver.texi + ange-ftp.el files.el files.texi tramp-vc.el Makefile.in tramp-util.el tramp-imap.el tramp-uu.el dired-aux.el compile.el configure.in em-unix.el grep.el simple.el vc.el dired.el and 51 other files diff --git a/etc/ChangeLog b/etc/ChangeLog index 82020dc3c9c..24e6e9cfc53 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-01-18 Glenn Morris * PROBLEMS: Add note about svn+ssh. (Bug#7791) diff --git a/leim/ChangeLog b/leim/ChangeLog index 292097559fa..c9d7b437f27 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-02-23 Juanma Barranquero * quail/ethiopic.el ("ethiopic"): Fix tpo in docstring. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 58c37c493ae..c6d9fa73e53 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-02-02 Eli Zaretskii * makefile.w32-in (ETAGS_CFLAGS, CTAGS_CFLAGS): Add diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 139fd64406c..396060a3d75 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -22,7 +22,7 @@ ALL = make-docfile hexl ctags etags movemail ebrowse sorted-doc digest-doc emacs .PHONY: $(ALL) -VERSION = 23.2.94 +VERSION = 23.3 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \ -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \ diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a11cb793648..20ed72b2ce6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-02-26 Eli Zaretskii * international/mule-cmds.el (set-default-coding-systems): Use the diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 580667f0ce6..2f34afdb112 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2010-10-29 Glenn Morris * mode-local.el (mode-local-augment-function-help): diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index fb05e6f9d1f..000d48e5198 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-01-31 Antoine Levitt (tiny change) * erc-track.el (track): Don't reset erc-modified-channels-object diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 0e3564d9664..77e95cbf74a 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -494,7 +494,7 @@ A replacement function for `newline-and-indent', aligning as it goes. ;;;*** ;;;### (autoloads (outlineify-sticky allout-mode) "allout" "allout.el" -;;;;;; (19752 41642)) +;;;;;; (19813 16320)) ;;; Generated autoloads from allout.el (put 'allout-use-hanging-indents 'safe-local-variable (if (fboundp 'booleanp) 'booleanp '(lambda (x) (member x '(t nil))))) @@ -4504,7 +4504,7 @@ Update copyright notice for all files in DIRECTORY matching MATCH. ;;;*** ;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode) -;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (19752 41642)) +;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (19813 16320)) ;;; Generated autoloads from progmodes/cperl-mode.el (put 'cperl-indent-level 'safe-local-variable 'integerp) (put 'cperl-brace-offset 'safe-local-variable 'integerp) @@ -10995,7 +10995,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST. ;;;*** ;;;### (autoloads (gnus gnus-other-frame gnus-slave gnus-no-server -;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (19752 41642)) +;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (19806 64998)) ;;; Generated autoloads from gnus/gnus.el (when (fboundp 'custom-autoload) (custom-autoload 'gnus-select-method "gnus")) @@ -11048,7 +11048,7 @@ prompt the user for the name of an NNTP server to use. ;;;;;; gnus-agent-get-undownloaded-list gnus-agent-delete-group ;;;;;; gnus-agent-rename-group gnus-agent-possibly-save-gcc gnus-agentize ;;;;;; gnus-slave-unplugged gnus-plugged gnus-unplugged) "gnus-agent" -;;;;;; "gnus/gnus-agent.el" (19752 41642)) +;;;;;; "gnus/gnus-agent.el" (19813 16320)) ;;; Generated autoloads from gnus/gnus-agent.el (autoload 'gnus-unplugged "gnus-agent" "\ @@ -11590,7 +11590,7 @@ If picons are already displayed, remove them. ;;;;;; gnus-sorted-nintersection gnus-sorted-range-intersection ;;;;;; gnus-sorted-intersection gnus-intersection gnus-sorted-complement ;;;;;; gnus-sorted-ndifference gnus-sorted-difference) "gnus-range" -;;;;;; "gnus/gnus-range.el" (19752 41642)) +;;;;;; "gnus/gnus-range.el" (19813 16320)) ;;; Generated autoloads from gnus/gnus-range.el (autoload 'gnus-sorted-difference "gnus-range" "\ @@ -11734,8 +11734,8 @@ Update the format specification near point. ;;;*** ;;;### (autoloads (gnus-fixup-nnimap-unread-after-getting-new-news -;;;;;; gnus-declare-backend) "gnus-start" "gnus/gnus-start.el" (19752 -;;;;;; 41642)) +;;;;;; gnus-declare-backend) "gnus-start" "gnus/gnus-start.el" (19813 +;;;;;; 16320)) ;;; Generated autoloads from gnus/gnus-start.el (autoload 'gnus-declare-backend "gnus-start" "\ @@ -13550,7 +13550,7 @@ See also the variable `idlwave-shell-prompt-pattern'. ;;;*** ;;;### (autoloads (idlwave-mode) "idlwave" "progmodes/idlwave.el" -;;;;;; (19752 41642)) +;;;;;; (19813 16320)) ;;; Generated autoloads from progmodes/idlwave.el (autoload 'idlwave-mode "idlwave" "\ @@ -14357,7 +14357,7 @@ Image files are those whose name has an extension in ;;;*** ;;;### (autoloads (image-bookmark-jump image-mode-as-text image-minor-mode -;;;;;; image-mode) "image-mode" "image-mode.el" (19752 41642)) +;;;;;; image-mode) "image-mode" "image-mode.el" (19806 64998)) ;;; Generated autoloads from image-mode.el (push (cons (purecopy "\\.jpe?g\\'") 'image-mode) auto-mode-alist) (push (cons (purecopy "\\.png\\'") 'image-mode) auto-mode-alist) @@ -15993,7 +15993,7 @@ except that FILTER is not optional. ;;;*** -;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (19752 41642)) +;;;### (autoloads (log-edit) "log-edit" "log-edit.el" (19806 64998)) ;;; Generated autoloads from log-edit.el (autoload 'log-edit "log-edit" "\ @@ -18350,7 +18350,7 @@ symbol in the alist. ;;;*** ;;;### (autoloads (nnfolder-generate-active-file) "nnfolder" "gnus/nnfolder.el" -;;;;;; (19752 41642)) +;;;;;; (19802 41007)) ;;; Generated autoloads from gnus/nnfolder.el (autoload 'nnfolder-generate-active-file "nnfolder" "\ @@ -18660,7 +18660,7 @@ including a reproducible test case and send the message. ;;;;;; org-map-entries org-open-link-from-string org-open-at-point-global ;;;;;; org-insert-link-global org-store-link org-run-like-in-org-mode ;;;;;; turn-on-orgstruct++ turn-on-orgstruct orgstruct-mode org-global-cycle -;;;;;; org-mode) "org" "org/org.el" (19752 41642)) +;;;;;; org-mode) "org" "org/org.el" (19813 31420)) ;;; Generated autoloads from org/org.el (autoload 'org-mode "org" "\ @@ -18873,7 +18873,7 @@ Call the customize function with org as argument. ;;;;;; org-diary org-agenda-list-stuck-projects org-tags-view org-todo-list ;;;;;; org-search-view org-agenda-list org-batch-store-agenda-views ;;;;;; org-store-agenda-views org-batch-agenda-csv org-batch-agenda -;;;;;; org-agenda) "org-agenda" "org/org-agenda.el" (19752 41642)) +;;;;;; org-agenda) "org-agenda" "org/org-agenda.el" (19813 31420)) ;;; Generated autoloads from org/org-agenda.el (autoload 'org-agenda "org-agenda" "\ @@ -19573,7 +19573,7 @@ that uses these same face definitions. ;;;### (autoloads (org-export-icalendar-combine-agenda-files org-export-icalendar-all-agenda-files ;;;;;; org-export-icalendar-this-file) "org-icalendar" "org/org-icalendar.el" -;;;;;; (19752 41642)) +;;;;;; (19813 31420)) ;;; Generated autoloads from org/org-icalendar.el (autoload 'org-export-icalendar-this-file "org-icalendar" "\ @@ -19921,7 +19921,7 @@ See also the variable `org-reverse-note-order'. ;;;*** ;;;### (autoloads (org-table-to-lisp orgtbl-mode turn-on-orgtbl) -;;;;;; "org-table" "org/org-table.el" (19752 41642)) +;;;;;; "org-table" "org/org-table.el" (19813 31420)) ;;; Generated autoloads from org/org-table.el (autoload 'turn-on-orgtbl "org-table" "\ @@ -22864,8 +22864,8 @@ variable. ;;;;;; rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers ;;;;;; rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers ;;;;;; rmail-dont-reply-to-names rmail-user-mail-address-regexp -;;;;;; rmail-movemail-variant-p) "rmail" "mail/rmail.el" (19761 -;;;;;; 5822)) +;;;;;; rmail-movemail-variant-p) "rmail" "mail/rmail.el" (19813 +;;;;;; 31420)) ;;; Generated autoloads from mail/rmail.el (autoload 'rmail-movemail-variant-p "rmail" "\ @@ -28448,7 +28448,7 @@ You might need to set `uce-mail-reader' before using this. ;;;;;; ucs-normalize-NFKC-string ucs-normalize-NFKC-region ucs-normalize-NFKD-string ;;;;;; ucs-normalize-NFKD-region ucs-normalize-NFC-string ucs-normalize-NFC-region ;;;;;; ucs-normalize-NFD-string ucs-normalize-NFD-region) "ucs-normalize" -;;;;;; "international/ucs-normalize.el" (19752 41642)) +;;;;;; "international/ucs-normalize.el" (19813 31420)) ;;; Generated autoloads from international/ucs-normalize.el (autoload 'ucs-normalize-NFD-region "ucs-normalize" "\ @@ -29895,7 +29895,7 @@ Key bindings specific to `verilog-mode-map' are: ;;;*** ;;;### (autoloads (vhdl-mode) "vhdl-mode" "progmodes/vhdl-mode.el" -;;;;;; (19752 41642)) +;;;;;; (19813 16320)) ;;; Generated autoloads from progmodes/vhdl-mode.el (autoload 'vhdl-mode "vhdl-mode" "\ @@ -32014,8 +32014,8 @@ Zone out, completely. ;;;;;; "url/url-expand.el" "url/url-ftp.el" "url/url-history.el" ;;;;;; "url/url-imap.el" "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el" ;;;;;; "url/url-vars.el" "vc-dav.el" "vcursor.el" "vt-control.el" -;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (19801 -;;;;;; 62231 520663)) +;;;;;; "vt100-led.el" "w32-fns.el" "w32-vars.el" "x-dnd.el") (19820 +;;;;;; 23317 611837)) ;;;*** diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 9c1fbc0ddf5..a983bca8e7a 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2010-05-07 Chong Yidong * Version 23.2 released. diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 80f63a1ee78..db2d0e009c0 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-02-23 Juanma Barranquero * org.el (org-maybe-keyword-time-regexp): diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index de0f57d073c..3b049a07a50 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2010-12-04 Chong Yidong * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART. diff --git a/lisp/version.el b/lisp/version.el index aa5016960cb..92eb56440aa 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -32,7 +32,7 @@ (defconst emacs-copyright "Copyright (C) 2011 Free Software Foundation, Inc." "\ Short copyright string for this version of Emacs.") -(defconst emacs-version "23.2.94" "\ +(defconst emacs-version "23.3" "\ Version numbers of this version of Emacs.") (defconst emacs-major-version (progn (string-match "^[0-9]+" emacs-version) (string-to-number (match-string 0 emacs-version))) "\ diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index 6244a9b04d6..febd45b37f1 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-01-23 Werner Meisner * lwlib-Xm.c (xm_update_menu): Avoid a NULL pointer dereference diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 10b7056b5c6..1718bdeb0c1 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2010-05-07 Chong Yidong * Version 23.2 released. diff --git a/nextstep/ChangeLog b/nextstep/ChangeLog index 5d2f1fe6f2a..cbdb559f7a5 100644 --- a/nextstep/ChangeLog +++ b/nextstep/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-01-02 Glenn Morris * Cocoa/Emacs.base/Contents/Info.plist: diff --git a/nextstep/Cocoa/Emacs.base/Contents/Info.plist b/nextstep/Cocoa/Emacs.base/Contents/Info.plist index 6ed6a9a2359..c18c2267473 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Info.plist +++ b/nextstep/Cocoa/Emacs.base/Contents/Info.plist @@ -553,7 +553,7 @@ along with GNU Emacs. If not, see . CFBundleExecutable Emacs CFBundleGetInfoString - Emacs 23.2.94 Copyright (C) 2011 Free Software Foundation, Inc. + Emacs 23.3 Copyright (C) 2011 Free Software Foundation, Inc. CFBundleIconFile Emacs.icns CFBundleIdentifier @@ -566,7 +566,7 @@ along with GNU Emacs. If not, see . APPL CFBundleShortVersionString - 23.2.94 + 23.3 CFBundleSignature EMAx diff --git a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings b/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings index 02ad5911e8d..a2e48d47741 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings +++ b/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings @@ -1,6 +1,6 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Emacs"; -CFBundleShortVersionString = "Version 23.2.94"; -CFBundleGetInfoString = "Emacs version 23.2.94, NS Windowing"; +CFBundleShortVersionString = "Version 23.3"; +CFBundleGetInfoString = "Emacs version 23.3, NS Windowing"; NSHumanReadableCopyright = "Copyright (C) 2011 Free Software Foundation, Inc."; diff --git a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop b/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop index cf38bab8282..431106a0fa5 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop +++ b/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Encoding=UTF-8 Type=Application -Version=23.2.94 +Version=23.3 Categories=GNUstep Name=Emacs Comment=GNU Emacs for NeXT/Open/GNUstep and OS X diff --git a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist b/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist index 45472835d85..26847cced89 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist +++ b/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist @@ -2,7 +2,7 @@ ApplicationDescription = "GNU Emacs for GNUstep / OS X"; ApplicationIcon = emacs.tiff; ApplicationName = Emacs; - ApplicationRelease = "23.2.94"; + ApplicationRelease = "23.3"; Authors = ( "Adrian Robert (GNUstep)", "Christophe de Dinechin (MacOS X)", @@ -13,7 +13,7 @@ ); Copyright = "Copyright (C) 2011 Free Software Foundation, Inc."; CopyrightDescription = "Released under the GNU General Public License Version 3 or later"; - FullVersionID = "Emacs 23.2.94, NS Windowing"; + FullVersionID = "Emacs 23.3, NS Windowing"; NSExecutable = Emacs; NSIcon = emacs.tiff; NSPrincipalClass = NSApplication; diff --git a/nt/ChangeLog b/nt/ChangeLog index 84fc6001461..fe1fc62f46f 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2010-12-31 Eli Zaretskii * configure.bat (end): Unset environment variables used by this diff --git a/nt/emacs.rc b/nt/emacs.rc index d370bff1633..540781c2b8e 100644 --- a/nt/emacs.rc +++ b/nt/emacs.rc @@ -7,8 +7,8 @@ Emacs ICON icons\emacs.ico #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 23,2,94,0 - PRODUCTVERSION 23,2,94,0 + FILEVERSION 23,3,0,0 + PRODUCTVERSION 23,3,0,0 FILEFLAGSMASK 0x3FL #ifdef EMACSDEBUG FILEFLAGS 0x1L @@ -25,12 +25,12 @@ BEGIN BEGIN VALUE "CompanyName", "Free Software Foundation\0" VALUE "FileDescription", "GNU Emacs: The extensible self-documenting text editor\0" - VALUE "FileVersion", "23, 2, 94, 0\0" + VALUE "FileVersion", "23, 3, 0, 0\0" VALUE "InternalName", "Emacs\0" VALUE "LegalCopyright", "Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011\0" VALUE "OriginalFilename", "emacs.exe" VALUE "ProductName", "Emacs\0" - VALUE "ProductVersion", "23, 2, 94, 0\0" + VALUE "ProductVersion", "23, 3, 0, 0\0" VALUE "OLESelfRegister", "\0" END END diff --git a/nt/emacsclient.rc b/nt/emacsclient.rc index fc1e6b12b2b..42e0d422956 100644 --- a/nt/emacsclient.rc +++ b/nt/emacsclient.rc @@ -5,8 +5,8 @@ Emacs ICON icons\emacs.ico #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 23,2,94,0 - PRODUCTVERSION 23,2,94,0 + FILEVERSION 23,3,0,0 + PRODUCTVERSION 23,3,0,0 FILEFLAGSMASK 0x3FL #ifdef EMACSDEBUG FILEFLAGS 0x1L @@ -23,12 +23,12 @@ BEGIN BEGIN VALUE "CompanyName", "Free Software Foundation\0" VALUE "FileDescription", "GNU EmacsClient: Client for the extensible self-documenting text editor\0" - VALUE "FileVersion", "23, 2, 94, 0\0" + VALUE "FileVersion", "23, 3, 0, 0\0" VALUE "InternalName", "EmacsClient\0" VALUE "LegalCopyright", "Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011\0" VALUE "OriginalFilename", "emacsclientw.exe" VALUE "ProductName", "EmacsClient\0" - VALUE "ProductVersion", "23, 2, 94, 0\0" + VALUE "ProductVersion", "23, 3, 0, 0\0" VALUE "OLESelfRegister", "\0" END END diff --git a/oldXMenu/ChangeLog b/oldXMenu/ChangeLog index 58d76eabe39..f831e71c001 100644 --- a/oldXMenu/ChangeLog +++ b/oldXMenu/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2010-11-01 Elias Pipping (tiny change) Make Emacs compile with clang (bug#7309). diff --git a/src/ChangeLog b/src/ChangeLog index 0fdc151e540..7a46109c9b1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2011-02-22 Kenichi Handa * font.c (font_open_entity): Be sure to set scaled_pixel_size. diff --git a/test/ChangeLog b/test/ChangeLog index 0b0f88f45c9..284054fdf8e 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2011-02-28 Chong Yidong + + * Version 23.3 released. + 2010-05-07 Chong Yidong * Version 23.2 released. From 367c19e58bd4ccf47dd0ce018002b2ae4e12f949 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 11:43:58 -0800 Subject: [PATCH 002/383] * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. Add a FIXME comment, since the code still doesn't look right. --- src/ChangeLog | 4 ++++ src/xdisp.c | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index d0380e42e49..94ce2a9f6ce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-06 Paul Eggert + * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. + Add a FIXME comment, since the code still doesn't look right. + current_column: Now returns EMACS_INT, fixing some iftc. * bytecode.c (Fbyte_code): Don't cast current_column () to int. * cmds.c (internal_self_insert): Likewise. @@ -10,6 +13,7 @@ to int. * xdisp.c (redisplay_internal, redisplay_window, decode_mode_spec): Likewise. + * cmds.c (internal_self_insert): Declare locals to be EMACS_INT, not int or double, if they might contain a column number. * indent.c (current_column, Findent_to, indented_beyond_p): diff --git a/src/xdisp.c b/src/xdisp.c index 44cb7130119..44a317b5785 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -22292,7 +22292,13 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym) if (metrics_upper.width >= metrics_lower.width) lower_xoff = (width - metrics_lower.width) / 2; else - upper_xoff = (width - metrics_upper.width) / 2; + { + /* FIXME: This code doesn't look right. It formerly was + missing the "lower_xoff = 0;", which couldn't have + been right since it left lower_xoff uninitialized. */ + lower_xoff = 0; + upper_xoff = (width - metrics_upper.width) / 2; + } } /* +5 is for horizontal bars of a box plus 1-pixel spaces at From 9f36b9fd38fb4bde2ac4664f05a65e2dd973add2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 11:53:35 -0800 Subject: [PATCH 003/383] * xdisp.c (Fcurrent_bidi_paragraph_direction): Simplify slightly; this avoids a gcc -Wuninitialized diagnostic. --- src/ChangeLog | 2 ++ src/xdisp.c | 15 +++++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 94ce2a9f6ce..8582bf67e04 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. Add a FIXME comment, since the code still doesn't look right. + (Fcurrent_bidi_paragraph_direction): Simplify slightly; this + avoids a gcc -Wuninitialized diagnostic. current_column: Now returns EMACS_INT, fixing some iftc. * bytecode.c (Fbyte_code): Don't cast current_column () to int. diff --git a/src/xdisp.c b/src/xdisp.c index 44a317b5785..174312ccab3 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17912,16 +17912,13 @@ paragraphs, text begins at the right margin and is read from right to left. See also `bidi-paragraph-direction'. */) (Lisp_Object buffer) { - struct buffer *buf; - struct buffer *old; + struct buffer *buf = current_buffer; + struct buffer *old = buf; - if (NILP (buffer)) - buf = current_buffer; - else + if (! NILP (buffer)) { CHECK_BUFFER (buffer); buf = XBUFFER (buffer); - old = current_buffer; } if (NILP (BVAR (buf, bidi_display_reordering))) @@ -17938,8 +17935,7 @@ See also `bidi-paragraph-direction'. */) EMACS_INT bytepos = BUF_PT_BYTE (buf); int c; - if (buf != current_buffer) - set_buffer_temp (buf); + set_buffer_temp (buf); /* bidi_paragraph_init finds the base direction of the paragraph by searching forward from paragraph start. We need the base direction of the current or _previous_ paragraph, so we need @@ -17967,8 +17963,7 @@ See also `bidi-paragraph-direction'. */) itb.paragraph_dir = NEUTRAL_DIR; bidi_paragraph_init (NEUTRAL_DIR, &itb, 1); - if (buf != current_buffer) - set_buffer_temp (old); + set_buffer_temp (old); switch (itb.paragraph_dir) { case L2R: From 78f5433f6ba4f787c766342b6ac68f79425bc685 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 6 Mar 2011 21:11:19 +0100 Subject: [PATCH 004/383] doc/lispref/makefile.w32-in (srcs): Add package.texi. --- doc/lispref/ChangeLog | 4 ++++ doc/lispref/makefile.w32-in | 1 + 2 files changed, 5 insertions(+) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5d28a90136e..4129b37986f 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2011-03-06 Juanma Barranquero + + * makefile.w32-in (srcs): Add package.texi. + 2011-03-06 Chong Yidong * package.texi (Packaging, Packaging Basics, Simple Packages) diff --git a/doc/lispref/makefile.w32-in b/doc/lispref/makefile.w32-in index e0bcd21f2c0..d074dd22e24 100644 --- a/doc/lispref/makefile.w32-in +++ b/doc/lispref/makefile.w32-in @@ -87,6 +87,7 @@ srcs = \ $(srcdir)/numbers.texi \ $(srcdir)/objects.texi \ $(srcdir)/os.texi \ + $(srcdir)/package.texi \ $(srcdir)/positions.texi \ $(srcdir)/processes.texi \ $(srcdir)/searching.texi \ From dba6549815e211c820a249cbfe857a92c7418896 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 12:15:10 -0800 Subject: [PATCH 005/383] * xdisp.c (display_line): Mark variables that gcc -Wuninitialized cannot deduce are never used uninitialized. * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c which in turn is copied from coreutils. --- src/ChangeLog | 4 ++++ src/lisp.h | 7 +++++++ src/xdisp.c | 16 +++++++++------- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8582bf67e04..23bf646f742 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,10 @@ Add a FIXME comment, since the code still doesn't look right. (Fcurrent_bidi_paragraph_direction): Simplify slightly; this avoids a gcc -Wuninitialized diagnostic. + (display_line): Mark variables that gcc -Wuninitialized cannot + deduce are never used uninitialized. + * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c + which in turn is copied from coreutils. current_column: Now returns EMACS_INT, fixing some iftc. * bytecode.c (Fbyte_code): Don't cast current_column () to int. diff --git a/src/lisp.h b/src/lisp.h index e38d6a8ec3c..719d72d28a4 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3524,6 +3524,13 @@ extern void init_system_name (void); && (circular_list_error ((list)), 1))) \ : 0))) +/* Use this to suppress gcc's `...may be used before initialized' warnings. */ +#ifdef lint +# define IF_LINT(Code) Code +#else +# define IF_LINT(Code) /* empty */ +#endif + /* The ubiquitous min and max macros. */ #ifdef max diff --git a/src/xdisp.c b/src/xdisp.c index 174312ccab3..180c65d18ed 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -17231,14 +17231,16 @@ display_line (struct it *it) struct glyph_row *row = it->glyph_row; Lisp_Object overlay_arrow_string; struct it wrap_it; - int may_wrap = 0, wrap_x; - int wrap_row_used = -1, wrap_row_ascent, wrap_row_height; - int wrap_row_phys_ascent, wrap_row_phys_height; - int wrap_row_extra_line_spacing; - EMACS_INT wrap_row_min_pos, wrap_row_min_bpos; - EMACS_INT wrap_row_max_pos, wrap_row_max_bpos; + int may_wrap = 0, wrap_x IF_LINT (= 0); + int wrap_row_used = -1; + int wrap_row_ascent IF_LINT (= 0), wrap_row_height IF_LINT (= 0); + int wrap_row_phys_ascent IF_LINT (= 0), wrap_row_phys_height IF_LINT (= 0); + int wrap_row_extra_line_spacing IF_LINT (= 0); + EMACS_INT wrap_row_min_pos IF_LINT (= 0), wrap_row_min_bpos IF_LINT (= 0); + EMACS_INT wrap_row_max_pos IF_LINT (= 0), wrap_row_max_bpos IF_LINT (= 0); int cvpos; - EMACS_INT min_pos = ZV + 1, min_bpos, max_pos = 0, max_bpos; + EMACS_INT min_pos = ZV + 1, max_pos = 0; + EMACS_INT min_bpos IF_LINT (= 0), max_bpos IF_LINT (= 0); /* We always start displaying at hpos zero even if hscrolled. */ xassert (it->hpos == 0 && it->current_x == 0); From 5c69cb2ce354d499609c202ff3ad48240202bb15 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 6 Mar 2011 15:19:39 -0500 Subject: [PATCH 006/383] Usability improvements to commands in package-x.el. * lisp/emacs-lisp/package-x.el (package-archive-upload-base): Make it a defcustom. (package--update-file): Doc fix. Accept relative file names. (package--archive-contents-from-file): Remove the argument, since it's necessarily always "archive-contents". (package-maint-add-news-item): Pass relative file name args to package--update-file. (package-upload-buffer-internal): Prompt for a destination if package-archive-upload-base is invalid. Create the directory if it does not exist. (package-upload-buffer, package-upload-file): Doc fix. --- lisp/ChangeLog | 14 ++ lisp/emacs-lisp/package-x.el | 241 ++++++++++++++++++++--------------- 2 files changed, 153 insertions(+), 102 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e4d402afa76..5e9e134e746 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2011-03-06 Chong Yidong + + * emacs-lisp/package-x.el (package-archive-upload-base): Make it a + defcustom. + (package--update-file): Doc fix. Accept relative file names. + (package--archive-contents-from-file): Remove the argument, since + it's necessarily always "archive-contents". + (package-maint-add-news-item): Pass relative file name args to + package--update-file. + (package-upload-buffer-internal): Prompt for a destination if + package-archive-upload-base is invalid. Create the directory if + it does not exist. + (package-upload-buffer, package-upload-file): Doc fix. + 2011-03-06 Chong Yidong * isearch.el (isearch-mode-map): Bind C-y to isearch-yank-kill, diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el index 61f23abf0a7..4de95f65702 100644 --- a/lisp/emacs-lisp/package-x.el +++ b/lisp/emacs-lisp/package-x.el @@ -27,21 +27,41 @@ ;;; Commentary: -;; This file currently contains parts of the package system most -;; people won't need, such as package uploading. +;; This file currently contains parts of the package system that many +;; won't need, such as package uploading. + +;; To upload to an archive, first set `package-archive-upload-base' to +;; some desired directory. For testing purposes, you can specify any +;; directory you want, but if you want the archive to be accessible to +;; others via http, this is typically a directory in the /var/www tree +;; (possibly one on a remote machine, accessed via Tramp). + +;; Then call M-x package-upload-file, which prompts for a file to +;; upload. Alternatively, M-x package-upload-buffer uploads the +;; current buffer, if it's visiting a package file. + +;; Once a package is uploaded, users can access it via the Package +;; Menu, by adding the archive to `package-archives'. ;;; Code: (require 'package) (defvar gnus-article-buffer) -;; Note that this only works if you have the password, which you -;; probably don't :-). -(defvar package-archive-upload-base nil - "Base location for uploading to package archive.") +(defcustom package-archive-upload-base "/path/to/archive" + "The base location of the archive to which packages are uploaded. +This should be an absolute directory name. If the archive is on +another machine, you may specify a remote name in the usual way, +e.g. \"/ssh:foo@example.com:/var/www/packages/\". +See Info node `(emacs)Remote Files'. + +Unlike `package-archives', you can't specify a HTTP URL." + :type 'directory + :group 'package + :version "24.1") (defvar package-update-news-on-upload nil - "Whether package upload should also update NEWS and RSS feeds.") + "Whether uploading a package should also update NEWS and RSS feeds.") (defun package--encode (string) "Encode a string by replacing some characters with XML entities." @@ -75,13 +95,18 @@ title " - " (package--encode text) " \n")) -(defun package--update-file (file location text) +(defun package--update-file (file tag text) + "Update the package archive file named FILE. +FILE should be relative to `package-archive-upload-base'. +TAG is a string that can be found within the file; TEXT is +inserted after its first occurrence in the file." + (setq file (expand-file-name file package-archive-upload-base)) (save-excursion (let ((old-buffer (find-buffer-visiting file))) (with-current-buffer (let ((find-file-visit-truename t)) (or old-buffer (find-file-noselect file))) (goto-char (point-min)) - (search-forward location) + (search-forward tag) (forward-line) (insert text) (let ((file-precious-flag t)) @@ -105,30 +130,31 @@ Return the file contents, as a string, or nil if unsuccessful." (buffer-substring-no-properties (point-min) (point-max))) (kill-buffer buffer)))))) -(defun package--archive-contents-from-file (file) - "Parse the given archive-contents file." - (if (not (file-exists-p file)) - ;; no existing archive-contents, possibly a new ELPA repo. - (list package-archive-version) - (let ((dont-kill (find-buffer-visiting file))) - (with-current-buffer (let ((find-file-visit-truename t)) - (find-file-noselect file)) - (prog1 - (package-read-from-string - (buffer-substring-no-properties (point-min) (point-max))) - (unless dont-kill - (kill-buffer (current-buffer)))))))) +(defun package--archive-contents-from-file () + "Parse the archive-contents at `package-archive-upload-base'" + (let ((file (expand-file-name "archive-contents" + package-archive-upload-base))) + (if (not (file-exists-p file)) + ;; No existing archive-contents means a new archive. + (list package-archive-version) + (let ((dont-kill (find-buffer-visiting file))) + (with-current-buffer (let ((find-file-visit-truename t)) + (find-file-noselect file)) + (prog1 + (package-read-from-string + (buffer-substring-no-properties (point-min) (point-max))) + (unless dont-kill + (kill-buffer (current-buffer))))))))) (defun package-maint-add-news-item (title description archive-url) - "Add a news item to the ELPA web pages. + "Add a news item to the webpages associated with the package archive. TITLE is the title of the news item. -DESCRIPTION is the text of the news item. -You need administrative access to ELPA to use this." +DESCRIPTION is the text of the news item." (interactive "sTitle: \nsText: ") - (package--update-file (concat package-archive-upload-base "elpa.rss") + (package--update-file "elpa.rss" "" (package--make-rss-entry title description archive-url)) - (package--update-file (concat package-archive-upload-base "news.html") + (package--update-file "news.html" "New entries go here" (package--make-html-entry title description))) @@ -144,8 +170,8 @@ PKG-INFO is the package info, see `package-buffer-info'. EXTENSION is the file extension, a string. It can be either \"el\" or \"tar\". -The variable `package-archive-upload-base' specifies the upload -destination. If this is nil, signal an error. +The upload destination is given by `package-archive-upload-base'. +If its value is invalid, prompt for a directory. Optional arg ARCHIVE-URL is the URL of the destination archive. If it is non-nil, compute the new \"archive-contents\" file @@ -156,85 +182,97 @@ addition, if `package-update-news-on-upload' is non-nil, call If ARCHIVE-URL is nil, compute the new \"archive-contents\" file from the \"archive-contents\" at `package-archive-upload-base', if it exists." - (unless package-archive-upload-base - (error "No destination specified in `package-archive-upload-base'")) - (save-excursion - (save-restriction - (let* ((file-type (cond - ((equal extension "el") 'single) - ((equal extension "tar") 'tar) - (t (error "Unknown extension `%s'" extension)))) - (file-name (aref pkg-info 0)) - (pkg-name (intern file-name)) - (requires (aref pkg-info 1)) - (desc (if (string= (aref pkg-info 2) "") - (read-string "Description of package: ") - (aref pkg-info 2))) - (pkg-version (aref pkg-info 3)) - (commentary (aref pkg-info 4)) - (split-version (version-to-list pkg-version)) - (pkg-buffer (current-buffer))) + (let ((package-archive-upload-base package-archive-upload-base)) + ;; Check if `package-archive-upload-base' is valid. + (when (or (not (stringp package-archive-upload-base)) + (eq package-archive-upload-base + (car-safe + (get 'package-archive-upload-base 'standard-value)))) + (setq package-archive-upload-base + (read-directory-name + "Base directory for package archive: "))) + (unless (file-directory-p package-archive-upload-base) + (if (y-or-n-p (format "%s does not exist; create it? " + package-archive-upload-base)) + (make-directory package-archive-upload-base t) + (error "Aborted"))) + (save-excursion + (save-restriction + (let* ((file-type (cond + ((equal extension "el") 'single) + ((equal extension "tar") 'tar) + (t (error "Unknown extension `%s'" extension)))) + (file-name (aref pkg-info 0)) + (pkg-name (intern file-name)) + (requires (aref pkg-info 1)) + (desc (if (string= (aref pkg-info 2) "") + (read-string "Description of package: ") + (aref pkg-info 2))) + (pkg-version (aref pkg-info 3)) + (commentary (aref pkg-info 4)) + (split-version (version-to-list pkg-version)) + (pkg-buffer (current-buffer))) - ;; Get archive-contents from ARCHIVE-URL if it's non-nil, or - ;; from `package-archive-upload-base' otherwise. - (let ((contents (or (package--archive-contents-from-url archive-url) - (package--archive-contents-from-file - (concat package-archive-upload-base - "archive-contents")))) - (new-desc (vector split-version requires desc file-type))) - (if (> (car contents) package-archive-version) - (error "Unrecognized archive version %d" (car contents))) - (let ((elt (assq pkg-name (cdr contents)))) - (if elt - (if (version-list-<= split-version - (package-desc-vers (cdr elt))) - (error "New package has smaller version: %s" pkg-version) - (setcdr elt new-desc)) - (setq contents (cons (car contents) - (cons (cons pkg-name new-desc) - (cdr contents)))))) + ;; Get archive-contents from ARCHIVE-URL if it's non-nil, or + ;; from `package-archive-upload-base' otherwise. + (let ((contents (or (package--archive-contents-from-url archive-url) + (package--archive-contents-from-file))) + (new-desc (vector split-version requires desc file-type))) + (if (> (car contents) package-archive-version) + (error "Unrecognized archive version %d" (car contents))) + (let ((elt (assq pkg-name (cdr contents)))) + (if elt + (if (version-list-<= split-version + (package-desc-vers (cdr elt))) + (error "New package has smaller version: %s" pkg-version) + (setcdr elt new-desc)) + (setq contents (cons (car contents) + (cons (cons pkg-name new-desc) + (cdr contents)))))) - ;; Now CONTENTS is the updated archive contents. Upload - ;; this and the package itself. For now we assume ELPA is - ;; writable via file primitives. - (let ((print-level nil) - (print-length nil)) - (write-region (concat (pp-to-string contents) "\n") - nil - (concat package-archive-upload-base - "archive-contents"))) + ;; Now CONTENTS is the updated archive contents. Upload + ;; this and the package itself. For now we assume ELPA is + ;; writable via file primitives. + (let ((print-level nil) + (print-length nil)) + (write-region (concat (pp-to-string contents) "\n") + nil + (expand-file-name "archive-contents" + package-archive-upload-base))) - ;; If there is a commentary section, write it. - (when commentary - (write-region commentary nil - (concat package-archive-upload-base - (symbol-name pkg-name) "-readme.txt"))) + ;; If there is a commentary section, write it. + (when commentary + (write-region commentary nil + (expand-file-name + (concat (symbol-name pkg-name) "-readme.txt") + package-archive-upload-base))) - (set-buffer pkg-buffer) - (write-region (point-min) (point-max) - (concat package-archive-upload-base - file-name "-" pkg-version - "." extension) - nil nil nil 'excl) + (set-buffer pkg-buffer) + (write-region (point-min) (point-max) + (expand-file-name + (concat file-name "-" pkg-version "." extension) + package-archive-upload-base) + nil nil nil 'excl) - ;; Write a news entry. - (and package-update-news-on-upload - archive-url - (package--update-news (concat file-name "." extension) - pkg-version desc archive-url)) + ;; Write a news entry. + (and package-update-news-on-upload + archive-url + (package--update-news (concat file-name "." extension) + pkg-version desc archive-url)) - ;; special-case "package": write a second copy so that the - ;; installer can easily find the latest version. - (if (string= file-name "package") - (write-region (point-min) (point-max) - (concat package-archive-upload-base - file-name "." extension) - nil nil nil 'ask))))))) + ;; special-case "package": write a second copy so that the + ;; installer can easily find the latest version. + (if (string= file-name "package") + (write-region (point-min) (point-max) + (expand-file-name + (concat file-name "." extension) + package-archive-upload-base) + nil nil nil 'ask)))))))) (defun package-upload-buffer () "Upload the current buffer as a single-file Emacs Lisp package. -The variable `package-archive-upload-base' specifies the upload -destination." +If `package-archive-upload-base' does not specify a valid upload +destination, prompt for one." (interactive) (save-excursion (save-restriction @@ -247,9 +285,8 @@ destination." Interactively, prompt for FILE. The package is considered a single-file package if FILE ends in \".el\", and a multi-file package if FILE ends in \".tar\". - -The variable `package-archive-upload-base' specifies the upload -destination." +If `package-archive-upload-base' does not specify a valid upload +destination, prompt for one." (interactive "fPackage file name: ") (with-temp-buffer (insert-file-contents-literally file) From 2b0787b344da7aff66e36fa35c4b73eddf980e80 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 6 Mar 2011 15:55:52 -0500 Subject: [PATCH 007/383] * lisp/progmodes/gud.el (gdb-script-syntax-propertize-function): Don't change the syntax of a \n that closes a comment. Fixes: debbugs:8169 --- lisp/ChangeLog | 9 +++++++-- lisp/progmodes/gud.el | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5e9e134e746..6b7768fe93c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-06 Stefan Monnier + + * progmodes/gud.el (gdb-script-syntax-propertize-function): + Don't change the syntax of a \n that closes a comment (bug#8169). + 2011-03-06 Chong Yidong * emacs-lisp/package-x.el (package-archive-upload-base): Make it a @@ -25,8 +30,8 @@ 2011-03-06 Jay Belanger - * calc/calc-ext.el (calc-init-extensions): Rename - calc-logunits-dblevel and calc-logunits-nplevel to calc-dblevel + * calc/calc-ext.el (calc-init-extensions): + Rename calc-logunits-dblevel and calc-logunits-nplevel to calc-dblevel and calc-nplevel, respectively. Add keybindings for calc-spn, calc-midi and calc-freq. Add autoloads for calcFunc-spn, calcFunc-midi, calcFunc-freq, calc-spn, calc-midi and calc-freq. diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 53918b903ee..47cbdf19ed2 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3127,7 +3127,9 @@ class of the file (using s to separate nested class ids)." ("^document\\s-.*\\(\n\\)" (1 "< b")) ("^end\\(\\>\\)" (1 (ignore - (unless (eq (match-beginning 0) (point-min)) + (when (and (> (match-beginning 0) (point-min)) + (eq 1 (nth 7 (save-excursion + (syntax-ppss (1- (match-beginning 0))))))) ;; We change the \n in front, which is more difficult, but results ;; in better highlighting. If the doc is empty, the single \n is ;; both the beginning and the end of the docstring, which can't be From 0b3cecebd530db6eab09aa3338eafc97b03446ff Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 6 Mar 2011 16:52:17 -0500 Subject: [PATCH 008/383] Document package archives in the Lisp manual. * doc/lispref/package.texi: Update index keywords. (Package Archives): New node contents. Document package-x.el. --- doc/lispref/ChangeLog | 5 ++ doc/lispref/package.texi | 99 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 95 insertions(+), 9 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 4129b37986f..32d13b57ffd 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-03-06 Chong Yidong + + * package.texi: Update index keywords. + (Package Archives): New node contents. Document package-x.el. + 2011-03-06 Juanma Barranquero * makefile.w32-in (srcs): Add package.texi. diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 4de44fe165d..62fbc2a9a07 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -5,7 +5,8 @@ @setfilename ../../info/package @node Packaging, Antinews, System Interface, Top @chapter Preparing Lisp code for distribution -@cindex packaging +@cindex package +@cindex Lisp package Emacs provides a standard way to distribute Emacs Lisp code to users. A @dfn{package} is a collection of one or more files, @@ -24,8 +25,11 @@ put it in a @dfn{package archive} for others to download. @node Packaging Basics @section Packaging Basics -@cindex packaging basics @cindex package attributes +@cindex package name +@cindex package version +@cindex dependencies +@cindex package dependencies A package is either a @dfn{simple package} or a @dfn{multi-file package}. A simple package is stored in a package archive as a single @@ -69,6 +73,7 @@ installing this package also automatically installs its dependencies; if any dependency cannot be found, the package cannot be installed. @end table +@cindex content directory, package Installing a package, either via the Package Menu, or via the command @code{package-install-file}, creates a subdirectory of @code{package-user-dir} named @file{@var{name}-@var{version}}, where @@ -78,6 +83,7 @@ package's @dfn{content directory}. It is where Emacs puts the package's contents (the single Lisp file for a simple package, or the files extracted from a multi-file package). +@cindex package autoloads Emacs then searches every Lisp file in the content directory for autoload magic comments (@pxref{Autoload}). These autoload definitions are saved to a file named @file{@var{name}-autoloads.el} @@ -98,7 +104,8 @@ typically called to begin using the package. @node Simple Packages @section Simple Packages -@cindex single file packages +@cindex single file package +@cindex simple package A simple package consists of a single Emacs Lisp source file. The file must conform to the Emacs Lisp library header conventions @@ -160,7 +167,7 @@ single-file package to a package archive. @node Multi-file Packages @section Multi-file Packages -@cindex multi-file packages +@cindex multi-file package A multi-file package is less convenient to create than a single-file package, but it offers more features: it can include multiple Emacs @@ -206,10 +213,10 @@ file is used as the long description. If the content directory contains a file named @file{dir}, this is assumed to be an Info directory file made with @command{install-info}. @xref{Invoking install-info, Invoking install-info, Invoking -install-info, texinfo, Texinfo}. The Info files listed in this -directory file should also be present in the content directory. In -this case, Emacs will automatically add the content directory to -@code{Info-directory-list} when the package is activated. +install-info, texinfo, Texinfo}. The relevant Info files should also +be present in the content directory. In this case, Emacs will +automatically add the content directory to @code{Info-directory-list} +when the package is activated. Do not include any @file{.elc} files in the package. Those are created when the package is installed. Note that there is no way to @@ -234,5 +241,79 @@ variable @code{load-file-name} (@pxref{Loading}). Here is an example: @node Package Archives @section Creating and Maintaining Package Archives +@cindex package archive -To be done. + Via the Package Menu, users may download packages from @dfn{package +archives}. Such archives are specified by the variable +@code{package-archives}, whose default value contains a single entry: +the archive hosted by the GNU project at @url{elpa.gnu.org}. This +section describes how to set up and maintain a package archive. + +@cindex base location, package archive +@defopt package-archives +The value of this variable is an alist of package archives recognized +by the Emacs package manager. + +Each alist element corresponds to one archive, and should have the +form @code{(@var{id} . @var{location})}, where @var{id} is the name of +the archive (a string) and @var{location} is its @dfn{base location} +(a string). + +If the base location starts with @samp{http:}, it is treated as a HTTP +URL, and packages are downloaded from this archive via HTTP (as is the +case for the default GNU archive). + +Otherwise, the base location should be a directory name. In this +case, Emacs retrieves packages from this archive via ordinary file +access. Such ``local'' archives are mainly useful for testing. +@end defopt + + A package archive is simply a directory in which the package files, +and associated files, are stored. If you want the archive to be +reachable via HTTP, this directory must be accessible to a web server. +How to accomplish this is beyond the scope of this manual. + + A convenient way to set up and update a package archive is via the +@code{package-x} library. This is included with Emacs, but not loaded +by default; type @kbd{M-x load-library @kbd{RET} package-x @kbd{RET}} +to load it, or add @code{(require 'package-x)} to your init file. +@xref{Lisp Libraries,, Lisp Libraries, emacs, The GNU Emacs Manual}. +Once loaded, you can make use of the following: + +@defopt package-archive-upload-base +The value of this variable is the base location of a package archive, +as a directory name. The commands in the @code{package-x} library +will use this base location. + +The directory name should be absolute. You may specify a remote name, +such as @file{/ssh:foo@@example.com:/var/www/packages/}, if the +package archive is on a different machine. @xref{Remote Files,, +Remote Files, emacs, The GNU Emacs Manual}. +@end defopt + +@deffn Command package-upload-file filename +This command prompts for @var{filename}, a file name, and uploads that +file to @code{package-archive-upload-base}. The file must be either a +simple package (a @file{.el} file) or a multi-file package (a +@file{.tar} file); otherwise, an error is raised. The package +attributes are automatically extracted, and the archive's contents +list is updated with this information. + +If @code{package-archive-upload-base} does not specify a valid +directory, the function prompts interactively for one. If the +directory does not exist, it is created. The directory need not have +any initial contents (i.e., you can use this command to populate an +initially empty archive). +@end deffn + +@deffn Command package-upload-buffer +This command is similar to @code{package-upload-file}, but instead of +prompting for a package file, it uploads the contents of the current +buffer. The current buffer must be visiting a simple package (a +@file{.el} file) or a multi-file package (a @file{.tar} file); +otherwise, an error is raised. +@end deffn + +@noindent +After you create an archive, remember that it is not accessible in the +Package Menu interface unless it is in @code{package-archives}. From 70739cbeb98fae41f27fc2e4fc34670c8ec39bb7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 14:04:59 -0800 Subject: [PATCH 009/383] xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Mark variables that gcc -Wuninitialized cannot deduce are never used uninitialized. --- src/ChangeLog | 5 +++-- src/xdisp.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 23bf646f742..ff8c5fd027d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,8 +4,9 @@ Add a FIXME comment, since the code still doesn't look right. (Fcurrent_bidi_paragraph_direction): Simplify slightly; this avoids a gcc -Wuninitialized diagnostic. - (display_line): Mark variables that gcc -Wuninitialized cannot - deduce are never used uninitialized. + (display_line, BUILD_COMPOSITE_GLYPH_STRING): Mark variables that + gcc -Wuninitialized cannot deduce are never used uninitialized. + * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c which in turn is copied from coreutils. diff --git a/src/xdisp.c b/src/xdisp.c index 180c65d18ed..0f8fd3d0477 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21089,7 +21089,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p) int cmp_id = (row)->glyphs[area][START].u.cmp.id; \ struct composition *cmp = composition_table[cmp_id]; \ XChar2b *char2b; \ - struct glyph_string *first_s; \ + struct glyph_string *first_s IF_LINT (= NULL); \ int n; \ \ char2b = (XChar2b *) alloca ((sizeof *char2b) * cmp->glyph_len); \ From 0e086e8f7f79c0473a00153ba70c7febab7d0712 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 14:11:02 -0800 Subject: [PATCH 010/383] xdisp.c (draw_glyphs): Mark variables that gcc -Wuninitialized cannot deduce are never used uninitialized. --- src/ChangeLog | 5 +++-- src/xdisp.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ff8c5fd027d..5f7cc98ee2a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,8 +4,9 @@ Add a FIXME comment, since the code still doesn't look right. (Fcurrent_bidi_paragraph_direction): Simplify slightly; this avoids a gcc -Wuninitialized diagnostic. - (display_line, BUILD_COMPOSITE_GLYPH_STRING): Mark variables that - gcc -Wuninitialized cannot deduce are never used uninitialized. + (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs): + Mark variables that gcc -Wuninitialized cannot deduce are never + used uninitialized. * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c which in turn is copied from coreutils. diff --git a/src/xdisp.c b/src/xdisp.c index 0f8fd3d0477..7d6190ed8ce 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21293,7 +21293,8 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row, { struct glyph_string *h, *t; Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); - int mouse_beg_col, mouse_end_col, check_mouse_face = 0; + int mouse_beg_col IF_LINT (= 0), mouse_end_col IF_LINT (= 0); + int check_mouse_face = 0; int dummy_x = 0; /* If mouse highlighting is on, we may need to draw adjacent From 44a3a108430ef79370ad2957a5d71d4cd040962b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 14:22:56 -0800 Subject: [PATCH 011/383] xdisp.c (draw_glyphs): Mark variables that gcc -Wuninitialized cannot deduce are never used uninitialized. --- src/ChangeLog | 4 ++-- src/xdisp.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5f7cc98ee2a..c0e350e45f9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,8 +5,8 @@ (Fcurrent_bidi_paragraph_direction): Simplify slightly; this avoids a gcc -Wuninitialized diagnostic. (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs): - Mark variables that gcc -Wuninitialized cannot deduce are never - used uninitialized. + (note_mouse_highlight): Mark variables that gcc -Wuninitialized + does not deduce are never used uninitialized. * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c which in turn is copied from coreutils. diff --git a/src/xdisp.c b/src/xdisp.c index 7d6190ed8ce..f7f887f7850 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -25457,7 +25457,8 @@ note_mouse_highlight (struct frame *f, int x, int y) { /* The mouse-highlighting, if any, comes from an overlay or text property in the buffer. */ - Lisp_Object buffer, cover_string; + Lisp_Object buffer IF_LINT (= Qnil); + Lisp_Object cover_string IF_LINT (= Qnil); if (STRINGP (object)) { From 032f16205d3fc06ecafa26382745b49985dd124b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 14:34:54 -0800 Subject: [PATCH 012/383] * xmenu.c (menu_highlight_callback): Now static. --- src/ChangeLog | 2 ++ src/xmenu.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c0e350e45f9..02d6ec1ae9e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-06 Paul Eggert + * xmenu.c (menu_highlight_callback): Now static. + * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. Add a FIXME comment, since the code still doesn't look right. (Fcurrent_bidi_paragraph_direction): Simplify slightly; this diff --git a/src/xmenu.c b/src/xmenu.c index 934db0f0406..750dad6da17 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -723,7 +723,7 @@ show_help_event (FRAME_PTR f, xt_or_gtk_widget widget, Lisp_Object help) unhighlighting. */ #ifdef USE_GTK -void +static void menu_highlight_callback (GtkWidget *widget, gpointer call_data) { xg_menu_item_cb_data *cb_data; @@ -742,7 +742,7 @@ menu_highlight_callback (GtkWidget *widget, gpointer call_data) show_help_event (cb_data->cl_data->f, widget, help); } #else -void +static void menu_highlight_callback (Widget widget, LWLIB_ID id, void *call_data) { struct frame *f; From 9d66f88eb9f67c5484abb4000e2d5e6acf34a795 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 14:36:06 -0800 Subject: [PATCH 013/383] * xmenu.c (set_frame_menubar): Remove unused local. --- src/ChangeLog | 1 + src/xmenu.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 02d6ec1ae9e..1ca428fa685 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-06 Paul Eggert * xmenu.c (menu_highlight_callback): Now static. + (set_frame_menubar): Remove unused local. * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. Add a FIXME comment, since the code still doesn't look right. diff --git a/src/xmenu.c b/src/xmenu.c index 750dad6da17..c79db086df3 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1175,8 +1175,6 @@ set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) } else { - GtkWidget *wvbox = f->output_data.x->vbox_widget; - menubar_widget = xg_create_widget ("menubar", "menubar", f, first_wv, G_CALLBACK (menubar_selection_callback), From ef272f1fc10a4f8464c886ccc02ea67b2c3b2769 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 6 Mar 2011 18:19:25 -0500 Subject: [PATCH 014/383] Revert incorrect logic in 2011-03-06T07:50:01Z!eggert@cs.ucla.edu. * src/xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 change. --- src/ChangeLog | 5 +++++ src/xdisp.c | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a96edcdfdca..d7131096995 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-06 Chong Yidong + + * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 + change. + 2011-03-06 Paul Eggert current_column: Now returns EMACS_INT, fixing some iftc diff --git a/src/xdisp.c b/src/xdisp.c index 44cb7130119..e62b491ad32 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13697,6 +13697,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) int buffer_unchanged_p = 0; int temp_scroll_step = 0; int count = SPECPDL_INDEX (); + int rc; int centering_position = -1; int last_line_misfit = 0; EMACS_INT beg_unchanged, end_unchanged; @@ -14008,15 +14009,12 @@ redisplay_window (Lisp_Object window, int just_this_one_p) /* Handle case where text has not changed, only point, and it has not moved off the frame, and we are not retrying after hscroll. (current_matrix_up_to_date_p is nonzero when retrying.) */ - if (current_matrix_up_to_date_p) + if (current_matrix_up_to_date_p + && (rc = try_cursor_movement (window, startp, &temp_scroll_step), + rc != CURSOR_MOVEMENT_CANNOT_BE_USED)) { - int rc = try_cursor_movement (window, startp, &temp_scroll_step); - switch (rc) { - case CURSOR_MOVEMENT_CANNOT_BE_USED: - break; - case CURSOR_MOVEMENT_SUCCESS: used_current_matrix_p = 1; goto done; From c6678f2916c22cd3b16232dc941f318c894ef56e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 7 Mar 2011 00:20:23 -0500 Subject: [PATCH 015/383] Revert 2010-05-25T15:54:53Z!juri@jurta.org; regenerate release logs. * lisp/progmodes/cc-cmds.el (c-beginning-of-statement): Revert 2011-01-31 change. --- ChangeLog | 2 +- admin/ChangeLog | 2 +- doc/emacs/ChangeLog | 2 +- doc/lispintro/ChangeLog | 2 +- doc/lispref/ChangeLog | 2 +- doc/man/ChangeLog | 2 +- doc/misc/ChangeLog | 2 +- etc/ChangeLog | 2 +- leim/ChangeLog | 2 +- lib-src/ChangeLog | 2 +- lisp/ChangeLog | 7 ++++++- lisp/cedet/ChangeLog | 2 +- lisp/erc/ChangeLog | 2 +- lisp/mh-e/ChangeLog | 2 +- lisp/org/ChangeLog | 2 +- lisp/progmodes/cc-cmds.el | 31 +++++++++++-------------------- lisp/url/ChangeLog | 2 +- lwlib/ChangeLog | 2 +- msdos/ChangeLog | 2 +- nextstep/ChangeLog | 2 +- nt/ChangeLog | 2 +- oldXMenu/ChangeLog | 2 +- src/ChangeLog | 2 +- test/ChangeLog | 2 +- 24 files changed, 39 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c70bf296a8..4b3dcc3af64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/admin/ChangeLog b/admin/ChangeLog index 741902d3249..39a8a8f57d5 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 73e2aca30f0..69d3e03209c 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index 50566340701..70accbc0669 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index e91cf93e3f0..a52a8e73dd1 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog index 0c7079b2913..394d580c1c9 100644 --- a/doc/man/ChangeLog +++ b/doc/man/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 122a9ae2920..c0bd2f2778c 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/etc/ChangeLog b/etc/ChangeLog index 24e6e9cfc53..6e5bb392cc8 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/leim/ChangeLog b/leim/ChangeLog index c9d7b437f27..03ffab98220 100644 --- a/leim/ChangeLog +++ b/leim/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index c6d9fa73e53..73a63eeaec4 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 20ed72b2ce6..6d711568fea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,12 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. +2011-03-07 Chong Yidong + + * progmodes/cc-cmds.el (c-beginning-of-statement): Revert + 2011-01-31 change. + 2011-02-26 Eli Zaretskii * international/mule-cmds.el (set-default-coding-systems): Use the diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 2f34afdb112..2d0cbb8159b 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 000d48e5198..9e467f4cc25 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index a983bca8e7a..1c07be301b1 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index db2d0e009c0..7b5f9fc6a15 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 3f719aedb62..4deb5ca6afe 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -2458,15 +2458,13 @@ function does not require the declaration to contain a brace block." (goto-char last) (throw 'done '(nil . nil))) - ;; Stop if we encounter a preprocessor line. Continue if we - ;; hit a naked # - ((and c-opt-cpp-prefix - (not macro-end) + ;; Stop if we encounter a preprocessor line. + ((and (not macro-end) (eq (char-after) ?#) (= (point) (c-point 'boi))) - (if (= (point) here) ; Not a macro, therefore naked #. - (forward-char) - (throw 'done '(t . macro-boundary)))) + (goto-char last) + ;(throw 'done (cons (eq (point) here) 'macro-boundary))) ; Changed 2003/3/26 + (throw 'done '(t . macro-boundary))) ;; Stop after a ';', '}', or "};" ((looking-at ";\\|};?") @@ -2582,19 +2580,12 @@ be more \"DWIM:ey\"." ;; Are we about to move backwards into or out of a ;; preprocessor command? If so, locate its beginning. (when (eq (cdr res) 'macro-boundary) - (setq macro-fence - (save-excursion - (if macro-fence - (progn - (end-of-line) - (and (not (eobp)) - (progn (c-skip-ws-forward) - (c-beginning-of-macro)) - (progn (c-end-of-macro) - (point)))) - (and (not (eobp)) - (c-beginning-of-macro) - (progn (c-end-of-macro) (point))))))) + (save-excursion + (beginning-of-line) + (setq macro-fence + (and (not (bobp)) + (progn (c-skip-ws-backward) (c-beginning-of-macro)) + (point))))) ;; Are we about to move backwards into a literal? (when (memq (cdr res) '(macro-boundary literal)) (setq range (c-ascertain-preceding-literal))) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 3b049a07a50..dc98640960b 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/lwlib/ChangeLog b/lwlib/ChangeLog index febd45b37f1..5aa35f71446 100644 --- a/lwlib/ChangeLog +++ b/lwlib/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 1718bdeb0c1..deec1a604f5 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/nextstep/ChangeLog b/nextstep/ChangeLog index cbdb559f7a5..c0a08f844ba 100644 --- a/nextstep/ChangeLog +++ b/nextstep/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/nt/ChangeLog b/nt/ChangeLog index fe1fc62f46f..8e812addf02 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/oldXMenu/ChangeLog b/oldXMenu/ChangeLog index f831e71c001..db1979e7e41 100644 --- a/oldXMenu/ChangeLog +++ b/oldXMenu/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/src/ChangeLog b/src/ChangeLog index 7a46109c9b1..12ea037ee91 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/test/ChangeLog b/test/ChangeLog index 284054fdf8e..d20abc3ce87 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,4 +1,4 @@ -2011-02-28 Chong Yidong +2011-03-07 Chong Yidong * Version 23.3 released. From d432397227a87fd18c33a27806cd2c0fbcd203af Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 22:23:15 -0800 Subject: [PATCH 016/383] * xmenu.c (xmenu_show): Rename parameter to avoid shadowing. --- src/ChangeLog | 1 + src/xmenu.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1ca428fa685..add827a9dc4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * xmenu.c (menu_highlight_callback): Now static. (set_frame_menubar): Remove unused local. + (xmenu_show): Rename parameter to avoid shadowing. * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. Add a FIXME comment, since the code still doesn't look right. diff --git a/src/xmenu.c b/src/xmenu.c index c79db086df3..64d74ee66d7 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1598,7 +1598,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, Lisp_Object xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, - Lisp_Object title, const char **error, EMACS_UINT timestamp) + Lisp_Object title, const char **error_name, EMACS_UINT timestamp) { int i; widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0; @@ -1613,11 +1613,11 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, if (! FRAME_X_P (f)) abort (); - *error = NULL; + *error_name = NULL; if (menu_items_used <= MENU_ITEMS_PANE_LENGTH) { - *error = "Empty menu"; + *error_name = "Empty menu"; return Qnil; } From 8868a2381e0ae9d40d5b9f21f38a29822ec2fe2a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 22:39:56 -0800 Subject: [PATCH 017/383] * xdisp.c (redisplay_window): Rename local to avoid shadowing. --- src/ChangeLog | 2 ++ src/xdisp.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 90722187e6c..95cc4a5d633 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -14,6 +14,8 @@ * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c. + * xdisp.c (redisplay_window): Rename local to avoid shadowing. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/xdisp.c b/src/xdisp.c index 858a0f74fb1..f2477a2eca5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -14163,11 +14163,11 @@ redisplay_window (Lisp_Object window, int just_this_one_p) { /* The function returns -1 if new fonts were loaded, 1 if successful, 0 if not successful. */ - int rc = try_scrolling (window, just_this_one_p, + int ss = try_scrolling (window, just_this_one_p, scroll_conservatively, emacs_scroll_step, temp_scroll_step, last_line_misfit); - switch (rc) + switch (ss) { case SCROLLING_SUCCESS: goto done; From 6d1f7feedacad0112846d84232b3d4a8dd96b740 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 22:43:11 -0800 Subject: [PATCH 018/383] * xmenu.c (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const" since they might point to immutable storage. --- src/ChangeLog | 2 ++ src/xmenu.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 95cc4a5d633..f1b08f62b8e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * xmenu.c (menu_highlight_callback): Now static. (set_frame_menubar): Remove unused local. (xmenu_show): Rename parameter to avoid shadowing. + (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const" + since they might point to immutable storage. * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. Add a FIXME comment, since the code still doesn't look right. diff --git a/src/xmenu.c b/src/xmenu.c index 64d74ee66d7..a64b305238b 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1662,7 +1662,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, { /* Create a new pane. */ Lisp_Object pane_name, prefix; - char *pane_string; + const char *pane_string; pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME); prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX); @@ -2010,7 +2010,7 @@ xdialog_show (FRAME_PTR f, representing the text label and buttons. */ { Lisp_Object pane_name, prefix; - char *pane_string; + const char *pane_string; pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME]; prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX]; pane_string = (NILP (pane_name) @@ -2305,7 +2305,7 @@ xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, { /* Create a new pane. */ Lisp_Object pane_name, prefix; - char *pane_string; + const char *pane_string; maxlines = max (maxlines, lines); lines = 0; From 281585b0bd2a6063c11cfcc308a560f416c3eee7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 22:46:29 -0800 Subject: [PATCH 019/383] * xmenu.c (next_menubar_widget_id): Declare only if USE_X_TOOLKIT, since it's unused otherwise. --- src/ChangeLog | 2 ++ src/xmenu.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f1b08f62b8e..a0f797b0e6f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,8 @@ (xmenu_show): Rename parameter to avoid shadowing. (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const" since they might point to immutable storage. + (next_menubar_widget_id): Declare only if USE_X_TOOLKIT, + since it's unused otherwise. * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. Add a FIXME comment, since the code still doesn't look right. diff --git a/src/xmenu.c b/src/xmenu.c index a64b305238b..36684c7dafa 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -124,11 +124,11 @@ static int update_frame_menubar (struct frame *); Xt on behalf of one of the widget sets. */ static int popup_activated_flag; -static int next_menubar_widget_id; - #ifdef USE_X_TOOLKIT +static int next_menubar_widget_id; + /* Return the frame whose ->output_data.x->id equals ID, or 0 if none. */ static struct frame * From 4554d213635d99c2461e0fc20441fd0e7f14435d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 22:58:49 -0800 Subject: [PATCH 020/383] * window.c (window_loop, size_window): (run_window_configuration_change_hook, enlarge_window): Rename locals to avoid shadowing. --- src/ChangeLog | 2 ++ src/window.c | 47 ++++++++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a0f797b0e6f..150f193af0b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -19,6 +19,8 @@ * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c. * xdisp.c (redisplay_window): Rename local to avoid shadowing. + * window.c (window_loop, size_window): + (run_window_configuration_change_hook, enlarge_window): Likewise. 2011-03-06 Chong Yidong diff --git a/src/window.c b/src/window.c index 7c55be972b2..2ec51a756d4 100644 --- a/src/window.c +++ b/src/window.c @@ -2209,13 +2209,13 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame case DELETE_BUFFER_WINDOWS: if (EQ (w->buffer, obj)) { - struct frame *f = XFRAME (WINDOW_FRAME (w)); + struct frame *fr = XFRAME (WINDOW_FRAME (w)); /* If this window is dedicated, and in a frame of its own, kill the frame. */ - if (EQ (window, FRAME_ROOT_WINDOW (f)) + if (EQ (window, FRAME_ROOT_WINDOW (fr)) && !NILP (w->dedicated) - && other_visible_frames (f)) + && other_visible_frames (fr)) { /* Skip the other windows on this frame. There might be one, the minibuffer! */ @@ -2267,16 +2267,16 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame if (EQ (w->buffer, obj)) { Lisp_Object buffer; - struct frame *f = XFRAME (w->frame); + struct frame *fr = XFRAME (w->frame); /* Find another buffer to show in this window. */ buffer = Fother_buffer (obj, Qnil, w->frame); /* If this window is dedicated, and in a frame of its own, kill the frame. */ - if (EQ (window, FRAME_ROOT_WINDOW (f)) + if (EQ (window, FRAME_ROOT_WINDOW (fr)) && !NILP (w->dedicated) - && other_visible_frames (f)) + && other_visible_frames (fr)) { /* Skip the other windows on this frame. There might be one, the minibuffer! */ @@ -2290,11 +2290,11 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame } else if (!NILP (w->dedicated) && !NILP (w->parent)) { - Lisp_Object window; - XSETWINDOW (window, w); + Lisp_Object window_to_delete; + XSETWINDOW (window_to_delete, w); /* If this window is dedicated and not the only window in its frame, then kill it. */ - Fdelete_window (window); + Fdelete_window (window_to_delete); } else { @@ -3170,11 +3170,11 @@ size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int firs last_pos = first_pos; for (n = 0, child = *forward; !NILP (child); child = c->next, ++n) { - int new_size, old_size; + int new_child_size, old_child_size; c = XWINDOW (child); - old_size = WINDOW_TOTAL_SIZE (c, width_p); - new_size = old_size; + old_child_size = WINDOW_TOTAL_SIZE (c, width_p); + new_child_size = old_child_size; /* The top or left edge position of this child equals the bottom or right edge of its predecessor. */ @@ -3186,18 +3186,20 @@ size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int firs /* If this child can be resized, do it. */ if (resize_fixed_p || !window_fixed_size_p (c, width_p, 0)) { - new_size = new_sizes ? new_sizes[n] : old_size + each + extra; + new_child_size = + new_sizes ? new_sizes[n] : old_child_size + each + extra; extra = 0; } /* Set new size. Note that size_window also propagates edge positions to children, so it's not a no-op if we didn't change the child's size. */ - size_window (child, new_size, width_p, 1, first_only, last_only); + size_window (child, new_child_size, width_p, 1, + first_only, last_only); /* Remember the bottom/right edge position of this child; it will be used to set the top/left edge of the next child. */ - last_pos += new_size; + last_pos += new_child_size; } xfree (new_sizes); @@ -3325,12 +3327,12 @@ run_window_configuration_change_hook (struct frame *f) if (!NILP (Flocal_variable_p (Qwindow_configuration_change_hook, buffer))) { - int count = SPECPDL_INDEX (); + int count1 = SPECPDL_INDEX (); record_unwind_protect (select_window_norecord, Fselected_window ()); select_window_norecord (window); run_funs (Fbuffer_local_value (Qwindow_configuration_change_hook, buffer)); - unbind_to (count, Qnil); + unbind_to (count1, Qnil); } } } @@ -4119,7 +4121,7 @@ enlarge_window (Lisp_Object window, int delta, int horiz_flag) { /* If trying to grow this window to or beyond size of the parent, just delete all the sibling windows. */ - Lisp_Object start, tem, next; + Lisp_Object start, tem; start = XWINDOW (parent)->vchild; if (NILP (start)) @@ -4129,9 +4131,9 @@ enlarge_window (Lisp_Object window, int delta, int horiz_flag) tem = XWINDOW (window)->next; while (! NILP (tem)) { - next = XWINDOW (tem)->next; + Lisp_Object next1 = XWINDOW (tem)->next; delete_window (tem); - tem = next; + tem = next1; } /* Delete any siblings that come after WINDOW. @@ -4140,9 +4142,9 @@ enlarge_window (Lisp_Object window, int delta, int horiz_flag) tem = start; while (! EQ (tem, window)) { - next = XWINDOW (tem)->next; + Lisp_Object next1 = XWINDOW (tem)->next; delete_window (tem); - tem = next; + tem = next1; } } else @@ -7224,4 +7226,3 @@ keys_of_window (void) initial_define_key (meta_map, Ctl ('V'), "scroll-other-window"); initial_define_key (meta_map, 'v', "scroll-down-command"); } - From 7e5cf297731ddb042bfc5effa2128acfc776cc09 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 23:06:05 -0800 Subject: [PATCH 021/383] * window.c (display_buffer): Now static. --- src/ChangeLog | 2 ++ src/window.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 150f193af0b..0408deade82 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -22,6 +22,8 @@ * window.c (window_loop, size_window): (run_window_configuration_change_hook, enlarge_window): Likewise. + * window.c (display_buffer): Now static. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/window.c b/src/window.c index 2ec51a756d4..838be475d51 100644 --- a/src/window.c +++ b/src/window.c @@ -3604,7 +3604,7 @@ select_frame_norecord (Lisp_Object frame) ? Fselect_frame (frame, Qt) : selected_frame; } -Lisp_Object +static Lisp_Object display_buffer (Lisp_Object buffer, Lisp_Object not_this_window_p, Lisp_Object override_frame) { return call3 (Qdisplay_buffer, buffer, not_this_window_p, override_frame); From a586633d66b8da9634c600de93279e244f29c939 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 6 Mar 2011 23:07:38 -0800 Subject: [PATCH 022/383] * window.h (check_all_windows): New decl, to forestall gcc -Wmissing-prototypes diagnostic. --- src/ChangeLog | 2 ++ src/window.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 0408deade82..ac2f0c418e1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -23,6 +23,8 @@ (run_window_configuration_change_hook, enlarge_window): Likewise. * window.c (display_buffer): Now static. + * window.h (check_all_windows): New decl, to forestall + gcc -Wmissing-prototypes diagnostic. 2011-03-06 Chong Yidong diff --git a/src/window.h b/src/window.h index 690fd9a50fa..f788e126d6d 100644 --- a/src/window.h +++ b/src/window.h @@ -778,6 +778,7 @@ extern void freeze_window_starts (struct frame *, int); extern void grow_mini_window (struct window *, int); extern void shrink_mini_window (struct window *); extern int window_relative_x_coord (struct window *, enum window_part, int); +extern void check_all_windows (void); void run_window_configuration_change_hook (struct frame *f); From 16130297d04ceb76a8c1f6649863560bd234697e Mon Sep 17 00:00:00 2001 From: "Aaron S. Hawley" Date: Sun, 6 Mar 2011 23:33:11 -0800 Subject: [PATCH 023/383] morse.el additions from bug#2288. * lisp/play/morse.el (nato-alphabet, nato-region, denato-region): New variable and functions. --- lisp/ChangeLog | 5 +++ lisp/play/morse.el | 104 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6b7768fe93c..673f8a456f6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-07 Aaron S. Hawley + + * play/morse.el (nato-alphabet, nato-region, denato-region): + New variable and functions. (Bug#2288) + 2011-03-06 Stefan Monnier * progmodes/gud.el (gdb-script-syntax-propertize-function): diff --git a/lisp/play/morse.el b/lisp/play/morse.el index d4a0224ede5..ca7d8ef5496 100644 --- a/lisp/play/morse.el +++ b/lisp/play/morse.el @@ -25,6 +25,9 @@ ;; Converts text to Morse code and back with M-x morse-region and ;; M-x unmorse-region (though Morse code is no longer official :-(). +;; Converts text to NATO phonetic alphabet and back with M-x +;; nato-region and M-x denato-region. + ;;; Code: (defvar morse-code '(("a" . ".-") @@ -91,6 +94,60 @@ ("@" . ".--.-.")) "Morse code character set.") +(defvar nato-alphabet '(("a" . "Alfa") + ("b" . "Bravo") + ("c" . "Charlie") + ("d" . "Delta") + ("e" . "Echo") + ("f" . "Foxtrot") + ("g" . "Golf") + ("h" . "Hotel") + ("i" . "India") + ("j" . "Juliett") + ("k" . "Kilo") + ("l" . "Lima") + ("m" . "Mike") + ("n" . "November") + ("o" . "Oscar") + ("p" . "Papa") + ("q" . "Quebec") + ("r" . "Romeo") + ("s" . "Sierra") + ("t" . "Tango") + ("u" . "Uniform") + ("v" . "Victor") + ("w" . "Whiskey") + ("x" . "Xray") + ("y" . "Yankee") + ("z" . "Zulu") + ;; Numbers + ("0" . "Zero") + ("1" . "One") + ("2" . "Two") + ("3" . "Three") + ("4" . "Four") + ("5" . "Five") + ("6" . "Six") + ("7" . "Seven") + ("8" . "Eight") + ("9" . "Niner") + ;; Punctuation is not part of standard + ("=" . "Equals") + ("?" . "Query") + ("/" . "Slash") + ("," . "Comma") + ("." . "Stop") + (":" . "Colon") + ("'" . "Apostrophe") + ("-" . "Dash") + ("(" . "Open") + (")" . "Close") + ("@" . "At")) + "NATO phonetic alphabet. +See ''International Code of Signals'' (INTERCO), United States +Edition, 1969 Edition (Revised 2003) available from National +Geospatial-Intelligence Agency at http://www.nga.mil/") + ;;;###autoload (defun morse-region (beg end) "Convert all text in a given region to morse code." @@ -136,6 +193,53 @@ (if (looking-at "/") (delete-char 1)))))))) +;;;###autoload +(defun nato-region (beg end) + "Convert all text in a given region to NATO phonetic alphabet." + ;; Copied from morse-region. -- ashawley 2009-02-10 + (interactive "*r") + (if (integerp end) + (setq end (copy-marker end))) + (save-excursion + (let ((sep "") + str nato) + (goto-char beg) + (while (< (point) end) + (setq str (downcase (buffer-substring (point) (1+ (point))))) + (cond ((looking-at "\\s-+") + (goto-char (match-end 0)) + (setq sep "")) + ((setq nato (assoc str nato-alphabet)) + (delete-char 1) + (insert sep (cdr nato)) + (setq sep "-")) + (t + (forward-char 1) + (setq sep ""))))))) + +;;;###autoload +(defun denato-region (beg end) + "Convert NATO phonetic alphabet in region to ordinary ASCII text." + ;; Copied from unmorse-region. -- ashawley 2009-02-10 + (interactive "*r") + (if (integerp end) + (setq end (copy-marker end))) + (save-excursion + (let (str paren nato) + (goto-char beg) + (while (< (point) end) + (if (null (looking-at "[a-z]+")) + (forward-char 1) + (setq str (buffer-substring (match-beginning 0) (match-end 0))) + (if (null (setq nato (rassoc str nato-alphabet))) + (goto-char (match-end 0)) + (replace-match + (if (string-equal "(" (car nato)) + (if (setq paren (null paren)) "(" ")") + (car nato)) t) + (if (looking-at "-") + (delete-char 1)))))))) + (provide 'morse) ;;; morse.el ends here From f72c1fd6afa573e3cabe8046b9de31c2ce73cf62 Mon Sep 17 00:00:00 2001 From: "Aaron S. Hawley" Date: Sun, 6 Mar 2011 23:35:25 -0800 Subject: [PATCH 024/383] * lisp/play/morse.el (morse-region, unmorse-region): Barf if read-only. --- lisp/ChangeLog | 1 + lisp/play/morse.el | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 673f8a456f6..38d9283f748 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,7 @@ * play/morse.el (nato-alphabet, nato-region, denato-region): New variable and functions. (Bug#2288) + (morse-region, unmorse-region): Barf if read-only. 2011-03-06 Stefan Monnier diff --git a/lisp/play/morse.el b/lisp/play/morse.el index ca7d8ef5496..b88f1b264cb 100644 --- a/lisp/play/morse.el +++ b/lisp/play/morse.el @@ -151,7 +151,7 @@ Geospatial-Intelligence Agency at http://www.nga.mil/") ;;;###autoload (defun morse-region (beg end) "Convert all text in a given region to morse code." - (interactive "r") + (interactive "*r") (if (integerp end) (setq end (copy-marker end))) (save-excursion @@ -174,7 +174,7 @@ Geospatial-Intelligence Agency at http://www.nga.mil/") ;;;###autoload (defun unmorse-region (beg end) "Convert morse coded text in region to ordinary ASCII text." - (interactive "r") + (interactive "*r") (if (integerp end) (setq end (copy-marker end))) (save-excursion From 5b3e6db8d56f100f82cdf3587fdef16425bf403d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 6 Mar 2011 23:37:02 -0800 Subject: [PATCH 025/383] * etc/NEWS: Mention nato-region. --- etc/NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index ac7fdcbab0c..330a3b6ee51 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -645,6 +645,8 @@ binding `log-view-expanded-log-entry-function' to a suitable function. --- *** `copyright-fix-years' can optionally convert consecutive years to ranges. +*** New command `nato-region' converts text to NATO phonetic alphabet. + * New Modes and Packages in Emacs 24.1 From e63e9234d012ed8ac10e32d3b2a0e1539b5685d0 Mon Sep 17 00:00:00 2001 From: Ed Reingold Date: Sun, 6 Mar 2011 23:48:32 -0800 Subject: [PATCH 026/383] cal-hebrew addition from bug#8190. * lisp/calendar/cal-hebrew.el (diary-hebrew-yahrzeit): Add optional `after-sunset' argument. --- lisp/ChangeLog | 5 +++++ lisp/calendar/cal-hebrew.el | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38d9283f748..d8559182c5d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-07 Ed Reingold + + * calendar/cal-hebrew.el (diary-hebrew-yahrzeit): + Add optional `after-sunset' argument. (Bug#8190) + 2011-03-07 Aaron S. Hawley * play/morse.el (nato-alphabet, nato-region, denato-region): diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index 63e7484e127..e5373a28756 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el @@ -879,21 +879,27 @@ use when highlighting the day in the calendar." (declare-function diary-ordinal-suffix "diary-lib" (n)) ;;;###diary-autoload -(defun diary-hebrew-yahrzeit (death-month death-day death-year &optional mark) +(defun diary-hebrew-yahrzeit (death-month death-day death-year + &optional mark after-sunset) "Yahrzeit diary entry--entry applies if date is Yahrzeit or the day before. Parameters are DEATH-MONTH, DEATH-DAY, DEATH-YEAR; the diary entry is assumed to be the name of the person. Although the date of death is specified by the civil calendar, the proper Hebrew calendar Yahrzeit is determined. +If the death occurred after local sunset on the given civil date, +the following civil date corresponds to the Hebrew date of +death--set the optional parameter AFTER-SUNSET non-nil in this case. + The order of the input parameters changes according to `calendar-date-style' \(e.g. to DEATH-DAY, DEATH-MONTH, DEATH-YEAR in the European style). An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (let* ((h-date (calendar-hebrew-from-absolute - (calendar-absolute-from-gregorian - (diary-make-date death-month death-day death-year)))) + (+ (calendar-absolute-from-gregorian + (diary-make-date death-month death-day death-year)) + (if after-sunset 1 0)))) (h-month (calendar-extract-month h-date)) (h-day (calendar-extract-day h-date)) (h-year (calendar-extract-year h-date)) From 619f4b625e020c27d787e14e4f3c499be6b2ef77 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 7 Mar 2011 00:39:43 -0800 Subject: [PATCH 027/383] * lisp/vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt. --- lisp/ChangeLog | 4 ++++ lisp/vc/vc.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8559182c5d..effb2a3038a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-07 Glenn Morris + + * vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt. + 2011-03-07 Ed Reingold * calendar/cal-hebrew.el (diary-hebrew-yahrzeit): diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 200291bd925..2fb397ed6f8 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1115,7 +1115,7 @@ merge in the changes into your working copy." (dolist (file files) (unless (file-writable-p file) ;; Make the file+buffer read-write. - (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue?" file)) + (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file)) (error "Aborted")) (set-file-modes file (logior (file-modes file) 128)) (let ((visited (get-file-buffer file))) From 7e319d3cc31d6735616e9f68c81042b4920e43e8 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 7 Mar 2011 00:56:30 -0800 Subject: [PATCH 028/383] vc.el fix for bug#6146. * lisp/vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt. Give an explicit error if failed to make writable. --- lisp/ChangeLog | 1 + lisp/vc/vc.el | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index effb2a3038a..4ff65b16c6d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,7 @@ 2011-03-07 Glenn Morris * vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt. + Give an explicit error if failed to make writable. (Bug#6146) 2011-03-07 Ed Reingold diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 2fb397ed6f8..7f55ffdbdad 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1117,7 +1117,10 @@ merge in the changes into your working copy." ;; Make the file+buffer read-write. (unless (y-or-n-p (format "%s is edited but read-only; make it writable and continue? " file)) (error "Aborted")) - (set-file-modes file (logior (file-modes file) 128)) + ;; Maybe we somehow lost permissions on the directory. + (condition-case nil + (set-file-modes file (logior (file-modes file) 128)) + (error (error "Unable to make file writable"))) (let ((visited (get-file-buffer file))) (when visited (with-current-buffer visited From cf715c3c952706b13fe4a9a9279739b7ed480a15 Mon Sep 17 00:00:00 2001 From: Adrian Robert Date: Mon, 7 Mar 2011 11:00:11 +0200 Subject: [PATCH 029/383] * nsterm.m (ns_draw_window_cursor): Fix handling of 'cursor_width' parameter for hbar cursors. Based on a patch by Ben Key . --- src/ChangeLog | 6 ++++++ src/nsterm.m | 18 +++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d7131096995..7fbf3e1ef6c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-03-07 Adrian Robert + + * nsterm.m (ns_draw_window_cursor): Fix handling of "cursor_width" + parameter for hbar cursors. Based on a patch by Ben Key + . + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/nsterm.m b/src/nsterm.m index cc2c4cf9807..c7cd411c614 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2235,7 +2235,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. -------------------------------------------------------------------------- */ { NSRect r, s; - int fx, fy, h; + int fx, fy, h, cursor_height; struct frame *f = WINDOW_XFRAME (w); struct glyph *phys_cursor_glyph; int overspill; @@ -2279,13 +2279,20 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. get_phys_cursor_geometry (w, glyph_row, phys_cursor_glyph, &fx, &fy, &h); /* The above get_phys_cursor_geometry call set w->phys_cursor_width - to the glyph width; replace with CURSOR_WIDTH for bar cursors. */ - if (cursor_type == BAR_CURSOR || cursor_type == HBAR_CURSOR) + to the glyph width; replace with CURSOR_WIDTH for (V)BAR cursors. */ + if (cursor_type == BAR_CURSOR) { if (cursor_width < 1) cursor_width = max (FRAME_CURSOR_WIDTH (f), 1); w->phys_cursor_width = cursor_width; } + /* If we have an HBAR, "cursor_width" MAY specify height. */ + else if (cursor_type == HBAR_CURSOR) + { + cursor_height = (cursor_width < 1) ? lrint (0.25 * h) : cursor_width; + fy += h - cursor_height; + h = cursor_height; + } r.origin.x = fx, r.origin.y = fy; r.size.height = h; @@ -2337,10 +2344,7 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. [FRAME_CURSOR_COLOR (f) set]; break; case HBAR_CURSOR: - s = r; - s.origin.y += lrint (0.75 * s.size.height); - s.size.height = lrint (s.size.height * 0.25); - NSRectFill (s); + NSRectFill (r); break; case BAR_CURSOR: s = r; From fa7062f6539a628343802d7d7dbf86befe3c2626 Mon Sep 17 00:00:00 2001 From: Deniz Dogan Date: Mon, 7 Mar 2011 13:03:22 +0100 Subject: [PATCH 030/383] * lisp/net/rcirc.el (rcirc-connect): Fix PASS bug. --- lisp/ChangeLog | 4 ++++ lisp/net/rcirc.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4ff65b16c6d..d23bb9e650e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-07 Deniz Dogan + + * net/rcirc.el (rcirc-connect): Fix PASS bug. + 2011-03-07 Glenn Morris * vc/vc.el (vc-next-action): Add missing space to y-or-n-p prompt. diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 1e3ee91092d..41e09540631 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -548,7 +548,7 @@ If ARG is non-nil, instead prompt for connection parameters." (add-hook 'auto-save-hook 'rcirc-log-write) ;; identify - (when password + (unless (zerop (length password)) (rcirc-send-string process (concat "PASS " password))) (rcirc-send-string process (concat "NICK " nick)) (rcirc-send-string process (concat "USER " user-name From 1df1040bf8549ea4c3ae08007a347736adf2fe99 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 7 Mar 2011 15:05:53 -0500 Subject: [PATCH 031/383] Fix 2011-01-31 change; patch supplied by acm was applied incorrectly. * lisp/progmodes/cc-cmds.el (c-beginning-of-statement): Fix 2011-01-31 change; patch supplied by Alan Mackenzie was applied incorrectly. --- lisp/ChangeLog | 4 ++-- lisp/progmodes/cc-cmds.el | 33 ++++++++++++++++++++------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d711568fea..1b8a7641b35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,8 +4,8 @@ 2011-03-07 Chong Yidong - * progmodes/cc-cmds.el (c-beginning-of-statement): Revert - 2011-01-31 change. + * progmodes/cc-cmds.el (c-beginning-of-statement): Fix 2011-01-31 + change; patch supplied by Alan Mackenzie was applied incorrectly. 2011-02-26 Eli Zaretskii diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 4deb5ca6afe..bd047e89435 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -2458,13 +2458,15 @@ function does not require the declaration to contain a brace block." (goto-char last) (throw 'done '(nil . nil))) - ;; Stop if we encounter a preprocessor line. - ((and (not macro-end) + ;; Stop if we encounter a preprocessor line. Continue if we + ;; hit a naked # + ((and c-opt-cpp-prefix + (not macro-end) (eq (char-after) ?#) (= (point) (c-point 'boi))) - (goto-char last) - ;(throw 'done (cons (eq (point) here) 'macro-boundary))) ; Changed 2003/3/26 - (throw 'done '(t . macro-boundary))) + (if (= (point) here) ; Not a macro, therefore naked #. + (forward-char) + (throw 'done '(t . macro-boundary)))) ;; Stop after a ';', '}', or "};" ((looking-at ";\\|};?") @@ -2663,14 +2665,19 @@ sentence motion in or near comments and multiline strings." ;; Are we about to move forward into or out of a ;; preprocessor command? (when (eq (cdr res) 'macro-boundary) - (save-excursion - (end-of-line) - (setq macro-fence - (and (not (eobp)) - (progn (c-skip-ws-forward) - (c-beginning-of-macro)) - (progn (c-end-of-macro) - (point)))))) + (setq macro-fence + (save-excursion + (if macro-fence + (progn + (end-of-line) + (and (not (eobp)) + (progn (c-skip-ws-forward) + (c-beginning-of-macro)) + (progn (c-end-of-macro) + (point)))) + (and (not (eobp)) + (c-beginning-of-macro) + (progn (c-end-of-macro) (point))))))) ;; Are we about to move forward into a literal? (when (memq (cdr res) '(macro-boundary literal)) (setq range (c-ascertain-following-literal))) From 7600cf45994d0c1d6fb42d8b0ddf725d9600bd1d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 7 Mar 2011 15:29:03 -0500 Subject: [PATCH 032/383] Fix a cc-cmds.el patch from acm that I applied incorrectly (Bug#7595). * lisp/progmodes/cc-cmds.el (c-beginning-of-statement): Fix incorrect application of patch from Alan Mackenzie (Bug#7595). --- lisp/ChangeLog | 5 +++++ lisp/progmodes/cc-cmds.el | 19 ++++++------------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d23bb9e650e..1302bb414b2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-07 Chong Yidong + + * progmodes/cc-cmds.el (c-beginning-of-statement): Fix incorrect + application of patch from Alan Mackenzie (Bug#7595). + 2011-03-07 Deniz Dogan * net/rcirc.el (rcirc-connect): Fix PASS bug. diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index 5ac30bc28ce..0f873e678c3 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -2564,19 +2564,12 @@ be more \"DWIM:ey\"." ;; Are we about to move backwards into or out of a ;; preprocessor command? If so, locate its beginning. (when (eq (cdr res) 'macro-boundary) - (setq macro-fence - (save-excursion - (if macro-fence - (progn - (end-of-line) - (and (not (eobp)) - (progn (c-skip-ws-forward) - (c-beginning-of-macro)) - (progn (c-end-of-macro) - (point)))) - (and (not (eobp)) - (c-beginning-of-macro) - (progn (c-end-of-macro) (point))))))) + (save-excursion + (beginning-of-line) + (setq macro-fence + (and (not (bobp)) + (progn (c-skip-ws-backward) (c-beginning-of-macro)) + (point))))) ;; Are we about to move backwards into a literal? (when (memq (cdr res) '(macro-boundary literal)) (setq range (c-ascertain-preceding-literal))) From 7faeca66c766912265dea911f92c64b9608c0872 Mon Sep 17 00:00:00 2001 From: Ben Key Date: Mon, 7 Mar 2011 22:11:24 +0100 Subject: [PATCH 033/383] Fix bug#8181. * src/w32fns.c (FILE_NAME_COMBO_BOX, FILE_NAME_LIST): Define. (file_dialog_callback): Fix locating the window handle of the File Name text field. After disabling it, set focus on the list control. (Fx_file_dialog): If only_dir_p is non-nil, set the text of the File Name text field to "Current Directory" if it does not already have another value. --- src/ChangeLog | 9 +++++++++ src/w32fns.c | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7fbf3e1ef6c..9c612e0e09f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2011-03-07 Ben Key + + * w32fns.c (FILE_NAME_COMBO_BOX, FILE_NAME_LIST): Define. + (file_dialog_callback): Fix locating the window handle of the File Name + text field. After disabling it, set focus on the list control. + (Fx_file_dialog): If only_dir_p is non-nil, set the text of the File + Name text field to "Current Directory" if it does not already have + another value. (Bug#8181) + 2011-03-07 Adrian Robert * nsterm.m (ns_draw_window_cursor): Fix handling of "cursor_width" diff --git a/src/w32fns.c b/src/w32fns.c index ec48397657a..09442d41e14 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -60,6 +60,8 @@ along with GNU Emacs. If not, see . */ #include #include #define FILE_NAME_TEXT_FIELD edt1 +#define FILE_NAME_COMBO_BOX cmb13 +#define FILE_NAME_LIST lst1 #include "font.h" #include "w32font.h" @@ -5868,13 +5870,37 @@ file_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { HWND dialog = GetParent (hwnd); HWND edit_control = GetDlgItem (dialog, FILE_NAME_TEXT_FIELD); + HWND list = GetDlgItem (dialog, FILE_NAME_LIST); - /* Directories is in index 2. */ + /* At least on Windows 7, the above attempt to get the window handle + to the File Name Text Field fails. The following code does the + job though. Note that this code is based on my examination of the + window hierarchy using Microsoft Spy++. bk */ + if (edit_control == NULL) + { + HWND tmp = GetDlgItem (dialog, FILE_NAME_COMBO_BOX); + if (tmp) + { + tmp = GetWindow (tmp, GW_CHILD); + if (tmp) + edit_control = GetWindow (tmp, GW_CHILD); + } + } + + /* Directories is in index 2. */ if (notify->lpOFN->nFilterIndex == 2) { CommDlg_OpenSave_SetControlText (dialog, FILE_NAME_TEXT_FIELD, "Current Directory"); EnableWindow (edit_control, FALSE); + /* Note that at least on Windows 7, the above call to EnableWindow + disables the window that would ordinarily have focus. If we + do not set focus to some other window here, focus will land in + no man's land and the user will be unable to tab through the + dialog box (pressing tab will only result in a beep). + Avoid that problem by setting focus to the list here. */ + if (CDN_INITDONE == notify->hdr.code) + SetFocus (list); } else { @@ -5951,6 +5977,13 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) else filename[0] = '\0'; + /* The code in file_dialog_callback that attempts to set the text + of the file name edit window when handling the CDN_INITDONE + WM_NOTIFY message does not work. Setting filename to "Current + Directory" in the only_dir_p case here does work however. */ + if (filename[0] == 0 && ! NILP (only_dir_p)) + strcpy (filename, "Current Directory"); + { NEWOPENFILENAME new_file_details; BOOL file_opened = FALSE; From e18c0aa3359a9339443858d9732718877ddf0d6c Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 7 Mar 2011 22:16:42 +0100 Subject: [PATCH 034/383] Remove unnecessary "(tiny change)" markers. --- lib-src/ChangeLog | 2 +- src/ChangeLog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4b50b2dddeb..bd1a84cf0b9 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -119,7 +119,7 @@ ($(BLD)/etags.$(O), $(BLD)/movemail.$(O), $(BLD)/ntlib.$(O)): Depend on $(EMACS_ROOT)/nt/inc/sys/stat.h. -2011-02-21 Ben Key (tiny change) +2011-02-21 Ben Key * make-docfile.c (scan_c_file): Adapt DEFVAR_PER_BUFFER case to the new BVAR macro. diff --git a/src/ChangeLog b/src/ChangeLog index 9c612e0e09f..46ad067c9cd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -152,7 +152,7 @@ as per recent filemodestring API change. Reported by Jonas Öster in . -2011-02-23 Ben Key (tiny change) +2011-02-23 Ben Key * nsterm.m (ns_draw_window_cursor): Obey the cursor_width argument directly, for bar cursors. From d6550a9f3013b49b2d04395ed19f0ea1ec683e6c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 16:06:36 -0800 Subject: [PATCH 035/383] 2011-03-08 Paul Eggert * window.c (size_window): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. --- src/ChangeLog | 6 +++++- src/window.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ac2f0c418e1..e3b3c8c2566 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,6 @@ -2011-03-07 Paul Eggert +2011-03-08 Paul Eggert + +2011-03-08 Paul Eggert * xmenu.c (menu_highlight_callback): Now static. (set_frame_menubar): Remove unused local. @@ -23,6 +25,8 @@ (run_window_configuration_change_hook, enlarge_window): Likewise. * window.c (display_buffer): Now static. + (size_window): Mark variables that gcc -Wuninitialized + does not deduce are never used uninitialized. * window.h (check_all_windows): New decl, to forestall gcc -Wmissing-prototypes diagnostic. diff --git a/src/window.c b/src/window.c index 838be475d51..eaa910571e0 100644 --- a/src/window.c +++ b/src/window.c @@ -3124,7 +3124,7 @@ size_window (Lisp_Object window, int size, int width_p, int nodelete_p, int firs } else if (!NILP (*forward)) { - int fixed_size, each, extra, n; + int fixed_size, each IF_LINT (= 0), extra IF_LINT (= 0), n; int resize_fixed_p, nfixed; int last_pos, first_pos, nchildren, total; int *new_sizes = NULL; @@ -5522,7 +5522,7 @@ and redisplay normally--don't erase and redraw the frame. */) struct buffer *obuf = current_buffer; int center_p = 0; EMACS_INT charpos, bytepos; - int iarg; + int iarg IF_LINT (= 0); int this_scroll_margin; /* If redisplay is suppressed due to an error, try again. */ From eb8694ee59c211351b55601fdc88338b9c888f81 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 7 Mar 2011 19:08:03 -0500 Subject: [PATCH 036/383] Mention elpa branch in admin/notes/BRANCH; clarify admin/notes/elpa. --- admin/notes/BRANCH | 7 ++++++ admin/notes/elpa | 54 ++++++++++++++++------------------------------ 2 files changed, 25 insertions(+), 36 deletions(-) diff --git a/admin/notes/BRANCH b/admin/notes/BRANCH index 53f3d9603ca..9f09135f206 100644 --- a/admin/notes/BRANCH +++ b/admin/notes/BRANCH @@ -23,3 +23,10 @@ on what branch at any time. If you are looking at this file in a branch other than the trunk, there may be some branch-specific documentation below this line. ________________________________________________________________________ + +* elpa + + This branch does not contain a copy of Emacs, but of the Emacs Lisp + package archive (elpa.gnu.org). See admin/notes/elpa for further + explanation, and the README file in the branch for usage + instructions. diff --git a/admin/notes/elpa b/admin/notes/elpa index e28d81e6d6e..cbea8cc1dfa 100644 --- a/admin/notes/elpa +++ b/admin/notes/elpa @@ -1,42 +1,24 @@ NOTES ON THE EMACS PACKAGE ARCHIVE -Here are instructions on uploading files to the package archive at -elpa.gnu.org, for Emacs maintainers. (If you are not a maintainer, -contact us if you want to submit a package.) +The GNU Emacs package archive, at elpa.gnu.org, is managed using Bzr. +The Bzr branch is hosted on Savannah, and you can check it out with -1. You will need login access to elpa.gnu.org. You will also need to - get the FSF sysadmins to allow ssh access through the FSF firewall - for your local machine. Ensure that your uid, USER, is in the - `elpa' group on elpa.gnu.org; this gives you write access to the - bzr repository from which the packages are managed. + bzr branch bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa elpa -2. Go to your bzr repository on your local machine. Of, if you don't - have one (you should, if you're tracking Emacs bzr), make one: +Changes made to this branch propagate to elpa.gnu.org as follows. +There exists a copy of the elpa branch on that machine. Someone with +access must log in, pull the latest changes from Savannah, and run a +"deployment" script that generates the content at the web-visible +location http://elpa.gnu.org/packages. - cd $DEVHOME - bzr init-repo elpa/ - cd elpa +The reason things are set up this way, instead of using the package +upload utilities in package-x.el, is so that Emacs hackers can easily +edit the contents of the Savannah "elpa" branch, with the aid of +version control. (For instance, multi-file packages are stored on the +Bzr branch in source form, not as tarfiles.) Because deployment is a +semi-manual process, this allows us some flexibility in making changes +to the branch on Savannah. Furthermore, one can use the elpa branch +to deploy a "local" copy of the package archive, for testing. - Create a branch for elpa: - - bzr branch bzr+ssh://USER@elpa.gnu.org/home/elpa/package-repo package-repo - - Bind the branch: - - cd package-repo/ - echo "public_branch = bzr+ssh://USER@elpa.gnu.org/home/elpa/package-repo" >> .bzr/branch/branch.conf - bzr bind bzr+ssh://USER@elpa.gnu.org/home/elpa/package-repo - - Now you should be able to do `bzr up' and `bzr commit'. - -3. Changes in bzr do not immediately propagate to the user-facing tree - (i.e., what users see when they do `M-x list-packages'). That tree - is created by a (daily) cron job that does "bzr export". If for - some reason you need to refresh the user-facing tree immediately, - run /home/elpa/bin/package-update.sh as the "elpa" user. - - The Org mode dailies are not part of the repository. After the - package-update.sh script creates the user-facing tree, it copies - the daily tarfile hosted on orgmode.org directly into that tree. - -4. FIXME: How to actually upload a package file. +For details on how to use the elpa branch, see that README file in +that branch. From f60958682b055102431c24a30b598a2bf3ec97c3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 16:22:52 -0800 Subject: [PATCH 037/383] * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid shadowing. * charset.c (map_charset_for_dump, Fchar_charset): Likewise. --- src/ChangeLog | 6 ++++-- src/charset.c | 10 +++++----- src/charset.h | 7 +++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e3b3c8c2566..ec7322cfe43 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,3 @@ -2011-03-08 Paul Eggert - 2011-03-08 Paul Eggert * xmenu.c (menu_highlight_callback): Now static. @@ -30,6 +28,10 @@ * window.h (check_all_windows): New decl, to forestall gcc -Wmissing-prototypes diagnostic. + * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid + shadowing. + * charset.c (map_charset_for_dump, Fchar_charset): Likewise. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/charset.c b/src/charset.c index 3624e740acb..f2fcb5bf9d7 100644 --- a/src/charset.c +++ b/src/charset.c @@ -668,9 +668,9 @@ map_charset_for_dump (void (*c_function) (Lisp_Object, Lisp_Object), Lisp_Object while (1) { - int index = GET_TEMP_CHARSET_WORK_ENCODER (c); + int idx = GET_TEMP_CHARSET_WORK_ENCODER (c); - if (index >= from_idx && index <= to_idx) + if (idx >= from_idx && idx <= to_idx) { if (NILP (XCAR (range))) XSETCAR (range, make_number (c)); @@ -2066,10 +2066,10 @@ that case, find the charset from what supported by that coding system. */) for (; CONSP (restriction); restriction = XCDR (restriction)) { - struct charset *charset; + struct charset *rcharset; - CHECK_CHARSET_GET_CHARSET (XCAR (restriction), charset); - if (ENCODE_CHAR (charset, c) != CHARSET_INVALID_CODE (charset)) + CHECK_CHARSET_GET_CHARSET (XCAR (restriction), rcharset); + if (ENCODE_CHAR (rcharset, c) != CHARSET_INVALID_CODE (rcharset)) return XCAR (restriction); } return Qnil; diff --git a/src/charset.h b/src/charset.h index 1fc552a5bd3..8c87ffe6c3d 100644 --- a/src/charset.h +++ b/src/charset.h @@ -358,9 +358,9 @@ extern int emacs_mule_charset[256]; #define CHECK_CHARSET_GET_CHARSET(x, charset) \ do { \ - int id; \ - CHECK_CHARSET_GET_ID (x, id); \ - charset = CHARSET_FROM_ID (id); \ + int csid; \ + CHECK_CHARSET_GET_ID (x, csid); \ + charset = CHARSET_FROM_ID (csid); \ } while (0) @@ -541,4 +541,3 @@ extern void map_charset_chars (void (*) (Lisp_Object, Lisp_Object), struct charset *, unsigned, unsigned); #endif /* EMACS_CHARSET_H */ - From 726929c43aaf671dcbac9b45f9da5b7c9168f3ef Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 16:35:37 -0800 Subject: [PATCH 038/383] * charset.c: Include . (Fsort_charsets): Redo min/max calculation to shorten the code a bit and to avoid gcc -Wuninitialized warning. --- src/ChangeLog | 3 +++ src/charset.c | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ec7322cfe43..39f806283f3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -31,6 +31,9 @@ * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid shadowing. * charset.c (map_charset_for_dump, Fchar_charset): Likewise. + Include . + (Fsort_charsets): Redo min/max calculation to shorten the code a bit + and to avoid gcc -Wuninitialized warning. 2011-03-06 Chong Yidong diff --git a/src/charset.c b/src/charset.c index f2fcb5bf9d7..0ce548d5a18 100644 --- a/src/charset.c +++ b/src/charset.c @@ -29,6 +29,7 @@ along with GNU Emacs. If not, see . */ #include #include #include +#include #include #include #include "lisp.h" @@ -2250,7 +2251,7 @@ See also `charset-priority-list' and `set-charset-priority'. */) int n = XFASTINT (len), i, j, done; Lisp_Object tail, elt, attrs; struct charset_sort_data *sort_data; - int id, min_id, max_id; + int id, min_id = INT_MAX, max_id = INT_MIN; USE_SAFE_ALLOCA; if (n == 0) @@ -2262,11 +2263,9 @@ See also `charset-priority-list' and `set-charset-priority'. */) CHECK_CHARSET_GET_ATTR (elt, attrs); sort_data[i].charset = elt; sort_data[i].id = id = XINT (CHARSET_ATTR_ID (attrs)); - if (i == 0) - min_id = max_id = id; - else if (id < min_id) + if (id < min_id) min_id = id; - else if (id > max_id) + if (id > max_id) max_id = id; } for (done = 0, tail = Vcharset_ordered_list, i = 0; From 89ef49dfdacaf2cca55246c902591b69618a287b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 16:36:30 -0800 Subject: [PATCH 039/383] * charset.c (load_charset_map): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. --- src/ChangeLog | 2 ++ src/charset.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 39f806283f3..c108bb38bea 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -34,6 +34,8 @@ Include . (Fsort_charsets): Redo min/max calculation to shorten the code a bit and to avoid gcc -Wuninitialized warning. + (load_charset_map): Mark variables that gcc -Wuninitialized + does not deduce are never used uninitialized. 2011-03-06 Chong Yidong diff --git a/src/charset.c b/src/charset.c index 0ce548d5a18..e46dadab93a 100644 --- a/src/charset.c +++ b/src/charset.c @@ -251,7 +251,7 @@ struct charset_map_entries static void load_charset_map (struct charset *charset, struct charset_map_entries *entries, int n_entries, int control_flag) { - Lisp_Object vec, table; + Lisp_Object vec IF_LINT (= Qnil), table IF_LINT (= Qnil); unsigned max_code = CHARSET_MAX_CODE (charset); int ascii_compatible_p = charset->ascii_compatible_p; int min_char, max_char, nonascii_min_char; From 0ac2c2991c1cba4e3c6e5f7b62c7d61b01d69994 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 16:46:23 -0800 Subject: [PATCH 040/383] * charset.c (load_charset): Abort instead of using uninitialized var. --- src/ChangeLog | 1 + src/charset.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c108bb38bea..02dc5390f38 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -36,6 +36,7 @@ and to avoid gcc -Wuninitialized warning. (load_charset_map): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. + (load_charset): Abort instead of using uninitialized var. 2011-03-06 Chong Yidong diff --git a/src/charset.c b/src/charset.c index e46dadab93a..d82b29ae44b 100644 --- a/src/charset.c +++ b/src/charset.c @@ -630,8 +630,12 @@ load_charset (struct charset *charset, int control_flag) if (CHARSET_METHOD (charset) == CHARSET_METHOD_MAP) map = CHARSET_MAP (charset); - else if (CHARSET_UNIFIED_P (charset)) - map = CHARSET_UNIFY_MAP (charset); + else + { + if (! CHARSET_UNIFIED_P (charset)) + abort (); + map = CHARSET_UNIFY_MAP (charset); + } if (STRINGP (map)) load_charset_map_from_file (charset, map, control_flag); else From f38b440c4b40777c25631323f2501ffb5ba98251 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 17:41:19 -0800 Subject: [PATCH 041/383] * coding.c (coding_set_source, coding_set_destination): Use "else { /* comment */ }" rather than "else /* comment */;" for clarity, and to avoid gcc -Wempty-body warning. --- src/ChangeLog | 4 ++++ src/coding.c | 14 ++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 02dc5390f38..b88ff2ccbb4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -38,6 +38,10 @@ does not deduce are never used uninitialized. (load_charset): Abort instead of using uninitialized var. + * coding.c (coding_set_source, coding_set_destination): + Use "else { /* comment */ }" rather than "else /* comment */;" + for clarity, and to avoid gcc -Wempty-body warning. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/coding.c b/src/coding.c index f6310369ad3..cb13793daba 100644 --- a/src/coding.c +++ b/src/coding.c @@ -1051,9 +1051,10 @@ coding_set_source (struct coding_system *coding) coding->source = SDATA (coding->src_object) + coding->src_pos_byte; } else - /* Otherwise, the source is C string and is never relocated - automatically. Thus we don't have to update anything. */ - ; + { + /* Otherwise, the source is C string and is never relocated + automatically. Thus we don't have to update anything. */ + } } static void @@ -1079,9 +1080,10 @@ coding_set_destination (struct coding_system *coding) } } else - /* Otherwise, the destination is C string and is never relocated - automatically. Thus we don't have to update anything. */ - ; + { + /* Otherwise, the destination is C string and is never relocated + automatically. Thus we don't have to update anything. */ + } } From 1c2cc4efceea675cfa303414478e4abd160e26d0 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 8 Mar 2011 02:52:20 +0100 Subject: [PATCH 042/383] src/w32xfns.c (select_palette): Check success of RealizePalette against GDI_ERROR, not zero. --- src/ChangeLog | 5 +++++ src/w32xfns.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 46ad067c9cd..b73e3d0c860 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Juanma Barranquero + + * w32xfns.c (select_palette): Check success of RealizePalette against + GDI_ERROR, not zero. + 2011-03-07 Ben Key * w32fns.c (FILE_NAME_COMBO_BOX, FILE_NAME_LIST): Define. diff --git a/src/w32xfns.c b/src/w32xfns.c index df9acca5fb9..fbbf11bd65c 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -97,7 +97,7 @@ select_palette (FRAME_PTR f, HDC hdc) else f->output_data.w32->old_palette = NULL; - if (RealizePalette (hdc)) + if (RealizePalette (hdc) != GDI_ERROR) { Lisp_Object frame, framelist; FOR_EACH_FRAME (framelist, frame) From 0d53df48577fa3b4eb974bd3de299006a96e7bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= Date: Mon, 7 Mar 2011 21:47:55 -0500 Subject: [PATCH 043/383] * etc/themes/wombat-theme.el: New file. Also, add Lisp file tails to tsdh-*-theme.el. --- etc/ChangeLog | 4 ++ etc/themes/tsdh-dark-theme.el | 6 ++ etc/themes/tsdh-light-theme.el | 7 +++ etc/themes/wombat-theme.el | 108 +++++++++++++++++++++++++++++++++ 4 files changed, 125 insertions(+) create mode 100644 etc/themes/wombat-theme.el diff --git a/etc/ChangeLog b/etc/ChangeLog index 13f99b466a3..862ce24d29a 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2011-03-08 Kristoffer Grönlund + + * themes/wombat-theme.el: New file. + 2011-03-06 Juanma Barranquero * srecode/el.srt: Fix typo. diff --git a/etc/themes/tsdh-dark-theme.el b/etc/themes/tsdh-dark-theme.el index d15677114aa..b4fe0b59237 100644 --- a/etc/themes/tsdh-dark-theme.el +++ b/etc/themes/tsdh-dark-theme.el @@ -58,3 +58,9 @@ '(window-number-face ((t (:foreground "red" :weight bold))))) (provide-theme 'tsdh-dark) + +;; Local Variables: +;; no-byte-compile: t +;; End: + +;;; tsdh-dark-theme.el ends here diff --git a/etc/themes/tsdh-light-theme.el b/etc/themes/tsdh-light-theme.el index 9fac27fda1e..4eda7a4b7c3 100644 --- a/etc/themes/tsdh-light-theme.el +++ b/etc/themes/tsdh-light-theme.el @@ -57,3 +57,10 @@ '(window-number-face ((t (:foreground "red" :weight bold))))) (provide-theme 'tsdh-light) + + +;; Local Variables: +;; no-byte-compile: t +;; End: + +;;; tsdh-light-theme.el ends here diff --git a/etc/themes/wombat-theme.el b/etc/themes/wombat-theme.el new file mode 100644 index 00000000000..6a16b52ee24 --- /dev/null +++ b/etc/themes/wombat-theme.el @@ -0,0 +1,108 @@ +;;; wombat-theme.el --- Custom face theme for Emacs + +;; Copyright (C) 2011 Free Software Foundation, Inc. + +;; Author: Kristoffer Grönlund + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(deftheme wombat + "Theme for faces, using easy-on-the eyes colors on a dark gray background. +Adapted, with permission, from a Vim color scheme by Lars H. Nielsen. +Basic, Font Lock, Isearch, Gnus, Message, and Ansi-Color faces +are included.") + +(let ((class '((class color) (min-colors 89)))) + (custom-theme-set-faces + 'wombat + `(default ((,class (:background "#242424" :foreground "#f6f3e8")))) + `(cursor ((,class (:background "#656565" :foreground "#f6f3e8")))) + ;; Highlighting faces + `(fringe ((,class (:background "#303030")))) + `(highlight ((,class (:background "#454545" :foreground "#ffffff" + :underline t)))) + `(region ((,class (:background "#444444" :foreground "#f6f3e8")))) + `(secondary-selection ((,class (:background "#333366" :foreground "#f6f3e8")))) + `(isearch ((,class (:background "#343434" :foreground "#857b6f")))) + `(lazy-highlight ((,class (:background "#384048" :foreground "#a0a8b0")))) + ;; Mode line faces + `(mode-line ((,class (:background "#444444" :foreground "#f6f3e8")))) + `(mode-line-inactive ((,class (:background "#444444" :foreground "#857b6f")))) + ;; Escape and prompt faces + `(minibuffer-prompt ((,class (:foreground "#e5786d")))) + `(escape-glyph ((,class (:foreground "#ddaa6f" :weight bold)))) + ;; Font lock faces + `(font-lock-builtin-face ((,class (:foreground "#e5786d")))) + `(font-lock-comment-face ((,class (:foreground "#99968b")))) + `(font-lock-constant-face ((,class (:foreground "#e5786d")))) + `(font-lock-function-name-face ((,class (:foreground "#cae682")))) + `(font-lock-keyword-face ((,class (:foreground "#8ac6f2" :weight bold)))) + `(font-lock-string-face ((,class (:foreground "#95e454")))) + `(font-lock-type-face ((,class (:foreground "#92a65e" :weight bold)))) + `(font-lock-variable-name-face ((,class (:foreground "#cae682")))) + `(font-lock-warning-face ((,class (:foreground "#ccaa8f")))) + ;; Button and link faces + `(link ((,class (:foreground "#8ac6f2" :underline t)))) + `(link-visited ((,class (:foreground "#e5786d" :underline t)))) + `(button ((,class (:background "#333333" :foreground "#f6f3e8")))) + `(header-line ((,class (:background "#303030" :foreground "#e7f6da")))) + ;; Gnus faces + `(gnus-group-news-1 ((,class (:weight bold :foreground "#95e454")))) + `(gnus-group-news-1-low ((,class (:foreground "#95e454")))) + `(gnus-group-news-2 ((,class (:weight bold :foreground "#cae682")))) + `(gnus-group-news-2-low ((,class (:foreground "#cae682")))) + `(gnus-group-news-3 ((,class (:weight bold :foreground "#ccaa8f")))) + `(gnus-group-news-3-low ((,class (:foreground "#ccaa8f")))) + `(gnus-group-news-4 ((,class (:weight bold :foreground "#99968b")))) + `(gnus-group-news-4-low ((,class (:foreground "#99968b")))) + `(gnus-group-news-5 ((,class (:weight bold :foreground "#cae682")))) + `(gnus-group-news-5-low ((,class (:foreground "#cae682")))) + `(gnus-group-news-low ((,class (:foreground "#99968b")))) + `(gnus-group-mail-1 ((,class (:weight bold :foreground "#95e454")))) + `(gnus-group-mail-1-low ((,class (:foreground "#95e454")))) + `(gnus-group-mail-2 ((,class (:weight bold :foreground "#cae682")))) + `(gnus-group-mail-2-low ((,class (:foreground "#cae682")))) + `(gnus-group-mail-3 ((,class (:weight bold :foreground "#ccaa8f")))) + `(gnus-group-mail-3-low ((,class (:foreground "#ccaa8f")))) + `(gnus-group-mail-low ((,class (:foreground "#99968b")))) + `(gnus-header-content ((,class (:foreground "#8ac6f2")))) + `(gnus-header-from ((,class (:weight bold :foreground "#95e454")))) + `(gnus-header-subject ((,class (:foreground "#cae682")))) + `(gnus-header-name ((,class (:foreground "#8ac6f2")))) + `(gnus-header-newsgroups ((,class (:foreground "#cae682")))) + ;; Message faces + `(message-header-name ((,class (:foreground "#8ac6f2" :weight bold)))) + `(message-header-cc ((,class (:foreground "#95e454")))) + `(message-header-other ((,class (:foreground "#95e454")))) + `(message-header-subject ((,class (:foreground "#cae682")))) + `(message-header-to ((,class (:foreground "#cae682")))) + `(message-cited-text ((,class (:foreground "#99968b")))) + `(message-separator ((,class (:foreground "#e5786d" :weight bold)))))) + +(custom-theme-set-variables + 'wombat + '(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" + "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])) + +(provide-theme 'wombat) + +;; Local Variables: +;; no-byte-compile: t +;; End: + +;;; wombat-theme.el ends here From 2bb5649ecc88ee432a2313262b549e471c0df06a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 7 Mar 2011 21:49:20 -0500 Subject: [PATCH 044/383] * lisp/custom.el (custom-available-themes): Return themes in alphabetical order. --- lisp/ChangeLog | 5 +++++ lisp/custom.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1302bb414b2..03fbe15a616 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Chong Yidong + + * custom.el (custom-available-themes): Return themes in + alphabetical order. + 2011-03-07 Chong Yidong * progmodes/cc-cmds.el (c-beginning-of-statement): Fix incorrect diff --git a/lisp/custom.el b/lisp/custom.el index e41e7c7bdf8..923321c03c9 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1219,7 +1219,7 @@ NAME should be a symbol." (setq sym (intern (match-string 1 file))) (custom-theme-name-valid-p sym) (push sym themes))))) - (delete-dups themes))) + (nreverse (delete-dups themes)))) (defun custom-theme--load-path () (let (lpath) From be99652196fcb7a63a9c0022cdf80b978b509ac5 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 7 Mar 2011 20:28:14 -0800 Subject: [PATCH 045/383] font-lock.el tweak for bug#2159. * lisp/font-lock.el (lisp-font-lock-keywords-1): Don't highlight `)' in some setf expressions. --- lisp/ChangeLog | 5 +++++ lisp/font-lock.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 03fbe15a616..c4161e63477 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Glenn Morris + + * font-lock.el (lisp-font-lock-keywords-1): Don't highlight `)' + in some setf expressions. (Bug#2159) + 2011-03-08 Chong Yidong * custom.el (custom-available-themes): Return themes in diff --git a/lisp/font-lock.el b/lisp/font-lock.el index b7b617fcffe..988e821d7e2 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -2242,7 +2242,7 @@ in which C preprocessor directives are used. e.g. `asm-mode' and "\\)\\)\\>" ;; Any whitespace and defined object. "[ \t'\(]*" - "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?") + "\\(setf[ \t]+\\sw+\\|\\sw+\\)?") (1 font-lock-keyword-face) (9 (cond ((match-beginning 3) font-lock-function-name-face) ((match-beginning 6) font-lock-variable-name-face) From bb3865e8ac9b8821e963dbbbb30c5b2a7a955de2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 7 Mar 2011 20:31:57 -0800 Subject: [PATCH 046/383] Doc fix for bug#8193. * doc/emacs/display.texi (Optional Mode Line): Don't mention exactly where display-time appears (it was wrong anyway). --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/display.texi | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index dfdef6a0b05..a2708b454f4 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Glenn Morris + + * display.texi (Optional Mode Line): Don't mention exactly where + display-time appears. (Bug#8193) + 2011-03-06 Chong Yidong * search.texi (Isearch Yank): C-y now bound to isearch-yank-kill. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index a21b660ee21..5eaf2e7e3ca 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -999,8 +999,7 @@ value is 200 characters. Emacs can optionally display the time and system load in all mode lines. To enable this feature, type @kbd{M-x display-time} or customize the option @code{display-time-mode}. The information added to the mode -line usually appears after the buffer name, before the mode names and -their parentheses. It looks like this: +line looks like this: @example @var{hh}:@var{mm}pm @var{l.ll} From e9c8529f6a9a38b35fbb9814c22b98e6099cddd2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 7 Mar 2011 20:34:31 -0800 Subject: [PATCH 047/383] cus-start.el fix for bug#8192. * lisp/cus-start.el (cursor-in-non-selected-windows): Fix :set quoting oddness. --- lisp/ChangeLog | 3 +++ lisp/cus-start.el | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c4161e63477..e96200885a0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-08 Glenn Morris + * cus-start.el (cursor-in-non-selected-windows): + Fix :set quoting oddness. (Bug#8192) + * font-lock.el (lisp-font-lock-keywords-1): Don't highlight `)' in some setf expressions. (Bug#2159) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index d2d99ee64fb..788731e4dbc 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -111,9 +111,9 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of (cursor-in-non-selected-windows cursor boolean nil :tag "Cursor In Non-selected Windows" - :set #'(lambda (symbol value) - (set-default symbol value) - (force-mode-line-update t))) + :set (lambda (symbol value) + (set-default symbol value) + (force-mode-line-update t))) (transient-mark-mode editing-basics boolean nil :standard (not noninteractive) :initialize custom-initialize-delay From 2735d0606bd871584b2e6343f3dce4c1a155b296 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 20:37:19 -0800 Subject: [PATCH 048/383] * coding.c (Fdefine_coding_system_internal): Don't redeclare 'i' inside a block, when the outer 'i' will do. (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule): (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022): (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5): (decode_coding_raw_text, decode_coding_charset, get_translation_table): (Fdecode_sjis_char, Fdefine_coding_system_internal): Rename locals to avoid shadowing. * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise. --- src/ChangeLog | 9 +++++ src/character.h | 8 ++-- src/coding.c | 101 ++++++++++++++++++++++++------------------------ 3 files changed, 63 insertions(+), 55 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b88ff2ccbb4..bbcc067fecd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -41,6 +41,15 @@ * coding.c (coding_set_source, coding_set_destination): Use "else { /* comment */ }" rather than "else /* comment */;" for clarity, and to avoid gcc -Wempty-body warning. + (Fdefine_coding_system_internal): Don't redeclare 'i' inside + a block, when the outer 'i' will do. + (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule): + (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022): + (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5): + (decode_coding_raw_text, decode_coding_charset, get_translation_table): + (Fdecode_sjis_char, Fdefine_coding_system_internal): + Rename locals to avoid shadowing. + * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise. 2011-03-06 Chong Yidong diff --git a/src/character.h b/src/character.h index fb29ced66b7..d29ab41557b 100644 --- a/src/character.h +++ b/src/character.h @@ -356,11 +356,11 @@ along with GNU Emacs. If not, see . */ CHARIDX++; \ if (STRING_MULTIBYTE (STRING)) \ { \ - unsigned char *ptr = &SDATA (STRING)[BYTEIDX]; \ - int len; \ + unsigned char *string_ptr = &SDATA (STRING)[BYTEIDX]; \ + int string_len; \ \ - OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len); \ - BYTEIDX += len; \ + OUTPUT = STRING_CHAR_AND_LENGTH (string_ptr, string_len); \ + BYTEIDX += string_len; \ } \ else \ { \ diff --git a/src/coding.c b/src/coding.c index cb13793daba..495e8148b05 100644 --- a/src/coding.c +++ b/src/coding.c @@ -1320,7 +1320,7 @@ decode_coding_utf_8 (struct coding_system *coding) int multibytep = coding->src_multibyte; enum utf_bom_type bom = CODING_UTF_8_BOM (coding); Lisp_Object attr, charset_list; - int eol_crlf = + int eol_dos = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); int byte_after_cr = -1; @@ -1381,7 +1381,7 @@ decode_coding_utf_8 (struct coding_system *coding) } else if (UTF_8_1_OCTET_P (c1)) { - if (eol_crlf && c1 == '\r') + if (eol_dos && c1 == '\r') ONE_MORE_BYTE (byte_after_cr); c = c1; } @@ -1639,7 +1639,7 @@ decode_coding_utf_16 (struct coding_system *coding) enum utf_16_endian_type endian = CODING_UTF_16_ENDIAN (coding); int surrogate = CODING_UTF_16_SURROGATE (coding); Lisp_Object attr, charset_list; - int eol_crlf = + int eol_dos = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); int byte_after_cr1 = -1, byte_after_cr2 = -1; @@ -1736,7 +1736,7 @@ decode_coding_utf_16 (struct coding_system *coding) CODING_UTF_16_SURROGATE (coding) = surrogate = c; else { - if (eol_crlf && c == '\r') + if (eol_dos && c == '\r') { ONE_MORE_BYTE (byte_after_cr1); ONE_MORE_BYTE (byte_after_cr2); @@ -1920,17 +1920,17 @@ detect_coding_emacs_mule (struct coding_system *coding, it because analyzing it is too heavy for detecting. But, at least, we check that the composite character constitutes of more than 4 bytes. */ - const unsigned char *src_base; + const unsigned char *src_start; repeat: - src_base = src; + src_start = src; do { ONE_MORE_BYTE (c); } while (c >= 0xA0); - if (src - src_base <= 4) + if (src - src_start <= 4) break; found = CATEGORY_MASK_EMACS_MULE; if (c == 0x80) @@ -1990,7 +1990,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, const unsigned char *src_end = coding->source + coding->src_bytes; const unsigned char *src_base = src; int multibytep = coding->src_multibyte; - int charset_id; + int charset_ID; unsigned code; int c; int consumed_chars = 0; @@ -2000,7 +2000,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, if (c < 0) { c = -c; - charset_id = emacs_mule_charset[0]; + charset_ID = emacs_mule_charset[0]; } else { @@ -2036,7 +2036,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, switch (emacs_mule_bytes[c]) { case 2: - if ((charset_id = emacs_mule_charset[c]) < 0) + if ((charset_ID = emacs_mule_charset[c]) < 0) goto invalid_code; ONE_MORE_BYTE (c); if (c < 0xA0) @@ -2049,7 +2049,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, || c == EMACS_MULE_LEADING_CODE_PRIVATE_12) { ONE_MORE_BYTE (c); - if (c < 0xA0 || (charset_id = emacs_mule_charset[c]) < 0) + if (c < 0xA0 || (charset_ID = emacs_mule_charset[c]) < 0) goto invalid_code; ONE_MORE_BYTE (c); if (c < 0xA0) @@ -2058,7 +2058,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, } else { - if ((charset_id = emacs_mule_charset[c]) < 0) + if ((charset_ID = emacs_mule_charset[c]) < 0) goto invalid_code; ONE_MORE_BYTE (c); if (c < 0xA0) @@ -2073,7 +2073,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, case 4: ONE_MORE_BYTE (c); - if (c < 0 || (charset_id = emacs_mule_charset[c]) < 0) + if (c < 0 || (charset_ID = emacs_mule_charset[c]) < 0) goto invalid_code; ONE_MORE_BYTE (c); if (c < 0xA0) @@ -2087,21 +2087,21 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, case 1: code = c; - charset_id = ASCII_BYTE_P (code) ? charset_ascii : charset_eight_bit; + charset_ID = ASCII_BYTE_P (code) ? charset_ascii : charset_eight_bit; break; default: abort (); } CODING_DECODE_CHAR (coding, src, src_base, src_end, - CHARSET_FROM_ID (charset_id), code, c); + CHARSET_FROM_ID (charset_ID), code, c); if (c < 0) goto invalid_code; } *nbytes = src - src_base; *nchars = consumed_chars; if (id) - *id = charset_id; + *id = charset_ID; return (mseq_found ? -c : c); no_more_source: @@ -2374,7 +2374,7 @@ decode_coding_emacs_mule (struct coding_system *coding) int char_offset = coding->produced_char; int last_offset = char_offset; int last_id = charset_ascii; - int eol_crlf = + int eol_dos = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); int byte_after_cr = -1; struct composition_status *cmp_status = &coding->spec.emacs_mule.cmp_status; @@ -2424,7 +2424,7 @@ decode_coding_emacs_mule (struct coding_system *coding) if (c < 0x80) { - if (eol_crlf && c == '\r') + if (eol_dos && c == '\r') ONE_MORE_BYTE (byte_after_cr); id = charset_ascii; if (cmp_status->state != COMPOSING_NO) @@ -3160,7 +3160,7 @@ detect_coding_iso_2022 (struct coding_system *coding, if (! single_shifting && ! (rejected & CATEGORY_MASK_ISO_8_2)) { - int i = 1; + int len = 1; while (src < src_end) { src_base = src; @@ -3170,20 +3170,20 @@ detect_coding_iso_2022 (struct coding_system *coding, src = src_base; break; } - i++; + len++; } - if (i & 1 && src < src_end) + if (len & 1 && src < src_end) { rejected |= CATEGORY_MASK_ISO_8_2; if (composition_count >= 0) - composition_count += i; + composition_count += len; } else { found |= CATEGORY_MASK_ISO_8_2; if (composition_count >= 0) - composition_count += i / 2; + composition_count += len / 2; } } break; @@ -3311,10 +3311,10 @@ detect_coding_iso_2022 (struct coding_system *coding, } \ else /* new format (after ver.21) */ \ { \ - int c; \ + int b; \ \ - ONE_MORE_BYTE (c); \ - rule = COMPOSITION_ENCODE_RULE (rule - 81, c - 32); \ + ONE_MORE_BYTE (b); \ + rule = COMPOSITION_ENCODE_RULE (rule - 81, b - 32); \ if (rule >= 0) \ rule += 0x100; /* to destinguish it from the old format */ \ nbytes = 2; \ @@ -3506,7 +3506,7 @@ decode_coding_iso_2022 (struct coding_system *coding) int char_offset = coding->produced_char; int last_offset = char_offset; int last_id = charset_ascii; - int eol_crlf = + int eol_dos = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); int byte_after_cr = -1; int i; @@ -3626,7 +3626,7 @@ decode_coding_iso_2022 (struct coding_system *coding) break; case ISO_control_0: - if (eol_crlf && c1 == '\r') + if (eol_dos && c1 == '\r') ONE_MORE_BYTE (byte_after_cr); MAYBE_FINISH_COMPOSITION (); charset = CHARSET_FROM_ID (charset_ascii); @@ -4031,7 +4031,6 @@ decode_coding_iso_2022 (struct coding_system *coding) const char *intermediate_char_94 = "()*+"; \ const char *intermediate_char_96 = ",-./"; \ int revision = -1; \ - int c; \ \ if (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_REVISION) \ revision = CHARSET_ISO_REVISION (charset); \ @@ -4044,11 +4043,12 @@ decode_coding_iso_2022 (struct coding_system *coding) EMIT_ONE_ASCII_BYTE (ISO_CODE_ESC); \ if (CHARSET_DIMENSION (charset) == 1) \ { \ + int b; \ if (! CHARSET_ISO_CHARS_96 (charset)) \ - c = intermediate_char_94[reg]; \ + b = intermediate_char_94[reg]; \ else \ - c = intermediate_char_96[reg]; \ - EMIT_ONE_ASCII_BYTE (c); \ + b = intermediate_char_96[reg]; \ + EMIT_ONE_ASCII_BYTE (b); \ } \ else \ { \ @@ -4709,7 +4709,7 @@ decode_coding_sjis (struct coding_system *coding) int char_offset = coding->produced_char; int last_offset = char_offset; int last_id = charset_ascii; - int eol_crlf = + int eol_dos = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); int byte_after_cr = -1; @@ -4744,7 +4744,7 @@ decode_coding_sjis (struct coding_system *coding) goto invalid_code; if (c < 0x80) { - if (eol_crlf && c == '\r') + if (eol_dos && c == '\r') ONE_MORE_BYTE (byte_after_cr); charset = charset_roman; } @@ -4826,7 +4826,7 @@ decode_coding_big5 (struct coding_system *coding) int char_offset = coding->produced_char; int last_offset = char_offset; int last_id = charset_ascii; - int eol_crlf = + int eol_dos = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); int byte_after_cr = -1; @@ -4859,7 +4859,7 @@ decode_coding_big5 (struct coding_system *coding) goto invalid_code; if (c < 0x80) { - if (eol_crlf && c == '\r') + if (eol_dos && c == '\r') ONE_MORE_BYTE (byte_after_cr); charset = charset_roman; } @@ -5263,13 +5263,13 @@ encode_coding_ccl (struct coding_system *coding) static void decode_coding_raw_text (struct coding_system *coding) { - int eol_crlf = + int eol_dos = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); coding->chars_at_source = 1; coding->consumed_char = coding->src_chars; coding->consumed = coding->src_bytes; - if (eol_crlf && coding->source[coding->src_bytes - 1] == '\r') + if (eol_dos && coding->source[coding->src_bytes - 1] == '\r') { coding->consumed_char--; coding->consumed--; @@ -5482,7 +5482,7 @@ decode_coding_charset (struct coding_system *coding) int char_offset = coding->produced_char; int last_offset = char_offset; int last_id = charset_ascii; - int eol_crlf = + int eol_dos = !inhibit_eol_conversion && EQ (CODING_ID_EOL_TYPE (coding->id), Qdos); int byte_after_cr = -1; @@ -5516,7 +5516,7 @@ decode_coding_charset (struct coding_system *coding) else { ONE_MORE_BYTE (c); - if (eol_crlf && c == '\r') + if (eol_dos && c == '\r') ONE_MORE_BYTE (byte_after_cr); } if (c < 0) @@ -6609,15 +6609,15 @@ get_translation_table (Lisp_Object attrs, int encodep, int *max_lookup) } else if (CONSP (translation_table)) { - Lisp_Object tail, val; + Lisp_Object tail; for (tail = translation_table; CONSP (tail); tail = XCDR (tail)) if (CHAR_TABLE_P (XCAR (tail)) && CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (XCAR (tail))) > 1) { - val = XCHAR_TABLE (XCAR (tail))->extras[1]; - if (NATNUMP (val) && *max_lookup < XFASTINT (val)) - *max_lookup = XFASTINT (val); + Lisp_Object tailval = XCHAR_TABLE (XCAR (tail))->extras[1]; + if (NATNUMP (tailval) && *max_lookup < XFASTINT (tailval)) + *max_lookup = XFASTINT (tailval); } } } @@ -9114,10 +9114,10 @@ Return the corresponding character. */) } else { - int s1 = c >> 8, s2 = c & 0xFF; + int c1 = c >> 8, c2 = c & 0xFF; - if (s1 < 0x81 || (s1 > 0x9F && s1 < 0xE0) || s1 > 0xEF - || s2 < 0x40 || s2 == 0x7F || s2 > 0xFC) + if (c1 < 0x81 || (c1 > 0x9F && c1 < 0xE0) || c1 > 0xEF + || c2 < 0x40 || c2 == 0x7F || c2 > 0xFC) error ("Invalid code: %d", code); SJIS_TO_JIS (c); charset = charset_kanji; @@ -9800,7 +9800,6 @@ usage: (define-coding-system-internal ...) */) else if (EQ (coding_type, Qiso_2022)) { Lisp_Object initial, reg_usage, request, flags; - int i; if (nargs < coding_arg_iso2022_max) goto short_args; @@ -9832,12 +9831,12 @@ usage: (define-coding-system-internal ...) */) for (tail = request; ! NILP (tail); tail = Fcdr (tail)) { int id; - Lisp_Object tmp; + Lisp_Object tmp1; val = Fcar (tail); CHECK_CONS (val); - tmp = XCAR (val); - CHECK_CHARSET_GET_ID (tmp, id); + tmp1 = XCAR (val); + CHECK_CHARSET_GET_ID (tmp1, id); CHECK_NATNUM_CDR (val); if (XINT (XCDR (val)) >= 4) error ("Invalid graphic register number: %d", XINT (XCDR (val))); From e2f1bab96318b2809aad624ee9bbbdfd7fd6dd6e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 20:41:22 -0800 Subject: [PATCH 049/383] * coding.c (emacs_mule_char, encode_invocation_designation): Now static, since they're not used elsewhere. --- src/ChangeLog | 2 ++ src/coding.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bbcc067fecd..3a5a4c97628 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -50,6 +50,8 @@ (Fdecode_sjis_char, Fdefine_coding_system_internal): Rename locals to avoid shadowing. * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise. + * coding.c (emacs_mule_char, encode_invocation_designation): + Now static, since they're not used elsewhere. 2011-03-06 Chong Yidong diff --git a/src/coding.c b/src/coding.c index 495e8148b05..4fdbd1fd752 100644 --- a/src/coding.c +++ b/src/coding.c @@ -1982,7 +1982,7 @@ detect_coding_emacs_mule (struct coding_system *coding, the decoded character or rule. If an invalid byte is found, return -1. If SRC is too short, return -2. */ -int +static int emacs_mule_char (struct coding_system *coding, const unsigned char *src, int *nbytes, int *nchars, int *id, struct composition_status *cmp_status) @@ -4228,7 +4228,7 @@ decode_coding_iso_2022 (struct coding_system *coding) to use CHARSET. The element `spec.iso_2022' of *CODING is updated. Return new DST. */ -unsigned char * +static unsigned char * encode_invocation_designation (struct charset *charset, struct coding_system *coding, unsigned char *dst, int *p_nchars) From 25bbfb31d5a71dee8d6049e9bbe10dd7d4b65db9 Mon Sep 17 00:00:00 2001 From: Arni Magnusson Date: Mon, 7 Mar 2011 20:42:40 -0800 Subject: [PATCH 050/383] texinfo.el addition for bug#2783. * lisp/textmodes/texinfo.el (texinfo-environments): Add deftypecv, deftypeivar, deftypemethod, deftypeop, html. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/texinfo.el | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e96200885a0..6aa6993a70a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Arni Magnusson (tiny change) + + * textmodes/texinfo.el (texinfo-environments): + Add deftypecv, deftypeivar, deftypemethod, deftypeop, html. (Bug#2783) + 2011-03-08 Glenn Morris * cus-start.el (cursor-in-non-selected-windows): diff --git a/lisp/textmodes/texinfo.el b/lisp/textmodes/texinfo.el index dfd12a005a9..7e9ce9aff6d 100644 --- a/lisp/textmodes/texinfo.el +++ b/lisp/textmodes/texinfo.el @@ -318,11 +318,12 @@ chapter." (defconst texinfo-environments '("cartouche" "copying" "defcv" "deffn" "defivar" "defmac" - "defmethod" "defop" "defopt" "defspec" "deftp" "deftypefn" - "deftypefun" "deftypevar" "deftypevr" "defun" "defvar" + "defmethod" "defop" "defopt" "defspec" "deftp" "deftypecv" + "deftypefn" "deftypefun" "deftypeivar" "deftypemethod" + "deftypeop" "deftypevar" "deftypevr" "defun" "defvar" "defvr" "description" "detailmenu" "direntry" "display" "documentdescription" "enumerate" "example" "flushleft" - "flushright" "format" "ftable" "group" "ifclear" "ifset" + "flushright" "format" "ftable" "group" "html" "ifclear" "ifset" "ifhtml" "ifinfo" "ifnothtml" "ifnotinfo" "ifnotplaintext" "ifnottex" "ifplaintext" "iftex" "ignore" "itemize" "lisp" "macro" "menu" "multitable" "quotation" "smalldisplay" From 413bb2db753528a2e4bd70f8bbabcd232b11b6d7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 21:28:41 -0800 Subject: [PATCH 051/383] * coding.c (decode_coding_iso_2022): Add "default: abort ();" as a safety check. --- src/ChangeLog | 1 + src/coding.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 3a5a4c97628..1b518a6341c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -52,6 +52,7 @@ * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise. * coding.c (emacs_mule_char, encode_invocation_designation): Now static, since they're not used elsewhere. + (decode_coding_iso_2022): Add "default: abort ();" as a safety check. 2011-03-06 Chong Yidong diff --git a/src/coding.c b/src/coding.c index 4fdbd1fd752..c9d32489351 100644 --- a/src/coding.c +++ b/src/coding.c @@ -3899,6 +3899,10 @@ decode_coding_iso_2022 (struct coding_system *coding) } continue; } + break; + + default: + abort (); } if (cmp_status->state == COMPOSING_NO From c4a63b128d3f8405fa1037e0c22bd8fabcbdd123 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 23:12:45 -0800 Subject: [PATCH 052/383] * coding.c: (decode_coding_object, encode_coding_object, detect_coding_system): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. --- src/ChangeLog | 3 +++ src/coding.c | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1b518a6341c..ae111aef44c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -53,6 +53,9 @@ * coding.c (emacs_mule_char, encode_invocation_designation): Now static, since they're not used elsewhere. (decode_coding_iso_2022): Add "default: abort ();" as a safety check. + (decode_coding_object, encode_coding_object, detect_coding_system): + Mark variables that gcc -Wuninitialized does not deduce are never + used uninitialized. 2011-03-06 Chong Yidong diff --git a/src/coding.c b/src/coding.c index c9d32489351..75fc92eee8d 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7658,12 +7658,12 @@ decode_coding_object (struct coding_system *coding, Lisp_Object dst_object) { int count = SPECPDL_INDEX (); - unsigned char *destination; - EMACS_INT dst_bytes; + unsigned char *destination IF_LINT (= NULL); + EMACS_INT dst_bytes IF_LINT (= 0); EMACS_INT chars = to - from; EMACS_INT bytes = to_byte - from_byte; Lisp_Object attrs; - int saved_pt = -1, saved_pt_byte; + int saved_pt = -1, saved_pt_byte IF_LINT (= 0); int need_marker_adjustment = 0; Lisp_Object old_deactivate_mark; @@ -7851,7 +7851,7 @@ encode_coding_object (struct coding_system *coding, EMACS_INT chars = to - from; EMACS_INT bytes = to_byte - from_byte; Lisp_Object attrs; - int saved_pt = -1, saved_pt_byte; + int saved_pt = -1, saved_pt_byte IF_LINT (= 0); int need_marker_adjustment = 0; int kill_src_buffer = 0; Lisp_Object old_deactivate_mark; @@ -8184,8 +8184,8 @@ detect_coding_system (const unsigned char *src, base_category = XINT (CODING_ATTR_CATEGORY (attrs)); if (base_category == coding_category_undecided) { - enum coding_category category; - struct coding_system *this; + enum coding_category category IF_LINT (= 0); + struct coding_system *this IF_LINT (= NULL); int c, i; /* Skip all ASCII bytes except for a few ISO2022 controls. */ From 5f58e762f919864376efe785253006590a1e4dc5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 23:23:55 -0800 Subject: [PATCH 053/383] * coding.c: (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT): (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P): (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER): (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R): Remove unused macros. --- src/ChangeLog | 5 +++++ src/coding.c | 57 +-------------------------------------------------- 2 files changed, 6 insertions(+), 56 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ae111aef44c..fdc9fb126ed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -56,6 +56,11 @@ (decode_coding_object, encode_coding_object, detect_coding_system): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. + (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT): + (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P): + (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER): + (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R): + Remove unused macros. 2011-03-06 Chong Yidong diff --git a/src/coding.c b/src/coding.c index 75fc92eee8d..3df34cea173 100644 --- a/src/coding.c +++ b/src/coding.c @@ -395,8 +395,6 @@ Lisp_Object Vbig5_coding_system; /* Control characters of ISO2022. */ /* code */ /* function */ -#define ISO_CODE_LF 0x0A /* line-feed */ -#define ISO_CODE_CR 0x0D /* carriage-return */ #define ISO_CODE_SO 0x0E /* shift-out */ #define ISO_CODE_SI 0x0F /* shift-in */ #define ISO_CODE_SS2_7 0x19 /* single-shift-2 for 7-bit code */ @@ -479,7 +477,7 @@ enum iso_code_class_type #define CODING_ISO_FLAG_COMPOSITION 0x2000 -#define CODING_ISO_FLAG_EUC_TW_SHIFT 0x4000 +/* #define CODING_ISO_FLAG_EUC_TW_SHIFT 0x4000 */ #define CODING_ISO_FLAG_USE_ROMAN 0x8000 @@ -721,25 +719,6 @@ static struct coding_system coding_categories[coding_category_max]; } while (0) -#define ONE_MORE_BYTE_NO_CHECK(c) \ - do { \ - c = *src++; \ - if (multibytep && (c & 0x80)) \ - { \ - if ((c & 0xFE) == 0xC0) \ - c = ((c & 1) << 6) | *src++; \ - else \ - { \ - src--; \ - c = - string_char (src, &src, NULL); \ - record_conversion_result \ - (coding, CODING_RESULT_INVALID_SRC); \ - } \ - } \ - consumed_chars++; \ - } while (0) - - /* Store a byte C in the place pointed by DST and increment DST to the next free point, and increment PRODUCED_CHARS. The caller should assure that C is 0..127, and declare and set the variable `dst' @@ -1219,7 +1198,6 @@ alloc_destination (struct coding_system *coding, EMACS_INT nbytes, #define UTF_8_4_OCTET_LEADING_P(c) (((c) & 0xF8) == 0xF0) #define UTF_8_5_OCTET_LEADING_P(c) (((c) & 0xFC) == 0xF8) -#define UTF_BOM 0xFEFF #define UTF_8_BOM_1 0xEF #define UTF_8_BOM_2 0xBB #define UTF_8_BOM_3 0xBF @@ -1535,11 +1513,6 @@ encode_coding_utf_8 (struct coding_system *coding) #define UTF_16_LOW_SURROGATE_P(val) \ (((val) & 0xFC00) == 0xDC00) -#define UTF_16_INVALID_P(val) \ - (((val) == 0xFFFE) \ - || ((val) == 0xFFFF) \ - || UTF_16_LOW_SURROGATE_P (val)) - static int detect_coding_utf_16 (struct coding_system *coding, @@ -2905,10 +2878,6 @@ enum iso_code_class_type iso_code_class[256]; ((id) <= (coding)->max_charset_id \ && (coding)->safe_charsets[id] != 255) - -#define SHIFT_OUT_OK(category) \ - (CODING_ISO_INITIAL (&coding_categories[category], 1) >= 0) - static void setup_iso_safe_charsets (Lisp_Object attrs) { @@ -4295,30 +4264,6 @@ encode_invocation_designation (struct charset *charset, return dst; } -/* The following three macros produce codes for indicating direction - of text. */ -#define ENCODE_CONTROL_SEQUENCE_INTRODUCER \ - do { \ - if (CODING_ISO_FLAGS (coding) == CODING_ISO_FLAG_SEVEN_BITS) \ - EMIT_TWO_ASCII_BYTES (ISO_CODE_ESC, '['); \ - else \ - EMIT_ONE_BYTE (ISO_CODE_CSI); \ - } while (0) - - -#define ENCODE_DIRECTION_R2L() \ - do { \ - ENCODE_CONTROL_SEQUENCE_INTRODUCER (dst); \ - EMIT_TWO_ASCII_BYTES ('2', ']'); \ - } while (0) - - -#define ENCODE_DIRECTION_L2R() \ - do { \ - ENCODE_CONTROL_SEQUENCE_INTRODUCER (dst); \ - EMIT_TWO_ASCII_BYTES ('0', ']'); \ - } while (0) - /* Produce codes for designation and invocation to reset the graphic planes and registers to initial state. */ From ee05f96119932f5e4f33b59e1a2f4abdd9c0a34a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 23:34:38 -0800 Subject: [PATCH 054/383] * coding.c (decode_coding_emacs_mule): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. --- src/ChangeLog | 4 ++-- src/coding.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fdc9fb126ed..07a7c1736ce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -54,8 +54,8 @@ Now static, since they're not used elsewhere. (decode_coding_iso_2022): Add "default: abort ();" as a safety check. (decode_coding_object, encode_coding_object, detect_coding_system): - Mark variables that gcc -Wuninitialized does not deduce are never - used uninitialized. + (decode_coding_emacs_mule): Mark variables that gcc + -Wuninitialized does not deduce are never used uninitialized. (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT): (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P): (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER): diff --git a/src/coding.c b/src/coding.c index 3df34cea173..096268d1a72 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2365,7 +2365,7 @@ decode_coding_emacs_mule (struct coding_system *coding) while (1) { - int c, id; + int c, id IF_LINT (= 0); src_base = src; consumed_chars_base = consumed_chars; @@ -2410,7 +2410,7 @@ decode_coding_emacs_mule (struct coding_system *coding) } else { - int nchars, nbytes; + int nchars IF_LINT (= 0), nbytes IF_LINT (= 0); /* emacs_mule_char can load a charset map from a file, which allocates a large structure and might cause buffer text to be relocated as result. Thus, we need to remember the From 160b01f65a12a9e6893c270662d6ae249a1db300 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 23:36:31 -0800 Subject: [PATCH 055/383] * coding.c (detect_coding_iso_2022): Initialize a local variable that might be used uninitialized. Leave a FIXME because it's not clear that this initialization is needed. --- src/ChangeLog | 3 +++ src/coding.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 07a7c1736ce..2020fa3bb11 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -56,6 +56,9 @@ (decode_coding_object, encode_coding_object, detect_coding_system): (decode_coding_emacs_mule): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. + (detect_coding_iso_2022): Initialize a local variable that might + be used uninitialized. Leave a FIXME because it's not clear that + this initialization is needed. (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT): (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P): (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER): diff --git a/src/coding.c b/src/coding.c index 096268d1a72..9a6a4484e50 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2954,7 +2954,12 @@ detect_coding_iso_2022 (struct coding_system *coding, const unsigned char *src_end = coding->source + coding->src_bytes; int multibytep = coding->src_multibyte; int single_shifting = 0; - int id; + + /* FIXME: Does ID need to be initialized here? The "End of composition" + code below does not initialize ID even though ID is used + afterwards, and perhaps that is a bug. */ + int id = 0; + int c, c1; int consumed_chars = 0; int i; From 232b38b960b67b75f6c6ce47426ce49488ad9d15 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 23:38:52 -0800 Subject: [PATCH 056/383] * category.c (hash_get_category_set): Remove unused local var. --- src/ChangeLog | 2 ++ src/category.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2020fa3bb11..a073e269091 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -65,6 +65,8 @@ (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R): Remove unused macros. + * category.c (hash_get_category_set): Remove unused local var. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/category.c b/src/category.c index bcd73d3a487..abe4609d02e 100644 --- a/src/category.c +++ b/src/category.c @@ -61,7 +61,6 @@ static Lisp_Object hash_get_category_set (Lisp_Object, Lisp_Object); static Lisp_Object hash_get_category_set (Lisp_Object table, Lisp_Object category_set) { - Lisp_Object val; struct Lisp_Hash_Table *h; int i; unsigned hash; @@ -538,4 +537,3 @@ See the documentation of the variable `word-combining-categories'. */); category_table_version = 0; } - From 9f3b5e6926e3a127df87e7829e30d4cd59fecbcf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 23:39:53 -0800 Subject: [PATCH 057/383] * category.c (copy_category_table): Now static, since it's not used elsewhere. --- src/ChangeLog | 1 + src/category.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a073e269091..f0a12a7c5d1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -66,6 +66,7 @@ Remove unused macros. * category.c (hash_get_category_set): Remove unused local var. + (copy_category_table): Now static, since it's not used elsewhere. 2011-03-06 Chong Yidong diff --git a/src/category.c b/src/category.c index abe4609d02e..cc7ff88474f 100644 --- a/src/category.c +++ b/src/category.c @@ -227,7 +227,7 @@ copy_category_entry (Lisp_Object table, Lisp_Object c, Lisp_Object val) the original and the copy. This function is called recursively by binding TABLE to a sub char table. */ -Lisp_Object +static Lisp_Object copy_category_table (Lisp_Object table) { table = copy_char_table (table); From fb90da1b9b967f4dba5360615acab0e1cac37796 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 23:48:20 -0800 Subject: [PATCH 058/383] * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string): (Fregister_code_conversion_map): Rename locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/ccl.c | 57 +++++++++++++++++++++++++-------------------------- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f0a12a7c5d1..2b894e9a511 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -68,6 +68,9 @@ * category.c (hash_get_category_set): Remove unused local var. (copy_category_table): Now static, since it's not used elsewhere. + * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string): + (Fregister_code_conversion_map): Rename locals to avoid shadowing. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/ccl.c b/src/ccl.c index 411c041b22a..5428e94c69a 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -758,18 +758,18 @@ while(0) buffer. */ #define CCL_WRITE_STRING(len) \ do { \ - int i; \ + int ccli; \ if (!dst) \ CCL_INVALID_CMD; \ else if (dst + len <= dst_end) \ { \ if (XFASTINT (ccl_prog[ic]) & 0x1000000) \ - for (i = 0; i < len; i++) \ - *dst++ = XFASTINT (ccl_prog[ic + i]) & 0xFFFFFF; \ + for (ccli = 0; ccli < len; ccli++) \ + *dst++ = XFASTINT (ccl_prog[ic + ccli]) & 0xFFFFFF; \ else \ - for (i = 0; i < len; i++) \ - *dst++ = ((XFASTINT (ccl_prog[ic + (i / 3)])) \ - >> ((2 - (i % 3)) * 8)) & 0xFF; \ + for (ccli = 0; ccli < len; ccli++) \ + *dst++ = ((XFASTINT (ccl_prog[ic + (ccli / 3)])) \ + >> ((2 - (ccli % 3)) * 8)) & 0xFF; \ } \ else \ CCL_SUSPEND (CCL_STAT_SUSPEND_BY_DST); \ @@ -806,15 +806,15 @@ while(0) #define CCL_ENCODE_CHAR(c, charset_list, id, encoded) \ do { \ - unsigned code; \ + unsigned ncode; \ \ - charset = char_charset ((c), (charset_list), &code); \ + charset = char_charset ((c), (charset_list), &ncode); \ if (! charset && ! NILP (charset_list)) \ - charset = char_charset ((c), Qnil, &code); \ + charset = char_charset ((c), Qnil, &ncode); \ if (charset) \ { \ (id) = CHARSET_ID (charset); \ - (encoded) = code; \ + (encoded) = ncode; \ } \ } while (0) @@ -2092,22 +2092,22 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY { const unsigned char *p = SDATA (str) + consumed_bytes; const unsigned char *endp = SDATA (str) + str_bytes; - int i = 0; + int j = 0; int *src, src_size; if (endp - p == str_chars - consumed_chars) - while (i < CCL_EXECUTE_BUF_SIZE && p < endp) - source[i++] = *p++; + while (j < CCL_EXECUTE_BUF_SIZE && p < endp) + source[j++] = *p++; else - while (i < CCL_EXECUTE_BUF_SIZE && p < endp) - source[i++] = STRING_CHAR_ADVANCE (p); - consumed_chars += i; + while (j < CCL_EXECUTE_BUF_SIZE && p < endp) + source[j++] = STRING_CHAR_ADVANCE (p); + consumed_chars += j; consumed_bytes = p - SDATA (str); if (consumed_bytes == str_bytes) ccl.last_block = NILP (contin); src = source; - src_size = i; + src_size = j; while (1) { ccl_driver (&ccl, src, destination, src_size, CCL_EXECUTE_BUF_SIZE, @@ -2123,8 +2123,8 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY outbuf = (unsigned char *) xrealloc (outbuf, outbufsize); outp = outbuf + offset; } - for (i = 0; i < ccl.produced; i++) - CHAR_STRING_ADVANCE (destination[i], outp); + for (j = 0; j < ccl.produced; j++) + CHAR_STRING_ADVANCE (destination[j], outp); } else { @@ -2135,8 +2135,8 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY outbuf = (unsigned char *) xrealloc (outbuf, outbufsize); outp = outbuf + offset; } - for (i = 0; i < ccl.produced; i++) - *outp++ = destination[i]; + for (j = 0; j < ccl.produced; j++) + *outp++ = destination[j]; } src += ccl.consumed; src_size -= ccl.consumed; @@ -2253,7 +2253,7 @@ Return index number of the registered map. */) { int len = ASIZE (Vcode_conversion_map_vector); int i; - Lisp_Object index; + Lisp_Object idx; CHECK_SYMBOL (symbol); CHECK_VECTOR (map); @@ -2267,11 +2267,11 @@ Return index number of the registered map. */) if (EQ (symbol, XCAR (slot))) { - index = make_number (i); + idx = make_number (i); XSETCDR (slot, map); Fput (symbol, Qcode_conversion_map, map); - Fput (symbol, Qcode_conversion_map_id, index); - return index; + Fput (symbol, Qcode_conversion_map_id, idx); + return idx; } } @@ -2279,11 +2279,11 @@ Return index number of the registered map. */) Vcode_conversion_map_vector = larger_vector (Vcode_conversion_map_vector, len * 2, Qnil); - index = make_number (i); + idx = make_number (i); Fput (symbol, Qcode_conversion_map, map); - Fput (symbol, Qcode_conversion_map_id, index); + Fput (symbol, Qcode_conversion_map_id, idx); ASET (Vcode_conversion_map_vector, i, Fcons (symbol, map)); - return index; + return idx; } @@ -2341,4 +2341,3 @@ used by CCL. */); defsubr (&Sregister_ccl_program); defsubr (&Sregister_code_conversion_map); } - From d0891610cbb712da0acf7ef435a93b7b2d37579d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 7 Mar 2011 23:49:41 -0800 Subject: [PATCH 059/383] * character.c (string_count_byte8): Likewise. --- src/ChangeLog | 1 + src/character.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2b894e9a511..8102f455802 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -67,6 +67,7 @@ * category.c (hash_get_category_set): Remove unused local var. (copy_category_table): Now static, since it's not used elsewhere. + * character.c (string_count_byte8): Likewise. * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string): (Fregister_code_conversion_map): Rename locals to avoid shadowing. diff --git a/src/character.c b/src/character.c index 6f3312fec29..fdaf22f04f8 100644 --- a/src/character.c +++ b/src/character.c @@ -786,7 +786,7 @@ str_to_unibyte (const unsigned char *src, unsigned char *dst, EMACS_INT chars, i } -EMACS_INT +static EMACS_INT string_count_byte8 (Lisp_Object string) { int multibyte = STRING_MULTIBYTE (string); From fb93dbc227d09c5ec433b5f637fd677e2536a988 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 00:08:41 -0800 Subject: [PATCH 060/383] * chartab.c (copy_sub_char_table): Now static, since it's not used elsewhere. --- src/ChangeLog | 3 +++ src/chartab.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8102f455802..90804f01b3b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -72,6 +72,9 @@ * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string): (Fregister_code_conversion_map): Rename locals to avoid shadowing. + * chartab.c (copy_sub_char_table): Now static, since it's not used + elsewhere. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/chartab.c b/src/chartab.c index cd8aa784eb4..413d3f39e79 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -118,7 +118,7 @@ char_table_ascii (Lisp_Object table) return XSUB_CHAR_TABLE (sub)->contents[0]; } -Lisp_Object +static Lisp_Object copy_sub_char_table (Lisp_Object table) { Lisp_Object copy; @@ -951,7 +951,7 @@ map_sub_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object), map_charset_chars. */ void -map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object), +map_char_table_for_charset (void (*c_function) (Lisp_Object, Lisp_Object), Lisp_Object function, Lisp_Object table, Lisp_Object arg, struct charset *charset, unsigned from, unsigned to) @@ -1012,4 +1012,3 @@ syms_of_chartab (void) defsubr (&Soptimize_char_table); defsubr (&Smap_char_table); } - From 5c156ace080f89b44c73cd78d404c7263fe2003e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 00:12:00 -0800 Subject: [PATCH 061/383] * chartab.c: (sub_char_table_ref_and_range, char_table_ref_and_range): Rename locals to avoid shadowing. --- src/ChangeLog | 2 ++ src/chartab.c | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 90804f01b3b..ccd0578cf38 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -74,6 +74,8 @@ * chartab.c (copy_sub_char_table): Now static, since it's not used elsewhere. + (sub_char_table_ref_and_range, char_table_ref_and_range): + Rename locals to avoid shadowing. 2011-03-06 Chong Yidong diff --git a/src/chartab.c b/src/chartab.c index 413d3f39e79..ec5b2ffab76 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -216,16 +216,16 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp int depth = XINT (tbl->depth); int min_char = XINT (tbl->min_char); int max_char = min_char + chartab_chars[depth - 1] - 1; - int index = CHARTAB_IDX (c, depth, min_char), idx; + int chartab_idx = CHARTAB_IDX (c, depth, min_char), idx; Lisp_Object val; - val = tbl->contents[index]; + val = tbl->contents[chartab_idx]; if (SUB_CHAR_TABLE_P (val)) val = sub_char_table_ref_and_range (val, c, from, to, defalt); else if (NILP (val)) val = defalt; - idx = index; + idx = chartab_idx; while (idx > 0 && *from < min_char + idx * chartab_chars[depth]) { Lisp_Object this_val; @@ -244,13 +244,13 @@ sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp break; } } - while ((c = min_char + (index + 1) * chartab_chars[depth]) <= max_char + while ((c = min_char + (chartab_idx + 1) * chartab_chars[depth]) <= max_char && *to >= c) { Lisp_Object this_val; - index++; - this_val = tbl->contents[index]; + chartab_idx++; + this_val = tbl->contents[chartab_idx]; if (SUB_CHAR_TABLE_P (this_val)) this_val = sub_char_table_ref_and_range (this_val, c, from, to, defalt); else if (NILP (this_val)) @@ -275,10 +275,10 @@ Lisp_Object char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to) { struct Lisp_Char_Table *tbl = XCHAR_TABLE (table); - int index = CHARTAB_IDX (c, 0, 0), idx; + int chartab_idx = CHARTAB_IDX (c, 0, 0), idx; Lisp_Object val; - val = tbl->contents[index]; + val = tbl->contents[chartab_idx]; if (*from < 0) *from = 0; if (*to < 0) @@ -288,7 +288,7 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to) else if (NILP (val)) val = tbl->defalt; - idx = index; + idx = chartab_idx; while (*from < idx * chartab_chars[0]) { Lisp_Object this_val; @@ -308,13 +308,13 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to) break; } } - while (*to >= (index + 1) * chartab_chars[0]) + while (*to >= (chartab_idx + 1) * chartab_chars[0]) { Lisp_Object this_val; - index++; - c = index * chartab_chars[0]; - this_val = tbl->contents[index]; + chartab_idx++; + c = chartab_idx * chartab_chars[0]; + this_val = tbl->contents[chartab_idx]; if (SUB_CHAR_TABLE_P (this_val)) this_val = sub_char_table_ref_and_range (this_val, c, from, to, tbl->defalt); From bbcd0949d9cd085b6838c03f3d89171f967372fa Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 00:13:36 -0800 Subject: [PATCH 062/383] * chartab.c (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros. --- src/ChangeLog | 1 + src/chartab.c | 14 -------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ccd0578cf38..7f179c13420 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -76,6 +76,7 @@ elsewhere. (sub_char_table_ref_and_range, char_table_ref_and_range): Rename locals to avoid shadowing. + (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros. 2011-03-06 Chong Yidong diff --git a/src/chartab.c b/src/chartab.c index ec5b2ffab76..85aa5932ac3 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -331,20 +331,6 @@ char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to) } -#define ASET_RANGE(ARRAY, FROM, TO, LIMIT, VAL) \ - do { \ - int limit = (TO) < (LIMIT) ? (TO) : (LIMIT); \ - for (; (FROM) < limit; (FROM)++) (ARRAY)->contents[(FROM)] = (VAL); \ - } while (0) - -#define GET_SUB_CHAR_TABLE(TABLE, SUBTABLE, IDX, DEPTH, MIN_CHAR) \ - do { \ - (SUBTABLE) = (TABLE)->contents[(IDX)]; \ - if (!SUB_CHAR_TABLE_P (SUBTABLE)) \ - (SUBTABLE) = make_sub_char_table ((DEPTH), (MIN_CHAR), (SUBTABLE)); \ - } while (0) - - static void sub_char_table_set (Lisp_Object table, int c, Lisp_Object val) { From 7d3b386272126dc07ab5d0a2008832cec9d0fdcc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 00:23:12 -0800 Subject: [PATCH 063/383] * bidi.c (bidi_check_type): Now static, since it's not used elsewhere. --- src/ChangeLog | 2 ++ src/bidi.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7f179c13420..b6bc36e10ce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -78,6 +78,8 @@ Rename locals to avoid shadowing. (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros. + * bidi.c (bidi_check_type): Now static, since it's not used elsewhere. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/bidi.c b/src/bidi.c index eeacf65bd5c..1289798dd8c 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -180,7 +180,7 @@ bidi_get_type (int ch, bidi_dir_t override) } } -void +static void bidi_check_type (bidi_type_t type) { if (type < UNKNOWN_BT || type > NEUTRAL_ON) From 5b555da1c99bc5b266727fa532c2f89eb8d033dd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 00:26:27 -0800 Subject: [PATCH 064/383] * dispextern.h (bidi_dump_cached_states): Likewise. --- src/ChangeLog | 1 + src/dispextern.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index b6bc36e10ce..4bf04043ab9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -27,6 +27,7 @@ does not deduce are never used uninitialized. * window.h (check_all_windows): New decl, to forestall gcc -Wmissing-prototypes diagnostic. + * dispextern.h (bidi_dump_cached_states): Likewise. * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid shadowing. diff --git a/src/dispextern.h b/src/dispextern.h index 37ae7ee5fd5..30979d487ff 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -2944,6 +2944,7 @@ enum tool_bar_item_image extern void bidi_init_it (EMACS_INT, EMACS_INT, struct bidi_it *); extern void bidi_move_to_visually_next (struct bidi_it *); +extern void bidi_dump_cached_states (void); extern void bidi_paragraph_init (bidi_dir_t, struct bidi_it *, int); extern int bidi_mirror_char (int); From 0afb4571a7b54dc7693e605f7ec8a0a3a9251b4d Mon Sep 17 00:00:00 2001 From: Jan D Date: Tue, 8 Mar 2011 09:34:55 +0100 Subject: [PATCH 065/383] Updates for compiling with Gtk+ 3.0 (--with-x-toolkit=gtk3). * configure.in: Require 3.0 for --with-gtk3. Add HAVE_GTK3. * doc/emacs/xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work for Gtk+ 3. * src/gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define gdk_window_get_screen, gdk_window_get_geometry, gdk_x11_window_lookup_for_display and GDK_KEY_g. (xg_set_screen): Use DEFAULT_GDK_DISPLAY. (xg_get_pixbuf_from_pixmap): New function. (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap to Pixmap, take frame as parameter, remove GdkColormap parameter. Call xg_get_pixbuf_from_pixmap instead of gdk_pixbuf_get_from_drawable. (xg_get_image_for_pixmap): Do not make GdkPixmaps, call xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead. (xg_check_special_colors): Use GtkStyleContext and its functions for HAVE_GTK3. (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen. (xg_prepare_tooltip, create_dialog, menubar_map_cb) (xg_update_frame_menubar, xg_tool_bar_detach_callback) (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): Call gtk_widget_get_preferred_size. (xg_frame_resized): gdk_window_get_geometry only takes 5 parameters. (xg_win_to_widget, xg_event_is_for_menubar): Call gdk_x11_window_lookup_for_display. (xg_set_widget_bg): New function. (delete_cb): New function. (xg_create_frame_widgets): connect delete-event to delete_cb. Call xg_set_widget_bg. Only set backgrund pixmap for ! HAVE_GTK3 (xg_set_background_color): Call xg_set_widget_bg. (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask. (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3. Only call gtk_range_set_update_policy if ! HAVE_GTK3. (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback if ! HAVE_GTK3. (update_frame_tool_bar): Call gtk_widget_hide. (xg_initialize): Use GDK_KEY_g. * src/xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size. * src/xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id if ! HAVE_GTK3 (x_session_initialize): Call gdk_x11_set_sm_client_id. * src/xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3. (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS. Load ~/emacs.d/gtkrc only for ! HAVE_GTK3. * src/xterm.h (DEFAULT_GDK_DISPLAY): New define. (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines for ! HAVE_GTK3. (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID. --- ChangeLog | 4 + aclocal.m4 | 4 +- configure | 491 ++++++++++++++++++-------------------- configure.in | 5 +- doc/emacs/ChangeLog | 5 + doc/emacs/xresources.texi | 7 +- src/ChangeLog | 52 ++++ src/config.in | 3 + src/gtkutil.c | 267 ++++++++++++++------- src/xmenu.c | 2 +- src/xsmfns.c | 6 +- src/xterm.c | 29 ++- src/xterm.h | 13 +- 13 files changed, 534 insertions(+), 354 deletions(-) diff --git a/ChangeLog b/ChangeLog index 949862248bd..022eb468965 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-03-08 Jan Djärv + + * configure.in: Require 3.0 for --with-gtk3. Add HAVE_GTK3. + 2011-03-06 Glenn Morris * configure.in (FREETYPE_LIBS): Actually set it to something. diff --git a/aclocal.m4 b/aclocal.m4 index 9fdc8e76c49..963faafb453 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, -[m4_warning([this file was generated for autoconf 2.67. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, +[m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff --git a/configure b/configure index b8a83e66779..efe9a55f988 100755 --- a/configure +++ b/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 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 @@ $as_echo X"$as_dir" | 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 @@ else 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 @@ test -n "$DJDIR" || exec 7<&0 &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` @@ -1220,9 +1220,8 @@ do fi case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1267,7 +1266,7 @@ do 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 @@ -1293,7 +1292,7 @@ do 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 @@ -1497,7 +1496,7 @@ do 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 @@ -1513,7 +1512,7 @@ do 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 @@ -1543,8 +1542,8 @@ do | --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." ;; *=*) @@ -1552,7 +1551,7 @@ Try \`$0 --help' for more information" # 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 ;; @@ -1570,13 +1569,13 @@ done 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 @@ -1599,7 +1598,7 @@ do [\\/$]* | ?:[\\/]* ) 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' @@ -1613,8 +1612,8 @@ target=$target_alias 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 @@ -1629,9 +1628,9 @@ test "$silent" = yes && exec 6>/dev/null 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. @@ -1670,11 +1669,11 @@ else 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 @@ -1714,7 +1713,7 @@ Configuration: --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 @@ -1936,9 +1935,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF emacs configure 24.0.50 -generated by GNU Autoconf 2.67 +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 @@ -2008,7 +2007,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -2032,10 +2031,10 @@ fi 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 @@ -2071,7 +2070,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2098,7 +2097,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 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" @@ -2162,7 +2161,7 @@ ac_fn_c_check_header_compile () 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 @@ -2230,18 +2229,15 @@ fi } # ac_fn_c_try_link -# 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 @@ -2250,12 +2246,8 @@ $4 int main () { -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif +#ifndef $2 + (void) $2; #endif ; @@ -2284,7 +2276,7 @@ ac_fn_c_check_header_preproc () 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 @@ -2296,7 +2288,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else eval "$3=no" fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2314,7 +2306,7 @@ ac_fn_c_check_member () 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 @@ -2370,7 +2362,7 @@ ac_fn_c_check_func () 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 @@ -2438,7 +2430,7 @@ ac_fn_c_check_type () 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" @@ -2665,7 +2657,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2775,9 +2767,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -2811,9 +2805,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -2826,9 +2822,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -2842,9 +2840,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -2899,12 +2899,7 @@ _ACEOF 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 @@ -2919,11 +2914,7 @@ do { $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 @@ -3014,7 +3005,7 @@ if $ac_cache_corrupted; then $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. ## @@ -3034,22 +3025,16 @@ am__api_version='1.11' 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, @@ -3165,11 +3150,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; + as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; + as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3191,7 +3176,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -3201,7 +3186,7 @@ then # Ok. : else - as_fn_error $? "newly created file is older than distributed files! + as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -3440,7 +3425,7 @@ done $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 @@ -3448,7 +3433,7 @@ SHELL = /bin/sh 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;; @@ -3482,7 +3467,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -3685,7 +3670,7 @@ if test "${with_x_toolkit+set}" = set; then : 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 ;; @@ -3998,7 +3983,7 @@ do 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" @@ -4113,7 +4098,7 @@ fi # 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; } @@ -4124,16 +4109,16 @@ else 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='-' @@ -4158,7 +4143,7 @@ else 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 @@ -4166,7 +4151,7 @@ fi $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='-' @@ -4420,7 +4405,7 @@ fi 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 @@ -4738,8 +4723,8 @@ fi 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 @@ -4853,8 +4838,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $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; } @@ -4896,8 +4882,8 @@ done 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 @@ -4954,9 +4940,9 @@ $as_echo "$ac_try_echo"; } >&5 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 @@ -5007,8 +4993,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $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 @@ -5426,7 +5412,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5680,7 +5666,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5696,11 +5682,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5739,7 +5725,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5755,18 +5741,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : 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 @@ -5827,7 +5813,7 @@ esac 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 @@ -5893,7 +5879,7 @@ esac 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 @@ -6025,7 +6011,8 @@ do : 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 @@ -6356,7 +6343,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6372,11 +6359,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6415,7 +6402,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6431,18 +6418,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : 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 @@ -6790,7 +6777,7 @@ if test "$MAKEINFO" = "no"; then if test "x${with_makeinfo}" = "xno"; then HAVE_MAKEINFO=no 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 @@ -6951,7 +6938,7 @@ fi 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 @@ -7227,7 +7214,7 @@ else ## 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 @@ -7282,7 +7269,8 @@ if test "${with_sound}" != "no"; then 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 @@ -7473,7 +7461,7 @@ else 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 @@ -7508,7 +7496,8 @@ for ac_header in sys/select.h sys/time.h unistd.h utime.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 @@ -8563,8 +8552,8 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac @@ -8603,7 +8592,7 @@ fi $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 @@ -8611,7 +8600,7 @@ SHELL = /bin/sh 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;; @@ -8747,7 +8736,7 @@ if test "x$with_x" = xno; then 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 @@ -8765,7 +8754,7 @@ libdir: @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 @@ -8851,7 +8840,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -9034,7 +9023,7 @@ if test "${with_ns}" != no; then 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 @@ -9153,7 +9142,7 @@ fi 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. @@ -9276,7 +9265,8 @@ do : 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 @@ -9382,7 +9372,6 @@ int main () { char *data, *data2, *data3; - const char *cdata2; int i, pagesize; int fd, fd2; @@ -9407,10 +9396,10 @@ main () 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) @@ -9783,7 +9772,8 @@ XScreenNumberOfScreen XSetWMProtocols 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 @@ -10086,8 +10076,8 @@ fi HAVE_GTK=no if test "${with_gtk3}" = "yes"; then - GLIB_REQUIRED=2.6 - GTK_REQUIRED=2.90 + GLIB_REQUIRED=2.28 + GTK_REQUIRED=3.0 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" @@ -10185,8 +10175,11 @@ $as_echo "no" >&6; } 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 + +$as_echo "#define HAVE_GTK3 1" >>confdefs.h + fi if test "$pkg_check_gtk" != "yes"; then @@ -10291,7 +10284,7 @@ $as_echo "no" >&6; } 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 @@ -10318,7 +10311,7 @@ done 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 @@ -10448,7 +10441,8 @@ $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h 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 @@ -10970,7 +10964,7 @@ $as_echo "yes; using Lucid toolkit" >&6; } 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; } @@ -11778,7 +11772,7 @@ $as_echo "no" >&6; } fi - test "$HAVE_FREETYPE" = "no" && as_fn_error $? "libxft requires libfreetype" "$LINENO" 5 + test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5 fi HAVE_LIBOTF=no @@ -12237,7 +12231,8 @@ if test "${HAVE_X11}" = "yes"; then 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 @@ -12489,7 +12484,7 @@ if test "${HAVE_X11}" = "yes"; then 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 @@ -12978,7 +12973,8 @@ if test $ac_cv_os_cray = yes; then 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 @@ -13042,7 +13038,7 @@ fi 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. @@ -13238,7 +13234,7 @@ fi 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 @@ -13327,7 +13323,8 @@ cfmakeraw cfsetspeed isnan copysign __executable_start 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 @@ -13719,8 +13716,8 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - as_fn_error $? "unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + as_fn_error "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac @@ -14621,7 +14618,8 @@ fi 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 @@ -15353,7 +15351,7 @@ fi # Make sure getloadavg.c is where it belongs, at configure-time. test -f "$srcdir/$gl_source_base/getloadavg.c" || - as_fn_error $? "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5 + as_fn_error "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5 gl_save_LIBS=$LIBS @@ -16951,7 +16949,8 @@ $as_echo "$gl_cv_header_working_stdint_h" >&6; } 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 @@ -16981,7 +16980,7 @@ done for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } -if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then : +if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " @@ -17026,7 +17025,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } -if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then : +if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " @@ -17070,7 +17069,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then : +if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17129,7 +17128,7 @@ _ACEOF for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then : +if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no @@ -17201,7 +17200,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then : +if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no @@ -17811,7 +17810,7 @@ else 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 @@ -18937,7 +18936,8 @@ for ac_func in fork vfork 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 @@ -19257,7 +19257,7 @@ if test "x$GCC" = xyes \ && 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 version=$PACKAGE_VERSION @@ -19833,7 +19833,6 @@ DEFS=-DHAVE_CONFIG_H 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$//' @@ -19857,16 +19856,16 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. + as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. + as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then - as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. + as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -20049,19 +20048,19 @@ export LANGUAGE (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 @@ -20257,7 +20256,7 @@ $as_echo X"$as_dir" | 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 @@ -20311,7 +20310,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -20377,10 +20376,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ emacs config.status 24.0.50 -configured by $0, generated by GNU Autoconf 2.67, +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." @@ -20398,16 +20397,11 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=?*) + --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; *) ac_option=$1 ac_optarg=$2 @@ -20429,7 +20423,6 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -20442,7 +20435,7 @@ do 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 ;; @@ -20451,7 +20444,7 @@ Try \`$0 --help' for more information.";; 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" @@ -20525,7 +20518,7 @@ do "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -20563,7 +20556,7 @@ $debug || { 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. @@ -20597,7 +20590,7 @@ if test "x$ac_cr" = x; then 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 @@ -20614,7 +20607,7 @@ _ACEOF 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 { @@ -20622,18 +20615,18 @@ rm -f conf$$files.sh 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 @@ -20728,28 +20721,20 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 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 @@ -20777,7 +20762,7 @@ for ac_last_try in false false :; do 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 @@ -20862,7 +20847,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _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" @@ -20875,7 +20860,7 @@ do 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 @@ -20903,7 +20888,7 @@ do [\\/$]*) 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'" @@ -20930,7 +20915,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} 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 @@ -21072,22 +21057,22 @@ if $ac_cs_awk_getline; then 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) # @@ -21098,19 +21083,19 @@ which seems to be undefined. Please make sure it is defined" >&2;} $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 # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -21275,7 +21260,7 @@ _ACEOF 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. @@ -21296,7 +21281,7 @@ if test "$no_create" != yes; then 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 diff --git a/configure.in b/configure.in index 69d1a1e5bd3..086a7e12d67 100644 --- a/configure.in +++ b/configure.in @@ -1826,8 +1826,8 @@ fi HAVE_GTK=no if test "${with_gtk3}" = "yes"; then - GLIB_REQUIRED=2.6 - GTK_REQUIRED=2.90 + GLIB_REQUIRED=2.28 + GTK_REQUIRED=3.0 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" dnl Checks for libraries. @@ -1835,6 +1835,7 @@ if test "${with_gtk3}" = "yes"; then if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then AC_MSG_ERROR($GTK_PKG_ERRORS) fi + AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.]) fi if test "$pkg_check_gtk" != "yes"; then diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index a2708b454f4..1c8ca4bc322 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Jan Djärv + + * xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work + for Gtk+ 3. + 2011-03-08 Glenn Morris * display.texi (Optional Mode Line): Don't mention exactly where diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index 41a09a5f713..33ea83d7d6e 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi @@ -660,8 +660,11 @@ The color for the border shadow, on the top and the left. @iftex The most common way to customize the GTK widgets Emacs uses (menus, dialogs tool bars and scroll bars) is by choosing an appropriate theme, for example -with the GNOME theme selector. You can also do Emacs specific customization -by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc}. Some GTK +with the GNOME theme selector. + +You can also do Emacs specific customization +by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc}, +but only if you have a Gtk+ version earlier than 3 (i.e. 2). Some GTK themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything works with all themes. To customize Emacs font, background, faces, etc., use the normal X resources (@pxref{Resources}). We will present some examples of diff --git a/src/ChangeLog b/src/ChangeLog index b73e3d0c860..ff5ee064a92 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,55 @@ +2011-03-08 Jan Djärv + + * xterm.h (DEFAULT_GDK_DISPLAY): New define. + (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines + for ! HAVE_GTK3. + (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID. + + * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size. + + * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define + gdk_window_get_screen, gdk_window_get_geometry, + gdk_x11_window_lookup_for_display and GDK_KEY_g. + (xg_set_screen): Use DEFAULT_GDK_DISPLAY. + (xg_get_pixbuf_from_pixmap): New function. + (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap + to Pixmap, take frame as parameter, remove GdkColormap parameter. + Call xg_get_pixbuf_from_pixmap instead of + gdk_pixbuf_get_from_drawable. + (xg_get_image_for_pixmap): Do not make GdkPixmaps, call + xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead. + (xg_check_special_colors): Use GtkStyleContext and its functions + for HAVE_GTK3. + (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen. + (xg_prepare_tooltip, create_dialog, menubar_map_cb) + (xg_update_frame_menubar, xg_tool_bar_detach_callback) + (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): Call + gtk_widget_get_preferred_size. + (xg_frame_resized): gdk_window_get_geometry only takes 5 + parameters. + (xg_win_to_widget, xg_event_is_for_menubar): Call + gdk_x11_window_lookup_for_display. + (xg_set_widget_bg): New function. + (delete_cb): New function. + (xg_create_frame_widgets): connect delete-event to delete_cb. + Call xg_set_widget_bg. Only set backgrund pixmap for ! HAVE_GTK3 + (xg_set_background_color): Call xg_set_widget_bg. + (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask. + (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3. + Only call gtk_range_set_update_policy if ! HAVE_GTK3. + (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback + if ! HAVE_GTK3. + (update_frame_tool_bar): Call gtk_widget_hide. + (xg_initialize): Use GDK_KEY_g. + + * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id + if ! HAVE_GTK3 + (x_session_initialize): Call gdk_x11_set_sm_client_id. + + * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3. + (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS. + Load ~/emacs.d/gtkrc only for ! HAVE_GTK3. + 2011-03-08 Juanma Barranquero * w32xfns.c (select_palette): Check success of RealizePalette against diff --git a/src/config.in b/src/config.in index 7f33727c0b1..8889213b781 100644 --- a/src/config.in +++ b/src/config.in @@ -285,6 +285,9 @@ along with GNU Emacs. If not, see . */ /* Define to 1 if you have the `grantpt' function. */ #undef HAVE_GRANTPT +/* Define to 1 if using GTK 3 or later. */ +#undef HAVE_GTK3 + /* Define to 1 if you have the `gtk_adjustment_get_page_size' function. */ #undef HAVE_GTK_ADJUSTMENT_GET_PAGE_SIZE diff --git a/src/gtkutil.c b/src/gtkutil.c index 6ecd5d624af..b1ea6336eb6 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -40,6 +40,10 @@ along with GNU Emacs. If not, see . */ #include #endif +#ifdef HAVE_GTK3 +#include +#endif + #define FRAME_TOTAL_PIXEL_HEIGHT(f) \ (FRAME_PIXEL_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f)) @@ -69,6 +73,15 @@ along with GNU Emacs. If not, see . */ #define remove_submenu(w) gtk_menu_item_remove_submenu ((w)) #endif +#ifndef HAVE_GTK3 +#define gdk_window_get_screen(w) gdk_drawable_get_screen (w) +#define gdk_window_get_geometry(w, a, b, c, d) \ + gdk_window_get_geometry (w, a, b, c, d, 0) +#define gdk_x11_window_lookup_for_display(d, w) \ + gdk_xid_table_lookup_for_display (d, w) +#define GDK_KEY_g GDK_g +#endif + #define XG_BIN_CHILD(x) gtk_bin_get_child (GTK_BIN (x)) @@ -88,7 +101,7 @@ static GdkDisplay *gdpy_def; static void xg_set_screen (GtkWidget *w, FRAME_PTR f) { - if (FRAME_X_DISPLAY (f) != GDK_DISPLAY ()) + if (FRAME_X_DISPLAY (f) != DEFAULT_GDK_DISPLAY ()) { GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); GdkScreen *gscreen = gdk_display_get_default_screen (gdpy); @@ -229,29 +242,55 @@ xg_create_default_cursor (Display *dpy) return gdk_cursor_new_for_display (gdpy, GDK_LEFT_PTR); } +static GdkPixbuf * +xg_get_pixbuf_from_pixmap (FRAME_PTR f, Pixmap pix) +{ + int iunused; + GdkPixbuf *tmp_buf; + Window wunused; + unsigned int width, height, uunused; + XImage *xim; + + XGetGeometry (FRAME_X_DISPLAY (f), pix, &wunused, &iunused, &iunused, + &width, &height, &uunused, &uunused); + + xim = XGetImage (FRAME_X_DISPLAY (f), pix, 0, 0, width, height, + ~0, XYPixmap); + if (!xim) return 0; + + tmp_buf = gdk_pixbuf_new_from_data (xim->data, + GDK_COLORSPACE_RGB, + FALSE, + xim->bitmap_unit, + (int) width, + (int) height, + xim->bytes_per_line, + NULL, + NULL); + XDestroyImage (xim); + return tmp_buf; +} + /* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel. */ static GdkPixbuf * -xg_get_pixbuf_from_pix_and_mask (GdkPixmap *gpix, - GdkPixmap *gmask, - GdkColormap *cmap) +xg_get_pixbuf_from_pix_and_mask (FRAME_PTR f, + Pixmap pix, + Pixmap mask) { int width, height; GdkPixbuf *icon_buf, *tmp_buf; - gdk_drawable_get_size (gpix, &width, &height); - tmp_buf = gdk_pixbuf_get_from_drawable (NULL, gpix, cmap, - 0, 0, 0, 0, width, height); + tmp_buf = xg_get_pixbuf_from_pixmap (f, pix); icon_buf = gdk_pixbuf_add_alpha (tmp_buf, FALSE, 0, 0, 0); g_object_unref (G_OBJECT (tmp_buf)); - if (gmask) + width = gdk_pixbuf_get_width (icon_buf); + height = gdk_pixbuf_get_height (icon_buf); + + if (mask) { - GdkPixbuf *mask_buf = gdk_pixbuf_get_from_drawable (NULL, - gmask, - NULL, - 0, 0, 0, 0, - width, height); + GdkPixbuf *mask_buf = xg_get_pixbuf_from_pixmap (f, mask); guchar *pixels = gdk_pixbuf_get_pixels (icon_buf); guchar *mask_pixels = gdk_pixbuf_get_pixels (mask_buf); int rowstride = gdk_pixbuf_get_rowstride (icon_buf); @@ -316,10 +355,6 @@ xg_get_image_for_pixmap (FRAME_PTR f, GtkWidget *widget, GtkImage *old_widget) { - GdkPixmap *gpix; - GdkPixmap *gmask; - GdkDisplay *gdpy; - GdkColormap *cmap; GdkPixbuf *icon_buf; /* If we have a file, let GTK do all the image handling. @@ -347,10 +382,6 @@ xg_get_image_for_pixmap (FRAME_PTR f, on a monochrome display, and sometimes bad on all displays with certain themes. */ - gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); - gpix = gdk_pixmap_foreign_new_for_display (gdpy, img->pixmap); - gmask = img->mask ? gdk_pixmap_foreign_new_for_display (gdpy, img->mask) : 0; - /* This is a workaround to make icons look good on pseudo color displays. Apparently GTK expects the images to have an alpha channel. If they don't, insensitive and activated icons will @@ -360,18 +391,17 @@ xg_get_image_for_pixmap (FRAME_PTR f, not associated with the img->pixmap. The img->pixmap may be removed by clearing the image cache and then the tool bar redraw fails, since Gtk+ assumes the pixmap is always there. */ - cmap = gtk_widget_get_colormap (widget); - icon_buf = xg_get_pixbuf_from_pix_and_mask (gpix, gmask, cmap); + icon_buf = xg_get_pixbuf_from_pix_and_mask (f, img->pixmap, img->mask); - if (! old_widget) - old_widget = GTK_IMAGE (gtk_image_new_from_pixbuf (icon_buf)); - else - gtk_image_set_from_pixbuf (old_widget, icon_buf); + if (icon_buf) + { + if (! old_widget) + old_widget = GTK_IMAGE (gtk_image_new_from_pixbuf (icon_buf)); + else + gtk_image_set_from_pixbuf (old_widget, icon_buf); - g_object_unref (G_OBJECT (icon_buf)); - - g_object_unref (G_OBJECT (gpix)); - if (gmask) g_object_unref (G_OBJECT (gmask)); + g_object_unref (G_OBJECT (icon_buf)); + } return GTK_WIDGET (old_widget); } @@ -514,28 +544,43 @@ xg_check_special_colors (struct frame *f, XColor *color) { int success_p = 0; - if (FRAME_GTK_WIDGET (f)) - { - if (strcmp ("gtk_selection_bg_color", color_name) == 0) - { - GtkStyle *gsty = gtk_widget_get_style (FRAME_GTK_WIDGET (f)); - color->red = gsty->bg[GTK_STATE_SELECTED].red; - color->green = gsty->bg[GTK_STATE_SELECTED].green; - color->blue = gsty->bg[GTK_STATE_SELECTED].blue; - color->pixel = gsty->bg[GTK_STATE_SELECTED].pixel; - success_p = 1; - } - else if (strcmp ("gtk_selection_fg_color", color_name) == 0) - { - GtkStyle *gsty = gtk_widget_get_style (FRAME_GTK_WIDGET (f)); - color->red = gsty->fg[GTK_STATE_SELECTED].red; - color->green = gsty->fg[GTK_STATE_SELECTED].green; - color->blue = gsty->fg[GTK_STATE_SELECTED].blue; - color->pixel = gsty->fg[GTK_STATE_SELECTED].pixel; - success_p = 1; - } - } + int get_bg = strcmp ("gtk_selection_bg_color", color_name) == 0; + int get_fg = !get_bg && strcmp ("gtk_selection_fg_color", color_name) == 0; + if (! FRAME_GTK_WIDGET (f) || ! (get_bg || get_fg)) + return success_p; + + BLOCK_INPUT; + { +#ifdef HAVE_GTK3 + GtkStyleContext *gsty + = gtk_widget_get_style_context (FRAME_GTK_OUTER_WIDGET (f)); + GdkRGBA col; + char buf[64]; + int state = GTK_STATE_FLAG_SELECTED|GTK_STATE_FLAG_FOCUSED; + if (get_fg) + gtk_style_context_get_color (gsty, state, &col); + else + gtk_style_context_get_background_color (gsty, state, &col); + + sprintf (buf, "rgbi:%lf/%lf/%lf", col.red, col.green, col.blue); + success_p = XParseColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), + buf, color); +#else + GtkStyle *gsty = gtk_widget_get_style (FRAME_GTK_WIDGET (f)); + GdkColor *grgb = get_bg + ? &gsty->bg[GTK_STATE_SELECTED] + : &gsty->fg[GTK_STATE_SELECTED]; + + color->red = grgb->red; + color->green = grgb->green; + color->blue = grgb->blue; + color->pixel = grgb->pixel; + success_p = 1; +#endif + + } + UNBLOCK_INPUT; return success_p; } @@ -629,7 +674,7 @@ xg_prepare_tooltip (FRAME_PTR f, encoded_string = ENCODE_UTF_8 (string); widget = GTK_WIDGET (x->ttip_lbl); gwin = gtk_widget_get_window (GTK_WIDGET (x->ttip_window)); - screen = gdk_drawable_get_screen (gwin); + screen = gdk_window_get_screen (gwin); settings = gtk_settings_get_for_screen (screen); g_object_get (settings, "gtk-enable-tooltips", &tt_enabled, NULL); if (tt_enabled) @@ -650,7 +695,7 @@ xg_prepare_tooltip (FRAME_PTR f, gtk_tooltip_set_custom (x->ttip_widget, widget); gtk_tooltip_set_text (x->ttip_widget, SDATA (encoded_string)); - gtk_widget_size_request (GTK_WIDGET (x->ttip_window), &req); + gtk_widget_get_preferred_size (GTK_WIDGET (x->ttip_window), NULL, &req); if (width) *width = req.width; if (height) *height = req.height; @@ -696,7 +741,7 @@ xg_hide_tooltip (FRAME_PTR f) if (g_object_get_data (G_OBJECT (win), "restore-tt")) { GdkWindow *gwin = gtk_widget_get_window (GTK_WIDGET (win)); - GdkScreen *screen = gdk_drawable_get_screen (gwin); + GdkScreen *screen = gdk_window_get_screen (gwin); GtkSettings *settings = gtk_settings_get_for_screen (screen); g_object_set (settings, "gtk-enable-tooltips", TRUE, NULL); } @@ -797,7 +842,7 @@ xg_frame_resized (FRAME_PTR f, int pixelwidth, int pixelheight) if (FRAME_GTK_WIDGET (f) && gtk_widget_get_mapped (FRAME_GTK_WIDGET (f))) gdk_window_get_geometry (gtk_widget_get_window (FRAME_GTK_WIDGET (f)), 0, 0, - &pixelwidth, &pixelheight, 0); + &pixelwidth, &pixelheight); else return; } @@ -910,8 +955,8 @@ xg_win_to_widget (Display *dpy, Window wdesc) BLOCK_INPUT; - gdkwin = gdk_xid_table_lookup_for_display (gdk_x11_lookup_xdisplay (dpy), - wdesc); + gdkwin = gdk_x11_window_lookup_for_display (gdk_x11_lookup_xdisplay (dpy), + wdesc); if (gdkwin) { GdkEvent event; @@ -923,14 +968,29 @@ xg_win_to_widget (Display *dpy, Window wdesc) return gwdesc; } -/* Fill in the GdkColor C so that it represents PIXEL. - W is the widget that color will be used for. Used to find colormap. */ +/* Set the background of widget W to PIXEL. */ static void -xg_pix_to_gcolor (GtkWidget *w, long unsigned int pixel, GdkColor *c) +xg_set_widget_bg (FRAME_PTR f, GtkWidget *w, long unsigned int pixel) { +#ifdef HAVE_GTK3 + GdkRGBA bg; + XColor xbg; + xbg.pixel = pixel; + if (XQueryColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), &xbg)) + { + bg.red = (double)xbg.red/65536.0; + bg.green = (double)xbg.green/65536.0; + bg.blue = (double)xbg.blue/65536.0; + bg.alpha = 1.0; + gtk_widget_override_background_color (w, GTK_STATE_FLAG_NORMAL, &bg); + } +#else + GdkColor bg; GdkColormap *map = gtk_widget_get_colormap (w); - gdk_colormap_query_color (map, pixel, c); + gdk_colormap_query_color (map, pixel, &bg); + gtk_widget_modify_bg (FRAME_GTK_WIDGET (f), GTK_STATE_NORMAL, &bg); +#endif } /* Callback called when the gtk theme changes. @@ -953,6 +1013,28 @@ style_changed_cb (GObject *go, kbd_buffer_store_event (&event); } +/* Called when a delete-event occurs on WIDGET. */ + +static gboolean +delete_cb (GtkWidget *widget, + GdkEvent *event, + gpointer user_data) +{ +#ifdef HAVE_GTK3 + /* The event doesn't arrive in the normal event loop. Send event + here. */ + FRAME_PTR f = (FRAME_PTR) user_data; + struct input_event ie; + + EVENT_INIT (ie); + ie.kind = DELETE_WINDOW_EVENT; + XSETFRAME (ie.frame_or_window, f); + kbd_buffer_store_event (&ie); +#endif + + return TRUE; +} + /* Create and set up the GTK widgets for frame F. Return 0 if creation failed, non-zero otherwise. */ @@ -962,7 +1044,6 @@ xg_create_frame_widgets (FRAME_PTR f) GtkWidget *wtop; GtkWidget *wvbox, *whbox; GtkWidget *wfixed; - GdkColor bg; GtkRcStyle *style; char *title = 0; @@ -1029,7 +1110,7 @@ xg_create_frame_widgets (FRAME_PTR f) /* Add callback to do nothing on WM_DELETE_WINDOW. The default in GTK is to destroy the widget. We want Emacs to do that instead. */ g_signal_connect (G_OBJECT (wtop), "delete-event", - G_CALLBACK (gtk_true), 0); + G_CALLBACK (delete_cb), f); /* Convert our geometry parameters into a geometry string and specify it. @@ -1057,9 +1138,9 @@ xg_create_frame_widgets (FRAME_PTR f) /* Since GTK clears its window by filling with the background color, we must keep X and GTK background in sync. */ - xg_pix_to_gcolor (wfixed, FRAME_BACKGROUND_PIXEL (f), &bg); - gtk_widget_modify_bg (wfixed, GTK_STATE_NORMAL, &bg); + xg_set_widget_bg (f, wfixed, FRAME_BACKGROUND_PIXEL (f)); +#ifndef HAVE_GTK3 /* Also, do not let any background pixmap to be set, this looks very bad as Emacs overwrites the background pixmap with its own idea of background color. */ @@ -1068,6 +1149,9 @@ xg_create_frame_widgets (FRAME_PTR f) /* Must use g_strdup because gtk_widget_modify_style does g_free. */ style->bg_pixmap_name[GTK_STATE_NORMAL] = g_strdup (""); gtk_widget_modify_style (wfixed, style); +#else + gtk_widget_set_can_focus (wfixed, TRUE); +#endif #ifdef USE_GTK_TOOLTIP /* Steal a tool tip window we can move ourselves. */ @@ -1224,11 +1308,8 @@ xg_set_background_color (FRAME_PTR f, long unsigned int bg) { if (FRAME_GTK_WIDGET (f)) { - GdkColor gdk_bg; - BLOCK_INPUT; - xg_pix_to_gcolor (FRAME_GTK_WIDGET (f), bg, &gdk_bg); - gtk_widget_modify_bg (FRAME_GTK_WIDGET (f), GTK_STATE_NORMAL, &gdk_bg); + xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f)); UNBLOCK_INPUT; } } @@ -1240,11 +1321,10 @@ xg_set_background_color (FRAME_PTR f, long unsigned int bg) void xg_set_frame_icon (FRAME_PTR f, Pixmap icon_pixmap, Pixmap icon_mask) { - GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); - GdkPixmap *gpix = gdk_pixmap_foreign_new_for_display (gdpy, icon_pixmap); - GdkPixmap *gmask = gdk_pixmap_foreign_new_for_display (gdpy, icon_mask); - GdkPixbuf *gp = xg_get_pixbuf_from_pix_and_mask (gpix, gmask, NULL); - + GdkPixbuf *gp = xg_get_pixbuf_from_pix_and_mask (f, + icon_pixmap, + icon_mask); + if (gp) gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), gp); } @@ -1381,7 +1461,7 @@ create_dialog (widget_value *wv, /* Try to make dialog look better. Must realize first so the widget can calculate the size it needs. */ gtk_widget_realize (w); - gtk_widget_size_request (w, &req); + gtk_widget_get_preferred_size (w, NULL, &req); gtk_box_set_spacing (wvbox, req.height); if (item->value && strlen (item->value) > 0) button_spacing = 2*req.width/strlen (item->value); @@ -3028,7 +3108,7 @@ menubar_map_cb (GtkWidget *w, gpointer user_data) { GtkRequisition req; FRAME_PTR f = (FRAME_PTR) user_data; - gtk_widget_size_request (w, &req); + gtk_widget_get_preferred_size (w, NULL, &req); if (FRAME_MENUBAR_HEIGHT (f) != req.height) { FRAME_MENUBAR_HEIGHT (f) = req.height; @@ -3059,7 +3139,7 @@ xg_update_frame_menubar (FRAME_PTR f) g_signal_connect (x->menubar_widget, "map", G_CALLBACK (menubar_map_cb), f); gtk_widget_show_all (x->menubar_widget); - gtk_widget_size_request (x->menubar_widget, &req); + gtk_widget_get_preferred_size (x->menubar_widget, NULL, &req); /* If menu bar doesn't know its height yet, cheat a little so the frame doesn't jump so much when resized later in menubar_map_cb. */ @@ -3120,7 +3200,7 @@ xg_event_is_for_menubar (FRAME_PTR f, XEvent *event) return 0; gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); - gw = gdk_xid_table_lookup_for_display (gdpy, event->xbutton.window); + gw = gdk_x11_window_lookup_for_display (gdpy, event->xbutton.window); if (! gw) return 0; gevent.any.window = gw; gwdesc = gtk_get_event_widget (&gevent); @@ -3284,8 +3364,12 @@ xg_create_scroll_bar (FRAME_PTR f, { GtkWidget *wscroll; GtkWidget *webox; - GtkObject *vadj; int scroll_id; +#ifdef HAVE_GTK3 + GtkAdjustment *vadj; +#else + GtkObject *vadj; +#endif /* Page, step increment values are not so important here, they will be corrected in x_set_toolkit_scroll_bar_thumb. */ @@ -3295,7 +3379,9 @@ xg_create_scroll_bar (FRAME_PTR f, wscroll = gtk_vscrollbar_new (GTK_ADJUSTMENT (vadj)); webox = gtk_event_box_new (); gtk_widget_set_name (wscroll, scroll_bar_name); +#ifndef HAVE_GTK3 gtk_range_set_update_policy (GTK_RANGE (wscroll), GTK_UPDATE_CONTINUOUS); +#endif g_object_set_data (G_OBJECT (wscroll), XG_FRAME_DATA, (gpointer)f); scroll_id = xg_store_widget_in_map (wscroll); @@ -3793,8 +3879,8 @@ xg_tool_bar_detach_callback (GtkHandleBox *wbox, { GtkRequisition req, req2; FRAME_X_OUTPUT (f)->toolbar_detached = 1; - gtk_widget_size_request (GTK_WIDGET (wbox), &req); - gtk_widget_size_request (w, &req2); + gtk_widget_get_preferred_size (GTK_WIDGET (wbox), NULL, &req); + gtk_widget_get_preferred_size (w, NULL, &req2); req.width -= req2.width; req.height -= req2.height; if (FRAME_TOOLBAR_TOP_HEIGHT (f) != 0) @@ -3828,8 +3914,8 @@ xg_tool_bar_attach_callback (GtkHandleBox *wbox, { GtkRequisition req, req2; FRAME_X_OUTPUT (f)->toolbar_detached = 0; - gtk_widget_size_request (GTK_WIDGET (wbox), &req); - gtk_widget_size_request (w, &req2); + gtk_widget_get_preferred_size (GTK_WIDGET (wbox), NULL, &req); + gtk_widget_get_preferred_size (w, NULL, &req2); req.width += req2.width; req.height += req2.height; if (FRAME_TOOLBAR_TOP_HEIGHT (f) != 0) @@ -3894,6 +3980,7 @@ xg_tool_bar_help_callback (GtkWidget *w, Returns FALSE to tell GTK to keep processing this event. */ +#ifndef HAVE_GTK3 static gboolean xg_tool_bar_item_expose_callback (GtkWidget *w, GdkEventExpose *event, @@ -3902,7 +3989,6 @@ xg_tool_bar_item_expose_callback (GtkWidget *w, gint width, height; gdk_drawable_get_size (event->window, &width, &height); - event->area.x -= width > event->area.width ? width-event->area.width : 0; event->area.y -= height > event->area.height ? height-event->area.height : 0; @@ -3914,6 +4000,7 @@ xg_tool_bar_item_expose_callback (GtkWidget *w, return FALSE; } +#endif #ifdef HAVE_GTK_ORIENTABLE_SET_ORIENTATION #define toolbar_set_orientation(w, o) \ @@ -4063,13 +4150,14 @@ xg_make_tool_item (FRAME_PTR f, g_object_set_data (G_OBJECT (weventbox), XG_FRAME_DATA, (gpointer)f); +#ifndef HAVE_GTK3 /* Catch expose events to overcome an annoying redraw bug, see comment for xg_tool_bar_item_expose_callback. */ g_signal_connect (G_OBJECT (ti), "expose-event", G_CALLBACK (xg_tool_bar_item_expose_callback), 0); - +#endif gtk_tool_item_set_homogeneous (ti, FALSE); /* Callback to save modifyer mask (Shift/Control, etc). GTK makes @@ -4153,7 +4241,7 @@ xg_update_tool_bar_sizes (FRAME_PTR f) GtkRequisition req; int nl = 0, nr = 0, nt = 0, nb = 0; - gtk_widget_size_request (GTK_WIDGET (x->handlebox_widget), &req); + gtk_widget_get_preferred_size (GTK_WIDGET (x->handlebox_widget), NULL, &req); if (x->toolbar_in_hbox) { int pos; @@ -4203,7 +4291,6 @@ update_frame_tool_bar (FRAME_PTR f) GtkToolItem *ti; GtkTextDirection dir; int pack_tool_bar = x->handlebox_widget == NULL; - Lisp_Object style; int text_image, horiz; @@ -4551,13 +4638,13 @@ xg_initialize (void) /* Make dialogs close on C-g. Since file dialog inherits from dialog, this works for them also. */ binding_set = gtk_binding_set_by_class (g_type_class_ref (GTK_TYPE_DIALOG)); - gtk_binding_entry_add_signal (binding_set, GDK_g, GDK_CONTROL_MASK, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_g, GDK_CONTROL_MASK, "close", 0); /* Make menus close on C-g. */ binding_set = gtk_binding_set_by_class (g_type_class_ref (GTK_TYPE_MENU_SHELL)); - gtk_binding_entry_add_signal (binding_set, GDK_g, GDK_CONTROL_MASK, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_g, GDK_CONTROL_MASK, "cancel", 0); } diff --git a/src/xmenu.c b/src/xmenu.c index 934db0f0406..8967437a376 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1390,7 +1390,7 @@ menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer /* Check if there is room for the menu. If not, adjust x/y so that the menu is fully visible. */ - gtk_widget_size_request (GTK_WIDGET (menu), &req); + gtk_widget_get_preferred_size (GTK_WIDGET (menu), NULL, &req); if (data->x + req.width > disp_width) *x -= data->x + req.width - disp_width; if (data->y + req.height > disp_height) diff --git a/src/xsmfns.c b/src/xsmfns.c index 825cec451d9..f3879dbcec0 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -41,6 +41,10 @@ along with GNU Emacs. If not, see . */ #include "process.h" #include "keyboard.h" +#ifndef HAVE_GTK3 +#define gdk_x11_set_sm_client_id(w) gdk_set_sm_client_id (w) +#endif + /* This is the event used when SAVE_SESSION_EVENT occurs. */ static struct input_event emacs_event; @@ -459,7 +463,7 @@ x_session_initialize (struct x_display_info *dpyinfo) #ifdef USE_GTK /* GTK creats a leader window by itself, but we need to tell it about our client_id. */ - gdk_set_sm_client_id (client_id); + gdk_x11_set_sm_client_id (client_id); #else create_client_leader_window (dpyinfo, client_id); #endif diff --git a/src/xterm.c b/src/xterm.c index 909b6978f5a..bb792d8b9a7 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3021,6 +3021,17 @@ XTflash (struct frame *f) /* Use Gdk routines to draw. This way, we won't draw over scroll bars when the scroll bars and the edit widget share the same X window. */ GdkWindow *window = gtk_widget_get_window (FRAME_GTK_WIDGET (f)); +#ifdef HAVE_GTK3 + cairo_t *cr = gdk_cairo_create (window); + cairo_set_source_rgb (cr, 1, 1, 1); + cairo_set_operator (cr, CAIRO_OPERATOR_DIFFERENCE); +#define XFillRectangle(d, win, gc, x, y, w, h) \ + do { \ + cairo_rectangle (cr, x, y, w, h); \ + cairo_fill (cr); \ + } \ + while (0) +#else /* ! HAVE_GTK3 */ GdkGCValues vals; GdkGC *gc; vals.foreground.pixel = (FRAME_FOREGROUND_PIXEL (f) @@ -3030,7 +3041,8 @@ XTflash (struct frame *f) &vals, GDK_GC_FUNCTION | GDK_GC_FOREGROUND); #define XFillRectangle(d, win, gc, x, y, w, h) \ gdk_draw_rectangle (window, gc, TRUE, x, y, w, h) -#else +#endif /* ! HAVE_GTK3 */ +#else /* ! USE_GTK */ GC gc; /* Create a GC that will use the GXxor function to flip foreground @@ -3151,7 +3163,11 @@ XTflash (struct frame *f) width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); #ifdef USE_GTK +#ifdef HAVE_GTK3 + cairo_destroy (cr); +#else g_object_unref (G_OBJECT (gc)); +#endif #undef XFillRectangle #else XFreeGC (FRAME_X_DISPLAY (f), gc); @@ -9863,6 +9879,13 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) XSetLocaleModifiers (""); + /* Emacs can only handle core input events, so make sure + Gtk doesn't use Xinput or Xinput2 extensions. */ + { + static char fix_events[] = "GDK_CORE_DEVICE_EVENTS=1"; + putenv (fix_events); + } + /* Work around GLib bug that outputs a faulty warning. See https://bugzilla.gnome.org/show_bug.cgi?id=563627. */ id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL @@ -9874,11 +9897,12 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) fixup_locale (); xg_initialize (); - dpy = GDK_DISPLAY (); + dpy = DEFAULT_GDK_DISPLAY (); /* NULL window -> events for all windows go to our function */ gdk_window_add_filter (NULL, event_handler_gdk, NULL); +#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90 /* Load our own gtkrc if it exists. */ { const char *file = "~/.emacs.d/gtkrc"; @@ -9890,6 +9914,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file))) gtk_rc_parse (SSDATA (abs_file)); } +#endif XSetErrorHandler (x_error_handler); XSetIOErrorHandler (x_io_error_quitter); diff --git a/src/xterm.h b/src/xterm.h index 48d68557796..ee17cfe2bd5 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -675,9 +675,20 @@ enum #define gtk_adjustment_get_upper(w) ((w)->upper) #endif +#ifdef HAVE_GTK3 +#define DEFAULT_GDK_DISPLAY() \ + gdk_x11_display_get_xdisplay (gdk_display_get_default ()) +#else +#undef GDK_WINDOW_XID +#define GDK_WINDOW_XID(w) GDK_WINDOW_XWINDOW (w) +#define DEFAULT_GDK_DISPLAY() GDK_DISPLAY () +#define gtk_widget_get_preferred_size(a, ign, b) \ + gtk_widget_size_request(a, b) +#endif + #define GTK_WIDGET_TO_X_WIN(w) \ ((w) && gtk_widget_get_window (w) \ - ? GDK_WINDOW_XWINDOW (gtk_widget_get_window (w)) : 0) + ? GDK_WINDOW_XID (gtk_widget_get_window (w)) : 0) #define FRAME_GTK_OUTER_WIDGET(f) ((f)->output_data.x->widget) #define FRAME_GTK_WIDGET(f) ((f)->output_data.x->edit_widget) From 6446548e027a18582e1f6661d553902b25d15157 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 8 Mar 2011 00:59:18 -0800 Subject: [PATCH 066/383] Convert some names in texinfo files to UTF-8. * doc/emacs/Makefile.in (MAKEINFO_OPTS): Add --enable-encoding. * doc/emacs/emacs.texi (Acknowledgments): * doc/emacs/ack.texi (Acknowledgments): Names to UTF-8. * doc/lispref/Makefile.in (MAKEINFO_OPTS): Add --enable-encoding. * doc/lispref/intro.texi (Acknowledgements): Names to UTF-8. --- doc/emacs/ChangeLog | 4 ++++ doc/emacs/Makefile.in | 2 +- doc/emacs/ack.texi | 32 ++++++++++++++++---------------- doc/emacs/emacs.texi | 28 +++++++++++++++------------- doc/lispref/ChangeLog | 5 +++++ doc/lispref/Makefile.in | 2 +- doc/lispref/intro.texi | 4 ++-- 7 files changed, 44 insertions(+), 33 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 1c8ca4bc322..1dc2426bffe 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -5,6 +5,10 @@ 2011-03-08 Glenn Morris + * Makefile.in (MAKEINFO_OPTS): Add --enable-encoding. + * emacs.texi (Acknowledgments): + * ack.texi (Acknowledgments): Names to UTF-8. + * display.texi (Optional Mode Line): Don't mention exactly where display-time appears. (Bug#8193) diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in index 0ba396e6427..ae142dba6e6 100644 --- a/doc/emacs/Makefile.in +++ b/doc/emacs/Makefile.in @@ -38,7 +38,7 @@ texinfodir = $(srcdir)/../misc # The makeinfo program is part of the Texinfo distribution. # Use --force so that it generates output even if there are errors. MAKEINFO = @MAKEINFO@ -MAKEINFO_OPTS = --force -I $(srcdir) +MAKEINFO_OPTS = --force --enable-encoding -I $(srcdir) TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index d49fd7b7c60..148aaaeaa30 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -1,3 +1,4 @@ +@c -*- coding: utf-8 -*- @c This is part of the Emacs manual. @c Copyright (C) 1994-1997, 1999-2011 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @@ -51,7 +52,7 @@ files. Michael Albinus wrote @file{dbus.el}, a package that implements the D-Bus message bus protocol; @file{zeroconf.el}, a mode for browsing Avahi services; and @file{xesam.el}, a Xesam-based search engine -interface. He and Kai Gro@ss{}johann wrote the Tramp package, which +interface. He and Kai Großjohann wrote the Tramp package, which provides transparent remote file editing using rcp, ssh, ftp, and other network protocols. He and Daniel Pittman wrote @file{tramp-cache.el}. @@ -153,7 +154,7 @@ David M.@: Brown wrote @file{array.el}, for editing arrays and other tabular data. @item -W@l{}odek Bzyl and Ryszard Kubiak wrote @file{ogonek.el}, a package for +WÅ‚odek Bzyl and Ryszard Kubiak wrote @file{ogonek.el}, a package for changing the encoding of Polish characters. @item @@ -190,7 +191,7 @@ prior to Emacs 23 for Mac OS. @item Chong Yidong was the Emacs co-maintainer for Emacs 23. He made many improvements to the Emacs display engine; and, together with Kai -Gro@ss{}johann and Alex Schroeder, wrote @file{longlines.el}, a minor +Großjohann and Alex Schroeder, wrote @file{longlines.el}, a minor mode for wrapping long lines. @item @@ -248,13 +249,13 @@ text replace the current selection. Eric Ding wrote @file{goto-addr.el}, @item -Jan Dj@"{a}rv added support for the GTK+ toolkit and X drag-and-drop. +Jan Djärv added support for the GTK+ toolkit and X drag-and-drop. @item Carsten Dominik wrote Ref@TeX{}, a package for setting up labels and cross-references in La@TeX{} documents; and co-wrote IDLWAVE mode (q.v.@:). He was the main author of Org mode, for maintaining notes, -todo lists, and project planning. Thomas Baumann, Jan Böcker, Lennart +todo lists, and project planning. Thomas Baumann, Jan Böcker, Lennart Borgman, Baoqiu Cui, Daniel German, Bastien Guerry, Tassilo Horn, Philip Jackson, Tokuya Kameshima, Ross Patterson, Sebastian Rose, Eric Schulte, Paul Sexton, Ulf Stegemann, Andy Stewart, David O'Toole, John Wiegley, @@ -283,7 +284,7 @@ folders have mail waiting in them; and @file{iswitchb.el}, a feature for incremental reading and completion of buffer names. @item -Torbj@"orn Einarsson wrote @file{f90.el}, a mode for Fortran 90 files. +Torbjörn Einarsson wrote @file{f90.el}, a mode for Fortran 90 files. @item Tsugutomo Enami co-wrote the support for international character sets. @@ -349,7 +350,7 @@ Kevin Gallo added multiple-frame support for Windows NT and wrote @file{w32-win.el}, support functions for the MS-Windows window system. @item -Juan Le@'{o}n Lahoz Garc@'{i}a wrote @file{wdired.el}, a package for +Juan León Lahoz García wrote @file{wdired.el}, a package for performing file operations by directly editing Dired buffers. @item @@ -483,8 +484,8 @@ Emacs: @file{dns.el} for Domain Name Service lookups; @file{netrc.el} for parsing of @file{.netrc} files; and @file{time-date.el} for general date and time handling. Components of Gnus have also been written by: Nagy Andras, David Blacka, Scott Byer, -Kevin Greiner, Kai Gro@ss{}johann, Joe Hildebrand, Paul Jarc, Sascha -L@"{u}decke, David Moore, Jim Radford, Benjamin Rutt, Raymond Scholz, +Kevin Greiner, Kai Großjohann, Joe Hildebrand, Paul Jarc, Sascha +Lüdecke, David Moore, Jim Radford, Benjamin Rutt, Raymond Scholz, Thomas Steffen, Reiner Steib, Didier Verna, Ilja Weis, Katsumi Yamaoka, Teodor Zlatanov, and others (@pxref{Contributors,,,gnus, the Gnus Manual}). @@ -524,7 +525,7 @@ S/MIME and Sieve components; and @file{tls.el} and @file{starttls.el} for the Transport Layer Security protocol. @item -Arne J@o{}rgensen wrote @file{latexenc.el}, a package to +Arne Jørgensen wrote @file{latexenc.el}, a package to automatically guess the correct coding system in LaTeX files. @item @@ -576,7 +577,7 @@ files and running a PostScript interpreter interactively from within Emacs. @item -Karel Kl@'{@dotless{i}}@v{c} contributed SELinux support, for preserving the +Karel KlÃ­Ä contributed SELinux support, for preserving the Security-Enchanced Linux context of files on backup and copy. @item @@ -667,9 +668,8 @@ directory-local variables; and the @code{info-finder} feature that creates a virtual Info manual of package keywords. @item -K@'{a}roly L@H{o}rentey wrote the ``multi-terminal'' code, which -allows Emacs to run on graphical and text-only terminals -simultaneously. +Károly LÅ‘rentey wrote the ``multi-terminal'' code, which allows Emacs to +run on graphical and text-only terminals simultaneously. @item Martin Lorentzon wrote @file{vc-annotate.el}, support for version @@ -933,7 +933,7 @@ Fred Pierresteguy and Paul Reilly made Emacs work with X Toolkit widgets. @item -Fran@,{c}ois Pinard, Greg McGary, and Bruno Haible wrote @file{po.el}, +François Pinard, Greg McGary, and Bruno Haible wrote @file{po.el}, support for PO translation files. @item @@ -1195,7 +1195,7 @@ Olaf Sylvester wrote @file{bs.el}, a package for manipulating Emacs buffers. @item -Tibor @v{S}imko and Milan Zamazal wrote @file{slovak.el}, support for +Tibor Å imko and Milan Zamazal wrote @file{slovak.el}, support for editing text in Slovak language. @item diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index cd9a4602bf9..75453993dde 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1,4 +1,4 @@ -\input texinfo +\input texinfo @c -*- coding: utf-8 -*- @setfilename ../../info/emacs @settitle GNU Emacs Manual @@ -29,6 +29,8 @@ developing GNU and promoting software freedom.'' @end quotation @end copying +@documentencoding UTF-8 + @dircategory Emacs @direntry * Emacs: (emacs). The extensible self-documenting text editor. @@ -1350,24 +1352,24 @@ Abrahamsson, Jay K.@: Adams, Michael Albinus, Nagy Andras, Ralf Angeli, Joe Arceneaux, Miles Bader, David Bakhash, Juanma Barranquero, Eli Barzilay, Thomas Baumann, Steven L.@: Baur, Jay Belanger, Alexander L.@: Belikoff, Boaz Ben-Zvi, Karl Berry, Anna M.@: Bigatti, Ray Blaak, Jim -Blandy, Johan Bockg@aa{}rd, Jan Böcker, Lennart Borgman, Per Bothner, +Blandy, Johan BockgÃ¥rd, Jan Böcker, Lennart Borgman, Per Bothner, Terrence Brannon, Frank Bresz, Peter Breton, Emmanuel Briot, Kevin Broadey, Vincent Broman, David M.@: Brown, Georges Brun-Cottan, Joe -Buehler, W@l{}odek Bzyl, Bill Carpenter, Per Cederqvist, Hans Chalupsky, +Buehler, WÅ‚odek Bzyl, Bill Carpenter, Per Cederqvist, Hans Chalupsky, Chong Yidong, Chris Chase, Bob Chassell, Andrew Choi, Sacha Chua, James Clark, Mike Clarkson, Glynn Clements, Daniel Colascione, Andrew Csillag, Baoqiu Cui, Doug Cutting, Mathias Dahl, Julien Danjou, Satyaki Das, Vivek Dasmohapatra, Michael DeCorte, Gary Delp, Matthieu Devin, Eri -Ding, Jan Dj@"{a}rv, Carsten Dominik, Scott Draves, Benjamin Drieu, +Ding, Jan Djärv, Carsten Dominik, Scott Draves, Benjamin Drieu, Viktor Dukhovni, Dmitry Dzhus, John Eaton, Rolf Ebert, Paul Eggert, -Stephen Eglen, Torbj@"orn Einarsson, Tsugutomo Enami, Hans Henrik +Stephen Eglen, Torbjörn Einarsson, Tsugutomo Enami, Hans Henrik Eriksen, Michael Ernst, Ata Etemadi, Frederick Farnbach, Oscar Figueiredo, Fred Fish, Karl Fogel, Gary Foster, Romain Francoise, Noah Friedman, Andreas Fuchs, Hallvard Furuseth, Keith Gabryelski, Peter S.@: -Galbraith, Kevin Gallagher, Kevin Gallo, Juan Le@'{o}n Lahoz -Garc@'{@dotless{i}}a, Howard Gayle, Daniel German, Stephen Gildea, +Galbraith, Kevin Gallagher, Kevin Gallo, Juan León Lahoz +García, Howard Gayle, Daniel German, Stephen Gildea, Julien Gilles, David Gillespie, Bob Glickstein, Deepak Goel, Boris -Goldowsky, Michelangelo Grigni, Odd Gripenstam, Kai Gro@ss{}johann, +Goldowsky, Michelangelo Grigni, Odd Gripenstam, Kai Großjohann, Michael Gschwind, Bastien Guerry, Henry Guillaume, Doug Gwyn, Ken'ichi Handa, Lars Hansen, Chris Hanson, K. Shane Hartman, John Heidemann, Jon K.@: Hellan, Jesper Harder, Magnus Henoch, Markus Heritsch, Karl Heuer, @@ -1375,17 +1377,17 @@ Manabu Higashida, Anders Holst, Jeffrey C.@: Honig, Tassilo Horn, Kurt Hornik, Tom Houlder, Joakim Hove, Denis Howe, Lars Ingebrigtsen, Andrew Innes, Seiichiro Inoue, Philip Jackson, Pavel Janik, Paul Jarc, Ulf Jasper, Michael K. Johnson, Kyle Jones, Terry Jones, Simon Josefsson, -Arne J@o{}rgensen, Tomoji Kagatani, Brewster Kahle, Tokuya Kameshima, +Arne Jørgensen, Tomoji Kagatani, Brewster Kahle, Tokuya Kameshima, Lute Kamstra, David Kastrup, David Kaufman, Henry Kautz, Taichi Kawabata, Howard Kaye, Michael Kifer, Richard King, Peter Kleiweg, Karel -Kl@'{@dotless{i}}@v{c}, Shuhei Kobayashi, Pavel Kobiakov, Larry K.@: +KlíÄ, Shuhei Kobayashi, Pavel Kobiakov, Larry K.@: Kolodney, David M.@: Koppelman, Koseki Yoshinori, Robert Krawitz, -Sebastian Kremer, Ryszard Kubiak, David K@aa{}gedal, Daniel LaLiberte, +Sebastian Kremer, Ryszard Kubiak, David KÃ¥gedal, Daniel LaLiberte, Karl Landstrom, Mario Lang, Aaron Larson, James R.@: Larus, Vinicius Jose Latorre, Werner Lemberg, Frederic Lepied, Peter Liljenberg, Lars Lindberg, Chris Lindblad, Anders Lindgren, Thomas Link, Juri Linkov, -Francis Litterio, Emilio C. Lopes, K@'{a}roly L@H{o}rentey, Dave Love, -Sascha L@"{u}decke, Eric Ludlam, Alan Mackenzie, Christopher J.@: +Francis Litterio, Emilio C. Lopes, Károly LÅ‘rentey, Dave Love, +Sascha Lüdecke, Eric Ludlam, Alan Mackenzie, Christopher J.@: Madsen, Neil M.@: Mager, Ken Manheimer, Bill Mann, Brian Marick, Simon Marshall, Bengt Martensson, Charlie Martin, Thomas May, Roland McGrath, Will Mengarini, David Megginson, Ben A. Mesander, Wayne Mesard, Brad diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 32d13b57ffd..0f33666789c 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Glenn Morris + + * Makefile.in (MAKEINFO_OPTS): Add --enable-encoding. + * intro.texi (Acknowledgements): Names to UTF-8. + 2011-03-06 Chong Yidong * package.texi: Update index keywords. diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in index d5427f6e477..75fa884224b 100644 --- a/doc/lispref/Makefile.in +++ b/doc/lispref/Makefile.in @@ -31,7 +31,7 @@ texinfodir = $(srcdir)/../misc emacsdir = $(srcdir)/../emacs MAKEINFO = @MAKEINFO@ -MAKEINFO_OPTS = --force -I $(emacsdir) -I $(srcdir) +MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir) TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf DVIPS = dvips diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi index baa184004e2..59718cbee75 100644 --- a/doc/lispref/intro.texi +++ b/doc/lispref/intro.texi @@ -1,4 +1,4 @@ -@c -*-texinfo-*- +@c -*-coding: utf-8-*- @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1994, 2001-2011 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @@ -542,6 +542,6 @@ Kirman, Bob Knighten, Frederick M. Korz, Joe Lammens, Glenn M. Lewis, K. Richard Magill, Brian Marick, Roland McGrath, Stefan Monnier, Skip Montanaro, John Gardiner Myers, Thomas A. Peterson, Francesco Potorti, Friedrich Pukelsheim, Arnold D. Robbins, Raul Rockwell, Jason Rumney, -Per Starb@"ack, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill +Per Starbäck, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill Trost, Rickard Westman, Jean White, Eduard Wiebe, Matthew Wilding, Carl Witty, Dale Worley, Rusty Wright, and David D. Zuhn. From b511b994ae5fc66d36a64f54eb71b87612463918 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 8 Mar 2011 13:58:40 +0100 Subject: [PATCH 067/383] * simple.el (shell-command-to-string): Use `process-file'. * emacs-lisp/package.el (package-tar-file-info): Handle also remote files. * emacs-lisp/package-x.el (package-upload-buffer-internal): Use `equal' for upload base check. --- lisp/ChangeLog | 10 +++++ lisp/emacs-lisp/package-x.el | 8 ++-- lisp/emacs-lisp/package.el | 77 +++++++++++++++++++----------------- lisp/simple.el | 2 +- 4 files changed, 55 insertions(+), 42 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6aa6993a70a..ca21c9ebf2c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2011-03-08 Michael Albinus + + * simple.el (shell-command-to-string): Use `process-file'. + + * emacs-lisp/package.el (package-tar-file-info): Handle also + remote files. + + * emacs-lisp/package-x.el (package-upload-buffer-internal): Use + `equal' for upload base check. + 2011-03-08 Arni Magnusson (tiny change) * textmodes/texinfo.el (texinfo-environments): diff --git a/lisp/emacs-lisp/package-x.el b/lisp/emacs-lisp/package-x.el index 4de95f65702..cd4b5ee231c 100644 --- a/lisp/emacs-lisp/package-x.el +++ b/lisp/emacs-lisp/package-x.el @@ -185,9 +185,9 @@ if it exists." (let ((package-archive-upload-base package-archive-upload-base)) ;; Check if `package-archive-upload-base' is valid. (when (or (not (stringp package-archive-upload-base)) - (eq package-archive-upload-base - (car-safe - (get 'package-archive-upload-base 'standard-value)))) + (equal package-archive-upload-base + (car-safe + (get 'package-archive-upload-base 'standard-value)))) (setq package-archive-upload-base (read-directory-name "Base directory for package archive: "))) @@ -306,4 +306,4 @@ This should be invoked from the gnus *Summary* buffer." (provide 'package-x) -;;; package.el ends here +;;; package-x.el ends here diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 2552ad4eb68..397feb45633 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -911,43 +911,46 @@ boundaries." "Find package information for a tar file. FILE is the name of the tar file to examine. The return result is a vector like `package-buffer-info'." - (unless (string-match "^\\(.+\\)-\\([0-9.]+\\)\\.tar$" file) - (error "Invalid package name `%s'" file)) - (let* ((pkg-name (file-name-nondirectory (match-string-no-properties 1 file))) - (pkg-version (match-string-no-properties 2 file)) - ;; Extract the package descriptor. - (pkg-def-contents (shell-command-to-string - ;; Requires GNU tar. - (concat "tar -xOf " file " " - pkg-name "-" pkg-version "/" - pkg-name "-pkg.el"))) - (pkg-def-parsed (package-read-from-string pkg-def-contents))) - (unless (eq (car pkg-def-parsed) 'define-package) - (error "No `define-package' sexp is present in `%s-pkg.el'" pkg-name)) - (let ((name-str (nth 1 pkg-def-parsed)) - (version-string (nth 2 pkg-def-parsed)) - (docstring (nth 3 pkg-def-parsed)) - (requires (nth 4 pkg-def-parsed)) - (readme (shell-command-to-string - ;; Requires GNU tar. - (concat "tar -xOf " file " " - pkg-name "-" pkg-version "/README")))) - (unless (equal pkg-version version-string) - (error "Package has inconsistent versions")) - (unless (equal pkg-name name-str) - (error "Package has inconsistent names")) - ;; Kind of a hack. - (if (string-match ": Not found in archive" readme) - (setq readme nil)) - ;; Turn string version numbers into list form. - (if (eq (car requires) 'quote) - (setq requires (car (cdr requires)))) - (setq requires - (mapcar (lambda (elt) - (list (car elt) - (version-to-list (cadr elt)))) - requires)) - (vector pkg-name requires docstring version-string readme)))) + (let ((default-directory (file-name-directory file)) + (file (file-name-nondirectory file))) + (unless (string-match "^\\(.+\\)-\\([0-9.]+\\)\\.tar$" file) + (error "Invalid package name `%s'" file)) + (let* ((pkg-name (match-string-no-properties 1 file)) + (pkg-version (match-string-no-properties 2 file)) + ;; Extract the package descriptor. + (pkg-def-contents (shell-command-to-string + ;; Requires GNU tar. + (concat "tar -xOf " file " " + + pkg-name "-" pkg-version "/" + pkg-name "-pkg.el"))) + (pkg-def-parsed (package-read-from-string pkg-def-contents))) + (unless (eq (car pkg-def-parsed) 'define-package) + (error "No `define-package' sexp is present in `%s-pkg.el'" pkg-name)) + (let ((name-str (nth 1 pkg-def-parsed)) + (version-string (nth 2 pkg-def-parsed)) + (docstring (nth 3 pkg-def-parsed)) + (requires (nth 4 pkg-def-parsed)) + (readme (shell-command-to-string + ;; Requires GNU tar. + (concat "tar -xOf " file " " + pkg-name "-" pkg-version "/README")))) + (unless (equal pkg-version version-string) + (error "Package has inconsistent versions")) + (unless (equal pkg-name name-str) + (error "Package has inconsistent names")) + ;; Kind of a hack. + (if (string-match ": Not found in archive" readme) + (setq readme nil)) + ;; Turn string version numbers into list form. + (if (eq (car requires) 'quote) + (setq requires (car (cdr requires)))) + (setq requires + (mapcar (lambda (elt) + (list (car elt) + (version-to-list (cadr elt)))) + requires)) + (vector pkg-name requires docstring version-string readme))))) ;;;###autoload (defun package-install-from-buffer (pkg-info type) diff --git a/lisp/simple.el b/lisp/simple.el index a2dda5f04d2..653501625b5 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2628,7 +2628,7 @@ specifies the value of ERROR-BUFFER." (with-output-to-string (with-current-buffer standard-output - (call-process shell-file-name nil t nil shell-command-switch command)))) + (process-file shell-file-name nil t nil shell-command-switch command)))) (defun process-file (program &optional infile buffer display &rest args) "Process files synchronously in a separate process. From a50575464256f7d77914548c520255e72950803c Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Tue, 8 Mar 2011 14:26:05 +0000 Subject: [PATCH 068/383] Merge changes made in Gnus trunk. message.texi (Message Buffers): Update default value of message-generate-new-buffers. shr.el (shr-table-horizontal-line): Change the defaults for the table lines to be spaces instead. sieve-manage.el (sieve-sasl-auth): Create auth-info if not found. (sieve-sasl-auth): Check that auth-source-search did return something, or just return an empty string. gnus-start.el (gnus-group-change-level): Allow putting foreign groups onto the list of killed groups, too. This makes killed nnimap groups, for instance, more reliably not reappear. nnimap.el (nnimap-request-thread): Don't bug out when we can't find the parent. --- doc/misc/ChangeLog | 5 +++++ doc/misc/message.texi | 5 ++--- lisp/gnus/ChangeLog | 18 ++++++++++++++++++ lisp/gnus/gnus-start.el | 17 +++++++---------- lisp/gnus/nnimap.el | 9 +++++---- lisp/gnus/shr.el | 6 +++--- lisp/gnus/sieve-manage.el | 7 ++++--- 7 files changed, 44 insertions(+), 23 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 2c5f998737a..75674c7fd17 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2011-03-07 Antoine Levitt + + * message.texi (Message Buffers): Update default value of + message-generate-new-buffers. + 2011-03-06 Jay Belanger * calc.texi (Logarithmic Units): Rename calc-logunits-dblevel diff --git a/doc/misc/message.texi b/doc/misc/message.texi index b28639907ed..2937037ebb3 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -2298,8 +2298,7 @@ created. @item unique @item t -Create the new buffer with the name generated in the Message way. This -is the default. +Create the new buffer with the name generated in the Message way. @item unsent Similar to @code{unique} but the buffer name begins with "*unsent ". @@ -2315,7 +2314,7 @@ type, the To address and the group name (any of these may be @code{nil}). The function should return the new buffer name. @end table -The default value is @code{unique}. +The default value is @code{unsent}. @item message-max-buffers @vindex message-max-buffers diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c14c79a92cb..b30cfdcfcd3 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,14 @@ +2011-03-07 Lars Magne Ingebrigtsen + + * shr.el (shr-table-horizontal-line): Change the defaults for the table + lines to be spaces instead. + +2011-03-07 Julien Danjou + + * sieve-manage.el (sieve-sasl-auth): Create auth-info if not found. + (sieve-sasl-auth): Check that auth-source-search did return something, + or just return an empty string. + 2011-03-05 Antoine Levitt * gnus.el (gnus-interactive): Use read-directory-name. @@ -12,6 +23,13 @@ 2011-03-05 Lars Magne Ingebrigtsen + * gnus-start.el (gnus-group-change-level): Allow putting foreign groups + onto the list of killed groups, too. This makes killed nnimap groups, + for instance, more reliably not reappear. + + * nnimap.el (nnimap-request-thread): Don't bug out when we can't find + the parent. + * gnus-sum.el (gnus-update-read-articles): Fix typo. * gnus.el (gnus-valid-select-methods): Mark nnimap as a backend that diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index ebfa53f841e..c6ff6044b92 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1306,16 +1306,13 @@ for new groups, and subscribe the new groups as zombies." ((>= level gnus-level-zombie) ;; Remove from the hash table. (gnus-sethash group nil gnus-newsrc-hashtb) - ;; We do not enter foreign groups into the list of dead - ;; groups. - (unless (gnus-group-foreign-p group) - (if (= level gnus-level-zombie) - (push group gnus-zombie-list) - (if (= oldlevel gnus-level-killed) - ;; Remove from active hashtb. - (unintern group gnus-active-hashtb) - ;; Don't add it into killed-list if it was killed. - (push group gnus-killed-list))))) + (if (= level gnus-level-zombie) + (push group gnus-zombie-list) + (if (= oldlevel gnus-level-killed) + ;; Remove from active hashtb. + (unintern group gnus-active-hashtb) + ;; Don't add it into killed-list if it was killed. + (push group gnus-killed-list)))) (t ;; If the list is to be entered into the newsrc assoc, and ;; it was killed, we have to create an entry in the newsrc diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index aa4ecbc3b0f..638097abd7d 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1545,10 +1545,11 @@ textual parts.") refid refid value))))) (result (with-current-buffer (nnimap-buffer) (nnimap-command "UID SEARCH %s" cmd)))) - (gnus-fetch-headers - (and (car result) (delete 0 (mapcar #'string-to-number - (cdr (assoc "SEARCH" (cdr result)))))) - nil t))) + (when result + (gnus-fetch-headers + (and (car result) (delete 0 (mapcar #'string-to-number + (cdr (assoc "SEARCH" (cdr result)))))) + nil t)))) (defun nnimap-possibly-change-group (group server) (let ((open-result t)) diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index bb9695ebb72..c9c5bd5ff1c 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -53,17 +53,17 @@ fit these criteria." :group 'shr :type 'regexp) -(defcustom shr-table-horizontal-line ?- +(defcustom shr-table-horizontal-line ? "Character used to draw horizontal table lines." :group 'shr :type 'character) -(defcustom shr-table-vertical-line ?| +(defcustom shr-table-vertical-line ? "Character used to draw vertical table lines." :group 'shr :type 'character) -(defcustom shr-table-corner ?+ +(defcustom shr-table-corner ? "Character used to draw table corners." :group 'shr :type 'character) diff --git a/lisp/gnus/sieve-manage.el b/lisp/gnus/sieve-manage.el index c9a0df20590..5c2e775a211 100644 --- a/lisp/gnus/sieve-manage.el +++ b/lisp/gnus/sieve-manage.el @@ -275,9 +275,10 @@ Valid states are `closed', `initial', `nonauth', and `auth'.") (with-current-buffer buffer (let* ((auth-info (auth-source-search :host sieve-manage-server :port "sieve" - :max 1)) - (user-name (plist-get (nth 0 auth-info) :user)) - (user-password (plist-get (nth 0 auth-info) :secret)) + :max 1 + :create t)) + (user-name (or (plist-get (nth 0 auth-info) :user) "")) + (user-password (or (plist-get (nth 0 auth-info) :secret) "")) (user-password (if (functionp user-password) (funcall user-password) user-password)) From 515de2e32145b54e9ccf5cc8f74f1773e9652041 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 8 Mar 2011 12:11:19 -0500 Subject: [PATCH 069/383] Use condition-case-no-debug in package.el. * lisp/emacs-lisp/package.el (package-refresh-contents) (package-menu-execute): Use condition-case-no-debug. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/package.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ca21c9ebf2c..7963e3432cb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Chong Yidong + + * emacs-lisp/package.el (package-refresh-contents) + (package-menu-execute): Use condition-case-no-debug. + 2011-03-08 Michael Albinus * simple.el (shell-command-to-string): Use `process-file'. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 397feb45633..d90164b5a95 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1040,7 +1040,7 @@ makes them available for download." (unless (file-exists-p package-user-dir) (make-directory package-user-dir t)) (dolist (archive package-archives) - (condition-case nil + (condition-case-no-debug nil (package--download-one-archive archive "archive-contents") (error (message "Failed to download `%s' archive." (car archive))))) @@ -1468,7 +1468,7 @@ packages marked for deletion are removed." delete-list ", ")))) (dolist (elt delete-list) - (condition-case err + (condition-case-no-debug err (package-delete (car elt) (cdr elt)) (error (message (cadr err))))) (error "Aborted"))) From 630d6892438c5fff742a0dddb0692d2a991418e2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 09:25:52 -0800 Subject: [PATCH 070/383] * bidi.c (BIDI_BOB): Remove unused macro. --- src/ChangeLog | 1 + src/bidi.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4bf04043ab9..3375d985a41 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -80,6 +80,7 @@ (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros. * bidi.c (bidi_check_type): Now static, since it's not used elsewhere. + (BIDI_BOB): Remove unused macro. 2011-03-06 Chong Yidong diff --git a/src/bidi.c b/src/bidi.c index 1289798dd8c..3457e177436 100644 --- a/src/bidi.c +++ b/src/bidi.c @@ -72,7 +72,6 @@ static Lisp_Object bidi_type_table, bidi_mirror_table; #define RLO_CHAR 0x202E #define BIDI_EOB -1 -#define BIDI_BOB -2 /* FIXME: Is this needed? */ /* Local data structures. (Look in dispextern.h for the rest.) */ From 6be7d3dab6a206d26d1845e3791eaf26be1be72f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 09:28:17 -0800 Subject: [PATCH 071/383] * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. --- src/ChangeLog | 3 +++ src/cm.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3375d985a41..477e74483e6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -82,6 +82,9 @@ * bidi.c (bidi_check_type): Now static, since it's not used elsewhere. (BIDI_BOB): Remove unused macro. + * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not + deduce are never used uninitialized. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/cm.c b/src/cm.c index d4aedad6db4..af4116f3fec 100644 --- a/src/cm.c +++ b/src/cm.c @@ -330,7 +330,7 @@ cmgoto (struct tty_display_info *tty, int row, int col) llcost, relcost, directcost; - int use; + int use IF_LINT (= 0); char *p, *dcm; @@ -460,4 +460,3 @@ Wcm_init (struct tty_display_info *tty) return - 2; return 0; } - From 72abad34056c26fce75f8ece4b66ce386f2d0725 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 09:30:15 -0800 Subject: [PATCH 072/383] * term.c (encode_terminal_code): Now static. --- src/ChangeLog | 2 ++ src/term.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 477e74483e6..325822a29a2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -85,6 +85,8 @@ * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. + * term.c (encode_terminal_code): Now static. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/term.c b/src/term.c index f082bb40e89..873ffaba299 100644 --- a/src/term.c +++ b/src/term.c @@ -512,7 +512,7 @@ static int encode_terminal_dst_size; Set CODING->produced to the byte-length of the resulting byte sequence, and return a pointer to that byte sequence. */ -unsigned char * +static unsigned char * encode_terminal_code (struct glyph *src, int src_len, struct coding_system *coding) { struct glyph *src_end = src + src_len; From 75f8807fe6cc437f58845ec21621614d1dbb7f36 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 09:31:51 -0800 Subject: [PATCH 073/383] * term.c (encode_terminal_code): Remove unused local --- src/ChangeLog | 2 +- src/term.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 325822a29a2..107d7d663da 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -85,7 +85,7 @@ * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. - * term.c (encode_terminal_code): Now static. + * term.c (encode_terminal_code): Now static. Remove unused local. 2011-03-06 Chong Yidong diff --git a/src/term.c b/src/term.c index 873ffaba299..80db7fbeb17 100644 --- a/src/term.c +++ b/src/term.c @@ -664,8 +664,6 @@ encode_terminal_code (struct glyph *src, int src_len, struct coding_system *codi } else { - unsigned char *p = SDATA (string); - if (! STRING_MULTIBYTE (string)) string = string_to_multibyte (string); nbytes = buf - encode_terminal_src; From 80b005c7673c45feeb45c8bda9778deaddb9b9a3 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 8 Mar 2011 09:33:55 -0800 Subject: [PATCH 074/383] Add missing piece of previous doc/ change. * doc/lispref/elisp.texi: Set documentencoding. --- doc/emacs/ChangeLog | 1 + doc/lispref/ChangeLog | 1 + doc/lispref/elisp.texi | 2 ++ 3 files changed, 4 insertions(+) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 1dc2426bffe..d46e21eb82a 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -8,6 +8,7 @@ * Makefile.in (MAKEINFO_OPTS): Add --enable-encoding. * emacs.texi (Acknowledgments): * ack.texi (Acknowledgments): Names to UTF-8. + * emacs.texi: Set documentencoding. * display.texi (Optional Mode Line): Don't mention exactly where display-time appears. (Bug#8193) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 0f33666789c..7a402c902e5 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -2,6 +2,7 @@ * Makefile.in (MAKEINFO_OPTS): Add --enable-encoding. * intro.texi (Acknowledgements): Names to UTF-8. + * elisp.texi: Set documentencoding. 2011-03-06 Chong Yidong diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index fc066526614..1bd10633d44 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -62,6 +62,8 @@ developing GNU and promoting software freedom.'' @end quotation @end copying +@documentencoding UTF-8 + @dircategory GNU Emacs Lisp @direntry * Elisp: (elisp). The Emacs Lisp Reference Manual. From 50938595880fd87c7dcd39a607cba1b0a7598baf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 10:26:34 -0800 Subject: [PATCH 075/383] * tparam.h: New file. * term.c, tparam.h: Include it. * deps.mk (term.o, tparam.o): Depend on tparam.h. * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr): Move these decls to tparam.h, and make them agree with what is actually in tparam.c. The previous trick of using incompatible decls in different modules does not conform to the C standard. All callers of tparam changed to use tparam's actual API. * tparam.c (tparam1, tparam, tgoto): Use const pointers where appropriate. --- src/ChangeLog | 11 +++++++++++ src/deps.mk | 4 ++-- src/term.c | 25 +++++++------------------ src/tparam.c | 16 +++++++++------- src/tparam.h | 31 +++++++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 27 deletions(-) create mode 100644 src/tparam.h diff --git a/src/ChangeLog b/src/ChangeLog index 107d7d663da..350f01953d4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -87,6 +87,17 @@ * term.c (encode_terminal_code): Now static. Remove unused local. + * tparam.h: New file. + * term.c, tparam.h: Include it. + * deps.mk (term.o, tparam.o): Depend on tparam.h. + * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr): + Move these decls to tparam.h, and make them agree with what + is actually in tparam.c. The previous trick of using incompatible + decls in different modules does not conform to the C standard. + All callers of tparam changed to use tparam's actual API. + * tparam.c (tparam1, tparam, tgoto): + Use const pointers where appropriate. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/deps.mk b/src/deps.mk index 77994bcaadb..2b162b07bb8 100644 --- a/src/deps.mk +++ b/src/deps.mk @@ -190,13 +190,13 @@ sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \ term.o: term.c termchar.h termhooks.h termopts.h lisp.h globals.h $(config_h) \ cm.h frame.h disptab.h keyboard.h character.h charset.h coding.h ccl.h \ xterm.h msdos.h window.h keymap.h blockinput.h atimer.h systime.h \ - systty.h syssignal.h $(INTERVALS_H) buffer.h ../lib/unistd.h + systty.h syssignal.h tparam.h $(INTERVALS_H) buffer.h ../lib/unistd.h termcap.o: termcap.c lisp.h $(config_h) terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \ keyboard.h lisp.h globals.h $(config_h) dispextern.h composite.h systime.h \ msdos.h terminfo.o: terminfo.c lisp.h globals.h $(config_h) -tparam.o: tparam.c lisp.h $(config_h) +tparam.o: tparam.c tparam.h lisp.h $(config_h) undo.o: undo.c buffer.h commands.h window.h dispextern.h msdos.h \ lisp.h globals.h $(config_h) unexaix.o: unexaix.c lisp.h $(config_h) diff --git a/src/term.c b/src/term.c index 80db7fbeb17..19d7d893069 100644 --- a/src/term.c +++ b/src/term.c @@ -32,6 +32,7 @@ along with GNU Emacs. If not, see . */ #include "lisp.h" #include "termchar.h" #include "termopts.h" +#include "tparam.h" #include "buffer.h" #include "character.h" #include "charset.h" @@ -53,18 +54,6 @@ along with GNU Emacs. If not, see . */ static int been_here = -1; #endif -/* For now, don't try to include termcap.h. On some systems, - configure finds a non-standard termcap.h that the main build - won't find. */ -extern void tputs (const char *, int, int (*)(int)); -extern int tgetent (char *, const char *); -extern int tgetflag (char *id); -extern int tgetnum (char *id); - -char *tparam (char *, char *, int, int, ...); - -extern char *tgetstr (char *, char **); - #include "cm.h" #ifdef HAVE_X_WINDOWS #include "xterm.h" @@ -262,7 +251,7 @@ tty_set_scroll_region (struct frame *f, int start, int stop) struct tty_display_info *tty = FRAME_TTY (f); if (tty->TS_set_scroll_region) - buf = tparam (tty->TS_set_scroll_region, 0, 0, start, stop - 1); + buf = tparam (tty->TS_set_scroll_region, 0, 0, start, stop - 1, 0, 0); else if (tty->TS_set_scroll_region_1) buf = tparam (tty->TS_set_scroll_region_1, 0, 0, FRAME_LINES (f), start, @@ -859,7 +848,7 @@ tty_insert_glyphs (struct frame *f, struct glyph *start, int len) if (tty->TS_ins_multi_chars) { - buf = tparam (tty->TS_ins_multi_chars, 0, 0, len); + buf = tparam (tty->TS_ins_multi_chars, 0, 0, len, 0, 0, 0); OUTPUT1 (tty, buf); xfree (buf); if (start) @@ -955,7 +944,7 @@ tty_delete_glyphs (struct frame *f, int n) if (tty->TS_del_multi_chars) { - buf = tparam (tty->TS_del_multi_chars, 0, 0, n); + buf = tparam (tty->TS_del_multi_chars, 0, 0, n, 0, 0, 0); OUTPUT1 (tty, buf); xfree (buf); } @@ -997,7 +986,7 @@ tty_ins_del_lines (struct frame *f, int vpos, int n) { raw_cursor_to (f, vpos, 0); tty_background_highlight (tty); - buf = tparam (multi, 0, 0, i); + buf = tparam (multi, 0, 0, i, 0, 0, 0); OUTPUT (tty, buf); xfree (buf); } @@ -2125,7 +2114,7 @@ turn_on_face (struct frame *f, int face_id) ts = tty->standout_mode ? tty->TS_set_background : tty->TS_set_foreground; if (fg >= 0 && ts) { - p = tparam (ts, NULL, 0, (int) fg); + p = tparam (ts, NULL, 0, (int) fg, 0, 0, 0); OUTPUT (tty, p); xfree (p); } @@ -2133,7 +2122,7 @@ turn_on_face (struct frame *f, int face_id) ts = tty->standout_mode ? tty->TS_set_foreground : tty->TS_set_background; if (bg >= 0 && ts) { - p = tparam (ts, NULL, 0, (int) bg); + p = tparam (ts, NULL, 0, (int) bg, 0, 0, 0); OUTPUT (tty, p); xfree (p); } diff --git a/src/tparam.c b/src/tparam.c index fcbb63881e6..6aae0b97db9 100644 --- a/src/tparam.c +++ b/src/tparam.c @@ -21,6 +21,7 @@ Boston, MA 02110-1301, USA. */ #include #include #include "lisp.h" /* for xmalloc */ +#include "tparam.h" #ifndef NULL #define NULL (char *) 0 @@ -38,11 +39,12 @@ Boston, MA 02110-1301, USA. */ The fourth and following args to tparam serve as the parameter values. */ -static char *tparam1 (char *string, char *outstring, int len, char *up, char *left, register int *argp); +static char *tparam1 (char const *string, char *outstring, int len, + char *up, char *left, int *argp); -/* VARARGS 2 */ char * -tparam (char *string, char *outstring, int len, int arg0, int arg1, int arg2, int arg3) +tparam (const char *string, char *outstring, int len, + int arg0, int arg1, int arg2, int arg3) { int arg[4]; @@ -59,7 +61,7 @@ char *UP; static char tgoto_buf[50]; char * -tgoto (char *cm, int hpos, int vpos) +tgoto (const char *cm, int hpos, int vpos) { int args[2]; if (!cm) @@ -70,10 +72,11 @@ tgoto (char *cm, int hpos, int vpos) } static char * -tparam1 (char *string, char *outstring, int len, char *up, char *left, register int *argp) +tparam1 (const char *string, char *outstring, int len, + char *up, char *left, register int *argp) { register int c; - register char *p = string; + register const char *p = string; register char *op = outstring; char *outend; int outlen = 0; @@ -277,4 +280,3 @@ main (argc, argv) } #endif /* DEBUG */ - diff --git a/src/tparam.h b/src/tparam.h new file mode 100644 index 00000000000..11c9ae68aad --- /dev/null +++ b/src/tparam.h @@ -0,0 +1,31 @@ +/* Interface definitions for termcap entries. + +Copyright (C) 2011 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . */ + + +/* Don't try to include termcap.h. On some systems, configure finds a + non-standard termcap.h that the main build won't find. */ + +void tputs (const char *, int, int (*) (int)); +int tgetent (char *, const char *); +int tgetflag (char *id); +int tgetnum (char *id); +char *tgetstr (char *, char **); +char *tgoto (const char *, int, int); + +char *tparam (const char *, char *, int, int, int, int, int); From fbceeba21b3b5aeb2a0f98d4ca937cabbe07fab0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 18:12:00 -0800 Subject: [PATCH 076/383] * cm.c (calccost, cmgoto): Use const pointers where appropriate. * cm.h (struct cm): Likewise. * dispextern.h (do_line_insertion_deletion_costs): Likewise. * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise. * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table): (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph): (turn_on_face, init_tty): Likewise. * termchar.h (struct tty_display_info): Likewise. * term.c (tgetflag, tgetnum, tgetstr): Redefine to use const pointers. --- src/ChangeLog | 10 ++++++ src/cm.c | 6 ++-- src/cm.h | 33 +++++++++-------- src/dispextern.h | 7 ++-- src/scroll.c | 13 ++++--- src/term.c | 51 ++++++++++++++++---------- src/termchar.h | 93 ++++++++++++++++++++++++------------------------ 7 files changed, 120 insertions(+), 93 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 350f01953d4..a8594fb3fc6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -98,6 +98,16 @@ * tparam.c (tparam1, tparam, tgoto): Use const pointers where appropriate. + * cm.c (calccost, cmgoto): Use const pointers where appropriate. + * cm.h (struct cm): Likewise. + * dispextern.h (do_line_insertion_deletion_costs): Likewise. + * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise. + * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table): + (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph): + (turn_on_face, init_tty): Likewise. + * termchar.h (struct tty_display_info): Likewise. + * term.c (tgetflag, tgetnum, tgetstr): Redefine to use const pointers. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/cm.c b/src/cm.c index af4116f3fec..108ee5720f3 100644 --- a/src/cm.c +++ b/src/cm.c @@ -199,7 +199,7 @@ calccost (struct tty_display_info *tty, tabx, tab2x, tabcost; - register char *p; + register const char *p; /* If have just wrapped on a terminal with xn, don't believe the cursor position: give up here @@ -331,8 +331,8 @@ cmgoto (struct tty_display_info *tty, int row, int col) relcost, directcost; int use IF_LINT (= 0); - char *p, - *dcm; + char *p; + const char *dcm; /* First the degenerate case */ if (row == curY (tty) && col == curX (tty)) /* already there */ diff --git a/src/cm.h b/src/cm.h index 7b4bedd4e88..5d430598f0c 100644 --- a/src/cm.h +++ b/src/cm.h @@ -35,25 +35,25 @@ struct cm int cm_curX; /* Current column */ /* Capabilities from termcap */ - char *cm_up; /* up (up) */ - char *cm_down; /* down (do) */ - char *cm_left; /* left (le) */ - char *cm_right; /* right (nd) */ - char *cm_home; /* home (ho) */ - char *cm_cr; /* carriage return (cr) */ - char *cm_ll; /* last line (ll) */ - char *cm_tab; /* tab (ta) */ - char *cm_backtab; /* backtab (bt) */ + const char *cm_up; /* up (up) */ + const char *cm_down; /* down (do) */ + const char *cm_left; /* left (le) */ + const char *cm_right; /* right (nd) */ + const char *cm_home; /* home (ho) */ + const char *cm_cr; /* carriage return (cr) */ + const char *cm_ll; /* last line (ll) */ + const char *cm_tab; /* tab (ta) */ + const char *cm_backtab; /* backtab (bt) */ char *cm_abs; /* absolute (cm) */ - char *cm_habs; /* horizontal absolute (ch) */ - char *cm_vabs; /* vertical absolute (cv) */ + const char *cm_habs; /* horizontal absolute (ch) */ + const char *cm_vabs; /* vertical absolute (cv) */ #if 0 - char *cm_ds; /* "don't send" string (ds) */ + const char *cm_ds; /* "don't send" string (ds) */ #endif - char *cm_multiup; /* multiple up (UP) */ - char *cm_multidown; /* multiple down (DO) */ - char *cm_multileft; /* multiple left (LE) */ - char *cm_multiright; /* multiple right (RI) */ + const char *cm_multiup; /* multiple up (UP) */ + const char *cm_multidown; /* multiple down (DO) */ + const char *cm_multileft; /* multiple left (LE) */ + const char *cm_multiright; /* multiple right (RI) */ int cm_cols; /* number of cols on screen (co) */ int cm_rows; /* number of rows on screen (li) */ int cm_tabwidth; /* tab width (it) */ @@ -168,4 +168,3 @@ extern void cmcostinit (struct tty_display_info *); extern void cmgoto (struct tty_display_info *, int, int); extern void Wcm_clear (struct tty_display_info *); extern int Wcm_init (struct tty_display_info *); - diff --git a/src/dispextern.h b/src/dispextern.h index 30979d487ff..9843dfd1fcd 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3326,9 +3326,10 @@ extern struct terminal *init_tty (const char *, const char *, int); extern int scrolling_max_lines_saved (int, int, int *, int *, int *); extern int scroll_cost (struct frame *, int, int, int); -extern void do_line_insertion_deletion_costs (struct frame *, char *, - char *, char *, char *, - char *, char *, int); +extern void do_line_insertion_deletion_costs (struct frame *, const char *, + const char *, const char *, + const char *, const char *, + const char *, int); void scrolling_1 (struct frame *, int, int, int, int *, int *, int *, int *, int); diff --git a/src/scroll.c b/src/scroll.c index 1343b89c41e..33af18d2090 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -938,8 +938,8 @@ line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, register int static void ins_del_costs (FRAME_PTR frame, - char *one_line_string, char *multi_string, - char *setup_string, char *cleanup_string, + const char *one_line_string, const char *multi_string, + const char *setup_string, const char *cleanup_string, int *costvec, int *ncostvec, int coefficient) { @@ -994,9 +994,12 @@ ins_del_costs (FRAME_PTR frame, void do_line_insertion_deletion_costs (FRAME_PTR frame, - char *ins_line_string, char *multi_ins_string, - char *del_line_string, char *multi_del_string, - char *setup_string, char *cleanup_string, + const char *ins_line_string, + const char *multi_ins_string, + const char *del_line_string, + const char *multi_del_string, + const char *setup_string, + const char *cleanup_string, int coefficient) { if (FRAME_INSERT_COST (frame) != 0) diff --git a/src/term.c b/src/term.c index 19d7d893069..6986cfb9e03 100644 --- a/src/term.c +++ b/src/term.c @@ -961,9 +961,10 @@ static void tty_ins_del_lines (struct frame *f, int vpos, int n) { struct tty_display_info *tty = FRAME_TTY (f); - char *multi = n > 0 ? tty->TS_ins_multi_lines : tty->TS_del_multi_lines; - char *single = n > 0 ? tty->TS_ins_line : tty->TS_del_line; - char *scroll = n > 0 ? tty->TS_rev_scroll : tty->TS_fwd_scroll; + const char *multi = + n > 0 ? tty->TS_ins_multi_lines : tty->TS_del_multi_lines; + const char *single = n > 0 ? tty->TS_ins_line : tty->TS_del_line; + const char *scroll = n > 0 ? tty->TS_rev_scroll : tty->TS_fwd_scroll; register int i = n > 0 ? n : -n; register char *buf; @@ -1138,9 +1139,9 @@ calculate_costs (struct frame *frame) if (FRAME_TERMCAP_P (frame)) { struct tty_display_info *tty = FRAME_TTY (frame); - register char *f = (tty->TS_set_scroll_region - ? tty->TS_set_scroll_region - : tty->TS_set_scroll_region_1); + register const char *f = (tty->TS_set_scroll_region + ? tty->TS_set_scroll_region + : tty->TS_set_scroll_region_1); FRAME_SCROLL_REGION_COST (frame) = string_cost (f); @@ -1194,7 +1195,7 @@ calculate_costs (struct frame *frame) } struct fkey_table { - char *cap, *name; + const char *cap, *name; }; /* Termcap capability names that correspond directly to X keysyms. @@ -1305,6 +1306,18 @@ static char **term_get_fkeys_address; static KBOARD *term_get_fkeys_kboard; static Lisp_Object term_get_fkeys_1 (void); +/* Rework termcap API to accept const pointer args. */ +static inline int my_tgetflag (const char *x) { return tgetflag ((char *) x); } +static inline int my_tgetnum (const char *x) { return tgetnum ((char *) x); } +static inline char *my_tgetstr (const char *x, char **a) +{ return tgetstr ((char *) x, a); } +#undef tgetflag +#undef tgetnum +#undef tgetstr +#define tgetflag my_tgetflag +#define tgetnum my_tgetnum +#define tgetstr my_tgetstr + /* Find the escape codes sent by the function keys for Vinput_decode_map. This function scans the termcap function key sequence entries, and adds entries to Vinput_decode_map for each function key it finds. */ @@ -1352,9 +1365,9 @@ term_get_fkeys_1 (void) "k;", and if it is present, assuming that "k0" denotes F0, otherwise F10. */ { - char *k_semi = tgetstr ("k;", address); - char *k0 = tgetstr ("k0", address); - char *k0_name = "f10"; + const char *k_semi = tgetstr ("k;", address); + const char *k0 = tgetstr ("k0", address); + const char *k0_name = "f10"; if (k_semi) { @@ -1447,7 +1460,7 @@ static void append_glyph (struct it *); static void produce_stretch_glyph (struct it *); static void append_composite_glyph (struct it *); static void produce_composite_glyph (struct it *); -static void append_glyphless_glyph (struct it *, int, char *); +static void append_glyphless_glyph (struct it *, int, const char *); static void produce_glyphless_glyph (struct it *, int, Lisp_Object); /* Append glyphs to IT's glyph_row. Called from produce_glyphs for @@ -1815,7 +1828,7 @@ produce_composite_glyph (struct it *it) comes from it->nglyphs bytes). */ static void -append_glyphless_glyph (struct it *it, int face_id, char *str) +append_glyphless_glyph (struct it *it, int face_id, const char *str) { struct glyph *glyph, *end; int i; @@ -1890,7 +1903,8 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym) { int face_id; int len; - char buf[9], *str = " "; + char buf[9]; + char const *str = " "; /* Get a face ID for the glyph by utilizing a cache (the same way as done for `escape-glyph' in get_next_display_element). */ @@ -2109,7 +2123,8 @@ turn_on_face (struct frame *f, int face_id) if (tty->TN_max_colors > 0) { - char *ts, *p; + const char *ts; + char *p; ts = tty->standout_mode ? tty->TS_set_background : tty->TS_set_foreground; if (fg >= 0 && ts) @@ -3519,10 +3534,10 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ If it were in the termcap entry, it would confuse other programs. */ if (!tty->TS_set_window) { - p = tty->TS_termcap_modes; - while (*p && strcmp (p, "\033v ")) - p++; - if (*p) + const char *m = tty->TS_termcap_modes; + while (*m && strcmp (m, "\033v ")) + m++; + if (*m) tty->TS_set_window = "\033v%C %C %C %C "; } /* Termcap entry often fails to have :in: flag */ diff --git a/src/termchar.h b/src/termchar.h index 277a96932b4..035974a8ce6 100644 --- a/src/termchar.h +++ b/src/termchar.h @@ -84,58 +84,58 @@ struct tty_display_info /* Strings, numbers and flags taken from the termcap entry. */ - char *TS_ins_line; /* "al" */ - char *TS_ins_multi_lines; /* "AL" (one parameter, # lines to insert) */ - char *TS_bell; /* "bl" */ - char *TS_clr_to_bottom; /* "cd" */ - char *TS_clr_line; /* "ce", clear to end of line */ - char *TS_clr_frame; /* "cl" */ - char *TS_set_scroll_region; /* "cs" (2 params, first line and last line) */ - char *TS_set_scroll_region_1; /* "cS" (4 params: total lines, + const char *TS_ins_line; /* "al" */ + const char *TS_ins_multi_lines; /* "AL" (one parameter, # lines to insert) */ + const char *TS_bell; /* "bl" */ + const char *TS_clr_to_bottom; /* "cd" */ + const char *TS_clr_line; /* "ce", clear to end of line */ + const char *TS_clr_frame; /* "cl" */ + const char *TS_set_scroll_region; /* "cs" (2 params, first line and last line) */ + const char *TS_set_scroll_region_1; /* "cS" (4 params: total lines, lines above scroll region, lines below it, total lines again) */ - char *TS_del_char; /* "dc" */ - char *TS_del_multi_chars; /* "DC" (one parameter, # chars to delete) */ - char *TS_del_line; /* "dl" */ - char *TS_del_multi_lines; /* "DL" (one parameter, # lines to delete) */ - char *TS_delete_mode; /* "dm", enter character-delete mode */ - char *TS_end_delete_mode; /* "ed", leave character-delete mode */ - char *TS_end_insert_mode; /* "ei", leave character-insert mode */ - char *TS_ins_char; /* "ic" */ - char *TS_ins_multi_chars; /* "IC" (one parameter, # chars to insert) */ - char *TS_insert_mode; /* "im", enter character-insert mode */ - char *TS_pad_inserted_char; /* "ip". Just padding, no commands. */ - char *TS_end_keypad_mode; /* "ke" */ - char *TS_keypad_mode; /* "ks" */ - char *TS_pad_char; /* "pc", char to use as padding */ - char *TS_repeat; /* "rp" (2 params, # times to repeat + const char *TS_del_char; /* "dc" */ + const char *TS_del_multi_chars; /* "DC" (one parameter, # chars to delete) */ + const char *TS_del_line; /* "dl" */ + const char *TS_del_multi_lines; /* "DL" (one parameter, # lines to delete) */ + const char *TS_delete_mode; /* "dm", enter character-delete mode */ + const char *TS_end_delete_mode; /* "ed", leave character-delete mode */ + const char *TS_end_insert_mode; /* "ei", leave character-insert mode */ + const char *TS_ins_char; /* "ic" */ + const char *TS_ins_multi_chars; /* "IC" (one parameter, # chars to insert) */ + const char *TS_insert_mode; /* "im", enter character-insert mode */ + const char *TS_pad_inserted_char; /* "ip". Just padding, no commands. */ + const char *TS_end_keypad_mode; /* "ke" */ + const char *TS_keypad_mode; /* "ks" */ + const char *TS_pad_char; /* "pc", char to use as padding */ + const char *TS_repeat; /* "rp" (2 params, # times to repeat and character to be repeated) */ - char *TS_end_standout_mode; /* "se" */ - char *TS_fwd_scroll; /* "sf" */ - char *TS_standout_mode; /* "so" */ - char *TS_rev_scroll; /* "sr" */ - char *TS_end_termcap_modes; /* "te" */ - char *TS_termcap_modes; /* "ti" */ - char *TS_visible_bell; /* "vb" */ - char *TS_cursor_normal; /* "ve" */ - char *TS_cursor_visible; /* "vs" */ - char *TS_cursor_invisible; /* "vi" */ - char *TS_set_window; /* "wi" (4 params, start and end of window, + const char *TS_end_standout_mode; /* "se" */ + const char *TS_fwd_scroll; /* "sf" */ + const char *TS_standout_mode; /* "so" */ + const char *TS_rev_scroll; /* "sr" */ + const char *TS_end_termcap_modes; /* "te" */ + const char *TS_termcap_modes; /* "ti" */ + const char *TS_visible_bell; /* "vb" */ + const char *TS_cursor_normal; /* "ve" */ + const char *TS_cursor_visible; /* "vs" */ + const char *TS_cursor_invisible; /* "vi" */ + const char *TS_set_window; /* "wi" (4 params, start and end of window, each as vpos and hpos) */ - char *TS_enter_bold_mode; /* "md" -- turn on bold (extra bright mode). */ - char *TS_enter_dim_mode; /* "mh" -- turn on half-bright mode. */ - char *TS_enter_blink_mode; /* "mb" -- enter blinking mode. */ - char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */ - char *TS_exit_underline_mode; /* "us" -- start underlining. */ - char *TS_enter_underline_mode; /* "ue" -- end underlining. */ + const char *TS_enter_bold_mode; /* "md" -- turn on bold (extra bright mode). */ + const char *TS_enter_dim_mode; /* "mh" -- turn on half-bright mode. */ + const char *TS_enter_blink_mode; /* "mb" -- enter blinking mode. */ + const char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */ + const char *TS_exit_underline_mode; /* "us" -- start underlining. */ + const char *TS_enter_underline_mode; /* "ue" -- end underlining. */ /* "as"/"ae" -- start/end alternate character set. Not really supported, yet. */ - char *TS_enter_alt_charset_mode; - char *TS_exit_alt_charset_mode; + const char *TS_enter_alt_charset_mode; + const char *TS_exit_alt_charset_mode; - char *TS_exit_attribute_mode; /* "me" -- switch appearances off. */ + const char *TS_exit_attribute_mode; /* "me" -- switch appearances off. */ /* Value of the "NC" (no_color_video) capability, or 0 if not present. */ int TN_no_color_video; @@ -147,12 +147,12 @@ struct tty_display_info int TN_max_pairs; /* "op" -- SVr4 set default pair to its original value. */ - char *TS_orig_pair; + const char *TS_orig_pair; /* "AF"/"AB" or "Sf"/"Sb"-- set ANSI or SVr4 foreground/background color. 1 param, the color index. */ - char *TS_set_foreground; - char *TS_set_background; + const char *TS_set_foreground; + const char *TS_set_background; int TF_hazeltine; /* termcap hz flag. */ int TF_insmode_motion; /* termcap mi flag: can move while in insert mode. */ @@ -210,4 +210,3 @@ extern struct tty_display_info *tty_list; : (abort(), (struct tty_display_info *) 0)) #define CURTTY() FRAME_TTY (SELECTED_FRAME()) - From 7f3f1250d4f74203c828e7ba03b721b1f269a0d7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 18:15:18 -0800 Subject: [PATCH 077/383] * term.c (term_mouse_position): Rename local to avoid shadowing. --- src/ChangeLog | 2 ++ src/term.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a8594fb3fc6..a3695bda635 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -108,6 +108,8 @@ * termchar.h (struct tty_display_info): Likewise. * term.c (tgetflag, tgetnum, tgetstr): Redefine to use const pointers. + * term.c (term_mouse_position): Rename local to avoid shadowing. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/term.c b/src/term.c index 6986cfb9e03..9531cce5f9f 100644 --- a/src/term.c +++ b/src/term.c @@ -2700,14 +2700,14 @@ term_mouse_movement (FRAME_PTR frame, Gpm_Event *event) Set *bar_window to Qnil, and *x and *y to the column and row of the character cell the mouse is over. - Set *time to the time the mouse was at the returned position. + Set *timeptr to the time the mouse was at the returned position. This clears mouse_moved until the next motion event arrives. */ static void term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, - Lisp_Object *y, unsigned long *time) + Lisp_Object *y, unsigned long *timeptr) { struct timeval now; @@ -2720,7 +2720,7 @@ term_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, XSETINT (*x, last_mouse_x); XSETINT (*y, last_mouse_y); gettimeofday(&now, 0); - *time = (now.tv_sec * 1000) + (now.tv_usec / 1000); + *timeptr = (now.tv_sec * 1000) + (now.tv_usec / 1000); } /* Prepare a mouse-event in *RESULT for placement in the input queue. From e6ca6543685fded0d1b3322dd06d0fa70d3e2a44 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 21:40:59 -0800 Subject: [PATCH 078/383] * alloc.c (mark_ttys): Move decl from here ... * lisp.h (mark_ttys): ... to here, so that it's checked against defn. --- src/ChangeLog | 3 +++ src/alloc.c | 1 - src/lisp.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a3695bda635..8bbc818ec7d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -110,6 +110,9 @@ * term.c (term_mouse_position): Rename local to avoid shadowing. + * alloc.c (mark_ttys): Move decl from here ... + * lisp.h (mark_ttys): ... to here, so that it's checked against defn. + 2011-03-06 Chong Yidong * xdisp.c (redisplay_window): Revert incorrect logic in 2011-03-06 diff --git a/src/alloc.c b/src/alloc.c index d7006ca6bfd..8632897606a 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -271,7 +271,6 @@ Lisp_Object Qpost_gc_hook; static void mark_buffer (Lisp_Object); static void mark_terminals (void); extern void mark_kboards (void); -extern void mark_ttys (void); extern void mark_backtrace (void); static void gc_sweep (void); static void mark_glyph_matrix (struct glyph_matrix *); diff --git a/src/lisp.h b/src/lisp.h index 719d72d28a4..1e8e01cf91f 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3378,6 +3378,7 @@ extern Lisp_Object directory_files_internal (Lisp_Object, Lisp_Object, /* Defined in term.c */ extern int *char_ins_del_vector; +extern void mark_ttys (void); extern void syms_of_term (void); extern void fatal (const char *msgid, ...) NO_RETURN; From b024a9466a0e238e053d0464f4a4f9b19d04648b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 21:46:35 -0800 Subject: [PATCH 079/383] * term.c, tparam.h (tgetflag, tgetnum, tgetstr): Move the const to the .h file --- src/ChangeLog | 1 - src/term.c | 12 ------------ src/tparam.h | 6 +++--- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8bbc818ec7d..89f4bbb3db9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -106,7 +106,6 @@ (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph): (turn_on_face, init_tty): Likewise. * termchar.h (struct tty_display_info): Likewise. - * term.c (tgetflag, tgetnum, tgetstr): Redefine to use const pointers. * term.c (term_mouse_position): Rename local to avoid shadowing. diff --git a/src/term.c b/src/term.c index 9531cce5f9f..e9e880a0c7f 100644 --- a/src/term.c +++ b/src/term.c @@ -1306,18 +1306,6 @@ static char **term_get_fkeys_address; static KBOARD *term_get_fkeys_kboard; static Lisp_Object term_get_fkeys_1 (void); -/* Rework termcap API to accept const pointer args. */ -static inline int my_tgetflag (const char *x) { return tgetflag ((char *) x); } -static inline int my_tgetnum (const char *x) { return tgetnum ((char *) x); } -static inline char *my_tgetstr (const char *x, char **a) -{ return tgetstr ((char *) x, a); } -#undef tgetflag -#undef tgetnum -#undef tgetstr -#define tgetflag my_tgetflag -#define tgetnum my_tgetnum -#define tgetstr my_tgetstr - /* Find the escape codes sent by the function keys for Vinput_decode_map. This function scans the termcap function key sequence entries, and adds entries to Vinput_decode_map for each function key it finds. */ diff --git a/src/tparam.h b/src/tparam.h index 11c9ae68aad..3cd3e6053cc 100644 --- a/src/tparam.h +++ b/src/tparam.h @@ -23,9 +23,9 @@ along with GNU Emacs. If not, see . */ void tputs (const char *, int, int (*) (int)); int tgetent (char *, const char *); -int tgetflag (char *id); -int tgetnum (char *id); -char *tgetstr (char *, char **); +int tgetflag (const char *); +int tgetnum (const char *); +char *tgetstr (const char *, char **); char *tgoto (const char *, int, int); char *tparam (const char *, char *, int, int, int, int, int); From 426994c30418e7410bac86d9cd43e6fb20d91922 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 22:07:27 -0800 Subject: [PATCH 080/383] * terminal.c (store_terminal_param): Now static. --- src/ChangeLog | 4 +++- src/terminal.c | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 89f4bbb3db9..f5d452a5dfb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,6 @@ -2011-03-08 Paul Eggert +2011-03-09 Paul Eggert + + * terminal.c (store_terminal_param): Now static. * xmenu.c (menu_highlight_callback): Now static. (set_frame_menubar): Remove unused local. diff --git a/src/terminal.c b/src/terminal.c index 309cc0095e8..c5185601fb6 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -109,7 +109,7 @@ void raw_cursor_to (struct frame *f, int row, int col) { if (FRAME_TERMINAL (f)->raw_cursor_to_hook) - (*FRAME_TERMINAL (f)->raw_cursor_to_hook) (f, row, col); + (*FRAME_TERMINAL (f)->raw_cursor_to_hook) (f, row, col); } /* Erase operations */ @@ -444,7 +444,7 @@ selected frame's terminal). */) /* Set the value of terminal parameter PARAMETER in terminal D to VALUE. Return the previous value. */ -Lisp_Object +static Lisp_Object store_terminal_param (struct terminal *t, Lisp_Object parameter, Lisp_Object value) { Lisp_Object old_alist_elt = Fassq (parameter, t->param_alist); @@ -569,4 +569,3 @@ or some time later. */); Fprovide (intern_c_string ("multi-tty"), Qnil); } - From 071048a3f588c7ae789983bf411a6ea948758abc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 22:17:32 -0800 Subject: [PATCH 081/383] * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/xfaces.c | 27 +++++++++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f5d452a5dfb..6d22732b5e0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-09 Paul Eggert + * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename + or move locals to avoid shadowing. + * terminal.c (store_terminal_param): Now static. * xmenu.c (menu_highlight_callback): Now static. diff --git a/src/xfaces.c b/src/xfaces.c index 4cc47c85050..d877d8525dd 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -847,7 +847,6 @@ clear_face_cache (int clear_fonts_p) { #ifdef HAVE_WINDOW_SYSTEM Lisp_Object tail, frame; - struct frame *f; if (clear_fonts_p || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT) @@ -875,7 +874,7 @@ clear_face_cache (int clear_fonts_p) /* Clear GCs of realized faces. */ FOR_EACH_FRAME (tail, frame) { - f = XFRAME (frame); + struct frame *f = XFRAME (frame); if (FRAME_WINDOW_P (f)) clear_face_gcs (FRAME_FACE_CACHE (f)); } @@ -1754,14 +1753,14 @@ the WIDTH times as wide as FACE on FRAME. */) /* This is of limited utility since it works with character widths. Keep it for compatibility. --gerd. */ int face_id = lookup_named_face (f, face, 0); - struct face *face = (face_id < 0 - ? NULL - : FACE_FROM_ID (f, face_id)); + struct face *width_face = (face_id < 0 + ? NULL + : FACE_FROM_ID (f, face_id)); - if (face && face->font) + if (width_face && width_face->font) { - size = face->font->pixel_size; - avgwidth = face->font->average_width; + size = width_face->font->pixel_size; + avgwidth = width_face->font->average_width; } else { @@ -3869,19 +3868,19 @@ return the font name used for CHARACTER. */) { struct frame *f = frame_or_selected_frame (frame, 1); int face_id = lookup_named_face (f, face, 1); - struct face *face = FACE_FROM_ID (f, face_id); + struct face *fface = FACE_FROM_ID (f, face_id); - if (! face) + if (! fface) return Qnil; #ifdef HAVE_WINDOW_SYSTEM if (FRAME_WINDOW_P (f) && !NILP (character)) { CHECK_CHARACTER (character); - face_id = FACE_FOR_CHAR (f, face, XINT (character), -1, Qnil); - face = FACE_FROM_ID (f, face_id); + face_id = FACE_FOR_CHAR (f, fface, XINT (character), -1, Qnil); + fface = FACE_FROM_ID (f, face_id); } - return (face->font - ? face->font->props[FONT_NAME_INDEX] + return (fface->font + ? fface->font->props[FONT_NAME_INDEX] : Qnil); #else /* !HAVE_WINDOW_SYSTEM */ return build_string (FRAME_MSDOS_P (f) From c2ed9c8b0cf694c20eea63f31b7c276efa6a1008 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 22:21:25 -0800 Subject: [PATCH 082/383] * term.c (encode_terminal_code): Mark vars for gcc -Wuninitialized. --- src/ChangeLog | 1 + src/term.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6d22732b5e0..c6f973af8c7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -89,6 +89,7 @@ * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. + * term.c (encode_terminal_code): Likewise. * term.c (encode_terminal_code): Now static. Remove unused local. diff --git a/src/term.c b/src/term.c index e9e880a0c7f..e78e2e68814 100644 --- a/src/term.c +++ b/src/term.c @@ -533,8 +533,8 @@ encode_terminal_code (struct glyph *src, int src_len, struct coding_system *codi { if (src->type == COMPOSITE_GLYPH) { - struct composition *cmp; - Lisp_Object gstring; + struct composition *cmp IF_LINT (= NULL); + Lisp_Object gstring IF_LINT (= Qnil); int i; nbytes = buf - encode_terminal_src; @@ -595,7 +595,7 @@ encode_terminal_code (struct glyph *src, int src_len, struct coding_system *codi else if (! CHAR_GLYPH_PADDING_P (*src)) { GLYPH g; - int c; + int c IF_LINT (= 0); Lisp_Object string; string = Qnil; From 6b463e581fc2f176fd2ab5b06cff963e94218163 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 22:22:39 -0800 Subject: [PATCH 083/383] * xfaces.c (tty_defined_color, merge_face_heights): Now static. --- src/ChangeLog | 1 + src/xfaces.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c6f973af8c7..1f8e0f6b8e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. + (tty_defined_color, merge_face_heights): Now static. * terminal.c (store_terminal_param): Now static. diff --git a/src/xfaces.c b/src/xfaces.c index d877d8525dd..d463175ed2c 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -1112,7 +1112,7 @@ tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color, XColor /* A version of defined_color for non-X frames. */ -int +static int tty_defined_color (struct frame *f, const char *color_name, XColor *color_def, int alloc) { @@ -2251,7 +2251,7 @@ set_lface_from_font (struct frame *f, Lisp_Object lface, Lisp_Object font_object `relative' heights; the returned value is always an absolute height unless both FROM and TO are relative. */ -Lisp_Object +static Lisp_Object merge_face_heights (Lisp_Object from, Lisp_Object to, Lisp_Object invalid) { Lisp_Object result = invalid; From 5967d05138d7405e4b60153f98c8beaf40c7d6da Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 22:23:48 -0800 Subject: [PATCH 084/383] * xfaces.c (free_realized_faces_for_fontset): Remove; not used. --- src/ChangeLog | 1 + src/xfaces.c | 39 --------------------------------------- 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1f8e0f6b8e3..fb266a71a0f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. (tty_defined_color, merge_face_heights): Now static. + (free_realized_faces_for_fontset): Remove; not used. * terminal.c (store_terminal_param): Now static. diff --git a/src/xfaces.c b/src/xfaces.c index d463175ed2c..b49675a7d8e 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -4312,45 +4312,6 @@ free_realized_faces (struct face_cache *c) } -/* Free all realized faces that are using FONTSET on frame F. */ - -void -free_realized_faces_for_fontset (struct frame *f, int fontset) -{ - struct face_cache *cache = FRAME_FACE_CACHE (f); - struct face *face; - int i; - - /* We must block input here because we can't process X events safely - while only some faces are freed, or when the frame's current - matrix still references freed faces. */ - BLOCK_INPUT; - - for (i = 0; i < cache->used; i++) - { - face = cache->faces_by_id[i]; - if (face - && face->fontset == fontset) - { - uncache_face (cache, face); - free_realized_face (f, face); - } - } - - /* Must do a thorough redisplay the next time. Mark current - matrices as invalid because they will reference faces freed - above. This function is also called when a frame is destroyed. - In this case, the root window of F is nil. */ - if (WINDOWP (f->root_window)) - { - clear_current_matrices (f); - ++windows_or_buffers_changed; - } - - UNBLOCK_INPUT; -} - - /* Free all realized faces on FRAME or on all frames if FRAME is nil. This is done after attributes of a named face have been changed, because we can't tell which realized faces depend on that face. */ From 1e9966ea025891f948200db6ab85a7e7e169e502 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 22:25:19 -0800 Subject: [PATCH 085/383] * xfaces.c (Fx_list_fonts): Mark variable that gcc -Wuninitialized does not deduce is never used uninitialized. --- src/ChangeLog | 2 ++ src/xfaces.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index fb266a71a0f..44782386684 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,8 @@ or move locals to avoid shadowing. (tty_defined_color, merge_face_heights): Now static. (free_realized_faces_for_fontset): Remove; not used. + (Fx_list_fonts): Mark variable that gcc -Wuninitialized + does not deduce is never used uninitialized. * terminal.c (store_terminal_param): Now static. diff --git a/src/xfaces.c b/src/xfaces.c index b49675a7d8e..ded871d1fdd 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -1720,7 +1720,7 @@ the WIDTH times as wide as FACE on FRAME. */) (Lisp_Object pattern, Lisp_Object face, Lisp_Object frame, Lisp_Object maximum, Lisp_Object width) { struct frame *f; - int size, avgwidth; + int size, avgwidth IF_LINT (= 0); check_x (); CHECK_STRING (pattern); From 73719eba5cbda861e9a7cc296537cd03506418c1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 22:29:34 -0800 Subject: [PATCH 086/383] * xfaces.c (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used. (LFACEP): Define only if XASSERTS, as it's not needed otherwise. --- src/ChangeLog | 2 ++ src/xfaces.c | 16 ++-------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 44782386684..244a17a61d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,6 +6,8 @@ (free_realized_faces_for_fontset): Remove; not used. (Fx_list_fonts): Mark variable that gcc -Wuninitialized does not deduce is never used uninitialized. + (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used. + (LFACEP): Define only if XASSERTS, as it's not needed otherwise. * terminal.c (store_terminal_param): Now static. diff --git a/src/xfaces.c b/src/xfaces.c index ded871d1fdd..50bcab3c6a9 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -297,16 +297,6 @@ along with GNU Emacs. If not, see . */ #define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR)) -/* Make a copy of string S on the stack using alloca. Value is a pointer - to the copy. */ - -#define STRDUPA(S) strcpy ((char *) alloca (strlen ((S)) + 1), (S)) - -/* Make a copy of the contents of Lisp string S on the stack using - alloca. Value is a pointer to the copy. */ - -#define LSTRDUPA(S) STRDUPA (SDATA ((S))) - /* Size of hash table of realized faces in face caches (should be a prime number). */ @@ -1837,6 +1827,7 @@ the WIDTH times as wide as FACE on FRAME. */) #define LFACE_INHERIT(LFACE) AREF ((LFACE), LFACE_INHERIT_INDEX) #define LFACE_FONTSET(LFACE) AREF ((LFACE), LFACE_FONTSET_INDEX) +#if XASSERTS /* Non-zero if LFACE is a Lisp face. A Lisp face is a vector of size LFACE_VECTOR_SIZE which has the symbol `face' in slot 0. */ @@ -1844,6 +1835,7 @@ the WIDTH times as wide as FACE on FRAME. */) (VECTORP (LFACE) \ && XVECTOR (LFACE)->size == LFACE_VECTOR_SIZE \ && EQ (AREF (LFACE, 0), Qface)) +#endif #if GLYPH_DEBUG @@ -5247,10 +5239,6 @@ be found. Value is ALIST. */) #ifdef HAVE_WINDOW_SYSTEM -/* Ignore the difference of font point size less than this value. */ - -#define FONT_POINT_SIZE_QUANTUM 5 - /* Return the fontset id of the base fontset name or alias name given by the fontset attribute of ATTRS. Value is -1 if the fontset attribute of ATTRS doesn't name a fontset. */ From 77f2391201c5014f9ec83250f753cad4de814c95 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 22:40:38 -0800 Subject: [PATCH 087/383] * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame): Remove unused functions. --- src/ChangeLog | 3 +++ src/xterm.c | 46 ---------------------------------------------- 2 files changed, 3 insertions(+), 46 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 244a17a61d5..fcb3cbc5dee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-09 Paul Eggert + * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame): + Remove unused functions. + * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. (tty_defined_color, merge_face_heights): Now static. diff --git a/src/xterm.c b/src/xterm.c index 909b6978f5a..49553e3f1e0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1791,27 +1791,6 @@ x_copy_color (struct frame *f, long unsigned int pixel) } -/* Allocate color PIXEL on display DPY. PIXEL must already be allocated. - It's necessary to do this instead of just using PIXEL directly to - get color reference counts right. */ - -unsigned long -x_copy_dpy_color (Display *dpy, Colormap cmap, long unsigned int pixel) -{ - XColor color; - - color.pixel = pixel; - BLOCK_INPUT; - XQueryColor (dpy, cmap, &color); - XAllocColor (dpy, cmap, &color); - UNBLOCK_INPUT; -#ifdef DEBUG_X_COLORS - register_color (pixel); -#endif - return color.pixel; -} - - /* Brightness beyond which a color won't have its highlight brightness boosted. @@ -8862,31 +8841,6 @@ x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) UNBLOCK_INPUT; } -/* focus shifting, raising and lowering. */ - -void -x_focus_on_frame (struct frame *f) -{ -#if 0 - /* I don't think that the ICCCM allows programs to do things like this - without the interaction of the window manager. Whatever you end up - doing with this code, do it to x_unfocus_frame too. */ - XSetInputFocus (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), - RevertToPointerRoot, CurrentTime); -#endif /* ! 0 */ -} - -void -x_unfocus_frame (struct frame *f) -{ -#if 0 - /* Look at the remarks in x_focus_on_frame. */ - if (FRAME_X_DISPLAY_INFO (f)->x_focus_frame == f) - XSetInputFocus (FRAME_X_DISPLAY (f), PointerRoot, - RevertToPointerRoot, CurrentTime); -#endif /* ! 0 */ -} - /* Raise frame F. */ void From e2b134730c43a1c4b9a20b0df859a84dbb26669c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 23:01:14 -0800 Subject: [PATCH 088/383] * xterm.h (x_mouse_leave): New decl. --- src/ChangeLog | 2 ++ src/xterm.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index fcb3cbc5dee..667a7ba2b15 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-09 Paul Eggert + * xterm.h (x_mouse_leave): New decl. + * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame): Remove unused functions. diff --git a/src/xterm.h b/src/xterm.h index 48d68557796..2cfaef018b8 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -979,6 +979,7 @@ extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *); extern void x_query_colors (struct frame *f, XColor *, int); extern void x_query_color (struct frame *f, XColor *); extern void x_clear_area (Display *, Window, int, int, int, int, int); +extern void x_mouse_leave (struct x_display_info *); extern void set_vertical_scroll_bar (struct window *); extern int x_dispatch_event (XEvent *, Display *); From cdf4ba58eb200f81447bedabab41eeb84549061b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 23:02:55 -0800 Subject: [PATCH 089/383] * xterm.c: (x_shift_glyphs_for_insert, XTflash, XTring_bell): (x_calc_absolute_position): Now static. --- src/ChangeLog | 2 ++ src/xterm.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 667a7ba2b15..dd88e961a51 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,8 @@ * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame): Remove unused functions. + (x_shift_glyphs_for_insert, XTflash, XTring_bell): + (x_calc_absolute_position): Now static. * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. diff --git a/src/xterm.c b/src/xterm.c index 49553e3f1e0..beb215b5680 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2886,7 +2886,7 @@ x_draw_glyph_string (struct glyph_string *s) /* Shift display to make room for inserted glyphs. */ -void +static void x_shift_glyphs_for_insert (struct frame *f, int x, int y, int width, int height, int shift_by) { XCopyArea (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), FRAME_X_WINDOW (f), @@ -2990,7 +2990,7 @@ timeval_subtract (struct timeval *result, struct timeval x, struct timeval y) return x.tv_sec < y.tv_sec; } -void +static void XTflash (struct frame *f) { BLOCK_INPUT; @@ -3165,7 +3165,7 @@ XTtoggle_invisible_pointer (FRAME_PTR f, int invisible) /* Make audible bell. */ -void +static void XTring_bell (struct frame *f) { if (FRAME_X_DISPLAY (f)) @@ -8098,7 +8098,7 @@ xim_close_dpy (struct x_display_info *dpyinfo) /* Calculate the absolute position in frame F from its current recorded position values and gravity. */ -void +static void x_calc_absolute_position (struct frame *f) { int flags = f->size_hint_flags; From 7411c6867f74428cf2441cb2b1bd5100185b9a03 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 23:05:07 -0800 Subject: [PATCH 090/383] * xterm.c (XTread_socket): Don't define label "out" unless it's used. --- src/ChangeLog | 1 + src/xterm.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index dd88e961a51..f0c1db2ab73 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,6 +6,7 @@ Remove unused functions. (x_shift_glyphs_for_insert, XTflash, XTring_bell): (x_calc_absolute_position): Now static. + (XTread_socket): Don't define label "out" unless it's used. * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. diff --git a/src/xterm.c b/src/xterm.c index beb215b5680..4c7fc1b9b1e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7042,6 +7042,8 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold goto out; } + out:; + #else /* USE_GTK */ /* For GTK we must use the GTK event loop. But XEvents gets passed @@ -7068,8 +7070,6 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold } #endif /* USE_GTK */ - out:; - /* On some systems, an X bug causes Emacs to get no more events when the window is destroyed. Detect that. (1994.) */ if (! event_found) From 2b07bcffb0e2b6cef517406cbc979ac14e46cd8e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 23:07:42 -0800 Subject: [PATCH 091/383] * xterm.c: Don't declare local "event" unless it's used. --- src/ChangeLog | 1 + src/xterm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f0c1db2ab73..7f9e68e71e5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,7 @@ (x_shift_glyphs_for_insert, XTflash, XTring_bell): (x_calc_absolute_position): Now static. (XTread_socket): Don't define label "out" unless it's used. + Don't declare local "event" unless it's used. * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. diff --git a/src/xterm.c b/src/xterm.c index 4c7fc1b9b1e..f253ed0aa3f 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6991,7 +6991,6 @@ static int XTread_socket (struct terminal *terminal, int expected, struct input_event *hold_quit) { int count = 0; - XEvent event; int event_found = 0; if (interrupt_input_blocked) @@ -7025,6 +7024,7 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold while (XPending (terminal->display_info.x->display)) { int finish; + XEvent event; XNextEvent (terminal->display_info.x->display, &event); From ed7bf3a5ee1e31dafbb2d285b39c8fe07fc06f7c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 23:11:42 -0800 Subject: [PATCH 092/383] * xterm.c (x_iconify_frame, x_free_frame_resources): Don't declare locals unless they are used. --- src/ChangeLog | 2 ++ src/xterm.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7f9e68e71e5..0a14f36dbe7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,6 +8,8 @@ (x_calc_absolute_position): Now static. (XTread_socket): Don't define label "out" unless it's used. Don't declare local "event" unless it's used. + (x_iconify_frame, x_free_frame_resources): Don't declare locals + unless they are used. * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. diff --git a/src/xterm.c b/src/xterm.c index f253ed0aa3f..9220d84815c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9166,7 +9166,9 @@ x_make_frame_invisible (struct frame *f) void x_iconify_frame (struct frame *f) { +#ifdef USE_X_TOOLKIT int result; +#endif Lisp_Object type; /* Don't keep the highlight on an invisible frame. */ @@ -9293,9 +9295,11 @@ void x_free_frame_resources (struct frame *f) { struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; +#ifdef USE_X_TOOLKIT Lisp_Object bar; struct scroll_bar *b; - Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; +#endif BLOCK_INPUT; From 38d0b34afe4dedd8c80a25af2cd84d488733b6aa Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 8 Mar 2011 23:17:17 -0800 Subject: [PATCH 093/383] * xterm.c (XEMBED_VERSION, xembed_set_info): Don't define unless needed. (x_fatal_error_signal): Remove; not used. --- src/ChangeLog | 2 ++ src/xterm.c | 22 +++++++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0a14f36dbe7..cdabea5fcd2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -10,6 +10,8 @@ Don't declare local "event" unless it's used. (x_iconify_frame, x_free_frame_resources): Don't declare locals unless they are used. + (XEMBED_VERSION, xembed_set_info): Don't define unless needed. + (x_fatal_error_signal): Remove; not used. * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. diff --git a/src/xterm.c b/src/xterm.c index 9220d84815c..e64ab270929 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -279,10 +279,6 @@ Lisp_Object Qx_gtk_map_stock; /* Some functions take this as char *, not const char *. */ static char emacs_class[] = EMACS_CLASS; -/* XEmbed implementation. */ - -#define XEMBED_VERSION 0 - enum xembed_info { XEMBED_MAPPED = 1 << 0 @@ -7647,17 +7643,6 @@ x_connection_signal (int signalnum) /* If we don't have an argument, */ static char *error_msg; -/* Function installed as fatal_error_signal_hook in - x_connection_closed. Print the X error message, and exit normally, - instead of dumping core when XtCloseDisplay fails. */ - -static void -x_fatal_error_signal (void) -{ - fprintf (stderr, "%s\n", error_msg); - exit (70); -} - /* Handle the loss of connection to display DPY. ERROR_MESSAGE is the text of an error message that lead to the connection loss. */ @@ -8901,6 +8886,12 @@ XTframe_raise_lower (FRAME_PTR f, int raise_flag) /* XEmbed implementation. */ +#if defined USE_X_TOOLKIT || ! defined USE_GTK + +/* XEmbed implementation. */ + +#define XEMBED_VERSION 0 + static void xembed_set_info (struct frame *f, enum xembed_info flags) { @@ -8914,6 +8905,7 @@ xembed_set_info (struct frame *f, enum xembed_info flags) dpyinfo->Xatom_XEMBED_INFO, dpyinfo->Xatom_XEMBED_INFO, 32, PropModeReplace, (unsigned char *) data, 2); } +#endif /* defined USE_X_TOOLKIT || ! defined USE_GTK */ static void xembed_send_message (struct frame *f, Time time, enum xembed_message message, long int detail, long int data1, long int data2) From 13522cb4cd1e954ae1523c309c778137a2ce98bd Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 9 Mar 2011 00:43:27 -0800 Subject: [PATCH 094/383] gdb-mi addition for bug#7889. * lisp/progmodes/gdb-mi.el (gdb): Improve 2010-12-08 change. Check for GDBHISTFILE, HISTSIZE, etc. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/gdb-mi.el | 43 ++++++++++++++++++++++++++-------------- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7963e3432cb..253d47364f8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-09 Glenn Morris + + * progmodes/gdb-mi.el (gdb): Improve 2010-12-08 change. + Check for GDBHISTFILE, HISTSIZE, etc. (Bug#7889) + 2011-03-08 Chong Yidong * emacs-lisp/package.el (package-refresh-contents) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 25d1410621a..ac76caf8d61 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -648,21 +648,34 @@ detailed description of this mode. (set (make-local-variable 'gud-minor-mode) 'gdbmi) (setq comint-input-sender 'gdb-send) (when (ring-empty-p comint-input-ring) ; cf shell-mode - (let (hfile) - (when (catch 'done - (dolist (file '(".gdbinit" "~/.gdbinit")) - (if (file-readable-p (setq file (expand-file-name file))) - (with-temp-buffer - (insert-file-contents file) - (and (re-search-forward - "^ *set history filename *\\(.*\\)" nil t) - (file-readable-p - (setq hfile (expand-file-name - (match-string 1) - (file-name-directory file)))) - (throw 'done t)))))) - (set (make-local-variable 'comint-input-ring-file-name) hfile) - (comint-read-input-ring t)))) + (let ((hfile (expand-file-name (or (getenv "GBDHISTFILE") + (if (eq system-type 'ms-dos) + "_gdb_history" + ".gdb_history")))) + ;; gdb defaults to 256, but we'll default to comint-input-ring-size. + (hsize (getenv "HISTSIZE"))) + (dolist (file (append '("~/.gdbinit") + (unless (string-equal (expand-file-name ".") + (expand-file-name "~")) + '(".gdbinit")))) + (if (file-readable-p (setq file (expand-file-name file))) + (with-temp-buffer + (insert-file-contents file) + ;; TODO? check for "set history save\\( *on\\)?" and do + ;; not use history otherwise? + (while (re-search-forward + "^ *set history \\(filename\\|size\\) *\\(.*\\)" nil t) + (cond ((string-equal (match-string 1) "filename") + (setq hfile (expand-file-name + (match-string 2) + (file-name-directory file)))) + ((string-equal (match-string 1) "size") + (setq hsize (match-string 2)))))))) + (if (integerp hsize) + (set (make-local-variable 'comint-input-ring-size) hsize)) + (if (stringp hfile) + (set (make-local-variable 'comint-input-ring-file-name) hfile)) + (comint-read-input-ring t))) (gud-def gud-tbreak "tbreak %f:%l" "\C-t" "Set temporary breakpoint at current line.") (gud-def gud-jump From 1289e5d3f56a5c5e2fe5500adf8671fd45b6a27f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 9 Mar 2011 00:55:08 -0800 Subject: [PATCH 095/383] Fix previous gdb-mi change. --- lisp/progmodes/gdb-mi.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index ac76caf8d61..1a7f1841fb3 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -671,8 +671,10 @@ detailed description of this mode. (file-name-directory file)))) ((string-equal (match-string 1) "size") (setq hsize (match-string 2)))))))) - (if (integerp hsize) - (set (make-local-variable 'comint-input-ring-size) hsize)) + (and (stringp hsize) + (integerp (string-to-number hsize)) + (> hsize 0) + (set (make-local-variable 'comint-input-ring-size) hsize)) (if (stringp hfile) (set (make-local-variable 'comint-input-ring-file-name) hfile)) (comint-read-input-ring t))) From 791cd3860e38e633cf301aced257a1eac89f2b1f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 9 Mar 2011 00:57:40 -0800 Subject: [PATCH 096/383] Fix previous gdb-mi fix... --- lisp/progmodes/gdb-mi.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 1a7f1841fb3..ab315f9eefd 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -672,7 +672,7 @@ detailed description of this mode. ((string-equal (match-string 1) "size") (setq hsize (match-string 2)))))))) (and (stringp hsize) - (integerp (string-to-number hsize)) + (integerp (setq hsize (string-to-number hsize))) (> hsize 0) (set (make-local-variable 'comint-input-ring-size) hsize)) (if (stringp hfile) From 0be6f4f1873153cdbdb84c36f460975a6c95829a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 9 Mar 2011 01:01:14 -0800 Subject: [PATCH 097/383] * shell.el (shell-mode): Set comint-input-ring-size from HISTSIZE. (Bug#7889) --- lisp/ChangeLog | 3 +++ lisp/shell.el | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 253d47364f8..8b3b5b6801b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-09 Glenn Morris + * shell.el (shell-mode): + Set comint-input-ring-size from HISTSIZE. (Bug#7889) + * progmodes/gdb-mi.el (gdb): Improve 2010-12-08 change. Check for GDBHISTFILE, HISTSIZE, etc. (Bug#7889) diff --git a/lisp/shell.el b/lisp/shell.el index 2f11cc6314c..bceea990baf 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -459,7 +459,12 @@ buffer." ;; shell-dependent assignments. (when (ring-empty-p comint-input-ring) (let ((shell (file-name-nondirectory (car - (process-command (get-buffer-process (current-buffer))))))) + (process-command (get-buffer-process (current-buffer)))))) + (hsize (getenv "HISTSIZE"))) + (and (stringp hsize) + (integerp (setq hsize (string-to-number hsize))) + (> hsize 0) + (set (make-local-variable 'comint-input-ring-size) hsize)) (setq comint-input-ring-file-name (or (getenv "HISTFILE") (cond ((string-equal shell "bash") "~/.bash_history") From a6067996d8aa14819a0cdfdb8596b3252f9f2caa Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 01:12:38 -0800 Subject: [PATCH 098/383] * xterm.c: (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position): (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor): (x_error_catcher, x_connection_closed, x_error_handler): (x_error_quitter, xembed_send_message, x_iconify_frame): (my_log_handler): Rename locals to avoid shadowing. --- src/ChangeLog | 5 +++ src/xterm.c | 99 +++++++++++++++++++++++++++------------------------ 2 files changed, 58 insertions(+), 46 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index cdabea5fcd2..2dc9d34f290 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -12,6 +12,11 @@ unless they are used. (XEMBED_VERSION, xembed_set_info): Don't define unless needed. (x_fatal_error_signal): Remove; not used. + (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position): + (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor): + (x_error_catcher, x_connection_closed, x_error_handler): + (x_error_quitter, xembed_send_message, x_iconify_frame): + (my_log_handler): Rename locals to avoid shadowing. * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. diff --git a/src/xterm.c b/src/xterm.c index e64ab270929..c542f0d9f29 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -2235,12 +2235,12 @@ x_draw_image_foreground (struct glyph_string *s) nothing here for mouse-face. */ if (s->hl == DRAW_CURSOR) { - int r = s->img->relief; - if (r < 0) r = -r; + int relief = s->img->relief; + if (relief < 0) relief = -relief; XDrawRectangle (s->display, s->window, s->gc, - x - r, y - r, - s->slice.width + r*2 - 1, - s->slice.height + r*2 - 1); + x - relief, y - relief, + s->slice.width + relief*2 - 1, + s->slice.height + relief*2 - 1); } } } @@ -3775,7 +3775,7 @@ redo_mouse_highlight (void) mouse is on, *BAR_WINDOW to nil, and *X and *Y to the character cell the mouse is over. - Set *TIME to the server time-stamp for the time at which the mouse + Set *TIMESTAMP to the server time-stamp for the time at which the mouse was at this position. Don't store anything if we don't have a valid set of values to report. @@ -3784,14 +3784,16 @@ redo_mouse_highlight (void) movement. */ static void -XTmouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, long unsigned int *time) +XTmouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, + enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, + long unsigned int *timestamp) { FRAME_PTR f1; BLOCK_INPUT; if (! NILP (last_mouse_scroll_bar) && insist == 0) - x_scroll_bar_report_motion (fp, bar_window, part, x, y, time); + x_scroll_bar_report_motion (fp, bar_window, part, x, y, timestamp); else { Window root; @@ -3964,7 +3966,7 @@ XTmouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, enum scrol *fp = f1; XSETINT (*x, win_x); XSETINT (*y, win_y); - *time = last_mouse_movement_time; + *timestamp = last_mouse_movement_time; } } } @@ -5516,7 +5518,9 @@ x_scroll_bar_note_movement (struct scroll_bar *bar, XEvent *event) on the scroll bar. */ static void -x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, long unsigned int *time) +x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, + enum scroll_bar_part *part, Lisp_Object *x, + Lisp_Object *y, long unsigned int *timestamp) { struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); Window w = bar->x_window; @@ -5576,7 +5580,7 @@ x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, enum scroll_ last_mouse_scroll_bar = Qnil; } - *time = last_mouse_movement_time; + *timestamp = last_mouse_movement_time; UNBLOCK_INPUT; } @@ -5750,7 +5754,8 @@ static void xembed_send_message (struct frame *f, Time time, We return the number of characters stored into the buffer. */ static int -handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, struct input_event *hold_quit) +handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, + int *finish, struct input_event *hold_quit) { union { struct input_event ie; @@ -5761,7 +5766,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, int nbytes = 0; struct frame *f = NULL; struct coding_system coding; - XEvent event = *eventp; + XEvent event = *eventptr; Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; *finish = X_EVENT_NORMAL; @@ -6461,7 +6466,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, { /* Raw bytes, not keysym. */ register int i; - register int c; int nchars, len; for (i = 0, nchars = 0; i < nbytes; i++) @@ -6501,14 +6505,15 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, character events. */ for (i = 0; i < nbytes; i += len) { + int ch; if (nchars == nbytes) - c = copy_bufptr[i], len = 1; + ch = copy_bufptr[i], len = 1; else - c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, len); - inev.ie.kind = (SINGLE_BYTE_CHAR_P (c) + ch = STRING_CHAR_AND_LENGTH (copy_bufptr + i, len); + inev.ie.kind = (SINGLE_BYTE_CHAR_P (ch) ? ASCII_KEYSTROKE_EVENT : MULTIBYTE_CHAR_KEYSTROKE_EVENT); - inev.ie.code = c; + inev.ie.code = ch; kbd_buffer_store_event_hold (&inev.ie, hold_quit); } @@ -6947,7 +6952,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventp, int *finish, count++; } - *eventp = event; + *eventptr = event; return count; } @@ -7201,9 +7206,9 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text the bar might not be in the window. */ if (cursor_glyph->type == IMAGE_GLYPH) { - struct glyph_row *row; - row = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos); - draw_phys_cursor_glyph (w, row, DRAW_CURSOR); + struct glyph_row *r; + r = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos); + draw_phys_cursor_glyph (w, r, DRAW_CURSOR); } else { @@ -7492,9 +7497,9 @@ static struct x_error_message_stack *x_error_message; x_catch_errors is in effect. */ static void -x_error_catcher (Display *display, XErrorEvent *error) +x_error_catcher (Display *display, XErrorEvent *event) { - XGetErrorText (display, error->error_code, + XGetErrorText (display, event->error_code, x_error_message->string, X_ERROR_MESSAGE_SIZE); } @@ -7651,7 +7656,7 @@ x_connection_closed (Display *dpy, const char *error_message) { struct x_display_info *dpyinfo = x_display_info_for_display (dpy); Lisp_Object frame, tail; - int index = SPECPDL_INDEX (); + int idx = SPECPDL_INDEX (); error_msg = (char *) alloca (strlen (error_message) + 1); strcpy (error_msg, error_message); @@ -7746,7 +7751,7 @@ For details, see etc/PROBLEMS.\n", sigunblock (sigmask (SIGALRM)); TOTALLY_UNBLOCK_INPUT; - unbind_to (index, Qnil); + unbind_to (idx, Qnil); clear_waiting_for_input (); /* Here, we absolutely have to use a non-local exit (e.g. signal, throw, longjmp), because returning from this function would get us back into @@ -7762,12 +7767,12 @@ static void x_error_quitter (Display *, XErrorEvent *); It calls x_error_quitter or x_error_catcher. */ static int -x_error_handler (Display *display, XErrorEvent *error) +x_error_handler (Display *display, XErrorEvent *event) { if (x_error_message) - x_error_catcher (display, error); + x_error_catcher (display, event); else - x_error_quitter (display, error); + x_error_quitter (display, event); return 0; } @@ -7781,22 +7786,22 @@ x_error_handler (Display *display, XErrorEvent *error) after x_error_handler prevents inlining into the former. */ static void NO_INLINE -x_error_quitter (Display *display, XErrorEvent *error) +x_error_quitter (Display *display, XErrorEvent *event) { char buf[256], buf1[356]; /* Ignore BadName errors. They can happen because of fonts or colors that are not defined. */ - if (error->error_code == BadName) + if (event->error_code == BadName) return; /* Note that there is no real way portable across R3/R4 to get the original error handler. */ - XGetErrorText (display, error->error_code, buf, sizeof (buf)); + XGetErrorText (display, event->error_code, buf, sizeof (buf)); sprintf (buf1, "X protocol error: %s on protocol request %d", - buf, error->request_code); + buf, event->request_code); x_connection_closed (display, buf1); } @@ -8908,7 +8913,8 @@ xembed_set_info (struct frame *f, enum xembed_info flags) #endif /* defined USE_X_TOOLKIT || ! defined USE_GTK */ static void -xembed_send_message (struct frame *f, Time time, enum xembed_message message, long int detail, long int data1, long int data2) +xembed_send_message (struct frame *f, Time t, enum xembed_message msg, + long int detail, long int data1, long int data2) { XEvent event; @@ -8916,8 +8922,8 @@ xembed_send_message (struct frame *f, Time time, enum xembed_message message, lo event.xclient.window = FRAME_X_OUTPUT (f)->parent_desc; event.xclient.message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_XEMBED; event.xclient.format = 32; - event.xclient.data.l[0] = time; - event.xclient.data.l[1] = message; + event.xclient.data.l[0] = t; + event.xclient.data.l[1] = msg; event.xclient.data.l[2] = detail; event.xclient.data.l[3] = data1; event.xclient.data.l[4] = data2; @@ -9243,19 +9249,19 @@ x_iconify_frame (struct frame *f) /* X11R4: send a ClientMessage to the window manager using the WM_CHANGE_STATE type. */ { - XEvent message; + XEvent msg; - message.xclient.window = FRAME_X_WINDOW (f); - message.xclient.type = ClientMessage; - message.xclient.message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_change_state; - message.xclient.format = 32; - message.xclient.data.l[0] = IconicState; + msg.xclient.window = FRAME_X_WINDOW (f); + msg.xclient.type = ClientMessage; + msg.xclient.message_type = FRAME_X_DISPLAY_INFO (f)->Xatom_wm_change_state; + msg.xclient.format = 32; + msg.xclient.data.l[0] = IconicState; if (! XSendEvent (FRAME_X_DISPLAY (f), DefaultRootWindow (FRAME_X_DISPLAY (f)), False, SubstructureRedirectMask | SubstructureNotifyMask, - &message)) + &msg)) { UNBLOCK_INPUT_RESIGNAL; error ("Can't notify window manager of iconification"); @@ -9747,10 +9753,11 @@ x_display_ok (const char *display) #ifdef USE_GTK static void -my_log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) +my_log_handler (const gchar *log_domain, GLogLevelFlags log_level, + const gchar *msg, gpointer user_data) { - if (!strstr (message, "g_set_prgname")) - fprintf (stderr, "%s-WARNING **: %s\n", log_domain, message); + if (!strstr (msg, "g_set_prgname")) + fprintf (stderr, "%s-WARNING **: %s\n", log_domain, msg); } #endif From c47971d7a31d28dc49a39cccc2523d1e3ed08b10 Mon Sep 17 00:00:00 2001 From: Deniz Dogan Date: Wed, 9 Mar 2011 11:45:19 +0100 Subject: [PATCH 099/383] * lisp/net/rcirc.el (rcirc-handler-001): Remove useless with-rcirc-process-buffer. (rcirc-check-auth-status): Swap arguments to string-match. --- lisp/ChangeLog | 6 ++++++ lisp/net/rcirc.el | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8b3b5b6801b..251547b617d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-09 Deniz Dogan + + * net/rcirc.el (rcirc-handler-001): Remove useless + with-rcirc-process-buffer. + (rcirc-check-auth-status): Swap arguments to string-match. + 2011-03-09 Glenn Morris * shell.el (shell-mode): diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 41e09540631..71aa0dd22bc 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -2449,8 +2449,7 @@ keywords when no KEYWORD is given." (if rcirc-auto-authenticate-flag (if rcirc-authenticate-before-join (progn - (with-rcirc-process-buffer process - (add-hook 'rcirc-authenticated-hook 'rcirc-join-channels-post-auth t t)) + (add-hook 'rcirc-authenticated-hook 'rcirc-join-channels-post-auth t t) (rcirc-authenticate)) (rcirc-authenticate) (rcirc-join-channels process rcirc-startup-channels)) @@ -2515,7 +2514,7 @@ the only argument." (and ;; quakenet (string= sender "Q") (string= target rcirc-nick) - (string-match message "\\`You are now logged in as .+\\.\\'"))) + (string-match "\\`You are now logged in as .+\\.\\'" message))) (setq rcirc-user-authenticated t) (run-hook-with-args 'rcirc-authenticated-hook process) (remove-hook 'rcirc-authenticated-hook 'rcirc-join-channels-post-auth t)))))) From ee545c35d2e83306d50ec78a8d9173ab9011bce5 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 9 Mar 2011 12:04:27 +0100 Subject: [PATCH 100/383] * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do not use `tramp-file-name-port', because this returns also `tramp-default-port'. --- lisp/ChangeLog | 6 ++++++ lisp/net/tramp-sh.el | 18 +++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 251547b617d..df4834a27c6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-09 Michael Albinus + + * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do + not use `tramp-file-name-port', because this returns also + `tramp-default-port'. + 2011-03-09 Deniz Dogan * net/rcirc.el (rcirc-handler-001): Remove useless diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 63a4c19eccf..ec75ea78fe1 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2251,11 +2251,15 @@ The method used must be an out-of-band method." 'identity) (if t2 (tramp-make-copy-program-file-name v) newname))) - ;; Check for port number. Until now, there's no need for handling - ;; like method, user, host. - (setq host (tramp-file-name-real-host v) - port (tramp-file-name-port v) - port (or (and port (number-to-string port)) "")) + ;; Check for host and port number. We cannot use + ;; `tramp-file-name-port', because this returns also + ;; `tramp-default-port', which might clash with settings in + ;; "~/.ssh/config". + (setq host (tramp-file-name-host v) + port "") + (when (string-match tramp-host-with-port-regexp host) + (setq host (string-to-number (match-string 1 host)) + port (string-to-number (match-string 2 host)))) ;; Compose copy command. (setq spec (format-spec-make @@ -2270,7 +2274,7 @@ The method used must be an out-of-band method." copy-args (delete ;; " " has either been a replacement of "%k" (when - ;; keep-date argument is non-nil), or a replacemtent + ;; keep-date argument is non-nil), or a replacement ;; for the whole keep-date sublist. " " (dolist @@ -2281,7 +2285,7 @@ The method used must be an out-of-band method." (append copy-args (let ((y (mapcar (lambda (z) (format-spec z spec)) x))) - (if (zerop (length (car y))) '(" ") y)))))) + (if (member "" y) '(" ") y)))))) copy-env (delq nil From 733afdf4d9df952a2d06c40b067de3a62bceb26b Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Wed, 9 Mar 2011 13:39:35 +0000 Subject: [PATCH 101/383] Merge changes made in Gnus trunk. auth-source.el (auth-source-read-char-choice): New function to read a character choice using `dropdown-list', `read-char-choice', or `read-char'. It appends "[a/b/c] " to the prompt if the choices were '(?a ?b ?c). The `dropdown-list' support is disabled for now. Use `eval-when-compile' to load `dropdown-list'. (auth-source-netrc-saver): Use it. nnimap.el (nnimap-credentials): Keep the :save-function as the third parameter in the credentials. (nnimap-open-connection-1): Use it after a successful login. (nnimap-credentials): Add IMAP-specific user and password prompt. auth-source.el (auth-source-search): Add :require parameter, taking a list. Document it and the :save-function return token. Pass :require down. Change the CREATED message from a warning to a debug statement. (auth-source-search-backends): Pass :require down. (auth-source-netrc-search): Pass :require down. (auth-source-netrc-parse): Use :require, if it's given, as a filter. Change save prompt to indicate all modifications saved here are deletions. (auth-source-netrc-create): Take user login name as default in user prompt. Move all the save functionality to a lexically bound function under the :save-function token in the returned list. Set up clearer default prompts for user, host, port, and secret. (auth-source-netrc-saver): New function, intended to be wrapped for :save-function. --- doc/misc/ChangeLog | 5 + doc/misc/auth.texi | 64 +++++++++- lisp/gnus/ChangeLog | 31 +++++ lisp/gnus/auth-source.el | 250 +++++++++++++++++++++++++-------------- lisp/gnus/nnimap.el | 22 +++- 5 files changed, 273 insertions(+), 99 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 75674c7fd17..96a2576355a 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2011-03-08 Teodor Zlatanov + + * auth.texi (Help for developers): Show example of using + `auth-source-search' with prompts and :save-function. + 2011-03-07 Antoine Levitt * message.texi (Message Buffers): Update default value of diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index 23ac23dce5b..e16d7b49b63 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi @@ -131,11 +131,11 @@ library encourages this confusion by accepting both, as you'll see later. If you have problems with the search, set @code{auth-source-debug} to -@code{t} and see what host, port, and user the library is checking in -the @code{*Messages*} buffer. Ditto for any other problems, your -first step is always to see what's being checked. The second step, of -course, is to write a blog entry about it and wait for the answer in -the comments. +@code{'trivia} and see what host, port, and user the library is +checking in the @code{*Messages*} buffer. Ditto for any other +problems, your first step is always to see what's being checked. The +second step, of course, is to write a blog entry about it and wait for +the answer in the comments. You can customize the variable @code{auth-sources}. The following may be needed if you are using an older version of Emacs or if the @@ -232,6 +232,14 @@ TODO: how does it work generally, how does secrets.el work, some examples. @node Help for developers @chapter Help for developers +The auth-source library lets you control logging output easily. + +@defvar auth-source-debug +Set this variable to 'trivia to see lots of output in *Messages*, or +set it to a function that behaves like @code{message} to do your own +logging. +@end defvar + The auth-source library only has a few functions for external use. @defun auth-source-search SPEC @@ -240,6 +248,52 @@ TODO: how to include docstring? @end defun +Let's take a look at an example of using @code{auth-source-search} +from Gnus' @code{nnimap.el}. + +@example +(defun nnimap-credentials (address ports) + (let* ((auth-source-creation-prompts + '((user . "IMAP user at %h: ") + (secret . "IMAP password for %u@@%h: "))) + (found (nth 0 (auth-source-search :max 1 + :host address + :port ports + :require '(:user :secret) + :create t)))) + (if found + (list (plist-get found :user) + (let ((secret (plist-get found :secret))) + (if (functionp secret) + (funcall secret) + secret)) + (plist-get found :save-function)) + nil))) +@end example + +This call requires the user and password (secret) to be in the +results. It also requests that an entry be created if it doesn't +exist already. While the created entry is being assembled, the shown +prompts will be used to interact with the user. The caller can also +pass data in @code{auth-source-creation-defaults} to supply defaults +for any of the prompts. + +Note that the password needs to be evaluated if it's a function. It's +wrapped in a function to provide some security. + +Later, after a successful login, @code{nnimal.el} calls the +@code{:save-function} like so: + +@example +(when (functionp (nth 2 credentials)) + (funcall (nth 2 credentials))) +@end example + +Which will work whether the @code{:save-function} was provided or not. +@code{:save-function} will be provided only when a new entry was +created, so this effectively says ``after a successful login, save the +authentication information we just used, if it was newly created.'' + @defun auth-source-delete SPEC TODO: how to include docstring? diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index b30cfdcfcd3..aa1f013dd35 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,34 @@ +2011-03-09 Teodor Zlatanov + + * auth-source.el (auth-source-read-char-choice): New function to read a + character choice using `dropdown-list', `read-char-choice', or + `read-char'. It appends "[a/b/c] " to the prompt if the choices were + '(?a ?b ?c). The `dropdown-list' support is disabled for now. Use + `eval-when-compile' to load `dropdown-list'. + (auth-source-netrc-saver): Use it. + +2011-03-08 Teodor Zlatanov + + * nnimap.el (nnimap-credentials): Keep the :save-function as the third + parameter in the credentials. + (nnimap-open-connection-1): Use it after a successful login. + (nnimap-credentials): Add IMAP-specific user and password prompt. + + * auth-source.el (auth-source-search): Add :require parameter, taking a + list. Document it and the :save-function return token. Pass :require + down. Change the CREATED message from a warning to a debug statement. + (auth-source-search-backends): Pass :require down. + (auth-source-netrc-search): Pass :require down. + (auth-source-netrc-parse): Use :require, if it's given, as a filter. + Change save prompt to indicate all modifications saved here are + deletions. + (auth-source-netrc-create): Take user login name as default in user + prompt. Move all the save functionality to a lexically bound function + under the :save-function token in the returned list. Set up clearer + default prompts for user, host, port, and secret. + (auth-source-netrc-saver): New function, intended to be wrapped for + :save-function. + 2011-03-07 Lars Magne Ingebrigtsen * shr.el (shr-table-horizontal-line): Change the defaults for the table diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 500de10b71c..108871974a0 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -44,7 +44,18 @@ (require 'gnus-util) (require 'assoc) (eval-when-compile (require 'cl)) -(require 'eieio) +(eval-when-compile (require 'dropdown-list nil t)) +(eval-and-compile + (or (ignore-errors (require 'eieio)) + ;; gnus-fallback-lib/ from gnus/lisp/gnus-fallback-lib + (ignore-errors + (let ((load-path (cons (expand-file-name + "gnus-fallback-lib/eieio" + (file-name-directory (locate-library "gnus"))) + load-path))) + (require 'eieio))) + (error + "eieio not found in `load-path' or gnus-fallback-lib/ directory."))) (autoload 'secrets-create-item "secrets") (autoload 'secrets-delete-item "secrets") @@ -286,6 +297,34 @@ If the value is not a list, symmetric encryption will be used." msg)) +;;; (auth-source-read-char-choice "enter choice? " '(?a ?b ?q)) +(defun auth-source-read-char-choice (prompt choices) + "Read one of CHOICES by `read-char-choice', or `read-char'. +`dropdown-list' support is disabled because it doesn't work reliably. +Only one of CHOICES will be returned. The PROMPT is augmented +with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)." + (when choices + (let* ((prompt-choices + (apply 'concat (loop for c in choices + collect (format "%c/" c)))) + (prompt-choices (concat "[" (substring prompt-choices 0 -1) "] ")) + (full-prompt (concat prompt prompt-choices)) + k) + + (while (not (memq k choices)) + (setq k (cond + ((and nil (featurep 'dropdown-list)) + (let* ((blank (fill (copy-sequence prompt) ?.)) + (dlc (cons (format "%s %c" prompt (car choices)) + (loop for c in (cdr choices) + collect (format "%s %c" blank c))))) + (nth (dropdown-list dlc) choices))) + ((fboundp 'read-char-choice) + (read-char-choice full-prompt choices)) + (t (message "%s" full-prompt) + (setq k (read-char)))))) + k))) + ;; (auth-source-pick nil :host "any" :port 'imap :user "joe") ;; (auth-source-pick t :host "any" :port 'imap :user "joe") ;; (setq auth-sources '((:source (:secrets default) :host t :port t :user "joe") @@ -393,7 +432,7 @@ parameters." (defun* auth-source-search (&rest spec &key type max host user port secret - create delete + require create delete &allow-other-keys) "Search or modify authentication backends according to SPEC. @@ -487,6 +526,11 @@ should `catch' the backend-specific error as usual. Some backends (netrc, at least) will prompt the user rather than throw an error. +:require (A B C) means that only results that contain those +tokens will be returned. Thus for instance requiring :secret +will ensure that any results will actually have a :secret +property. + :delete t means to delete any found entries. nil by default. Use `auth-source-delete' in ELisp code instead of calling `auth-source-search' directly with this parameter. @@ -516,11 +560,17 @@ is a plist with keys :backend :host :port :user, plus any other keys provided by the backend (notably :secret). But note the exception for :max 0, which see above. +The token can hold a :save-function key. If you call that, the +user will be prompted to save the data to the backend. You can't +request that this should happen right after creation, because +`auth-source-search' has no way of knowing if the token is +actually useful. So the caller must arrange to call this function. + The token's :secret key can hold a function. In that case you must call it to obtain the actual value." (let* ((backends (mapcar 'auth-source-backend-parse auth-sources)) (max (or max 1)) - (ignored-keys '(:create :delete :max)) + (ignored-keys '(:require :create :delete :max)) (keys (loop for i below (length spec) by 2 unless (memq (nth i spec) ignored-keys) collect (nth i spec))) @@ -539,6 +589,10 @@ must call it to obtain the actual value." (or (eq t create) (listp create)) t "Invalid auth-source :create parameter (must be t or a list): %s %s") + (assert + (listp require) t + "Invalid auth-source :require parameter (must be a list): %s") + (setq filtered-backends (copy-sequence backends)) (dolist (backend backends) (dolist (key keys) @@ -562,8 +616,9 @@ must call it to obtain the actual value." spec ;; to exit early max - ;; create and delete - nil delete)) + ;; create is always nil here + nil delete + require)) (auth-source-do-debug "auth-source-search: found %d results (max %d) matching %S" @@ -577,9 +632,9 @@ must call it to obtain the actual value." spec ;; to exit early max - ;; create and delete - create delete)) - (auth-source-do-warn + create delete + require)) + (auth-source-do-debug "auth-source-search: CREATED %d results (max %d) matching %S" (length found) max spec)) @@ -589,18 +644,19 @@ must call it to obtain the actual value." found)) -(defun auth-source-search-backends (backends spec max create delete) +(defun auth-source-search-backends (backends spec max create delete require) (let (matches) (dolist (backend backends) (when (> max (length matches)) ; when we need more matches... - (let ((bmatches (apply - (slot-value backend 'search-function) - :backend backend - ;; note we're overriding whatever the spec - ;; has for :create and :delete - :create create - :delete delete - spec))) + (let* ((bmatches (apply + (slot-value backend 'search-function) + :backend backend + ;; note we're overriding whatever the spec + ;; has for :require, :create, and :delete + :require require + :create create + :delete delete + spec))) (when bmatches (auth-source-do-trivia "auth-source-search-backend: got %d (max %d) in %s:%s matching %S" @@ -729,7 +785,7 @@ while \(:host t) would find all host entries." ;;; (auth-source-netrc-parse "~/.authinfo.gpg") (defun* auth-source-netrc-parse (&rest spec - &key file max host user port delete + &key file max host user port delete require &allow-other-keys) "Parse FILE and return a list of all entries in the file. Note that the MAX parameter is used so we can exit the parse early." @@ -828,7 +884,15 @@ Note that the MAX parameter is used so we can exit the parse early." (or (aget alist "port") (aget alist "protocol") - t))) + t)) + (or + ;; the required list of keys is nil, or + (null require) + ;; every element of require is in the normalized list + (let ((normalized (nth 0 (auth-source-netrc-normalize + (list alist))))) + (loop for req in require + always (plist-get normalized req))))) (decf max) (push (nreverse alist) result) ;; to delete a line, we just comment it out @@ -853,7 +917,7 @@ Note that the MAX parameter is used so we can exit the parse early." (setq epa-file-encrypt-to auth-source-gpg-encrypt-to))) ;; ask AFTER we've successfully opened the file - (when (y-or-n-p (format "Save file %s? (%d modifications)" + (when (y-or-n-p (format "Save file %s? (%d deletions)" file modified)) (write-region (point-min) (point-max) file nil 'silent) (auth-source-do-debug @@ -893,7 +957,7 @@ Note that the MAX parameter is used so we can exit the parse early." (defun* auth-source-netrc-search (&rest spec - &key backend create delete + &key backend require create delete type max host user port &allow-other-keys) "Given a property list SPEC, return search matches from the :backend. @@ -905,6 +969,7 @@ See `auth-source-search' for details on SPEC." (let ((results (auth-source-netrc-normalize (auth-source-netrc-parse :max max + :require require :delete delete :file (oref backend source) :host (or host t) @@ -992,12 +1057,12 @@ See `auth-source-search' for details on SPEC." (data (auth-source-netrc-element-or-first data)) ;; this is the default to be offered (given-default (aget auth-source-creation-defaults r)) - ;; the default supplementals are simple: for the user, - ;; try (user-login-name), otherwise take given-default + ;; the default supplementals are simple: + ;; for the user, try `given-default' and then (user-login-name); + ;; otherwise take `given-default' (default (cond - ;; don't default the user name - ;; ((and (not given-default) (eq r 'user)) - ;; (user-login-name)) + ((and (not given-default) (eq r 'user)) + (user-login-name)) (t given-default))) (printable-defaults (list (cons 'user @@ -1020,10 +1085,10 @@ See `auth-source-search' for details on SPEC." "[any port]")))) (prompt (or (aget auth-source-creation-prompts r) (case r - ('secret "%p password for user %u, host %h: ") - ('user "%p user name: ") - ('host "%p host name for user %u: ") - ('port "%p port for user %u and host %h: ")) + (secret "%p password for %u@%h: ") + (user "%p user name for %h: ") + (host "%p host name for user %u: ") + (port "%p port for %u@%h: ")) (format "Enter %s (%%u@%%h:%%p): " r))) (prompt (auth-source-format-prompt prompt @@ -1071,70 +1136,79 @@ See `auth-source-search' for details on SPEC." data)))) (setq add (concat add (funcall printer))))))) - (with-temp-buffer - (when (file-exists-p file) - (insert-file-contents file)) - (when auth-source-gpg-encrypt-to - ;; (see bug#7487) making `epa-file-encrypt-to' local to - ;; this buffer lets epa-file skip the key selection query - ;; (see the `local-variable-p' check in - ;; `epa-file-write-region'). - (unless (local-variable-p 'epa-file-encrypt-to (current-buffer)) - (make-local-variable 'epa-file-encrypt-to)) - (if (listp auth-source-gpg-encrypt-to) - (setq epa-file-encrypt-to auth-source-gpg-encrypt-to))) - (goto-char (point-max)) + (plist-put + artificial + :save-function + (lexical-let ((file file) + (add add)) + (lambda () (auth-source-netrc-saver file add)))) - ;; ask AFTER we've successfully opened the file - (let ((prompt (format "Save auth info to file %s? %s: " - file - "y/n/N/e/?")) - (done (not (eq auth-source-save-behavior 'ask))) - (bufname "*auth-source Help*") - k) - (while (not done) - (message "%s" prompt) - (setq k (read-char)) - (case k - (?y (setq done t)) - (?? (save-excursion - (with-output-to-temp-buffer bufname - (princ - (concat "(y)es, save\n" - "(n)o but use the info\n" - "(N)o and don't ask to save again\n" - "(e)dit the line\n" - "(?) for help as you can see.\n")) + (list artificial))) + +;;(funcall (plist-get (nth 0 (auth-source-search :host '("nonesuch") :user "tzz" :port "imap" :create t :max 1)) :save-function)) +(defun auth-source-netrc-saver (file add) + "Save a line ADD in FILE, prompting along the way. +Respects `auth-source-save-behavior'." + (with-temp-buffer + (when (file-exists-p file) + (insert-file-contents file)) + (when auth-source-gpg-encrypt-to + ;; (see bug#7487) making `epa-file-encrypt-to' local to + ;; this buffer lets epa-file skip the key selection query + ;; (see the `local-variable-p' check in + ;; `epa-file-write-region'). + (unless (local-variable-p 'epa-file-encrypt-to (current-buffer)) + (make-local-variable 'epa-file-encrypt-to)) + (if (listp auth-source-gpg-encrypt-to) + (setq epa-file-encrypt-to auth-source-gpg-encrypt-to))) + ;; we want the new data to be found first, so insert at beginning + (goto-char (point-min)) + + ;; ask AFTER we've successfully opened the file + (let ((prompt (format "Save auth info to file %s? " file)) + (done (not (eq auth-source-save-behavior 'ask))) + (bufname "*auth-source Help*") + k) + (while (not done) + (setq k (auth-source-read-char-choice prompt '(?y ?n ?N ?e ??))) + (case k + (?y (setq done t)) + (?? (save-excursion + (with-output-to-temp-buffer bufname + (princ + (concat "(y)es, save\n" + "(n)o but use the info\n" + "(N)o and don't ask to save again\n" + "(e)dit the line\n" + "(?) for help as you can see.\n")) (set-buffer standard-output) (help-mode)))) - (?n (setq add "" - done t)) - (?N (setq add "" - done t - auth-source-save-behavior nil)) - (?e (setq add (read-string "Line to add: " add))) - (t nil))) + (?n (setq add "" + done t)) + (?N (setq add "" + done t + auth-source-save-behavior nil)) + (?e (setq add (read-string "Line to add: " add))) + (t nil))) - (when (get-buffer-window bufname) - (delete-window (get-buffer-window bufname))) + (when (get-buffer-window bufname) + (delete-window (get-buffer-window bufname))) - ;; make sure the info is not saved - (when (null auth-source-save-behavior) - (setq add "")) + ;; make sure the info is not saved + (when (null auth-source-save-behavior) + (setq add "")) - (when (< 0 (length add)) - (progn - (unless (bolp) - (insert "\n")) - (insert add "\n") - (write-region (point-min) (point-max) file nil 'silent) - (auth-source-do-warn - "auth-source-netrc-create: wrote 1 new line to %s" - file) - nil)) - - (when (eq done t) - (list artificial)))))) + (when (< 0 (length add)) + (progn + (unless (bolp) + (insert "\n")) + (insert add "\n") + (write-region (point-min) (point-max) file nil 'silent) + (auth-source-do-debug + "auth-source-netrc-create: wrote 1 new line to %s" + file) + (message "Saved new authentication information to %s" file) + nil))))) ;;; Backend specific parsing: Secrets API backend diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 638097abd7d..e76ead515c5 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -279,16 +279,21 @@ textual parts.") (current-buffer))) (defun nnimap-credentials (address ports) - (let ((found (nth 0 (auth-source-search :max 1 - :host address - :port ports - :create t)))) + (let* ((auth-source-creation-prompts + '((user . "IMAP user at %h: ") + (secret . "IMAP password for %u@%h: "))) + (found (nth 0 (auth-source-search :max 1 + :host address + :port ports + :require '(:user :secret) + :create t)))) (if found (list (plist-get found :user) (let ((secret (plist-get found :secret))) (if (functionp secret) (funcall secret) - secret))) + secret)) + (plist-get found :save-function)) nil))) (defun nnimap-keepalive () @@ -396,7 +401,12 @@ textual parts.") (let ((nnimap-inhibit-logging t)) (setq login-result (nnimap-login (car credentials) (cadr credentials)))) - (unless (car login-result) + (if (car login-result) + ;; save the credentials if a save function exists + ;; (such a function will only be passed if a new + ;; token was created) + (when (functionp (nth 2 credentials)) + (funcall (nth 2 credentials))) ;; If the login failed, then forget the credentials ;; that are now possibly cached. (dolist (host (list (nnoo-current-server 'nnimap) From 3107d2a58a15e7fe71f3ac56886a4a71a9af36db Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Wed, 9 Mar 2011 14:37:30 +0000 Subject: [PATCH 102/383] auth.texi (Help for developers): Untabify. --- doc/misc/auth.texi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index e16d7b49b63..85a3f098131 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi @@ -263,11 +263,11 @@ from Gnus' @code{nnimap.el}. :create t)))) (if found (list (plist-get found :user) - (let ((secret (plist-get found :secret))) - (if (functionp secret) - (funcall secret) - secret)) - (plist-get found :save-function)) + (let ((secret (plist-get found :secret))) + (if (functionp secret) + (funcall secret) + secret)) + (plist-get found :save-function)) nil))) @end example @@ -287,7 +287,7 @@ Later, after a successful login, @code{nnimal.el} calls the @example (when (functionp (nth 2 credentials)) (funcall (nth 2 credentials))) -@end example +@end example Which will work whether the @code{:save-function} was provided or not. @code{:save-function} will be provided only when a new entry was From 0286d9de5c4328a7c620f064dbc007dfea627f8c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 9 Mar 2011 17:59:23 +0200 Subject: [PATCH 103/383] Fix bug #8210 with index entries for ".emacs". doc/emacs/custom.texi (Init File): Add index entries for ".emacs". --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/custom.texi | 2 ++ 2 files changed, 7 insertions(+) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index d46e21eb82a..2dac7ec028d 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2011-03-09 Eli Zaretskii + + * custom.texi (Init File): Add inex entries for ".emacs". + (Bug#8210) + 2011-03-08 Jan Djärv * xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 9304e8bef08..7a696df319b 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2114,6 +2114,8 @@ Reference Manual}. @node Init File @section The Init File, @file{~/.emacs} @cindex init file +@cindex .emacs file +@cindex ~/.emacs file @cindex Emacs initialization file @cindex key rebinding, permanent @cindex rebinding keys, permanently From 114902a577327cf37d87ff297a1d874e3331d631 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 9 Mar 2011 18:04:43 +0200 Subject: [PATCH 104/383] Fix a typo in last commit of ChangeLog file. --- doc/emacs/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 2dac7ec028d..4ce236604ed 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,6 +1,6 @@ 2011-03-09 Eli Zaretskii - * custom.texi (Init File): Add inex entries for ".emacs". + * custom.texi (Init File): Add index entries for ".emacs". (Bug#8210) 2011-03-08 Jan Djärv From cfe0661dbe4551a93878428bc40c53adeb4864ae Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 9 Mar 2011 17:18:51 +0100 Subject: [PATCH 105/383] * src/search.c (compile_pattern_1): Remove unused argument. (compile_pattern): Don't pass it. --- src/ChangeLog | 10 ++++++++-- src/search.c | 8 ++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ff5ee064a92..c9133f2ea86 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-03-09 Juanma Barranquero + + * search.c (compile_pattern_1): Remove argument regp, unused since + revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig. + (compile_pattern): Don't pass it. + 2011-03-08 Jan Djärv * xterm.h (DEFAULT_GDK_DISPLAY): New define. @@ -62,7 +68,7 @@ text field. After disabling it, set focus on the list control. (Fx_file_dialog): If only_dir_p is non-nil, set the text of the File Name text field to "Current Directory" if it does not already have - another value. (Bug#8181) + another value. (Bug#8181) 2011-03-07 Adrian Robert @@ -123,7 +129,7 @@ * xdisp.c (BUILD_GLYPHLESS_GLYPH_STRING): Omit unused local var. (produce_glyphless_glyph): Make a pointer "const" since it might point to immutable storage. - (update_window_cursor): Now static, since it's not used elsewhere. + (update_window_cursor): Now static, since it's not used elsewhere. (SKIP_GLYPHS): Removed unused macro. 2011-03-06 Michael Shields (tiny change) diff --git a/src/search.c b/src/search.c index 1e2036f6dc2..dceff94da72 100644 --- a/src/search.c +++ b/src/search.c @@ -114,17 +114,13 @@ matcher_overflow (void) PATTERN is the pattern to compile. CP is the place to put the result. TRANSLATE is a translation table for ignoring case, or nil for none. - REGP is the structure that says where to store the "register" - values that will result from matching this pattern. - If it is 0, we should compile the pattern not to record any - subexpression bounds. POSIX is nonzero if we want full backtracking (POSIX style) for this pattern. 0 means backtrack only enough to get a valid match. The behavior also depends on Vsearch_spaces_regexp. */ static void -compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object translate, struct re_registers *regp, int posix) +compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, Lisp_Object translate, int posix) { char *val; reg_syntax_t old; @@ -247,7 +243,7 @@ compile_pattern (Lisp_Object pattern, struct re_registers *regp, Lisp_Object tra if (cp->next == 0) { compile_it: - compile_pattern_1 (cp, pattern, translate, regp, posix); + compile_pattern_1 (cp, pattern, translate, posix); break; } } From 63a329f81d59e60a6cc3a6e06f1ef5f7749bb4a2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 9 Mar 2011 18:54:08 +0200 Subject: [PATCH 106/383] Allow building manuals with Texinfo before v4.12. doc/lispref/intro.texi (Acknowledgements): Convert to ISO-8859-1 encoding. doc/lispref/makefile.w32-in (MAKEINFO_OPTS): Add --enable-encoding. doc/lispref/elisp.texi: Use ISO-8859-1 in @documentencoding. doc/emacs/ack.texi (Acknowledgments): Convert to ISO-8859-1 encoding. Use Texinfo @-commands for non Latin-1 characters. doc/emacs/emacs.texi: Use ISO-8859-1 in @documentencoding. doc/emacs/makefile.w32-in (MAKEINFO_OPTS): Add --enable-encoding. --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/ack.texi | 30 +++++++++++++++--------------- doc/emacs/emacs.texi | 2 +- doc/emacs/makefile.w32-in | 2 +- doc/lispref/ChangeLog | 6 ++++++ doc/lispref/elisp.texi | 2 +- doc/lispref/intro.texi | 4 ++-- doc/lispref/makefile.w32-in | 2 +- 8 files changed, 32 insertions(+), 21 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 4ce236604ed..4bdd1448add 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,5 +1,10 @@ 2011-03-09 Eli Zaretskii + * ack.texi (Acknowledgments): Convert to ISO-8859-1 encoding. Use + Texinfo @-commands for non Latin-1 characters. + + * makefile.w32-in (MAKEINFO_OPTS): Add --enable-encoding. + * custom.texi (Init File): Add index entries for ".emacs". (Bug#8210) diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index 148aaaeaa30..debe7149cb5 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -1,4 +1,4 @@ -@c -*- coding: utf-8 -*- +@c -*- coding: iso-latin-1 -*- @c This is part of the Emacs manual. @c Copyright (C) 1994-1997, 1999-2011 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @@ -52,7 +52,7 @@ files. Michael Albinus wrote @file{dbus.el}, a package that implements the D-Bus message bus protocol; @file{zeroconf.el}, a mode for browsing Avahi services; and @file{xesam.el}, a Xesam-based search engine -interface. He and Kai Großjohann wrote the Tramp package, which +interface. He and Kai Großjohann wrote the Tramp package, which provides transparent remote file editing using rcp, ssh, ftp, and other network protocols. He and Daniel Pittman wrote @file{tramp-cache.el}. @@ -154,7 +154,7 @@ David M.@: Brown wrote @file{array.el}, for editing arrays and other tabular data. @item -WÅ‚odek Bzyl and Ryszard Kubiak wrote @file{ogonek.el}, a package for +W@l{}odek Bzyl and Ryszard Kubiak wrote @file{ogonek.el}, a package for changing the encoding of Polish characters. @item @@ -191,7 +191,7 @@ prior to Emacs 23 for Mac OS. @item Chong Yidong was the Emacs co-maintainer for Emacs 23. He made many improvements to the Emacs display engine; and, together with Kai -Großjohann and Alex Schroeder, wrote @file{longlines.el}, a minor +Großjohann and Alex Schroeder, wrote @file{longlines.el}, a minor mode for wrapping long lines. @item @@ -249,13 +249,13 @@ text replace the current selection. Eric Ding wrote @file{goto-addr.el}, @item -Jan Djärv added support for the GTK+ toolkit and X drag-and-drop. +Jan Djärv added support for the GTK+ toolkit and X drag-and-drop. @item Carsten Dominik wrote Ref@TeX{}, a package for setting up labels and cross-references in La@TeX{} documents; and co-wrote IDLWAVE mode (q.v.@:). He was the main author of Org mode, for maintaining notes, -todo lists, and project planning. Thomas Baumann, Jan Böcker, Lennart +todo lists, and project planning. Thomas Baumann, Jan Böcker, Lennart Borgman, Baoqiu Cui, Daniel German, Bastien Guerry, Tassilo Horn, Philip Jackson, Tokuya Kameshima, Ross Patterson, Sebastian Rose, Eric Schulte, Paul Sexton, Ulf Stegemann, Andy Stewart, David O'Toole, John Wiegley, @@ -284,7 +284,7 @@ folders have mail waiting in them; and @file{iswitchb.el}, a feature for incremental reading and completion of buffer names. @item -Torbjörn Einarsson wrote @file{f90.el}, a mode for Fortran 90 files. +Torbjörn Einarsson wrote @file{f90.el}, a mode for Fortran 90 files. @item Tsugutomo Enami co-wrote the support for international character sets. @@ -350,7 +350,7 @@ Kevin Gallo added multiple-frame support for Windows NT and wrote @file{w32-win.el}, support functions for the MS-Windows window system. @item -Juan León Lahoz García wrote @file{wdired.el}, a package for +Juan León Lahoz García wrote @file{wdired.el}, a package for performing file operations by directly editing Dired buffers. @item @@ -484,8 +484,8 @@ Emacs: @file{dns.el} for Domain Name Service lookups; @file{netrc.el} for parsing of @file{.netrc} files; and @file{time-date.el} for general date and time handling. Components of Gnus have also been written by: Nagy Andras, David Blacka, Scott Byer, -Kevin Greiner, Kai Großjohann, Joe Hildebrand, Paul Jarc, Sascha -Lüdecke, David Moore, Jim Radford, Benjamin Rutt, Raymond Scholz, +Kevin Greiner, Kai Großjohann, Joe Hildebrand, Paul Jarc, Sascha +Lüdecke, David Moore, Jim Radford, Benjamin Rutt, Raymond Scholz, Thomas Steffen, Reiner Steib, Didier Verna, Ilja Weis, Katsumi Yamaoka, Teodor Zlatanov, and others (@pxref{Contributors,,,gnus, the Gnus Manual}). @@ -525,7 +525,7 @@ S/MIME and Sieve components; and @file{tls.el} and @file{starttls.el} for the Transport Layer Security protocol. @item -Arne Jørgensen wrote @file{latexenc.el}, a package to +Arne Jørgensen wrote @file{latexenc.el}, a package to automatically guess the correct coding system in LaTeX files. @item @@ -577,7 +577,7 @@ files and running a PostScript interpreter interactively from within Emacs. @item -Karel KlÃ­Ä contributed SELinux support, for preserving the +Karel Klí@v{c} contributed SELinux support, for preserving the Security-Enchanced Linux context of files on backup and copy. @item @@ -668,7 +668,7 @@ directory-local variables; and the @code{info-finder} feature that creates a virtual Info manual of package keywords. @item -Károly LÅ‘rentey wrote the ``multi-terminal'' code, which allows Emacs to +Károly L@H{o}rentey wrote the ``multi-terminal'' code, which allows Emacs to run on graphical and text-only terminals simultaneously. @item @@ -933,7 +933,7 @@ Fred Pierresteguy and Paul Reilly made Emacs work with X Toolkit widgets. @item -François Pinard, Greg McGary, and Bruno Haible wrote @file{po.el}, +François Pinard, Greg McGary, and Bruno Haible wrote @file{po.el}, support for PO translation files. @item @@ -1195,7 +1195,7 @@ Olaf Sylvester wrote @file{bs.el}, a package for manipulating Emacs buffers. @item -Tibor Å imko and Milan Zamazal wrote @file{slovak.el}, support for +Tibor @v{S}imko and Milan Zamazal wrote @file{slovak.el}, support for editing text in Slovak language. @item diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 75453993dde..ef56a0dedd8 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -29,7 +29,7 @@ developing GNU and promoting software freedom.'' @end quotation @end copying -@documentencoding UTF-8 +@documentencoding ISO-8859-1 @dircategory Emacs @direntry diff --git a/doc/emacs/makefile.w32-in b/doc/emacs/makefile.w32-in index bbbcaf0528b..ad976468be9 100644 --- a/doc/emacs/makefile.w32-in +++ b/doc/emacs/makefile.w32-in @@ -28,7 +28,7 @@ infodir = $(srcdir)/../../info # The makeinfo program is part of the Texinfo distribution. MAKEINFO = makeinfo -MAKEINFO_OPTS = --force -I$(srcdir) +MAKEINFO_OPTS = --force --enable-encoding -I$(srcdir) MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat INFO_TARGETS = $(infodir)/emacs DVI_TARGETS = emacs.dvi diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 7a402c902e5..fb99bee7aee 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,9 @@ +2011-03-09 Eli Zaretskii + + * intro.texi (Acknowledgements): Convert to ISO-8859-1 encoding. + + * makefile.w32-in (MAKEINFO_OPTS): Add --enable-encoding. + 2011-03-08 Glenn Morris * Makefile.in (MAKEINFO_OPTS): Add --enable-encoding. diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 1bd10633d44..69c50ba42be 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -62,7 +62,7 @@ developing GNU and promoting software freedom.'' @end quotation @end copying -@documentencoding UTF-8 +@documentencoding ISO-8859-1 @dircategory GNU Emacs Lisp @direntry diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi index 59718cbee75..7c070726023 100644 --- a/doc/lispref/intro.texi +++ b/doc/lispref/intro.texi @@ -1,4 +1,4 @@ -@c -*-coding: utf-8-*- +@c -*-coding: iso-latin-1-*- @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990-1994, 2001-2011 Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @@ -542,6 +542,6 @@ Kirman, Bob Knighten, Frederick M. Korz, Joe Lammens, Glenn M. Lewis, K. Richard Magill, Brian Marick, Roland McGrath, Stefan Monnier, Skip Montanaro, John Gardiner Myers, Thomas A. Peterson, Francesco Potorti, Friedrich Pukelsheim, Arnold D. Robbins, Raul Rockwell, Jason Rumney, -Per Starbäck, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill +Per Starbäck, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill Trost, Rickard Westman, Jean White, Eduard Wiebe, Matthew Wilding, Carl Witty, Dale Worley, Rusty Wright, and David D. Zuhn. diff --git a/doc/lispref/makefile.w32-in b/doc/lispref/makefile.w32-in index d074dd22e24..7b88e861d67 100644 --- a/doc/lispref/makefile.w32-in +++ b/doc/lispref/makefile.w32-in @@ -33,7 +33,7 @@ texinfodir = $(srcdir)/../misc TEX=tex INSTALL_INFO = install-info MAKEINFO = makeinfo -MAKEINFO_OPTS = --force -I$(srcdir) -I$(emacsdir) +MAKEINFO_OPTS = --force --enable-encoding -I$(srcdir) -I$(emacsdir) # The environment variable and its value to add $(srcdir) to the path # searched for TeX input files. From 28f1c698135e245c0e09e6c5314b4799aca9378d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 09:30:24 -0800 Subject: [PATCH 107/383] * xterm.c (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN. --- src/ChangeLog | 1 + src/xterm.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 2dc9d34f290..3381fa28aca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -17,6 +17,7 @@ (x_error_catcher, x_connection_closed, x_error_handler): (x_error_quitter, xembed_send_message, x_iconify_frame): (my_log_handler): Rename locals to avoid shadowing. + (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN. * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. diff --git a/src/xterm.c b/src/xterm.c index c542f0d9f29..e218eb95285 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -317,6 +317,7 @@ static void XTframe_up_to_date (struct frame *); static void XTset_terminal_modes (struct terminal *); static void XTreset_terminal_modes (struct terminal *); static void x_clear_frame (struct frame *); +static void x_ins_del_lines (struct frame *, int, int) NO_RETURN; static void frame_highlight (struct frame *); static void frame_unhighlight (struct frame *); static void x_new_focus_frame (struct x_display_info *, struct frame *); @@ -873,6 +874,7 @@ static void x_draw_glyph_string_foreground (struct glyph_string *); static void x_draw_composite_glyph_string_foreground (struct glyph_string *); static void x_draw_glyph_string_box (struct glyph_string *); static void x_draw_glyph_string (struct glyph_string *); +static void x_delete_glyphs (struct frame *, int) NO_RETURN; static void x_compute_glyph_string_overhangs (struct glyph_string *); static void x_set_cursor_gc (struct glyph_string *); static void x_set_mode_line_face_gc (struct glyph_string *); From 2a8fade06259290024cd7fe98fdeb8fd9709c90f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 09:39:28 -0800 Subject: [PATCH 108/383] * xterm.c (x_connection_closed): Tell GCC not to suggest NO_RETURN. --- src/ChangeLog | 1 + src/xterm.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 3381fa28aca..13f1715d3ae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -18,6 +18,7 @@ (x_error_quitter, xembed_send_message, x_iconify_frame): (my_log_handler): Rename locals to avoid shadowing. (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN. + (x_connection_closed): Tell GCC not to suggest NO_RETURN. * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename or move locals to avoid shadowing. diff --git a/src/xterm.c b/src/xterm.c index e218eb95285..abedf3b3bce 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -7755,6 +7755,10 @@ For details, see etc/PROBLEMS.\n", unbind_to (idx, Qnil); clear_waiting_for_input (); + + /* Tell GCC not to suggest attribute 'noreturn' for this function. */ + IF_LINT (if (! terminal_list) return; ) + /* Here, we absolutely have to use a non-local exit (e.g. signal, throw, longjmp), because returning from this function would get us back into Xlib's code which will directly call `exit'. */ From 5baee236626c096eb0eddbf5fc12193805db9525 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 9 Mar 2011 22:05:40 +0200 Subject: [PATCH 109/383] Fix last commit. --- doc/emacs/emacs.texi | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index ef56a0dedd8..7ca6204a994 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1,4 +1,4 @@ -\input texinfo @c -*- coding: utf-8 -*- +\input texinfo @c -*- coding: iso-latin-1 -*- @setfilename ../../info/emacs @settitle GNU Emacs Manual @@ -1352,24 +1352,24 @@ Abrahamsson, Jay K.@: Adams, Michael Albinus, Nagy Andras, Ralf Angeli, Joe Arceneaux, Miles Bader, David Bakhash, Juanma Barranquero, Eli Barzilay, Thomas Baumann, Steven L.@: Baur, Jay Belanger, Alexander L.@: Belikoff, Boaz Ben-Zvi, Karl Berry, Anna M.@: Bigatti, Ray Blaak, Jim -Blandy, Johan BockgÃ¥rd, Jan Böcker, Lennart Borgman, Per Bothner, +Blandy, Johan Bockgård, Jan Böcker, Lennart Borgman, Per Bothner, Terrence Brannon, Frank Bresz, Peter Breton, Emmanuel Briot, Kevin Broadey, Vincent Broman, David M.@: Brown, Georges Brun-Cottan, Joe -Buehler, WÅ‚odek Bzyl, Bill Carpenter, Per Cederqvist, Hans Chalupsky, +Buehler, W@l{}odek Bzyl, Bill Carpenter, Per Cederqvist, Hans Chalupsky, Chong Yidong, Chris Chase, Bob Chassell, Andrew Choi, Sacha Chua, James Clark, Mike Clarkson, Glynn Clements, Daniel Colascione, Andrew Csillag, Baoqiu Cui, Doug Cutting, Mathias Dahl, Julien Danjou, Satyaki Das, Vivek Dasmohapatra, Michael DeCorte, Gary Delp, Matthieu Devin, Eri -Ding, Jan Djärv, Carsten Dominik, Scott Draves, Benjamin Drieu, +Ding, Jan Djärv, Carsten Dominik, Scott Draves, Benjamin Drieu, Viktor Dukhovni, Dmitry Dzhus, John Eaton, Rolf Ebert, Paul Eggert, -Stephen Eglen, Torbjörn Einarsson, Tsugutomo Enami, Hans Henrik +Stephen Eglen, Torbjörn Einarsson, Tsugutomo Enami, Hans Henrik Eriksen, Michael Ernst, Ata Etemadi, Frederick Farnbach, Oscar Figueiredo, Fred Fish, Karl Fogel, Gary Foster, Romain Francoise, Noah Friedman, Andreas Fuchs, Hallvard Furuseth, Keith Gabryelski, Peter S.@: -Galbraith, Kevin Gallagher, Kevin Gallo, Juan León Lahoz -García, Howard Gayle, Daniel German, Stephen Gildea, +Galbraith, Kevin Gallagher, Kevin Gallo, Juan León Lahoz +García, Howard Gayle, Daniel German, Stephen Gildea, Julien Gilles, David Gillespie, Bob Glickstein, Deepak Goel, Boris -Goldowsky, Michelangelo Grigni, Odd Gripenstam, Kai Großjohann, +Goldowsky, Michelangelo Grigni, Odd Gripenstam, Kai Großjohann, Michael Gschwind, Bastien Guerry, Henry Guillaume, Doug Gwyn, Ken'ichi Handa, Lars Hansen, Chris Hanson, K. Shane Hartman, John Heidemann, Jon K.@: Hellan, Jesper Harder, Magnus Henoch, Markus Heritsch, Karl Heuer, @@ -1377,17 +1377,17 @@ Manabu Higashida, Anders Holst, Jeffrey C.@: Honig, Tassilo Horn, Kurt Hornik, Tom Houlder, Joakim Hove, Denis Howe, Lars Ingebrigtsen, Andrew Innes, Seiichiro Inoue, Philip Jackson, Pavel Janik, Paul Jarc, Ulf Jasper, Michael K. Johnson, Kyle Jones, Terry Jones, Simon Josefsson, -Arne Jørgensen, Tomoji Kagatani, Brewster Kahle, Tokuya Kameshima, +Arne Jørgensen, Tomoji Kagatani, Brewster Kahle, Tokuya Kameshima, Lute Kamstra, David Kastrup, David Kaufman, Henry Kautz, Taichi Kawabata, Howard Kaye, Michael Kifer, Richard King, Peter Kleiweg, Karel -KlíÄ, Shuhei Kobayashi, Pavel Kobiakov, Larry K.@: +Klí@v{c}, Shuhei Kobayashi, Pavel Kobiakov, Larry K.@: Kolodney, David M.@: Koppelman, Koseki Yoshinori, Robert Krawitz, -Sebastian Kremer, Ryszard Kubiak, David KÃ¥gedal, Daniel LaLiberte, +Sebastian Kremer, Ryszard Kubiak, David Kågedal, Daniel LaLiberte, Karl Landstrom, Mario Lang, Aaron Larson, James R.@: Larus, Vinicius Jose Latorre, Werner Lemberg, Frederic Lepied, Peter Liljenberg, Lars Lindberg, Chris Lindblad, Anders Lindgren, Thomas Link, Juri Linkov, -Francis Litterio, Emilio C. Lopes, Károly LÅ‘rentey, Dave Love, -Sascha Lüdecke, Eric Ludlam, Alan Mackenzie, Christopher J.@: +Francis Litterio, Emilio C. Lopes, Károly L@H{o}rentey, Dave Love, +Sascha Lüdecke, Eric Ludlam, Alan Mackenzie, Christopher J.@: Madsen, Neil M.@: Mager, Ken Manheimer, Bill Mann, Brian Marick, Simon Marshall, Bengt Martensson, Charlie Martin, Thomas May, Roland McGrath, Will Mengarini, David Megginson, Ben A. Mesander, Wayne Mesard, Brad From b6a5875b6a758190dfae68bbe3746914510c9462 Mon Sep 17 00:00:00 2001 From: Ken Manheimer Date: Wed, 9 Mar 2011 15:48:56 -0500 Subject: [PATCH 110/383] * allout.el Summary: Change so yank of distinctive-bullet items preserves the existing header prefix, rebulleting it if necessary, rather than replacing it. This is necessary for proper operation of cooperative addons like allout-widgets. (allout-make-topic-prefix) (allout-rebullet-heading): Change SOLICIT arg to INSTEAD, and interpret additionally a string value as alternate bullet to be used, instead of prompting the user for a bullet character. --- lisp/ChangeLog | 11 ++++++ lisp/allout.el | 92 +++++++++++++++++++++++--------------------------- 2 files changed, 54 insertions(+), 49 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index df4834a27c6..15bf0da861c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2011-03-09 Ken Manheimer + + * allout.el Summary: Change so yank of distinctive-bullet items + preserves the existing header prefix, rebulleting it if necessary, + rather than replacing it. This is necessary for proper operation + of cooperative addons like allout-widgets. + (allout-make-topic-prefix) (allout-rebullet-heading): Change + SOLICIT arg to INSTEAD, and interpret additionally a string value + as alternate bullet to be used, instead of prompting the user for + a bullet character. + 2011-03-09 Michael Albinus * net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band): Do diff --git a/lisp/allout.el b/lisp/allout.el index c75b7a22f9a..91eaa28fdaf 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -3465,13 +3465,13 @@ Offer one suitable for current depth DEPTH as default." (defun allout-make-topic-prefix (&optional prior-bullet new depth - solicit + instead number-control index) ;; Depth null means use current depth, non-null means we're either ;; opening a new topic after current topic, lower or higher, or we're ;; changing level of current topic. - ;; Solicit dominates specified bullet-char. + ;; Instead dominates specified bullet-char. ;;;_ . Doc string: "Generate a topic prefix suitable for optional arg DEPTH, or current depth. @@ -3492,15 +3492,18 @@ bullet or previous sibling. Third arg DEPTH forces the topic prefix to that depth, regardless of the current topics' depth. -If SOLICIT is non-nil, then the choice of bullet is solicited from -user. If it's a character, then that character is offered as the -default, otherwise the one suited to the context (according to -distinction or depth) is offered. (This overrides other options, -including, eg, a distinctive PRIOR-BULLET.) If non-nil, then the -context-specific bullet is used. +If INSTEAD is: + +- nil, then the bullet char for the context is used, per distinction or depth +- a string, then the first character of the string will be used +- a character, then the user is solicited for bullet, with that char as default +- anything else, the user is solicited with bullet char per context as default + +\(INSTEAD overrides other options, including, eg, a distinctive +PRIOR-BULLET.) Fifth arg, NUMBER-CONTROL, matters only if `allout-numbered-bullet' -is non-nil *and* soliciting was not explicitly invoked. Then +is non-nil *and* no specific INSTEAD was specified. Then NUMBER-CONTROL non-nil forces prefix to either numbered or denumbered format, depending on the value of the sixth arg, INDEX. @@ -3549,8 +3552,11 @@ index for each successive sibling)." ;; Solicitation overrides numbering and other cases: ((progn (setq body (make-string (- depth 2) ?\ )) ;; The actual condition: - solicit) - (let* ((got (allout-solicit-alternate-bullet depth solicit))) + instead) + (let* ((got + (if (and (stringp instead)(> (length instead) 0)) + (substring instead 0 1) + (allout-solicit-alternate-bullet depth instead)))) ;; Gotta check whether we're numbering and got a numbered bullet: (setq numbering (and allout-numbered-bullet (not (and number-control (not index))) @@ -3913,7 +3919,7 @@ Note that refill of indented paragraphs is not done." (allout-end-of-prefix) (setq from allout-recent-prefix-beginning to allout-recent-prefix-end) - (allout-rebullet-heading t ;;; solicit + (allout-rebullet-heading t ;;; instead nil ;;; depth nil ;;; number-control nil ;;; index @@ -3931,8 +3937,8 @@ Note that refill of indented paragraphs is not done." (message "Done.") (cond (on-bullet (goto-char (allout-current-bullet-pos))) (initial-col (move-to-column initial-col))))) -;;;_ > allout-rebullet-heading (&optional solicit ...) -(defun allout-rebullet-heading (&optional solicit +;;;_ > allout-rebullet-heading (&optional instead ...) +(defun allout-rebullet-heading (&optional instead new-depth number-control index @@ -3942,11 +3948,11 @@ Note that refill of indented paragraphs is not done." All args are optional. -If SOLICIT is non-nil, then the choice of bullet is solicited from -user. If it's a character, then that character is offered as the -default, otherwise the one suited to the context (according to -distinction or depth) is offered. If non-nil, then the -context-specific bullet is just used. +If INSTEAD is: +- nil, then the bullet char for the context is used, per distinction or depth +- a string, then the first character of the string will be used +- a character, then the user is solicited for bullet, with that char as default +- anything else, the user is solicited with bullet char per context as default Second arg DEPTH forces the topic prefix to that depth, regardless of the topic's current depth. @@ -3981,7 +3987,7 @@ this function." (new-prefix (allout-make-topic-prefix current-bullet nil new-depth - solicit + instead number-control index))) @@ -4028,7 +4034,7 @@ this function." (cond ((numberp index) (1+ index)) ((not number-control) (allout-sibling-index)))) (if (allout-numbered-type-prefix) - (allout-rebullet-heading nil ;;; solicit + (allout-rebullet-heading nil ;;; instead new-depth ;;; new-depth number-control;;; number-control index ;;; index @@ -4145,7 +4151,7 @@ a topic and its immediate offspring is greater than one.)" (when (< relative-depth 0) (save-excursion (goto-char local-point) - (allout-rebullet-heading nil ;;; solicit + (allout-rebullet-heading nil ;;; instead (+ starting-depth relative-depth) nil ;;; number starting-index @@ -4203,7 +4209,7 @@ Returns final depth." ; Prime ascender for ascension: (setq ascender (1- allout-recent-depth)) (if (>= allout-recent-depth depth) - (allout-rebullet-heading nil ;;; solicit + (allout-rebullet-heading nil ;;; instead nil ;;; depth nil ;;; number-control nil ;;; index @@ -4230,7 +4236,7 @@ rebulleting each topic at this level." (use-bullet (equal '(16) denumber)) (more t)) (while more - (allout-rebullet-heading use-bullet ;;; solicit + (allout-rebullet-heading use-bullet ;;; instead depth ;;; depth t ;;; number-control index ;;; index @@ -4577,32 +4583,20 @@ however, are left exactly like normal, non-allout-specific yanks." (progn (widen) (forward-char -1) (narrow-to-region subj-beg (point)))))) - ;; Preserve new bullet if it's a distinctive one, otherwise - ;; use old one: - (if (string-match (regexp-quote prefix-bullet) - allout-distinctive-bullets-string) - ; Delete from bullet of old to - ; before bullet of new: - (progn - (beginning-of-line) - (allout-unprotected - (delete-region (point) subj-beg)) - (set-marker (allout-mark-marker t) subj-end) - (goto-char subj-beg) - (allout-end-of-prefix)) - ; Delete base subj prefix, - ; leaving old one: - (allout-unprotected - (progn - (delete-region (point) (+ (point) - prefix-len - (- adjust-to-depth - subj-depth))) + ;; Remove new heading prefix: + (allout-unprotected + (progn + (delete-region (point) (+ (point) + prefix-len + (- adjust-to-depth + subj-depth))) ; and delete residual subj ; prefix digits and space: - (while (looking-at "[0-9]") (delete-char 1)) - (if (looking-at " ") - (delete-char 1)))))) + (while (looking-at "[0-9]") (delete-char 1)) + (if (looking-at " ") + (delete-char 1)))) + ;; Assert new topic's bullet - minimal effort if unchanged: + (allout-rebullet-heading prefix-bullet)) (exchange-point-and-mark)))) (if rectify-numbering (progn @@ -4613,7 +4607,7 @@ however, are left exactly like normal, non-allout-specific yanks." (goto-char subj-beg) (if (allout-goto-prefix-doublechecked) (allout-unprotected - (allout-rebullet-heading nil ;;; solicit + (allout-rebullet-heading nil ;;; instead (allout-depth) ;;; depth nil ;;; number-control nil ;;; index From 9d5aa01d306750665de06d30f99dcff05fa6c53b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 9 Mar 2011 17:38:16 -0600 Subject: [PATCH 111/383] * calc/calc.el (calc-mode-map): Don't bind "C-_" to `calc-missing-key'. --- lisp/ChangeLog | 4 ++++ lisp/calc/calc.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 15bf0da861c..351f7f1f58d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-09 Jay Belanger + + * calc/calc.el (calc-mode-map): Don't bind "C-_" to `calc-missing-key'. + 2011-03-09 Ken Manheimer * allout.el Summary: Change so yank of distinctive-bullet items diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index f4d8983eb88..08ae7b10113 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -1084,7 +1084,7 @@ Used by `calc-user-invocation'.") "lOW") (mapc (lambda (x) (define-key map (char-to-string x) 'calc-missing-key)) (concat "ABCDEFGHIJKLMNOPQRSTUVXZabcdfghjkmoprstuvwxyz" - ":\\|!()[]<>{},;=~`\C-k\C-w\C-_")) + ":\\|!()[]<>{},;=~`\C-k\C-w")) (define-key map "\M-w" 'calc-missing-key) (define-key map "\M-k" 'calc-missing-key) (define-key map "\M-\C-w" 'calc-missing-key) From f78faa98a289e2acfa6b448b5faf66331c346224 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 16:58:10 -0800 Subject: [PATCH 112/383] * xfns.c (x_decode_color, x_set_name, x_window): Now static. --- src/ChangeLog | 4 ++++ src/xfns.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 13f1715d3ae..b88e07e8356 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-10 Paul Eggert + + * xfns.c (x_decode_color, x_set_name, x_window): Now static. + 2011-03-09 Paul Eggert * xterm.h (x_mouse_leave): New decl. diff --git a/src/xfns.c b/src/xfns.c index deb0e192a54..d1907567737 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -648,7 +648,7 @@ x_defined_color (struct frame *f, const char *color_name, is a monochrome frame, return MONO_COLOR regardless of what ARG says. Signal an error if color can't be allocated. */ -int +static int x_decode_color (FRAME_PTR f, Lisp_Object color_name, int mono_color) { XColor cdef; @@ -1635,7 +1635,7 @@ x_set_name_internal (FRAME_PTR f, Lisp_Object name) suggesting a new name, which lisp code should override; if F->explicit_name is set, ignore the new name; otherwise, set it. */ -void +static void x_set_name (struct frame *f, Lisp_Object name, int explicit) { /* Make sure that requests from lisp code override requests from @@ -2620,7 +2620,7 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only) #else /* not USE_X_TOOLKIT */ #ifdef USE_GTK -void +static void x_window (FRAME_PTR f) { if (! xg_create_frame_widgets (f)) @@ -2660,7 +2660,7 @@ x_window (FRAME_PTR f) #else /*! USE_GTK */ /* Create and set up the X window for frame F. */ -void +static void x_window (struct frame *f) { XClassHint class_hints; From 6b43790020907a8199984a44f5624f842edea754 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 16:59:17 -0800 Subject: [PATCH 113/383] * xfns.c (Fx_create_frame): Add braces to silence GCC warning. --- src/ChangeLog | 1 + src/xfns.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b88e07e8356..4d9bd6234fa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-10 Paul Eggert * xfns.c (x_decode_color, x_set_name, x_window): Now static. + (Fx_create_frame): Add braces to silence GCC warning. 2011-03-09 Paul Eggert diff --git a/src/xfns.c b/src/xfns.c index d1907567737..8ba91f9ffb8 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3448,8 +3448,9 @@ This function is an internal primitive--use `make-frame' instead. */) else if (! NILP (visibility)) x_make_frame_visible (f); else - /* Must have been Qnil. */ - ; + { + /* Must have been Qnil. */ + } } BLOCK_INPUT; From c0951e534c34cb4400bf9dcb18ae40b31a684bae Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:03:29 -0800 Subject: [PATCH 114/383] * xfns.c (Fx_file_dialog, Fx_select_font): Fix pointer signedness. --- src/ChangeLog | 1 + src/xfns.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4d9bd6234fa..3a870511bba 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * xfns.c (x_decode_color, x_set_name, x_window): Now static. (Fx_create_frame): Add braces to silence GCC warning. + (Fx_file_dialog, Fx_select_font): Fix pointer signedness. 2011-03-09 Paul Eggert diff --git a/src/xfns.c b/src/xfns.c index 8ba91f9ffb8..45e0e13dcbc 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5566,11 +5566,11 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) BLOCK_INPUT; if (STRINGP (default_filename)) - cdef_file = SDATA (default_filename); + cdef_file = SSDATA (default_filename); else - cdef_file = SDATA (dir); + cdef_file = SSDATA (dir); - fn = xg_get_file_name (f, SDATA (prompt), cdef_file, + fn = xg_get_file_name (f, SSDATA (prompt), cdef_file, ! NILP (mustmatch), ! NILP (only_dir_p)); @@ -5626,12 +5626,12 @@ If FRAME is omitted or nil, it defaults to the selected frame. */) XSETFONT (font, FRAME_FONT (f)); font_param = Ffont_get (font, intern (":name")); if (STRINGP (font_param)) - default_name = xstrdup (SDATA (font_param)); + default_name = xstrdup (SSDATA (font_param)); else { font_param = Fframe_parameter (frame, Qfont_param); if (STRINGP (font_param)) - default_name = xstrdup (SDATA (font_param)); + default_name = xstrdup (SSDATA (font_param)); } if (default_name == NULL && x_last_font_name != NULL) From 06b0c8a0ddcb60b00fcf60a3dcd8b7193bca3cc7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:06:01 -0800 Subject: [PATCH 115/383] * xfns.c: (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame): Remove unused locals. --- src/ChangeLog | 2 ++ src/xfns.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3a870511bba..51724faf9c7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * xfns.c (x_decode_color, x_set_name, x_window): Now static. (Fx_create_frame): Add braces to silence GCC warning. (Fx_file_dialog, Fx_select_font): Fix pointer signedness. + (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame): + Remove unused locals. 2011-03-09 Paul Eggert diff --git a/src/xfns.c b/src/xfns.c index 45e0e13dcbc..21453a8958a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -461,7 +461,7 @@ x_real_positions (FRAME_PTR f, int *xptr, int *yptr) Window win = f->output_data.x->parent_desc; Atom actual_type; unsigned long actual_size, bytes_remaining; - int i, rc, actual_format; + int rc, actual_format; struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); long max_len = 400; Display *dpy = FRAME_X_DISPLAY (f); @@ -746,7 +746,6 @@ xg_set_icon (FRAME_PTR f, Lisp_Object file) int xg_set_icon_from_xpm_data (FRAME_PTR f, const char **data) { - int result = 0; GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data); if (!pixbuf) @@ -4578,7 +4577,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object text) { struct frame *f; - Lisp_Object frame, tem; + Lisp_Object frame; Lisp_Object name; long window_prompting = 0; int width, height; From 7e3ab3026e9b0f783b8aacead1fad668c792e8ab Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:28:06 -0800 Subject: [PATCH 116/383] * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros, so that the caller can use some name other than gcpro1. (GCPRO1, UNGCPRO): Reimplement in terms of the new macros. (Fx_create_frame, x_create_tip_frame, Fx_show_tip): (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing. Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR macros. --- src/ChangeLog | 7 +++++++ src/lisp.h | 15 +++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 51724faf9c7..33fa9806be2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,10 +1,17 @@ 2011-03-10 Paul Eggert + * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros, + so that the caller can use some name other than gcpro1. + (GCPRO1, UNGCPRO): Reimplement in terms of the new macros. * xfns.c (x_decode_color, x_set_name, x_window): Now static. (Fx_create_frame): Add braces to silence GCC warning. (Fx_file_dialog, Fx_select_font): Fix pointer signedness. (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame): Remove unused locals. + (Fx_create_frame, x_create_tip_frame, Fx_show_tip): + (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing. + Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR + macros. 2011-03-09 Paul Eggert diff --git a/src/lisp.h b/src/lisp.h index 1e8e01cf91f..fa8cb223a6a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2150,12 +2150,15 @@ struct gcpro || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) +#define GCPRO1(varname) GCPRO1_VAR (varname, gcpro1) +#define UNGCPRO UNGCPRO_VAR (gcpro1) + #if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS /* Do something silly with gcproN vars just so gcc shuts up. */ /* You get warnings from MIPSPro... */ -#define GCPRO1(varname) ((void) gcpro1) +#define GCPRO1_VAR(varname, gcpro1) ((void) gcpro1) #define GCPRO2(varname1, varname2)(((void) gcpro2, (void) gcpro1)) #define GCPRO3(varname1, varname2, varname3) \ (((void) gcpro3, (void) gcpro2, (void) gcpro1)) @@ -2165,13 +2168,13 @@ struct gcpro (((void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1)) #define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \ (((void) gcpro6, (void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1)) -#define UNGCPRO ((void) 0) +#define UNGCPRO_VAR(gcpro1) ((void) 0) #else /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */ #ifndef DEBUG_GCPRO -#define GCPRO1(varname) \ +#define GCPRO1_VAR(varname, gcpro1) \ {gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \ gcprolist = &gcpro1; } @@ -2210,13 +2213,13 @@ struct gcpro gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \ gcprolist = &gcpro6; } -#define UNGCPRO (gcprolist = gcpro1.next) +#define UNGCPRO_VAR(gcpro1) (gcprolist = gcpro1.next) #else extern int gcpro_level; -#define GCPRO1(varname) \ +#define GCPRO1_VAR(varname, gcpro1) \ {gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \ gcpro1.level = gcpro_level++; \ gcprolist = &gcpro1; } @@ -2266,7 +2269,7 @@ extern int gcpro_level; gcpro6.level = gcpro_level++; \ gcprolist = &gcpro6; } -#define UNGCPRO \ +#define UNGCPRO_VAR(gcpro1) \ ((--gcpro_level != gcpro1.level) \ ? (abort (), 0) \ : ((gcprolist = gcpro1.next), 0)) From 811e9bacd8e24097bc65f1dfa79a5f6ac51071d9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:30:22 -0800 Subject: [PATCH 117/383] * xselect.c (x_disown_buffer_selections): Remove; not used. --- src/ChangeLog | 2 ++ src/xselect.c | 20 -------------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 33fa9806be2..5a84813fd80 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-10 Paul Eggert + * xselect.c (x_disown_buffer_selections): Remove; not used. + * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros, so that the caller can use some name other than gcpro1. (GCPRO1, UNGCPRO): Reimplement in terms of the new macros. diff --git a/src/xselect.c b/src/xselect.c index a502a74f904..9fedb7126e1 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2131,26 +2131,6 @@ Disowning it means there is no such selection. */) return Qt; } -/* Get rid of all the selections in buffer BUFFER. - This is used when we kill a buffer. */ - -void -x_disown_buffer_selections (Lisp_Object buffer) -{ - Lisp_Object tail; - struct buffer *buf = XBUFFER (buffer); - - for (tail = Vselection_alist; CONSP (tail); tail = XCDR (tail)) - { - Lisp_Object elt, value; - elt = XCAR (tail); - value = XCDR (elt); - if (CONSP (value) && MARKERP (XCAR (value)) - && XMARKER (XCAR (value))->buffer == buf) - Fx_disown_selection_internal (XCAR (elt), Qnil); - } -} - DEFUN ("x-selection-owner-p", Fx_selection_owner_p, Sx_selection_owner_p, 0, 1, 0, doc: /* Whether the current Emacs process owns the given X Selection. From 7b83e2f1ffb02ad6965a47e249b35189f15b56cf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:31:57 -0800 Subject: [PATCH 118/383] * xselect.c (TRACE3) [!defined TRACE_SELECTION]: Remove; not used. --- src/ChangeLog | 1 + src/xselect.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5a84813fd80..b25fcc36799 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-10 Paul Eggert * xselect.c (x_disown_buffer_selections): Remove; not used. + (TRACE3) [!defined TRACE_SELECTION]: Remove; not used. * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros, so that the caller can use some name other than gcpro1. diff --git a/src/xselect.c b/src/xselect.c index 9fedb7126e1..27517f8252d 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -97,7 +97,6 @@ static Lisp_Object clean_local_selection_data (Lisp_Object); #define TRACE0(fmt) (void) 0 #define TRACE1(fmt, a0) (void) 0 #define TRACE2(fmt, a0, a1) (void) 0 -#define TRACE3(fmt, a0, a1) (void) 0 #endif From aa0daa9f93d94c229512e8cb0f0dc7c48c2b3e41 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:36:58 -0800 Subject: [PATCH 119/383] * xselect.c (x_own_selection, Fx_disown_selection_internal): Rename locals to avoid shadowing. (x_handle_dnd_message): Remove local to avoid shadowing. --- src/ChangeLog | 3 +++ src/xselect.c | 13 ++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b25fcc36799..40c502a7970 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,9 @@ * xselect.c (x_disown_buffer_selections): Remove; not used. (TRACE3) [!defined TRACE_SELECTION]: Remove; not used. + (x_own_selection, Fx_disown_selection_internal): Rename locals + to avoid shadowing. + (x_handle_dnd_message): Remove local to avoid shadowing. * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros, so that the caller can use some name other than gcpro1. diff --git a/src/xselect.c b/src/xselect.c index 27517f8252d..5254fa96838 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -329,7 +329,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) struct frame *sf = SELECTED_FRAME (); Window selecting_window; Display *display; - Time time = last_event_timestamp; + Time timestamp = last_event_timestamp; Atom selection_atom; struct x_display_info *dpyinfo; @@ -345,7 +345,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) BLOCK_INPUT; x_catch_errors (display); - XSetSelectionOwner (display, selection_atom, selecting_window, time); + XSetSelectionOwner (display, selection_atom, selecting_window, timestamp); x_check_errors (display, "Can't set selection: %s"); x_uncatch_errors (); UNBLOCK_INPUT; @@ -356,7 +356,7 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value) Lisp_Object selection_data; Lisp_Object prev_value; - selection_time = long_to_cons ((unsigned long) time); + selection_time = long_to_cons ((unsigned long) timestamp); selection_data = list4 (selection_name, selection_value, selection_time, selected_frame); prev_value = assq_no_quit (selection_name, Vselection_alist); @@ -2084,7 +2084,7 @@ DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal, Sx_disown_selection_internal, 1, 2, 0, doc: /* If we own the selection SELECTION, disown it. Disowning it means there is no such selection. */) - (Lisp_Object selection, Lisp_Object time) + (Lisp_Object selection, Lisp_Object time_object) { Time timestamp; Atom selection_atom; @@ -2103,10 +2103,10 @@ Disowning it means there is no such selection. */) display = FRAME_X_DISPLAY (sf); dpyinfo = FRAME_X_DISPLAY_INFO (sf); CHECK_SYMBOL (selection); - if (NILP (time)) + if (NILP (time_object)) timestamp = last_event_timestamp; else - timestamp = cons_to_long (time); + timestamp = cons_to_long (time_object); if (NILP (assq_no_quit (selection, Vselection_alist))) return Qnil; /* Don't disown the selection when we're not the owner. */ @@ -2434,7 +2434,6 @@ x_handle_dnd_message (struct frame *f, XClientMessageEvent *event, struct x_disp if (event->format == 32 && event->format < BITS_PER_LONG) { - int i; for (i = 0; i < 5; ++i) /* There are only 5 longs in a ClientMessage. */ idata[i] = (int) event->data.l[i]; data = (unsigned char *) idata; From b47160217819ef2408f1115d7f812c16d06dcbcb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:40:21 -0800 Subject: [PATCH 120/383] * xrdb.c: Include "xterm.h", to check x_load_resources's interface. --- src/ChangeLog | 2 ++ src/xrdb.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 40c502a7970..e3eb8fe02a0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-10 Paul Eggert + * xrdb.c: Include "xterm.h", to check x_load_resources's interface. + * xselect.c (x_disown_buffer_selections): Remove; not used. (TRACE3) [!defined TRACE_SELECTION]: Remove; not used. (x_own_selection, Fx_disown_selection_internal): Rename locals diff --git a/src/xrdb.c b/src/xrdb.c index 9fb3f3474fb..63e5851979c 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -28,6 +28,12 @@ along with GNU Emacs. If not, see . */ #include #include +#include "lisp.h" + +/* This may include sys/types.h, and that somehow loses + if this is not done before the other system files. */ +#include "xterm.h" + #include #include #include @@ -38,8 +44,6 @@ along with GNU Emacs. If not, see . */ #endif #include -#include "lisp.h" - #ifdef USE_MOTIF /* For Vdouble_click_time. */ #include "keyboard.h" From a5c0af8162783a5db690752861fdd7430fde351a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:41:18 -0800 Subject: [PATCH 121/383] * fontset.c (free_realized_fontset): Now static. --- src/ChangeLog | 2 ++ src/fontset.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index e3eb8fe02a0..0b7f7e798a5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-10 Paul Eggert + * fontset.c (free_realized_fontset): Now static. + * xrdb.c: Include "xterm.h", to check x_load_resources's interface. * xselect.c (x_disown_buffer_selections): Remove; not used. diff --git a/src/fontset.c b/src/fontset.c index f297fd10a71..345d991d05d 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -836,7 +836,7 @@ fontset_ascii (int id) return elt; } -void +static void free_realized_fontset (FRAME_PTR f, Lisp_Object fontset) { Lisp_Object tail; From 7519b8cd68973132dba3fa8dd4ecde8daa8cff71 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:43:19 -0800 Subject: [PATCH 122/383] * fontset.c (Fset_fontset_font): Rename local to avoid shadowing. --- src/ChangeLog | 1 + src/fontset.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0b7f7e798a5..5dda0430849 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-10 Paul Eggert * fontset.c (free_realized_fontset): Now static. + (Fset_fontset_font): Rename local to avoid shadowing. * xrdb.c: Include "xterm.h", to check x_load_resources's interface. diff --git a/src/fontset.c b/src/fontset.c index 345d991d05d..d732820c28a 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1583,14 +1583,14 @@ appended. By default, FONT-SPEC overrides the previous settings. */) if (ascii_changed) { - Lisp_Object tail, frame, alist; + Lisp_Object tail, fr, alist; int fontset_id = XINT (FONTSET_ID (fontset)); FONTSET_ASCII (fontset) = fontname; name = FONTSET_NAME (fontset); - FOR_EACH_FRAME (tail, frame) + FOR_EACH_FRAME (tail, fr) { - FRAME_PTR f = XFRAME (frame); + FRAME_PTR f = XFRAME (fr); Lisp_Object font_object; struct face *face; @@ -1607,7 +1607,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */) { update_auto_fontset_alist (font_object, fontset); alist = Fcons (Fcons (Qfont, Fcons (name, font_object)), Qnil); - Fmodify_frame_parameters (frame, alist); + Fmodify_frame_parameters (fr, alist); } } } From cc6e5db1ae708b81f02945f6c6dbe11e92fa1d46 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:44:38 -0800 Subject: [PATCH 123/383] * fontset.c (fontset_font): Mark local as initialized. --- src/ChangeLog | 1 + src/fontset.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5dda0430849..7d4d5e00df1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * fontset.c (free_realized_fontset): Now static. (Fset_fontset_font): Rename local to avoid shadowing. + (fontset_font): Mark local as initialized. * xrdb.c: Include "xterm.h", to check x_load_resources's interface. diff --git a/src/fontset.c b/src/fontset.c index d732820c28a..3c156691b1b 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -713,7 +713,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fa static Lisp_Object fontset_font (Lisp_Object fontset, int c, struct face *face, int id) { - Lisp_Object rfont_def, default_rfont_def; + Lisp_Object rfont_def, default_rfont_def IF_LINT (= Qnil); Lisp_Object base_fontset; /* Try a font-group of FONTSET. */ From a9a06e0b10b7583e73ffebd7111937516264c4d5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:48:47 -0800 Subject: [PATCH 124/383] * fontset.c (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused. --- src/ChangeLog | 1 + src/fontset.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7d4d5e00df1..094343b2d56 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * fontset.c (free_realized_fontset): Now static. (Fset_fontset_font): Rename local to avoid shadowing. (fontset_font): Mark local as initialized. + (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused. * xrdb.c: Include "xterm.h", to check x_load_resources's interface. diff --git a/src/fontset.c b/src/fontset.c index 3c156691b1b..b5d8a0db434 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -233,14 +233,14 @@ fontset_id_valid_p (int id) /* Macros to access special values of (base) FONTSET. */ #define FONTSET_NAME(fontset) XCHAR_TABLE (fontset)->extras[1] #define FONTSET_ASCII(fontset) XCHAR_TABLE (fontset)->extras[4] -#define FONTSET_SPEC(fontset) XCHAR_TABLE (fontset)->extras[5] +/* #define FONTSET_SPEC(fontset) XCHAR_TABLE (fontset)->extras[5] */ /* Macros to access special values of (realized) FONTSET. */ #define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2] #define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3] #define FONTSET_OBJLIST(fontset) XCHAR_TABLE (fontset)->extras[4] #define FONTSET_NOFONT_FACE(fontset) XCHAR_TABLE (fontset)->extras[5] -#define FONTSET_REPERTORY(fontset) XCHAR_TABLE (fontset)->extras[6] +/* #define FONTSET_REPERTORY(fontset) XCHAR_TABLE (fontset)->extras[6] */ #define FONTSET_DEFAULT(fontset) XCHAR_TABLE (fontset)->extras[7] /* For both base and realized fontset. */ @@ -266,7 +266,6 @@ fontset_id_valid_p (int id) ASET ((rfont_def), 0, make_number (face_id)) #define RFONT_DEF_FONT_DEF(rfont_def) AREF (rfont_def, 1) #define RFONT_DEF_SPEC(rfont_def) FONT_DEF_SPEC (AREF (rfont_def, 1)) -#define RFONT_DEF_REPERTORY(rfont_def) FONT_DEF_REPERTORY (AREF (rfont_def, 1)) #define RFONT_DEF_OBJECT(rfont_def) AREF (rfont_def, 2) #define RFONT_DEF_SET_OBJECT(rfont_def, object) \ ASET ((rfont_def), 2, (object)) From 58d2d479084c072255e11fbb3f03afaaa3fcdfa2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 17:58:37 -0800 Subject: [PATCH 125/383] * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip): (Fx_backspace_delete_keys_p): Use them to avoid shadowing, and rename vars to avoid shadowing. (x_decode_color, x_set_name, x_window): Now static. --- src/ChangeLog | 5 ++++- src/xfns.c | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 094343b2d56..719984f5038 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -16,7 +16,10 @@ * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros, so that the caller can use some name other than gcpro1. (GCPRO1, UNGCPRO): Reimplement in terms of the new macros. - * xfns.c (x_decode_color, x_set_name, x_window): Now static. + * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip): + (Fx_backspace_delete_keys_p): + Use them to avoid shadowing, and rename vars to avoid shadowing. + (x_decode_color, x_set_name, x_window): Now static. (Fx_create_frame): Add braces to silence GCC warning. (Fx_file_dialog, Fx_select_font): Fix pointer signedness. (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame): diff --git a/src/xfns.c b/src/xfns.c index 21453a8958a..3f0bd2a7d6a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3183,7 +3183,7 @@ This function is an internal primitive--use `make-frame' instead. */) to get the color reference counts right, so initialize them! */ { Lisp_Object black; - struct gcpro gcpro1; + struct gcpro inner_gcpro1; /* Function x_decode_color can signal an error. Make sure to initialize color slots so that we won't try @@ -3196,7 +3196,7 @@ This function is an internal primitive--use `make-frame' instead. */) f->output_data.x->mouse_pixel = -1; black = build_string ("black"); - GCPRO1 (black); + GCPRO1_VAR (black, inner_gcpro1); FRAME_FOREGROUND_PIXEL (f) = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); FRAME_BACKGROUND_PIXEL (f) @@ -3209,7 +3209,7 @@ This function is an internal primitive--use `make-frame' instead. */) = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); f->output_data.x->mouse_pixel = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); - UNGCPRO; + UNGCPRO_VAR (inner_gcpro1); } /* Specify the parent under which to make this X window. */ @@ -4651,7 +4651,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, to get the color reference counts right, so initialize them! */ { Lisp_Object black; - struct gcpro gcpro1; + struct gcpro inner_gcpro1; /* Function x_decode_color can signal an error. Make sure to initialize color slots so that we won't try @@ -4664,7 +4664,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, f->output_data.x->mouse_pixel = -1; black = build_string ("black"); - GCPRO1 (black); + GCPRO1_VAR (black, inner_gcpro1); FRAME_FOREGROUND_PIXEL (f) = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); FRAME_BACKGROUND_PIXEL (f) @@ -4677,7 +4677,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); f->output_data.x->mouse_pixel = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); - UNGCPRO; + UNGCPRO_VAR (inner_gcpro1); } /* Set the name; the functions to which we pass f expect the name to @@ -5035,7 +5035,7 @@ Text larger than the specified size is clipped. */) && !NILP (Fequal (last_string, string)) && !NILP (Fequal (last_parms, parms))) { - struct frame *f = XFRAME (tip_frame); + struct frame *tip_f = XFRAME (tip_frame); /* Only DX and DY have changed. */ if (!NILP (tip_timer)) @@ -5046,9 +5046,9 @@ Text larger than the specified size is clipped. */) } BLOCK_INPUT; - compute_tip_xy (f, parms, dx, dy, FRAME_PIXEL_WIDTH (f), - FRAME_PIXEL_HEIGHT (f), &root_x, &root_y); - XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), + compute_tip_xy (tip_f, parms, dx, dy, FRAME_PIXEL_WIDTH (tip_f), + FRAME_PIXEL_HEIGHT (tip_f), &root_x, &root_y); + XMoveWindow (FRAME_X_DISPLAY (tip_f), FRAME_X_WINDOW (tip_f), root_x, root_y); UNBLOCK_INPUT; goto start_timer; @@ -5694,7 +5694,7 @@ present and mapped to the usual X keysyms. */) struct frame *f = check_x_frame (frame); Display *dpy = FRAME_X_DISPLAY (f); Lisp_Object have_keys; - int major, minor, op, event, error; + int major, minor, op, event, error_code; BLOCK_INPUT; @@ -5710,7 +5710,7 @@ present and mapped to the usual X keysyms. */) /* Check that the server supports XKB. */ major = XkbMajorVersion; minor = XkbMinorVersion; - if (!XkbQueryExtension (dpy, &op, &event, &error, &major, &minor)) + if (!XkbQueryExtension (dpy, &op, &event, &error_code, &major, &minor)) { UNBLOCK_INPUT; return Qlambda; From 524c7aa6108b4178ca8436db8022686d180a5ca5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 18:01:53 -0800 Subject: [PATCH 126/383] * alloc.c (mark_fringe_data): Move decl from here ... * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here, to check its interface. (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM. --- src/ChangeLog | 5 +++++ src/alloc.c | 4 ---- src/lisp.h | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 719984f5038..55e003142d4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-03-10 Paul Eggert + * alloc.c (mark_fringe_data): Move decl from here ... + * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here, + to check its interface. + (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM. + * fontset.c (free_realized_fontset): Now static. (Fset_fontset_font): Rename local to avoid shadowing. (fontset_font): Mark local as initialized. diff --git a/src/alloc.c b/src/alloc.c index 8632897606a..6c92f36ca7d 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -276,10 +276,6 @@ static void gc_sweep (void); static void mark_glyph_matrix (struct glyph_matrix *); static void mark_face_cache (struct face_cache *); -#ifdef HAVE_WINDOW_SYSTEM -extern void mark_fringe_data (void); -#endif /* HAVE_WINDOW_SYSTEM */ - static struct Lisp_String *allocate_string (void); static void compact_small_strings (void); static void free_large_strings (void); diff --git a/src/lisp.h b/src/lisp.h index fa8cb223a6a..113585320af 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2540,7 +2540,10 @@ extern Lisp_Object fmod_float (Lisp_Object x, Lisp_Object y); /* Defined in fringe.c */ extern void syms_of_fringe (void); extern void init_fringe (void); +#ifdef HAVE_WINDOW_SYSTEM +extern void mark_fringe_data (void); extern void init_fringe_once (void); +#endif /* HAVE_WINDOW_SYSTEM */ /* Defined in image.c */ extern Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data; From bf60f6168239d399ac5522025e7dd1bcf18afe24 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 9 Mar 2011 18:02:40 -0800 Subject: [PATCH 127/383] * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap): Now static. --- src/ChangeLog | 2 ++ src/fringe.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 55e003142d4..b6ab1e18dcc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-10 Paul Eggert + * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap): Now static. + * alloc.c (mark_fringe_data): Move decl from here ... * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here, to check its interface. diff --git a/src/fringe.c b/src/fringe.c index d42d6467f31..84606a2c767 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -1380,7 +1380,7 @@ compute_fringe_widths (struct frame *f, int redraw) /* Free resources used by a user-defined bitmap. */ -void +static void destroy_fringe_bitmap (int n) { struct fringe_bitmap **fbp; @@ -1448,7 +1448,7 @@ static const unsigned char swap_nibble[16] = { 0x3, 0xb, 0x7, 0xf}; /* 0011 1011 0111 1111 */ #endif /* HAVE_X_WINDOWS */ -void +static void init_fringe_bitmap (int which, struct fringe_bitmap *fb, int once_p) { if (once_p || fb->dynamic) @@ -1831,4 +1831,3 @@ w32_reset_fringes (void) #endif /* HAVE_NTGUI */ #endif /* HAVE_WINDOW_SYSTEM */ - From ec6ecaed88d6b6fbc966acf14b4fdd2f3ee37227 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 9 Mar 2011 21:14:55 -0500 Subject: [PATCH 128/383] Inhibit mouse-avoidance if cursor-type is nil (Bug#8209). * lisp/avoid.el (mouse-avoidance-ignore-p): Do not move the cursor if `cursor-type' is nil. --- lisp/ChangeLog | 5 +++++ lisp/avoid.el | 1 + 2 files changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 351f7f1f58d..3ad3c7f151a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-10 Julien Danjou + + * avoid.el (mouse-avoidance-ignore-p): Do not move the cursor if + `cursor-type' is nil. + 2011-03-09 Jay Belanger * calc/calc.el (calc-mode-map): Don't bind "C-_" to `calc-missing-key'. diff --git a/lisp/avoid.el b/lisp/avoid.el index fe47a0c4a33..c864d48e9ce 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -278,6 +278,7 @@ redefine this function to suit your own tastes." (defun mouse-avoidance-ignore-p () (let ((mp (mouse-position))) (or (not (frame-pointer-visible-p)) ; The pointer is hidden + (not cursor-type) ; There's no cursor executing-kbd-macro ; don't check inside macro (null (cadr mp)) ; don't move unless in an Emacs frame (not (eq (car mp) (selected-frame))) From ccb55d277abd81b09891917b8e4cfc7a69c5a6af Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 9 Mar 2011 19:41:17 -0800 Subject: [PATCH 129/383] * lisp/mail/rmail.el (rmail-msgend, rmail-msgbeg): Doc fixes. --- lisp/ChangeLog | 4 ++++ lisp/mail/rmail.el | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3ad3c7f151a..63e132e9550 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-10 Glenn Morris + + * mail/rmail.el (rmail-msgend, rmail-msgbeg): Doc fixes. + 2011-03-10 Julien Danjou * avoid.el (mouse-avoidance-ignore-p): Do not move the cursor if diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 9a892f493d7..200aadda651 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2306,11 +2306,11 @@ change; nil means current message." ;;;; *** Rmail Message Selection And Support *** (defun rmail-msgend (n) - "Return the start position for message number N." + "Return the end position for message number N." (marker-position (aref rmail-message-vector (1+ n)))) (defun rmail-msgbeg (n) - "Return the end position for message number N." + "Return the start position for message number N." (marker-position (aref rmail-message-vector n))) (defun rmail-apply-in-message (msgnum function &rest args) From 5772caab78b85b6ae1215fbc5d63cbb4571bcf28 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 9 Mar 2011 19:44:33 -0800 Subject: [PATCH 130/383] cus-edit tweak for bug#2298. * lisp/cus-edit.el (Custom-newline): If no button at point, look for a subgroup button at start-of-line. --- lisp/ChangeLog | 3 +++ lisp/cus-edit.el | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 63e132e9550..bd8bf932799 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-10 Glenn Morris + * cus-edit.el (Custom-newline): If no button at point, look + for a subgroup button at start-of-line. (Bug#2298) + * mail/rmail.el (rmail-msgend, rmail-msgbeg): Doc fixes. 2011-03-10 Julien Danjou diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 88821652784..203043ebd97 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4756,6 +4756,12 @@ The format is suitable for use with `easy-menu-define'." "Invoke button at POS, or refuse to allow editing of Custom buffer." (interactive "@d") (let ((button (get-char-property pos 'button))) + ;; If there is no button at point, then use the one at the start + ;; of the line, if it is a custom-group-link (bug#2298). + (or button + (if (setq button (get-char-property (line-beginning-position) 'button)) + (or (eq (widget-type button) 'custom-group-link) + (setq button nil)))) (if button (widget-apply-action button event) (error "You can't edit this part of the Custom buffer")))) From 62d94509e2c148bf5ebc62e9c83b89b9f0d9df7a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 10 Mar 2011 00:48:33 -0500 Subject: [PATCH 131/383] Fix non-ASCII characters in User and ELisp manuals. doc/lispref/modes.texi (Operator Precedence Grammars): Don't use characters outside ISO-8859-1. doc/emacs/search.texi (Regexp Example): doc/emacs/mule.texi (International Chars): doc/emacs/building.texi (External Lisp): Don't use characters outside ISO-8859-1. --- doc/emacs/ChangeLog | 7 +++++++ doc/emacs/building.texi | 2 +- doc/emacs/mule.texi | 2 +- doc/emacs/search.texi | 8 ++++---- doc/lispref/ChangeLog | 5 +++++ doc/lispref/modes.texi | 2 +- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 4bdd1448add..a53aa095cc2 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,10 @@ +2011-03-10 Eli Zaretskii + + * search.texi (Regexp Example): + * mule.texi (International Chars): + * building.texi (External Lisp): Don't use characters outside + ISO-8859-1. + 2011-03-09 Eli Zaretskii * ack.texi (Acknowledgments): Convert to ISO-8859-1 encoding. Use diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 1a02e92b67f..a07e7582011 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -1056,7 +1056,7 @@ Show file information or library names in threads buffer. Show addresses for thread frames in threads buffer. @end table - It’s possible to observe information for several threads + It's possible to observe information for several threads simultaneously (in addition to buffers which show information for currently selected thread) using the following keys from the threads buffer. diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 22c155d26de..e12ec707063 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -237,7 +237,7 @@ preferred charset: unicode (Unicode (ISO10646)) Character code properties: customize what to show name: LATIN CAPITAL LETTER A WITH GRAVE general-category: Lu (Letter, Uppercase) - decomposition: (65 768) ('A' 'Ì€') + decomposition: (65 768) ('A' '`') old-name: LATIN CAPITAL LETTER A GRAVE There are text properties here: diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 9fdccc3218d..b5d426210aa 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -917,13 +917,13 @@ setting of the syntax table (@pxref{Syntax}). @node Regexp Example @section Regular Expression Example - Here is an example of a regexp---the regexp that Emacs uses, by -default, to recognize the end of a sentence, not including the -following space (i.e., the variable @code{sentence-end-base}): + Here is an example of a regexp---similar to the regexp that Emacs +uses, by default, to recognize the end of a sentence, not including +the following space (i.e., the variable @code{sentence-end-base}): @example @verbatim -[.?!][]\"'â€â€)}]* +[.?!][]\"')}]* @end verbatim @end example diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index fb99bee7aee..a0498bf46c2 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2011-03-10 Eli Zaretskii + + * modes.texi (Operator Precedence Grammars): Don't use characters + outside ISO-8859-1. + 2011-03-09 Eli Zaretskii * intro.texi (Acknowledgements): Convert to ISO-8859-1 encoding. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index f238f38462f..f0a8985fa75 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -3403,7 +3403,7 @@ Such pairs of precedences are sufficient to express left-associativity or right-associativity of infix operators, nesting of tokens like parentheses and many other cases. -@c ¡Let's leave this undocumented to leave it more open for change! +@c Let's leave this undocumented to leave it more open for change! @c @defvar smie-grammar @c The value of this variable is an alist specifying the left and right @c precedence of each token. It is meant to be initialized by using one of From b2f603cc420af9f07bc9ce27b96256255009c506 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 9 Mar 2011 23:16:04 -0800 Subject: [PATCH 132/383] * lisp/eshell/esh-util.el (eshell-condition-case): Doc fix. --- lisp/ChangeLog | 2 ++ lisp/eshell/esh-util.el | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bd8bf932799..0499954465a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2011-03-10 Glenn Morris + * eshell/esh-util.el (eshell-condition-case): Doc fix. + * cus-edit.el (Custom-newline): If no button at point, look for a subgroup button at start-of-line. (Bug#2298) diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index dbe4f824deb..424d246a2b6 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -138,7 +138,8 @@ function `string-to-number'." (memq system-type '(ms-dos windows-nt))) (defmacro eshell-condition-case (tag form &rest handlers) - "Like `condition-case', but only if `eshell-pass-through-errors' is nil." + "If `eshell-handle-errors' is non-nil, this is `condition-case'. +Otherwise, evaluates FORM with no error handling." (if eshell-handle-errors `(condition-case ,tag ,form From 02da65ff3a35a36e86419a3494286a1eba233e89 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 10 Mar 2011 00:26:41 -0800 Subject: [PATCH 133/383] Add `vc-git-program' option; suggested on emacs-devel. * lisp/vc/vc-git.el (vc-git-program): New option. (vc-git-branches, vc-git-pull, vc-git-merge-branch, vc-git-command) (vc-git--call): Use it. --- lisp/ChangeLog | 4 ++++ lisp/vc/vc-git.el | 22 +++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0499954465a..c8890a926be 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2011-03-10 Glenn Morris + * vc/vc-git.el (vc-git-program): New option. + (vc-git-branches, vc-git-pull, vc-git-merge-branch, vc-git-command) + (vc-git--call): Use it. + * eshell/esh-util.el (eshell-condition-case): Doc fix. * cus-edit.el (Custom-newline): If no button at point, look diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 3b4d0e5f421..711a573ba99 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -119,6 +119,12 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." :version "23.1" :group 'vc) +(defcustom vc-git-program "git" + "Name of the Git executable (excluding any arguments)." + :version "24.1" + :type 'string + :group 'vc) + (defcustom vc-git-root-log-format '("%d%h..: %an %ad %s" ;; The first shy group matches the characters drawn by --graph. @@ -554,7 +560,7 @@ or an empty string if none." "Return the existing branches, as a list of strings. The car of the list is the current branch." (with-temp-buffer - (call-process "git" nil t nil "branch") + (call-process vc-git-program nil t nil "branch") (goto-char (point-min)) (let (current-branch branches) (while (not (eobp)) @@ -633,13 +639,13 @@ for the Git command to run." (let* ((root (vc-git-root default-directory)) (buffer (format "*vc-git : %s*" (expand-file-name root))) (command "pull") - (git-program "git") + (git-program vc-git-program) args) ;; If necessary, prompt for the exact command. (when prompt (setq args (split-string (read-shell-command "Git pull command: " - "git pull" + (format "%s pull" git-program) 'vc-git-history) " " t)) (setq git-program (car args) @@ -663,7 +669,7 @@ This prompts for a branch to merge from." branches (cons "FETCH_HEAD" branches)) nil t))) - (apply 'vc-do-async-command buffer root "git" "merge" + (apply 'vc-do-async-command buffer root vc-git-program "merge" (list merge-source)) (vc-set-async-update buffer))) @@ -1083,8 +1089,10 @@ This command shares argument histories with \\[rgrep] and \\[grep]." (defun vc-git-command (buffer okstatus file-or-list &rest flags) "A wrapper around `vc-do-command' for use in vc-git.el. -The difference to vc-do-command is that this function always invokes `git'." - (apply 'vc-do-command (or buffer "*vc*") okstatus "git" file-or-list flags)) +The difference to vc-do-command is that this function always invokes +`vc-git-program'." + (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program + file-or-list flags)) (defun vc-git--empty-db-p () "Check if the git db is empty (no commit done yet)." @@ -1095,7 +1103,7 @@ The difference to vc-do-command is that this function always invokes `git'." ;; We don't need to care the arguments. If there is a file name, it ;; is always a relative one. This works also for remote ;; directories. - (apply 'process-file "git" nil buffer nil command args)) + (apply 'process-file vc-git-program nil buffer nil command args)) (defun vc-git--out-ok (command &rest args) (zerop (apply 'vc-git--call '(t nil) command args))) From 5ceaac0c61ab70280a67588eeb8536fcddc3f9be Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 10 Mar 2011 00:32:27 -0800 Subject: [PATCH 134/383] * lisp/vc/vc-hg.el (vc-hg-pull, vc-hg-merge-branch): Use vc-hg-program. --- lisp/ChangeLog | 2 ++ lisp/vc/vc-hg.el | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c8890a926be..da61e7025ad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2011-03-10 Glenn Morris + * vc/vc-hg.el (vc-hg-pull, vc-hg-merge-branch): Use vc-hg-program. + * vc/vc-git.el (vc-git-program): New option. (vc-git-branches, vc-git-pull, vc-git-merge-branch, vc-git-command) (vc-git--call): Use it. diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index d283c39362a..4ac7ef15fc7 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -663,14 +663,15 @@ then attempts to update the working directory." (let* ((root (vc-hg-root default-directory)) (buffer (format "*vc-hg : %s*" (expand-file-name root))) (command "pull") - (hg-program "hg") + (hg-program vc-hg-program) ;; Fixme: before updating the working copy to the latest ;; state, should check if it's visiting an old revision. (args '("-u"))) ;; If necessary, prompt for the exact command. (when prompt (setq args (split-string - (read-shell-command "Run Hg (like this): " "hg pull -u" + (read-shell-command "Run Hg (like this): " + (format "%s pull -u" hg-program) 'vc-hg-history) " " t)) (setq hg-program (car args) @@ -685,7 +686,7 @@ then attempts to update the working directory." This runs the command \"hg merge\"." (let* ((root (vc-hg-root default-directory)) (buffer (format "*vc-hg : %s*" (expand-file-name root)))) - (apply 'vc-do-async-command buffer root "hg" '("merge")) + (apply 'vc-do-async-command buffer root vc-hg-program '("merge")) (vc-set-async-update buffer))) ;;; Internal functions From f346fd6b406b8c2db3f747a23b49ba1221c2aeaf Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 10 Mar 2011 12:28:33 +0100 Subject: [PATCH 135/383] * simple.el (delete-trailing-whitespace): Return nil for the benefit of `write-file-functions'. --- lisp/ChangeLog | 5 +++++ lisp/simple.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index da61e7025ad..760224f601c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-10 Michael Albinus + + * simple.el (delete-trailing-whitespace): Return nil for the + benefit of `write-file-functions'. + 2011-03-10 Glenn Morris * vc/vc-hg.el (vc-hg-pull, vc-hg-merge-branch): Use vc-hg-program. diff --git a/lisp/simple.el b/lisp/simple.el index 653501625b5..7391ff82585 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -637,7 +637,9 @@ If the region is active, only delete whitespace within the region." (if (looking-at ".*\f") (goto-char (match-end 0)))) (delete-region (point) (match-end 0))) - (set-marker end-marker nil))))) + (set-marker end-marker nil)))) + ;; Return nil for the benefit of `write-file-functions'. + nil) (defun newline-and-indent () "Insert a newline, then indent according to major mode. From f3b54b0e1e770038e9842479d88916d95f7bfa51 Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Thu, 10 Mar 2011 13:32:49 +0000 Subject: [PATCH 136/383] auth-source.el (auth-source-read-char-choice): Remove `dropdown-list'. (auth-source-pick-first-password): New convenience function. --- lisp/gnus/ChangeLog | 3 ++- lisp/gnus/auth-source.el | 53 +++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index aa1f013dd35..dbd52c5fece 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -4,8 +4,9 @@ character choice using `dropdown-list', `read-char-choice', or `read-char'. It appends "[a/b/c] " to the prompt if the choices were '(?a ?b ?c). The `dropdown-list' support is disabled for now. Use - `eval-when-compile' to load `dropdown-list'. + `eval-when-compile' to load `dropdown-list'. Remove `dropdown-list'. (auth-source-netrc-saver): Use it. + (auth-source-pick-first-password): New convenience function. 2011-03-08 Teodor Zlatanov diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 108871974a0..b7e0c97ce50 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -44,18 +44,7 @@ (require 'gnus-util) (require 'assoc) (eval-when-compile (require 'cl)) -(eval-when-compile (require 'dropdown-list nil t)) -(eval-and-compile - (or (ignore-errors (require 'eieio)) - ;; gnus-fallback-lib/ from gnus/lisp/gnus-fallback-lib - (ignore-errors - (let ((load-path (cons (expand-file-name - "gnus-fallback-lib/eieio" - (file-name-directory (locate-library "gnus"))) - load-path))) - (require 'eieio))) - (error - "eieio not found in `load-path' or gnus-fallback-lib/ directory."))) +(require 'eieio) (autoload 'secrets-create-item "secrets") (autoload 'secrets-delete-item "secrets") @@ -313,12 +302,6 @@ with \"[a/b/c] \" if CHOICES is '\(?a ?b ?c\)." (while (not (memq k choices)) (setq k (cond - ((and nil (featurep 'dropdown-list)) - (let* ((blank (fill (copy-sequence prompt) ?.)) - (dlc (cons (format "%s %c" prompt (car choices)) - (loop for c in (cdr choices) - collect (format "%s %c" blank c))))) - (nth (dropdown-list dlc) choices))) ((fboundp 'read-char-choice) (read-char-choice full-prompt choices)) (t (message "%s" full-prompt) @@ -769,7 +752,26 @@ while \(:host t) would find all host entries." (return 'no))) 'no)))) -;;; Backend specific parsing: netrc/authinfo backend +;;; (auth-source-pick-first-password :host "z.lifelogs.com") +;;; (auth-source-pick-first-password :port "imap") +(defun auth-source-pick-first-password (&rest spec) + "Pick the first secret found from applying SPEC to `auth-source-search'." + (let* ((result (nth 0 (apply 'auth-source-search (plist-put spec :max 1)))) + (secret (plist-get result :secret))) + + (if (functionp secret) + (funcall secret) + secret))) + +;; (auth-source-format-prompt "test %u %h %p" '((?u "user") (?h "host"))) +(defun auth-source-format-prompt (prompt alist) + "Format PROMPT using %x (for any character x) specifiers in ALIST." + (dolist (cell alist) + (let ((c (nth 0 cell)) + (v (nth 1 cell))) + (when (and c v) + (setq prompt (replace-regexp-in-string (format "%%%c" c) v prompt))))) + prompt) (defun auth-source-ensure-strings (values) (unless (listp values) @@ -780,6 +782,8 @@ while \(:host t) would find all host entries." value)) values)) +;;; Backend specific parsing: netrc/authinfo backend + (defvar auth-source-netrc-cache nil) ;;; (auth-source-netrc-parse "~/.authinfo.gpg") @@ -998,17 +1002,6 @@ See `auth-source-search' for details on SPEC." (nth 0 v) v)) -;; (auth-source-format-prompt "test %u %h %p" '((?u "user") (?h "host"))) - -(defun auth-source-format-prompt (prompt alist) - "Format PROMPT using %x (for any character x) specifiers in ALIST." - (dolist (cell alist) - (let ((c (nth 0 cell)) - (v (nth 1 cell))) - (when (and c v) - (setq prompt (replace-regexp-in-string (format "%%%c" c) v prompt))))) - prompt) - ;;; (auth-source-search :host "nonesuch" :type 'netrc :max 1 :create t) ;;; (auth-source-search :host "nonesuch" :type 'netrc :max 1 :create t :create-extra-keys '((A "default A") (B))) From 500188f4835ff80e19e7b3207160f37f5807aa52 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 Mar 2011 13:46:21 -0800 Subject: [PATCH 137/383] * fringe.c (update_window_fringes): Initialize top_row_ends_at_zv_p and bot_row_ends_at_zv_p, with a FIXME comment. --- src/ChangeLog | 2 ++ src/fringe.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index b6ab1e18dcc..a1c4b0fd967 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,8 @@ 2011-03-10 Paul Eggert * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap): Now static. + (update_window_fringes): Initialize top_row_ends_at_zv_p and + bot_row_ends_at_zv_p, with a FIXME comment. * alloc.c (mark_fringe_data): Move decl from here ... * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here, diff --git a/src/fringe.c b/src/fringe.c index 84606a2c767..a980bdf146f 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -913,7 +913,10 @@ update_window_fringes (struct window *w, int keep_current_p) int bitmap_cache[MAX_BITMAP_CACHE]; int top_ind_rn, bot_ind_rn; int top_ind_min_y, bot_ind_max_y; - int top_row_ends_at_zv_p, bot_row_ends_at_zv_p; + + /* FIXME: Do these need to be initialized? If not, please change + their "= 0"s to "IF_LINT (= 0)"s. Either way, please explain. */ + int top_row_ends_at_zv_p = 0, bot_row_ends_at_zv_p = 0; if (w->pseudo_window_p) return 0; From ffbf300e1e88333532721940f8416b54e47ac0e7 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 10 Mar 2011 16:51:26 -0500 Subject: [PATCH 138/383] Fix package-strip-rcs-id to be more robust. See http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00396.html * lisp/emacs-lisp/package.el (package-strip-rcs-id): Accept any version string that does not signal an error in version-to-list. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/package.el | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 760224f601c..0fbdd9dff76 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-10 Chong Yidong + + * emacs-lisp/package.el (package-strip-rcs-id): Accept any version + string that does not signal an error in version-to-list. + 2011-03-10 Michael Albinus * simple.el (delete-trailing-whitespace): Return nil for the diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index d90164b5a95..29089400cef 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -848,15 +848,17 @@ The package is found on one of the archives in `package-archives'." ;; Try to activate it. (package-initialize)) -(defun package-strip-rcs-id (v-str) - "Strip RCS version ID from the version string. +(defun package-strip-rcs-id (str) + "Strip RCS version ID from the version string STR. If the result looks like a dotted numeric version, return it. Otherwise return nil." - (if v-str - (if (string-match "^[ \t]*[$]Revision:[ \t]\([0-9.]+\)[ \t]*[$]$" v-str) - (match-string 1 v-str) - (if (string-match "^[0-9.]*$" v-str) - v-str)))) + (when str + (when (string-match "\\`[ \t]*[$]Revision:[ \t]+" str) + (setq str (substring str (match-end 0)))) + (condition-case nil + (if (version-to-list str) + str) + (error nil)))) (defun package-buffer-info () "Return a vector describing the package in the current buffer. From ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 10 Mar 2011 18:40:46 -0500 Subject: [PATCH 139/383] Fix package.el handling of version numbers like 1.0pre6. * lisp/emacs-lisp/package.el (package-version-join): Impose a standard string representation for pre/alpha/beta version lists. (package-unpack-single): Standardize the directory name by passing it through package-version-join. --- lisp/ChangeLog | 8 ++++++-- lisp/emacs-lisp/package.el | 37 ++++++++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0fbdd9dff76..c794ddb0788 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,11 @@ 2011-03-10 Chong Yidong - * emacs-lisp/package.el (package-strip-rcs-id): Accept any version - string that does not signal an error in version-to-list. + * emacs-lisp/package.el (package-version-join): Impose a standard + string representation for pre/alpha/beta version lists. + (package-unpack-single): Standardize the directory name by passing + it through package-version-join. + (package-strip-rcs-id): Accept any version string that does not + signal an error in version-to-list. 2011-03-10 Michael Albinus diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 29089400cef..399e0fb2e24 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -320,14 +320,39 @@ The inner alist is keyed by version.") (put 'package-obsolete-alist 'risky-local-variable t) (defconst package-subdirectory-regexp - "^\\([^.].*\\)-\\([0-9]+\\(?:[.][0-9]+\\)*\\)$" + "\\`\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)\\'" "Regular expression matching the name of a package subdirectory. The first subexpression is the package name. The second subexpression is the version string.") -(defun package-version-join (l) - "Turn a list of version numbers into a version string." - (mapconcat 'int-to-string l ".")) +(defun package-version-join (vlist) + "Return the version string corresponding to the list VLIST. +This is, approximately, the inverse of `version-to-list'. +\(Actually, it returns only one of the possible inverses, since +`version-to-list' is a many-to-one operation.)" + (if (null vlist) + "" + (let ((str-list (list "." (int-to-string (car vlist))))) + (dolist (num (cdr vlist)) + (cond + ((>= num 0) + (push (int-to-string num) str-list) + (push "." str-list)) + ((< num -3) + (error "Invalid version list `%s'" vlist)) + (t + ;; pre, or beta, or alpha + (cond ((equal "." (car str-list)) + (pop str-list)) + ((not (string-match "[0-9]+" (car str-list))) + (error "Invalid version list `%s'" vlist))) + (push (cond ((= num -1) "pre") + ((= num -2) "beta") + ((= num -3) "alpha")) + str-list)))) + (if (equal "." (car str-list)) + (pop str-list)) + (apply 'concat (nreverse str-list))))) (defun package-strip-version (dirname) "Strip the version from a combined package name and version. @@ -592,7 +617,9 @@ Otherwise it uses an external `tar' program. (if (string= file-name "package") (package--write-file-no-coding (expand-file-name (concat file-name ".el") package-user-dir)) - (let* ((pkg-dir (expand-file-name (concat file-name "-" version) + (let* ((pkg-dir (expand-file-name (concat file-name "-" + (package-version-join + (version-to-list version))) package-user-dir)) (el-file (expand-file-name (concat file-name ".el") pkg-dir)) (pkg-file (expand-file-name (concat file-name "-pkg.el") pkg-dir))) From c40f8d15c0e2fa6468df9c5d8d5797e4d98c074b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 11 Mar 2011 01:19:57 +0100 Subject: [PATCH 140/383] * .gdbinit (pwinx, xbuffer): Fix access to buffer name. --- src/.gdbinit | 4 ++-- src/ChangeLog | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/.gdbinit b/src/.gdbinit index 3072dc956b9..2cf5663df91 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -392,7 +392,7 @@ define pwinx printf "Window %d ", $int xgetptr $w->buffer set $tem = (struct buffer *) $ptr - xgetptr $tem->name + xgetptr $tem->name_ printf "%s", ((struct Lisp_String *) $ptr)->data printf "\n" xgetptr $w->start @@ -938,7 +938,7 @@ end define xbuffer xgetptr $ print (struct buffer *) $ptr - xgetptr $->name + xgetptr $->name_ output ((struct Lisp_String *) $ptr)->data echo \n end diff --git a/src/ChangeLog b/src/ChangeLog index c9133f2ea86..c4af193d1b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-11 Andreas Schwab + + * .gdbinit (pwinx, xbuffer): Fix access to buffer name. + 2011-03-09 Juanma Barranquero * search.c (compile_pattern_1): Remove argument regp, unused since From 135e287cda9508d7fa0e33b7d8af00ede1249cb5 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 11 Mar 2011 01:33:57 +0100 Subject: [PATCH 141/383] lisp/help-fns.el (describe-variable): Don't complete keywords. --- lisp/ChangeLog | 5 +++++ lisp/help-fns.el | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c794ddb0788..ca24dcff4a7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-11 Juanma Barranquero + + * help-fns.el (describe-variable): Don't complete keywords. + Suggested by Teodor Zlatanov . + 2011-03-10 Chong Yidong * emacs-lisp/package.el (package-version-join): Impose a standard diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 38e331dc992..e27a1e47b5c 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -592,9 +592,10 @@ it is displayed along with the global value." "Describe variable (default %s): " v) "Describe variable: ") obarray - '(lambda (vv) - (or (boundp vv) - (get vv 'variable-documentation))) + (lambda (vv) + (and (not (keywordp vv)) + (or (boundp vv) + (get vv 'variable-documentation)))) t nil nil (if (symbolp v) (symbol-name v)))) (list (if (equal val "") From c47cbdfd2e29e350b3b7736cc1a66fcae8a99830 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Fri, 11 Mar 2011 10:43:49 +0900 Subject: [PATCH 142/383] * src/unexmacosx.c (copy_data_segment): Also copy __got section. (Bug#8223) --- src/ChangeLog | 5 +++++ src/unexmacosx.c | 1 + 2 files changed, 6 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 12ea037ee91..1d974876c52 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-11 YAMAMOTO Mitsuharu + + * unexmacosx.c (copy_data_segment): Also copy __got section. + (Bug#8223) + 2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/src/unexmacosx.c b/src/unexmacosx.c index df4c0da4cb1..d6f170c9127 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -822,6 +822,7 @@ copy_data_segment (struct load_command *lc) } else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0 || strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0 + || strncmp (sectp->sectname, "__got", 16) == 0 || strncmp (sectp->sectname, "__la_sym_ptr2", 16) == 0 || strncmp (sectp->sectname, "__dyld", 16) == 0 || strncmp (sectp->sectname, "__const", 16) == 0 From 126bc0dcacb6704b8db9e82c4af3eedd1b239715 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Fri, 11 Mar 2011 12:56:20 +0900 Subject: [PATCH 143/383] * src/fringe.c (update_window_fringes): Remove unused variables. --- src/ChangeLog | 2 ++ src/fringe.c | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1d974876c52..a4a80cbf9f5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-11 YAMAMOTO Mitsuharu + * fringe.c (update_window_fringes): Remove unused variables. + * unexmacosx.c (copy_data_segment): Also copy __got section. (Bug#8223) diff --git a/src/fringe.c b/src/fringe.c index 4a6d898d97f..861aa6e9487 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -991,18 +991,10 @@ update_window_fringes (w, keep_current_p) y < yb && rn < nrows; y += row->height, ++rn) { - unsigned indicate_bob_p, indicate_top_line_p; - unsigned indicate_eob_p, indicate_bottom_line_p; - row = w->desired_matrix->rows + rn; if (!row->enabled_p) row = w->current_matrix->rows + rn; - indicate_bob_p = row->indicate_bob_p; - indicate_top_line_p = row->indicate_top_line_p; - indicate_eob_p = row->indicate_eob_p; - indicate_bottom_line_p = row->indicate_bottom_line_p; - row->indicate_bob_p = row->indicate_top_line_p = 0; row->indicate_eob_p = row->indicate_bottom_line_p = 0; From 4b1ec8634128e4389f400e948337f2839be44d8f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 Mar 2011 22:06:36 -0800 Subject: [PATCH 144/383] * fringe.c (update_window_fringes): Mark locals as initialized --- src/ChangeLog | 8 ++++---- src/fringe.c | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a1c4b0fd967..280434d0860 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,8 @@ -2011-03-10 Paul Eggert +2011-03-11 Paul Eggert - * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap): Now static. - (update_window_fringes): Initialize top_row_ends_at_zv_p and - bot_row_ends_at_zv_p, with a FIXME comment. + * fringe.c (update_window_fringes): Mark locals as initialized + (Bug#8227). + (destroy_fringe_bitmap, init_fringe_bitmap): Now static. * alloc.c (mark_fringe_data): Move decl from here ... * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here, diff --git a/src/fringe.c b/src/fringe.c index a980bdf146f..8e2f4eb8d24 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -913,10 +913,7 @@ update_window_fringes (struct window *w, int keep_current_p) int bitmap_cache[MAX_BITMAP_CACHE]; int top_ind_rn, bot_ind_rn; int top_ind_min_y, bot_ind_max_y; - - /* FIXME: Do these need to be initialized? If not, please change - their "= 0"s to "IF_LINT (= 0)"s. Either way, please explain. */ - int top_row_ends_at_zv_p = 0, bot_row_ends_at_zv_p = 0; + int top_row_ends_at_zv_p IF_LINT (= 0), bot_row_ends_at_zv_p IF_LINT (= 0); if (w->pseudo_window_p) return 0; From 40714c5307985eba0f220d208537e211222c104e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 Mar 2011 22:23:26 -0800 Subject: [PATCH 145/383] * fringe.c: Add comment. --- src/fringe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fringe.c b/src/fringe.c index 8e2f4eb8d24..82fc38aee8a 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -913,6 +913,11 @@ update_window_fringes (struct window *w, int keep_current_p) int bitmap_cache[MAX_BITMAP_CACHE]; int top_ind_rn, bot_ind_rn; int top_ind_min_y, bot_ind_max_y; + + /* top_ind_rn is set to a nonnegative value whenver + row->indicate_bob_p is set, so it's OK that top_row_ends_at_zv_p + is not initialized here. Similarly for bot_ind_rn, + row->indicate_eob_p and bot_row_ends_at_zv_p. */ int top_row_ends_at_zv_p IF_LINT (= 0), bot_row_ends_at_zv_p IF_LINT (= 0); if (w->pseudo_window_p) From 53df7c11622bd13fd4336bdecfe7537ace3e2767 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 Mar 2011 22:41:50 -0800 Subject: [PATCH 146/383] Add bug#s. --- src/ChangeLog | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 280434d0860..e29de95e82f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -38,8 +38,6 @@ Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR macros. -2011-03-09 Paul Eggert - * xterm.h (x_mouse_leave): New decl. * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame): @@ -80,7 +78,7 @@ since it's unused otherwise. * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. - Add a FIXME comment, since the code still doesn't look right. + Add a FIXME, since the code still doesn't look right. (Bug#8215) (Fcurrent_bidi_paragraph_direction): Simplify slightly; this avoids a gcc -Wuninitialized diagnostic. (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs): @@ -108,7 +106,7 @@ and to avoid gcc -Wuninitialized warning. (load_charset_map): Mark variables that gcc -Wuninitialized does not deduce are never used uninitialized. - (load_charset): Abort instead of using uninitialized var. + (load_charset): Abort instead of using uninitialized var (Bug#8229). * coding.c (coding_set_source, coding_set_destination): Use "else { /* comment */ }" rather than "else /* comment */;" @@ -130,7 +128,7 @@ -Wuninitialized does not deduce are never used uninitialized. (detect_coding_iso_2022): Initialize a local variable that might be used uninitialized. Leave a FIXME because it's not clear that - this initialization is needed. + this initialization is needed. (Bug#8211) (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT): (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P): (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER): From ce0ad53d442b9e87050d276e4efbcd733c51a9d8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 Mar 2011 23:42:54 -0800 Subject: [PATCH 147/383] * image.c (clear_image_cache): Now static. 2011-03-11 Paul Eggert --- src/ChangeLog | 4 ++++ src/image.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3a6b09dfb1f..0b3d7069cc9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-11 Paul Eggert + + * image.c (clear_image_cache): Now static. + 2011-03-11 Paul Eggert Fix some minor problems found by GCC 4.5.2's static checks. diff --git a/src/image.c b/src/image.c index c7820c3a7fe..31c8d5bcf6c 100644 --- a/src/image.c +++ b/src/image.c @@ -1493,7 +1493,7 @@ free_image_cache (struct frame *f) If image-cache-eviction-delay is non-nil, this frees images in the cache which weren't displayed for at least that many seconds. */ -void +static void clear_image_cache (struct frame *f, Lisp_Object filter) { struct image_cache *c = FRAME_IMAGE_CACHE (f); From d5d5a6173b3bd4c68354b6dceab58ac8e25a0deb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 Mar 2011 23:50:08 -0800 Subject: [PATCH 148/383] * image.c (DIM, HAVE_STDLIB_H_1): Remove unused macros. --- src/ChangeLog | 1 + src/image.c | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0b3d7069cc9..d1e2fea4edb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-11 Paul Eggert * image.c (clear_image_cache): Now static. + (DIM, HAVE_STDLIB_H_1): Remove unused macros. 2011-03-11 Paul Eggert diff --git a/src/image.c b/src/image.c index 31c8d5bcf6c..e25cef52957 100644 --- a/src/image.c +++ b/src/image.c @@ -550,10 +550,6 @@ x_create_bitmap_mask (struct frame *f, int id) Image types ***********************************************************************/ -/* Value is the number of elements of vector VECTOR. */ - -#define DIM(VECTOR) (sizeof (VECTOR) / sizeof *(VECTOR)) - /* List of supported image types. Use define_image_type to add new types. Use lookup_image_type to find a type for a given symbol. */ @@ -6032,7 +6028,6 @@ jpeg_image_p (Lisp_Object object) /* Work around a warning about HAVE_STDLIB_H being redefined in jconfig.h. */ #ifdef HAVE_STDLIB_H -#define HAVE_STDLIB_H_1 #undef HAVE_STDLIB_H #endif /* HAVE_STLIB_H */ From e22cffbc1c9ff76a9870311fb6b9fcd49d013933 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 Mar 2011 23:54:50 -0800 Subject: [PATCH 149/383] * image.c (xpm_load): Redo to avoid "discards qualifiers" gcc warning. --- src/ChangeLog | 1 + src/image.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d1e2fea4edb..158c5ff5330 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * image.c (clear_image_cache): Now static. (DIM, HAVE_STDLIB_H_1): Remove unused macros. + (xpm_load): Redo to avoid "discards qualifiers" gcc warning. 2011-03-11 Paul Eggert diff --git a/src/image.c b/src/image.c index e25cef52957..4befadd44ef 100644 --- a/src/image.c +++ b/src/image.c @@ -3425,11 +3425,12 @@ xpm_load (struct frame *f, struct image *img) { Lisp_Object name; Lisp_Object color; + char *empty_string = (char *) ""; if (!CONSP (XCAR (tail))) { - xpm_syms[i].name = ""; - xpm_syms[i].value = ""; + xpm_syms[i].name = empty_string; + xpm_syms[i].value = empty_string; continue; } name = XCAR (XCAR (tail)); @@ -3440,14 +3441,14 @@ xpm_load (struct frame *f, struct image *img) strcpy (xpm_syms[i].name, SSDATA (name)); } else - xpm_syms[i].name = ""; + xpm_syms[i].name = empty_string; if (STRINGP (color)) { xpm_syms[i].value = (char *) alloca (SCHARS (color) + 1); strcpy (xpm_syms[i].value, SSDATA (color)); } else - xpm_syms[i].value = ""; + xpm_syms[i].value = empty_string; } } From 77a765fd789f80afbe170bf640794a4b25968ea6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 10 Mar 2011 23:59:36 -0800 Subject: [PATCH 150/383] * image.c (x_edge_detection): Remove unnecessary cast that gcc -Wbad-function-cast diagnoses. --- src/ChangeLog | 2 ++ src/image.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 158c5ff5330..cb535bad8a4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * image.c (clear_image_cache): Now static. (DIM, HAVE_STDLIB_H_1): Remove unused macros. (xpm_load): Redo to avoid "discards qualifiers" gcc warning. + (x_edge_detection): Remove unnecessary cast that + gcc -Wbad-function-cast diagnoses. 2011-03-11 Paul Eggert diff --git a/src/image.c b/src/image.c index 4befadd44ef..810bd4be989 100644 --- a/src/image.c +++ b/src/image.c @@ -4687,7 +4687,7 @@ x_edge_detection (struct frame *f, struct image *img, Lisp_Object matrix, color_adjust = make_number (0xffff / 2); if (i == 9 && NUMBERP (color_adjust)) - x_detect_edges (f, img, trans, (int) XFLOATINT (color_adjust)); + x_detect_edges (f, img, trans, XFLOATINT (color_adjust)); } From 2037898d7ada760ef84df072d05addf826710f65 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 11 Mar 2011 00:01:09 -0800 Subject: [PATCH 151/383] * image.c (gif_load): Fix pointer signedness. --- src/ChangeLog | 1 + src/image.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index cb535bad8a4..7170fcc162a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,7 @@ (xpm_load): Redo to avoid "discards qualifiers" gcc warning. (x_edge_detection): Remove unnecessary cast that gcc -Wbad-function-cast diagnoses. + (gif_load): Fix pointer signedness. 2011-03-11 Paul Eggert diff --git a/src/image.c b/src/image.c index 810bd4be989..383e154b265 100644 --- a/src/image.c +++ b/src/image.c @@ -7127,7 +7127,7 @@ gif_load (struct frame *f, struct image *img) } /* Open the GIF file. */ - gif = fn_DGifOpenFileName (SDATA (file)); + gif = fn_DGifOpenFileName (SSDATA (file)); if (gif == NULL) { image_error ("Cannot open `%s'", file, Qnil); From 6ae141d682670b1d21abd86fd530cca016f73985 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 11 Mar 2011 00:20:11 -0800 Subject: [PATCH 152/383] * image.c: (clear_image_cache, xbm_read_bitmap_data, x_detect_edges): (jpeg_load, gif_load): Rename locals to avoid shadowing. --- src/ChangeLog | 2 ++ src/image.c | 36 ++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7170fcc162a..c99d3626e05 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,6 +6,8 @@ (x_edge_detection): Remove unnecessary cast that gcc -Wbad-function-cast diagnoses. (gif_load): Fix pointer signedness. + (clear_image_cache, xbm_read_bitmap_data, x_detect_edges): + (jpeg_load, gif_load): Rename locals to avoid shadowing. 2011-03-11 Paul Eggert diff --git a/src/image.c b/src/image.c index 383e154b265..1f2a4609536 100644 --- a/src/image.c +++ b/src/image.c @@ -1557,9 +1557,9 @@ clear_image_cache (struct frame *f, Lisp_Object filter) FOR_EACH_FRAME (tail, frame) { - struct frame *f = XFRAME (frame); - if (FRAME_IMAGE_CACHE (f) == c) - clear_current_matrices (f); + struct frame *fr = XFRAME (frame); + if (FRAME_IMAGE_CACHE (fr) == c) + clear_current_matrices (fr); } ++windows_or_buffers_changed; @@ -2651,11 +2651,11 @@ xbm_read_bitmap_data (struct frame *f, unsigned char *contents, unsigned char *e if (LA1 == XBM_TK_NUMBER) { - char *p = strrchr (buffer, '_'); - p = p ? p + 1 : buffer; - if (strcmp (p, "width") == 0) + char *q = strrchr (buffer, '_'); + q = q ? q + 1 : buffer; + if (strcmp (q, "width") == 0) *width = value; - else if (strcmp (p, "height") == 0) + else if (strcmp (q, "height") == 0) *height = value; } expect (XBM_TK_NUMBER); @@ -4604,14 +4604,14 @@ x_detect_edges (struct frame *f, struct image *img, int *matrix, int color_adjus for (x = 1; x < img->width - 1; ++x, ++p) { - int r, g, b, y1, x1; + int r, g, b, yy, xx; r = g = b = i = 0; - for (y1 = y - 1; y1 < y + 2; ++y1) - for (x1 = x - 1; x1 < x + 2; ++x1, ++i) + for (yy = y - 1; yy < y + 2; ++yy) + for (xx = x - 1; xx < x + 2; ++xx, ++i) if (matrix[i]) { - XColor *t = COLOR (colors, x1, y1); + XColor *t = COLOR (colors, xx, yy); r += matrix[i] * t->red; g += matrix[i] * t->green; b += matrix[i] * t->blue; @@ -6364,10 +6364,10 @@ jpeg_load (struct frame *f, struct image *img) if (rc == 1) { /* Called from my_error_exit. Display a JPEG error. */ - char buffer[JMSG_LENGTH_MAX]; - cinfo.err->format_message ((j_common_ptr) &cinfo, buffer); + char buf[JMSG_LENGTH_MAX]; + cinfo.err->format_message ((j_common_ptr) &cinfo, buf); image_error ("Error reading JPEG image `%s': %s", img->spec, - build_string (buffer)); + build_string (buf)); } /* Close the input file and destroy the JPEG object. */ @@ -7300,9 +7300,9 @@ gif_load (struct frame *f, struct image *img) for (x = 0; x < image_width; x++) { - int i = raster[(y * image_width) + x]; + int c = raster[(y * image_width) + x]; XPutPixel (ximg, x + img->corners[LEFT_CORNER], - row + img->corners[TOP_CORNER], pixel_colors[i]); + row + img->corners[TOP_CORNER], pixel_colors[c]); } row += interlace_increment[pass]; @@ -7313,9 +7313,9 @@ gif_load (struct frame *f, struct image *img) for (y = 0; y < image_height; ++y) for (x = 0; x < image_width; ++x) { - int i = raster[y * image_width + x]; + int c = raster[y * image_width + x]; XPutPixel (ximg, x + img->corners[LEFT_CORNER], - y + img->corners[TOP_CORNER], pixel_colors[i]); + y + img->corners[TOP_CORNER], pixel_colors[c]); } } From b740639e32c52d75ea93a2ac9c4b1c41257f3bb0 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 11 Mar 2011 01:02:58 -0800 Subject: [PATCH 153/383] Add Makefile rules for generating html version of Emacs FAQ. * doc/misc/Makefile.in (HTML_TARGETS): New. (clean): Delete $HTML_TARGETS. (emacs-faq.html): New, for use with the gnu.org Emacs webpage. --- doc/misc/ChangeLog | 6 ++++++ doc/misc/Makefile.in | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 96a2576355a..59ad3076684 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-11 Glenn Morris + + * Makefile.in (HTML_TARGETS): New. + (clean): Delete $HTML_TARGETS. + (emacs-faq.html): New, for use with the gnu.org Emacs webpage. + 2011-03-08 Teodor Zlatanov * auth.texi (Help for developers): Show example of using diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 0a28d417c70..f429b6b2a91 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -197,6 +197,8 @@ PDF_TARGETS = \ widget.pdf \ woman.pdf +HTML_TARGETS = emacs-faq.html + TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf @@ -401,6 +403,12 @@ faq.dvi: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi $(ENVADD) $(TEXI2DVI) $< faq.pdf: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi $(ENVADD) $(TEXI2PDF) $< +## This is the name used on the Emacs web-page. +## sed fixes up links to point to split version of the manual. +emacs-faq.html: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi + cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split \ + --css-ref='/layout.css' --html -o $@ $< + sed -i 's|a href="emacs.html#\([^"]*\)"|a href="manual/html_node/emacs/\1.html"|g' $@ flymake : $(infodir)/flymake $(infodir)/flymake: flymake.texi @@ -684,7 +692,7 @@ mostlyclean: rm -f gnustmp.* clean: mostlyclean - rm -f $(DVI_TARGETS) $(PDF_TARGETS) + rm -f $(DVI_TARGETS) $(PDF_TARGETS) $(HTML_TARGETS) distclean: clean # rm -f Makefile From 4f1f90cd9dac7134d85abe6e732afe1a6a9257f7 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 11 Mar 2011 01:07:33 -0800 Subject: [PATCH 154/383] Fix previous change. --- doc/misc/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index f429b6b2a91..6ecf6bc02f8 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -406,7 +406,7 @@ faq.pdf: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi ## This is the name used on the Emacs web-page. ## sed fixes up links to point to split version of the manual. emacs-faq.html: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi - cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split \ + $(MAKEINFO) $(MAKEINFO_OPTS) --no-split \ --css-ref='/layout.css' --html -o $@ $< sed -i 's|a href="emacs.html#\([^"]*\)"|a href="manual/html_node/emacs/\1.html"|g' $@ From 7ef4b50c04d80cbc2b247f997e9133fbce70be05 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 11 Mar 2011 11:41:56 +0200 Subject: [PATCH 155/383] Fix MS-Windows build broken by 2011-03-11T07:24:21Z!eggert@cs.ucla.edu. src/term.c (encode_terminal_code): Now external again, used by w32console.c and msdos.c. src/termhooks.h (encode_terminal_code): Declare prototype. src/msdos.c (encode_terminal_code): Don't declare prototype. src/makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)): Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu. --- src/ChangeLog | 12 ++++++++++++ src/makefile.w32-in | 2 ++ src/msdos.c | 1 + src/term.c | 2 +- src/termhooks.h | 3 +++ 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3a6b09dfb1f..ebbef39c29d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2011-03-11 Eli Zaretskii + + * termhooks.h (encode_terminal_code): Declare prototype. + + * msdos.c (encode_terminal_code): Don't declare prototype. + + * term.c (encode_terminal_code): Now external again, used by + w32console.c and msdos.c. + + * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)): Depend + on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu. + 2011-03-11 Paul Eggert Fix some minor problems found by GCC 4.5.2's static checks. diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 7a702fd45bf..81f758f1b5f 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -1466,6 +1466,7 @@ $(BLD)/term.$(O) : \ $(SRC)/termchar.h \ $(SRC)/termhooks.h \ $(SRC)/termopts.h \ + $(SRC)/tparam.h \ $(SRC)/w32gui.h \ $(SRC)/window.h @@ -1498,6 +1499,7 @@ $(BLD)/textprop.$(O) : \ $(BLD)/tparam.$(O) : \ $(SRC)/tparam.c \ + $(SRC)/tparam.h \ $(CONFIG_H) \ $(LISP_H) diff --git a/src/msdos.c b/src/msdos.c index 261a09ac859..5d50749cb7e 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -844,6 +844,7 @@ IT_set_face (int face) extern unsigned char *encode_terminal_code (struct glyph *, int, struct coding_system *); + static void IT_write_glyphs (struct frame *f, struct glyph *str, int str_len) { diff --git a/src/term.c b/src/term.c index e78e2e68814..e84bbe125f8 100644 --- a/src/term.c +++ b/src/term.c @@ -501,7 +501,7 @@ static int encode_terminal_dst_size; Set CODING->produced to the byte-length of the resulting byte sequence, and return a pointer to that byte sequence. */ -static unsigned char * +unsigned char * encode_terminal_code (struct glyph *src, int src_len, struct coding_system *coding) { struct glyph *src_end = src + src_len; diff --git a/src/termhooks.h b/src/termhooks.h index b147f6ed0a1..0ccd2dac9e1 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -654,6 +654,9 @@ extern void delete_terminal (struct terminal *); /* The initial terminal device, created by initial_term_init. */ extern struct terminal *initial_terminal; +extern unsigned char *encode_terminal_code (struct glyph *, int, + struct coding_system *); + #ifdef HAVE_GPM extern void close_gpm (int gpm_fd); #endif From 69cc79e9e067543c5b20adcea1d756f1dd9569dc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 11 Mar 2011 13:17:24 +0200 Subject: [PATCH 156/383] Fix bug #8221 with description of how HOME is set on Windows. doc/emacs/msdog.texi (Windows HOME): Fix the wording to clarify how Emacs sets HOME on Windows and where it looks for init files. --- doc/emacs/ChangeLog | 5 +++++ doc/emacs/msdog.texi | 49 ++++++++++++++++++++++++++------------------ 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 69d3e03209c..6fa1941c53e 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,8 @@ +2011-03-11 Eli Zaretskii + + * msdog.texi (Windows HOME): Fix the wording to clarify how Emacs sets + HOME on Windows and where it looks for init files. (Bug#8221) + 2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index caa1bbccd19..53f46d08d7c 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi @@ -404,36 +404,45 @@ names, which might cause misalignment of columns in Dired display. @dfn{user-specific application data directory}. The actual location depends on your Windows version and system configuration; typical values are @file{C:\Documents and Settings\@var{username}\Application Data} on -Windows 2K/XP and later, and either @file{C:\WINDOWS\Application Data} +Windows 2K/XP/2K3, @file{C:\Users\@var{username}\AppData\Roaming} on +Windows Vista/7/2K8, and either @file{C:\WINDOWS\Application Data} or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the -older Windows 9X/ME systems. +older Windows 9X/ME systems. If this directory does not exist or +cannot be accessed, Emacs falls back to @file{C:\} as the default +value of @code{HOME}. - @code{HOME} can also be set in the system registry, for details see + You can override this default value of @code{HOME} by explicitly +setting the environment variable @env{HOME} to point to any directory +on your system. @env{HOME} can be set either from the command shell +prompt or from the @samp{My Computer}s @samp{Properties} dialog. +@code{HOME} can also be set in the system registry, for details see @ref{MS-Windows Registry}. -@cindex init file @file{.emacs} on MS-Windows - The home directory is where your init file @file{.emacs} is stored. -When Emacs starts, it first checks whether the environment variable -@env{HOME} is set. If it is, it looks for the init file in the -directory pointed by @env{HOME}. If @env{HOME} is not defined, Emacs -checks for an existing @file{.emacs} file in @file{C:\}, the root -directory of drive @file{C:}@footnote{ -The check in @file{C:\} is for compatibility with older versions of Emacs, -which didn't check the application data directory. -}. If there's no such file in @file{C:\}, Emacs next uses the Windows -system calls to find out the exact location of your application data -directory. If that system call fails, Emacs falls back to @file{C:\}. + For compatibility with older versions of Emacs@footnote{ +Older versions of Emacs didn't check the application data directory. +}, if there is a file named @file{.emacs} in @file{C:\}, the root +directory of drive @file{C:}, and @env{HOME} is set neither in the +environment nor in the Registry, Emacs will treat @file{C:\} as the +default @code{HOME} location, and will not look in the application +data directory, even if it exists. Note that only @file{.emacs} is +looked for in @file{C:\}; the older name @file{_emacs} (see below) is +not. This use of @file{C:\.emacs} to define @code{HOME} is +deprecated. - Whatever the final place is, Emacs sets the value of the @env{HOME} -environment variable to point to it, and it will use that location for -other files and directories it normally creates in the user's home -directory. + Whatever the final place is, Emacs sets the internal value of the +@env{HOME} environment variable to point to it, and it will use that +location for other files and directories it normally looks for or +creates in the user's home directory. You can always find out where Emacs thinks is your home directory's location by typing @kbd{C-x d ~/ @key{RET}}. This should present the list of files in the home directory, and show its full name on the first line. Likewise, to visit your init file, type @kbd{C-x C-f -~/.emacs @key{RET}}. +~/.emacs @key{RET}} (assuming the file's name is @file{.emacs}). + +@cindex init file @file{.emacs} on MS-Windows + The home directory is where your init file is stored. It can have +any name mentioned in @ref{Init File}. @cindex @file{_emacs} init file, MS-Windows Because MS-DOS does not allow file names with leading dots, and From 2920e68d73e0009f368e817207964efaff751f85 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 11 Mar 2011 14:19:08 +0200 Subject: [PATCH 157/383] Fix comparisons of file ownership on MS-Windows for the Administrator user. lisp/files.el (file-ownership-preserved-p): Pass `integer' as an explicit 2nd argument to `file-attributes'. If the file's owner is the Administrators group on Windows, and the current user is Administrator, consider that a match. lisp/server.el (server-ensure-safe-dir): Consider server directory safe on MS-Windows if its owner is the Administrators group while the current Emacs user is Administrator. Use `=' to compare numerical UIDs, since they could be integers or floats. --- lisp/ChangeLog | 12 ++++++++++++ lisp/files.el | 10 ++++++++-- lisp/server.el | 8 +++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1b8a7641b35..6685e355360 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2011-03-11 Eli Zaretskii + + * files.el (file-ownership-preserved-p): Pass `integer' as an + explicit 2nd argument to `file-attributes'. If the file's owner + is the Administrators group on Windows, and the current user is + Administrator, consider that a match. + + * server.el (server-ensure-safe-dir): Consider server directory + safe on MS-Windows if its owner is the Administrators group while + the current Emacs user is Administrator. Use `=' to compare + numerical UIDs, since they could be integers or floats. + 2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/lisp/files.el b/lisp/files.el index 88063aed2b9..91fed0d1274 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3752,11 +3752,17 @@ we do not remove backup version numbers, only true file version numbers." (let ((handler (find-file-name-handler file 'file-ownership-preserved-p))) (if handler (funcall handler 'file-ownership-preserved-p file) - (let ((attributes (file-attributes file))) + (let ((attributes (file-attributes file 'integer))) ;; Return t if the file doesn't exist, since it's true that no ;; information would be lost by an (attempted) delete and create. (or (null attributes) - (= (nth 2 attributes) (user-uid))))))) + (= (nth 2 attributes) (user-uid)) + ;; Files created on Windows by Administrator (RID=500) + ;; have the Administrators group (RID=544) recorded as + ;; their owner. Rewriting them will still preserve the + ;; owner. + (and (eq system-type 'windows-nt) + (= (user-uid) 500) (= (nth 2 attributes) 544))))))) (defun file-name-sans-extension (filename) "Return FILENAME sans final \"extension\". diff --git a/lisp/server.el b/lisp/server.el index f62a7c73abc..816a072bf75 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -474,7 +474,13 @@ See variable `server-auth-dir' for details." (file-name-as-directory dir)) :warning) (throw :safe t)) - (unless (eql uid (user-uid)) ; is the dir ours? + (unless (or (= uid (user-uid)) ; is the dir ours? + (and w32 + ;; Files created on Windows by + ;; Administrator (RID=500) have + ;; the Administrators (RID=544) + ;; group recorded as the owner. + (= uid 544) (= (user-uid) 500))) (throw :safe nil)) (when w32 ; on NTFS? (throw :safe t)) From 6dbf95e5b3cf85fce57a5cdd67e7e50b8acb8787 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 11 Mar 2011 15:05:31 +0100 Subject: [PATCH 158/383] Backport 2011-03-11T00:33:57Z!lekktu@gmail.com from trunk. * lisp/help-fns.el (describe-variable): Don't complete keywords. --- lisp/ChangeLog | 6 ++++++ lisp/help-fns.el | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6685e355360..d84f98a1322 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-11 Juanma Barranquero + + Backport revno:103622 from trunk. + * help-fns.el (describe-variable): Don't complete keywords. + Suggested by Teodor Zlatanov . + 2011-03-11 Eli Zaretskii * files.el (file-ownership-preserved-p): Pass `integer' as an diff --git a/lisp/help-fns.el b/lisp/help-fns.el index ba8565f5e1e..e0cfb7039f9 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -585,9 +585,10 @@ it is displayed along with the global value." "Describe variable (default %s): " v) "Describe variable: ") obarray - '(lambda (vv) - (or (boundp vv) - (get vv 'variable-documentation))) + (lambda (vv) + (and (not (keywordp vv)) + (or (boundp vv) + (get vv 'variable-documentation)))) t nil nil (if (symbolp v) (symbol-name v)))) (list (if (equal val "") From 9c5047fb4e78dfc1d8667e06947f5660dcf234eb Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 11 Mar 2011 16:34:07 +0100 Subject: [PATCH 159/383] Backport 2011-03-01T03:59:31Z!lekktu@gmail.com from trunk. *lisp/emacs-lisp/cl-macs.el (lexical-let*): Fix argument name in docstring. --- lisp/ChangeLog | 3 +++ lisp/emacs-lisp/cl-loaddefs.el | 4 ++-- lisp/emacs-lisp/cl-macs.el | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d84f98a1322..e368e660fe2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-11 Juanma Barranquero + Backport revno:103463 from trunk. + * emacs-lisp/cl-macs.el (lexical-let*): Fix argument name in docstring. + Backport revno:103622 from trunk. * help-fns.el (describe-variable): Don't complete keywords. Suggested by Teodor Zlatanov . diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 835d26ed585..2fb7c0434b5 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -282,7 +282,7 @@ Not documented ;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist ;;;;;; do* do loop return-from return block etypecase typecase ecase ;;;;;; case load-time-value eval-when destructuring-bind function* -;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "75e86ac663887b54bf1778f2dd028463") +;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "12451ac01f94f10d30cf7a8f92625c42") ;;; Generated autoloads from cl-macs.el (autoload 'gensym "cl-macs" "\ @@ -505,7 +505,7 @@ lexical closures as in Common Lisp. (autoload 'lexical-let* "cl-macs" "\ Like `let*', but lexically scoped. The main visible difference is that lambdas inside BODY, and in -successive bindings within BINDINGS, will create lexical closures +successive bindings within VARLIST, will create lexical closures as in Common Lisp. This is similar to the behavior of `let*' in Common Lisp. diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 4061e570cef..3e9d7c27258 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1455,7 +1455,7 @@ lexical closures as in Common Lisp. (defmacro lexical-let* (bindings &rest body) "Like `let*', but lexically scoped. The main visible difference is that lambdas inside BODY, and in -successive bindings within BINDINGS, will create lexical closures +successive bindings within VARLIST, will create lexical closures as in Common Lisp. This is similar to the behavior of `let*' in Common Lisp. \n(fn VARLIST BODY)" From 1e048ad1a60374ff026f021fe836c4f77a3fca60 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 11 Mar 2011 16:42:12 +0100 Subject: [PATCH 160/383] Backport 2011-03-08T01:52:20Z!lekktu@gmail.com from trunk. * src/w32xfns.c (select_palette): Check success of RealizePalette against GDI_ERROR, not zero. --- src/ChangeLog | 6 ++++++ src/w32xfns.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a4a80cbf9f5..75958169951 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-03-11 Juanma Barranquero + + Backport revno:103582 from trunk. + * w32xfns.c (select_palette): Check success of RealizePalette against + GDI_ERROR, not zero. + 2011-03-11 YAMAMOTO Mitsuharu * fringe.c (update_window_fringes): Remove unused variables. diff --git a/src/w32xfns.c b/src/w32xfns.c index 83ffc1c8b5f..0472138e117 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -98,7 +98,7 @@ select_palette (FRAME_PTR f, HDC hdc) else f->output_data.w32->old_palette = NULL; - if (RealizePalette (hdc)) + if (RealizePalette (hdc) != GDI_ERROR) { Lisp_Object frame, framelist; FOR_EACH_FRAME (framelist, frame) From ef1fd07e4e728fcbf60ce87f1434f5fd46862262 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 11 Mar 2011 09:49:16 -0700 Subject: [PATCH 161/383] * buffer.c (syms_of_buffer): Remove obsolete comment. --- src/ChangeLog | 4 ++++ src/buffer.c | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ebbef39c29d..4b54abe08dd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-11 Tom Tromey + + * buffer.c (syms_of_buffer): Remove obsolete comment. + 2011-03-11 Eli Zaretskii * termhooks.h (encode_terminal_code): Declare prototype. diff --git a/src/buffer.c b/src/buffer.c index c95fbb5f516..448c9236387 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5332,9 +5332,6 @@ syms_of_buffer (void) Fput (Qprotected_field, Qerror_message, make_pure_c_string ("Attempt to modify a protected field")); - /* All these use DEFVAR_LISP_NOPRO because the slots in - buffer_defaults will all be marked via Vbuffer_defaults. */ - DEFVAR_BUFFER_DEFAULTS ("default-mode-line-format", mode_line_format, doc: /* Default value of `mode-line-format' for buffers that don't override it. From 5ef342304deceb61037a9eec17d6b0eb7ac978dd Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 11 Mar 2011 12:17:33 -0500 Subject: [PATCH 162/383] Bump version to 23.3.50 --- README | 2 +- configure.in | 2 +- doc/emacs/emacs.texi | 2 +- doc/lispref/book-spine.texinfo | 2 +- doc/lispref/elisp.texi | 2 +- doc/lispref/vol1.texi | 2 +- doc/lispref/vol2.texi | 2 +- doc/man/emacs.1 | 2 +- doc/misc/faq.texi | 2 +- lib-src/makefile.w32-in | 2 +- lisp/version.el | 2 +- nextstep/Cocoa/Emacs.base/Contents/Info.plist | 4 ++-- .../Contents/Resources/English.lproj/InfoPlist.strings | 4 ++-- nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop | 2 +- nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist | 4 ++-- nt/emacs.rc | 8 ++++---- nt/emacsclient.rc | 8 ++++---- 17 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README b/README index a1cdd4e2bfc..efb8fb99a38 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, See the end of the file for license conditions. -This directory tree holds version 23.3 of GNU Emacs, the extensible, +This directory tree holds version 23.3.50 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff --git a/configure.in b/configure.in index 275e8125ab3..cfb2a2eb7dc 100644 --- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ dnl You should have received a copy of the GNU General Public License dnl along with GNU Emacs. If not, see . AC_PREREQ(2.62) -AC_INIT(emacs, 23.3) +AC_INIT(emacs, 23.3.50) AC_CONFIG_HEADER(src/config.h:src/config.in) AC_CONFIG_SRCDIR(src/lisp.h) diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 34a604f7654..72483afef1e 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -5,7 +5,7 @@ @c The edition number appears in several places in this file @set EDITION Sixteenth -@set EMACSVER 23.3 +@set EMACSVER 23.3.50 @copying This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},@* diff --git a/doc/lispref/book-spine.texinfo b/doc/lispref/book-spine.texinfo index 3a8aa1c0705..d5785811dc9 100644 --- a/doc/lispref/book-spine.texinfo +++ b/doc/lispref/book-spine.texinfo @@ -11,7 +11,7 @@ @center @titlefont{GNU Emacs Lisp Reference Manual} @sp 5 @center GNU -@center Emacs Version 23.3 +@center Emacs Version 23.3.50 @center for Unix Users @sp 5 diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 2093806fa49..9b2b4817e27 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -8,7 +8,7 @@ @c Please remember to update the edition number in README as well. @c And also the copies in vol1.texi and vol2.texi. @set VERSION 3.0 -@set EMACSVER 23.3 +@set EMACSVER 23.3.50 @set DATE July 2009 @c in general, keep the following line commented out, unless doing a diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index 392bfc5b5e9..8454e633c78 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi @@ -27,7 +27,7 @@ @c Version of the manual and of Emacs. @c Please remember to update the edition number in README as well. @set VERSION 3.0 -@set EMACSVER 23.3 +@set EMACSVER 23.3.50 @set DATE July 2009 @dircategory Emacs diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 63f35b7e531..f481523b981 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi @@ -27,7 +27,7 @@ @c Version of the manual and of Emacs. @c Please remember to update the edition number in README as well. @set VERSION 3.0 -@set EMACSVER 23.3 +@set EMACSVER 23.3.50 @set DATE July 2009 @dircategory Emacs diff --git a/doc/man/emacs.1 b/doc/man/emacs.1 index 0baf3abe5e3..fddef64571c 100644 --- a/doc/man/emacs.1 +++ b/doc/man/emacs.1 @@ -1,5 +1,5 @@ .\" See section COPYING for copyright and redistribution information. -.TH EMACS 1 "2007 April 13" "GNU Emacs 23.3" +.TH EMACS 1 "2007 April 13" "GNU Emacs 23.3.50" . . .SH NAME diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi index d3acccf1693..ae2d0867fd3 100644 --- a/doc/misc/faq.texi +++ b/doc/misc/faq.texi @@ -5,7 +5,7 @@ @c %**end of header @c This is used in many places -@set VER 23.3 +@set VER 23.3.50 @c This file is maintained by Romain Francoise . @c Feel free to install changes without prior permission (but I'd diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 396060a3d75..3f74064c785 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -22,7 +22,7 @@ ALL = make-docfile hexl ctags etags movemail ebrowse sorted-doc digest-doc emacs .PHONY: $(ALL) -VERSION = 23.3 +VERSION = 23.3.50 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \ -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \ diff --git a/lisp/version.el b/lisp/version.el index 92eb56440aa..424c681c083 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -32,7 +32,7 @@ (defconst emacs-copyright "Copyright (C) 2011 Free Software Foundation, Inc." "\ Short copyright string for this version of Emacs.") -(defconst emacs-version "23.3" "\ +(defconst emacs-version "23.3.50" "\ Version numbers of this version of Emacs.") (defconst emacs-major-version (progn (string-match "^[0-9]+" emacs-version) (string-to-number (match-string 0 emacs-version))) "\ diff --git a/nextstep/Cocoa/Emacs.base/Contents/Info.plist b/nextstep/Cocoa/Emacs.base/Contents/Info.plist index c18c2267473..14a543bc278 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Info.plist +++ b/nextstep/Cocoa/Emacs.base/Contents/Info.plist @@ -553,7 +553,7 @@ along with GNU Emacs. If not, see . CFBundleExecutable Emacs CFBundleGetInfoString - Emacs 23.3 Copyright (C) 2011 Free Software Foundation, Inc. + Emacs 23.3.50 Copyright (C) 2011 Free Software Foundation, Inc. CFBundleIconFile Emacs.icns CFBundleIdentifier @@ -566,7 +566,7 @@ along with GNU Emacs. If not, see . APPL CFBundleShortVersionString - 23.3 + 23.3.50 CFBundleSignature EMAx diff --git a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings b/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings index a2e48d47741..fe99acec153 100644 --- a/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings +++ b/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings @@ -1,6 +1,6 @@ /* Localized versions of Info.plist keys */ CFBundleName = "Emacs"; -CFBundleShortVersionString = "Version 23.3"; -CFBundleGetInfoString = "Emacs version 23.3, NS Windowing"; +CFBundleShortVersionString = "Version 23.3.50"; +CFBundleGetInfoString = "Emacs version 23.3.50, NS Windowing"; NSHumanReadableCopyright = "Copyright (C) 2011 Free Software Foundation, Inc."; diff --git a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop b/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop index 431106a0fa5..32388dd01a8 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop +++ b/nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Encoding=UTF-8 Type=Application -Version=23.3 +Version=23.3.50 Categories=GNUstep Name=Emacs Comment=GNU Emacs for NeXT/Open/GNUstep and OS X diff --git a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist b/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist index 26847cced89..b72854f7600 100644 --- a/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist +++ b/nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist @@ -2,7 +2,7 @@ ApplicationDescription = "GNU Emacs for GNUstep / OS X"; ApplicationIcon = emacs.tiff; ApplicationName = Emacs; - ApplicationRelease = "23.3"; + ApplicationRelease = "23.3.50"; Authors = ( "Adrian Robert (GNUstep)", "Christophe de Dinechin (MacOS X)", @@ -13,7 +13,7 @@ ); Copyright = "Copyright (C) 2011 Free Software Foundation, Inc."; CopyrightDescription = "Released under the GNU General Public License Version 3 or later"; - FullVersionID = "Emacs 23.3, NS Windowing"; + FullVersionID = "Emacs 23.3.50, NS Windowing"; NSExecutable = Emacs; NSIcon = emacs.tiff; NSPrincipalClass = NSApplication; diff --git a/nt/emacs.rc b/nt/emacs.rc index 540781c2b8e..4c376eca811 100644 --- a/nt/emacs.rc +++ b/nt/emacs.rc @@ -7,8 +7,8 @@ Emacs ICON icons\emacs.ico #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 23,3,0,0 - PRODUCTVERSION 23,3,0,0 + FILEVERSION 23,3,50,0 + PRODUCTVERSION 23,3,50,0 FILEFLAGSMASK 0x3FL #ifdef EMACSDEBUG FILEFLAGS 0x1L @@ -25,12 +25,12 @@ BEGIN BEGIN VALUE "CompanyName", "Free Software Foundation\0" VALUE "FileDescription", "GNU Emacs: The extensible self-documenting text editor\0" - VALUE "FileVersion", "23, 3, 0, 0\0" + VALUE "FileVersion", "23, 3, 50, 0\0" VALUE "InternalName", "Emacs\0" VALUE "LegalCopyright", "Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011\0" VALUE "OriginalFilename", "emacs.exe" VALUE "ProductName", "Emacs\0" - VALUE "ProductVersion", "23, 3, 0, 0\0" + VALUE "ProductVersion", "23, 3, 50, 0\0" VALUE "OLESelfRegister", "\0" END END diff --git a/nt/emacsclient.rc b/nt/emacsclient.rc index 42e0d422956..d29a5ce6889 100644 --- a/nt/emacsclient.rc +++ b/nt/emacsclient.rc @@ -5,8 +5,8 @@ Emacs ICON icons\emacs.ico #endif VS_VERSION_INFO VERSIONINFO - FILEVERSION 23,3,0,0 - PRODUCTVERSION 23,3,0,0 + FILEVERSION 23,3,50,0 + PRODUCTVERSION 23,3,50,0 FILEFLAGSMASK 0x3FL #ifdef EMACSDEBUG FILEFLAGS 0x1L @@ -23,12 +23,12 @@ BEGIN BEGIN VALUE "CompanyName", "Free Software Foundation\0" VALUE "FileDescription", "GNU EmacsClient: Client for the extensible self-documenting text editor\0" - VALUE "FileVersion", "23, 3, 0, 0\0" + VALUE "FileVersion", "23, 3, 50, 0\0" VALUE "InternalName", "EmacsClient\0" VALUE "LegalCopyright", "Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011\0" VALUE "OriginalFilename", "emacsclientw.exe" VALUE "ProductName", "EmacsClient\0" - VALUE "ProductVersion", "23, 3, 0, 0\0" + VALUE "ProductVersion", "23, 3, 50, 0\0" VALUE "OLESelfRegister", "\0" END END From 14239447d34591d3bc90d0d447dd8253a37e49eb Mon Sep 17 00:00:00 2001 From: Ken Manheimer Date: Fri, 11 Mar 2011 13:46:12 -0500 Subject: [PATCH 163/383] * allout-widgets.el (allout-widgets-tally) Initialize allout-widgets-tally as a hash table rather than nil to prevent mode-line redisplay warnings. Also, clarify the module description and fix a comment typoo (sic). --- lisp/ChangeLog | 8 ++++++++ lisp/allout-widgets.el | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ca24dcff4a7..9456644a7a8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2011-03-11 Ken Manheimer + + * allout-widgets.el (allout-widgets-tally) Initialize + allout-widgets-tally as a hash table rather than nil to prevent + mode-line redisplay warnings. + Also, clarify the module description and fix a comment typo. + + 2011-03-11 Juanma Barranquero * help-fns.el (describe-variable): Don't complete keywords. diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index cc5fd6d96fa..47f181ab76b 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -1,4 +1,4 @@ -;; allout-widgets.el --- Show allout outline structure with graphical widgets. +;; allout-widgets.el --- Visually highlight allout outline structure. ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Ken Manheimer @@ -238,7 +238,7 @@ buffer, and tracking increases as new widgets are added and decreases as obsolete widgets are garbage collected." :type 'boolean :group 'allout-widgets-developer) -(defvar allout-widgets-tally nil +(defvar allout-widgets-tally (make-hash-table :test 'eq :weakness 'key) "Hash-table of existing allout widgets, for debugging. Table is maintained iff `allout-widgets-maintain-tally' is non-nil. From 8be6f3188dd265704c5d19d09e84a36c5e33d403 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 11 Mar 2011 12:24:09 -0800 Subject: [PATCH 164/383] Move 'make_time' to be next to its inverse 'lisp_time_argument'. * dired.c (make_time): Move to ... * editfns.c (make_time): ... here. * systime.h: Note the move. --- src/ChangeLog | 7 +++++++ src/dired.c | 7 ------- src/editfns.c | 13 +++++++++++++ src/systime.h | 5 +---- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4b54abe08dd..85100149c92 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-03-11 Paul Eggert + + Move 'make_time' to be next to its inverse 'lisp_time_argument'. + * dired.c (make_time): Move to ... + * editfns.c (make_time): ... here. + * systime.h: Note the move. + 2011-03-11 Tom Tromey * buffer.c (syms_of_buffer): Remove obsolete comment. diff --git a/src/dired.c b/src/dired.c index 96063680d4d..d201418d78b 100644 --- a/src/dired.c +++ b/src/dired.c @@ -848,13 +848,6 @@ file_name_completion_stat (Lisp_Object dirname, DIRENTRY *dp, struct stat *st_ad return value; } -Lisp_Object -make_time (time_t time) -{ - return Fcons (make_number (time >> 16), - Fcons (make_number (time & 0177777), Qnil)); -} - static char * stat_uname (struct stat *st) { diff --git a/src/editfns.c b/src/editfns.c index 28690e7c76d..ec477f0e010 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1476,6 +1476,19 @@ on systems that do not provide resolution finer than a second. */) } +/* Make a Lisp list that represents the time T. */ +Lisp_Object +make_time (time_t t) +{ + return Fcons (make_number (t >> 16), + Fcons (make_number (t & 0177777), Qnil)); +} + +/* Decode a Lisp list SPECIFIED_TIME that represents a time. + If SPECIFIED_TIME is nil, use the current time. + Set *RESULT to seconds since the Epoch. + If USEC is not null, set *USEC to the microseconds component. + Return nonzero if successful. */ int lisp_time_argument (Lisp_Object specified_time, time_t *result, int *usec) { diff --git a/src/systime.h b/src/systime.h index eae302904fa..cb1ea230f7d 100644 --- a/src/systime.h +++ b/src/systime.h @@ -144,10 +144,8 @@ extern void set_waiting_for_input (EMACS_TIME *); happen when this files is used outside the src directory). Use GCPRO1 to determine if lisp.h was included. */ #ifdef GCPRO1 -/* defined in dired.c */ -extern Lisp_Object make_time (time_t); - /* defined in editfns.c*/ +extern Lisp_Object make_time (time_t); extern int lisp_time_argument (Lisp_Object, time_t *, int *); #endif @@ -172,4 +170,3 @@ extern int lisp_time_argument (Lisp_Object, time_t *, int *); #define EMACS_TIME_LE(T1, T2) (EMACS_TIME_CMP (T1, T2) <= 0) #endif /* EMACS_SYSTIME_H */ - From fe31d94c97a6a3702e301a14b84c1f293afe5efd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 11 Mar 2011 12:31:59 -0800 Subject: [PATCH 165/383] * editfns.c (time_overflow): New function, refactoring common code. (Fformat_time_string, Fdecode_time, Fencode_time): (Fcurrent_time_string): Use it. --- src/ChangeLog | 4 ++++ src/editfns.c | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 85100149c92..a0c4941ec1c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-11 Paul Eggert + * editfns.c (time_overflow): New function, refactoring common code. + (Fformat_time_string, Fdecode_time, Fencode_time): + (Fcurrent_time_string): Use it. + Move 'make_time' to be next to its inverse 'lisp_time_argument'. * dired.c (make_time): Move to ... * editfns.c (make_time): ... here. diff --git a/src/editfns.c b/src/editfns.c index ec477f0e010..fe8541f718e 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -87,6 +87,7 @@ extern char **environ; extern Lisp_Object w32_get_internal_run_time (void); #endif +static void time_overflow (void) NO_RETURN; static int tm_diff (struct tm *, struct tm *); static void find_field (Lisp_Object, Lisp_Object, Lisp_Object, EMACS_INT *, Lisp_Object, EMACS_INT *); @@ -1476,6 +1477,13 @@ on systems that do not provide resolution finer than a second. */) } +/* Report a time value that is out of range for Emacs. */ +static void +time_overflow (void) +{ + error ("Specified time is not representable"); +} + /* Make a Lisp list that represents the time T. */ Lisp_Object make_time (time_t t) @@ -1687,7 +1695,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */) tm = ut ? gmtime (&value) : localtime (&value); UNBLOCK_INPUT; if (! tm) - error ("Specified time is not representable"); + time_overflow (); synchronize_system_time_locale (); @@ -1746,7 +1754,7 @@ DOW and ZONE.) */) decoded_time = localtime (&time_spec); UNBLOCK_INPUT; if (! decoded_time) - error ("Specified time is not representable"); + time_overflow (); XSETFASTINT (list_args[0], decoded_time->tm_sec); XSETFASTINT (list_args[1], decoded_time->tm_min); XSETFASTINT (list_args[2], decoded_time->tm_hour); @@ -1859,7 +1867,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) } if (time == (time_t) -1) - error ("Specified time is not representable"); + time_overflow (); return make_time (time); } @@ -1894,7 +1902,7 @@ but this is considered obsolete. */) tm = localtime (&value); UNBLOCK_INPUT; if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) && (tem = asctime (tm)))) - error ("Specified time is not representable"); + time_overflow (); /* Remove the trailing newline. */ tem[strlen (tem) - 1] = '\0'; From 7f0869bd1d2f8681f86b0104dff1392d29634d0e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 11 Mar 2011 17:53:47 -0500 Subject: [PATCH 166/383] admin/notes/elpa: Make Bzr checkout directions more explicit. --- admin/notes/elpa | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/admin/notes/elpa b/admin/notes/elpa index cbea8cc1dfa..db14456fe32 100644 --- a/admin/notes/elpa +++ b/admin/notes/elpa @@ -1,24 +1,24 @@ NOTES ON THE EMACS PACKAGE ARCHIVE -The GNU Emacs package archive, at elpa.gnu.org, is managed using Bzr. -The Bzr branch is hosted on Savannah, and you can check it out with +The GNU Emacs package archive, at elpa.gnu.org, is managed using a Bzr +branch named "elpa", hosted on Savannah. To check it out: bzr branch bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa elpa + cd elpa + echo "public_branch = bzr+ssh://USER@bzr.savannah.gnu.org/emacs/elpa" >> .bzr/branch/branch.conf + bzr bind bzr+ssh://USERNAME@bzr.savannah.gnu.org/emacs/elpa + [create task branch for edits, etc.] -Changes made to this branch propagate to elpa.gnu.org as follows. +Changes to this branch propagate to elpa.gnu.org in a semi-manual way. There exists a copy of the elpa branch on that machine. Someone with -access must log in, pull the latest changes from Savannah, and run a -"deployment" script that generates the content at the web-visible -location http://elpa.gnu.org/packages. +access logs in, pulls the latest changes from Savannah, and runs a +"deployment" script. This script (which is itself kept in the Bzr +branch) generates the content visible at http://elpa.gnu.org/packages. -The reason things are set up this way, instead of using the package -upload utilities in package-x.el, is so that Emacs hackers can easily -edit the contents of the Savannah "elpa" branch, with the aid of -version control. (For instance, multi-file packages are stored on the -Bzr branch in source form, not as tarfiles.) Because deployment is a -semi-manual process, this allows us some flexibility in making changes -to the branch on Savannah. Furthermore, one can use the elpa branch -to deploy a "local" copy of the package archive, for testing. +The reason we set things up this way, instead of using the package +upload commands in package-x.el, is to let Emacs hackers conveniently +edit the contents of the "elpa" branch. (In particular, multi-file +packages are stored on the branch in source form, not as tarfiles.) -For details on how to use the elpa branch, see that README file in -that branch. +It is easy to use the elpa branch to deploy a "local" copy of the +package archive. For details, see the README file in the elpa branch. From bb0bd45af0817b2dfad40187a20effac4d49da06 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 11 Mar 2011 21:49:29 -0500 Subject: [PATCH 167/383] * lisp/ebuff-menu.el (electric-buffer-menu-mode-map): Move initialization into declaration. Remove redundant and harmful binding. --- lisp/ChangeLog | 5 +++ lisp/ebuff-menu.el | 101 +++++++++++++++++++++++---------------------- 2 files changed, 56 insertions(+), 50 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e368e660fe2..bf3775b3852 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-12 Stefan Monnier + + * ebuff-menu.el (electric-buffer-menu-mode-map): Move initialization + into declaration. Remove redundant and harmful binding. + 2011-03-11 Juanma Barranquero Backport revno:103463 from trunk. diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index 7b4c07f74f5..9f9129919da 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -35,7 +35,56 @@ ;; this depends on the format of list-buffers (from src/buffer.c) and ;; on stuff in lisp/buff-menu.el -(defvar electric-buffer-menu-mode-map nil) +(defvar electric-buffer-menu-mode-map + (let ((map (make-keymap))) + (fillarray (car (cdr map)) 'Electric-buffer-menu-undefined) + (define-key map "\e" nil) + (define-key map "\C-z" 'suspend-frame) + (define-key map "v" 'Electric-buffer-menu-mode-view-buffer) + (define-key map (char-to-string help-char) 'Helper-help) + (define-key map "?" 'Helper-describe-bindings) + (define-key map "\C-c" nil) + (define-key map "\C-c\C-c" 'Electric-buffer-menu-quit) + (define-key map "\C-]" 'Electric-buffer-menu-quit) + (define-key map "q" 'Electric-buffer-menu-quit) + (define-key map " " 'Electric-buffer-menu-select) + (define-key map "\C-m" 'Electric-buffer-menu-select) + (define-key map "\C-l" 'recenter) + (define-key map "s" 'Buffer-menu-save) + (define-key map "d" 'Buffer-menu-delete) + (define-key map "k" 'Buffer-menu-delete) + (define-key map "\C-d" 'Buffer-menu-delete-backwards) + ;; (define-key map "\C-k" 'Buffer-menu-delete) + (define-key map "\177" 'Buffer-menu-backup-unmark) + (define-key map "~" 'Buffer-menu-not-modified) + (define-key map "u" 'Buffer-menu-unmark) + (let ((i ?0)) + (while (<= i ?9) + (define-key map (char-to-string i) 'digit-argument) + (define-key map (concat "\e" (char-to-string i)) 'digit-argument) + (setq i (1+ i)))) + (define-key map "-" 'negative-argument) + (define-key map "\e-" 'negative-argument) + (define-key map "m" 'Buffer-menu-mark) + (define-key map "\C-u" 'universal-argument) + (define-key map "\C-p" 'previous-line) + (define-key map "\C-n" 'next-line) + (define-key map "p" 'previous-line) + (define-key map "n" 'next-line) + (define-key map "\C-v" 'scroll-up) + (define-key map "\ev" 'scroll-down) + (define-key map ">" 'scroll-right) + (define-key map "<" 'scroll-left) + (define-key map "\e\C-v" 'scroll-other-window) + (define-key map "\e>" 'end-of-buffer) + (define-key map "\e<" 'beginning-of-buffer) + (define-key map "\e\e" nil) + (define-key map "\e\e\e" 'Electric-buffer-menu-quit) + ;; This binding prevents the "escape => ESC" function-key-map mapping from + ;; kicking in! + ;; (define-key map [escape escape escape] 'Electric-buffer-menu-quit) + (define-key map [mouse-2] 'Electric-buffer-menu-mouse-select) + map)) (defvar electric-buffer-menu-mode-hook nil "Normal hook run by `electric-buffer-list'.") @@ -168,55 +217,7 @@ Entry to this mode via command `electric-buffer-list' calls the value of ;; generally the same as Buffer-menu-mode-map ;; (except we don't indirect to global-map) (put 'Electric-buffer-menu-undefined 'suppress-keymap t) -(if electric-buffer-menu-mode-map - nil - (let ((map (make-keymap))) - (fillarray (car (cdr map)) 'Electric-buffer-menu-undefined) - (define-key map "\e" nil) - (define-key map "\C-z" 'suspend-frame) - (define-key map "v" 'Electric-buffer-menu-mode-view-buffer) - (define-key map (char-to-string help-char) 'Helper-help) - (define-key map "?" 'Helper-describe-bindings) - (define-key map "\C-c" nil) - (define-key map "\C-c\C-c" 'Electric-buffer-menu-quit) - (define-key map "\C-]" 'Electric-buffer-menu-quit) - (define-key map "q" 'Electric-buffer-menu-quit) - (define-key map " " 'Electric-buffer-menu-select) - (define-key map "\C-m" 'Electric-buffer-menu-select) - (define-key map "\C-l" 'recenter) - (define-key map "s" 'Buffer-menu-save) - (define-key map "d" 'Buffer-menu-delete) - (define-key map "k" 'Buffer-menu-delete) - (define-key map "\C-d" 'Buffer-menu-delete-backwards) - ;(define-key map "\C-k" 'Buffer-menu-delete) - (define-key map "\177" 'Buffer-menu-backup-unmark) - (define-key map "~" 'Buffer-menu-not-modified) - (define-key map "u" 'Buffer-menu-unmark) - (let ((i ?0)) - (while (<= i ?9) - (define-key map (char-to-string i) 'digit-argument) - (define-key map (concat "\e" (char-to-string i)) 'digit-argument) - (setq i (1+ i)))) - (define-key map "-" 'negative-argument) - (define-key map "\e-" 'negative-argument) - (define-key map "m" 'Buffer-menu-mark) - (define-key map "\C-u" 'universal-argument) - (define-key map "\C-p" 'previous-line) - (define-key map "\C-n" 'next-line) - (define-key map "p" 'previous-line) - (define-key map "n" 'next-line) - (define-key map "\C-v" 'scroll-up) - (define-key map "\ev" 'scroll-down) - (define-key map ">" 'scroll-right) - (define-key map "<" 'scroll-left) - (define-key map "\e\C-v" 'scroll-other-window) - (define-key map "\e>" 'end-of-buffer) - (define-key map "\e<" 'beginning-of-buffer) - (define-key map "\e\e" nil) - (define-key map "\e\e\e" 'Electric-buffer-menu-quit) - (define-key map [escape escape escape] 'Electric-buffer-menu-quit) - (define-key map [mouse-2] 'Electric-buffer-menu-mouse-select) - (setq electric-buffer-menu-mode-map map))) + (defun Electric-buffer-menu-exit () (interactive) From 3aaaa6f1c9ebd44db3a293e6fd4c08193caf2275 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 11 Mar 2011 21:59:24 -0500 Subject: [PATCH 168/383] * lisp/emacs-lisp/bytecomp.el (byte-compile-make-obsolete-variable): Disable obsolescence warnings in the file that declares it. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/bytecomp.el | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9456644a7a8..087c5b0acbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-12 Stefan Monnier + + * emacs-lisp/bytecomp.el (byte-compile-make-obsolete-variable): + Disable obsolescence warnings in the file that declares it. + 2011-03-11 Ken Manheimer * allout-widgets.el (allout-widgets-tally) Initialize diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2f113dfb479..5e24b80ac5a 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3840,6 +3840,17 @@ that suppresses all warnings during execution of BODY." ,@decls ',(nth 1 form))))) +;; If foo.el declares `toto' as obsolete, it is likely that foo.el will +;; actually use `toto' in order for this obsolete variable to still work +;; correctly, so paradoxically, while byte-compiling foo.el, the presence +;; of a make-obsolete-variable call for `toto' is an indication that `toto' +;; should not trigger obsolete-warnings in foo.el. +(byte-defop-compiler-1 make-obsolete-variable) +(defun byte-compile-make-obsolete-variable (form) + (when (eq 'quote (car-safe (nth 1 form))) + (push (nth 1 (nth 1 form)) byte-compile-not-obsolete-vars)) + (byte-compile-normal-call form)) + (defun byte-compile-defvar (form) ;; This is not used for file-level defvar/consts with doc strings. (when (and (symbolp (nth 1 form)) From 946425995f270514be4d2beca6941c33a70d440e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 11 Mar 2011 23:29:22 -0500 Subject: [PATCH 169/383] * lisp/progmodes/compile.el (compilation--previous-directory): Fix up various nil/dead-marker mismatches. (compilation-directory-properties, compilation-error-properties): Don't call it at a position past the one we're about to change. Fixes: debbugs:8014 --- lisp/ChangeLog | 5 ++++ lisp/progmodes/compile.el | 49 +++++++++++++++++++++------------------ 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 087c5b0acbb..8415861e292 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2011-03-12 Stefan Monnier + * progmodes/compile.el (compilation--previous-directory): Fix up + various nil/dead-marker mismatches (bug#8014). + (compilation-directory-properties, compilation-error-properties): + Don't call it at a position past the one we're about to change. + * emacs-lisp/bytecomp.el (byte-compile-make-obsolete-variable): Disable obsolescence warnings in the file that declares it. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 88f418f934a..40383c6bc31 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -860,27 +860,29 @@ POS and RES.") (car compilation--previous-directory-cache))) (prev (previous-single-property-change - pos 'compilation-directory nil cache))) - (cond - ((null cache) - (setq compilation--previous-directory-cache - (cons (copy-marker pos) (copy-marker prev))) - prev) - ((eq prev cache) - (if cache - (set-marker (car compilation--previous-directory-cache) pos) - (setq compilation--previous-directory-cache - (cons (copy-marker pos) nil))) - (cdr compilation--previous-directory-cache)) - (t - (if cache - (progn - (set-marker (car compilation--previous-directory-cache) pos) - (setcdr compilation--previous-directory-cache - (copy-marker prev))) - (setq compilation--previous-directory-cache - (cons (copy-marker pos) (copy-marker prev)))) - prev))))) + pos 'compilation-directory nil cache)) + (res + (cond + ((null cache) + (setq compilation--previous-directory-cache + (cons (copy-marker pos) (if prev (copy-marker prev)))) + prev) + ((and prev (= prev cache)) + (if cache + (set-marker (car compilation--previous-directory-cache) pos) + (setq compilation--previous-directory-cache + (cons (copy-marker pos) nil))) + (cdr compilation--previous-directory-cache)) + (t + (if cache + (progn + (set-marker cache pos) + (setcdr compilation--previous-directory-cache + (copy-marker prev))) + (setq compilation--previous-directory-cache + (cons (copy-marker pos) (if prev (copy-marker prev))))) + prev)))) + (if (markerp res) (marker-position res) res)))) ;; Internal function for calculating the text properties of a directory ;; change message. The compilation-directory property is important, because it @@ -889,7 +891,7 @@ POS and RES.") (defun compilation-directory-properties (idx leave) (if leave (setq leave (match-end leave))) ;; find previous stack, and push onto it, or if `leave' pop it - (let ((dir (compilation--previous-directory (point)))) + (let ((dir (compilation--previous-directory (match-beginning 0)))) (setq dir (if dir (or (get-text-property (1- dir) 'compilation-directory) (get-text-property dir 'compilation-directory)))) `(font-lock-face ,(if leave @@ -948,7 +950,8 @@ POS and RES.") (match-string-no-properties file)))) (let ((dir (unless (file-name-absolute-p file) - (let ((pos (compilation--previous-directory (point)))) + (let ((pos (compilation--previous-directory + (match-beginning 0)))) (when pos (or (get-text-property (1- pos) 'compilation-directory) (get-text-property pos 'compilation-directory))))))) From b8d9bd41b7daaa35de8335b20af145a808ae9b07 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 11 Mar 2011 22:49:53 -0800 Subject: [PATCH 170/383] Improve quality of tests for time stamp overflow. For example, without this patch (encode-time 0 0 0 1 1 1152921504606846976) returns the obviously-bogus value (-948597 62170) on my RHEL 5.5 x86-64 host. With it, it reports time overflow. * deps.mk (editfns.o): Depend on ../lib/intprops.h. * editfns.c: Include limits.h and intprops.h. (TIME_T_MIN, TIME_T_MAX): New macros. (time_overflow): Move earlier, to before first use. (hi_time, lo_time): New functions, for an accurate test for out-of-range times. (Fcurrent_time, Fget_internal_run_time, make_time): Use them. (Fget_internal_run_time): Don't assume time_t fits in int. (make_time): Use list2 instead of Fcons twice. (Fdecode_time): More accurate test for out-of-range times. (check_tm_member): New function. (Fencode_time): Use it, to test for out-of-range times. --- src/ChangeLog | 19 ++++++++++ src/deps.mk | 3 +- src/editfns.c | 99 ++++++++++++++++++++++++++++++++++++--------------- 3 files changed, 92 insertions(+), 29 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a0c4941ec1c..b3362b9fbca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,22 @@ +2011-03-12 Paul Eggert + + Improve quality of tests for time stamp overflow. For example, + without this patch (encode-time 0 0 0 1 1 1152921504606846976) + returns the obviously-bogus value (-948597 62170) on my RHEL 5.5 + x86-64 host. With it, it reports time overflow. + * deps.mk (editfns.o): Depend on ../lib/intprops.h. + * editfns.c: Include limits.h and intprops.h. + (TIME_T_MIN, TIME_T_MAX): New macros. + (time_overflow): Move earlier, to before first use. + (hi_time, lo_time): New functions, for an accurate test for + out-of-range times. + (Fcurrent_time, Fget_internal_run_time, make_time): Use them. + (Fget_internal_run_time): Don't assume time_t fits in int. + (make_time): Use list2 instead of Fcons twice. + (Fdecode_time): More accurate test for out-of-range times. + (check_tm_member): New function. + (Fencode_time): Use it, to test for out-of-range times. + 2011-03-11 Paul Eggert * editfns.c (time_overflow): New function, refactoring common code. diff --git a/src/deps.mk b/src/deps.mk index 2b162b07bb8..fba856c1be3 100644 --- a/src/deps.mk +++ b/src/deps.mk @@ -87,7 +87,8 @@ dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \ msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \ lisp.h $(config_h) editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ - coding.h frame.h blockinput.h atimer.h ../lib/unistd.h ../lib/strftime.h \ + coding.h frame.h blockinput.h atimer.h \ + ../lib/intprops.h ../lib/strftime.h ../lib/unistd.h \ lisp.h globals.h $(config_h) emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \ termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \ diff --git a/src/editfns.c b/src/editfns.c index fe8541f718e..4e8ac316a8a 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -45,6 +45,8 @@ along with GNU Emacs. If not, see . */ #endif #include +#include +#include #include #include "intervals.h" @@ -1415,6 +1417,44 @@ DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, return make_number (getpid ()); } + + +#ifndef TIME_T_MIN +# define TIME_T_MIN TYPE_MINIMUM (time_t) +#endif +#ifndef TIME_T_MAX +# define TIME_T_MAX TYPE_MAXIMUM (time_t) +#endif + +/* Report that a time value is out of range for Emacs. */ +static void +time_overflow (void) +{ + error ("Specified time is not representable"); +} + +/* Return the upper part of the time T (everything but the bottom 16 bits), + making sure that it is representable. */ +static EMACS_INT +hi_time (time_t t) +{ + time_t hi = t >> 16; + if (((TYPE_SIGNED (time_t) + && TIME_T_MIN >> 16 < MOST_NEGATIVE_FIXNUM + && hi < MOST_NEGATIVE_FIXNUM) + || (MOST_POSITIVE_FIXNUM < TIME_T_MAX >> 16 + && MOST_POSITIVE_FIXNUM < hi))) + time_overflow (); + return hi; +} + +/* Return the bottom 16 bits of the time T. */ +static EMACS_INT +lo_time (time_t t) +{ + return t & ((1 << 16) - 1); +} + DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, doc: /* Return the current time, as the number of seconds since 1970-01-01 00:00:00. The time is returned as a list of three integers. The first has the @@ -1429,8 +1469,8 @@ resolution finer than a second. */) EMACS_TIME t; EMACS_GET_TIME (t); - return list3 (make_number ((EMACS_SECS (t) >> 16) & 0xffff), - make_number ((EMACS_SECS (t) >> 0) & 0xffff), + return list3 (make_number (hi_time (EMACS_SECS (t))), + make_number (lo_time (EMACS_SECS (t))), make_number (EMACS_USECS (t))); } @@ -1449,7 +1489,8 @@ on systems that do not provide resolution finer than a second. */) { #ifdef HAVE_GETRUSAGE struct rusage usage; - int secs, usecs; + time_t secs; + int usecs; if (getrusage (RUSAGE_SELF, &usage) < 0) /* This shouldn't happen. What action is appropriate? */ @@ -1464,8 +1505,8 @@ on systems that do not provide resolution finer than a second. */) secs++; } - return list3 (make_number ((secs >> 16) & 0xffff), - make_number ((secs >> 0) & 0xffff), + return list3 (make_number (hi_time (secs)), + make_number (lo_time (secs)), make_number (usecs)); #else /* ! HAVE_GETRUSAGE */ #ifdef WINDOWSNT @@ -1477,19 +1518,12 @@ on systems that do not provide resolution finer than a second. */) } -/* Report a time value that is out of range for Emacs. */ -static void -time_overflow (void) -{ - error ("Specified time is not representable"); -} - /* Make a Lisp list that represents the time T. */ Lisp_Object make_time (time_t t) { - return Fcons (make_number (t >> 16), - Fcons (make_number (t & 0177777), Qnil)); + return list2 (make_number (hi_time (t)), + make_number (lo_time (t))); } /* Decode a Lisp list SPECIFIED_TIME that represents a time. @@ -1753,7 +1787,9 @@ DOW and ZONE.) */) BLOCK_INPUT; decoded_time = localtime (&time_spec); UNBLOCK_INPUT; - if (! decoded_time) + if (! (decoded_time + && MOST_NEGATIVE_FIXNUM - TM_YEAR_BASE <= decoded_time->tm_year + && decoded_time->tm_year <= MOST_POSITIVE_FIXNUM - TM_YEAR_BASE)) time_overflow (); XSETFASTINT (list_args[0], decoded_time->tm_sec); XSETFASTINT (list_args[1], decoded_time->tm_min); @@ -1778,6 +1814,20 @@ DOW and ZONE.) */) return Flist (9, list_args); } +/* Return OBJ - OFFSET, checking that OBJ is a valid fixnum and that + the result is representable as an int. Assume OFFSET is small and + nonnegative. */ +static int +check_tm_member (Lisp_Object obj, int offset) +{ + EMACS_INT n; + CHECK_NUMBER (obj); + n = XINT (obj); + if (! (INT_MIN + offset <= n && n - offset <= INT_MAX)) + time_overflow (); + return n - offset; +} + DEFUN ("encode-time", Fencode_time, Sencode_time, 6, MANY, 0, doc: /* Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time. This is the reverse operation of `decode-time', which see. @@ -1806,19 +1856,12 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) struct tm tm; Lisp_Object zone = (nargs > 6 ? args[nargs - 1] : Qnil); - CHECK_NUMBER (args[0]); /* second */ - CHECK_NUMBER (args[1]); /* minute */ - CHECK_NUMBER (args[2]); /* hour */ - CHECK_NUMBER (args[3]); /* day */ - CHECK_NUMBER (args[4]); /* month */ - CHECK_NUMBER (args[5]); /* year */ - - tm.tm_sec = XINT (args[0]); - tm.tm_min = XINT (args[1]); - tm.tm_hour = XINT (args[2]); - tm.tm_mday = XINT (args[3]); - tm.tm_mon = XINT (args[4]) - 1; - tm.tm_year = XINT (args[5]) - TM_YEAR_BASE; + tm.tm_sec = check_tm_member (args[0], 0); + tm.tm_min = check_tm_member (args[1], 0); + tm.tm_hour = check_tm_member (args[2], 0); + tm.tm_mday = check_tm_member (args[3], 0); + tm.tm_mon = check_tm_member (args[4], 1); + tm.tm_year = check_tm_member (args[5], TM_YEAR_BASE); tm.tm_isdst = -1; if (CONSP (zone)) From a276370e0a8c9434ce0ae2ba72fa6acd69570a0d Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Sat, 12 Mar 2011 08:53:34 +0000 Subject: [PATCH 171/383] Merge changes made in Gnus trunk. gnus-sync.el (gnus-sync-install-hooks, gnus-sync-unload-hook): Don't install `gnus-sync-read' to any hooks by default. It's buggy. The user will have to run `gnus-sync-read' manually and wait for Cloudy Gnus. mm-uu.el (mm-uu-type-alist): Add support for diff starting with "=== modified file". --- lisp/gnus/ChangeLog | 12 ++++++++++++ lisp/gnus/gnus-sync.el | 12 +++++++----- lisp/gnus/mm-uu.el | 6 ++++++ 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index dbd52c5fece..2737004615e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,15 @@ +2011-03-11 Teodor Zlatanov + + * gnus-sync.el (gnus-sync-install-hooks, gnus-sync-unload-hook): Don't + install `gnus-sync-read' to any hooks by default. It's buggy. The + user will have to run `gnus-sync-read' manually and wait for Cloudy + Gnus. + +2011-03-11 Julien Danjou + + * mm-uu.el (mm-uu-type-alist): Add support for diff starting with "=== + modified file". + 2011-03-09 Teodor Zlatanov * auth-source.el (auth-source-read-char-choice): New function to read a diff --git a/lisp/gnus/gnus-sync.el b/lisp/gnus/gnus-sync.el index 892b10a0d0e..fbdacdd2fbe 100644 --- a/lisp/gnus/gnus-sync.el +++ b/lisp/gnus/gnus-sync.el @@ -25,7 +25,8 @@ ;; This is the gnus-sync.el package. ;; It's due for a rewrite using gnus-after-set-mark-hook and -;; gnus-before-update-mark-hook. Until then please consider it +;; gnus-before-update-mark-hook, and my plan is to do this once No +;; Gnus development is done. Until then please consider it ;; experimental. ;; Put this in your startup file (~/.gnus.el for instance) @@ -42,7 +43,8 @@ ;; TODO: -;; - after gnus-sync-read, the message counts are wrong +;; - after gnus-sync-read, the message counts are wrong. So it's not +;; run automatically, you have to call it with M-x gnus-sync-read ;; - use gnus-after-set-mark-hook and gnus-before-update-mark-hook to ;; catch the mark updates @@ -220,13 +222,13 @@ synchronized, I believe). Also see `gnus-variable-list'." "Install the sync hooks." (interactive) ;; (add-hook 'gnus-get-new-news-hook 'gnus-sync-read) - (add-hook 'gnus-save-newsrc-hook 'gnus-sync-save) - (add-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read)) + ;; (add-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read) + (add-hook 'gnus-save-newsrc-hook 'gnus-sync-save)) (defun gnus-sync-unload-hook () "Uninstall the sync hooks." (interactive) - ;; (remove-hook 'gnus-get-new-news-hook 'gnus-sync-read) + (remove-hook 'gnus-get-new-news-hook 'gnus-sync-read) (remove-hook 'gnus-save-newsrc-hook 'gnus-sync-save) (remove-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read)) diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index 14b44198303..96dce48a774 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -158,6 +158,12 @@ This can be either \"inline\" or \"attachment\".") mm-uu-diff-extract nil mm-uu-diff-test) + (diff + "^=== modified file " + nil + mm-uu-diff-extract + nil + mm-uu-diff-test) (git-format-patch "^diff --git " "^-- " From 7ac80be95aaa92eacb454d4fa6aa3d2f56058978 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Mar 2011 12:51:31 +0200 Subject: [PATCH 172/383] Fix compilation warnings on MS-DOS due to constifying of pointers in xmenu.c. src/msdos.c (XMenuAddPane): 3rd argument is `const char *' now. Adapt all references accordingly. src/msdos.h (XMenuAddPane): 3rd argument is `const char *' now. --- src/ChangeLog | 7 +++++++ src/msdos.c | 6 +++--- src/msdos.h | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4b54abe08dd..8534c3b455f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-03-12 Eli Zaretskii + + * msdos.c (XMenuAddPane): 3rd argument is `const char *' now. + Adapt all references accordingly. + + * msdos.h (XMenuAddPane): 3rd argument is `const char *' now. + 2011-03-11 Tom Tromey * buffer.c (syms_of_buffer): Remove obsolete comment. diff --git a/src/msdos.c b/src/msdos.c index 5d50749cb7e..b0bf5c4fdd9 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -2999,17 +2999,17 @@ XMenuCreate (Display *foo1, Window foo2, char *foo3) to do. */ int -XMenuAddPane (Display *foo, XMenu *menu, char *txt, int enable) +XMenuAddPane (Display *foo, XMenu *menu, const char *txt, int enable) { int len; - char *p; + const char *p; if (!enable) abort (); IT_menu_make_room (menu); menu->submenu[menu->count] = IT_menu_create (); - menu->text[menu->count] = txt; + menu->text[menu->count] = (char *)txt; menu->panenumber[menu->count] = ++menu->panecount; menu->help_text[menu->count] = NULL; menu->count++; diff --git a/src/msdos.h b/src/msdos.h index 4bbe9b134de..5051f2f3837 100644 --- a/src/msdos.h +++ b/src/msdos.h @@ -105,7 +105,7 @@ typedef struct x_menu_struct } XMenu; XMenu *XMenuCreate (Display *, Window, char *); -int XMenuAddPane (Display *, XMenu *, char *, int); +int XMenuAddPane (Display *, XMenu *, const char *, int); int XMenuAddSelection (Display *, XMenu *, int, int, char *, int, char *); void XMenuLocate (Display *, XMenu *, int, int, int, int, int *, int *, int *, int *); From 058e5dad0e18c6c67cf8ad7681f98f0768b60f31 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Mar 2011 14:03:24 +0200 Subject: [PATCH 173/383] Make termcap.c implementations consistent with tparam.h prototypes. src/termcap.c [MSDOS]: Include "msdos.h. (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent): Constify `char *' arguments and their references according to prototypes in tparam.h. src/deps.mk (termcap.o): Depend on tparam.h and msdos.h. --- src/ChangeLog | 7 +++++++ src/deps.mk | 2 +- src/termcap.c | 18 +++++++++++------- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8534c3b455f..9e4023e996a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2011-03-12 Eli Zaretskii + * termcap.c [MSDOS]: Include "msdos.h. + (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent): + Constify `char *' arguments and their references according to + prototypes in tparam.h. + + * deps.mk (termcap.o): Depend on tparam.h. + * msdos.c (XMenuAddPane): 3rd argument is `const char *' now. Adapt all references accordingly. diff --git a/src/deps.mk b/src/deps.mk index 2b162b07bb8..d3a21cfe628 100644 --- a/src/deps.mk +++ b/src/deps.mk @@ -191,7 +191,7 @@ term.o: term.c termchar.h termhooks.h termopts.h lisp.h globals.h $(config_h) \ cm.h frame.h disptab.h keyboard.h character.h charset.h coding.h ccl.h \ xterm.h msdos.h window.h keymap.h blockinput.h atimer.h systime.h \ systty.h syssignal.h tparam.h $(INTERVALS_H) buffer.h ../lib/unistd.h -termcap.o: termcap.c lisp.h $(config_h) +termcap.o: termcap.c lisp.h tparam.h msdos.h $(config_h) terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \ keyboard.h lisp.h globals.h $(config_h) dispextern.h composite.h systime.h \ msdos.h diff --git a/src/termcap.c b/src/termcap.c index 69ce56d93b3..27a20a67ae1 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -25,6 +25,10 @@ Boston, MA 02110-1301, USA. */ #include #include "lisp.h" +#include "tparam.h" +#ifdef MSDOS +#include "msdos.h" +#endif #ifndef NULL #define NULL (char *) 0 @@ -65,7 +69,7 @@ static char *tgetst1 (char *ptr, char **area); 0 if not found. */ static char * -find_capability (register char *bp, register char *cap) +find_capability (register char *bp, register const char *cap) { for (; *bp; bp++) if (bp[0] == ':' @@ -76,7 +80,7 @@ find_capability (register char *bp, register char *cap) } int -tgetnum (char *cap) +tgetnum (const char *cap) { register char *ptr = find_capability (term_entry, cap); if (!ptr || ptr[-1] != '#') @@ -85,7 +89,7 @@ tgetnum (char *cap) } int -tgetflag (char *cap) +tgetflag (const char *cap) { register char *ptr = find_capability (term_entry, cap); return ptr && ptr[-1] == ':'; @@ -97,7 +101,7 @@ tgetflag (char *cap) If AREA is null, space is allocated with `malloc'. */ char * -tgetstr (char *cap, char **area) +tgetstr (const char *cap, char **area) { register char *ptr = find_capability (term_entry, cap); if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~')) @@ -263,7 +267,7 @@ tgetst1 (char *ptr, char **area) char PC; void -tputs (register char *str, int nlines, register int (*outfun) (/* ??? */)) +tputs (register const char *str, int nlines, int (*outfun) (int)) { register int padcount = 0; register int speed; @@ -355,7 +359,7 @@ valid_filename_p (fn) in it, and some other value otherwise. */ int -tgetent (char *bp, char *name) +tgetent (char *bp, const char *name) { register char *termcap_name; register int fd; @@ -442,7 +446,7 @@ tgetent (char *bp, char *name) buf.size = BUFSIZE; /* Add 1 to size to ensure room for terminating null. */ buf.beg = (char *) xmalloc (buf.size + 1); - term = indirect ? indirect : name; + term = indirect ? indirect : (char *)name; if (!bp) { From ecb0f94d1879163e49de80fe46dd2bee94615331 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Mar 2011 14:05:05 +0200 Subject: [PATCH 174/383] src/ChangeLog: Fix last entry for deps.mk. --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9e4023e996a..5976265ef85 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,7 +5,7 @@ Constify `char *' arguments and their references according to prototypes in tparam.h. - * deps.mk (termcap.o): Depend on tparam.h. + * deps.mk (termcap.o): Depend on tparam.h and msdos.h. * msdos.c (XMenuAddPane): 3rd argument is `const char *' now. Adapt all references accordingly. From 1e08a4a15654e2b3c6c75a8f252d9047ad3c0479 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 12 Mar 2011 14:17:54 +0100 Subject: [PATCH 175/383] Remove arch-tag. * trampver.texi: Update release number. --- doc/misc/ChangeLog | 4 ++++ doc/misc/tramp.texi | 4 ---- doc/misc/trampver.texi | 10 +++------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index c0bd2f2778c..6c9557cb0ee 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2011-03-12 Michael Albinus + + * trampver.texi: Update release number. + 2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index f76df61335c..542e649aeab 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -3660,7 +3660,3 @@ for @value{emacsothername}. @c * Use `filename' resp. `file name' consistently. @c * Use `host' resp. `machine' consistently. @c * Consistent small or capitalized words especially in menues. - -@ignore - arch-tag: f96dd66e-6dd3-4c92-8d77-9c56205ba808 -@end ignore diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 1cfcba637ae..6e0674c4cb3 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -2,14 +2,14 @@ @c texi/trampver.texi. Generated from trampver.texi.in by configure. @c This is part of the Emacs manual. -@c Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, -@c 2010, 2011 Free Software Foundation, Inc. +@c Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +@c 2011 Free Software Foundation, Inc. @c See file doclicense.texi for copying conditions. @c In the Tramp CVS, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.1.20 +@set trampver 2.1.21-pre @c Other flags from configuration @set instprefix /usr/local @@ -75,7 +75,3 @@ @set emacsotherfilename tramp-emacs.html @set japanesemanual tramp_ja-xemacs.html @end ifset - -@ignore - arch-tag: e0fe322c-e06b-46eb-bb5b-d091b521f41c -@end ignore From 6efb972c00a9ea8ffa84118199aa59c2d3a3b50e Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 12 Mar 2011 14:26:19 +0100 Subject: [PATCH 176/383] * net/tramp.el (tramp-progress-reporter-update): Use `tramp-compat-funcall'. (tramp-handle-start-file-process): Use `tramp-compat-process-get'. (tramp-handle-insert-file-contents): Make `file-remote-p' call compatible. (tramp-open-connection-setup-interactive-shell): Use `tramp-compat-process-put'. * net/tramp-compat.el (tramp-compat-process-get) (tramp-compat-process-put): New defuns. * net/trampver.el: Update release number. Please do not merge with the trunk. --- lisp/ChangeLog | 15 +++++++++++++++ lisp/net/tramp-compat.el | 12 ++++++++++++ lisp/net/tramp.el | 11 +++++++---- lisp/net/trampver.el | 8 ++++---- 4 files changed, 38 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bf3775b3852..b232ea61ee8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2011-03-12 Michael Albinus + + * net/tramp.el (tramp-progress-reporter-update): Use + `tramp-compat-funcall'. + (tramp-handle-start-file-process): Use `tramp-compat-process-get'. + (tramp-handle-insert-file-contents): Make `file-remote-p' call + compatible. + (tramp-open-connection-setup-interactive-shell): Use + `tramp-compat-process-put'. + + * net/tramp-compat.el (tramp-compat-process-get) + (tramp-compat-process-put): New defuns. + + * net/trampver.el: Update release number. + 2011-03-12 Stefan Monnier * ebuff-menu.el (electric-buffer-menu-mode-map): Move initialization diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 3170e5aba06..beb380d5e6f 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -438,6 +438,18 @@ element is not omitted." (setenv "UNIX95" unix95) result))))) +;; The following functions do not exist in XEmacs. We ignore this; +;; they are used for checking a remote tty. +(defun tramp-compat-process-get (process propname) + "Return the value of PROCESS' PROPNAME property. +This is the last value stored with `(process-put PROCESS PROPNAME VALUE)'." + (ignore-errors (tramp-compat-funcall 'process-get process propname))) + +(defun tramp-compat-process-put (process propname value) + "Change PROCESS' PROPNAME property to VALUE. +It can be retrieved with `(process-get PROCESS PROPNAME)'." + (ignore-errors (tramp-compat-funcall 'process-put process propname value))) + (provide 'tramp-compat) ;;; TODO: diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index c40d65ca913..c80420eb17c 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2313,7 +2313,7 @@ FILE must be a local file name on a connection identified via VEC." (let* ((parameters (cdr reporter)) (message (aref parameters 3))) (when (string-match message (or (current-message) "")) - (funcall 'progress-reporter-update reporter value)))) + (tramp-compat-funcall 'progress-reporter-update reporter value)))) (defmacro with-progress-reporter (vec level message &rest body) "Executes BODY, spinning a progress reporter with MESSAGE. @@ -4570,7 +4570,7 @@ beginning of local filename are not substituted." (tramp-send-command v command nil t) ; nooutput ;; Check, whether a pty is associated. (tramp-maybe-open-connection v) - (unless (process-get + (unless (tramp-compat-process-get (tramp-get-connection-process v) 'remote-tty) (tramp-error v 'file-error @@ -5025,7 +5025,9 @@ coding system might not be determined. This function repairs it." (set-visited-file-modtime) (set-buffer-modified-p nil) ;; For root, preserve owner and group when editing files. - (when (string-equal (file-remote-p filename 'user) "root") + (when (string-equal + (tramp-file-name-handler 'file-remote-p filename 'user) + "root") (set (make-local-variable 'backup-by-copying-when-mismatch) t))) (when (and (stringp local-copy) (or remote-copy (null tramp-temp-buffer-file-name))) @@ -7111,7 +7113,8 @@ process to set up. VEC specifies the connection." ;; 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)))) + (unless (zerop (length tty)) + (tramp-compat-process-put proc 'remote-tty tty)))) ;; Dump stty settings in the traces. (when (>= tramp-verbose 9) diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 80e06121f83..0fc0cd3657b 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -1,8 +1,8 @@ ;;; trampver.el --- Transparent Remote Access, Multiple Protocol ;;; lisp/trampver.el. Generated from trampver.el.in by configure. -;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, -;; 2010, 2011 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +;; 2011 Free Software Foundation, Inc. ;; Author: Kai Großjohann ;; Keywords: comm, processes @@ -30,14 +30,14 @@ ;; version check is defined in macro AC_EMACS_INFO of aclocal.m4; ;; should be changed only there. -(defconst tramp-version "2.1.20" +(defconst tramp-version "2.1.21-pre" "This version of Tramp.") (defconst tramp-bug-report-address "tramp-devel@gnu.org" "Email address to send bug reports to.") ;; Check for (X)Emacs version. -(let ((x (if (or (>= emacs-major-version 22) (and (featurep 'xemacs) (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" (format "Tramp 2.1.20 is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) +(let ((x (if (or (>= emacs-major-version 22) (and (featurep 'xemacs) (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" (format "Tramp 2.1.21-pre is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) (provide 'trampver) From f3afd36bad9bc292e23dc638d6a80c636954cfc0 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 12 Mar 2011 16:19:29 +0100 Subject: [PATCH 177/383] Sync with Tramp 2.2.1. * net/tramp-sh.el (tramp-methods): Exchange "%k" marker with options. * net/trampver.el: Update release number. --- lisp/ChangeLog | 8 ++++++++ lisp/net/tramp-sh.el | 24 ++++++++++++------------ lisp/net/trampver.el | 4 ++-- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8415861e292..cb7272ded58 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2011-03-12 Michael Albinus + + Sync with Tramp 2.2.1. + + * net/tramp-sh.el (tramp-methods): Exchange "%k" marker with options. + + * net/trampver.el: Update release number. + 2011-03-12 Stefan Monnier * progmodes/compile.el (compilation--previous-directory): Fix up diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index ec75ea78fe1..ec5c46b2897 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -90,7 +90,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-login-args (("%h") ("-l" "%u"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "rcp") - (tramp-copy-args (("%k" "-p") ("-r"))) + (tramp-copy-args (("-p" "%k") ("-r"))) (tramp-copy-keep-date t) (tramp-copy-recursive t))) ;;;###tramp-autoload @@ -100,7 +100,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-login-args (("%h") ("-l" "%u"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "rcp") - (tramp-copy-args (("%k" "-p"))) + (tramp-copy-args (("-p" "%k"))) (tramp-copy-keep-date t))) ;;;###tramp-autoload (add-to-list 'tramp-methods @@ -110,7 +110,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") - (tramp-copy-args (("-P" "%p") ("%k" "-p") ("-q") ("-r"))) + (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r"))) (tramp-copy-keep-date t) (tramp-copy-recursive t) (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") @@ -126,7 +126,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") - (tramp-copy-args (("-1") ("-P" "%p") ("%k" "-p") ("-q") ("-r"))) + (tramp-copy-args (("-1") ("-P" "%p") ("-p" "%k") ("-q") ("-r"))) (tramp-copy-keep-date t) (tramp-copy-recursive t) (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") @@ -142,7 +142,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") - (tramp-copy-args (("-2") ("-P" "%p") ("%k" "-p") ("-q") ("-r"))) + (tramp-copy-args (("-2") ("-P" "%p") ("-p" "%k") ("-q") ("-r"))) (tramp-copy-keep-date t) (tramp-copy-recursive t) (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") @@ -160,7 +160,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") - (tramp-copy-args (("-P" "%p") ("%k" "-p") ("-q") ("-r") + (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r") ("-o" "ControlPath=%t.%%r@%%h:%%p") ("-o" "ControlMaster=auto"))) (tramp-copy-keep-date t) @@ -179,7 +179,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "scp") - (tramp-copy-args (("-P" "%p") ("%k" "-p") ("-q") ("-r"))) + (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r"))) (tramp-copy-keep-date t) (tramp-copy-recursive t) (tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null") @@ -202,7 +202,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "rsync") - (tramp-copy-args (("-e" "ssh") ("%k" "-t") ("-r"))) + (tramp-copy-args (("-e" "ssh") ("-t" "%k") ("-r"))) (tramp-copy-keep-date t) (tramp-copy-keep-tmpfile t) (tramp-copy-recursive t))) @@ -217,7 +217,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-async-args (("-q"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "rsync") - (tramp-copy-args (("%k" "-t") ("-r"))) + (tramp-copy-args (("-t" "%k") ("-r"))) (tramp-copy-env (("RSYNC_RSH") (,(concat "ssh" @@ -353,7 +353,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "pscp") - (tramp-copy-args (("-P" "%p") ("-scp") ("%k" "-p") + (tramp-copy-args (("-P" "%p") ("-scp") ("-p" "%k") ("-q") ("-r"))) (tramp-copy-keep-date t) (tramp-copy-recursive t) @@ -366,7 +366,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-login-args (("-l" "%u") ("-P" "%p") ("-ssh") ("%h"))) (tramp-remote-sh "/bin/sh") (tramp-copy-program "pscp") - (tramp-copy-args (("-P" "%p") ("-sftp") ("%k" "-p") + (tramp-copy-args (("-P" "%p") ("-sftp") ("-p" "%k") ("-q") ("-r"))) (tramp-copy-keep-date t) (tramp-copy-recursive t) @@ -378,7 +378,7 @@ detected as prompt when being sent on echoing hosts, therefore.") (tramp-login-args (("%h") ("-l" "%u") ("sh" "-i"))) (tramp-remote-sh "/bin/sh -i") (tramp-copy-program "fcp") - (tramp-copy-args (("%k" "-p"))) + (tramp-copy-args (("-p" "%k"))) (tramp-copy-keep-date t))) ;;;###tramp-autoload diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 1f3064c7066..462b8f11397 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -31,7 +31,7 @@ ;; should be changed only there. ;;;###tramp-autoload -(defconst tramp-version "2.2.1-pre" +(defconst tramp-version "2.2.1" "This version of Tramp.") ;;;###tramp-autoload @@ -44,7 +44,7 @@ (= emacs-major-version 21) (>= emacs-minor-version 4))) "ok" - (format "Tramp 2.2.1-pre is not fit for %s" + (format "Tramp 2.2.1 is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version))))))) (unless (string-match "\\`ok\\'" x) (error "%s" x))) From 0c3b25f89b56d7cf2721dee4893a4fe1c25a030d Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 12 Mar 2011 16:22:10 +0100 Subject: [PATCH 178/383] Sync with Tramp 2.2.1. * trampver.texi: Update release number. --- doc/misc/ChangeLog | 6 ++++++ doc/misc/trampver.texi | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 59ad3076684..b27b1aae5b7 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-12 Michael Albinus + + Sync with Tramp 2.2.1. + + * trampver.texi: Update release number. + 2011-03-11 Glenn Morris * Makefile.in (HTML_TARGETS): New. diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index 437b1372c11..e4c444980c8 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -8,7 +8,7 @@ @c In the Tramp CVS, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.2.1-pre +@set trampver 2.2.1 @c Other flags from configuration @set instprefix /usr/local From 70620cbe32b2623da09c904cc4d17652747c029d Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 12 Mar 2011 16:26:33 +0100 Subject: [PATCH 179/383] lisp/vc/vc-bzr.el (vc-bzr-state): Handle bzr 2.3.0 (follow-up to bug#8170). --- lisp/ChangeLog | 4 ++++ lisp/vc/vc-bzr.el | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cb7272ded58..429a86ad0e4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -6,6 +6,10 @@ * net/trampver.el: Update release number. +2011-03-12 Juanma Barranquero + + * vc/vc-bzr.el (vc-bzr-state): Handle bzr 2.3.0 (follow-up to bug#8170). + 2011-03-12 Stefan Monnier * progmodes/compile.el (compilation--previous-directory): Fix up diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index a0a16601ed7..21cb86a9840 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -435,8 +435,13 @@ If any error occurred in running `bzr status', then return nil." (defun vc-bzr-state (file) (lexical-let ((result (vc-bzr-status file))) (when (consp result) - (when (cdr result) - (message "Warnings in `bzr' output: %s" (cdr result))) + (let ((warnings (cdr result))) + (when warnings + ;; bzr 2.3.0 returns info about shelves, which is not really a warning + (when (string-match "[1-9]+ shel\\(f\\|ves\\) exists?\\..*?\n" warnings) + (setq warnings (replace-match "" nil nil warnings))) + (unless (string= warnings "") + (message "Warnings in `bzr' output: %s" warnings)))) (cdr (assq (car result) '((added . added) (kindchanged . edited) From 219bd53686e5b05b609abe399be26a567f909f64 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 12 Mar 2011 16:38:34 +0100 Subject: [PATCH 180/383] Fix typos. --- lisp/ChangeLog | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 429a86ad0e4..5f5484af8f2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-12 Juanma Barranquero + + * vc/vc-bzr.el (vc-bzr-state): Handle bzr 2.3.0 (follow-up to bug#8170). + 2011-03-12 Michael Albinus Sync with Tramp 2.2.1. @@ -6,10 +10,6 @@ * net/trampver.el: Update release number. -2011-03-12 Juanma Barranquero - - * vc/vc-bzr.el (vc-bzr-state): Handle bzr 2.3.0 (follow-up to bug#8170). - 2011-03-12 Stefan Monnier * progmodes/compile.el (compilation--previous-directory): Fix up @@ -22,12 +22,11 @@ 2011-03-11 Ken Manheimer - * allout-widgets.el (allout-widgets-tally) Initialize + * allout-widgets.el (allout-widgets-tally): Initialize allout-widgets-tally as a hash table rather than nil to prevent mode-line redisplay warnings. Also, clarify the module description and fix a comment typo. - 2011-03-11 Juanma Barranquero * help-fns.el (describe-variable): Don't complete keywords. @@ -77,7 +76,7 @@ preserves the existing header prefix, rebulleting it if necessary, rather than replacing it. This is necessary for proper operation of cooperative addons like allout-widgets. - (allout-make-topic-prefix) (allout-rebullet-heading): Change + (allout-make-topic-prefix, allout-rebullet-heading): Change SOLICIT arg to INSTEAD, and interpret additionally a string value as alternate bullet to be used, instead of prompting the user for a bullet character. @@ -913,7 +912,7 @@ 2011-02-17 Ken Manheimer * lisp/allout-widgets.el (allout-widgets-icons-light-subdir) - (allout-widgets-icons-dark-subdir): Track relocations of icons + (allout-widgets-icons-dark-subdir): Track relocations of icons. * lisp/allout.el: Remove commentary about remove encryption passphrase mnemonic support and verification. (allout-encrypt-string): Recognize epg failure to decrypt gpg2 @@ -1290,10 +1289,9 @@ (allout-auto-activation-helper, allout-setup): New autoloads implement new custom set procedure for allout-auto-activation. - Also, explicitly invoke - (allout-setup) after allout-auto-activation is custom-defined, to - effect the settings in emacs sessions besides the few where - allout-auto-activation customization is donea. + Also, explicitly invoke (allout-setup) after allout-auto-activation + is custom-defined, to affect the settings in emacs sessions besides + the few where allout-auto-activation customization is done. (allout-auto-activation): Use allout-auto-activation-helper to :set. Revise the docstring. (allout-init): Reduce functionality to just customizing From 54ce11a161cd756047fccdfc128dc0527692ea06 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 12 Mar 2011 10:40:08 -0800 Subject: [PATCH 181/383] Some more html rules for doc/misc/Makefile.in. * doc/misc/Makefile.in (emacs-faq.html): Fix some more cross-refs. (emacs-faq.text): New target. (clean): Add emacs-faq. --- doc/misc/ChangeLog | 6 ++++++ doc/misc/Makefile.in | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index b27b1aae5b7..1a1ca1d6296 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-12 Glenn Morris + + * Makefile.in (emacs-faq.html): Fix some more cross-refs. + (emacs-faq.text): New target. + (clean): Add emacs-faq. + 2011-03-12 Michael Albinus Sync with Tramp 2.2.1. diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 6ecf6bc02f8..450199a33c5 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -408,7 +408,10 @@ faq.pdf: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi emacs-faq.html: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi $(MAKEINFO) $(MAKEINFO_OPTS) --no-split \ --css-ref='/layout.css' --html -o $@ $< - sed -i 's|a href="emacs.html#\([^"]*\)"|a href="manual/html_node/emacs/\1.html"|g' $@ + sed -i -e 's|a href="\([a-z]*\)\.html#\([^"]*\)"|a href="manual/html_node/\1/\2.html"|g' \ + -e 's|/Top\.html|/|g' $@ +emacs-faq.text: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi + $(MAKEINFO) $(MAKEINFO_OPTS) --plaintext -o $@ $< flymake : $(infodir)/flymake $(infodir)/flymake: flymake.texi @@ -692,7 +695,7 @@ mostlyclean: rm -f gnustmp.* clean: mostlyclean - rm -f $(DVI_TARGETS) $(PDF_TARGETS) $(HTML_TARGETS) + rm -f $(DVI_TARGETS) $(PDF_TARGETS) $(HTML_TARGETS) emacs-faq.text distclean: clean # rm -f Makefile From ad22b7f7c16aa6c26df6ec1e1c192dde2e1b0cce Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 12 Mar 2011 20:44:42 +0100 Subject: [PATCH 182/383] lisp/avoid.el: Fix typos in docstrings. --- lisp/ChangeLog | 6 ++++++ lisp/avoid.el | 15 +++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b232ea61ee8..29b47595eb6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-12 Juanma Barranquero + + * avoid.el (mouse-avoidance-mode, mouse-avoidance-nudge-dist) + (mouse-avoidance-threshold, mouse-avoidance-banish-destination) + (mouse-avoidance-mode): Fix typos in docstrings. + 2011-03-12 Michael Albinus * net/tramp.el (tramp-progress-reporter-update): Use diff --git a/lisp/avoid.el b/lisp/avoid.el index 31833994323..c9c989b2ab9 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el @@ -77,7 +77,7 @@ ;;;###autoload (defcustom mouse-avoidance-mode nil - "Activate mouse avoidance mode. + "Activate Mouse Avoidance mode. See function `mouse-avoidance-mode' for possible values. Setting this variable directly does not take effect; use either \\[customize] or the function `mouse-avoidance-mode'." @@ -86,8 +86,7 @@ use either \\[customize] or the function `mouse-avoidance-mode'." (mouse-avoidance-mode (or value 'none))) :initialize 'custom-initialize-default :type '(choice (const :tag "none" nil) (const banish) (const jump) - (const animate) (const exile) (const proteus) - ) + (const animate) (const exile) (const proteus)) :group 'avoid :require 'avoid :version "20.3") @@ -95,7 +94,7 @@ use either \\[customize] or the function `mouse-avoidance-mode'." (defcustom mouse-avoidance-nudge-dist 15 "Average distance that mouse will be moved when approached by cursor. -Only applies in Mouse-Avoidance mode `jump' and its derivatives. +Only applies in Mouse Avoidance mode `jump' and its derivatives. For best results make this larger than `mouse-avoidance-threshold'." :type 'integer :group 'avoid) @@ -113,7 +112,7 @@ For best results make this larger than `mouse-avoidance-threshold'." (defcustom mouse-avoidance-threshold 5 "Mouse-pointer's flight distance. If the cursor gets closer than this, the mouse pointer will move away. -Only applies in mouse-avoidance-modes `animate' and `jump'." +Only applies in Mouse Avoidance modes `animate' and `jump'." :type 'integer :group 'avoid) @@ -184,7 +183,7 @@ Acceptable distance is defined by `mouse-avoidance-threshold'." mouse-avoidance-threshold)))))) (defun mouse-avoidance-banish-destination () - "The position to which Mouse-Avoidance mode `banish' moves the mouse. + "The position to which Mouse Avoidance mode `banish' moves the mouse. You can redefine this if you want the mouse banished to a different corner." (let* ((pos (window-edges))) (cons (- (nth 2 pos) 2) @@ -332,7 +331,7 @@ redefine this function to suit your own tastes." ;;;###autoload (defun mouse-avoidance-mode (&optional mode) - "Set cursor avoidance mode to MODE. + "Set Mouse Avoidance mode to MODE. MODE should be one of the symbols `banish', `exile', `jump', `animate', `cat-and-mouse', `proteus', or `none'. @@ -352,7 +351,7 @@ Effects of the different modes: Whenever the mouse is moved, the frame is also raised. -\(see `mouse-avoidance-threshold' for definition of \"too close\", +\(See `mouse-avoidance-threshold' for definition of \"too close\", and `mouse-avoidance-nudge-dist' and `mouse-avoidance-nudge-var' for definition of \"random distance\".)" (interactive From 803110b53623077719e4a9d301e416f31007c946 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 12 Mar 2011 14:52:25 -0800 Subject: [PATCH 183/383] * editfns.c (hi_time): Do not overparenthesize. --- src/editfns.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/editfns.c b/src/editfns.c index 4e8ac316a8a..e55502bdb89 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1439,11 +1439,11 @@ static EMACS_INT hi_time (time_t t) { time_t hi = t >> 16; - if (((TYPE_SIGNED (time_t) - && TIME_T_MIN >> 16 < MOST_NEGATIVE_FIXNUM - && hi < MOST_NEGATIVE_FIXNUM) - || (MOST_POSITIVE_FIXNUM < TIME_T_MAX >> 16 - && MOST_POSITIVE_FIXNUM < hi))) + if ((TYPE_SIGNED (time_t) + && TIME_T_MIN >> 16 < MOST_NEGATIVE_FIXNUM + && hi < MOST_NEGATIVE_FIXNUM) + || (MOST_POSITIVE_FIXNUM < TIME_T_MAX >> 16 + && MOST_POSITIVE_FIXNUM < hi)) time_overflow (); return hi; } From 9d05d1ba20797a7478a7ed68ff88452cb4f8c4c8 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 13 Mar 2011 02:57:40 +0100 Subject: [PATCH 184/383] lisp/help.el (describe-mode): Link to the mode's definition. Fixes: debbugs:8185 --- lisp/ChangeLog | 4 ++++ lisp/help.el | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3b47dd24698..1f50ee9ebe6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-13 Juanma Barranquero + + * help.el (describe-mode): Link to the mode's definition (bug#8185). + 2011-03-12 Stefan Monnier * ebuff-menu.el (electric-buffer-menu-mode-map): Move initialization diff --git a/lisp/help.el b/lisp/help.el index 9fcb06c559f..e148e5ef6ab 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -871,7 +871,17 @@ whose documentation describes the minor mode." (let ((start (point))) (insert (format-mode-line mode nil nil buffer)) (add-text-properties start (point) '(face bold))))) - (princ " mode:\n") + (princ " mode") + (let* ((mode major-mode) + (file-name (find-lisp-object-file-name mode nil))) + (when file-name + (princ (concat " defined in `" (file-name-nondirectory file-name) "'")) + ;; Make a hyperlink to the library. + (with-current-buffer standard-output + (save-excursion + (re-search-backward "`\\([^`']+\\)'" nil t) + (help-xref-button 1 'help-function-def mode file-name))))) + (princ ":\n") (princ (documentation major-mode))))) ;; For the sake of IELM and maybe others nil) From 8d9101d850b5ad006ce41a231f294ea6de93986a Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 12 Mar 2011 22:50:33 -0500 Subject: [PATCH 185/383] admin/admin.el: Add some code for deploying web manuals. --- admin/admin.el | 230 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) diff --git a/admin/admin.el b/admin/admin.el index 717bfee702d..70958ce1a76 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -212,6 +212,236 @@ Root must be the root of an Emacs source tree." "\\\\def\\\\year{") "\\([0-9]\\{4\\}\\)}.+%.+copyright year")))))) +;;; Various bits of magic for generating the web manuals + +(defun make-manuals (root) + "Generate the web manuals for the Emacs webpage." + (interactive "DEmacs root directory: ") + (let* ((dest (expand-file-name "manual" root)) + (html-node-dir (expand-file-name "html_node" dest)) + (html-mono-dir (expand-file-name "html_mono" dest)) + (txt-dir (expand-file-name "text" dest)) + (dvi-dir (expand-file-name "dvi" dest)) + (ps-dir (expand-file-name "ps" dest))) + (when (file-directory-p dest) + (if (y-or-n-p (format "Directory %s exists, delete it first?" dest)) + (delete-directory dest t) + (error "Aborted"))) + (make-directory dest) + (make-directory html-node-dir) + (make-directory html-mono-dir) + (make-directory txt-dir) + (make-directory dvi-dir) + (make-directory ps-dir) + ;; Emacs manual + (let ((texi (expand-file-name "doc/emacs/emacs.texi" root))) + (manual-html-node texi (expand-file-name "emacs" html-node-dir)) + (manual-html-mono texi (expand-file-name "emacs.html" html-mono-dir)) + (manual-txt texi (expand-file-name "emacs.txt" txt-dir)) + (manual-pdf texi (expand-file-name "emacs.pdf" dest)) + (manual-dvi texi (expand-file-name "emacs.dvi" dvi-dir) + (expand-file-name "emacs.ps" ps-dir))) + ;; Lisp manual + (let ((texi (expand-file-name "doc/lispref/elisp.texi" root))) + (manual-html-node texi (expand-file-name "elisp" html-node-dir)) + (manual-html-mono texi (expand-file-name "elisp.html" html-mono-dir)) + (manual-txt texi (expand-file-name "elisp.txt" txt-dir)) + (manual-pdf texi (expand-file-name "elisp.pdf" dest)) + (manual-dvi texi (expand-file-name "elisp.dvi" dvi-dir) + (expand-file-name "elisp.ps" ps-dir))) + (message "Manuals created in %s" dest))) + +(defconst manual-doctype-string + "\n\n") + +(defconst manual-meta-string + " + + + +\n\n") + +(defconst manual-style-string "\n") + +(defun manual-html-mono (texi-file dest) + "Run Makeinfo on TEXI-FILE, emitting mono HTML output to DEST. +This function also edits the HTML files so that they validate as +HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using +the @import directive." + (call-process "makeinfo" nil nil nil + "--html" "--no-split" texi-file "-o" dest) + (with-temp-buffer + (insert-file-contents dest) + (setq buffer-file-name dest) + (manual-html-fix-headers) + (manual-html-fix-index-1) + (manual-html-fix-index-2 t) + (manual-html-fix-node-div) + (goto-char (point-max)) + (re-search-backward "[\n \t]*") + (insert "\n\n") + (save-buffer))) + +(defun manual-html-node (texi-file dir) + "Run Makeinfo on TEXI-FILE, emitting per-node HTML output to DIR. +This function also edits the HTML files so that they validate as +HTML 4.01 Transitional, and pulls in the gnu.org stylesheet using +the @import directive." + (unless (file-exists-p texi-file) + (error "Manual file %s not found" texi-file)) + (call-process "makeinfo" nil nil nil + "--html" texi-file "-o" dir) + ;; Loop through the node files, fixing them up. + (dolist (f (directory-files dir nil "\\.html\\'")) + (let (opoint) + (with-temp-buffer + (insert-file-contents (expand-file-name f dir)) + (setq buffer-file-name (expand-file-name f dir)) + (if (looking-at "Copyright ©") + (setq opoint (match-beginning 0)) + (re-search-forward "") + (setq copyright-text (buffer-substring opoint (point))) + (delete-region opoint (point)) + (manual-html-fix-index-2) + (insert copyright-text "\n\n")) + ;; For normal nodes, give the header div a blue bg. + (manual-html-fix-node-div)) + (save-buffer)))))) + +(defun manual-txt (texi-file dest) + "Run Makeinfo on TEXI-FILE, emitting plaintext output to DEST." + (call-process "makeinfo" nil nil nil + "--plaintext" "--no-split" texi-file "-o" dest) + (shell-command (concat "gzip -c " dest " > " (concat dest ".gz")))) + +(defun manual-pdf (texi-file dest) + "Run texi2pdf on TEXI-FILE, emitting plaintext output to DEST." + (call-process "texi2pdf" nil nil nil texi-file "-o" dest)) + +(defun manual-dvi (texi-file dest ps-dest) + "Run texi2dvi on TEXI-FILE, emitting dvi output to DEST. +Also generate postscript output in PS-DEST." + (call-process "texi2dvi" nil nil nil texi-file "-o" dest) + (call-process "dvips" nil nil nil dest "-o" ps-dest) + (call-process "gzip" nil nil nil dest) + (call-process "gzip" nil nil nil ps-dest)) + +(defun manual-html-fix-headers () + "Fix up HTML headers for the Emacs manual in the current buffer." + (let (opoint) + (insert manual-doctype-string) + (search-forward "\n") + (insert manual-meta-string) + (search-forward "") + (delete-region opoint (match-beginning 0)))) + +(defun manual-html-fix-node-div () + "Fix up HTML \"node\" divs in the current buffer." + (let (opoint div-end) + (while (search-forward "
" nil t) + (replace-match + "
" + t t) + (setq opoint (point)) + (re-search-forward "
") + (setq div-end (match-beginning 0)) + (goto-char opoint) + (if (search-forward "
" div-end 'move) + (replace-match "" t t))))) + +(defun manual-html-fix-index-1 () + (let (opoint) + (re-search-forward "\n\\(

\n\n"))) + +(defun manual-html-fix-index-2 (&optional table-workaround) + "Replace the index list in the current buffer with a HTML table." + (let (done open-td tag desc) + ;; Convert the list that Makeinfo made into a table. + (search-forward "
    ") + (replace-match "") + (forward-line 1) + (while (not done) + (cond + ((or (looking-at "
  • \\(\\):[ \t]+\\(.*\\)$") + (looking-at "
  • \\(\\)$")) + (setq tag (match-string 1)) + (setq desc (match-string 2)) + (replace-match "" t t) + (when open-td + (save-excursion + (forward-char -1) + (skip-chars-backward " ") + (delete-region (point) (line-end-position)) + (insert "\n "))) + (insert "
  • \n ") + (if table-workaround + ;; This works around a Firefox bug in the mono file. + (insert "\n
    ") + (insert "")) + (insert tag "" (or desc "")) + (setq open-td t)) + ((eq (char-after) ?\n) + (delete-char 1) + ;; Negate the following `forward-line'. + (forward-line -1)) + ((looking-at "")) + ((looking-at "

    [- ]*The Detailed Node Listing[- \n]*") + (replace-match "

    \n +

    Detailed Node Listing

    \n\n" t t) + (search-forward "

    ") + (search-forward "

    ") + (goto-char (match-beginning 0)) + (skip-chars-backward "\n ") + (setq open-td nil) + (insert "

    \n\n")) + ((looking-at "") + (replace-match "" t t)) + ((looking-at "

    ") + (replace-match "" t t) + (when open-td + (insert " ") + (setq open-td nil)) + (insert "

    + ")) + ((looking-at "[ \t]*[ \t]*$") + (replace-match + (if open-td + " \n
    ") + (re-search-forward "

    [ \t\n]*
      ") + (replace-match "
    " + "") t t) + (setq done t)) + (t + (if (eobp) + (error "Parse error in %s" f)) + (unless open-td + (setq done t)))) + (forward-line 1)))) + (provide 'admin) ;;; admin.el ends here From 4248cca2de96a6732a233e9c1d13c6336b215705 Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Sun, 13 Mar 2011 04:07:38 +0000 Subject: [PATCH 186/383] Merge changes made in Gnus trunk. auth.texi (Help for developers): Update docs to explain that the :save-function will only run the first time. auth-source.el (auth-source-format-prompt): Always convert the value to a string to avoid evaluating non-string arguments. (auth-source-netrc-create): Offer default properly, not as initial content in `read-string'. (auth-source-netrc-saver): Use a cache keyed by file name and MD5 hash of line to determine if we've been run before. If so, don't run again, but print a trivial message to indicate the cache was hit instead. --- doc/misc/ChangeLog | 5 ++ doc/misc/auth.texi | 12 +++- lisp/gnus/ChangeLog | 10 +++ lisp/gnus/auth-source.el | 133 +++++++++++++++++++++------------------ 4 files changed, 99 insertions(+), 61 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 1a1ca1d6296..db3a944c160 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2011-03-12 Teodor Zlatanov + + * auth.texi (Help for developers): Update docs to explain that the + :save-function will only run the first time. + 2011-03-12 Glenn Morris * Makefile.in (emacs-faq.html): Fix some more cross-refs. diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index 85a3f098131..a16da92343e 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi @@ -289,11 +289,21 @@ Later, after a successful login, @code{nnimal.el} calls the (funcall (nth 2 credentials))) @end example -Which will work whether the @code{:save-function} was provided or not. +This will work whether the @code{:save-function} was provided or not. @code{:save-function} will be provided only when a new entry was created, so this effectively says ``after a successful login, save the authentication information we just used, if it was newly created.'' +After the first time it's called, the @code{:save-function} will not +run again (but it will log something if you have set +@code{auth-source-debug} to @code{'trivia}). This is so it won't ask +the same question again, which is annoying. This is so it won't ask +the same question again, which is annoying. This is so it won't ask +the same question again, which is annoying. + +So the responsibility of the API user that specified @code{:create t} +is to call the @code{:save-function} if it's provided. + @defun auth-source-delete SPEC TODO: how to include docstring? diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2737004615e..ec12faada98 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,13 @@ +2011-03-12 Teodor Zlatanov + + * auth-source.el (auth-source-format-prompt): Always convert the value + to a string to avoid evaluating non-string arguments. + (auth-source-netrc-create): Offer default properly, not as initial + content in `read-string'. + (auth-source-netrc-saver): Use a cache keyed by file name and MD5 hash + of line to determine if we've been run before. If so, don't run again, + but print a trivial message to indicate the cache was hit instead. + 2011-03-11 Teodor Zlatanov * gnus-sync.el (gnus-sync-install-hooks, gnus-sync-unload-hook): Don't diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index b7e0c97ce50..0fb153ad09b 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -54,6 +54,8 @@ (autoload 'secrets-list-collections "secrets") (autoload 'secrets-search-items "secrets") +(autoload 'rfc2104-hash "rfc2104") + (defvar secrets-enabled) (defgroup auth-source nil @@ -770,7 +772,9 @@ while \(:host t) would find all host entries." (let ((c (nth 0 cell)) (v (nth 1 cell))) (when (and c v) - (setq prompt (replace-regexp-in-string (format "%%%c" c) v prompt))))) + (setq prompt (replace-regexp-in-string (format "%%%c" c) + (format "%s" v) + prompt))))) prompt) (defun auth-source-ensure-strings (values) @@ -1096,7 +1100,7 @@ See `auth-source-search' for details on SPEC." ;; special case prompt for passwords (read-passwd prompt)) ((null data) - (read-string prompt default)) + (read-string prompt nil nil default)) (t (or data default)))) (when data @@ -1138,70 +1142,79 @@ See `auth-source-search' for details on SPEC." (list artificial))) -;;(funcall (plist-get (nth 0 (auth-source-search :host '("nonesuch") :user "tzz" :port "imap" :create t :max 1)) :save-function)) +;;(funcall (plist-get (nth 0 (auth-source-search :host '("nonesuch2") :user "tzz" :port "imap" :create t :max 1)) :save-function)) (defun auth-source-netrc-saver (file add) "Save a line ADD in FILE, prompting along the way. -Respects `auth-source-save-behavior'." - (with-temp-buffer - (when (file-exists-p file) - (insert-file-contents file)) - (when auth-source-gpg-encrypt-to - ;; (see bug#7487) making `epa-file-encrypt-to' local to - ;; this buffer lets epa-file skip the key selection query - ;; (see the `local-variable-p' check in - ;; `epa-file-write-region'). - (unless (local-variable-p 'epa-file-encrypt-to (current-buffer)) - (make-local-variable 'epa-file-encrypt-to)) - (if (listp auth-source-gpg-encrypt-to) - (setq epa-file-encrypt-to auth-source-gpg-encrypt-to))) - ;; we want the new data to be found first, so insert at beginning - (goto-char (point-min)) +Respects `auth-source-save-behavior'. Uses +`auth-source-netrc-cache' to avoid prompting more than once." + (let* ((key (format "%s %s" file (rfc2104-hash 'md5 64 16 file add))) + (cached (assoc key auth-source-netrc-cache))) - ;; ask AFTER we've successfully opened the file - (let ((prompt (format "Save auth info to file %s? " file)) - (done (not (eq auth-source-save-behavior 'ask))) - (bufname "*auth-source Help*") - k) - (while (not done) - (setq k (auth-source-read-char-choice prompt '(?y ?n ?N ?e ??))) - (case k - (?y (setq done t)) - (?? (save-excursion - (with-output-to-temp-buffer bufname - (princ - (concat "(y)es, save\n" - "(n)o but use the info\n" - "(N)o and don't ask to save again\n" - "(e)dit the line\n" - "(?) for help as you can see.\n")) - (set-buffer standard-output) - (help-mode)))) - (?n (setq add "" - done t)) - (?N (setq add "" - done t - auth-source-save-behavior nil)) - (?e (setq add (read-string "Line to add: " add))) - (t nil))) + (if cached + (auth-source-do-trivia + "auth-source-netrc-saver: found previous run for key %s, returning" + key) + (with-temp-buffer + (when (file-exists-p file) + (insert-file-contents file)) + (when auth-source-gpg-encrypt-to + ;; (see bug#7487) making `epa-file-encrypt-to' local to + ;; this buffer lets epa-file skip the key selection query + ;; (see the `local-variable-p' check in + ;; `epa-file-write-region'). + (unless (local-variable-p 'epa-file-encrypt-to (current-buffer)) + (make-local-variable 'epa-file-encrypt-to)) + (if (listp auth-source-gpg-encrypt-to) + (setq epa-file-encrypt-to auth-source-gpg-encrypt-to))) + ;; we want the new data to be found first, so insert at beginning + (goto-char (point-min)) - (when (get-buffer-window bufname) - (delete-window (get-buffer-window bufname))) + ;; ask AFTER we've successfully opened the file + (let ((prompt (format "Save auth info to file %s? " file)) + (done (not (eq auth-source-save-behavior 'ask))) + (bufname "*auth-source Help*") + k) + (while (not done) + (setq k (auth-source-read-char-choice prompt '(?y ?n ?N ?e ??))) + (case k + (?y (setq done t)) + (?? (save-excursion + (with-output-to-temp-buffer bufname + (princ + (concat "(y)es, save\n" + "(n)o but use the info\n" + "(N)o and don't ask to save again\n" + "(e)dit the line\n" + "(?) for help as you can see.\n")) + (set-buffer standard-output) + (help-mode)))) + (?n (setq add "" + done t)) + (?N (setq add "" + done t + auth-source-save-behavior nil)) + (?e (setq add (read-string "Line to add: " add))) + (t nil))) - ;; make sure the info is not saved - (when (null auth-source-save-behavior) - (setq add "")) + (when (get-buffer-window bufname) + (delete-window (get-buffer-window bufname))) - (when (< 0 (length add)) - (progn - (unless (bolp) - (insert "\n")) - (insert add "\n") - (write-region (point-min) (point-max) file nil 'silent) - (auth-source-do-debug - "auth-source-netrc-create: wrote 1 new line to %s" - file) - (message "Saved new authentication information to %s" file) - nil))))) + ;; make sure the info is not saved + (when (null auth-source-save-behavior) + (setq add "")) + + (when (< 0 (length add)) + (progn + (unless (bolp) + (insert "\n")) + (insert add "\n") + (write-region (point-min) (point-max) file nil 'silent) + (auth-source-do-debug + "auth-source-netrc-create: wrote 1 new line to %s" + file) + (message "Saved new authentication information to %s" file) + nil)))) + (aput 'auth-source-netrc-cache key "ran")))) ;;; Backend specific parsing: Secrets API backend From 313c1e544ab88d0ca95015b30e23dfbabe36a2ac Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 12 Mar 2011 22:27:18 -0800 Subject: [PATCH 187/383] * editfns.c (lisp_time_argument): Check for time stamp overflow. --- src/ChangeLog | 4 ++++ src/editfns.c | 33 ++++++++++++++++++++++++++------- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b3362b9fbca..546b02d2a96 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-13 Paul Eggert + + * editfns.c (lisp_time_argument): Check for time stamp overflow. + 2011-03-12 Paul Eggert Improve quality of tests for time stamp overflow. For example, diff --git a/src/editfns.c b/src/editfns.c index e55502bdb89..d92d3482d09 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1439,12 +1439,17 @@ static EMACS_INT hi_time (time_t t) { time_t hi = t >> 16; - if ((TYPE_SIGNED (time_t) - && TIME_T_MIN >> 16 < MOST_NEGATIVE_FIXNUM - && hi < MOST_NEGATIVE_FIXNUM) - || (MOST_POSITIVE_FIXNUM < TIME_T_MAX >> 16 - && MOST_POSITIVE_FIXNUM < hi)) + + /* Check for overflow, helping the compiler for common cases where + no runtime check is needed, and taking care not to convert + negative numbers to unsigned before comparing them. */ + if (! ((! TYPE_SIGNED (time_t) + || MOST_NEGATIVE_FIXNUM <= TIME_T_MIN >> 16 + || MOST_NEGATIVE_FIXNUM <= hi) + && (TIME_T_MAX >> 16 <= MOST_POSITIVE_FIXNUM + || hi <= MOST_POSITIVE_FIXNUM))) time_overflow (); + return hi; } @@ -1551,6 +1556,7 @@ lisp_time_argument (Lisp_Object specified_time, time_t *result, int *usec) else { Lisp_Object high, low; + EMACS_INT hi; high = Fcar (specified_time); CHECK_NUMBER (high); low = Fcdr (specified_time); @@ -1574,8 +1580,21 @@ lisp_time_argument (Lisp_Object specified_time, time_t *result, int *usec) else if (usec) *usec = 0; CHECK_NUMBER (low); - *result = (XINT (high) << 16) + (XINT (low) & 0xffff); - return *result >> 16 == XINT (high); + hi = XINT (high); + + /* Check for overflow, helping the compiler for common cases + where no runtime check is needed, and taking care not to + convert negative numbers to unsigned before comparing them. */ + if (! ((TYPE_SIGNED (time_t) + ? (TIME_T_MIN >> 16 <= MOST_NEGATIVE_FIXNUM + || TIME_T_MIN >> 16 <= hi) + : 0 <= hi) + && (MOST_POSITIVE_FIXNUM <= TIME_T_MAX >> 16 + || hi <= TIME_T_MAX >> 16))) + return 0; + + *result = (hi << 16) + (XINT (low) & 0xffff); + return 1; } } From f0c77cd1b28a5ee9de06eef06c768fe34d7f0140 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 12 Mar 2011 23:50:17 -0800 Subject: [PATCH 188/383] * image.c (four_corners_best): Mark locals as initialized. (gif_load): Initialize transparent_p to zero (Bug#8238). Mark another local as initialized. --- src/ChangeLog | 6 ++++++ src/image.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c99d3626e05..2a2ef75a316 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-03-13 Paul Eggert + + * image.c (four_corners_best): Mark locals as initialized. + (gif_load): Initialize transparent_p to zero (Bug#8238). + Mark another local as initialized. + 2011-03-11 Paul Eggert * image.c (clear_image_cache): Now static. diff --git a/src/image.c b/src/image.c index 1f2a4609536..a4be1d1b898 100644 --- a/src/image.c +++ b/src/image.c @@ -1137,7 +1137,7 @@ static RGB_PIXEL_COLOR four_corners_best (XImagePtr_or_DC ximg, int *corners, unsigned long width, unsigned long height) { - RGB_PIXEL_COLOR corner_pixels[4], best; + RGB_PIXEL_COLOR corner_pixels[4], best IF_LINT (= 0); int i, best_count; if (corners && corners[BOT_CORNER] >= 0) @@ -7103,7 +7103,7 @@ gif_load (struct frame *f, struct image *img) Lisp_Object file, specified_file; Lisp_Object specified_data; int rc, width, height, x, y, i; - boolean transparent_p; + boolean transparent_p = 0; XImagePtr ximg; ColorMapObject *gif_color_map; unsigned long pixel_colors[256]; @@ -7112,7 +7112,7 @@ gif_load (struct frame *f, struct image *img) int ino, image_height, image_width; gif_memory_source memsrc; unsigned char *raster; - unsigned int transparency_color_index; + unsigned int transparency_color_index IF_LINT (= 0); specified_file = image_spec_value (img->spec, QCfile, NULL); specified_data = image_spec_value (img->spec, QCdata, NULL); From ec6cf4c6ff2e43e3f42a2efe2759bc0c18b680cb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 00:04:44 -0800 Subject: [PATCH 189/383] * image.c (my_png_error, my_error_exit): Mark with NO_RETURN. --- src/ChangeLog | 1 + src/image.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 2a2ef75a316..45ee0125eeb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * image.c (four_corners_best): Mark locals as initialized. (gif_load): Initialize transparent_p to zero (Bug#8238). Mark another local as initialized. + (my_png_error, my_error_exit): Mark with NO_RETURN. 2011-03-11 Paul Eggert diff --git a/src/image.c b/src/image.c index a4be1d1b898..7584f9bb2c0 100644 --- a/src/image.c +++ b/src/image.c @@ -5530,6 +5530,7 @@ init_png_functions (Lisp_Object libraries) /* Error and warning handlers installed when the PNG library is initialized. */ +static void my_png_error (png_struct *, const char *) NO_RETURN; static void my_png_error (png_struct *png_ptr, const char *msg) { @@ -6104,6 +6105,7 @@ struct my_jpeg_error_mgr }; +static void my_error_exit (j_common_ptr) NO_RETURN; static void my_error_exit (j_common_ptr cinfo) { From 41729b81ac6a60b482aafe7ddc48a43225874818 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 00:05:40 -0800 Subject: [PATCH 190/383] * xgselect.c (xg_select): Remove unused var. --- src/ChangeLog | 2 ++ src/xgselect.c | 17 ++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 45ee0125eeb..5c9efee320f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-13 Paul Eggert + * xgselect.c (xg_select): Remove unused var. + * image.c (four_corners_best): Mark locals as initialized. (gif_load): Initialize transparent_p to zero (Bug#8238). Mark another local as initialized. diff --git a/src/xgselect.c b/src/xgselect.c index 359a8fbc89b..96d763ff088 100644 --- a/src/xgselect.c +++ b/src/xgselect.c @@ -38,7 +38,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, GMainContext *context = g_main_context_default (); int have_wfds = wfds != NULL; int n_gfds = 0, our_tmo = 0, retval = 0, our_fds = 0; - int prio, i, nfds, tmo_in_millisec; + int i, nfds, tmo_in_millisec; if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds)); else FD_ZERO (&all_rfds); @@ -49,9 +49,9 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, g_main_context_pending (context); do { - if (n_gfds > gfds_size) + if (n_gfds > gfds_size) { - while (n_gfds > gfds_size) + while (n_gfds > gfds_size) gfds_size *= 2; xfree (gfds); gfds = xmalloc (sizeof (*gfds) * gfds_size); @@ -64,7 +64,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, gfds_size); } while (n_gfds > gfds_size); - for (i = 0; i < n_gfds; ++i) + for (i = 0; i < n_gfds; ++i) { if (gfds[i].events & G_IO_IN) { @@ -87,7 +87,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, else { EMACS_TIME difference; - + EMACS_SUB_TIME (difference, tmo, *timeout); if (EMACS_TIME_NEG_P (difference)) our_tmo = 1; } @@ -100,7 +100,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, if (nfds < 0) retval = nfds; - else if (nfds > 0) + else if (nfds > 0) { for (i = 0; i < max_fds+1; ++i) { @@ -127,7 +127,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, if (our_fds > 0 || (nfds == 0 && our_tmo)) { - + /* If Gtk+ is in use eventually gtk_main_iteration will be called, unless retval is zero. */ #ifdef USE_GTK @@ -137,7 +137,7 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds, g_main_context_dispatch (context); /* To not have to recalculate timeout, return like this. */ - if (retval == 0) + if (retval == 0) { retval = -1; errno = EINTR; @@ -156,4 +156,3 @@ xgselect_initialize (void) gfds = xmalloc (sizeof (*gfds)*gfds_size); #endif /* defined (USE_GTK) || defined (HAVE_GCONF) */ } - From 7c86ee9804efc475aa261c8eab8ca9b629657e29 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 00:14:30 -0800 Subject: [PATCH 191/383] * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char * to unsigned char * to avoid compiler diagnostic. --- src/ChangeLog | 3 +++ src/gtkutil.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5c9efee320f..2d88ba25092 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-13 Paul Eggert + * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char * + to unsigned char * to avoid compiler diagnostic. + * xgselect.c (xg_select): Remove unused var. * image.c (four_corners_best): Mark locals as initialized. diff --git a/src/gtkutil.c b/src/gtkutil.c index b1ea6336eb6..8ab41fdefd1 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -76,7 +76,7 @@ along with GNU Emacs. If not, see . */ #ifndef HAVE_GTK3 #define gdk_window_get_screen(w) gdk_drawable_get_screen (w) #define gdk_window_get_geometry(w, a, b, c, d) \ - gdk_window_get_geometry (w, a, b, c, d, 0) + gdk_window_get_geometry (w, a, b, c, d, 0) #define gdk_x11_window_lookup_for_display(d, w) \ gdk_xid_table_lookup_for_display (d, w) #define GDK_KEY_g GDK_g @@ -258,7 +258,7 @@ xg_get_pixbuf_from_pixmap (FRAME_PTR f, Pixmap pix) ~0, XYPixmap); if (!xim) return 0; - tmp_buf = gdk_pixbuf_new_from_data (xim->data, + tmp_buf = gdk_pixbuf_new_from_data ((guchar *) xim->data, GDK_COLORSPACE_RGB, FALSE, xim->bitmap_unit, @@ -287,7 +287,7 @@ xg_get_pixbuf_from_pix_and_mask (FRAME_PTR f, width = gdk_pixbuf_get_width (icon_buf); height = gdk_pixbuf_get_height (icon_buf); - + if (mask) { GdkPixbuf *mask_buf = xg_get_pixbuf_from_pixmap (f, mask); @@ -393,7 +393,7 @@ xg_get_image_for_pixmap (FRAME_PTR f, Gtk+ assumes the pixmap is always there. */ icon_buf = xg_get_pixbuf_from_pix_and_mask (f, img->pixmap, img->mask); - if (icon_buf) + if (icon_buf) { if (! old_widget) old_widget = GTK_IMAGE (gtk_image_new_from_pixbuf (icon_buf)); From b0afc268e8513939e5fc0551f33aec6884e7a4e6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 00:15:55 -0800 Subject: [PATCH 192/383] * gtkutil.c (xg_free_frame_widgets): Make it clear that a local variable is needed only if USE_GTK_TOOLTIP. --- src/ChangeLog | 2 ++ src/gtkutil.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 2d88ba25092..269285d32b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char * to unsigned char * to avoid compiler diagnostic. + (xg_free_frame_widgets): Make it clear that a local variable is + needed only if USE_GTK_TOOLTIP. * xgselect.c (xg_select): Remove unused var. diff --git a/src/gtkutil.c b/src/gtkutil.c index 8ab41fdefd1..04b8a64c995 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1188,7 +1188,9 @@ xg_free_frame_widgets (FRAME_PTR f) { if (FRAME_GTK_OUTER_WIDGET (f)) { +#ifdef USE_GTK_TOOLTIP struct x_output *x = f->output_data.x; +#endif gtk_widget_destroy (FRAME_GTK_OUTER_WIDGET (f)); FRAME_X_WINDOW (f) = 0; /* Set to avoid XDestroyWindow in xterm.c */ FRAME_GTK_OUTER_WIDGET (f) = 0; From 1e5524e7cfe4ec2ad1841c28495dce4ecc5f487e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 00:31:16 -0800 Subject: [PATCH 193/383] * gtkutil.c (int_gtk_range_get_value): New function, which avoids a diagnostic from gcc -Wbad-function-cast. (xg_set_toolkit_scroll_bar_thumb): Use it. (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid diagnostic from gcc -Wbad-function-cast. --- src/ChangeLog | 5 +++++ src/gtkutil.c | 21 ++++++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 269285d32b0..454b6fba129 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,11 @@ to unsigned char * to avoid compiler diagnostic. (xg_free_frame_widgets): Make it clear that a local variable is needed only if USE_GTK_TOOLTIP. + (int_gtk_range_get_value): New function, which avoids a diagnostic + from gcc -Wbad-function-cast. + (xg_set_toolkit_scroll_bar_thumb): Use it. + (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid + diagnostic from gcc -Wbad-function-cast. * xgselect.c (xg_select): Remove unused var. diff --git a/src/gtkutil.c b/src/gtkutil.c index 04b8a64c995..b66a9a9c555 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -84,6 +84,13 @@ along with GNU Emacs. If not, see . */ #define XG_BIN_CHILD(x) gtk_bin_get_child (GTK_BIN (x)) +/* Get the current value of the range, truncated to an integer. */ +static int +int_gtk_range_get_value (GtkRange *range) +{ + return gtk_range_get_value (range); +} + /*********************************************************************** Display handling functions @@ -3562,7 +3569,7 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, changed = 1; } - if (changed || (int) gtk_range_get_value (GTK_RANGE (wscroll)) != value) + if (changed || int_gtk_range_get_value (GTK_RANGE (wscroll)) != value) { BLOCK_INPUT; @@ -3570,7 +3577,7 @@ xg_set_toolkit_scroll_bar_thumb (struct scroll_bar *bar, ignore_gtk_scrollbar to make the callback do nothing */ xg_ignore_gtk_scrollbar = 1; - if ((int) gtk_range_get_value (GTK_RANGE (wscroll)) != value) + if (int_gtk_range_get_value (GTK_RANGE (wscroll)) != value) gtk_range_set_value (GTK_RANGE (wscroll), (gdouble)value); else if (changed) gtk_adjustment_changed (adj); @@ -3666,8 +3673,8 @@ xg_tool_bar_callback (GtkWidget *w, gpointer client_data) { /* The EMACS_INT cast avoids a warning. */ int idx = (int) (EMACS_INT) client_data; - int mod = (int) (EMACS_INT) g_object_get_data (G_OBJECT (w), - XG_TOOL_BAR_LAST_MODIFIER); + gpointer gmod = g_object_get_data (G_OBJECT (w), XG_TOOL_BAR_LAST_MODIFIER); + int mod = (int) (EMACS_INT) gmod; FRAME_PTR f = (FRAME_PTR) g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); Lisp_Object key, frame; @@ -4218,9 +4225,9 @@ xg_tool_item_stale_p (GtkWidget *wbutton, const char *stock_name, } else { - Pixmap old_img - = (Pixmap) g_object_get_data (G_OBJECT (wimage), - XG_TOOL_BAR_IMAGE_DATA); + gpointer gold_img = g_object_get_data (G_OBJECT (wimage), + XG_TOOL_BAR_IMAGE_DATA); + Pixmap old_img = (Pixmap) gold_img; if (old_img != img->pixmap) return 1; } From 65dc836c9eb47c01affa6c8819f177c9f68aca67 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 00:39:13 -0800 Subject: [PATCH 194/383] * gtkutil.c: (get_utf8_string, xg_get_file_with_chooser): Rename locals to avoid shadowing. (create_dialog): Move locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/gtkutil.c | 46 ++++++++++++++++++++++------------------------ 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 454b6fba129..45f9918c864 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -9,6 +9,9 @@ (xg_set_toolkit_scroll_bar_thumb): Use it. (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid diagnostic from gcc -Wbad-function-cast. + (get_utf8_string, xg_get_file_with_chooser): + Rename locals to avoid shadowing. + (create_dialog): Move locals to avoid shadowing. * xgselect.c (xg_select): Remove unused var. diff --git a/src/gtkutil.c b/src/gtkutil.c index b66a9a9c555..2eb088b9ee3 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -492,22 +492,22 @@ get_utf8_string (const char *str) gsize bytes_written; unsigned char *p = (unsigned char *)str; char *cp, *up; - GError *error = NULL; + GError *err = NULL; while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read, - &bytes_written, &error)) - && error->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE) + &bytes_written, &err)) + && err->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE) { ++nr_bad; p += bytes_written+1; - g_error_free (error); - error = NULL; + g_error_free (err); + err = NULL; } - if (error) + if (err) { - g_error_free (error); - error = NULL; + g_error_free (err); + err = NULL; } if (cp) g_free (cp); @@ -515,16 +515,16 @@ get_utf8_string (const char *str) p = (unsigned char *)str; while (! (cp = g_locale_to_utf8 ((char *)p, -1, &bytes_read, - &bytes_written, &error)) - && error->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE) + &bytes_written, &err)) + && err->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE) { strncpy (up, (char *)p, bytes_written); sprintf (up + bytes_written, "\\%03o", p[bytes_written]); up[bytes_written+4] = '\0'; up += bytes_written+4; p += bytes_written+1; - g_error_free (error); - error = NULL; + g_error_free (err); + err = NULL; } if (cp) @@ -532,10 +532,10 @@ get_utf8_string (const char *str) strcat (utf8_str, cp); g_free (cp); } - if (error) + if (err) { - g_error_free (error); - error = NULL; + g_error_free (err); + err = NULL; } } return utf8_str; @@ -1415,8 +1415,6 @@ create_dialog (widget_value *wv, GtkDialog *wd = GTK_DIALOG (wdialog); GtkBox *cur_box = GTK_BOX (gtk_dialog_get_action_area (wd)); widget_value *item; - GtkWidget *wvbox; - GtkWidget *whbox_up; GtkWidget *whbox_down; /* If the number of buttons is greater than 4, make two rows of buttons @@ -1432,8 +1430,8 @@ create_dialog (widget_value *wv, if (make_two_rows) { - wvbox = gtk_vbox_new (TRUE, button_spacing); - whbox_up = gtk_hbox_new (FALSE, 0); + GtkWidget *wvbox = gtk_vbox_new (TRUE, button_spacing); + GtkWidget *whbox_up = gtk_hbox_new (FALSE, 0); whbox_down = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (cur_box, wvbox, FALSE, FALSE, 0); @@ -1702,7 +1700,7 @@ xg_get_file_with_chooser (FRAME_PTR f, int mustmatch_p, int only_dir_p, xg_get_file_func *func) { - char message[1024]; + char msgbuf[1024]; GtkWidget *filewin, *wtoggle, *wbox, *wmessage; GtkWindow *gwin = GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)); @@ -1738,16 +1736,16 @@ xg_get_file_with_chooser (FRAME_PTR f, if (x_gtk_file_dialog_help_text) { - message[0] = '\0'; + msgbuf[0] = '\0'; /* Gtk+ 2.10 has the file name text entry box integrated in the dialog. Show the C-l help text only for versions < 2.10. */ if (gtk_check_version (2, 10, 0) && action != GTK_FILE_CHOOSER_ACTION_SAVE) - strcat (message, "\nType C-l to display a file name text entry box.\n"); - strcat (message, "\nIf you don't like this file selector, use the " + strcat (msgbuf, "\nType C-l to display a file name text entry box.\n"); + strcat (msgbuf, "\nIf you don't like this file selector, use the " "corresponding\nkey binding or customize " "use-file-dialog to turn it off."); - wmessage = gtk_label_new (message); + wmessage = gtk_label_new (msgbuf); gtk_widget_show (wmessage); } From 01e0b5adf4e35c2b00705c212b853936fe218cac Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 00:42:12 -0800 Subject: [PATCH 195/383] * gtkutil.c (gdk_window_get_screen): Make it clear that this macro is needed only if USE_GTK_TOOLTIP. --- src/ChangeLog | 2 ++ src/gtkutil.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 45f9918c864..0097626c463 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,8 @@ to unsigned char * to avoid compiler diagnostic. (xg_free_frame_widgets): Make it clear that a local variable is needed only if USE_GTK_TOOLTIP. + (gdk_window_get_screen): Make it clear that this macro is needed + only if USE_GTK_TOOLTIP. (int_gtk_range_get_value): New function, which avoids a diagnostic from gcc -Wbad-function-cast. (xg_set_toolkit_scroll_bar_thumb): Use it. diff --git a/src/gtkutil.c b/src/gtkutil.c index 2eb088b9ee3..754f61e366d 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -74,7 +74,9 @@ along with GNU Emacs. If not, see . */ #endif #ifndef HAVE_GTK3 +#ifdef USE_GTK_TOOLTIP #define gdk_window_get_screen(w) gdk_drawable_get_screen (w) +#endif #define gdk_window_get_geometry(w, a, b, c, d) \ gdk_window_get_geometry (w, a, b, c, d, 0) #define gdk_x11_window_lookup_for_display(d, w) \ From 1ef6de0565b2d11481f1f663742d2c0d79e8eb97 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 10:39:04 -0700 Subject: [PATCH 196/383] Update for gnulib, adding Solaris 9+10 fixes. --- ChangeLog | 8 + Makefile.in | 2 +- aclocal.m4 | 4 +- configure | 1198 +++++++++++++++++++++++---------------------- lib/Makefile.in | 2 +- lib/gnulib.mk | 2 +- lib/sys_stat.in.h | 16 +- 7 files changed, 652 insertions(+), 580 deletions(-) diff --git a/ChangeLog b/ChangeLog index 022eb468965..fdde50669b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-03-13 Paul Eggert + + Update for gnulib. + * Makefile.in (GNULIB_MODULES): Add intprops, as Emacs now + includes directly. + * lib/sys_stat.in.h: New version from Gnulib, which fixes a bug + when building Emacs on Solaris 9 and running it on Solaris 10. + 2011-03-08 Jan Djärv * configure.in: Require 3.0 for --with-gtk3. Add HAVE_GTK3. diff --git a/Makefile.in b/Makefile.in index 7bd4318bfba..19267f82121 100644 --- a/Makefile.in +++ b/Makefile.in @@ -332,7 +332,7 @@ DOS_gnulib_comp.m4 = gl-comp.m4 # as per $(gnulib_srcdir)/DEPENDENCIES. GNULIB_MODULES = \ crypto/md5 dtoastr filemode getloadavg getopt-gnu \ - ignore-value lstat mktime readlink strftime symlink sys_stat + ignore-value intprops lstat mktime readlink strftime symlink sys_stat GNULIB_TOOL_FLAGS = \ --import --no-changelog --no-vc-files --makefile-name=gnulib.mk sync-from-gnulib: $(gnulib_srcdir) diff --git a/aclocal.m4 b/aclocal.m4 index 963faafb453..1536f3b48b5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) diff --git a/configure b/configure index efe9a55f988..57ecd9d52eb 100755 --- a/configure +++ b/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for emacs 24.0.50. +# Generated by GNU Autoconf 2.68 for emacs 24.0.50. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -89,6 +89,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -214,11 +215,18 @@ IFS=$as_save_IFS # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -316,7 +324,7 @@ $as_echo X"$as_dir" | 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 +364,19 @@ else fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS 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=$?; 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 + 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 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -530,7 +538,7 @@ test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -1220,8 +1228,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1266,7 +1275,7 @@ do 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 @@ -1292,7 +1301,7 @@ do 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 @@ -1496,7 +1505,7 @@ do 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 @@ -1512,7 +1521,7 @@ do 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 @@ -1542,8 +1551,8 @@ do | --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" ;; *=*) @@ -1551,7 +1560,7 @@ Try \`$0 --help' for more information." # 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 ;; @@ -1561,7 +1570,7 @@ Try \`$0 --help' for more information." $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1569,13 +1578,13 @@ done 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 @@ -1598,7 +1607,7 @@ do [\\/$]* | ?:[\\/]* ) 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' @@ -1612,8 +1621,8 @@ target=$target_alias 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 @@ -1628,9 +1637,9 @@ test "$silent" = yes && exec 6>/dev/null 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. @@ -1669,11 +1678,11 @@ else 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 @@ -1713,7 +1722,7 @@ Configuration: --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 @@ -1935,9 +1944,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF emacs configure 24.0.50 -generated by GNU Autoconf 2.65 +generated by GNU Autoconf 2.68 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1981,7 +1990,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -2007,7 +2016,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -2018,7 +2027,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -2031,10 +2040,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2070,7 +2079,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2097,7 +2106,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2106,7 +2115,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -2147,7 +2156,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2161,7 +2170,7 @@ ac_fn_c_check_header_compile () 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2179,7 +2188,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2224,20 +2233,23 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +# 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 () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $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_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 \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2246,8 +2258,12 @@ $4 int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -2264,7 +2280,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl @@ -2276,7 +2292,7 @@ ac_fn_c_check_header_preproc () 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2288,12 +2304,12 @@ if ac_fn_c_try_cpp "$LINENO"; then : else eval "$3=no" fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_preproc @@ -2306,7 +2322,7 @@ ac_fn_c_check_member () 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 { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2350,7 +2366,7 @@ fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2362,7 +2378,7 @@ ac_fn_c_check_func () 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2417,7 +2433,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2430,7 +2446,7 @@ ac_fn_c_check_type () 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2471,7 +2487,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2648,7 +2664,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2657,7 +2673,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2767,11 +2783,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2805,11 +2819,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2822,11 +2834,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2840,11 +2850,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -2899,7 +2907,12 @@ _ACEOF ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # 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 elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -2914,7 +2927,11 @@ do { $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" + . "$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; } fi done @@ -3005,7 +3022,7 @@ if $ac_cache_corrupted; then $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. ## @@ -3025,16 +3042,22 @@ am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - 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 + 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 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, @@ -3063,7 +3086,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3150,11 +3173,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3176,7 +3199,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -3186,7 +3209,7 @@ then # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -3240,7 +3263,7 @@ if test "$cross_compiling" != no; then set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -3280,7 +3303,7 @@ if test -z "$ac_cv_prog_STRIP"; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3333,7 +3356,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3385,7 +3408,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3425,7 +3448,7 @@ done $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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3433,7 +3456,7 @@ SHELL = /bin/sh 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;; @@ -3467,7 +3490,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -3670,7 +3693,7 @@ if test "${with_x_toolkit+set}" = set; then : 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 ;; @@ -3983,7 +4006,7 @@ do 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" @@ -4098,27 +4121,27 @@ fi # 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; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias 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='-' @@ -4136,14 +4159,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then 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 @@ -4151,7 +4174,7 @@ fi $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='-' @@ -4405,7 +4428,7 @@ fi 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 @@ -4433,7 +4456,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4473,7 +4496,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4526,7 +4549,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4566,7 +4589,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4625,7 +4648,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4669,7 +4692,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4723,8 +4746,8 @@ fi 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 @@ -4838,9 +4861,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "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; } @@ -4882,8 +4904,8 @@ done 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 @@ -4940,9 +4962,9 @@ $as_echo "$ac_try_echo"; } >&5 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 @@ -4953,7 +4975,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4993,8 +5015,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $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 @@ -5004,7 +5026,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5041,7 +5063,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -5119,7 +5141,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -5280,7 +5302,7 @@ depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -5412,7 +5434,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5536,7 +5558,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -5576,7 +5598,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -5636,7 +5658,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -5666,7 +5688,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5682,11 +5704,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5725,7 +5747,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5741,18 +5763,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : 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 @@ -5764,7 +5786,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -5813,7 +5835,7 @@ esac 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 @@ -5827,7 +5849,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -5879,7 +5901,7 @@ esac 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 @@ -5894,7 +5916,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6011,8 +6033,7 @@ do : 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 " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -6026,7 +6047,7 @@ done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = x""yes; then : +if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= @@ -6056,7 +6077,7 @@ $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : +if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6145,7 +6166,7 @@ if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ test x"$CPP" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 $as_echo_n "checking whether we are using a Sun C compiler... " >&6; } - if test "${emacs_cv_sunpro_c+set}" = set; then : + if ${emacs_cv_sunpro_c+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6313,7 +6334,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -6343,7 +6364,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6359,11 +6380,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6402,7 +6423,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6418,18 +6439,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : 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 @@ -6445,7 +6466,7 @@ if test "x$RANLIB" = x; then set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -6485,7 +6506,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -6540,7 +6561,7 @@ fi ## is running in i386 mode, we can help them out. if test "$machine" = "amdx86-64"; then ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default" -if test "x$ac_cv_have_decl_i386" = x""yes; then : +if test "x$ac_cv_have_decl_i386" = xyes; then : fi @@ -6555,7 +6576,7 @@ fi set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : +if ${ac_cv_path_INSTALL_INFO+:} false; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -6595,7 +6616,7 @@ fi set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : +if ${ac_cv_path_INSTALL_INFO+:} false; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -6635,7 +6656,7 @@ fi set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : +if ${ac_cv_path_INSTALL_INFO+:} false; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -6676,7 +6697,7 @@ fi set dummy gzip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_GZIP_PROG+set}" = set; then : +if ${ac_cv_path_GZIP_PROG+:} false; then : $as_echo_n "(cached) " >&6 else case $GZIP_PROG in @@ -6719,7 +6740,7 @@ fi set dummy makeinfo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_MAKEINFO+set}" = set; then : +if ${ac_cv_path_MAKEINFO+:} false; then : $as_echo_n "(cached) " >&6 else case $MAKEINFO in @@ -6777,7 +6798,7 @@ if test "$MAKEINFO" = "no"; then if test "x${with_makeinfo}" = "xno"; then HAVE_MAKEINFO=no 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 @@ -6925,7 +6946,7 @@ esac C_SWITCH_MACHINE= if test "$machine" = "alpha"; then ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" -if test "x$ac_cv_have_decl___ELF__" = x""yes; then : +if test "x$ac_cv_have_decl___ELF__" = xyes; then : fi @@ -6938,7 +6959,7 @@ fi 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 @@ -6993,7 +7014,7 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then : +if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -7044,7 +7065,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then : +if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -7113,7 +7134,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then : +if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -7214,7 +7235,7 @@ else ## 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 @@ -7269,8 +7290,7 @@ if test "${with_sound}" != "no"; then 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" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7282,7 +7302,7 @@ done # Emulation library used on NetBSD. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } -if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : +if ${ac_cv_lib_ossaudio__oss_ioctl+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7316,7 +7336,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } -if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : +if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes; then : LIBSOUND=-lossaudio else LIBSOUND= @@ -7333,7 +7353,7 @@ fi set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -7461,7 +7481,7 @@ else 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 @@ -7496,8 +7516,7 @@ for ac_header in sys/select.h sys/time.h unistd.h utime.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" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7538,7 +7557,7 @@ fi for ac_header in term.h do : ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" -if test "x$ac_cv_header_term_h" = x""yes; then : +if test "x$ac_cv_header_term_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TERM_H 1 _ACEOF @@ -7549,7 +7568,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7661,7 +7680,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7695,7 +7714,7 @@ $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : +if test "x$ac_cv_have_decl_sys_siglist" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -7708,7 +7727,7 @@ _ACEOF if test $ac_cv_have_decl_sys_siglist != yes; then # For Tru64, at least: ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : +if test "x$ac_cv_have_decl___sys_siglist" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -7726,7 +7745,7 @@ $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7768,7 +7787,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 $as_echo_n "checking for struct utimbuf... " >&6; } -if test "${emacs_cv_struct_utimbuf+set}" = set; then : +if ${emacs_cv_struct_utimbuf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7811,7 +7830,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7845,7 +7864,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 $as_echo_n "checking for speed_t... " >&6; } -if test "${emacs_cv_speed_t+set}" = set; then : +if ${emacs_cv_speed_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7876,7 +7895,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 $as_echo_n "checking for struct timeval... " >&6; } -if test "${emacs_cv_struct_timeval+set}" = set; then : +if ${emacs_cv_struct_timeval+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7917,7 +7936,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 $as_echo_n "checking for struct exception... " >&6; } -if test "${emacs_cv_struct_exception+set}" = set; then : +if ${emacs_cv_struct_exception+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7950,7 +7969,7 @@ fi for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = x""yes; then : +if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF @@ -7966,7 +7985,7 @@ do : #include #endif " -if test "x$ac_cv_header_net_if_h" = x""yes; then : +if test "x$ac_cv_header_net_if_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NET_IF_H 1 _ACEOF @@ -7978,7 +7997,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8015,7 +8034,7 @@ ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_ #include <$ac_cv_struct_tm> " -if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -8031,7 +8050,7 @@ $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " -if test "x$ac_cv_have_decl_tzname" = x""yes; then : +if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -8043,7 +8062,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } -if test "${ac_cv_var_tzname+set}" = set; then : +if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8080,7 +8099,7 @@ fi ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include " -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h @@ -8094,7 +8113,7 @@ ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_i #include #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_flags" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 @@ -8110,7 +8129,7 @@ ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ #include #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 @@ -8126,7 +8145,7 @@ ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct #include #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 @@ -8142,7 +8161,7 @@ ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_stru #include #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 @@ -8158,7 +8177,7 @@ ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_if #include #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_addr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 @@ -8187,7 +8206,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } -if test "${ac_cv_c_volatile+set}" = set; then : +if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8221,7 +8240,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then : +if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8301,7 +8320,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5 $as_echo_n "checking for void * support... " >&6; } -if test "${emacs_cv_void_star+set}" = set; then : +if ${emacs_cv_void_star+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8334,7 +8353,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -8552,14 +8571,14 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - as_fn_error "unknown endianness + as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 $as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } -if test "${emacs_cv_attribute_aligned+set}" = set; then : +if ${emacs_cv_attribute_aligned+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8592,7 +8611,7 @@ fi $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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -8600,7 +8619,7 @@ SHELL = /bin/sh 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;; @@ -8680,7 +8699,7 @@ deps_frag=$srcdir/src/$deps_frag { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 $as_echo_n "checking for long file names... " >&6; } -if test "${ac_cv_sys_long_file_names+set}" = set; then : +if ${ac_cv_sys_long_file_names+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_long_file_names=yes @@ -8736,8 +8755,8 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. @@ -8754,7 +8773,7 @@ libdir: @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 @@ -8840,7 +8859,7 @@ else fi done fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -9020,10 +9039,10 @@ if test "${with_ns}" != no; then TEMACS_LDFLAGS2= fi ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" -if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : +if test "x$ac_cv_header_AppKit_AppKit_h" = xyes; 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 @@ -9105,7 +9124,7 @@ if test "$window_system" = none && test "X$with_x" != "Xno"; then set dummy X; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : +if ${ac_cv_prog_HAVE_XSERVER+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$HAVE_XSERVER"; then @@ -9142,7 +9161,7 @@ fi 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. @@ -9164,14 +9183,14 @@ esac GNU_MALLOC=yes doug_lea_malloc=yes ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state" -if test "x$ac_cv_func_malloc_get_state" = x""yes; then : +if test "x$ac_cv_func_malloc_get_state" = xyes; then : else doug_lea_malloc=no fi ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state" -if test "x$ac_cv_func_malloc_set_state" = x""yes; then : +if test "x$ac_cv_func_malloc_set_state" = xyes; then : else doug_lea_malloc=no @@ -9179,7 +9198,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5 $as_echo_n "checking whether __after_morecore_hook exists... " >&6; } -if test "${emacs_cv_var___after_morecore_hook+set}" = set; then : +if ${emacs_cv_var___after_morecore_hook+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9265,8 +9284,7 @@ do : 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 " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -9285,7 +9303,7 @@ done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = x""yes; then : +if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF @@ -9295,7 +9313,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : +if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -9372,6 +9390,7 @@ int main () { char *data, *data2, *data3; + const char *cdata2; int i, pagesize; int fd, fd2; @@ -9396,10 +9415,10 @@ main () fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; - data2 = ""; - if (write (fd2, data2, 1) != 1) + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) return 5; - data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) @@ -9469,7 +9488,7 @@ LIBS="$LIBS_SYSTEM $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : +if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9503,7 +9522,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : +if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNET 1 _ACEOF @@ -9515,7 +9534,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 $as_echo_n "checking for main in -lXbsd... " >&6; } -if test "${ac_cv_lib_Xbsd_main+set}" = set; then : +if ${ac_cv_lib_Xbsd_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9543,14 +9562,14 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 $as_echo "$ac_cv_lib_Xbsd_main" >&6; } -if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : +if test "x$ac_cv_lib_Xbsd_main" = xyes; then : LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 $as_echo_n "checking for cma_open in -lpthreads... " >&6; } -if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : +if ${ac_cv_lib_pthreads_cma_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9584,7 +9603,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } -if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : +if test "x$ac_cv_lib_pthreads_cma_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREADS 1 _ACEOF @@ -9611,7 +9630,7 @@ case ${host_os} in aix*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 $as_echo_n "checking for -bbigtoc option... " >&6; } -if test "${gdb_cv_bigtoc+set}" = set; then : +if ${gdb_cv_bigtoc+:} false; then : $as_echo_n "(cached) " >&6 else @@ -9772,8 +9791,7 @@ XScreenNumberOfScreen XSetWMProtocols 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" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -9786,7 +9804,7 @@ fi if test "${window_system}" = "x11"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 $as_echo_n "checking X11 version 6... " >&6; } - if test "${emacs_cv_x11_version_6+set}" = set; then : + if ${emacs_cv_x11_version_6+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9851,7 +9869,7 @@ if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -9962,7 +9980,7 @@ if test "${HAVE_X11}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10061,7 +10079,7 @@ $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h for ac_func in MagickExportImagePixels do : ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels" -if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then : +if test "x$ac_cv_func_MagickExportImagePixels" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MAGICKEXPORTIMAGEPIXELS 1 _ACEOF @@ -10087,7 +10105,7 @@ if test "${with_gtk3}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10175,7 +10193,7 @@ $as_echo "no" >&6; } 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 $as_echo "#define HAVE_GTK3 1" >>confdefs.h @@ -10196,7 +10214,7 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10284,7 +10302,7 @@ $as_echo "no" >&6; } 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 @@ -10301,7 +10319,7 @@ if test x"$pkg_check_gtk" = xyes; then for ac_func in gtk_main do : ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" -if test "x$ac_cv_func_gtk_main" = x""yes; then : +if test "x$ac_cv_func_gtk_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GTK_MAIN 1 _ACEOF @@ -10311,7 +10329,7 @@ done 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 @@ -10349,7 +10367,7 @@ if test "${HAVE_GTK}" = "yes"; then ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default #include " -if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : +if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = xyes; then : HAVE_GTK_FILE_SELECTION=yes else HAVE_GTK_FILE_SELECTION=no @@ -10359,7 +10377,7 @@ fi for ac_func in gtk_file_selection_new do : ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" -if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : +if test "x$ac_cv_func_gtk_file_selection_new" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GTK_FILE_SELECTION_NEW 1 _ACEOF @@ -10373,7 +10391,7 @@ done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = x""yes; then : +if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF @@ -10385,7 +10403,7 @@ done if test "$ac_cv_header_pthread_h"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 $as_echo_n "checking for pthread_self in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then : +if ${ac_cv_lib_pthread_pthread_self+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10419,7 +10437,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 $as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } -if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then : +if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : HAVE_GTK_AND_PTHREAD=yes fi @@ -10441,8 +10459,7 @@ $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h 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" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -10463,7 +10480,7 @@ if test "${with_dbus}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10558,7 +10575,7 @@ $as_echo "#define HAVE_DBUS 1" >>confdefs.h for ac_func in dbus_watch_get_unix_fd do : ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" -if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then : +if test "x$ac_cv_func_dbus_watch_get_unix_fd" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DBUS_WATCH_GET_UNIX_FD 1 _ACEOF @@ -10580,7 +10597,7 @@ if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10674,7 +10691,7 @@ $as_echo "#define HAVE_GCONF 1" >>confdefs.h for ac_func in g_type_init do : ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" -if test "x$ac_cv_func_g_type_init" = x""yes; then : +if test "x$ac_cv_func_g_type_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_G_TYPE_INIT 1 _ACEOF @@ -10690,7 +10707,7 @@ LIBSELINUX_LIBS= if test "${with_selinux}" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } -if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : +if ${ac_cv_lib_selinux_lgetfilecon+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10724,7 +10741,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } -if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : +if test "x$ac_cv_lib_selinux_lgetfilecon" = xyes; then : HAVE_LIBSELINUX=yes else HAVE_LIBSELINUX=no @@ -10748,7 +10765,7 @@ if test "${with_gnutls}" = "yes" ; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10850,7 +10867,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then if test "$with_xaw3d" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 $as_echo_n "checking for xaw3d... " >&6; } - if test "${emacs_cv_xaw3d+set}" = set; then : + if ${emacs_cv_xaw3d+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10869,7 +10886,7 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } -if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : +if ${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10903,7 +10920,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } -if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : +if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = xyes; then : emacs_cv_xaw3d=yes else emacs_cv_xaw3d=no @@ -10933,7 +10950,7 @@ $as_echo "#define HAVE_XAW3D 1" >>confdefs.h $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 $as_echo_n "checking for libXaw... " >&6; } - if test "${emacs_cv_xaw+set}" = set; then : + if ${emacs_cv_xaw+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10964,7 +10981,7 @@ $as_echo "yes; using Lucid toolkit" >&6; } 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; } @@ -10979,7 +10996,7 @@ LIBXTR6= if test "${USE_X_TOOLKIT}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 $as_echo_n "checking X11 toolkit version... " >&6; } - if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : + if ${emacs_cv_x11_toolkit_version_6+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11030,7 +11047,7 @@ $as_echo "before 6" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } -if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : +if ${ac_cv_lib_Xmu_XmuConvertStandardSelection+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11064,7 +11081,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } -if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : +if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXMU 1 _ACEOF @@ -11091,7 +11108,7 @@ if test "${HAVE_X11}" = "yes"; then if test "${USE_X_TOOLKIT}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } -if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : +if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11125,7 +11142,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } -if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : +if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXEXT 1 _ACEOF @@ -11141,7 +11158,7 @@ LIBXP= if test "${USE_X_TOOLKIT}" = "MOTIF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 $as_echo_n "checking for Motif version 2.1... " >&6; } -if test "${emacs_cv_motif_version_2_1+set}" = set; then : +if ${emacs_cv_motif_version_2_1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11171,7 +11188,7 @@ $as_echo "$emacs_cv_motif_version_2_1" >&6; } if test $emacs_cv_motif_version_2_1 = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } -if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : +if ${ac_cv_lib_Xp_XpCreateContext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11205,14 +11222,14 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } -if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : +if test "x$ac_cv_lib_Xp_XpCreateContext" = xyes; then : LIBXP=-lXp fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 $as_echo_n "checking for LessTif where some systems put it... " >&6; } -if test "${emacs_cv_lesstif+set}" = set; then : +if ${emacs_cv_lesstif+:} false; then : $as_echo_n "(cached) " >&6 else # We put this in CFLAGS temporarily to precede other -I options @@ -11371,7 +11388,7 @@ if test "${HAVE_X11}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -11473,7 +11490,7 @@ $as_echo "no" >&6; } set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -11565,7 +11582,7 @@ $as_echo "no" >&6; } HAVE_XRENDER=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } -if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : +if ${ac_cv_lib_Xrender_XRenderQueryExtension+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11599,7 +11616,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } -if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : +if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = xyes; then : HAVE_XRENDER=yes fi @@ -11612,10 +11629,10 @@ fi XFT_LIBS="-lXrender $XFT_LIBS" LIBS="$XFT_LIBS $LIBS" ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : +if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } -if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : +if ${ac_cv_lib_Xft_XftFontOpen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11649,7 +11666,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } -if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : +if test "x$ac_cv_lib_Xft_XftFontOpen" = xyes; then : HAVE_XFT=yes fi @@ -11684,7 +11701,7 @@ $as_echo "#define HAVE_XFT 1" >>confdefs.h set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -11772,7 +11789,7 @@ $as_echo "no" >&6; } fi - test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5 + test "$HAVE_FREETYPE" = "no" && as_fn_error $? "libxft requires libfreetype" "$LINENO" 5 fi HAVE_LIBOTF=no @@ -11788,7 +11805,7 @@ $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -11881,7 +11898,7 @@ $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } -if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : +if ${ac_cv_lib_otf_OTF_get_variation_glyphs+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11915,7 +11932,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } -if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : +if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = xyes; then : HAVE_OTF_GET_VARIATION_GLYPHS=yes else HAVE_OTF_GET_VARIATION_GLYPHS=no @@ -11940,7 +11957,7 @@ $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -12058,10 +12075,10 @@ LIBXPM= if test "${HAVE_X11}" = "yes"; then if test "${with_xpm}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : +if test "x$ac_cv_header_X11_xpm_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } -if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : +if ${ac_cv_lib_Xpm_XpmReadFileToPixmap+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12095,7 +12112,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } -if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : +if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = xyes; then : HAVE_XPM=yes fi @@ -12147,10 +12164,10 @@ LIBJPEG= if test "${HAVE_X11}" = "yes"; then if test "${with_jpeg}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" -if test "x$ac_cv_header_jerror_h" = x""yes; then : +if test "x$ac_cv_header_jerror_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } -if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : +if ${ac_cv_lib_jpeg_jpeg_destroy_compress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12184,7 +12201,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } -if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : +if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then : HAVE_JPEG=yes fi @@ -12231,8 +12248,7 @@ if test "${HAVE_X11}" = "yes"; then 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" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -12244,7 +12260,7 @@ done if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 $as_echo_n "checking for png_get_channels in -lpng... " >&6; } -if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : +if ${ac_cv_lib_png_png_get_channels+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12278,7 +12294,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } -if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : +if test "x$ac_cv_lib_png_png_get_channels" = xyes; then : HAVE_PNG=yes fi @@ -12300,13 +12316,13 @@ LIBTIFF= if test "${HAVE_X11}" = "yes"; then if test "${with_tiff}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" -if test "x$ac_cv_header_tiffio_h" = x""yes; then : +if test "x$ac_cv_header_tiffio_h" = xyes; then : tifflibs="-lz -lm" # At least one tiff package requires the jpeg library. if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } -if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : +if ${ac_cv_lib_tiff_TIFFGetVersion+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12340,7 +12356,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } -if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : +if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes; then : HAVE_TIFF=yes fi @@ -12363,12 +12379,12 @@ HAVE_GIF=no LIBGIF= if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" -if test "x$ac_cv_header_gif_lib_h" = x""yes; then : +if test "x$ac_cv_header_gif_lib_h" = xyes; then : # EGifPutExtensionLast only exists from version libungif-4.1.0b1. # Earlier versions can crash Emacs. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } -if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : +if ${ac_cv_lib_gif_EGifPutExtensionLast+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12402,7 +12418,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } -if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : +if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = xyes; then : HAVE_GIF=yes else HAVE_GIF=maybe @@ -12418,7 +12434,7 @@ fi # If gif_lib.h but no libgif, try libungif. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } -if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : +if ${ac_cv_lib_ungif_EGifPutExtensionLast+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12452,7 +12468,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } -if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : +if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = xyes; then : HAVE_GIF=yes else HAVE_GIF=no @@ -12484,7 +12500,7 @@ if test "${HAVE_X11}" = "yes"; then 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 @@ -12499,10 +12515,10 @@ LIBGPM= MOUSE_SUPPORT= if test "${with_gpm}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" -if test "x$ac_cv_header_gpm_h" = x""yes; then : +if test "x$ac_cv_header_gpm_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } -if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : +if ${ac_cv_lib_gpm_Gpm_Open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12536,7 +12552,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } -if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : +if test "x$ac_cv_lib_gpm_Gpm_Open" = xyes; then : HAVE_GPM=yes fi @@ -12556,7 +12572,7 @@ fi ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then : +if test "x$ac_cv_header_malloc_malloc_h" = xyes; then : $as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h @@ -12601,10 +12617,10 @@ HAVE_X_SM=no LIBXSM= if test "${HAVE_X11}" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : +if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } -if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : +if ${ac_cv_lib_SM_SmcOpenConnection+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12638,7 +12654,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } -if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : +if test "x$ac_cv_lib_SM_SmcOpenConnection" = xyes; then : HAVE_X_SM=yes fi @@ -12669,7 +12685,7 @@ if test "${with_xml2}" != "no"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -12760,7 +12776,7 @@ $as_echo "no" >&6; } LIBS="$LIBXML2_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } -if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : +if ${ac_cv_lib_xml2_htmlReadMemory+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12794,7 +12810,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } -if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : +if test "x$ac_cv_lib_xml2_htmlReadMemory" = xyes; then : HAVE_LIBXML2=yes else HAVE_LIBXML2=no @@ -12816,7 +12832,7 @@ fi # If netdb.h doesn't declare h_errno, we must declare it by hand. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 $as_echo_n "checking whether netdb declares h_errno... " >&6; } -if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : +if ${emacs_cv_netdb_declares_h_errno+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12846,11 +12862,22 @@ $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h fi +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${ac_cv_working_alloca_h+set}" = set; then : +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12883,7 +12910,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if test "${ac_cv_func_alloca_works+set}" = set; then : +if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12902,7 +12929,7 @@ else #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca (size_t); # endif # endif # endif @@ -12946,7 +12973,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if test "${ac_cv_os_cray+set}" = set; then : +if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12973,8 +13000,7 @@ if test $ac_cv_os_cray = yes; then 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" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func @@ -12988,7 +13014,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if test "${ac_cv_c_stack_direction+set}" = set; then : +if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13038,14 +13064,14 @@ fi 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. # On HPUX 9.01, -lm does not contain logb, so check for sqrt. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } -if test "${ac_cv_lib_m_sqrt+set}" = set; then : +if ${ac_cv_lib_m_sqrt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13079,7 +13105,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test "x$ac_cv_lib_m_sqrt" = x""yes; then : +if test "x$ac_cv_lib_m_sqrt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -13093,7 +13119,7 @@ fi # have the same check as for liblockfile below. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 $as_echo_n "checking for maillock in -lmail... " >&6; } -if test "${ac_cv_lib_mail_maillock+set}" = set; then : +if ${ac_cv_lib_mail_maillock+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13127,7 +13153,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 $as_echo "$ac_cv_lib_mail_maillock" >&6; } -if test "x$ac_cv_lib_mail_maillock" = x""yes; then : +if test "x$ac_cv_lib_mail_maillock" = xyes; then : have_mail=yes else have_mail=no @@ -13144,7 +13170,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 $as_echo_n "checking for maillock in -llockfile... " >&6; } -if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : +if ${ac_cv_lib_lockfile_maillock+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13178,7 +13204,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } -if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : +if test "x$ac_cv_lib_lockfile_maillock" = xyes; then : have_lockfile=yes else have_lockfile=no @@ -13198,7 +13224,7 @@ else set dummy liblockfile.so; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_liblockfile+set}" = set; then : +if ${ac_cv_prog_liblockfile+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$liblockfile"; then @@ -13234,7 +13260,7 @@ fi 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 @@ -13242,7 +13268,7 @@ fi for ac_func in touchlock do : ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" -if test "x$ac_cv_func_touchlock" = x""yes; then : +if test "x$ac_cv_func_touchlock" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TOUCHLOCK 1 _ACEOF @@ -13253,7 +13279,7 @@ done for ac_header in maillock.h do : ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" -if test "x$ac_cv_header_maillock_h" = x""yes; then : +if test "x$ac_cv_header_maillock_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MAILLOCK_H 1 _ACEOF @@ -13323,8 +13349,7 @@ cfmakeraw cfsetspeed isnan copysign __executable_start 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" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -13335,7 +13360,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 $as_echo_n "checking for __builtin_unwind_init... " >&6; } -if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : +if ${emacs_cv_func___builtin_unwind_init+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13368,7 +13393,7 @@ fi for ac_header in sys/un.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_un_h" = x""yes; then : +if test "x$ac_cv_header_sys_un_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_UN_H 1 _ACEOF @@ -13380,7 +13405,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if test "${ac_cv_sys_largefile_source+set}" = set; then : +if ${ac_cv_sys_largefile_source+:} false; then : $as_echo_n "(cached) " >&6 else while :; do @@ -13449,7 +13474,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } -if test "${ac_cv_func_getpgrp_void+set}" = set; then : +if ${ac_cv_func_getpgrp_void+:} false; then : $as_echo_n "(cached) " >&6 else # Use it with a single arg. @@ -13498,7 +13523,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -13716,14 +13741,14 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - as_fn_error "unknown endianness + as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -13766,7 +13791,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 $as_echo_n "checking whether strtold conforms to C99... " >&6; } -if test "${gl_cv_func_c99_strtold+set}" = set; then : +if ${gl_cv_func_c99_strtold+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13809,7 +13834,7 @@ $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } -if test "${ac_cv_struct_st_dm_mode+set}" = set; then : +if ${ac_cv_struct_st_dm_mode+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13843,7 +13868,7 @@ $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" -if test "x$ac_cv_have_decl_strmode" = x""yes; then : +if test "x$ac_cv_have_decl_strmode" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -14032,7 +14057,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } -if test "${gl_cv_have_include_next+set}" = set; then : +if ${gl_cv_have_include_next+:} false; then : $as_echo_n "(cached) " >&6 else rm -rf conftestd1a conftestd1b conftestd2 @@ -14112,7 +14137,7 @@ $as_echo "$gl_cv_have_include_next" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 $as_echo_n "checking whether system header files limit the line length... " >&6; } -if test "${gl_cv_pragma_columns+set}" = set; then : +if ${gl_cv_pragma_columns+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14162,7 +14187,7 @@ $as_echo "$gl_cv_pragma_columns" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_getopt_h+set}" = set; then : +if ${gl_cv_next_getopt_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -14221,7 +14246,7 @@ $as_echo "$gl_cv_next_getopt_h" >&6; } for ac_header in getopt.h do : ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = x""yes; then : +if test "x$ac_cv_header_getopt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_H 1 _ACEOF @@ -14238,7 +14263,7 @@ done for ac_func in getopt_long_only do : ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" -if test "x$ac_cv_func_getopt_long_only" = x""yes; then : +if test "x$ac_cv_func_getopt_long_only" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_LONG_ONLY 1 _ACEOF @@ -14253,7 +14278,7 @@ done if test -z "$gl_replace_getopt"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } -if test "${gl_cv_func_getopt_posix+set}" = set; then : +if ${gl_cv_func_getopt_posix+:} false; then : $as_echo_n "(cached) " >&6 else @@ -14411,7 +14436,7 @@ $as_echo "$gl_cv_func_getopt_posix" >&6; } if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 $as_echo_n "checking for working GNU getopt function... " >&6; } -if test "${gl_cv_func_getopt_gnu+set}" = set; then : +if ${gl_cv_func_getopt_gnu+:} false; then : $as_echo_n "(cached) " >&6 else # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the @@ -14523,7 +14548,7 @@ $as_echo "$gl_cv_func_getopt_gnu" >&6; } fi ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_getenv" = x""yes; then : +if test "x$ac_cv_have_decl_getenv" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -14618,8 +14643,7 @@ fi 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" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -14632,7 +14656,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : +if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file @@ -14762,7 +14786,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if test "${ac_cv_header_stdbool_h+set}" = set; then : +if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14837,7 +14861,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = x""yes; then : +if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 @@ -14855,7 +14879,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } -if test "${gt_cv_c_wchar_t+set}" = set; then : +if ${gt_cv_c_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14888,7 +14912,7 @@ $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } -if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : +if ${ac_cv_type_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_type_unsigned_long_long_int=yes @@ -14946,7 +14970,7 @@ $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } -if test "${ac_cv_type_long_long_int+set}" = set; then : +if ${ac_cv_type_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_type_long_long_int=yes @@ -15009,7 +15033,7 @@ $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include " -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h @@ -15022,7 +15046,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if test "${ac_cv_header_stat_broken+set}" = set; then : +if ${ac_cv_header_stat_broken+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15066,7 +15090,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if test "${ac_cv_c_restrict+set}" = set; then : +if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no @@ -15116,7 +15140,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : +if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15149,7 +15173,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : +if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15178,7 +15202,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } -if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : +if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15227,7 +15251,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_time_h+set}" = set; then : +if ${gl_cv_next_time_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -15270,7 +15294,7 @@ $as_echo "$gl_cv_next_time_h" >&6; } ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : +if test "x$ac_cv_have_decl_localtime_r" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -15351,14 +15375,14 @@ fi # Make sure getloadavg.c is where it belongs, at configure-time. test -f "$srcdir/$gl_source_base/getloadavg.c" || - as_fn_error "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5 + as_fn_error $? "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5 gl_save_LIBS=$LIBS # getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" -if test "x$ac_cv_func_getloadavg" = x""yes; then : +if test "x$ac_cv_func_getloadavg" = xyes; then : else gl_have_func=no @@ -15371,7 +15395,7 @@ else if test $gl_have_func = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 $as_echo_n "checking for elf_begin in -lelf... " >&6; } -if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : +if ${ac_cv_lib_elf_elf_begin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15405,13 +15429,13 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } -if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : +if test "x$ac_cv_lib_elf_elf_begin" = xyes; then : LIBS="-lelf $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 $as_echo_n "checking for kvm_open in -lkvm... " >&6; } -if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : +if ${ac_cv_lib_kvm_kvm_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15445,14 +15469,14 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } -if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : +if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then : LIBS="-lkvm $LIBS" fi # Check for the 4.4BSD definition of getloadavg. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 $as_echo_n "checking for getloadavg in -lutil... " >&6; } -if test "${ac_cv_lib_util_getloadavg+set}" = set; then : +if ${ac_cv_lib_util_getloadavg+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15486,7 +15510,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 $as_echo "$ac_cv_lib_util_getloadavg" >&6; } -if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : +if test "x$ac_cv_lib_util_getloadavg" = xyes; then : LIBS="-lutil $LIBS" gl_have_func=yes fi @@ -15499,7 +15523,7 @@ fi LIBS="-L/usr/local/lib $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } -if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : +if ${ac_cv_lib_getloadavg_getloadavg+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15533,7 +15557,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } -if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : +if test "x$ac_cv_lib_getloadavg_getloadavg" = xyes; then : LIBS="-lgetloadavg $LIBS" gl_have_func=yes else LIBS=$gl_getloadavg_LIBS @@ -15559,7 +15583,7 @@ fi # Solaris has libkstat which does not require root. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 $as_echo_n "checking for kstat_open in -lkstat... " >&6; } -if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : +if ${ac_cv_lib_kstat_kstat_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15593,7 +15617,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } -if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : +if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBKSTAT 1 _ACEOF @@ -15609,7 +15633,7 @@ if test $gl_have_func = no; then for ac_func in pstat_getdynamic do : ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" -if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : +if test "x$ac_cv_func_pstat_getdynamic" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PSTAT_GETDYNAMIC 1 _ACEOF @@ -15623,7 +15647,7 @@ fi if test $gl_have_func = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } -if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then : +if ${ac_cv_lib_perfstat_perfstat_cpu_total+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15657,7 +15681,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } -if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then : +if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPERFSTAT 1 _ACEOF @@ -15671,14 +15695,14 @@ fi if test $gl_have_func = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : +if test "x$ac_cv_header_sys_dg_sys_info_h" = xyes; then : gl_have_func=yes $as_echo "#define DGUX 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } -if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : +if ${ac_cv_lib_dgc_dg_sys_info+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15712,7 +15736,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } -if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : +if test "x$ac_cv_lib_dgc_dg_sys_info" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDGC 1 _ACEOF @@ -15739,7 +15763,7 @@ fi if test $gl_have_func = no; then ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : +if test "x$ac_cv_header_inq_stats_cpustats_h" = xyes; then : gl_have_func=yes $as_echo "#define UMAX 1" >>confdefs.h @@ -15754,7 +15778,7 @@ fi if test $gl_have_func = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : +if test "x$ac_cv_header_sys_cpustats_h" = xyes; then : gl_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h fi @@ -15766,7 +15790,7 @@ if test $gl_have_func = no; then for ac_header in mach/mach.h do : ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_h" = x""yes; then : +if test "x$ac_cv_header_mach_mach_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACH_MACH_H 1 _ACEOF @@ -15780,13 +15804,13 @@ fi for ac_header in nlist.h do : ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" -if test "x$ac_cv_header_nlist_h" = x""yes; then : +if test "x$ac_cv_header_nlist_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NLIST_H 1 _ACEOF ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include " -if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : +if test "x$ac_cv_member_struct_nlist_n_un_n_name" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 @@ -15840,7 +15864,7 @@ LIBS=$gl_save_LIBS for ac_header in sys/loadavg.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : +if test "x$ac_cv_header_sys_loadavg_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_LOADAVG_H 1 _ACEOF @@ -15859,7 +15883,7 @@ ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE #endif #include " -if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : +if test "x$ac_cv_have_decl_getloadavg" = xyes; then : else HAVE_DECL_GETLOADAVG=0 @@ -15968,7 +15992,7 @@ if test $APPLE_UNIVERSAL_BUILD = 1; then fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 $as_echo_n "checking for working mktime... " >&6; } -if test "${ac_cv_func_working_mktime+set}" = set; then : +if ${ac_cv_func_working_mktime+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -16233,7 +16257,7 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 $as_echo_n "checking whether readlink signature is correct... " >&6; } -if test "${gl_cv_decl_readlink_works+set}" = set; then : +if ${gl_cv_decl_readlink_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16260,7 +16284,7 @@ fi $as_echo "$gl_cv_decl_readlink_works" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } -if test "${gl_cv_func_readlink_works+set}" = set; then : +if ${gl_cv_func_readlink_works+:} false; then : $as_echo_n "(cached) " >&6 else # We have readlink, so assume ln -s works. @@ -16338,7 +16362,7 @@ $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } -if test "${gl_cv_func_stat_dir_slash+set}" = set; then : +if ${gl_cv_func_stat_dir_slash+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -16373,7 +16397,7 @@ fi $as_echo "$gl_cv_func_stat_dir_slash" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } -if test "${gl_cv_func_stat_file_slash+set}" = set; then : +if ${gl_cv_func_stat_file_slash+:} false; then : $as_echo_n "(cached) " >&6 else touch conftest.tmp @@ -16481,7 +16505,7 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if test "${gl_cv_decl_null_works+set}" = set; then : +if ${gl_cv_decl_null_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16524,7 +16548,7 @@ $as_echo "$gl_cv_decl_null_works" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stddef_h+set}" = set; then : +if ${gl_cv_next_stddef_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -16620,7 +16644,7 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdint_h+set}" = set; then : +if ${gl_cv_next_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -16676,7 +16700,7 @@ $as_echo "$gl_cv_next_stdint_h" >&6; } if test $ac_cv_header_stdint_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } -if test "${gl_cv_header_working_stdint_h+set}" = set; then : +if ${gl_cv_header_working_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_header_working_stdint_h=no @@ -16949,8 +16973,7 @@ $as_echo "$gl_cv_header_working_stdint_h" >&6; } 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" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -16980,7 +17003,7 @@ done for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } -if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " @@ -17025,7 +17048,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } -if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " @@ -17069,7 +17092,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } -if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${gl_cv_type_${gltype}_signed+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17128,7 +17151,7 @@ _ACEOF for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${gl_cv_type_${gltype}_suffix+:} false; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no @@ -17200,7 +17223,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${gl_cv_type_${gltype}_suffix+:} false; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no @@ -17287,7 +17310,7 @@ _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_stdlib_h+set}" = set; then : +if ${gl_cv_next_stdlib_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -17375,7 +17398,7 @@ $as_echo "#define my_strftime nstrftime" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } -if test "${gl_cv_func_symlink_works+set}" = set; then : +if ${gl_cv_func_symlink_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -17458,7 +17481,7 @@ $as_echo "$gl_cv_func_symlink_works" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_sys_stat_h+set}" = set; then : +if ${gl_cv_next_sys_stat_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -17508,7 +17531,7 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; } ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include #include " -if test "x$ac_cv_type_nlink_t" = x""yes; then : +if test "x$ac_cv_type_nlink_t" = xyes; then : else @@ -17541,7 +17564,7 @@ fi HAVE_LOCALTIME_R=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } -if test "${gl_cv_time_r_posix+set}" = set; then : +if ${gl_cv_time_r_posix+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17623,7 +17646,7 @@ $as_echo "$gl_cv_time_r_posix" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_unistd_h+set}" = set; then : +if ${gl_cv_next_unistd_h+:} false; then : $as_echo_n "(cached) " >&6 else @@ -17723,7 +17746,7 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } for ac_func in grantpt do : ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" -if test "x$ac_cv_func_grantpt" = x""yes; then : +if test "x$ac_cv_func_grantpt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GRANTPT 1 _ACEOF @@ -17736,7 +17759,7 @@ done for ac_func in getpt do : ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" -if test "x$ac_cv_func_getpt" = x""yes; then : +if test "x$ac_cv_func_getpt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPT 1 _ACEOF @@ -17753,7 +17776,7 @@ done have_tputs_et_al=true { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 $as_echo_n "checking for library containing tputs... " >&6; } -if test "${ac_cv_search_tputs+set}" = set; then : +if ${ac_cv_search_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -17787,11 +17810,11 @@ for ac_lib in '' ncurses terminfo termcap; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test "${ac_cv_search_tputs+set}" = set; then : + if ${ac_cv_search_tputs+:} false; then : break fi done -if test "${ac_cv_search_tputs+set}" = set; then : +if ${ac_cv_search_tputs+:} false; then : else ac_cv_search_tputs=no @@ -17810,7 +17833,7 @@ else 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 @@ -17850,7 +17873,7 @@ case "$opsys" in freebsd) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } - if test "${emacs_cv_freebsd_terminfo+set}" = set; then : + if ${emacs_cv_freebsd_terminfo+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17992,16 +18015,16 @@ LIBHESIOD= if test "$with_hesiod" != no ; then # Don't set $LIBS here -- see comments above. FIXME which comments? ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" -if test "x$ac_cv_func_res_send" = x""yes; then : +if test "x$ac_cv_func_res_send" = xyes; then : else ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" -if test "x$ac_cv_func___res_send" = x""yes; then : +if test "x$ac_cv_func___res_send" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 $as_echo_n "checking for res_send in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv_res_send+set}" = set; then : +if ${ac_cv_lib_resolv_res_send+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18035,12 +18058,12 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 $as_echo "$ac_cv_lib_resolv_res_send" >&6; } -if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : +if test "x$ac_cv_lib_resolv_res_send" = xyes; then : resolv=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 $as_echo_n "checking for __res_send in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv___res_send+set}" = set; then : +if ${ac_cv_lib_resolv___res_send+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18074,7 +18097,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 $as_echo "$ac_cv_lib_resolv___res_send" >&6; } -if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : +if test "x$ac_cv_lib_resolv___res_send" = xyes; then : resolv=yes fi @@ -18090,12 +18113,12 @@ fi RESOLVLIB= fi ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" -if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : +if test "x$ac_cv_func_hes_getmailhost" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } -if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : +if ${ac_cv_lib_hesiod_hes_getmailhost+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18129,7 +18152,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } -if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : +if test "x$ac_cv_lib_hesiod_hes_getmailhost" = xyes; then : hesiod=yes else : @@ -18168,7 +18191,7 @@ KRB4LIB= if test "${with_kerberos}" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 $as_echo_n "checking for com_err in -lcom_err... " >&6; } -if test "${ac_cv_lib_com_err_com_err+set}" = set; then : +if ${ac_cv_lib_com_err_com_err+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18202,7 +18225,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 $as_echo "$ac_cv_lib_com_err_com_err" >&6; } -if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : +if test "x$ac_cv_lib_com_err_com_err" = xyes; then : have_com_err=yes else have_com_err=no @@ -18217,7 +18240,7 @@ $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } -if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : +if ${ac_cv_lib_crypto_mit_des_cbc_encrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18251,7 +18274,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : +if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = xyes; then : have_crypto=yes else have_crypto=no @@ -18266,7 +18289,7 @@ $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } -if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : +if ${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18300,7 +18323,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : +if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = xyes; then : have_k5crypto=yes else have_k5crypto=no @@ -18315,7 +18338,7 @@ $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } -if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : +if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18349,7 +18372,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } -if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : +if test "x$ac_cv_lib_krb5_krb5_init_context" = xyes; then : have_krb5=yes else have_krb5=no @@ -18365,7 +18388,7 @@ $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h if test "${with_kerberos5}" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } -if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : +if ${ac_cv_lib_des425_des_cbc_encrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18399,7 +18422,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : +if test "x$ac_cv_lib_des425_des_cbc_encrypt" = xyes; then : have_des425=yes else have_des425=no @@ -18414,7 +18437,7 @@ $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } -if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : +if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18448,7 +18471,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : +if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then : have_des=yes else have_des=no @@ -18464,7 +18487,7 @@ $as_echo "#define HAVE_LIBDES 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } -if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : +if ${ac_cv_lib_krb4_krb_get_cred+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18498,7 +18521,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : +if test "x$ac_cv_lib_krb4_krb_get_cred" = xyes; then : have_krb4=yes else have_krb4=no @@ -18513,7 +18536,7 @@ $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } -if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : +if ${ac_cv_lib_krb_krb_get_cred+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18547,7 +18570,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : +if test "x$ac_cv_lib_krb_krb_get_cred" = xyes; then : have_krb=yes else have_krb=no @@ -18567,13 +18590,13 @@ $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h for ac_header in krb5.h do : ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" -if test "x$ac_cv_header_krb5_h" = x""yes; then : +if test "x$ac_cv_header_krb5_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_H 1 _ACEOF ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include " -if test "x$ac_cv_member_krb5_error_text" = x""yes; then : +if test "x$ac_cv_member_krb5_error_text" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_ERROR_TEXT 1 @@ -18583,7 +18606,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include " -if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : +if test "x$ac_cv_member_krb5_error_e_text" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_ERROR_E_TEXT 1 @@ -18600,7 +18623,7 @@ done for ac_header in des.h do : ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" -if test "x$ac_cv_header_des_h" = x""yes; then : +if test "x$ac_cv_header_des_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DES_H 1 _ACEOF @@ -18609,7 +18632,7 @@ else for ac_header in kerberosIV/des.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : +if test "x$ac_cv_header_kerberosIV_des_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROSIV_DES_H 1 _ACEOF @@ -18618,7 +18641,7 @@ else for ac_header in kerberos/des.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : +if test "x$ac_cv_header_kerberos_des_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROS_DES_H 1 _ACEOF @@ -18638,7 +18661,7 @@ done for ac_header in krb.h do : ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_krb_h" = x""yes; then : +if test "x$ac_cv_header_krb_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB_H 1 _ACEOF @@ -18647,7 +18670,7 @@ else for ac_header in kerberosIV/krb.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : +if test "x$ac_cv_header_kerberosIV_krb_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROSIV_KRB_H 1 _ACEOF @@ -18656,7 +18679,7 @@ else for ac_header in kerberos/krb.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : +if test "x$ac_cv_header_kerberos_krb_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROS_KRB_H 1 _ACEOF @@ -18677,7 +18700,7 @@ done for ac_header in com_err.h do : ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_com_err_h" = x""yes; then : +if test "x$ac_cv_header_com_err_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_COM_ERR_H 1 _ACEOF @@ -18698,7 +18721,7 @@ fi # to return localized messages. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } -if test "${ac_cv_lib_intl_dgettext+set}" = set; then : +if ${ac_cv_lib_intl_dgettext+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18732,7 +18755,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } -if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : +if test "x$ac_cv_lib_intl_dgettext" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINTL 1 _ACEOF @@ -18744,7 +18767,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 $as_echo_n "checking whether localtime caches TZ... " >&6; } -if test "${emacs_cv_localtime_cache+set}" = set; then : +if ${emacs_cv_localtime_cache+:} false; then : $as_echo_n "(cached) " >&6 else if test x$ac_cv_func_tzset = xyes; then @@ -18803,7 +18826,7 @@ if test "x$HAVE_TIMEVAL" = xyes; then for ac_func in gettimeofday do : ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = x""yes; then : +if test "x$ac_cv_func_gettimeofday" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETTIMEOFDAY 1 _ACEOF @@ -18814,7 +18837,7 @@ done if test $ac_cv_func_gettimeofday = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } -if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : +if ${emacs_cv_gettimeofday_two_arguments+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18858,7 +18881,7 @@ fi ok_so_far=yes ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = x""yes; then : +if test "x$ac_cv_func_socket" = xyes; then : else ok_so_far=no @@ -18866,7 +18889,7 @@ fi if test $ok_so_far = yes; then ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = x""yes; then : +if test "x$ac_cv_header_netinet_in_h" = xyes; then : else ok_so_far=no @@ -18876,7 +18899,7 @@ fi fi if test $ok_so_far = yes; then ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : +if test "x$ac_cv_header_arpa_inet_h" = xyes; then : else ok_so_far=no @@ -18910,7 +18933,7 @@ $as_echo "no" >&6; } fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = x""yes; then : +if test "x$ac_cv_type_pid_t" = xyes; then : else @@ -18923,7 +18946,7 @@ fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" -if test "x$ac_cv_header_vfork_h" = x""yes; then : +if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF @@ -18936,8 +18959,7 @@ for ac_func in fork vfork 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" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -18948,7 +18970,7 @@ done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } -if test "${ac_cv_func_fork_works+set}" = set; then : +if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -19001,7 +19023,7 @@ ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } -if test "${ac_cv_func_vfork_works+set}" = set; then : +if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -19137,7 +19159,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if test "${emacs_cv_langinfo_codeset+set}" = set; then : +if ${emacs_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19169,7 +19191,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = x""yes; then : +if test "x$ac_cv_type_size_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIZE_T 1 @@ -19181,7 +19203,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } -if test "${ac_cv_type_mbstate_t+set}" = set; then : +if ${ac_cv_type_mbstate_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19217,7 +19239,7 @@ $as_echo "#define mbstate_t int" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 $as_echo_n "checking for C restricted array declarations... " >&6; } -if test "${emacs_cv_c_restrict_arr+set}" = set; then : +if ${emacs_cv_c_restrict_arr+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19257,7 +19279,7 @@ if test "x$GCC" = xyes \ && 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 version=$PACKAGE_VERSION @@ -19814,10 +19836,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -19833,6 +19866,7 @@ DEFS=-DHAVE_CONFIG_H 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$//' @@ -19856,16 +19890,16 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error "conditional \"AMDEP\" was never defined. + as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error "conditional \"am__fastdepCC\" was never defined. + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then - as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. + as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -19902,7 +19936,7 @@ fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -20003,6 +20037,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -20048,19 +20083,19 @@ export LANGUAGE (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS 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=$?; 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 + 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 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -20256,7 +20291,7 @@ $as_echo X"$as_dir" | 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 @@ -20310,7 +20345,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.65. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -20376,10 +20411,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ emacs config.status 24.0.50 -configured by $0, generated by GNU Autoconf 2.65, +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -20397,11 +20432,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -20423,6 +20463,7 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -20435,7 +20476,7 @@ do 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 ;; @@ -20444,7 +20485,7 @@ Try \`$0 --help' for more information.";; 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" @@ -20518,7 +20559,7 @@ do "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -20541,9 +20582,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -20551,12 +20593,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { 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 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -20590,24 +20633,24 @@ if test "x$ac_cr" = x; then 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 -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && - echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && + echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && 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 { @@ -20615,18 +20658,18 @@ rm -f conf$$files.sh 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 @@ -20634,7 +20677,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -20682,7 +20725,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init @@ -20720,21 +20763,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries 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[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -20746,7 +20797,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -20758,11 +20809,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; 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 @@ -20847,7 +20898,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _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" @@ -20860,7 +20911,7 @@ do 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 @@ -20879,7 +20930,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -20888,7 +20939,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "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'" @@ -20914,8 +20965,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -21053,26 +21104,27 @@ $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then - $AWK -f "$tmp/subs.awk" + $AWK -f "$ac_tmp/subs.awk" else - $AWK -f "$tmp/subs.awk" | $SHELL -fi >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + $AWK -f "$ac_tmp/subs.awk" | $SHELL +fi \ + >$ac_tmp/out || 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"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_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" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_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) # @@ -21081,21 +21133,21 @@ which seems to be undefined. Please make sure it is defined." >&2;} if test x"$ac_file" != x-; then { $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 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_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 + mv "$ac_tmp/config.h" "$ac_file" \ + || 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 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -21260,7 +21312,7 @@ _ACEOF 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. @@ -21281,7 +21333,7 @@ if test "$no_create" != yes; then 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 $? + $ac_cs_success || as_fn_exit 1 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 diff --git a/lib/Makefile.in b/lib/Makefile.in index 04ee541a09c..502b3dbb927 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -24,7 +24,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value lstat mktime readlink strftime symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink strftime symlink sys_stat VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ diff --git a/lib/gnulib.mk b/lib/gnulib.mk index b5fd4a358db..cd6a1d00c15 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk @@ -9,7 +9,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value lstat mktime readlink strftime symlink sys_stat +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --no-libtool --macro-prefix=gl --no-vc-files crypto/md5 dtoastr filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink strftime symlink sys_stat MOSTLYCLEANFILES += core *.stackdump diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 61cdcc53928..13fae7b6703 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -355,7 +355,11 @@ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " #if @GNULIB_FUTIMENS@ -# if @REPLACE_FUTIMENS@ +/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens + implementation relies on futimesat, which on Solaris 10 makes an invocation + to futimens that is meant to invoke the libc's futimens(), not gnulib's + futimens(). */ +# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef futimens # define futimens rpl_futimens @@ -368,7 +372,9 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif _GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); # endif +# if @HAVE_FUTIMENS@ _GL_CXXALIASWARN (futimens); +# endif #elif defined GNULIB_POSIXCHECK # undef futimens # if HAVE_RAW_DECL_FUTIMENS @@ -612,7 +618,11 @@ _GL_WARN_ON_USE (stat, "stat is unportable - " #if @GNULIB_UTIMENSAT@ -# if @REPLACE_UTIMENSAT@ +/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat + implementation relies on futimesat, which on Solaris 10 makes an invocation + to utimensat that is meant to invoke the libc's utimensat(), not gnulib's + utimensat(). */ +# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun) # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef utimensat # define utimensat rpl_utimensat @@ -631,7 +641,9 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, struct timespec const times[2], int flag)); # endif +# if @HAVE_UTIMENSAT@ _GL_CXXALIASWARN (utimensat); +# endif #elif defined GNULIB_POSIXCHECK # undef utimensat # if HAVE_RAW_DECL_UTIMENSAT From d251f04bea68e68d2598f0aa7464ecc26b26103e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 13 Mar 2011 19:49:38 +0200 Subject: [PATCH 197/383] MS-Windows followup for 2011-03-13T06:43:00Z!eggert@cs.ucla.edu. src/makefile.w32-in ($(BLD)/editfns.$(O)): Depend on $(EMACS_ROOT)/lib/intprops.h. --- src/ChangeLog | 5 +++++ src/makefile.w32-in | 1 + 2 files changed, 6 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index e840bb3c036..3d5f3e0c387 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-13 Eli Zaretskii + + * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on + $(EMACS_ROOT)/lib/intprops.h. + 2011-03-13 Paul Eggert Fix more problems found by GCC 4.5.2's static checks. diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 81f758f1b5f..9916a884292 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -727,6 +727,7 @@ $(BLD)/editfns.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(EMACS_ROOT)/lib/strftime.h \ + $(EMACS_ROOT)/lib/intprops.h \ $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ From 67613d3160cd9e87daabfb036828ceb5325d889b Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Sun, 13 Mar 2011 20:50:07 +0000 Subject: [PATCH 198/383] auth-source.el (auth-source-netrc-create): Show the default in the prompt when prompting for token creation. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/auth-source.el | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ec12faada98..af0bd1519c7 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-03-13 Teodor Zlatanov + + * auth-source.el (auth-source-netrc-create): Show the default in the + prompt when prompting for token creation. + 2011-03-12 Teodor Zlatanov * auth-source.el (auth-source-format-prompt): Always convert the value diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 0fb153ad09b..52f2b92e933 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -1100,6 +1100,10 @@ See `auth-source-search' for details on SPEC." ;; special case prompt for passwords (read-passwd prompt)) ((null data) + (when default + (setq + prompt + (concat prompt (format "(default %s) " default)))) (read-string prompt nil nil default)) (t (or data default)))) From eebc475df54de7ad5c04ef7cddc083c865235540 Mon Sep 17 00:00:00 2001 From: Ted Zlatanov Date: Sun, 13 Mar 2011 17:17:17 -0500 Subject: [PATCH 199/383] Add `auth-source-search' integration for LDAP searches. * net/ldap.el (ldap-search-internal): Add `auth-source-search' integration for LDAP parameters. The host, base, user or binddn, and secret tokens can be specified in a netrc file, for instance. This is optional because an `auth-source' parameter must be specified in the search attributes. --- lisp/ChangeLog | 8 ++++++++ lisp/net/ldap.el | 43 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1f50ee9ebe6..c74e7cbdb2d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2011-03-13 Teodor Zlatanov + + * net/ldap.el (ldap-search-internal): Add `auth-source-search' + integration for LDAP parameters. The host, base, user or binddn, + and secret tokens can be specified in a netrc file, for instance. + This is optional because an `auth-source' parameter must be + specified in the search attributes. + 2011-03-13 Juanma Barranquero * help.el (describe-mode): Link to the mode's definition (bug#8185). diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 3ccad277ffb..2caf8dec30f 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -36,6 +36,8 @@ (require 'custom) (eval-when-compile (require 'cl)) +(autoload 'auth-source-search "auth-source") + (defgroup ldap nil "Lightweight Directory Access Protocol." :version "21.1" @@ -480,6 +482,22 @@ Additional search parameters can be specified through "Perform a search on a LDAP server. SEARCH-PLIST is a property list describing the search request. Valid keys in that list are: + + `auth-source', if non-nil, will use `auth-source-search' and +will grab the :host, :secret, :base, and (:user or :binddn) +tokens into the `host', `passwd', `base', and `binddn' parameters +respectively if they are not provided in SEARCH-PLIST. So for +instance *each* of these netrc lines has the same effect if you +ask for the host \"ldapserver:2400\": + + machine ldapserver:2400 login myDN secret myPassword base myBase + machine ldapserver:2400 binddn myDN secret myPassword port ldap + login myDN secret myPassword base myBase + +but if you have more than one in your netrc file, only the first +matching one will be used. Note the \"port ldap\" part is NOT +required. + `host' is a string naming one or more (blank-separated) LDAP servers to to try to connect to. Each host name may optionally be of the form HOST:PORT. `filter' is a filter string for the search as described in RFC 1558. @@ -500,19 +518,34 @@ not their associated values. its distinguished name DN. The function returns a list of matching entries. Each entry is itself an alist of attribute/value pairs." - (let ((buf (get-buffer-create " *ldap-search*")) + (let* ((buf (get-buffer-create " *ldap-search*")) (bufval (get-buffer-create " *ldap-value*")) (host (or (plist-get search-plist 'host) ldap-default-host)) + ;; find entries with port "ldap" that match the requested host if any + (asfound (when (plist-get search-plist 'auth-source) + (nth 0 (auth-source-search :host (or host t) + :create t)))) + ;; if no host was requested, get it from the auth-source entry + (host (or host (plist-get asfound :host))) + ;; get the password from the auth-source + (passwd (or (plist-get search-plist 'passwd) + (plist-get asfound :secret))) + ;; convert the password from a function call if needed + (passwd (if (functionp passwd) (funcall passwd) passwd)) + ;; get the binddn from the search-list or from the + ;; auth-source user or binddn tokens + (binddn (or (plist-get search-plist 'binddn) + (plist-get asfound :user) + (plist-get asfound :binddn))) + (base (or (plist-get search-plist 'base) + (plist-get asfound :base) + ldap-default-base)) (filter (plist-get search-plist 'filter)) (attributes (plist-get search-plist 'attributes)) (attrsonly (plist-get search-plist 'attrsonly)) - (base (or (plist-get search-plist 'base) - ldap-default-base)) (scope (plist-get search-plist 'scope)) - (binddn (plist-get search-plist 'binddn)) (auth (plist-get search-plist 'auth)) - (passwd (plist-get search-plist 'passwd)) (deref (plist-get search-plist 'deref)) (timelimit (plist-get search-plist 'timelimit)) (sizelimit (plist-get search-plist 'sizelimit)) From cffc6f3bd9b5dbb9825502928bd9dd58ddbac02e Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 13 Mar 2011 18:25:16 -0400 Subject: [PATCH 200/383] Fix BUF_* macros to handle indirect buffers properly (Bug#8219). * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT) (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219). These macros can no longer be used for assignment. * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Assign struct members directly, instead of using BUF_BEGV etc. (record_buffer_markers, fetch_buffer_markers): New functions for recording and fetching special buffer markers. (set_buffer_internal_1, set_buffer_temp): Use them. * lread.c (unreadchar): Use SET_BUF_PT_BOTH. * insdel.c (adjust_point): Use SET_BUF_PT_BOTH. * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH. (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH. * xdisp.c (hscroll_window_tree): (reconsider_clip_changes): Use PT instead of BUF_PT. --- src/ChangeLog | 22 ++++++ src/buffer.c | 187 +++++++++++++++++++++--------------------------- src/buffer.h | 45 ++++++++---- src/insdel.c | 4 +- src/intervals.c | 16 ++--- src/lread.c | 4 +- src/xdisp.c | 4 +- 7 files changed, 146 insertions(+), 136 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3d5f3e0c387..bad9b8dd4b7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,25 @@ +2011-03-13 Chong Yidong + + * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT) + (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219). + These macros can no longer be used for assignment. + + * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Assign + struct members directly, instead of using BUF_BEGV etc. + (record_buffer_markers, fetch_buffer_markers): New functions for + recording and fetching special buffer markers. + (set_buffer_internal_1, set_buffer_temp): Use them. + + * lread.c (unreadchar): Use SET_BUF_PT_BOTH. + + * insdel.c (adjust_point): Use SET_BUF_PT_BOTH. + + * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH. + (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH. + + * xdisp.c (hscroll_window_tree): + (reconsider_clip_changes): Use PT instead of BUF_PT. + 2011-03-13 Eli Zaretskii * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on diff --git a/src/buffer.c b/src/buffer.c index 448c9236387..01940728275 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -330,15 +330,17 @@ even if it is dead. The return value is never nil. */) if (! BUF_BEG_ADDR (b)) buffer_memory_full (); - BUF_PT (b) = BEG; + b->pt = BEG; + b->begv = BEG; + b->zv = BEG; + b->pt_byte = BEG_BYTE; + b->begv_byte = BEG_BYTE; + b->zv_byte = BEG_BYTE; + BUF_GPT (b) = BEG; - BUF_BEGV (b) = BEG; - BUF_ZV (b) = BEG; - BUF_Z (b) = BEG; - BUF_PT_BYTE (b) = BEG_BYTE; BUF_GPT_BYTE (b) = BEG_BYTE; - BUF_BEGV_BYTE (b) = BEG_BYTE; - BUF_ZV_BYTE (b) = BEG_BYTE; + + BUF_Z (b) = BEG; BUF_Z_BYTE (b) = BEG_BYTE; BUF_MODIFF (b) = 1; BUF_CHARS_MODIFF (b) = 1; @@ -489,6 +491,53 @@ clone_per_buffer_values (struct buffer *from, struct buffer *to) BVAR (to, local_var_alist) = buffer_lisp_local_variables (from); } + +/* If buffer B has markers to record PT, BEGV and ZV when it is not + current, update these markers. */ + +static void +record_buffer_markers (struct buffer *b) +{ + if (! NILP (BVAR (b, pt_marker))) + { + Lisp_Object buffer; + + eassert (!NILP (BVAR (b, begv_marker))); + eassert (!NILP (BVAR (b, zv_marker))); + + XSETBUFFER (buffer, b); + set_marker_both (BVAR (b, pt_marker), buffer, b->pt, b->pt_byte); + set_marker_both (BVAR (b, begv_marker), buffer, b->begv, b->begv_byte); + set_marker_both (BVAR (b, zv_marker), buffer, b->zv, b->zv_byte); + } +} + + +/* If buffer B has markers to record PT, BEGV and ZV when it is not + current, fetch these values into B->begv etc. */ + +static void +fetch_buffer_markers (struct buffer *b) +{ + if (! NILP (BVAR (b, pt_marker))) + { + Lisp_Object m; + + eassert (!NILP (BVAR (b, begv_marker))); + eassert (!NILP (BVAR (b, zv_marker))); + + m = BVAR (b, pt_marker); + SET_BUF_PT_BOTH (b, marker_position (m), marker_byte_position (m)); + + m = BVAR (b, begv_marker); + SET_BUF_BEGV_BOTH (b, marker_position (m), marker_byte_position (m)); + + m = BVAR (b, zv_marker); + SET_BUF_ZV_BOTH (b, marker_position (m), marker_byte_position (m)); + } +} + + DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, 2, 3, "bMake indirect buffer (to buffer): \nBName of indirect buffer: ", @@ -527,12 +576,12 @@ CLONE nil means the indirect buffer's state is reset to default values. */) /* Use the base buffer's text object. */ b->text = b->base_buffer->text; - BUF_BEGV (b) = BUF_BEGV (b->base_buffer); - BUF_ZV (b) = BUF_ZV (b->base_buffer); - BUF_PT (b) = BUF_PT (b->base_buffer); - BUF_BEGV_BYTE (b) = BUF_BEGV_BYTE (b->base_buffer); - BUF_ZV_BYTE (b) = BUF_ZV_BYTE (b->base_buffer); - BUF_PT_BYTE (b) = BUF_PT_BYTE (b->base_buffer); + b->pt = b->base_buffer->pt; + b->begv = b->base_buffer->begv; + b->zv = b->base_buffer->zv; + b->pt_byte = b->base_buffer->pt_byte; + b->begv_byte = b->base_buffer->begv_byte; + b->zv_byte = b->base_buffer->zv_byte; b->newline_cache = 0; b->width_run_cache = 0; @@ -562,24 +611,23 @@ CLONE nil means the indirect buffer's state is reset to default values. */) /* Make sure the base buffer has markers for its narrowing. */ if (NILP (BVAR (b->base_buffer, pt_marker))) { + eassert (NILP (BVAR (b, begv_marker))); + eassert (NILP (BVAR (b, zv_marker))); + BVAR (b->base_buffer, pt_marker) = Fmake_marker (); set_marker_both (BVAR (b->base_buffer, pt_marker), base_buffer, - BUF_PT (b->base_buffer), - BUF_PT_BYTE (b->base_buffer)); - } - if (NILP (BVAR (b->base_buffer, begv_marker))) - { + b->base_buffer->pt, + b->base_buffer->pt_byte); + BVAR (b->base_buffer, begv_marker) = Fmake_marker (); set_marker_both (BVAR (b->base_buffer, begv_marker), base_buffer, - BUF_BEGV (b->base_buffer), - BUF_BEGV_BYTE (b->base_buffer)); - } - if (NILP (BVAR (b->base_buffer, zv_marker))) - { + b->base_buffer->begv, + b->base_buffer->begv_byte); + BVAR (b->base_buffer, zv_marker) = Fmake_marker (); set_marker_both (BVAR (b->base_buffer, zv_marker), base_buffer, - BUF_ZV (b->base_buffer), - BUF_ZV_BYTE (b->base_buffer)); + b->base_buffer->zv, + b->base_buffer->zv_byte); XMARKER (BVAR (b->base_buffer, zv_marker))->insertion_type = 1; } @@ -587,11 +635,11 @@ CLONE nil means the indirect buffer's state is reset to default values. */) { /* Give the indirect buffer markers for its narrowing. */ BVAR (b, pt_marker) = Fmake_marker (); - set_marker_both (BVAR (b, pt_marker), buf, BUF_PT (b), BUF_PT_BYTE (b)); + set_marker_both (BVAR (b, pt_marker), buf, b->pt, b->pt_byte); BVAR (b, begv_marker) = Fmake_marker (); - set_marker_both (BVAR (b, begv_marker), buf, BUF_BEGV (b), BUF_BEGV_BYTE (b)); + set_marker_both (BVAR (b, begv_marker), buf, b->begv, b->begv_byte); BVAR (b, zv_marker) = Fmake_marker (); - set_marker_both (BVAR (b, zv_marker), buf, BUF_ZV (b), BUF_ZV_BYTE (b)); + set_marker_both (BVAR (b, zv_marker), buf, b->zv, b->zv_byte); XMARKER (BVAR (b, zv_marker))->insertion_type = 1; } else @@ -1796,27 +1844,7 @@ set_buffer_internal_1 (register struct buffer *b) /* If the old current buffer has markers to record PT, BEGV and ZV when it is not current, update them now. */ - if (! NILP (BVAR (old_buf, pt_marker))) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (BVAR (old_buf, pt_marker), obuf, - BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); - } - if (! NILP (BVAR (old_buf, begv_marker))) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (BVAR (old_buf, begv_marker), obuf, - BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); - } - if (! NILP (BVAR (old_buf, zv_marker))) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (BVAR (old_buf, zv_marker), obuf, - BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); - } + record_buffer_markers (old_buf); } /* Get the undo list from the base buffer, so that it appears @@ -1826,21 +1854,7 @@ set_buffer_internal_1 (register struct buffer *b) /* If the new current buffer has markers to record PT, BEGV and ZV when it is not current, fetch them now. */ - if (! NILP (BVAR (b, pt_marker))) - { - BUF_PT (b) = marker_position (BVAR (b, pt_marker)); - BUF_PT_BYTE (b) = marker_byte_position (BVAR (b, pt_marker)); - } - if (! NILP (BVAR (b, begv_marker))) - { - BUF_BEGV (b) = marker_position (BVAR (b, begv_marker)); - BUF_BEGV_BYTE (b) = marker_byte_position (BVAR (b, begv_marker)); - } - if (! NILP (BVAR (b, zv_marker))) - { - BUF_ZV (b) = marker_position (BVAR (b, zv_marker)); - BUF_ZV_BYTE (b) = marker_byte_position (BVAR (b, zv_marker)); - } + fetch_buffer_markers (b); /* Look down buffer's list of local Lisp variables to find and update any that forward into C variables. */ @@ -1876,50 +1890,13 @@ set_buffer_temp (struct buffer *b) old_buf = current_buffer; current_buffer = b; - if (old_buf) - { - /* If the old current buffer has markers to record PT, BEGV and ZV - when it is not current, update them now. */ - if (! NILP (BVAR (old_buf, pt_marker))) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (BVAR (old_buf, pt_marker), obuf, - BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); - } - if (! NILP (BVAR (old_buf, begv_marker))) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (BVAR (old_buf, begv_marker), obuf, - BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); - } - if (! NILP (BVAR (old_buf, zv_marker))) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (BVAR (old_buf, zv_marker), obuf, - BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); - } - } + /* If the old current buffer has markers to record PT, BEGV and ZV + when it is not current, update them now. */ + record_buffer_markers (old_buf); /* If the new current buffer has markers to record PT, BEGV and ZV when it is not current, fetch them now. */ - if (! NILP (BVAR (b, pt_marker))) - { - BUF_PT (b) = marker_position (BVAR (b, pt_marker)); - BUF_PT_BYTE (b) = marker_byte_position (BVAR (b, pt_marker)); - } - if (! NILP (BVAR (b, begv_marker))) - { - BUF_BEGV (b) = marker_position (BVAR (b, begv_marker)); - BUF_BEGV_BYTE (b) = marker_byte_position (BVAR (b, begv_marker)); - } - if (! NILP (BVAR (b, zv_marker))) - { - BUF_ZV (b) = marker_position (BVAR (b, zv_marker)); - BUF_ZV_BYTE (b) = marker_byte_position (BVAR (b, zv_marker)); - } + fetch_buffer_markers (b); } DEFUN ("set-buffer", Fset_buffer, Sset_buffer, 1, 1, 0, diff --git a/src/buffer.h b/src/buffer.h index 65c7168d60a..0975d2e3adc 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -107,27 +107,46 @@ along with GNU Emacs. If not, see . */ #define BUF_BEG(buf) (BEG) #define BUF_BEG_BYTE(buf) (BEG_BYTE) -/* !!!FIXME: all the BUF_BEGV/BUF_ZV/BUF_PT macros are flawed: - on indirect (or base) buffers, that value is only correct if that buffer - is the current_buffer, or if the buffer's text hasn't been modified (via - an indirect buffer) since it was last current. */ +/* The BUF_BEGV[_BYTE], BUF_ZV[_BYTE], and BUF_PT[_BYTE] macros cannot + be used for assignment; use SET_BUF_* macros below for that. */ /* Position of beginning of accessible range of buffer. */ -#define BUF_BEGV(buf) ((buf)->begv) -#define BUF_BEGV_BYTE(buf) ((buf)->begv_byte) +#define BUF_BEGV(buf) \ + (buf == current_buffer ? BEGV \ + : NILP (BVAR (buf, begv_marker)) ? buf->begv \ + : marker_position (BVAR (buf, begv_marker))) + +#define BUF_BEGV_BYTE(buf) \ + (buf == current_buffer ? BEGV_BYTE \ + : NILP (BVAR (buf, begv_marker)) ? buf->begv_byte \ + : marker_byte_position (BVAR (buf, begv_marker))) /* Position of point in buffer. */ -#define BUF_PT(buf) ((buf)->pt) -#define BUF_PT_BYTE(buf) ((buf)->pt_byte) +#define BUF_PT(buf) \ + (buf == current_buffer ? PT \ + : NILP (BVAR (buf, pt_marker)) ? buf->pt \ + : marker_position (BVAR (buf, pt_marker))) + +#define BUF_PT_BYTE(buf) \ + (buf == current_buffer ? PT_BYTE \ + : NILP (BVAR (buf, pt_marker)) ? buf->pt_byte \ + : marker_byte_position (BVAR (buf, pt_marker))) + +/* Position of end of accessible range of buffer. */ +#define BUF_ZV(buf) \ + (buf == current_buffer ? ZV \ + : NILP (BVAR (buf, zv_marker)) ? buf->zv \ + : marker_position (BVAR (buf, zv_marker))) + +#define BUF_ZV_BYTE(buf) \ + (buf == current_buffer ? ZV_BYTE \ + : NILP (BVAR (buf, zv_marker)) ? buf->zv_byte \ + : marker_byte_position (BVAR (buf, zv_marker))) /* Position of gap in buffer. */ #define BUF_GPT(buf) ((buf)->text->gpt) #define BUF_GPT_BYTE(buf) ((buf)->text->gpt_byte) -/* Position of end of accessible range of buffer. */ -#define BUF_ZV(buf) ((buf)->zv) -#define BUF_ZV_BYTE(buf) ((buf)->zv_byte) - /* Position of end of buffer. */ #define BUF_Z(buf) ((buf)->text->z) #define BUF_Z_BYTE(buf) ((buf)->text->z_byte) @@ -235,8 +254,6 @@ extern void enlarge_buffer_text (struct buffer *, EMACS_INT); /* Macros for setting the BEGV, ZV or PT of a given buffer. - SET_BUF_PT* seet to be redundant. Get rid of them? - The ..._BOTH macros take both a charpos and a bytepos, which must correspond to each other. diff --git a/src/insdel.c b/src/insdel.c index 7fcf9522a33..bdf6aff1717 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -411,9 +411,7 @@ adjust_markers_for_insert (EMACS_INT from, EMACS_INT from_byte, static void adjust_point (EMACS_INT nchars, EMACS_INT nbytes) { - BUF_PT (current_buffer) += nchars; - BUF_PT_BYTE (current_buffer) += nbytes; - + SET_BUF_PT_BOTH (current_buffer, PT + nchars, PT_BYTE + nbytes); /* In a single-byte buffer, the two positions must be equal. */ eassert (PT_BYTE >= PT && PT_BYTE - PT <= ZV_BYTE - ZV); } diff --git a/src/intervals.c b/src/intervals.c index 6aee6e9d7fa..12b2789cc77 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1892,8 +1892,7 @@ temp_set_point_both (struct buffer *buffer, if (charpos > BUF_ZV (buffer) || charpos < BUF_BEGV (buffer)) abort (); - BUF_PT_BYTE (buffer) = bytepos; - BUF_PT (buffer) = charpos; + SET_BUF_PT_BOTH (buffer, charpos, bytepos); } /* Set point "temporarily", without checking any text properties. */ @@ -2312,10 +2311,9 @@ get_local_map (register EMACS_INT position, register struct buffer *buffer, old_zv = BUF_ZV (buffer); old_begv_byte = BUF_BEGV_BYTE (buffer); old_zv_byte = BUF_ZV_BYTE (buffer); - BUF_BEGV (buffer) = BUF_BEG (buffer); - BUF_ZV (buffer) = BUF_Z (buffer); - BUF_BEGV_BYTE (buffer) = BUF_BEG_BYTE (buffer); - BUF_ZV_BYTE (buffer) = BUF_Z_BYTE (buffer); + + SET_BUF_BEGV_BOTH (buffer, BUF_BEG (buffer), BUF_BEG_BYTE (buffer)); + SET_BUF_ZV_BOTH (buffer, BUF_Z (buffer), BUF_Z_BYTE (buffer)); XSETFASTINT (lispy_position, position); XSETBUFFER (lispy_buffer, buffer); @@ -2329,10 +2327,8 @@ get_local_map (register EMACS_INT position, register struct buffer *buffer, if (NILP (prop)) prop = get_pos_property (lispy_position, type, lispy_buffer); - BUF_BEGV (buffer) = old_begv; - BUF_ZV (buffer) = old_zv; - BUF_BEGV_BYTE (buffer) = old_begv_byte; - BUF_ZV_BYTE (buffer) = old_zv_byte; + SET_BUF_BEGV_BOTH (buffer, old_begv, old_begv_byte); + SET_BUF_ZV_BOTH (buffer, old_zv, old_zv_byte); /* Use the local map only if it is valid. */ prop = get_keymap (prop, 0, 0); diff --git a/src/lread.c b/src/lread.c index 8a5f6ecd691..3c5b627f98c 100644 --- a/src/lread.c +++ b/src/lread.c @@ -368,15 +368,15 @@ unreadchar (Lisp_Object readcharfun, int c) else if (BUFFERP (readcharfun)) { struct buffer *b = XBUFFER (readcharfun); + EMACS_INT charpos = BUF_PT (b); EMACS_INT bytepos = BUF_PT_BYTE (b); - BUF_PT (b)--; if (! NILP (BVAR (b, enable_multibyte_characters))) BUF_DEC_POS (b, bytepos); else bytepos--; - BUF_PT_BYTE (b) = bytepos; + SET_BUF_PT_BOTH (b, charpos - 1, bytepos); } else if (MARKERP (readcharfun)) { diff --git a/src/xdisp.c b/src/xdisp.c index f2477a2eca5..a7955f41e0c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10909,7 +10909,7 @@ hscroll_window_tree (Lisp_Object window) current_buffer = XBUFFER (w->buffer); if (w == XWINDOW (selected_window)) - pt = BUF_PT (current_buffer); + pt = PT; else { pt = marker_position (w->pointm); @@ -11347,7 +11347,7 @@ reconsider_clip_changes (struct window *w, struct buffer *b) EMACS_INT pt; if (w == XWINDOW (selected_window)) - pt = BUF_PT (current_buffer); + pt = PT; else pt = marker_position (w->pointm); From 46dcfee46cb241a0f8e34da679ca8b42e8ee8d46 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 13 Mar 2011 18:36:47 -0400 Subject: [PATCH 201/383] Backport 2011-03-06T01:42:13Z!rgm@gnu.org from trunk. * configure.in (FREETYPE_LIBS): Actually set it to something. * configure.in: Don't zero-out FONTCONFIG_CFLAGS and FONTCONFIG_LIBS when building with XFT (doing so is incorrect, as Emacs directly uses fontconfig, and breaks building when using a strict linker). --- ChangeLog | 11 +++++++++++ configure.in | 26 +++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b3dcc3af64..b45615d4317 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-03-13 Glenn Morris + + * configure.in (FREETYPE_LIBS): Actually set it to something. + +2011-03-13 Miles Bader + + * configure.in: Don't zero-out FONTCONFIG_CFLAGS and + FONTCONFIG_LIBS when building with XFT (doing so is incorrect, as + Emacs directly uses fontconfig, and breaks building when using a + strict linker). + 2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/configure.in b/configure.in index cfb2a2eb7dc..bc83bc6d703 100644 --- a/configure.in +++ b/configure.in @@ -2034,21 +2034,21 @@ if test "${HAVE_X11}" = "yes"; then fi # "$HAVE_XFT" != no fi # "x${with_xft}" != "xno" - dnl For the "Does Emacs use" message at the end. - if test "$HAVE_XFT" != "yes"; then - HAVE_XFT=no - fi - - - HAVE_FREETYPE=no ## We used to allow building with FreeType and without Xft. ## However, the ftx font backend driver is not in good shape. - if test "${HAVE_XFT}" = "yes"; then - dnl As we use Xft, we anyway use freetype. - dnl There's no need for additional CFLAGS and LIBS. - HAVE_FREETYPE=yes - FONTCONFIG_CFLAGS= - FONTCONFIG_LIBS= + if test "$HAVE_XFT" != "yes"; then + dnl For the "Does Emacs use" message at the end. + HAVE_XFT=no + HAVE_FREETYPE=no + else + dnl Strict linkers fail with + dnl ftfont.o: undefined reference to symbol 'FT_New_Face' + dnl if -lfreetype is not specified. + dnl The following is needed to set FREETYPE_LIBS. + PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes, + HAVE_FREETYPE=no) + + test "$HAVE_FREETYPE" = "no" && AC_MSG_ERROR(libxft requires libfreetype) fi HAVE_LIBOTF=no From 59d6fe8344313c6e31a06b7ebd666e9f7be27ff2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 20:21:32 -0700 Subject: [PATCH 202/383] * dbusbind.c: Pointer signedness fixes. (xd_signature, xd_append_arg, xd_initialize): (Fdbus_call_method, Fdbus_call_method_asynchronously): (Fdbus_method_return_internal, Fdbus_method_error_internal): (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service): (Fdbus_register_signal): Use SSDATA when the context wants char *. --- src/ChangeLog | 9 +++++++++ src/dbusbind.c | 45 ++++++++++++++++++++++----------------------- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bad9b8dd4b7..b062bfdf06d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2011-03-14 Paul Eggert + + * dbusbind.c: Pointer signedness fixes. + (xd_signature, xd_append_arg, xd_initialize): + (Fdbus_call_method, Fdbus_call_method_asynchronously): + (Fdbus_method_return_internal, Fdbus_method_error_internal): + (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service): + (Fdbus_register_signal): Use SSDATA when the context wants char *. + 2011-03-13 Chong Yidong * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT) diff --git a/src/dbusbind.c b/src/dbusbind.c index 7e5104026cd..bf19605a346 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -325,7 +325,7 @@ xd_signature (char *signature, unsigned int dtype, unsigned int parent_type, Lis if ((subtype == DBUS_TYPE_SIGNATURE) && STRINGP (CAR_SAFE (XD_NEXT_VALUE (elt))) && NILP (CDR_SAFE (XD_NEXT_VALUE (elt)))) - strcpy (x, SDATA (CAR_SAFE (XD_NEXT_VALUE (elt)))); + strcpy (x, SSDATA (CAR_SAFE (XD_NEXT_VALUE (elt)))); while (!NILP (elt)) { @@ -531,7 +531,7 @@ xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter) but by not encoding it, we guarantee it's valid utf-8, even if it contains eight-bit-bytes. Of course, you can still send manually-crafted junk by passing a unibyte string. */ - char *val = SDATA (object); + char *val = SSDATA (object); XD_DEBUG_MESSAGE ("%c %s", dtype, val); if (!dbus_message_iter_append_basic (iter, dtype, &val)) XD_SIGNAL2 (build_string ("Unable to append argument"), object); @@ -569,7 +569,7 @@ xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter) && STRINGP (CAR_SAFE (XD_NEXT_VALUE (object))) && NILP (CDR_SAFE (XD_NEXT_VALUE (object)))) { - strcpy (signature, SDATA (CAR_SAFE (XD_NEXT_VALUE (object)))); + strcpy (signature, SSDATA (CAR_SAFE (XD_NEXT_VALUE (object)))); object = CDR_SAFE (XD_NEXT_VALUE (object)); } @@ -789,7 +789,7 @@ xd_initialize (Lisp_Object bus, int raise_error) dbus_error_init (&derror); if (STRINGP (bus)) - connection = dbus_connection_open (SDATA (bus), &derror); + connection = dbus_connection_open (SSDATA (bus), &derror); else if (EQ (bus, QCdbus_system_bus)) connection = dbus_bus_get (DBUS_BUS_SYSTEM, &derror); @@ -1089,10 +1089,10 @@ usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TI connection = xd_initialize (bus, TRUE); /* Create the message. */ - dmessage = dbus_message_new_method_call (SDATA (service), - SDATA (path), - SDATA (interface), - SDATA (method)); + dmessage = dbus_message_new_method_call (SSDATA (service), + SSDATA (path), + SSDATA (interface), + SSDATA (method)); UNGCPRO; if (dmessage == NULL) XD_SIGNAL1 (build_string ("Unable to create a new message")); @@ -1272,10 +1272,10 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE connection = xd_initialize (bus, TRUE); /* Create the message. */ - dmessage = dbus_message_new_method_call (SDATA (service), - SDATA (path), - SDATA (interface), - SDATA (method)); + dmessage = dbus_message_new_method_call (SSDATA (service), + SSDATA (path), + SSDATA (interface), + SSDATA (method)); if (dmessage == NULL) XD_SIGNAL1 (build_string ("Unable to create a new message")); @@ -1386,7 +1386,7 @@ usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */) dmessage = dbus_message_new (DBUS_MESSAGE_TYPE_METHOD_RETURN); if ((dmessage == NULL) || (!dbus_message_set_reply_serial (dmessage, XUINT (serial))) - || (!dbus_message_set_destination (dmessage, SDATA (service)))) + || (!dbus_message_set_destination (dmessage, SSDATA (service)))) { UNGCPRO; XD_SIGNAL1 (build_string ("Unable to create a return message")); @@ -1475,7 +1475,7 @@ usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */) if ((dmessage == NULL) || (!dbus_message_set_error_name (dmessage, DBUS_ERROR_FAILED)) || (!dbus_message_set_reply_serial (dmessage, XUINT (serial))) - || (!dbus_message_set_destination (dmessage, SDATA (service)))) + || (!dbus_message_set_destination (dmessage, SSDATA (service)))) { UNGCPRO; XD_SIGNAL1 (build_string ("Unable to create a error message")); @@ -1591,9 +1591,9 @@ usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */) connection = xd_initialize (bus, TRUE); /* Create the message. */ - dmessage = dbus_message_new_signal (SDATA (path), - SDATA (interface), - SDATA (signal)); + dmessage = dbus_message_new_signal (SSDATA (path), + SSDATA (interface), + SSDATA (signal)); UNGCPRO; if (dmessage == NULL) XD_SIGNAL1 (build_string ("Unable to create a new message")); @@ -1745,11 +1745,11 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus) /* key has the structure (UNAME SERVICE PATH HANDLER). */ if (((uname == NULL) || (NILP (CAR_SAFE (key))) - || (strcmp (uname, SDATA (CAR_SAFE (key))) == 0)) + || (strcmp (uname, SSDATA (CAR_SAFE (key))) == 0)) && ((path == NULL) || (NILP (CAR_SAFE (CDR_SAFE (CDR_SAFE (key))))) || (strcmp (path, - SDATA (CAR_SAFE (CDR_SAFE (CDR_SAFE (key))))) + SSDATA (CAR_SAFE (CDR_SAFE (CDR_SAFE (key))))) == 0)) && (!NILP (CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (key))))))) { @@ -1921,7 +1921,7 @@ usage: (dbus-register-service BUS SERVICE &rest FLAGS) */) /* Request the known name from the bus. */ dbus_error_init (&derror); - result = dbus_bus_request_name (connection, SDATA (service), flags, + result = dbus_bus_request_name (connection, SSDATA (service), flags, &derror); if (dbus_error_is_set (&derror)) XD_ERROR (derror); @@ -2019,8 +2019,8 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG name of "org.freedesktop.DBus" is that string itself. */ if ((STRINGP (service)) && (SBYTES (service) > 0) - && (strcmp (SDATA (service), DBUS_SERVICE_DBUS) != 0) - && (strncmp (SDATA (service), ":", 1) != 0)) + && (strcmp (SSDATA (service), DBUS_SERVICE_DBUS) != 0) + && (strncmp (SSDATA (service), ":", 1) != 0)) { uname = call2 (intern ("dbus-get-name-owner"), bus, service); /* When there is no unique name, we mark it with an empty @@ -2350,4 +2350,3 @@ be called when the D-Bus reply message arrives. */); } #endif /* HAVE_DBUS */ - From 78320123c17531bc27b47fb56d170029ca734fec Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 20:23:23 -0700 Subject: [PATCH 203/383] * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning if GCC considers string literals to be constants. --- src/ChangeLog | 3 +++ src/dbusbind.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index b062bfdf06d..8a053f05c9d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,9 @@ (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service): (Fdbus_register_signal): Use SSDATA when the context wants char *. + * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning + if GCC considers string literals to be constants. + 2011-03-13 Chong Yidong * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT) diff --git a/src/dbusbind.c b/src/dbusbind.c index bf19605a346..7bb4e551da5 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -936,7 +936,7 @@ DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 1, 0, Vdbus_registered_buses = Fcons (bus, Vdbus_registered_buses); /* We do not want to abort. */ - putenv ("DBUS_FATAL_WARNINGS=0"); + putenv ((char *) "DBUS_FATAL_WARNINGS=0"); /* Return. */ return Qnil; From 49cebccaa79dea62a1acaae65e525551fa5fe2c8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 20:25:51 -0700 Subject: [PATCH 204/383] * dbusbind.c (Fdbus_register_service, Fdbus_register_method): Remove unused vars. --- src/ChangeLog | 1 + src/dbusbind.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8a053f05c9d..030cde063a2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -9,6 +9,7 @@ * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning if GCC considers string literals to be constants. + (Fdbus_register_service, Fdbus_register_method): Remove unused vars. 2011-03-13 Chong Yidong diff --git a/src/dbusbind.c b/src/dbusbind.c index 7bb4e551da5..2c8de20a4d4 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -1888,7 +1888,6 @@ usage: (dbus-register-service BUS SERVICE &rest FLAGS) */) (int nargs, register Lisp_Object *args) { Lisp_Object bus, service; - struct gcpro gcpro1, gcpro2; DBusConnection *connection; unsigned int i; unsigned int value; @@ -2122,7 +2121,6 @@ discovering the still incomplete interface.*/) Lisp_Object dont_register_service) { Lisp_Object key, key1, value; - DBusError derror; Lisp_Object args[2] = { bus, service }; /* Check parameters. */ From 022e70d41f75a0c790abd8519df0101ee896ab5a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 20:31:16 -0700 Subject: [PATCH 205/383] * lisp.h (fatal_error_signal): Add decl, since it's exported. --- src/ChangeLog | 2 ++ src/lisp.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 030cde063a2..da1b852f459 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-14 Paul Eggert + * lisp.h (fatal_error_signal): Add decl, since it's exported. + * dbusbind.c: Pointer signedness fixes. (xd_signature, xd_append_arg, xd_initialize): (Fdbus_call_method, Fdbus_call_method_asynchronously): diff --git a/src/lisp.h b/src/lisp.h index 113585320af..54bab53b1c3 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3193,6 +3193,7 @@ extern Lisp_Object decode_env_path (const char *, const char *); extern Lisp_Object empty_unibyte_string, empty_multibyte_string; extern Lisp_Object Qfile_name_handler_alist; extern void (*fatal_error_signal_hook) (void); +extern SIGTYPE fatal_error_signal (int); EXFUN (Fkill_emacs, 1) NO_RETURN; #if HAVE_SETLOCALE void fixup_locale (void); From 603935076c44ddba546c2f8f0e70d9a664f9aac2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 20:35:14 -0700 Subject: [PATCH 206/383] Rewrite to avoid "/*" in comment. --- src/emacs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emacs.c b/src/emacs.c index 4455e6b4d9f..8b5daf8c7c6 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2380,7 +2380,7 @@ Special values: Anything else (in Emacs 24.1, the possibilities are: aix, berkeley-unix, hpux, irix, usg-unix-v) indicates some sort of Unix system. */); Vsystem_type = intern_c_string (SYSTEM_TYPE); - /* Above values are from SYSTEM_TYPE in src/s/*.h. */ + /* The above values are from SYSTEM_TYPE in include files under src/s. */ DEFVAR_LISP ("system-configuration", Vsystem_configuration, doc: /* Value is string indicating configuration Emacs was built for. From 74f10ca71b51e3df88317eab85ad64504f69cc40 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 20:43:36 -0700 Subject: [PATCH 207/383] * emacs.c (init_cmdargs): Rename local to avoid shadowing. --- src/ChangeLog | 2 ++ src/emacs.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index da1b852f459..951732a1306 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-14 Paul Eggert + * emacs.c (init_cmdargs): Rename local to avoid shadowing. + * lisp.h (fatal_error_signal): Add decl, since it's exported. * dbusbind.c: Pointer signedness fixes. diff --git a/src/emacs.c b/src/emacs.c index 8b5daf8c7c6..0b508fb5be7 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -382,7 +382,7 @@ static void init_cmdargs (int argc, char **argv, int skip_args) { register int i; - Lisp_Object name, dir, tem; + Lisp_Object name, dir, handler; int count = SPECPDL_INDEX (); Lisp_Object raw_name; @@ -393,8 +393,8 @@ init_cmdargs (int argc, char **argv, int skip_args) /* Add /: to the front of the name if it would otherwise be treated as magic. */ - tem = Ffind_file_name_handler (raw_name, Qt); - if (! NILP (tem)) + handler = Ffind_file_name_handler (raw_name, Qt); + if (! NILP (handler)) raw_name = concat2 (build_string ("/:"), raw_name); Vinvocation_name = Ffile_name_nondirectory (raw_name); @@ -411,8 +411,8 @@ init_cmdargs (int argc, char **argv, int skip_args) { /* Add /: to the front of the name if it would otherwise be treated as magic. */ - tem = Ffind_file_name_handler (found, Qt); - if (! NILP (tem)) + handler = Ffind_file_name_handler (found, Qt); + if (! NILP (handler)) found = concat2 (build_string ("/:"), found); Vinvocation_directory = Ffile_name_directory (found); } From 244fc23d16bd60d159ee359a2f9eadff8b9fe8d3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 20:49:40 -0700 Subject: [PATCH 208/383] * emacs.c (DEFINE_DUMMY_FUNCTION): New macro. (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main): Use it. --- src/ChangeLog | 3 +++ src/emacs.c | 17 +++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 951732a1306..76da9676289 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,9 @@ 2011-03-14 Paul Eggert * emacs.c (init_cmdargs): Rename local to avoid shadowing. + (DEFINE_DUMMY_FUNCTION): New macro. + (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main): + Use it. * lisp.h (fatal_error_signal): Add decl, since it's exported. diff --git a/src/emacs.c b/src/emacs.c index 0b508fb5be7..54e59a3f3c8 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -547,21 +547,22 @@ static char dump_tz[] = "UtC0"; Provide dummy definitions to avoid error. (We don't have any real constructors or destructors.) */ #ifdef __GNUC__ + +/* Define a dummy function F. Declare F too, to pacify gcc + -Wmissing-prototypes. */ +#define DEFINE_DUMMY_FUNCTION(f) void f (void); void f (void) {} + #ifndef GCC_CTORS_IN_LIBC -void __do_global_ctors (void) -{} -void __do_global_ctors_aux (void) -{} -void __do_global_dtors (void) -{} +DEFINE_DUMMY_FUNCTION (__do_global_ctors) +DEFINE_DUMMY_FUNCTION (__do_global_ctors_aux) +DEFINE_DUMMY_FUNCTION (__do_global_dtors) /* GNU/Linux has a bug in its library; avoid an error. */ #ifndef GNU_LINUX char * __CTOR_LIST__[2] = { (char *) (-1), 0 }; #endif char * __DTOR_LIST__[2] = { (char *) (-1), 0 }; #endif /* GCC_CTORS_IN_LIBC */ -void __main (void) -{} +DEFINE_DUMMY_FUNCTION (__main) #endif /* __GNUC__ */ #endif /* ORDINARY_LINK */ From c03cd23f455776f4fdf68966f6ac01e99f054d1e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 22:36:36 -0700 Subject: [PATCH 209/383] * emacs.c (main): Add casts to avoid warnings if GCC considers string literals to be constants. --- src/ChangeLog | 2 ++ src/emacs.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 76da9676289..3acc86015b4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,8 @@ (DEFINE_DUMMY_FUNCTION): New macro. (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main): Use it. + (main): Add casts to avoid warnings + if GCC considers string literals to be constants. * lisp.h (fatal_error_signal): Add decl, since it's exported. diff --git a/src/emacs.c b/src/emacs.c index 54e59a3f3c8..c49e38f7a67 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -949,7 +949,7 @@ main (int argc, char **argv) /* Convert --script to -scriptload, un-skip it, and sort again so that it will be handled in proper sequence. */ /* FIXME broken for --script=FILE - is that supposed to work? */ - argv[skip_args - 1] = "-scriptload"; + argv[skip_args - 1] = (char *) "-scriptload"; skip_args -= 2; sort_args (argc, argv); } @@ -1348,7 +1348,7 @@ main (int argc, char **argv) for (j = 0; j < count_before + 1; j++) new[j] = argv[j]; - new[count_before + 1] = "-d"; + new[count_before + 1] = (char *) "-d"; new[count_before + 2] = displayname; for (j = count_before + 2; j count_before && argv[count_before + 1][1] == '-') - argv[count_before + 1] = "-d"; + argv[count_before + 1] = (char *) "-d"; if (! no_site_lisp) { From 4752793e2266f5a6b25732fc38c502687f07a7eb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 22:48:15 -0700 Subject: [PATCH 210/383] * lisp.h (force_auto_save_soon): New decl. --- src/ChangeLog | 2 ++ src/lisp.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 3acc86015b4..39af059f197 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-14 Paul Eggert + * lisp.h (force_auto_save_soon): New decl. + * emacs.c (init_cmdargs): Rename local to avoid shadowing. (DEFINE_DUMMY_FUNCTION): New macro. (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main): diff --git a/src/lisp.h b/src/lisp.h index 54bab53b1c3..541302cb56b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3141,6 +3141,7 @@ extern void cmd_error_internal (Lisp_Object, const char *); extern Lisp_Object command_loop_1 (void); extern Lisp_Object recursive_edit_1 (void); extern void record_auto_save (void); +extern void force_auto_save_soon (void); extern void init_keyboard (void); extern void syms_of_keyboard (void); extern void keys_of_keyboard (void); From a053e86cc52840a18124d78a63c720769e111ba3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 22:49:51 -0700 Subject: [PATCH 211/383] * keyboard.h (make_ctrl_char): New decl. --- src/ChangeLog | 2 ++ src/keyboard.h | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 39af059f197..749f1baf590 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-14 Paul Eggert + * keyboard.h (make_ctrl_char): New decl. + * lisp.h (force_auto_save_soon): New decl. * emacs.c (init_cmdargs): Rename local to avoid shadowing. diff --git a/src/keyboard.h b/src/keyboard.h index 10bf16d5c5c..9f8f1ff7476 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -90,7 +90,7 @@ struct kboard /* User-supplied table to translate input characters through. */ Lisp_Object KBOARD_INTERNAL_FIELD (Vkeyboard_translate_table); - + /* Last command that may be repeated by `repeat'. */ Lisp_Object KBOARD_INTERNAL_FIELD (Vlast_repeatable_command); @@ -140,12 +140,12 @@ struct kboard /* Keymap mapping keys to alternative preferred forms. See the DEFVAR for more documentation. */ Lisp_Object KBOARD_INTERNAL_FIELD (Vlocal_function_key_map); - + /* Keymap mapping ASCII function key sequences onto their preferred forms. Initialized by the terminal-specific lisp files. See the DEFVAR for more documentation. */ Lisp_Object KBOARD_INTERNAL_FIELD (Vinput_decode_map); - + /* Minibufferless frames on this display use this frame's minibuffer. */ Lisp_Object KBOARD_INTERNAL_FIELD (Vdefault_minibuffer_frame); @@ -494,6 +494,7 @@ extern int input_polling_used (void); extern void clear_input_pending (void); extern int requeued_events_pending_p (void); extern void bind_polling_period (int); +extern int make_ctrl_char (int); extern void stuff_buffered_input (Lisp_Object); extern void clear_waiting_for_input (void); extern void swallow_events (int); @@ -517,4 +518,3 @@ extern void add_user_signal (int, const char *); extern int tty_read_avail_input (struct terminal *, int, struct input_event *); extern EMACS_TIME timer_check (int); - From 2f2650daaab043eb8f7fb16fd10575552a7cd378 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 22:51:17 -0700 Subject: [PATCH 212/383] * keyboard.c: Declare functions static if they are not used elsewhere. (echo_char, echo_dash, cmd_error, top_level_2): (poll_for_input, handle_async_input): Now static. --- src/ChangeLog | 4 ++++ src/keyboard.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 749f1baf590..a90b5f6e247 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-14 Paul Eggert + * keyboard.c: Declare functions static if they are not used elsewhere. + (echo_char, echo_dash, cmd_error, top_level_2): + (poll_for_input, handle_async_input): Now static. + * keyboard.h (make_ctrl_char): New decl. * lisp.h (force_auto_save_soon): New decl. diff --git a/src/keyboard.c b/src/keyboard.c index e9c6d508fa2..c1a61ac0a29 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -451,7 +451,7 @@ static int store_user_signal_events (void); C can be a character, which is printed prettily ("M-C-x" and all that jazz), or a symbol, whose name is printed. */ -void +static void echo_char (Lisp_Object c) { if (current_kboard->immediate_echo) @@ -538,7 +538,7 @@ echo_char (Lisp_Object c) /* Temporarily add a dash to the end of the echo string if it's not empty, so that it serves as a mini-prompt for the very next character. */ -void +static void echo_dash (void) { /* Do nothing if not echoing at all. */ @@ -967,7 +967,7 @@ restore_kboard_configuration (Lisp_Object was_locked) /* Handle errors that are not handled at inner levels by printing an error message and returning to the editor command loop. */ -Lisp_Object +static Lisp_Object cmd_error (Lisp_Object data) { Lisp_Object old_level, old_length; @@ -1132,7 +1132,7 @@ command_loop_2 (Lisp_Object ignore) return Qnil; } -Lisp_Object +static Lisp_Object top_level_2 (void) { return Feval (Vtop_level); @@ -1885,7 +1885,7 @@ poll_for_input_1 (void) /* Timer callback function for poll_timer. TIMER is equal to poll_timer. */ -void +static void poll_for_input (struct atimer *timer) { if (poll_suppress_count == 0) @@ -7056,7 +7056,7 @@ tty_read_avail_input (struct terminal *terminal, return nread; } -void +static void handle_async_input (void) { interrupt_input_pending = 0; From da2f2dd9c2fac1bb1e3d5e5c4a3b38cad3c20ad5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 22:55:38 -0700 Subject: [PATCH 213/383] * keyboard.h (mark_kboards): Move decl here ... * alloc.c (mark_kboards): ... from here. --- src/ChangeLog | 2 ++ src/alloc.c | 1 - src/keyboard.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a90b5f6e247..9cddd389b58 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,8 @@ (poll_for_input, handle_async_input): Now static. * keyboard.h (make_ctrl_char): New decl. + (mark_kboards): Move decl here ... + * alloc.c (mark_kboards): ... from here. * lisp.h (force_auto_save_soon): New decl. diff --git a/src/alloc.c b/src/alloc.c index 6c92f36ca7d..d6b64de5af9 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -270,7 +270,6 @@ Lisp_Object Qpost_gc_hook; static void mark_buffer (Lisp_Object); static void mark_terminals (void); -extern void mark_kboards (void); extern void mark_backtrace (void); static void gc_sweep (void); static void mark_glyph_matrix (struct glyph_matrix *); diff --git a/src/keyboard.h b/src/keyboard.h index 9f8f1ff7476..765979b3997 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -518,3 +518,4 @@ extern void add_user_signal (int, const char *); extern int tty_read_avail_input (struct terminal *, int, struct input_event *); extern EMACS_TIME timer_check (int); +extern void mark_kboards (void); From 77c992bc5065ade7f460fa6f966f6b3e6aaa97fa Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 14 Mar 2011 10:53:13 +0100 Subject: [PATCH 214/383] * shell.el (shell): When called interactively, offer to change the shell file name on remote hosts. --- lisp/ChangeLog | 5 +++++ lisp/shell.el | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c74e7cbdb2d..b36be6f3a09 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-14 Michael Albinus + + * shell.el (shell): When called interactively, offer to change the + shell file name on remote hosts. + 2011-03-13 Teodor Zlatanov * net/ldap.el (ldap-search-internal): Add `auth-source-search' diff --git a/lisp/shell.el b/lisp/shell.el index bceea990baf..dde81c6cb95 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -583,6 +583,21 @@ Otherwise, one argument `-i' is passed to the shell. (get-buffer-create (or buffer "*shell*")) ;; If the current buffer is a dead shell buffer, use it. (current-buffer))) + + ;; On remote hosts, the local `shell-file-name' might be useless. + (if (and (interactive-p) + (file-remote-p default-directory) + (null explicit-shell-file-name) + (null (getenv "ESHELL"))) + (with-current-buffer buffer + (set (make-local-variable 'explicit-shell-file-name) + (file-remote-p + (expand-file-name + (read-file-name + "Remote shell path: " default-directory shell-file-name + t shell-file-name)) + 'localname)))) + ;; Pop to buffer, so that the buffer's window will be correctly set ;; when we call comint (so that comint sets the COLUMNS env var properly). (pop-to-buffer buffer) From 70436396856202fb116f11c6e211e163cc22237b Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 14 Mar 2011 15:13:40 +0100 Subject: [PATCH 215/383] * NEWS: `shell' prompts for the shell path name, when the default directory is a remote file name and neither environment variable $ESHELL nor variable `explicit-shell-file-name' is set. --- etc/ChangeLog | 6 ++++++ etc/NEWS | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/etc/ChangeLog b/etc/ChangeLog index 862ce24d29a..15f613edf8f 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,9 @@ +2011-03-14 Michael Albinus + + * NEWS: `shell' prompts for the shell path name, when the default + directory is a remote file name and neither environment variable + $ESHELL nor variable `explicit-shell-file-name' is set. + 2011-03-08 Kristoffer Grönlund * themes/wombat-theme.el: New file. diff --git a/etc/NEWS b/etc/NEWS index 330a3b6ee51..7b4bdc46e7a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -335,6 +335,10 @@ between applications. the lines in the current rectangle. With an prefix argument, this prompts for a number to count from and for a format string. +** The command shell prompts for the shell path name, when the default +directory is a remote file name and neither environment variable +$ESHELL nor variable `explicit-shell-file-name' is set. + * Changes in Specialized Modes and Packages in Emacs 24.1 From 69a058fab1a6396629f783e70b36bd3a7825c54e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 08:15:30 -0700 Subject: [PATCH 216/383] * keyboard.c: (read_char, kbd_buffer_get_event, make_lispy_position): (make_lispy_event, make_lispy_movement, apply_modifiers): (decode_keyboard_code, tty_read_avail_input, menu_bar_items): (parse_tool_bar_item, read_key_sequence, Fread_key_sequence): (Fread_key_sequence_vector): Rename locals to avoid shadowing. --- src/ChangeLog | 5 ++ src/keyboard.c | 213 +++++++++++++++++++++++++------------------------ 2 files changed, 112 insertions(+), 106 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9cddd389b58..896f3ea4be0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,11 @@ * keyboard.c: Declare functions static if they are not used elsewhere. (echo_char, echo_dash, cmd_error, top_level_2): (poll_for_input, handle_async_input): Now static. + (read_char, kbd_buffer_get_event, make_lispy_position): + (make_lispy_event, make_lispy_movement, apply_modifiers): + (decode_keyboard_code, tty_read_avail_input, menu_bar_items): + (parse_tool_bar_item, read_key_sequence, Fread_key_sequence): + (Fread_key_sequence_vector): Rename locals to avoid shadowing. * keyboard.h (make_ctrl_char): New decl. (mark_kboards): Move decl here ... diff --git a/src/keyboard.c b/src/keyboard.c index c1a61ac0a29..a3083be2aee 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2184,7 +2184,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event int *used_mouse_menu, struct timeval *end_time) { volatile Lisp_Object c; - int count, jmpcount; + int jmpcount; jmp_buf local_getcjmp; jmp_buf save_jump; volatile int key_already_recorded = 0; @@ -2461,21 +2461,21 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event KBOARD *kb = FRAME_KBOARD (XFRAME (selected_frame)); if (kb != current_kboard) { - Lisp_Object link = KVAR (kb, kbd_queue); + Lisp_Object last = KVAR (kb, kbd_queue); /* We shouldn't get here if we were in single-kboard mode! */ if (single_kboard) abort (); - if (CONSP (link)) + if (CONSP (last)) { - while (CONSP (XCDR (link))) - link = XCDR (link); - if (!NILP (XCDR (link))) + while (CONSP (XCDR (last))) + last = XCDR (last); + if (!NILP (XCDR (last))) abort (); } - if (!CONSP (link)) + if (!CONSP (last)) KVAR (kb, kbd_queue) = Fcons (c, Qnil); else - XSETCDR (link, Fcons (c, Qnil)); + XSETCDR (last, Fcons (c, Qnil)); kb->kbd_queue_has_data = 1; current_kboard = kb; /* This is going to exit from read_char @@ -2712,18 +2712,18 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event if (! NILP (c) && (kb != current_kboard)) { - Lisp_Object link = KVAR (kb, kbd_queue); - if (CONSP (link)) + Lisp_Object last = KVAR (kb, kbd_queue); + if (CONSP (last)) { - while (CONSP (XCDR (link))) - link = XCDR (link); - if (!NILP (XCDR (link))) + while (CONSP (XCDR (last))) + last = XCDR (last); + if (!NILP (XCDR (last))) abort (); } - if (!CONSP (link)) + if (!CONSP (last)) KVAR (kb, kbd_queue) = Fcons (c, Qnil); else - XSETCDR (link, Fcons (c, Qnil)); + XSETCDR (last, Fcons (c, Qnil)); kb->kbd_queue_has_data = 1; c = Qnil; if (single_kboard) @@ -2912,7 +2912,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event { Lisp_Object keys; int key_count, key_count_reset; - struct gcpro gcpro1; + struct gcpro inner_gcpro1; int count = SPECPDL_INDEX (); /* Save the echo status. */ @@ -2940,7 +2940,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event keys = Fcopy_sequence (this_command_keys); else keys = Qnil; - GCPRO1 (keys); + GCPRO1_VAR (keys, inner_gcpro1); /* Clear out this_command_keys. */ this_command_key_count = 0; @@ -2978,7 +2978,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event if (saved_immediate_echo) echo_now (); - UNGCPRO; + UNGCPRO_VAR (inner_gcpro1); /* The input method can return no events. */ if (! CONSP (tem)) @@ -3000,16 +3000,16 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event if (CONSP (c) && EQ (XCAR (c), Qhelp_echo)) { /* (help-echo FRAME HELP WINDOW OBJECT POS). */ - Lisp_Object help, object, position, window, tem; + Lisp_Object help, object, position, window, htem; - tem = Fcdr (XCDR (c)); - help = Fcar (tem); - tem = Fcdr (tem); - window = Fcar (tem); - tem = Fcdr (tem); - object = Fcar (tem); - tem = Fcdr (tem); - position = Fcar (tem); + htem = Fcdr (XCDR (c)); + help = Fcar (htem); + htem = Fcdr (htem); + window = Fcar (htem); + htem = Fcdr (htem); + object = Fcar (htem); + htem = Fcdr (htem); + position = Fcar (htem); show_help_echo (help, window, object, position, 0); @@ -3051,7 +3051,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event if (!NILP (Vhelp_form) && help_char_p (c)) { Lisp_Object tem0; - count = SPECPDL_INDEX (); + int count = SPECPDL_INDEX (); help_form_saved_window_configs = Fcons (Fcurrent_window_configuration (Qnil), @@ -4024,7 +4024,7 @@ kbd_buffer_get_event (KBOARD **kbp, Lisp_Object bar_window; enum scroll_bar_part part; Lisp_Object x, y; - unsigned long time; + unsigned long t; *kbp = current_kboard; /* Note that this uses F to determine which terminal to look at. @@ -4035,7 +4035,7 @@ kbd_buffer_get_event (KBOARD **kbp, /* XXX Can f or mouse_position_hook be NULL here? */ if (f && FRAME_TERMINAL (f)->mouse_position_hook) (*FRAME_TERMINAL (f)->mouse_position_hook) (&f, 0, &bar_window, - &part, &x, &y, &time); + &part, &x, &y, &t); obj = Qnil; @@ -4059,7 +4059,7 @@ kbd_buffer_get_event (KBOARD **kbp, /* If we didn't decide to make a switch-frame event, go ahead and return a mouse-motion event. */ if (!NILP (x) && NILP (obj)) - obj = make_lispy_movement (f, bar_window, part, x, y, time); + obj = make_lispy_movement (f, bar_window, part, x, y, t); } #endif /* HAVE_MOUSE || HAVE GPM */ else @@ -5037,7 +5037,7 @@ int double_click_count; static Lisp_Object make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, - unsigned long time) + unsigned long t) { enum window_part part; Lisp_Object posn = Qnil; @@ -5218,7 +5218,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, Fcons (posn, Fcons (Fcons (make_number (xret), make_number (yret)), - Fcons (make_number (time), + Fcons (make_number (t), extra_info)))); } @@ -5642,19 +5642,19 @@ make_lispy_event (struct input_event *event) /* On window-system frames, use the value of double-click-fuzz as is. On other frames, interpret it as a multiple of 1/8 characters. */ - struct frame *f; + struct frame *fr; int fuzz; int symbol_num; int is_double; if (WINDOWP (event->frame_or_window)) - f = XFRAME (XWINDOW (event->frame_or_window)->frame); + fr = XFRAME (XWINDOW (event->frame_or_window)->frame); else if (FRAMEP (event->frame_or_window)) - f = XFRAME (event->frame_or_window); + fr = XFRAME (event->frame_or_window); else abort (); - fuzz = FRAME_WINDOW_P (f) + fuzz = FRAME_WINDOW_P (fr) ? double_click_fuzz : double_click_fuzz / 8; if (event->modifiers & up_modifier) @@ -5927,7 +5927,7 @@ make_lispy_event (struct input_event *event) static Lisp_Object make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_part part, - Lisp_Object x, Lisp_Object y, unsigned long time) + Lisp_Object x, Lisp_Object y, unsigned long t) { /* Is it a scroll bar movement? */ if (frame && ! NILP (bar_window)) @@ -5939,7 +5939,7 @@ make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_pa Fcons (list5 (bar_window, Qvertical_scroll_bar, Fcons (x, y), - make_number (time), + make_number (t), part_sym), Qnil)); } @@ -5947,7 +5947,7 @@ make_lispy_movement (FRAME_PTR frame, Lisp_Object bar_window, enum scroll_bar_pa else { Lisp_Object position; - position = make_lispy_position (frame, x, y, time); + position = make_lispy_position (frame, x, y, t); return list2 (Qmouse_movement, position); } } @@ -6236,7 +6236,7 @@ DEFUN ("internal-event-symbol-parse-modifiers", Fevent_symbol_parse_modifiers, static Lisp_Object apply_modifiers (int modifiers, Lisp_Object base) { - Lisp_Object cache, index, entry, new_symbol; + Lisp_Object cache, idx, entry, new_symbol; /* Mask out upper bits. We don't know where this value's been. */ modifiers &= INTMASK; @@ -6246,8 +6246,8 @@ apply_modifiers (int modifiers, Lisp_Object base) /* The click modifier never figures into cache indices. */ cache = Fget (base, Qmodifier_cache); - XSETFASTINT (index, (modifiers & ~click_modifier)); - entry = assq_no_quit (index, cache); + XSETFASTINT (idx, (modifiers & ~click_modifier)); + entry = assq_no_quit (idx, cache); if (CONSP (entry)) new_symbol = XCDR (entry); @@ -6260,14 +6260,14 @@ apply_modifiers (int modifiers, Lisp_Object base) SBYTES (SYMBOL_NAME (base))); /* Add the new symbol to the base's cache. */ - entry = Fcons (index, new_symbol); + entry = Fcons (idx, new_symbol); Fput (base, Qmodifier_cache, Fcons (entry, cache)); /* We have the parsing info now for free, so we could add it to the caches: - XSETFASTINT (index, modifiers); + XSETFASTINT (idx, modifiers); Fput (new_symbol, Qevent_symbol_element_mask, - Fcons (base, Fcons (index, Qnil))); + Fcons (base, Fcons (idx, Qnil))); Fput (new_symbol, Qevent_symbol_elements, Fcons (base, lispy_modifier_list (modifiers))); Sadly, this is only correct if `base' is indeed a base event, @@ -6821,16 +6821,17 @@ decode_keyboard_code (struct tty_display_info *tty, return; for (i = 0, p = coding->destination; i < coding->produced_char; i++) { - struct input_event buf; + struct input_event event_buf; - EVENT_INIT (buf); - buf.code = STRING_CHAR_ADVANCE (p); - buf.kind = (ASCII_CHAR_P (buf.code) - ? ASCII_KEYSTROKE_EVENT : MULTIBYTE_CHAR_KEYSTROKE_EVENT); + EVENT_INIT (event_buf); + event_buf.code = STRING_CHAR_ADVANCE (p); + event_buf.kind = + (ASCII_CHAR_P (event_buf.code) + ? ASCII_KEYSTROKE_EVENT : MULTIBYTE_CHAR_KEYSTROKE_EVENT); /* See the comment in tty_read_avail_input. */ - buf.frame_or_window = tty->top_frame; - buf.arg = Qnil; - kbd_buffer_store_event (&buf); + event_buf.frame_or_window = tty->top_frame; + event_buf.arg = Qnil; + kbd_buffer_store_event (&event_buf); } } @@ -6890,11 +6891,11 @@ tty_read_avail_input (struct terminal *terminal, if (gpm_tty == tty) { Gpm_Event event; - struct input_event hold_quit; + struct input_event gpm_hold_quit; int gpm, fd = gpm_fd; - EVENT_INIT (hold_quit); - hold_quit.kind = NO_EVENT; + EVENT_INIT (gpm_hold_quit); + gpm_hold_quit.kind = NO_EVENT; /* gpm==1 if event received. gpm==0 if the GPM daemon has closed the connection, in which case @@ -6903,13 +6904,13 @@ tty_read_avail_input (struct terminal *terminal, select masks. gpm==-1 if a protocol error or EWOULDBLOCK; the latter is normal. */ while (gpm = Gpm_GetEvent (&event), gpm == 1) { - nread += handle_one_term_event (tty, &event, &hold_quit); + nread += handle_one_term_event (tty, &event, &gpm_hold_quit); } if (gpm == 0) /* Presumably the GPM daemon has closed the connection. */ close_gpm (fd); - if (hold_quit.kind != NO_EVENT) - kbd_buffer_store_event (&hold_quit); + if (gpm_hold_quit.kind != NO_EVENT) + kbd_buffer_store_event (&gpm_hold_quit); if (nread) return nread; } @@ -7329,8 +7330,6 @@ menu_bar_items (Lisp_Object old) int mapno; Lisp_Object oquit; - int i; - /* In order to build the menus, we need to call the keymap accessors. They all call QUIT. But this function is called during redisplay, during which a quit is fatal. So inhibit @@ -7432,15 +7431,18 @@ menu_bar_items (Lisp_Object old) } /* Add nil, nil, nil, nil at the end. */ - i = menu_bar_items_index; - if (i + 4 > XVECTOR (menu_bar_items_vector)->size) - menu_bar_items_vector = larger_vector (menu_bar_items_vector, 2 * i, Qnil); - /* Add this item. */ - XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; - XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; - XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; - XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; - menu_bar_items_index = i; + { + int i = menu_bar_items_index; + if (i + 4 > XVECTOR (menu_bar_items_vector)->size) + menu_bar_items_vector = + larger_vector (menu_bar_items_vector, 2 * i, Qnil); + /* Add this item. */ + XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; + XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; + XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; + XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil; + menu_bar_items_index = i; + } Vinhibit_quit = oquit; return menu_bar_items_vector; @@ -8112,12 +8114,12 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) /* Process the rest of the properties. */ for (; CONSP (item) && CONSP (XCDR (item)); item = XCDR (XCDR (item))) { - Lisp_Object key, value; + Lisp_Object ikey, value; - key = XCAR (item); + ikey = XCAR (item); value = XCAR (XCDR (item)); - if (EQ (key, QCenable)) + if (EQ (ikey, QCenable)) { /* `:enable FORM'. */ if (!NILP (Venable_disabled_menus_and_buttons)) @@ -8125,20 +8127,20 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) else PROP (TOOL_BAR_ITEM_ENABLED_P) = value; } - else if (EQ (key, QCvisible)) + else if (EQ (ikey, QCvisible)) { /* `:visible FORM'. If got a visible property and that evaluates to nil then ignore this item. */ if (NILP (menu_item_eval_property (value))) return 0; } - else if (EQ (key, QChelp)) + else if (EQ (ikey, QChelp)) /* `:help HELP-STRING'. */ PROP (TOOL_BAR_ITEM_HELP) = value; - else if (EQ (key, QCvert_only)) + else if (EQ (ikey, QCvert_only)) /* `:vert-only t/nil'. */ PROP (TOOL_BAR_ITEM_VERT_ONLY) = value; - else if (EQ (key, QClabel)) + else if (EQ (ikey, QClabel)) { const char *bad_label = "!!?GARBLED ITEM?!!"; /* `:label LABEL-STRING'. */ @@ -8147,10 +8149,10 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) : make_string (bad_label, strlen (bad_label)); have_label = 1; } - else if (EQ (key, QCfilter)) + else if (EQ (ikey, QCfilter)) /* ':filter FORM'. */ filter = value; - else if (EQ (key, QCbutton) && CONSP (value)) + else if (EQ (ikey, QCbutton) && CONSP (value)) { /* `:button (TYPE . SELECTED)'. */ Lisp_Object type, selected; @@ -8163,13 +8165,13 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) PROP (TOOL_BAR_ITEM_TYPE) = type; } } - else if (EQ (key, QCimage) + else if (EQ (ikey, QCimage) && (CONSP (value) || (VECTORP (value) && XVECTOR (value)->size == 4))) /* Value is either a single image specification or a vector of 4 such specifications for the different button states. */ PROP (TOOL_BAR_ITEM_IMAGES) = value; - else if (EQ (key, Qrtl)) + else if (EQ (ikey, Qrtl)) /* ':rtl STRING' */ PROP (TOOL_BAR_ITEM_RTL_IMAGE) = value; } @@ -8178,35 +8180,34 @@ parse_tool_bar_item (Lisp_Object key, Lisp_Object item) if (!have_label) { /* Try to make one from caption and key. */ - Lisp_Object key = PROP (TOOL_BAR_ITEM_KEY); - Lisp_Object capt = PROP (TOOL_BAR_ITEM_CAPTION); - const char *label = SYMBOLP (key) ? SSDATA (SYMBOL_NAME (key)) : ""; - const char *caption = STRINGP (capt) ? SSDATA (capt) : ""; + Lisp_Object tkey = PROP (TOOL_BAR_ITEM_KEY); + Lisp_Object tcapt = PROP (TOOL_BAR_ITEM_CAPTION); + const char *label = SYMBOLP (tkey) ? SSDATA (SYMBOL_NAME (tkey)) : ""; + const char *capt = STRINGP (tcapt) ? SSDATA (tcapt) : ""; EMACS_INT max_lbl = 2 * tool_bar_max_label_size; char *buf = (char *) xmalloc (max_lbl + 1); Lisp_Object new_lbl; - size_t caption_len = strlen (caption); + size_t caption_len = strlen (capt); - if (caption_len <= max_lbl && caption[0] != '\0') + if (caption_len <= max_lbl && capt[0] != '\0') { - strcpy (buf, caption); + strcpy (buf, capt); while (caption_len > 0 && buf[caption_len - 1] == '.') caption_len--; buf[caption_len] = '\0'; - label = caption = buf; + label = capt = buf; } if (strlen (label) <= max_lbl && label[0] != '\0') { - int i; + int j; if (label != buf) strcpy (buf, label); - for (i = 0; buf[i] != '\0'; ++i) - if (buf[i] == '-') - buf[i] = ' '; + for (j = 0; buf[j] != '\0'; ++j) + if (buf[j] == '-') + buf[j] = ' '; label = buf; - } else label = ""; @@ -8958,9 +8959,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, int junk; #endif - struct gcpro gcpro1; + struct gcpro outer_gcpro1; - GCPRO1 (fake_prefixed_keys); + GCPRO1_VAR (fake_prefixed_keys, outer_gcpro1); raw_keybuf_count = 0; last_nonmenu_event = Qnil; @@ -9254,7 +9255,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, if (EQ (key, Qt)) { unbind_to (count, Qnil); - UNGCPRO; + UNGCPRO_VAR (outer_gcpro1); return -1; } @@ -9937,7 +9938,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, add_command_key (keybuf[t]); } - UNGCPRO; + UNGCPRO_VAR (outer_gcpro1); return t; } @@ -9984,11 +9985,11 @@ is nil, then the event will be put off until after the current key sequence. sequences, where they wouldn't conflict with ordinary bindings. See `function-key-map' for more details. -The optional fifth argument COMMAND-LOOP, if non-nil, means +The optional fifth argument CMD-LOOP, if non-nil, means that this key sequence is being read by something that will read commands one after another. It should be nil if the caller will read just one key sequence. */) - (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object command_loop) + (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop) { Lisp_Object keybuf[30]; register int i; @@ -10000,9 +10001,9 @@ will read just one key sequence. */) QUIT; specbind (Qinput_method_exit_on_first_char, - (NILP (command_loop) ? Qt : Qnil)); + (NILP (cmd_loop) ? Qt : Qnil)); specbind (Qinput_method_use_echo_area, - (NILP (command_loop) ? Qt : Qnil)); + (NILP (cmd_loop) ? Qt : Qnil)); memset (keybuf, 0, sizeof keybuf); GCPRO1 (keybuf[0]); @@ -10045,7 +10046,7 @@ will read just one key sequence. */) DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, Sread_key_sequence_vector, 1, 5, 0, doc: /* Like `read-key-sequence' but always return a vector. */) - (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object command_loop) + (Lisp_Object prompt, Lisp_Object continue_echo, Lisp_Object dont_downcase_last, Lisp_Object can_return_switch_frame, Lisp_Object cmd_loop) { Lisp_Object keybuf[30]; register int i; @@ -10057,9 +10058,9 @@ DEFUN ("read-key-sequence-vector", Fread_key_sequence_vector, QUIT; specbind (Qinput_method_exit_on_first_char, - (NILP (command_loop) ? Qt : Qnil)); + (NILP (cmd_loop) ? Qt : Qnil)); specbind (Qinput_method_use_echo_area, - (NILP (command_loop) ? Qt : Qnil)); + (NILP (cmd_loop) ? Qt : Qnil)); memset (keybuf, 0, sizeof keybuf); GCPRO1 (keybuf[0]); From 560a553af5dacb11317afda073344fdbe17fdf17 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 08:19:28 -0700 Subject: [PATCH 217/383] * keyboard.c (read_key_sequence): Mark locals as initialized. --- src/ChangeLog | 1 + src/keyboard.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 896f3ea4be0..c4b4b4b5494 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,6 +8,7 @@ (decode_keyboard_code, tty_read_avail_input, menu_bar_items): (parse_tool_bar_item, read_key_sequence, Fread_key_sequence): (Fread_key_sequence_vector): Rename locals to avoid shadowing. + (read_key_sequence): Mark locals as initialized. * keyboard.h (make_ctrl_char): New decl. (mark_kboards): Move decl here ... diff --git a/src/keyboard.c b/src/keyboard.c index a3083be2aee..5680f32502c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8866,7 +8866,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, /* The length of the echo buffer when we started reading, and the length of this_command_keys when we started reading. */ - int echo_start; + int echo_start IF_LINT (= 0); int keys_start; /* The number of keymaps we're scanning right now, and the number of @@ -8944,7 +8944,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, Lisp_Object first_event; #endif - Lisp_Object original_uppercase; + Lisp_Object original_uppercase IF_LINT (= Qnil); int original_uppercase_position = -1; /* Gets around Microsoft compiler limitations. */ @@ -9123,7 +9123,8 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, while those allow us to restart the entire key sequence, echo_local_start and keys_local_start allow us to throw away just one key. */ - int echo_local_start, keys_local_start, local_first_binding; + int echo_local_start IF_LINT (= 0); + int keys_local_start, local_first_binding; eassert (indec.end == t || (indec.end > t && indec.end <= mock_input)); eassert (indec.start <= indec.end); From 3ac946723de017fa8d2cf55510b3f0ff931f1237 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 08:25:21 -0700 Subject: [PATCH 218/383] * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN. --- src/ChangeLog | 1 + src/keyboard.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index c4b4b4b5494..1cdeefff899 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -9,6 +9,7 @@ (parse_tool_bar_item, read_key_sequence, Fread_key_sequence): (Fread_key_sequence_vector): Rename locals to avoid shadowing. (read_key_sequence): Mark locals as initialized. + (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN. * keyboard.h (make_ctrl_char): New decl. (mark_kboards): Move decl here ... diff --git a/src/keyboard.c b/src/keyboard.c index 5680f32502c..afa78184179 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1169,6 +1169,7 @@ This also exits all active minibuffers. */) Fthrow (Qtop_level, Qnil); } +Lisp_Object Fexit_recursive_edit (void) NO_RETURN; DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "", doc: /* Exit from the innermost recursive edit or minibuffer. */) (void) @@ -1179,6 +1180,7 @@ DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, error ("No recursive edit is in progress"); } +Lisp_Object Fabort_recursive_edit (void) NO_RETURN; DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "", doc: /* Abort the command that requested this recursive edit or minibuffer input. */) (void) From c8a06054fc9dfb6dcb8c8a77a09657a10212cf4e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 08:28:09 -0700 Subject: [PATCH 219/383] * keyboard.c (read_char): Mark local as initialized. --- src/ChangeLog | 2 +- src/keyboard.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1cdeefff899..685ba3c7e9a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,7 +8,7 @@ (decode_keyboard_code, tty_read_avail_input, menu_bar_items): (parse_tool_bar_item, read_key_sequence, Fread_key_sequence): (Fread_key_sequence_vector): Rename locals to avoid shadowing. - (read_key_sequence): Mark locals as initialized. + (read_key_sequence, read_char): Mark locals as initialized. (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN. * keyboard.h (make_ctrl_char): New decl. diff --git a/src/keyboard.c b/src/keyboard.c index afa78184179..05b6abe97b3 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2694,7 +2694,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event if (NILP (c)) { - KBOARD *kb; + KBOARD *kb IF_LINT (= NULL); if (end_time) { From 38fc62d95ae8078bedac4a99eb7ea8856f86032e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 08:32:56 -0700 Subject: [PATCH 220/383] * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal): (copy_keymap_item, append_key, push_text_char_description): Now static. --- src/ChangeLog | 4 ++++ src/keymap.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 685ba3c7e9a..9f770df40ef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-14 Paul Eggert + * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal): + (copy_keymap_item, append_key, push_text_char_description): + Now static. + * keyboard.c: Declare functions static if they are not used elsewhere. (echo_char, echo_dash, cmd_error, top_level_2): (poll_for_input, handle_async_input): Now static. diff --git a/src/keymap.c b/src/keymap.c index 4459ef07d68..cbb6adf3a0b 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -255,7 +255,7 @@ get_keymap (Lisp_Object object, int error, int autoload) /* Return the parent map of KEYMAP, or nil if it has none. We assume that KEYMAP is a valid keymap. */ -Lisp_Object +static Lisp_Object keymap_parent (Lisp_Object keymap, int autoload) { Lisp_Object list; @@ -283,7 +283,7 @@ If KEYMAP has no parent, return nil. */) } /* Check whether MAP is one of MAPS parents. */ -int +static int keymap_memberp (Lisp_Object map, Lisp_Object maps) { if (NILP (map)) return 0; @@ -598,7 +598,7 @@ map_keymap_char_table_item (Lisp_Object args, Lisp_Object key, Lisp_Object val) /* Call FUN for every binding in MAP and stop at (and return) the parent. FUN is called with 4 arguments: FUN (KEY, BINDING, ARGS, DATA). */ -Lisp_Object +static Lisp_Object map_keymap_internal (Lisp_Object map, map_keymap_function_t fun, Lisp_Object args, @@ -960,7 +960,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def) EXFUN (Fcopy_keymap, 1); -Lisp_Object +static Lisp_Object copy_keymap_item (Lisp_Object elt) { Lisp_Object res, tem; @@ -1337,7 +1337,7 @@ define_as_prefix (Lisp_Object keymap, Lisp_Object c) /* Append a key to the end of a key sequence. We always make a vector. */ -Lisp_Object +static Lisp_Object append_key (Lisp_Object key_sequence, Lisp_Object key) { Lisp_Object args[2]; @@ -2439,7 +2439,7 @@ around function keys and event symbols. */) return Qnil; } -char * +static char * push_text_char_description (register unsigned int c, register char *p) { if (c >= 0200) From 1004a21a8f2488da573e0340873cbdeac3ac2001 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 08:40:57 -0700 Subject: [PATCH 221/383] * keymap.c (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily. --- src/ChangeLog | 1 + src/keymap.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9f770df40ef..8efad3a59d9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal): (copy_keymap_item, append_key, push_text_char_description): Now static. + (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily. * keyboard.c: Declare functions static if they are not used elsewhere. (echo_char, echo_dash, cmd_error, top_level_2): diff --git a/src/keymap.c b/src/keymap.c index cbb6adf3a0b..05d9616ef2d 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -2774,8 +2774,8 @@ remapped command in the returned list. */) considered remapped sequences yet, copy them over and process them. */ || (!remapped && (sequences = remapped_sequences, - remapped = 1), - CONSP (sequences))) + remapped = 1, + CONSP (sequences)))) { Lisp_Object sequence, function; From dbbb842771445b0376b95a48a4fae85f37420c62 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 08:42:21 -0700 Subject: [PATCH 222/383] * keymap.c (DENSE_TABLE_SIZE): Remove; unused. --- src/ChangeLog | 1 + src/keymap.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8efad3a59d9..5b9e472e4e9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ (copy_keymap_item, append_key, push_text_char_description): Now static. (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily. + (DENSE_TABLE_SIZE): Remove; unused. * keyboard.c: Declare functions static if they are not used elsewhere. (echo_char, echo_dash, cmd_error, top_level_2): diff --git a/src/keymap.c b/src/keymap.c index 05d9616ef2d..a4de89f6a72 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -34,9 +34,6 @@ along with GNU Emacs. If not, see . */ #include "keymap.h" #include "window.h" -/* The number of elements in keymap vectors. */ -#define DENSE_TABLE_SIZE (0200) - /* Actually allocate storage for these variables */ Lisp_Object current_global_map; /* Current global keymap */ From c1141155bab3b9e7b7c7663329715d492bbbccb2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 08:53:19 -0700 Subject: [PATCH 223/383] * keymap.c: (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal): (describe_map_tree): Rename locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/keymap.c | 57 ++++++++++++++++++++++++++------------------------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5b9e472e4e9..55fa10066ef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,9 @@ Now static. (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily. (DENSE_TABLE_SIZE): Remove; unused. + (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal): + (describe_map_tree): + Rename locals to avoid shadowing. * keyboard.c: Declare functions static if they are not used elsewhere. (echo_char, echo_dash, cmd_error, top_level_2): diff --git a/src/keymap.c b/src/keymap.c index a4de89f6a72..06968a0d944 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -188,8 +188,9 @@ when reading a key-sequence to be looked-up in this keymap. */) If the map needs to be autoloaded, but AUTOLOAD is zero (and ERROR is zero as well), return Qt. - ERROR controls how we respond if OBJECT isn't a keymap. - If ERROR is non-zero, signal an error; otherwise, just return Qnil. + ERROR_IF_NOT_KEYMAP controls how we respond if OBJECT isn't a keymap. + If ERROR_IF_NOT_KEYMAP is non-zero, signal an error; otherwise, + just return Qnil. Note that most of the time, we don't want to pursue autoloads. Functions like Faccessible_keymaps which scan entire keymap trees @@ -201,7 +202,7 @@ when reading a key-sequence to be looked-up in this keymap. */) do_autoload which can GC. */ Lisp_Object -get_keymap (Lisp_Object object, int error, int autoload) +get_keymap (Lisp_Object object, int error_if_not_keymap, int autoload) { Lisp_Object tem; @@ -219,7 +220,7 @@ get_keymap (Lisp_Object object, int error, int autoload) /* Should we do an autoload? Autoload forms for keymaps have Qkeymap as their fifth element. */ - if ((autoload || !error) && EQ (XCAR (tem), Qautoload) + if ((autoload || !error_if_not_keymap) && EQ (XCAR (tem), Qautoload) && SYMBOLP (object)) { Lisp_Object tail; @@ -244,7 +245,7 @@ get_keymap (Lisp_Object object, int error, int autoload) } end: - if (error) + if (error_if_not_keymap) wrong_type_argument (Qkeymapp, object); return Qnil; } @@ -465,19 +466,19 @@ access_keymap (Lisp_Object map, Lisp_Object idx, int t_ok, int noinherit, int au /* See if there is a meta-map. If there's none, there is no binding for IDX, unless a default binding exists in MAP. */ struct gcpro gcpro1; - Lisp_Object meta_map; + Lisp_Object event_meta_map; GCPRO1 (map); /* A strange value in which Meta is set would cause infinite recursion. Protect against that. */ if (XINT (meta_prefix_char) & CHAR_META) meta_prefix_char = make_number (27); - meta_map = get_keymap (access_keymap (map, meta_prefix_char, - t_ok, noinherit, autoload), - 0, autoload); + event_meta_map = get_keymap (access_keymap (map, meta_prefix_char, + t_ok, noinherit, autoload), + 0, autoload); UNGCPRO; - if (CONSP (meta_map)) + if (CONSP (event_meta_map)) { - map = meta_map; + map = event_meta_map; idx = make_number (XUINT (idx) & ~meta_modifier); } else if (t_ok) @@ -1139,10 +1140,10 @@ binding KEY to DEF is added at the front of KEYMAP. */) int i = ASIZE (def); while (--i >= 0) { - Lisp_Object c = AREF (def, i); - if (CONSP (c) && lucid_event_type_list_p (c)) - c = Fevent_convert_list (c); - ASET (tmp, i, c); + Lisp_Object defi = AREF (def, i); + if (CONSP (defi) && lucid_event_type_list_p (defi)) + defi = Fevent_convert_list (defi); + ASET (tmp, i, defi); } def = tmp; } @@ -2812,9 +2813,9 @@ remapped command in the returned list. */) seems to be only one menu item to report. */ if (! NILP (sequence)) { - Lisp_Object tem; - tem = Faref (sequence, make_number (ASIZE (sequence) - 1)); - if (STRINGP (tem)) + Lisp_Object tem1; + tem1 = Faref (sequence, make_number (ASIZE (sequence) - 1)); + if (STRINGP (tem1)) Faset (sequence, make_number (ASIZE (sequence) - 1), build_string ("(any string)")); } @@ -3119,13 +3120,13 @@ key binding\n\ /* Delete from MAPS each element that is for the menu bar. */ for (list = maps; CONSP (list); list = XCDR (list)) { - Lisp_Object elt, prefix, tem; + Lisp_Object elt, elt_prefix, tem; elt = XCAR (list); - prefix = Fcar (elt); - if (XVECTOR (prefix)->size >= 1) + elt_prefix = Fcar (elt); + if (XVECTOR (elt_prefix)->size >= 1) { - tem = Faref (prefix, make_number (0)); + tem = Faref (elt_prefix, make_number (0)); if (EQ (tem, Qmenu_bar)) maps = Fdelq (elt, maps); } @@ -3150,10 +3151,10 @@ key binding\n\ for (; CONSP (maps); maps = XCDR (maps)) { - register Lisp_Object elt, prefix, tail; + register Lisp_Object elt, elt_prefix, tail; elt = XCAR (maps); - prefix = Fcar (elt); + elt_prefix = Fcar (elt); sub_shadows = Qnil; @@ -3165,8 +3166,8 @@ key binding\n\ /* If the sequence by which we reach this keymap is zero-length, then the shadow map for this keymap is just SHADOW. */ - if ((STRINGP (prefix) && SCHARS (prefix) == 0) - || (VECTORP (prefix) && XVECTOR (prefix)->size == 0)) + if ((STRINGP (elt_prefix) && SCHARS (elt_prefix) == 0) + || (VECTORP (elt_prefix) && XVECTOR (elt_prefix)->size == 0)) ; /* If the sequence by which we reach this keymap actually has some elements, then the sequence's definition in SHADOW is @@ -3192,12 +3193,12 @@ key binding\n\ for (tail = orig_maps; !EQ (tail, maps); tail = XCDR (tail)) { Lisp_Object tem; - tem = Fequal (Fcar (XCAR (tail)), prefix); + tem = Fequal (Fcar (XCAR (tail)), elt_prefix); if (!NILP (tem)) sub_shadows = Fcons (XCDR (XCAR (tail)), sub_shadows); } - describe_map (Fcdr (elt), prefix, + describe_map (Fcdr (elt), elt_prefix, transl ? describe_translation : describe_command, partial, sub_shadows, &seen, nomenu, mention_shadow); From 2aa46d6cce6773a0c56c93ca64750caea6ed3bba Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 14 Mar 2011 12:18:25 -0400 Subject: [PATCH 224/383] * src/buffer.c (Fmake_indirect_buffer): Fix incorrect assertion. --- src/ChangeLog | 4 ++++ src/buffer.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bad9b8dd4b7..8e5c9564f55 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-14 Chong Yidong + + * buffer.c (Fmake_indirect_buffer): Fix incorrect assertion. + 2011-03-13 Chong Yidong * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT) diff --git a/src/buffer.c b/src/buffer.c index 01940728275..c0485c10a99 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -611,8 +611,8 @@ CLONE nil means the indirect buffer's state is reset to default values. */) /* Make sure the base buffer has markers for its narrowing. */ if (NILP (BVAR (b->base_buffer, pt_marker))) { - eassert (NILP (BVAR (b, begv_marker))); - eassert (NILP (BVAR (b, zv_marker))); + eassert (NILP (BVAR (b->base_buffer, begv_marker))); + eassert (NILP (BVAR (b->base_buffer, zv_marker))); BVAR (b->base_buffer, pt_marker) = Fmake_marker (); set_marker_both (BVAR (b->base_buffer, pt_marker), base_buffer, From e756ec02a4415f054cac4887a1b03ae4d7ed6ccb Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 14 Mar 2011 17:39:58 +0100 Subject: [PATCH 225/383] * tramp.texi (Remote processes): New subsection "Running shell on a remote host". --- doc/misc/ChangeLog | 5 +++++ doc/misc/tramp.texi | 29 +++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index db3a944c160..ecb6cceda91 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2011-03-14 Michael Albinus + + * tramp.texi (Remote processes): New subsection "Running shell on + a remote host". + 2011-03-12 Teodor Zlatanov * auth.texi (Help for developers): Update docs to explain that the diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index bdbba437af7..e1c4a806de2 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2540,7 +2540,28 @@ Another trick might be that you put @code{ForwardX11 yes} or that host. -@subsection Running shell-command on a remote host +@subsection Running @code{shell} on a remote host +@cindex shell + +Calling @code{M-x shell} in a buffer related to a remote host runs the +local shell as defined in @option{shell-file-name}. This might be +also a valid path name for a shell to be applied on the remote host, +but it will fail at least when your local and remote hosts belong to +different system types, like @samp{windows-nt} and @samp{gnu/linux}. + +You must set the variable @option{explicit-shell-file-name} to the +shell path name on the remote host, in order to start that shell on +the remote host. + +@ifset emacs +Starting with Emacs 24 this won't be necessary, if you call +@code{shell} interactively. You will be asked for the remote shell +path, if you are on a remote buffer, and if +@option{explicit-shell-file-name} is equal to @code{nil}. +@end ifset + + +@subsection Running @code{shell-command} on a remote host @cindex shell-command @code{shell-command} allows to execute commands in a shell, either @@ -2556,13 +2577,13 @@ You will see the buffer @file{*Async Shell Command*}, containing the continuous output of the @command{tail} command. -@subsection Running eshell on a remote host +@subsection Running @code{eshell} on a remote host @cindex eshell @value{tramp} is integrated into @file{eshell.el}. That is, you can open an interactive shell on your remote host, and run commands there. -After you have started @code{eshell}, you could perform commands like -this: +After you have started @code{M-x eshell}, you could perform commands +like this: @example @b{~ $} cd @trampfn{sudo, , , /etc} @key{RET} From 7684e57b24092dbfbbe7fc62a1a544e40e2ce88a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 14 Mar 2011 18:07:53 +0100 Subject: [PATCH 226/383] src/w32*.c: Clean up extern declarations. * w32select.c: Don't #include "keyboard.h". (run_protected): Add extern declaration for waiting_for_input. * lisp.h (VWindow_system, Qfile_name_history): * keyboard.h (lispy_function_keys) [WINDOWSNT]: * w32term.h (w32_system_caret_hwnd, w32_system_caret_height) (w32_system_caret_x, w32_system_caret_y): Declare extern. * w32.c (Qlocal, noninteractive1, inhibit_window_system): * w32console.c (detect_input_pending, read_input_pending) (encode_terminal_code): * w32fns.c (quit_char, lispy_function_keys, Qtooltip) (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x) (w32_system_caret_y, Qfile_name_history): * w32font.c (w32font_driver, QCantialias, QCotf, QClang): * w32inevt.c (reinvoke_input_signal, lispy_function_keys): * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map) (Qoverriding_terminal_local_map, Qmenu_bar_update_hook): * w32proc.c (Qlocal, report_file_error): * w32term.c (Vwindow_system, updating_frame): * w32uniscribe.c (initialized, uniscribe_font_driver): Remove unneeded extern declarations. --- src/ChangeLog | 25 +++++++++++++++++++++++++ src/keyboard.h | 9 ++++++--- src/lisp.h | 2 ++ src/w32.c | 5 ----- src/w32console.c | 9 --------- src/w32fns.c | 15 +-------------- src/w32font.c | 3 --- src/w32inevt.c | 9 ++------- src/w32menu.c | 8 -------- src/w32proc.c | 8 ++------ src/w32select.c | 2 +- src/w32term.c | 14 ++------------ src/w32term.h | 6 +++++- src/w32uniscribe.c | 4 ---- 14 files changed, 46 insertions(+), 73 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8e5c9564f55..09413b26483 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,28 @@ +2011-03-14 Juanma Barranquero + + * lisp.h (VWindow_system, Qfile_name_history): + * keyboard.h (lispy_function_keys) [WINDOWSNT]: + * w32term.h (w32_system_caret_hwnd, w32_system_caret_height) + (w32_system_caret_x, w32_system_caret_y): Declare extern. + + * w32select.c: Don't #include "keyboard.h". + (run_protected): Add extern declaration for waiting_for_input. + + * w32.c (Qlocal, noninteractive1, inhibit_window_system): + * w32console.c (detect_input_pending, read_input_pending) + (encode_terminal_code): + * w32fns.c (quit_char, lispy_function_keys, Qtooltip) + (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x) + (w32_system_caret_y, Qfile_name_history): + * w32font.c (w32font_driver, QCantialias, QCotf, QClang): + * w32inevt.c (reinvoke_input_signal, lispy_function_keys): + * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map) + (Qoverriding_terminal_local_map, Qmenu_bar_update_hook): + * w32proc.c (Qlocal, report_file_error): + * w32term.c (Vwindow_system, updating_frame): + * w32uniscribe.c (initialized, uniscribe_font_driver): + Remove unneeded extern declarations. + 2011-03-14 Chong Yidong * buffer.c (Fmake_indirect_buffer): Fix incorrect assertion. diff --git a/src/keyboard.h b/src/keyboard.h index 10bf16d5c5c..f2000a44643 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -90,7 +90,7 @@ struct kboard /* User-supplied table to translate input characters through. */ Lisp_Object KBOARD_INTERNAL_FIELD (Vkeyboard_translate_table); - + /* Last command that may be repeated by `repeat'. */ Lisp_Object KBOARD_INTERNAL_FIELD (Vlast_repeatable_command); @@ -140,12 +140,12 @@ struct kboard /* Keymap mapping keys to alternative preferred forms. See the DEFVAR for more documentation. */ Lisp_Object KBOARD_INTERNAL_FIELD (Vlocal_function_key_map); - + /* Keymap mapping ASCII function key sequences onto their preferred forms. Initialized by the terminal-specific lisp files. See the DEFVAR for more documentation. */ Lisp_Object KBOARD_INTERNAL_FIELD (Vinput_decode_map); - + /* Minibufferless frames on this display use this frame's minibuffer. */ Lisp_Object KBOARD_INTERNAL_FIELD (Vdefault_minibuffer_frame); @@ -518,3 +518,6 @@ extern int tty_read_avail_input (struct terminal *, int, struct input_event *); extern EMACS_TIME timer_check (int); +#ifdef WINDOWSNT +extern const char *const lispy_function_keys[]; +#endif diff --git a/src/lisp.h b/src/lisp.h index 113585320af..0f55da317ca 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2607,6 +2607,7 @@ extern void syms_of_insdel (void); /* Defined in dispnew.c */ extern Lisp_Object selected_frame; +extern Lisp_Object Vwindow_system; EXFUN (Fding, 1); EXFUN (Fredraw_frame, 1); EXFUN (Fsleep_for, 2); @@ -3009,6 +3010,7 @@ extern Lisp_Object Qfile_error; extern Lisp_Object Qfile_exists_p; extern Lisp_Object Qfile_directory_p; extern Lisp_Object Qinsert_file_contents; +extern Lisp_Object Qfile_name_history; EXFUN (Ffind_file_name_handler, 2); EXFUN (Ffile_name_as_directory, 1); EXFUN (Fexpand_file_name, 2); diff --git a/src/w32.c b/src/w32.c index ae2373be46e..721cea07d20 100644 --- a/src/w32.c +++ b/src/w32.c @@ -147,9 +147,6 @@ typedef HRESULT (WINAPI * ShGetFolderPath_fn) void globals_of_w32 (void); static DWORD get_rid (PSID); -/* Defined in process.c for its own purpose. */ -extern Lisp_Object Qlocal; - /* Initialization states. @@ -5666,8 +5663,6 @@ sys_write (int fd, const void * buffer, unsigned int count) static void check_windows_init_file (void) { - extern int noninteractive, inhibit_window_system; - /* A common indication that Emacs is not installed properly is when it cannot find the Windows installation file. If this file does not exist in the expected place, tell the user. */ diff --git a/src/w32console.c b/src/w32console.c index 31c4a7c4e5a..3c200405cb5 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -41,12 +41,6 @@ along with GNU Emacs. If not, see . */ /* from window.c */ extern Lisp_Object Frecenter (Lisp_Object); -/* from keyboard.c */ -extern int detect_input_pending (void); - -/* from sysdep.c */ -extern int read_input_pending (void); - static void w32con_move_cursor (struct frame *f, int row, int col); static void w32con_clear_to_end (struct frame *f); static void w32con_clear_frame (struct frame *f); @@ -277,9 +271,6 @@ w32con_insert_glyphs (struct frame *f, register struct glyph *start, } } -extern unsigned char *encode_terminal_code (struct glyph *, int, - struct coding_system *); - static void w32con_write_glyphs (struct frame *f, register struct glyph *string, register int len) diff --git a/src/w32fns.c b/src/w32fns.c index 09442d41e14..0c899cdceff 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -80,10 +80,6 @@ extern void w32_menu_display_help (HWND, HMENU, UINT, UINT); extern void w32_free_menu_strings (HWND); extern const char *map_w32_filename (const char *, const char **); -extern int quit_char; - -extern const char *const lispy_function_keys[]; - /* If non-zero, a w32 timer that, when it expires, displays an hourglass cursor on all frames. */ static unsigned hourglass_timer = 0; @@ -187,18 +183,10 @@ unsigned int msh_mousewheel = 0; #define MENU_FREE_DELAY 1000 static unsigned menu_free_timer = 0; -extern Lisp_Object Qtooltip; - #ifdef GLYPH_DEBUG int image_cache_refcount, dpyinfo_refcount; #endif - -extern HWND w32_system_caret_hwnd; - -extern int w32_system_caret_height; -extern int w32_system_caret_x; -extern int w32_system_caret_y; static HWND w32_visible_system_caret_hwnd; /* From w32menu.c */ @@ -5851,7 +5839,6 @@ Value is t if tooltip was open, nil otherwise. */) /*********************************************************************** File selection dialog ***********************************************************************/ -extern Lisp_Object Qfile_name_history; /* Callback for altering the behavior of the Open File dialog. Makes the Filename text field contain "Current Directory" and be @@ -5899,7 +5886,7 @@ file_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) no man's land and the user will be unable to tab through the dialog box (pressing tab will only result in a beep). Avoid that problem by setting focus to the list here. */ - if (CDN_INITDONE == notify->hdr.code) + if (notify->hdr.code == CDN_INITDONE) SetFocus (list); } else diff --git a/src/w32font.c b/src/w32font.c index aef62f61a3a..40ff0782b88 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -54,8 +54,6 @@ along with GNU Emacs. If not, see . */ #define JOHAB_CHARSET 130 #endif -extern struct font_driver w32font_driver; - Lisp_Object Qgdi; Lisp_Object Quniscribe; static Lisp_Object QCformat; @@ -64,7 +62,6 @@ static Lisp_Object Qserif, Qscript, Qdecorative; static Lisp_Object Qraster, Qoutline, Qunknown; /* antialiasing */ -extern Lisp_Object QCantialias, QCotf, QClang; /* defined in font.c */ extern Lisp_Object Qnone; /* reuse from w32fns.c */ static Lisp_Object Qstandard, Qsubpixel, Qnatural; diff --git a/src/w32inevt.c b/src/w32inevt.c index d0b097100fd..c4858dea908 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c @@ -40,18 +40,15 @@ along with GNU Emacs. If not, see . */ #include "w32heap.h" #include "w32term.h" -/* stdin, from ntterm */ +/* stdin, from w32console.c */ extern HANDLE keyboard_handle; /* Info for last mouse motion */ static COORD movement_pos; static DWORD movement_time; -/* from keyboard.c */ -extern void reinvoke_input_signal (void); - +/* from w32fns.c */ extern unsigned int map_keypad_keys (unsigned int, unsigned int); - extern unsigned int w32_key_to_modifier (int key); /* Event queue */ @@ -261,8 +258,6 @@ w32_kbd_patch_key (KEY_EVENT_RECORD *event) } -extern const char *const lispy_function_keys[]; - static int faked_key = 0; /* return code -1 means that event_queue_ptr won't be incremented. diff --git a/src/w32menu.c b/src/w32menu.c index 92447eb9fae..a2e62f24f6a 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -84,14 +84,6 @@ MessageBoxW_Proc unicode_message_box = NULL; Lisp_Object Qdebug_on_next_call; -extern Lisp_Object Qmenu_bar; - -extern Lisp_Object QCtoggle, QCradio; - -extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; - -extern Lisp_Object Qmenu_bar_update_hook; - void set_frame_menubar (FRAME_PTR, int, int); #ifdef HAVE_DIALOGS diff --git a/src/w32proc.c b/src/w32proc.c index bb8b428ffe4..e94d9aa3254 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -67,8 +67,6 @@ extern BOOL WINAPI IsValidLocale (LCID, DWORD); + ((DWORD)(var) - (section)->VirtualAddress) \ + (filedata).file_base)) -extern Lisp_Object Qlocal; - Lisp_Object Qhigh, Qlow; #ifdef EMACSDEBUG @@ -1053,7 +1051,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) detect that we were woken up by C-g, we return -1 with errno set to EINTR as on Unix. */ -/* From ntterm.c */ +/* From w32console.c */ extern HANDLE keyboard_handle; /* From w32xfns.c */ @@ -1559,8 +1557,6 @@ sys_kill (int pid, int sig) return rc; } -/* extern int report_file_error (char *, Lisp_Object); */ - /* The following two routines are used to manipulate stdin, stdout, and stderr of our child processes. @@ -1660,7 +1656,7 @@ set_process_dir (char * dir) dial-up users to only be connected when they actually need to use socket services. */ -/* From nt.c */ +/* From w32.c */ extern HANDLE winsock_lib; extern BOOL term_winsock (void); extern BOOL init_winsock (int load_now); diff --git a/src/w32select.c b/src/w32select.c index 23d5fb68c77..ef0cb3adc24 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -78,7 +78,6 @@ along with GNU Emacs. If not, see . */ #include "w32term.h" /* for all of the w32 includes */ #include "w32heap.h" /* os_subtype */ #include "blockinput.h" -#include "keyboard.h" /* cmd_error_internal() */ #include "charset.h" #include "coding.h" #include "character.h" @@ -391,6 +390,7 @@ run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg) with global variables and calling strange looking functions. Is this really the right way to run Lisp callbacks? */ + extern int waiting_for_input; /* from keyboard.c */ int owfi; BLOCK_INPUT; diff --git a/src/w32term.c b/src/w32term.c index 67e853f21f0..f31c4e90e77 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -88,8 +88,6 @@ extern void free_frame_menubar (struct frame *); extern int w32_codepage_for_font (char *fontname); extern Cursor w32_load_cursor (LPCTSTR name); -extern Lisp_Object Vwindow_system; - #define x_any_window_to_frame x_window_to_frame #define x_top_window_to_frame x_window_to_frame @@ -138,13 +136,6 @@ BOOL (WINAPI *pfnSetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD); #define WS_EX_LAYERED 0x80000 #endif -/* Frame being updated by update_frame. This is declared in term.c. - This is set by update_begin and looked at by all the - w32 functions. It is zero while not inside an update. - In that case, the w32 functions assume that `SELECTED_FRAME ()' - is the frame to apply to. */ -extern struct frame *updating_frame; - /* This is a frame waiting to be autoraised, within w32_read_socket. */ struct frame *pending_autoraise_frame; @@ -2536,8 +2527,7 @@ x_delete_glyphs (struct frame *f, register int n) } -/* Clear entire frame. If updating_frame is non-null, clear that - frame. Otherwise clear the selected frame. */ +/* Clear entire frame. */ static void x_clear_frame (struct frame *f) @@ -6060,7 +6050,7 @@ w32_create_terminal (struct w32_display_info *dpyinfo) terminal->mouse_position_hook = w32_mouse_position; terminal->frame_rehighlight_hook = w32_frame_rehighlight; terminal->frame_raise_lower_hook = w32_frame_raise_lower; - // terminal->fullscreen_hook = XTfullscreen_hook; + /* terminal->fullscreen_hook = XTfullscreen_hook; */ terminal->set_vertical_scroll_bar_hook = w32_set_vertical_scroll_bar; terminal->condemn_scroll_bars_hook = w32_condemn_scroll_bars; terminal->redeem_scroll_bar_hook = w32_redeem_scroll_bar; diff --git a/src/w32term.h b/src/w32term.h index c79352a8db8..cf6751b7d63 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -547,7 +547,7 @@ do { \ #define WM_APPCOMMAND 0x319 #define GET_APPCOMMAND_LPARAM(lParam) (HIWORD(lParam) & 0x7fff) #endif -#ifndef WM_UNICHAR +#ifndef WM_UNICHAR #define WM_UNICHAR 0x109 #endif #ifndef UNICODE_NOCHAR @@ -697,3 +697,7 @@ typedef BOOL (WINAPI * AppendMenuW_Proc) ( IN UINT_PTR, IN LPCWSTR); +extern HWND w32_system_caret_hwnd; +extern int w32_system_caret_height; +extern int w32_system_caret_x; +extern int w32_system_caret_y; diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 319f934e3bb..39d1ee5c851 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -52,10 +52,6 @@ int uniscribe_available = 0; extern Lisp_Object Quniscribe; extern Lisp_Object Qopentype; -extern int initialized; - -extern struct font_driver uniscribe_font_driver; - /* EnumFontFamiliesEx callback. */ static int CALLBACK add_opentype_font_name_to_list (ENUMLOGFONTEX *, NEWTEXTMETRICEX *, From c96bbc66c6ce2554a0c5336110d5fd9a72ae371a Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Mon, 14 Mar 2011 18:22:53 +0100 Subject: [PATCH 227/383] src/ChangeLog: Fix typos. --- src/ChangeLog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 09413b26483..a1538d8f3f7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,7 +6,7 @@ (w32_system_caret_x, w32_system_caret_y): Declare extern. * w32select.c: Don't #include "keyboard.h". - (run_protected): Add extern declaration for waiting_for_input. + (run_protected): Add extern declaration for waiting_for_input. * w32.c (Qlocal, noninteractive1, inhibit_window_system): * w32console.c (detect_input_pending, read_input_pending) @@ -25,7 +25,7 @@ 2011-03-14 Chong Yidong - * buffer.c (Fmake_indirect_buffer): Fix incorrect assertion. + * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions. 2011-03-13 Chong Yidong @@ -130,7 +130,7 @@ 2011-03-12 Eli Zaretskii - * termcap.c [MSDOS]: Include "msdos.h. + * termcap.c [MSDOS]: Include "msdos.h". (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent): Constify `char *' arguments and their references according to prototypes in tparam.h. From 604efe86a9fa5ab29cb701136b4a2dac1526062a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 15:36:12 -0700 Subject: [PATCH 228/383] * sysdep.c (reset_io): Now static. --- src/ChangeLog | 2 ++ src/sysdep.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 55fa10066ef..97fa2706cbb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-14 Paul Eggert + * sysdep.c (reset_io): Now static. + * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal): (copy_keymap_item, append_key, push_text_char_description): Now static. diff --git a/src/sysdep.c b/src/sysdep.c index 5760d0224eb..ac7927e8734 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -632,7 +632,7 @@ init_sigio (int fd) { } -void +static void reset_sigio (int fd) { } @@ -662,7 +662,7 @@ init_sigio (int fd) interrupts_deferred = 0; } -void +static void reset_sigio (int fd) { #ifdef FASYNC From b8950c9480bca68fd8c7a619127cb69c9aa684fe Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 15:37:08 -0700 Subject: [PATCH 229/383] * sysdep.c (wait_for_termination_signal): Remove; unused. --- src/ChangeLog | 1 + src/sysdep.c | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 97fa2706cbb..d695c20be42 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-14 Paul Eggert * sysdep.c (reset_io): Now static. + (wait_for_termination_signal): Remove; unused. * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal): (copy_keymap_item, append_key, push_text_char_description): diff --git a/src/sysdep.c b/src/sysdep.c index ac7927e8734..e5bf27f4fec 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -292,10 +292,6 @@ init_baud_rate (int fd) int wait_debugging; /* Set nonzero to make following function work under dbx (at least for bsd). */ -SIGTYPE -wait_for_termination_signal (void) -{} - #ifndef MSDOS /* Wait for subprocess with process id `pid' to terminate and make sure it will get eliminated (not remain forever as a zombie) */ From a884fdcc41237099dc76548a9b751ceaabefe7de Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 15:42:10 -0700 Subject: [PATCH 230/383] * fns.c (get_random, seed_random): Move extern decls from here ... * lisp.h: ... to here, so that they can be checked. --- src/ChangeLog | 3 +++ src/fns.c | 3 --- src/lisp.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d695c20be42..e45fed84108 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-14 Paul Eggert + * fns.c (get_random, seed_random): Move extern decls from here ... + * lisp.h: ... to here, so that they can be checked. + * sysdep.c (reset_io): Now static. (wait_for_termination_signal): Remove; unused. diff --git a/src/fns.c b/src/fns.c index b54d52e3003..0026c9d12e4 100644 --- a/src/fns.c +++ b/src/fns.c @@ -57,9 +57,6 @@ Lisp_Object Qcodeset, Qdays, Qmonths, Qpaper; static int internal_equal (Lisp_Object , Lisp_Object, int, int); -extern long get_random (void); -extern void seed_random (long); - #ifndef HAVE_UNISTD_H extern long time (); #endif diff --git a/src/lisp.h b/src/lisp.h index 541302cb56b..eacd68e42cb 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3340,6 +3340,8 @@ extern void child_setup_tty (int); extern void setup_pty (int); extern int set_window_size (int, int, int); extern void create_process (Lisp_Object, char **, Lisp_Object); +extern long get_random (void); +extern void seed_random (long); extern int emacs_open (const char *, int, int); extern int emacs_close (int); extern int emacs_read (int, char *, unsigned int); From a0977c44540ebf331dde6f673f4fbf735b4e30ac Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 15:49:41 -0700 Subject: [PATCH 231/383] * process.c (serial_open, serial_configure): Move decls from here ... * systty.h: ... to here, so that they can be checked. --- src/ChangeLog | 3 +++ src/process.c | 4 ---- src/systty.h | 3 +++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e45fed84108..edc79329a3b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-14 Paul Eggert + * process.c (serial_open, serial_configure): Move decls from here ... + * systty.h: ... to here, so that they can be checked. + * fns.c (get_random, seed_random): Move extern decls from here ... * lisp.h: ... to here, so that they can be checked. diff --git a/src/process.c b/src/process.c index 210287a85f1..c8f329c244b 100644 --- a/src/process.c +++ b/src/process.c @@ -164,10 +164,6 @@ extern Lisp_Object QCfilter; extern const char *get_operating_system_release (void); -/* From sysdep.c or w32.c */ -extern int serial_open (char *port); -extern void serial_configure (struct Lisp_Process *p, Lisp_Object contact); - #ifndef HAVE_H_ERRNO extern int h_errno; #endif diff --git a/src/systty.h b/src/systty.h index 2eacfdb2716..1548952e7a8 100644 --- a/src/systty.h +++ b/src/systty.h @@ -118,3 +118,6 @@ struct emacs_tty { extern int emacs_get_tty (int, struct emacs_tty *); extern int emacs_set_tty (int, struct emacs_tty *, int); +/* From sysdep.c or w32.c */ +extern int serial_open (char *); +extern void serial_configure (struct Lisp_Process *, Lisp_Object); From a70072c9a5be8a9cdd4d848b30ee5c82ee5c0987 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 15:52:28 -0700 Subject: [PATCH 232/383] * sysdep.c (system_process_attributes): Rename vars to avoid shadowing. --- src/ChangeLog | 2 ++ src/sysdep.c | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index edc79329a3b..0840e5ec9f0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-14 Paul Eggert + * sysdep.c (system_process_attributes): Rename vars to avoid shadowing. + * process.c (serial_open, serial_configure): Move decls from here ... * systty.h: ... to here, so that they can be checked. diff --git a/src/sysdep.c b/src/sysdep.c index e5bf27f4fec..b8fbf863074 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2667,8 +2667,8 @@ system_process_attributes (Lisp_Object pid) size_t cmdsize = 0, cmdline_size; unsigned char c; int proc_id, ppid, uid, gid, pgrp, sess, tty, tpgid, thcount; - unsigned long long utime, stime, cutime, cstime, start; - long priority, nice, rss; + unsigned long long u_time, s_time, cutime, cstime, start; + long priority, niceness, rss; unsigned long minflt, majflt, cminflt, cmajflt, vsize; time_t sec; unsigned usec; @@ -2748,8 +2748,8 @@ system_process_attributes (Lisp_Object pid) sscanf (p, "%c %d %d %d %d %d %*u %lu %lu %lu %lu %Lu %Lu %Lu %Lu %ld %ld %d %*d %Lu %lu %ld", &c, &ppid, &pgrp, &sess, &tty, &tpgid, &minflt, &cminflt, &majflt, &cmajflt, - &utime, &stime, &cutime, &cstime, - &priority, &nice, &thcount, &start, &vsize, &rss); + &u_time, &s_time, &cutime, &cstime, + &priority, &niceness, &thcount, &start, &vsize, &rss); { char state_str[2]; @@ -2777,13 +2777,14 @@ system_process_attributes (Lisp_Object pid) if (clocks_per_sec < 0) clocks_per_sec = 100; attrs = Fcons (Fcons (Qutime, - ltime_from_jiffies (utime, clocks_per_sec)), + ltime_from_jiffies (u_time, clocks_per_sec)), attrs); attrs = Fcons (Fcons (Qstime, - ltime_from_jiffies (stime, clocks_per_sec)), + ltime_from_jiffies (s_time, clocks_per_sec)), attrs); attrs = Fcons (Fcons (Qtime, - ltime_from_jiffies (stime+utime, clocks_per_sec)), + ltime_from_jiffies (s_time + u_time, + clocks_per_sec)), attrs); attrs = Fcons (Fcons (Qcutime, ltime_from_jiffies (cutime, clocks_per_sec)), @@ -2795,7 +2796,7 @@ system_process_attributes (Lisp_Object pid) ltime_from_jiffies (cstime+cutime, clocks_per_sec)), attrs); attrs = Fcons (Fcons (Qpri, make_number (priority)), attrs); - attrs = Fcons (Fcons (Qnice, make_number (nice)), attrs); + attrs = Fcons (Fcons (Qnice, make_number (niceness)), attrs); attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (thcount_eint)), attrs); EMACS_GET_TIME (tnow); get_up_time (&sec, &usec); @@ -2825,7 +2826,7 @@ system_process_attributes (Lisp_Object pid) make_number (EMACS_USECS (telapsed)))), attrs); - time_from_jiffies (utime + stime, clocks_per_sec, &sec, &usec); + time_from_jiffies (u_time + s_time, clocks_per_sec, &sec, &usec); pcpu = (sec + usec / 1000000.0) / (EMACS_SECS (telapsed) + EMACS_USECS (telapsed) / 1000000.0); if (pcpu > 1.0) pcpu = 1.0; From fbd02d7b061d3adc47ccce6ff568ef4bd3aecf17 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 15:56:24 -0700 Subject: [PATCH 233/383] * sysdep.c: Fix pointer signedness issue. --- src/ChangeLog | 1 + src/sysdep.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0840e5ec9f0..266ff2f58a6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-14 Paul Eggert * sysdep.c (system_process_attributes): Rename vars to avoid shadowing. + Fix pointer signedness issue. * process.c (serial_open, serial_configure): Move decls from here ... * systty.h: ... to here, so that they can be checked. diff --git a/src/sysdep.c b/src/sysdep.c index b8fbf863074..e19f9ca829e 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2845,8 +2845,10 @@ system_process_attributes (Lisp_Object pid) fd = emacs_open (fn, O_RDONLY, 0); if (fd >= 0) { - for (cmdline_size = 0; emacs_read (fd, &c, 1) == 1; cmdline_size++) + char ch; + for (cmdline_size = 0; emacs_read (fd, &ch, 1) == 1; cmdline_size++) { + c = ch; if (isspace (c) || c == '\\') cmdline_size++; /* for later quoting, see below */ } From edced198e35ccd2ab81797988705597da3fc3e19 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 16:30:06 -0700 Subject: [PATCH 234/383] * sysdep.c (sys_subshell): Mark local as volatile if checking for lint, to suppress a gcc -Wclobbered warning that does not seem to be right. --- src/ChangeLog | 2 ++ src/sysdep.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 266ff2f58a6..efc238cc078 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * sysdep.c (system_process_attributes): Rename vars to avoid shadowing. Fix pointer signedness issue. + (sys_subshell): Mark local as volatile if checking for lint, + to suppress a gcc -Wclobbered warning that does not seem to be right. * process.c (serial_open, serial_configure): Move decls from here ... * systty.h: ... to here, so that they can be checked. diff --git a/src/sysdep.c b/src/sysdep.c index e19f9ca829e..1c49b2a3387 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -488,7 +488,7 @@ sys_subshell (void) int pid; struct save_signal saved_handlers[5]; Lisp_Object dir; - unsigned char *str = 0; + unsigned char * IF_LINT (volatile) str = 0; int len; saved_handlers[0].code = SIGINT; From 15dfd3d9d66e43270f6ba506a7333bdc409a1ea9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 16:31:21 -0700 Subject: [PATCH 235/383] * sysdep.c (MAXPATHLEN): Define only if needed. --- src/ChangeLog | 1 + src/sysdep.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index efc238cc078..0a6b29a006c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ Fix pointer signedness issue. (sys_subshell): Mark local as volatile if checking for lint, to suppress a gcc -Wclobbered warning that does not seem to be right. + (MAXPATHLEN): Define only if needed. * process.c (serial_open, serial_configure): Move decls from here ... * systty.h: ... to here, so that they can be checked. diff --git a/src/sysdep.c b/src/sysdep.c index 1c49b2a3387..6ef3d88c5c8 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -1886,13 +1886,13 @@ emacs_write (int fildes, const char *buf, unsigned int nbyte) * under error conditions. */ +#ifndef HAVE_GETWD + #ifndef MAXPATHLEN /* In 4.1, param.h fails to define this. */ #define MAXPATHLEN 1024 #endif -#ifndef HAVE_GETWD - char * getwd (char *pathname) { From c3bd59b510ddf8a9188a7dcd46b0a01a9b3f6172 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 16:32:27 -0700 Subject: [PATCH 236/383] * buffer.c (switch_to_buffer_1): Now static. --- src/ChangeLog | 2 ++ src/buffer.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0a6b29a006c..9bdfb18239f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-14 Paul Eggert + * buffer.c (switch_to_buffer_1): Now static. + * sysdep.c (system_process_attributes): Rename vars to avoid shadowing. Fix pointer signedness issue. (sys_subshell): Mark local as volatile if checking for lint, diff --git a/src/buffer.c b/src/buffer.c index 01940728275..68253a261c4 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1712,7 +1712,7 @@ the current buffer's major mode. */) /* Switch to buffer BUFFER in the selected window. If NORECORD is non-nil, don't call record_buffer. */ -Lisp_Object +static Lisp_Object switch_to_buffer_1 (Lisp_Object buffer_or_name, Lisp_Object norecord) { register Lisp_Object buffer; From 8f54f30aec0b3278cc1e370445ae2b3e5a115a46 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 16:43:16 -0700 Subject: [PATCH 237/383] * buffer.c: (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte): (report_overlay_modification): Rename locals to avoid shadowing. --- src/ChangeLog | 2 ++ src/buffer.c | 86 +++++++++++++++++++++++++-------------------------- 2 files changed, 45 insertions(+), 43 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9bdfb18239f..2c0e951c8df 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,8 @@ 2011-03-14 Paul Eggert * buffer.c (switch_to_buffer_1): Now static. + (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte): + (report_overlay_modification): Rename locals to avoid shadowing. * sysdep.c (system_process_attributes): Rename vars to avoid shadowing. Fix pointer signedness issue. diff --git a/src/buffer.c b/src/buffer.c index 68253a261c4..99b4650bb60 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1464,9 +1464,9 @@ with SIGHUP. */) don't re-kill them. */ if (other->base_buffer == b && !NILP (BVAR (other, name))) { - Lisp_Object buffer; - XSETBUFFER (buffer, other); - Fkill_buffer (buffer); + Lisp_Object buf; + XSETBUFFER (buf, other); + Fkill_buffer (buf); } UNGCPRO; @@ -1527,9 +1527,9 @@ with SIGHUP. */) && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) && NILP (Fsymbol_value (intern ("auto-save-visited-file-name")))) { - Lisp_Object tem; - tem = Fsymbol_value (intern ("delete-auto-save-files")); - if (! NILP (tem)) + Lisp_Object delete; + delete = Fsymbol_value (intern ("delete-auto-save-files")); + if (! NILP (delete)) internal_delete_file (BVAR (b, auto_save_file_name)); } @@ -1601,19 +1601,19 @@ with SIGHUP. */) void record_buffer (Lisp_Object buf) { - register Lisp_Object link, prev; + register Lisp_Object list, prev; Lisp_Object frame; frame = selected_frame; prev = Qnil; - for (link = Vbuffer_alist; CONSP (link); link = XCDR (link)) + for (list = Vbuffer_alist; CONSP (list); list = XCDR (list)) { - if (EQ (XCDR (XCAR (link)), buf)) + if (EQ (XCDR (XCAR (list)), buf)) break; - prev = link; + prev = list; } - /* Effectively do Vbuffer_alist = Fdelq (link, Vbuffer_alist); + /* Effectively do Vbuffer_alist = Fdelq (list, Vbuffer_alist); we cannot use Fdelq itself here because it allows quitting. */ if (NILP (prev)) @@ -1621,40 +1621,40 @@ record_buffer (Lisp_Object buf) else XSETCDR (prev, XCDR (XCDR (prev))); - XSETCDR (link, Vbuffer_alist); - Vbuffer_alist = link; + XSETCDR (list, Vbuffer_alist); + Vbuffer_alist = list; /* Effectively do a delq on buried_buffer_list. */ prev = Qnil; - for (link = XFRAME (frame)->buried_buffer_list; CONSP (link); - link = XCDR (link)) + for (list = XFRAME (frame)->buried_buffer_list; CONSP (list); + list = XCDR (list)) { - if (EQ (XCAR (link), buf)) + if (EQ (XCAR (list), buf)) { if (NILP (prev)) - XFRAME (frame)->buried_buffer_list = XCDR (link); + XFRAME (frame)->buried_buffer_list = XCDR (list); else XSETCDR (prev, XCDR (XCDR (prev))); break; } - prev = link; + prev = list; } /* Now move this buffer to the front of frame_buffer_list also. */ prev = Qnil; - for (link = frame_buffer_list (frame); CONSP (link); - link = XCDR (link)) + for (list = frame_buffer_list (frame); CONSP (list); + list = XCDR (list)) { - if (EQ (XCAR (link), buf)) + if (EQ (XCAR (list), buf)) break; - prev = link; + prev = list; } /* Effectively do delq. */ - if (CONSP (link)) + if (CONSP (list)) { if (NILP (prev)) set_frame_buffer_list (frame, @@ -1662,8 +1662,8 @@ record_buffer (Lisp_Object buf) else XSETCDR (prev, XCDR (XCDR (prev))); - XSETCDR (link, frame_buffer_list (frame)); - set_frame_buffer_list (frame, link); + XSETCDR (list, frame_buffer_list (frame)); + set_frame_buffer_list (frame, list); } else set_frame_buffer_list (frame, Fcons (buf, frame_buffer_list (frame))); @@ -1984,13 +1984,13 @@ its frame, iconify that frame. */) buffer is killed. */ if (!NILP (BVAR (XBUFFER (buffer), name))) { - Lisp_Object aelt, link; + Lisp_Object aelt, list; aelt = Frassq (buffer, Vbuffer_alist); - link = Fmemq (aelt, Vbuffer_alist); + list = Fmemq (aelt, Vbuffer_alist); Vbuffer_alist = Fdelq (aelt, Vbuffer_alist); - XSETCDR (link, Qnil); - Vbuffer_alist = nconc2 (Vbuffer_alist, link); + XSETCDR (list, Qnil); + Vbuffer_alist = nconc2 (Vbuffer_alist, list); XFRAME (selected_frame)->buffer_list = Fdelq (buffer, XFRAME (selected_frame)->buffer_list); @@ -2335,12 +2335,12 @@ current buffer is cleared. */) && GPT_BYTE > 1 && GPT_BYTE < Z_BYTE && ! CHAR_HEAD_P (*(GAP_END_ADDR))) { - unsigned char *p = GPT_ADDR - 1; + unsigned char *q = GPT_ADDR - 1; - while (! CHAR_HEAD_P (*p) && p > BEG_ADDR) p--; - if (LEADING_CODE_P (*p)) + while (! CHAR_HEAD_P (*q) && q > BEG_ADDR) q--; + if (LEADING_CODE_P (*q)) { - EMACS_INT new_gpt = GPT_BYTE - (GPT_ADDR - p); + EMACS_INT new_gpt = GPT_BYTE - (GPT_ADDR - q); move_gap_both (new_gpt, new_gpt); } @@ -2424,14 +2424,14 @@ current buffer is cleared. */) ZV = chars_in_text (BEG_ADDR, ZV_BYTE - BEG_BYTE) + BEG; { - EMACS_INT pt_byte = advance_to_char_boundary (PT_BYTE); - EMACS_INT pt; + EMACS_INT byte = advance_to_char_boundary (PT_BYTE); + EMACS_INT position; - if (pt_byte > GPT_BYTE) - pt = chars_in_text (GAP_END_ADDR, pt_byte - GPT_BYTE) + GPT; + if (byte > GPT_BYTE) + position = chars_in_text (GAP_END_ADDR, byte - GPT_BYTE) + GPT; else - pt = chars_in_text (BEG_ADDR, pt_byte - BEG_BYTE) + BEG; - TEMP_SET_PT_BOTH (pt, pt_byte); + position = chars_in_text (BEG_ADDR, byte - BEG_BYTE) + BEG; + TEMP_SET_PT_BOTH (position, byte); } tail = markers = BUF_MARKERS (current_buffer); @@ -4322,10 +4322,10 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, int after, for (i = 0; i < size;) { - Lisp_Object prop, overlay; - prop = copy[i++]; - overlay = copy[i++]; - call_overlay_mod_hooks (prop, overlay, after, arg1, arg2, arg3); + Lisp_Object prop_i, overlay_i; + prop_i = copy[i++]; + overlay_i = copy[i++]; + call_overlay_mod_hooks (prop_i, overlay_i, after, arg1, arg2, arg3); } } UNGCPRO; From 0a57d256afbca59f9432c8b7c9f2c58bca8ff562 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 14 Mar 2011 21:12:54 -0400 Subject: [PATCH 238/383] * lisp/emacs-lisp/bytecomp.el (byte-compile-save-excursion): Change the warning message. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/bytecomp.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b36be6f3a09..e41e948ef29 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-15 Stefan Monnier + + * emacs-lisp/bytecomp.el (byte-compile-save-excursion): Change the + warning message. + 2011-03-14 Michael Albinus * shell.el (shell): When called interactively, offer to change the diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 5e24b80ac5a..5c845e59c85 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3776,7 +3776,8 @@ that suppresses all warnings during execution of BODY." (defun byte-compile-save-excursion (form) (if (and (eq 'set-buffer (car-safe (car-safe (cdr form)))) (byte-compile-warning-enabled-p 'suspicious)) - (byte-compile-warn "`save-excursion' defeated by `set-buffer'")) + (byte-compile-warn + "Use `with-current-buffer' rather than save-excursion+set-buffer")) (byte-compile-out 'byte-save-excursion 0) (byte-compile-body-do-effect (cdr form)) (byte-compile-out 'byte-unbind 1)) From 5df8f01bab8c0bbc3391f41c54138d0a18973424 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:15:56 -0700 Subject: [PATCH 239/383] * buffer.c (fix_overlays_before): Mark locals as initialized. (fix_start_end_in_overlays): Likewise. This function should be simplified by using pointers-to-pointers, but that's a different matter. --- src/ChangeLog | 7 +++++++ src/buffer.c | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2c0e951c8df..fae7e8a29c9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-03-15 Paul Eggert + + * buffer.c (fix_overlays_before): Mark locals as initialized. + (fix_start_end_in_overlays): Likewise. This function should be + simplified by using pointers-to-pointers, but that's a different + matter. + 2011-03-14 Paul Eggert * buffer.c (switch_to_buffer_1): Now static. diff --git a/src/buffer.c b/src/buffer.c index 99b4650bb60..b718bf3e576 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -3398,7 +3398,8 @@ void fix_start_end_in_overlays (register EMACS_INT start, register EMACS_INT end) { Lisp_Object overlay; - struct Lisp_Overlay *before_list, *after_list; + struct Lisp_Overlay *before_list IF_LINT (= NULL); + struct Lisp_Overlay *after_list IF_LINT (= NULL); /* These are either nil, indicating that before_list or after_list should be assigned, or the cons cell the cdr of which should be assigned. */ @@ -3546,7 +3547,7 @@ fix_overlays_before (struct buffer *bp, EMACS_INT prev, EMACS_INT pos) /* If parent is nil, replace overlays_before; otherwise, parent->next. */ struct Lisp_Overlay *tail = bp->overlays_before, *parent = NULL, *right_pair; Lisp_Object tem; - EMACS_INT end; + EMACS_INT end IF_LINT (= 0); /* After the insertion, the several overlays may be in incorrect order. The possibility is that, in the list `overlays_before', From 03d78a21befef9074bd85bba98968e9c25e022af Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:16:59 -0700 Subject: [PATCH 240/383] * filelock.c (within_one_second): Now static. --- src/ChangeLog | 2 ++ src/filelock.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index fae7e8a29c9..25935defc9b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Paul Eggert + * filelock.c (within_one_second): Now static. + * buffer.c (fix_overlays_before): Mark locals as initialized. (fix_start_end_in_overlays): Likewise. This function should be simplified by using pointers-to-pointers, but that's a different diff --git a/src/filelock.c b/src/filelock.c index 7f8f0e1c0fb..0e4cee3c844 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -382,7 +382,7 @@ lock_file_1 (char *lfname, int force) /* Return 1 if times A and B are no more than one second apart. */ -int +static int within_one_second (time_t a, time_t b) { return (a - b >= -1 && a - b <= 1); From b3dd38aba98f3521d164ef698d6b77b80d867fb8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:19:50 -0700 Subject: [PATCH 241/383] * filelock.c (lock_file_1): Rename local to avoid shadowing. --- src/ChangeLog | 1 + src/filelock.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 25935defc9b..0f6bd3dab9c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-15 Paul Eggert * filelock.c (within_one_second): Now static. + (lock_file_1): Rename local to avoid shadowing. * buffer.c (fix_overlays_before): Mark locals as initialized. (fix_start_end_in_overlays): Likewise. This function should be diff --git a/src/filelock.c b/src/filelock.c index 0e4cee3c844..2138eaa502b 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -344,13 +344,13 @@ static int lock_file_1 (char *lfname, int force) { register int err; - time_t boot_time; + time_t boot; const char *user_name; const char *host_name; char *lock_info_str; /* Call this first because it can GC. */ - boot_time = get_boot_time (); + boot = get_boot_time (); if (STRINGP (Fuser_login_name (Qnil))) user_name = SSDATA (Fuser_login_name (Qnil)); @@ -363,9 +363,9 @@ lock_file_1 (char *lfname, int force) lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) + LOCK_PID_MAX + 30); - if (boot_time) + if (boot) sprintf (lock_info_str, "%s@%s.%lu:%lu", user_name, host_name, - (unsigned long) getpid (), (unsigned long) boot_time); + (unsigned long) getpid (), (unsigned long) boot); else sprintf (lock_info_str, "%s@%s.%lu", user_name, host_name, (unsigned long) getpid ()); From 85876d07948fa6dba29b987c20eadd1b4c7aad1a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:22:56 -0700 Subject: [PATCH 242/383] * insdel.c (check_markers, make_gap_larger, make_gap_smaller): (reset_var_on_error, Fcombine_after_change_execute_1): Now static. --- src/ChangeLog | 3 +++ src/insdel.c | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0f6bd3dab9c..6717ce1489e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Paul Eggert + * insdel.c (check_markers, make_gap_larger, make_gap_smaller): + (reset_var_on_error, Fcombine_after_change_execute_1): Now static. + * filelock.c (within_one_second): Now static. (lock_file_1): Rename local to avoid shadowing. diff --git a/src/insdel.c b/src/insdel.c index bdf6aff1717..a429ae6a1e3 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -74,7 +74,7 @@ Lisp_Object Qinhibit_modification_hooks; check_markers (); \ else -void +static void check_markers (void) { register struct Lisp_Marker *tail; @@ -451,7 +451,7 @@ adjust_markers_for_replace (EMACS_INT from, EMACS_INT from_byte, /* Make the gap NBYTES_ADDED bytes longer. */ -void +static void make_gap_larger (EMACS_INT nbytes_added) { Lisp_Object tem; @@ -506,7 +506,7 @@ make_gap_larger (EMACS_INT nbytes_added) /* Make the gap NBYTES_REMOVED bytes shorter. */ -void +static void make_gap_smaller (EMACS_INT nbytes_removed) { Lisp_Object tem; @@ -2099,7 +2099,7 @@ prepare_to_modify_buffer (EMACS_INT start, EMACS_INT end, VARIABLE is the variable to maybe set to nil. NO-ERROR-FLAG is nil if there was an error, anything else meaning no error (so this function does nothing). */ -Lisp_Object +static Lisp_Object reset_var_on_error (Lisp_Object val) { if (NILP (XCDR (val))) @@ -2263,7 +2263,7 @@ signal_after_change (EMACS_INT charpos, EMACS_INT lendel, EMACS_INT lenins) unbind_to (count, Qnil); } -Lisp_Object +static Lisp_Object Fcombine_after_change_execute_1 (Lisp_Object val) { Vcombine_after_change_calls = val; From f0cb4a607918c065ebedfd62eb0187b0d49f67d6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:25:31 -0700 Subject: [PATCH 243/383] * insdel.c (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic. --- src/ChangeLog | 1 + src/insdel.c | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6717ce1489e..69d658eade2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * insdel.c (check_markers, make_gap_larger, make_gap_smaller): (reset_var_on_error, Fcombine_after_change_execute_1): Now static. + (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic. * filelock.c (within_one_second): Now static. (lock_file_1): Rename local to avoid shadowing. diff --git a/src/insdel.c b/src/insdel.c index a429ae6a1e3..18495e6c903 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -70,9 +70,12 @@ Lisp_Object combine_after_change_buffer; Lisp_Object Qinhibit_modification_hooks; #define CHECK_MARKERS() \ - if (check_markers_debug_flag) \ - check_markers (); \ - else + do \ + { \ + if (check_markers_debug_flag) \ + check_markers (); \ + } \ + while (0) static void check_markers (void) From 40ef059ee2a2cd7b4e3e75eef58c8ddcd2abb15f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:26:16 -0700 Subject: [PATCH 244/383] * insdel.c (copy_text): Remove unused local var. --- src/ChangeLog | 1 + src/insdel.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 69d658eade2..8bdf6881795 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * insdel.c (check_markers, make_gap_larger, make_gap_smaller): (reset_var_on_error, Fcombine_after_change_execute_1): Now static. (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic. + (copy_text): Remove unused local var. * filelock.c (within_one_second): Now static. (lock_file_1): Rename local to avoid shadowing. diff --git a/src/insdel.c b/src/insdel.c index 18495e6c903..ad3460f9a64 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -596,7 +596,6 @@ copy_text (const unsigned char *from_addr, unsigned char *to_addr, { EMACS_INT nchars = 0; EMACS_INT bytes_left = nbytes; - Lisp_Object tbl = Qnil; while (bytes_left > 0) { From b45db52287c1a23b2c639f4843395e4b5a4dbe92 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:32:33 -0700 Subject: [PATCH 245/383] * lisp.h (verify_bytepos, count_markers): New decls, so that gcc does not warn that these functions aren't declared. --- src/ChangeLog | 3 +++ src/lisp.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 8bdf6881795..c438f1fb41a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Paul Eggert + * lisp.h (verify_bytepos, count_markers): New decls, + so that gcc does not warn that these functions aren't declared. + * insdel.c (check_markers, make_gap_larger, make_gap_smaller): (reset_var_on_error, Fcombine_after_change_execute_1): Now static. (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic. diff --git a/src/lisp.h b/src/lisp.h index eacd68e42cb..3ba18186497 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2995,12 +2995,14 @@ extern EMACS_INT marker_byte_position (Lisp_Object); extern void clear_charpos_cache (struct buffer *); extern EMACS_INT charpos_to_bytepos (EMACS_INT); extern EMACS_INT buf_charpos_to_bytepos (struct buffer *, EMACS_INT); +extern EMACS_INT verify_bytepos (EMACS_INT charpos); extern EMACS_INT buf_bytepos_to_charpos (struct buffer *, EMACS_INT); extern void unchain_marker (struct Lisp_Marker *marker); extern Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object); extern Lisp_Object set_marker_both (Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT); extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT); +extern int count_markers (struct buffer *); extern void syms_of_marker (void); /* Defined in fileio.c */ From b4c3046a733bd68d98a13b0de6bfd3423e4d09ea Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:33:14 -0700 Subject: [PATCH 246/383] * marker.c (bytepos_to_charpos): Remove; unused. --- src/ChangeLog | 2 ++ src/marker.c | 12 +++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c438f1fb41a..bcc1f156e62 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Paul Eggert + * marker.c (bytepos_to_charpos): Remove; unused. + * lisp.h (verify_bytepos, count_markers): New decls, so that gcc does not warn that these functions aren't declared. diff --git a/src/marker.c b/src/marker.c index 72c564f420f..7d461099140 100644 --- a/src/marker.c +++ b/src/marker.c @@ -257,9 +257,10 @@ verify_bytepos (EMACS_INT charpos) return below_byte; } -/* bytepos_to_charpos returns the char position corresponding to BYTEPOS. */ +/* buf_bytepos_to_charpos returns the char position corresponding to + BYTEPOS. */ -/* This macro is a subroutine of bytepos_to_charpos. +/* This macro is a subroutine of buf_bytepos_to_charpos. It is used when BYTEPOS is actually the byte position. */ #define CONSIDER(BYTEPOS, CHARPOS) \ @@ -302,12 +303,6 @@ verify_bytepos (EMACS_INT charpos) } \ } -EMACS_INT -bytepos_to_charpos (EMACS_INT bytepos) -{ - return buf_bytepos_to_charpos (current_buffer, bytepos); -} - EMACS_INT buf_bytepos_to_charpos (struct buffer *b, EMACS_INT bytepos) { @@ -896,4 +891,3 @@ syms_of_marker (void) doc: /* Non-nil enables debugging checks in byte/char position conversions. */); byte_debug_flag = 0; } - From 5716756ee39eacd9bb08a20f46ac1424bf182f86 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:34:35 -0700 Subject: [PATCH 247/383] * minibuf.c (choose_minibuf_frame_1): Now static. --- src/ChangeLog | 2 ++ src/minibuf.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index bcc1f156e62..6354508250e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Paul Eggert + * minibuf.c (choose_minibuf_frame_1): Now static. + * marker.c (bytepos_to_charpos): Remove; unused. * lisp.h (verify_bytepos, count_markers): New decls, diff --git a/src/minibuf.c b/src/minibuf.c index 83587b53b73..caf41115305 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -135,7 +135,7 @@ choose_minibuf_frame (void) } } -Lisp_Object +static Lisp_Object choose_minibuf_frame_1 (Lisp_Object ignore) { choose_minibuf_frame (); From 62137a95f36f5d8b1d43e805811c8f7a15cb8f44 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:39:30 -0700 Subject: [PATCH 248/383] * minibuf.c (Ftry_completion, Fall_completions): Rename or remove locals to avoid shadowing. --- src/ChangeLog | 2 ++ src/minibuf.c | 42 ++++++++++++++++++++---------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6354508250e..2fb5e03ca96 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,8 @@ 2011-03-15 Paul Eggert * minibuf.c (choose_minibuf_frame_1): Now static. + (Ftry_completion, Fall_completions): Rename or remove locals + to avoid shadowing. * marker.c (bytepos_to_charpos): Remove; unused. diff --git a/src/minibuf.c b/src/minibuf.c index caf41115305..8ff861b2403 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1212,7 +1212,7 @@ is used to further constrain the set of candidates. */) && (!SYMBOLP (XCAR (collection)) || NILP (XCAR (collection))))) ? list_table : function_table)); - int index = 0, obsize = 0; + int idx = 0, obsize = 0; int matchcount = 0; int bindcount = -1; Lisp_Object bucket, zero, end, tem; @@ -1231,7 +1231,7 @@ is used to further constrain the set of candidates. */) { collection = check_obarray (collection); obsize = XVECTOR (collection)->size; - bucket = XVECTOR (collection)->contents[index]; + bucket = XVECTOR (collection)->contents[idx]; } while (1) @@ -1262,23 +1262,23 @@ is used to further constrain the set of candidates. */) else XSETFASTINT (bucket, 0); } - else if (++index >= obsize) + else if (++idx >= obsize) break; else { - bucket = XVECTOR (collection)->contents[index]; + bucket = XVECTOR (collection)->contents[idx]; continue; } } else /* if (type == hash_table) */ { - while (index < HASH_TABLE_SIZE (XHASH_TABLE (collection)) - && NILP (HASH_HASH (XHASH_TABLE (collection), index))) - index++; - if (index >= HASH_TABLE_SIZE (XHASH_TABLE (collection))) + while (idx < HASH_TABLE_SIZE (XHASH_TABLE (collection)) + && NILP (HASH_HASH (XHASH_TABLE (collection), idx))) + idx++; + if (idx >= HASH_TABLE_SIZE (XHASH_TABLE (collection))) break; else - elt = eltstring = HASH_KEY (XHASH_TABLE (collection), index++); + elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++); } /* Is this element a possible completion? */ @@ -1333,7 +1333,7 @@ is used to further constrain the set of candidates. */) tem = (type == hash_table ? call2 (predicate, elt, HASH_VALUE (XHASH_TABLE (collection), - index - 1)) + idx - 1)) : call1 (predicate, elt)); UNGCPRO; } @@ -1477,7 +1477,7 @@ with a space are ignored unless STRING itself starts with a space. */) : NILP (collection) || (CONSP (collection) && (!SYMBOLP (XCAR (collection)) || NILP (XCAR (collection)))); - int index = 0, obsize = 0; + int idx = 0, obsize = 0; int bindcount = -1; Lisp_Object bucket, tem, zero; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; @@ -1494,7 +1494,7 @@ with a space are ignored unless STRING itself starts with a space. */) { collection = check_obarray (collection); obsize = XVECTOR (collection)->size; - bucket = XVECTOR (collection)->contents[index]; + bucket = XVECTOR (collection)->contents[idx]; } while (1) @@ -1525,23 +1525,23 @@ with a space are ignored unless STRING itself starts with a space. */) else XSETFASTINT (bucket, 0); } - else if (++index >= obsize) + else if (++idx >= obsize) break; else { - bucket = XVECTOR (collection)->contents[index]; + bucket = XVECTOR (collection)->contents[idx]; continue; } } else /* if (type == 3) */ { - while (index < HASH_TABLE_SIZE (XHASH_TABLE (collection)) - && NILP (HASH_HASH (XHASH_TABLE (collection), index))) - index++; - if (index >= HASH_TABLE_SIZE (XHASH_TABLE (collection))) + while (idx < HASH_TABLE_SIZE (XHASH_TABLE (collection)) + && NILP (HASH_HASH (XHASH_TABLE (collection), idx))) + idx++; + if (idx >= HASH_TABLE_SIZE (XHASH_TABLE (collection))) break; else - elt = eltstring = HASH_KEY (XHASH_TABLE (collection), index++); + elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++); } /* Is this element a possible completion? */ @@ -1566,8 +1566,6 @@ with a space are ignored unless STRING itself starts with a space. */) { /* Yes. */ Lisp_Object regexps; - Lisp_Object zero; - XSETFASTINT (zero, 0); /* Ignore this element if it fails to match all the regexps. */ { @@ -1603,7 +1601,7 @@ with a space are ignored unless STRING itself starts with a space. */) GCPRO4 (tail, eltstring, allmatches, string); tem = type == 3 ? call2 (predicate, elt, - HASH_VALUE (XHASH_TABLE (collection), index - 1)) + HASH_VALUE (XHASH_TABLE (collection), idx - 1)) : call1 (predicate, elt); UNGCPRO; } From f14b7e14bb9284b6020431789ebc4c0dac1ef487 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 18:42:54 -0700 Subject: [PATCH 249/383] * fileio.c (file_name_as_directory, directory_file_name): (barf_or_query_if_file_exists, auto_save_error, auto_save_1): Now static. --- src/ChangeLog | 4 ++++ src/fileio.c | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2fb5e03ca96..1a7f0bbf7b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-15 Paul Eggert + * fileio.c (file_name_as_directory, directory_file_name): + (barf_or_query_if_file_exists, auto_save_error, auto_save_1): + Now static. + * minibuf.c (choose_minibuf_frame_1): Now static. (Ftry_completion, Fall_completions): Rename or remove locals to avoid shadowing. diff --git a/src/fileio.c b/src/fileio.c index 18e9dbe9680..e68fcbc65b5 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -433,7 +433,7 @@ get a current directory to run processes in. */) } -char * +static char * file_name_as_directory (char *out, char *in) { int size = strlen (in) - 1; @@ -496,7 +496,7 @@ For a Unix-syntax file name, just appends a slash. */) * Value is nonzero if the string output is different from the input. */ -int +static int directory_file_name (char *src, char *dst) { long slen; @@ -1734,7 +1734,7 @@ expand_and_dir_to_file (Lisp_Object filename, Lisp_Object defdir) If QUICK is nonzero, we ask for y or n, not yes or no. */ -void +static void barf_or_query_if_file_exists (Lisp_Object absname, const char *querystring, int interactive, struct stat *statptr, int quick) { @@ -5059,7 +5059,7 @@ An argument specifies the modification time value to use return Qnil; } -Lisp_Object +static Lisp_Object auto_save_error (Lisp_Object error) { Lisp_Object args[3], msg; @@ -5095,7 +5095,7 @@ auto_save_error (Lisp_Object error) return Qnil; } -Lisp_Object +static Lisp_Object auto_save_1 (void) { struct stat st; From 047b2bb9a27dc4f20a9e346782235efceedb7b9c Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Mon, 14 Mar 2011 22:36:07 -0400 Subject: [PATCH 250/383] * lisp/help-fns.el (variable-at-point): Skip leading quotes, if any (bug#8253). --- lisp/ChangeLog | 5 +++++ lisp/help-fns.el | 1 + 2 files changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e41e948ef29..6d80ed0f5bd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-15 Kevin Ryde + + * help-fns.el (variable-at-point): Skip leading quotes, if any + (bug#8253). + 2011-03-15 Stefan Monnier * emacs-lisp/bytecomp.el (byte-compile-save-excursion): Change the diff --git a/lisp/help-fns.el b/lisp/help-fns.el index e27a1e47b5c..ede80f858bf 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -534,6 +534,7 @@ If ANY-SYMBOL is non-nil, don't insist the symbol be bound." (with-syntax-table emacs-lisp-mode-syntax-table (or (condition-case () (save-excursion + (skip-chars-forward "'") (or (not (zerop (skip-syntax-backward "_w"))) (eq (char-syntax (following-char)) ?w) (eq (char-syntax (following-char)) ?_) From 49c5410a593ad8b162e5c4608e2210f839539f7f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 14 Mar 2011 22:42:31 -0400 Subject: [PATCH 251/383] * lisp/subr.el (read-char-choice): Only show the cursor after the prompt, not after the answer. --- lisp/ChangeLog | 5 +++++ lisp/subr.el | 36 ++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d80ed0f5bd..4bcb1117b1c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-15 Stefan Monnier + + * subr.el (read-char-choice): Only show the cursor after the prompt, + not after the answer. + 2011-03-15 Kevin Ryde * help-fns.el (variable-at-point): Skip leading quotes, if any diff --git a/lisp/subr.el b/lisp/subr.el index 3330fa20379..6f39a41709e 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2003,24 +2003,24 @@ If optional argument INHIBIT-KEYBOARD-QUIT is non-nil, ignore keyboard-quit events while waiting for a valid input." (unless (consp chars) (error "Called `read-char-choice' without valid char choices")) - (let ((cursor-in-echo-area t) - (executing-kbd-macro executing-kbd-macro) - char done) - (while (not done) - (unless (get-text-property 0 'face prompt) - (setq prompt (propertize prompt 'face 'minibuffer-prompt))) - (setq char (let ((inhibit-quit inhibit-keyboard-quit)) - (read-key prompt))) - (cond - ((not (numberp char))) - ((memq char chars) - (setq done t)) - ((and executing-kbd-macro (= char -1)) - ;; read-event returns -1 if we are in a kbd macro and - ;; there are no more events in the macro. Attempt to - ;; get an event interactively. - (setq executing-kbd-macro nil)))) - ;; Display the question with the answer. + (let (char done) + (let ((cursor-in-echo-area t) + (executing-kbd-macro executing-kbd-macro)) + (while (not done) + (unless (get-text-property 0 'face prompt) + (setq prompt (propertize prompt 'face 'minibuffer-prompt))) + (setq char (let ((inhibit-quit inhibit-keyboard-quit)) + (read-key prompt))) + (cond + ((not (numberp char))) + ((memq char chars) + (setq done t)) + ((and executing-kbd-macro (= char -1)) + ;; read-event returns -1 if we are in a kbd macro and + ;; there are no more events in the macro. Attempt to + ;; get an event interactively. + (setq executing-kbd-macro nil))))) + ;; Display the question with the answer. But without cursor-in-echo-area. (message "%s%s" prompt (char-to-string char)) char)) From aa2ebce9fc5b7c393d57be41db70d2b3cc087fb8 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 14 Mar 2011 22:44:17 -0400 Subject: [PATCH 252/383] * lisp/gnus/auth-source.el (auth-source-netrc-create): Use usual format for the default in prompts. --- lisp/gnus/ChangeLog | 53 ++++++++++++++++++++++------------------ lisp/gnus/auth-source.el | 20 +++++++++------ 2 files changed, 41 insertions(+), 32 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index af0bd1519c7..515a54cd491 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-03-15 Stefan Monnier + + * auth-source.el (auth-source-netrc-create): Use usual format for the + default in prompts. + 2011-03-13 Teodor Zlatanov * auth-source.el (auth-source-netrc-create): Show the default in the @@ -15,9 +20,9 @@ 2011-03-11 Teodor Zlatanov - * gnus-sync.el (gnus-sync-install-hooks, gnus-sync-unload-hook): Don't - install `gnus-sync-read' to any hooks by default. It's buggy. The - user will have to run `gnus-sync-read' manually and wait for Cloudy + * gnus-sync.el (gnus-sync-install-hooks, gnus-sync-unload-hook): + Don't install `gnus-sync-read' to any hooks by default. It's buggy. + The user will have to run `gnus-sync-read' manually and wait for Cloudy Gnus. 2011-03-11 Julien Danjou @@ -101,8 +106,8 @@ 2011-03-05 Antoine Levitt - * message.el (message-cite-reply-position, message-cite-style): New - variables. + * message.el (message-cite-reply-position, message-cite-style): + New variables. (message-yank-original): Use the new citation styles. 2011-03-04 Daiki Ueno @@ -216,14 +221,14 @@ 2011-02-23 Lars Ingebrigtsen - * gnus-start.el (gnus-dribble-read-file): Set - buffer-save-without-query, since we always want to save the dribble + * gnus-start.el (gnus-dribble-read-file): + Set buffer-save-without-query, since we always want to save the dribble file, probably. * nnmail.el (nnmail-article-group): Allow a final "" split to work on nnimap. - * gnus-sum.el (gnus-user-date-format-alist): Renamed back again from + * gnus-sum.el (gnus-user-date-format-alist): Rename back again from -summary- since it's a user-visible variable. * nnimap.el (nnimap-retrieve-group-data-early): Don't do QRESYNC the @@ -469,8 +474,8 @@ 2011-02-14 Teodor Zlatanov * auth-source.el (auth-source-backend-parse-parameters): Don't rely on - `plist-get' to accept non-list parameters (XEmacs issue). Fix - docstring. + `plist-get' to accept non-list parameters (XEmacs issue). + Fix docstring. (auth-source-secrets-search): Use `delete-dups', `append mapcar', and `butlast' instead of `remove-duplicates', `mapcan', and `subseq'. (auth-sources, auth-source-backend-parse, auth-source-secrets-search): @@ -510,8 +515,8 @@ 2011-02-13 Tassilo Horn (tiny change) - * nnimap.el (nnimap-request-accept-article, nnimap-process-quirk): Fix - Gcc processing on imap. + * nnimap.el (nnimap-request-accept-article, nnimap-process-quirk): + Fix Gcc processing on imap. 2011-02-10 Stefan Monnier @@ -599,8 +604,8 @@ 2011-02-06 Michael Albinus - * auth-source.el (top): Require 'eieio unconditionally. Autoload - `secrets-get-attributes' instead of `secrets-get-attribute'. + * auth-source.el (top): Require 'eieio unconditionally. + Autoload `secrets-get-attributes' instead of `secrets-get-attribute'. (auth-source-secrets-search): Limit search when `max' is greater than number of results. @@ -636,7 +641,7 @@ (auth-source-protocol-defaults, auth-source-user-or-password-imap) (auth-source-user-or-password-pop3, auth-source-user-or-password-ssh) (auth-source-user-or-password-sftp) - (auth-source-user-or-password-smtp): Removed. + (auth-source-user-or-password-smtp): Remove. (auth-source-user-or-password): Deprecated and modified to be a wrapper around `auth-source-search'. Not tested thoroughly. @@ -802,16 +807,16 @@ * gnus-group.el (gnus-group-jump-to-group): Allow jumping to groups that Gnus doesn't know exists again. - * gnus-art.el (gnus-article-date-lapsed-new-header): Removed. + * gnus-art.el (gnus-article-date-lapsed-new-header): Remove. (gnus-treat-date-ut): Ditto. - (gnus-article-update-date-header): Renamed. - (gnus-treat-date-local): Removed. - (gnus-treat-date-english): Removed. - (gnus-treat-date-lapsed): Removed. - (gnus-treat-date-combined-lapsed): Removed. - (gnus-treat-date-original): Removed. - (gnus-treat-date-iso8601): Removed. - (gnus-treat-date-user-defined): Removed. + (gnus-article-update-date-header): Rename. + (gnus-treat-date-local): Remove. + (gnus-treat-date-english): Remove. + (gnus-treat-date-lapsed): Remove. + (gnus-treat-date-combined-lapsed): Remove. + (gnus-treat-date-original): Remove. + (gnus-treat-date-iso8601): Remove. + (gnus-treat-date-user-defined): Remove. (gnus-article-date-headers): New variable to control all the date header options. (article-date-ut): Rewrite to allow using the new way to format date diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index 52f2b92e933..f703fbbd200 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -1093,17 +1093,19 @@ See `auth-source-search' for details on SPEC." (?h ,(aget printable-defaults 'host)) (?p ,(aget printable-defaults 'port)))))) - ;; store the data, prompting for the password if needed + ;; Store the data, prompting for the password if needed. (setq data (cond ((and (null data) (eq r 'secret)) - ;; special case prompt for passwords + ;; Special case prompt for passwords. (read-passwd prompt)) ((null data) (when default - (setq - prompt - (concat prompt (format "(default %s) " default)))) + (setq prompt + (if (string-match ": *\\'" prompt) + (concat (substring prompt 0 (match-beginning 0)) + " (default " default "): ") + (concat prompt "(default " default ") ")))) (read-string prompt nil nil default)) (t (or data default)))) @@ -1115,7 +1117,7 @@ See `auth-source-search' for details on SPEC." (lambda () data)) data)))) - ;; when r is not an empty string... + ;; When r is not an empty string... (when (and (stringp data) (< 0 (length data))) ;; this function is not strictly necessary but I think it @@ -1173,7 +1175,7 @@ Respects `auth-source-save-behavior'. Uses ;; we want the new data to be found first, so insert at beginning (goto-char (point-min)) - ;; ask AFTER we've successfully opened the file + ;; Ask AFTER we've successfully opened the file. (let ((prompt (format "Save auth info to file %s? " file)) (done (not (eq auth-source-save-behavior 'ask))) (bufname "*auth-source Help*") @@ -1190,6 +1192,8 @@ Respects `auth-source-save-behavior'. Uses "(N)o and don't ask to save again\n" "(e)dit the line\n" "(?) for help as you can see.\n")) + ;; Why? Doesn't with-output-to-temp-buffer already do + ;; the exact same thing anyway? --Stef (set-buffer standard-output) (help-mode)))) (?n (setq add "" @@ -1203,7 +1207,7 @@ Respects `auth-source-save-behavior'. Uses (when (get-buffer-window bufname) (delete-window (get-buffer-window bufname))) - ;; make sure the info is not saved + ;; Make sure the info is not saved. (when (null auth-source-save-behavior) (setq add "")) From c6eee9aa8d8a7dc5ec7469981a80d825554a5f6f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 14 Mar 2011 22:46:18 -0400 Subject: [PATCH 253/383] * lisp/allout.el (allout-abbreviate-flattened-numbering) (allout-mode-deactivate-hook): Fix up obsolescence "date". --- lisp/ChangeLog | 3 +++ lisp/allout.el | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4bcb1117b1c..b62d061fe7b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Stefan Monnier + * allout.el (allout-abbreviate-flattened-numbering) + (allout-mode-deactivate-hook): Fix up obsolescence "date". + * subr.el (read-char-choice): Only show the cursor after the prompt, not after the answer. diff --git a/lisp/allout.el b/lisp/allout.el index 91eaa28fdaf..a12101ea9a5 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -310,6 +310,7 @@ Auto-layout is not. With value nil, inhibit any automatic allout-mode activation." :set 'allout-auto-activation-helper + ;; FIXME: Using strings here is unusual and less efficient than symbols. :type '(choice (const :tag "On" t) (const :tag "Ask about layout" "ask") (const :tag "Mode only" "activate") @@ -752,7 +753,7 @@ Set this var to the bullet you want to use for file cross-references." ;;;_ = allout-flattened-numbering-abbreviation (define-obsolete-variable-alias 'allout-abbreviate-flattened-numbering - 'allout-flattened-numbering-abbreviation "24.0") + 'allout-flattened-numbering-abbreviation "24.1") (defcustom allout-flattened-numbering-abbreviation nil "If non-nil, `allout-flatten-exposed-to-buffer' abbreviates topic numbers to minimal amount with some context. Otherwise, entire @@ -1402,7 +1403,7 @@ their settings before allout-mode was started." (defvar allout-mode-deactivate-hook nil "*Hook that's run when allout mode ends.") (define-obsolete-variable-alias 'allout-mode-deactivate-hook - 'allout-mode-off-hook "future") + 'allout-mode-off-hook "24.1") ;;;_ = allout-exposure-category (defvar allout-exposure-category nil "Symbol for use as allout invisible-text overlay category.") From 2893f1463d31f84556a78b1a714f2427064caf78 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 19:46:32 -0700 Subject: [PATCH 254/383] * fileio.c (file_name_as_directory): Use const pointers when appropriate. (Fexpand_file_name): Likewise. In particular, newdir might point at constant storage, so make it a const pointer. --- src/ChangeLog | 3 +++ src/fileio.c | 40 ++++++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1a7f0bbf7b0..9393cec02a9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,9 @@ * fileio.c (file_name_as_directory, directory_file_name): (barf_or_query_if_file_exists, auto_save_error, auto_save_1): Now static. + (file_name_as_directory): Use const pointers when appropriate. + (Fexpand_file_name): Likewise. In particular, newdir might + point at constant storage, so make it a const pointer. * minibuf.c (choose_minibuf_frame_1): Now static. (Ftry_completion, Fall_completions): Rename or remove locals diff --git a/src/fileio.c b/src/fileio.c index e68fcbc65b5..4b25d08f20d 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -434,7 +434,7 @@ get a current directory to run processes in. */) static char * -file_name_as_directory (char *out, char *in) +file_name_as_directory (char *out, const char *in) { int size = strlen (in) - 1; @@ -728,7 +728,8 @@ filesystem tree, not (expand-file-name ".." dirname). */) { /* These point to SDATA and need to be careful with string-relocation during GC (via DECODE_FILE). */ - char *nm, *newdir; + char *nm; + const char *newdir; /* This should only point to alloca'd data. */ char *target; @@ -1013,21 +1014,23 @@ filesystem tree, not (expand-file-name ".." dirname). */) if (!newdir && drive) { /* Get default directory if needed to make nm absolute. */ + char *adir = NULL; if (!IS_DIRECTORY_SEP (nm[0])) { - newdir = alloca (MAXPATHLEN + 1); - if (!getdefdir (toupper (drive) - 'A' + 1, newdir)) - newdir = NULL; + adir = alloca (MAXPATHLEN + 1); + if (!getdefdir (toupper (drive) - 'A' + 1, adir)) + adir = NULL; } - if (!newdir) + if (!adir) { /* Either nm starts with /, or drive isn't mounted. */ - newdir = alloca (4); - newdir[0] = DRIVE_LETTER (drive); - newdir[1] = ':'; - newdir[2] = '/'; - newdir[3] = 0; + adir = alloca (4); + adir[0] = DRIVE_LETTER (drive); + adir[1] = ':'; + adir[2] = '/'; + adir[3] = 0; } + newdir = adir; } #endif /* DOS_NT */ @@ -1074,7 +1077,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) when we have pointers into lisp strings, we accomplish this indirectly by prepending newdir to nm if necessary, and using cwd (or the wd of newdir's drive) as the new newdir. */ - + char *adir; if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1])) { drive = (unsigned char) newdir[0]; @@ -1087,14 +1090,15 @@ filesystem tree, not (expand-file-name ".." dirname). */) strcat (tmp, nm); nm = tmp; } - newdir = alloca (MAXPATHLEN + 1); + adir = alloca (MAXPATHLEN + 1); if (drive) { - if (!getdefdir (toupper (drive) - 'A' + 1, newdir)) + if (!getdefdir (toupper (drive) - 'A' + 1, adir)) newdir = "/"; } else - getwd (newdir); + getwd (adir); + newdir = adir; } /* Strip off drive name from prefix, if present. */ @@ -1111,13 +1115,13 @@ filesystem tree, not (expand-file-name ".." dirname). */) #ifdef WINDOWSNT if (IS_DIRECTORY_SEP (newdir[0]) && IS_DIRECTORY_SEP (newdir[1])) { - char *p; - newdir = strcpy (alloca (strlen (newdir) + 1), newdir); - p = newdir + 2; + char *adir = strcpy (alloca (strlen (newdir) + 1), newdir); + char *p = adir + 2; while (*p && !IS_DIRECTORY_SEP (*p)) p++; p++; while (*p && !IS_DIRECTORY_SEP (*p)) p++; *p = 0; + newdir = adir; } else #endif From fd4ead52062abcb8d8356595708229d83021f042 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 19:48:24 -0700 Subject: [PATCH 255/383] * fileio.c (Fmake_directory_internal, Fread_file_name): Remove unused vars. --- src/ChangeLog | 1 + src/fileio.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9393cec02a9..567fe22a941 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,6 +6,7 @@ (file_name_as_directory): Use const pointers when appropriate. (Fexpand_file_name): Likewise. In particular, newdir might point at constant storage, so make it a const pointer. + (Fmake_directory_internal, Fread_file_name): Remove unused vars. * minibuf.c (choose_minibuf_frame_1): Now static. (Ftry_completion, Fall_completions): Rename or remove locals diff --git a/src/fileio.c b/src/fileio.c index 4b25d08f20d..b99311445b3 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2045,7 +2045,6 @@ DEFUN ("delete-directory-internal", Fdelete_directory_internal, (Lisp_Object directory) { const char *dir; - Lisp_Object handler; Lisp_Object encoded_dir; CHECK_STRING (directory); @@ -5430,7 +5429,7 @@ before any other event (mouse or keypress) is handled. */) Lisp_Object Fread_file_name (Lisp_Object prompt, Lisp_Object dir, Lisp_Object default_filename, Lisp_Object mustmatch, Lisp_Object initial, Lisp_Object predicate) { - struct gcpro gcpro1, gcpro2; + struct gcpro gcpro1; Lisp_Object args[7]; GCPRO1 (default_filename); From b14aac08d08c5f17dc27e8d2cc1cc76b33e92c62 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 19:50:36 -0700 Subject: [PATCH 256/383] * fileio.c (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer signedness issues. --- src/ChangeLog | 2 ++ src/fileio.c | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 567fe22a941..aa21fb17c85 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,8 @@ (Fexpand_file_name): Likewise. In particular, newdir might point at constant storage, so make it a const pointer. (Fmake_directory_internal, Fread_file_name): Remove unused vars. + (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer + signedness issues. * minibuf.c (choose_minibuf_frame_1): Now static. (Ftry_completion, Fall_completions): Rename or remove locals diff --git a/src/fileio.c b/src/fileio.c index b99311445b3..b4e28702029 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2756,7 +2756,7 @@ if file does not exist, is not accessible, or SELinux is disabled */) #if HAVE_LIBSELINUX if (is_selinux_enabled ()) { - conlength = lgetfilecon (SDATA (absname), &con); + conlength = lgetfilecon (SSDATA (absname), &con); if (conlength > 0) { context = context_new (con); @@ -2811,34 +2811,35 @@ is disabled. */) if (is_selinux_enabled ()) { /* Get current file context. */ - conlength = lgetfilecon (SDATA (encoded_absname), &con); + conlength = lgetfilecon (SSDATA (encoded_absname), &con); if (conlength > 0) { parsed_con = context_new (con); /* Change the parts defined in the parameter.*/ if (STRINGP (user)) { - if (context_user_set (parsed_con, SDATA (user))) + if (context_user_set (parsed_con, SSDATA (user))) error ("Doing context_user_set"); } if (STRINGP (role)) { - if (context_role_set (parsed_con, SDATA (role))) + if (context_role_set (parsed_con, SSDATA (role))) error ("Doing context_role_set"); } if (STRINGP (type)) { - if (context_type_set (parsed_con, SDATA (type))) + if (context_type_set (parsed_con, SSDATA (type))) error ("Doing context_type_set"); } if (STRINGP (range)) { - if (context_range_set (parsed_con, SDATA (range))) + if (context_range_set (parsed_con, SSDATA (range))) error ("Doing context_range_set"); } /* Set the modified context back to the file. */ - fail = lsetfilecon (SDATA (encoded_absname), context_str (parsed_con)); + fail = lsetfilecon (SSDATA (encoded_absname), + context_str (parsed_con)); if (fail) report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); From f839df0cf5882909c0f6424455abed586f125987 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 20:17:20 -0700 Subject: [PATCH 257/383] * fileio.c: (Fset_file_times, Finsert_file_contents, auto_save_error): Rename locals to avoid shadowing. --- src/ChangeLog | 2 ++ src/fileio.c | 39 ++++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index aa21fb17c85..c84c2397810 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -9,6 +9,8 @@ (Fmake_directory_internal, Fread_file_name): Remove unused vars. (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer signedness issues. + (Fset_file_times, Finsert_file_contents, auto_save_error): + Rename locals to avoid shadowing. * minibuf.c (choose_minibuf_frame_1): Now static. (Ftry_completion, Fall_completions): Rename or remove locals diff --git a/src/fileio.c b/src/fileio.c index b4e28702029..826f2c18fbf 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2941,19 +2941,19 @@ The value is an integer. */) DEFUN ("set-file-times", Fset_file_times, Sset_file_times, 1, 2, 0, - doc: /* Set times of file FILENAME to TIME. + doc: /* Set times of file FILENAME to TIMESTAMP. Set both access and modification times. Return t on success, else nil. -Use the current time if TIME is nil. TIME is in the format of +Use the current time if TIMESTAMP is nil. TIMESTAMP is in the format of `current-time'. */) - (Lisp_Object filename, Lisp_Object time) + (Lisp_Object filename, Lisp_Object timestamp) { Lisp_Object absname, encoded_absname; Lisp_Object handler; time_t sec; int usec; - if (! lisp_time_argument (time, &sec, &usec)) + if (! lisp_time_argument (timestamp, &sec, &usec)) error ("Invalid time specification"); absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); @@ -2962,7 +2962,7 @@ Use the current time if TIME is nil. TIME is in the format of call the corresponding file handler. */ handler = Ffind_file_name_handler (absname, Qset_file_times); if (!NILP (handler)) - return call3 (handler, Qset_file_times, absname, time); + return call3 (handler, Qset_file_times, absname, timestamp); encoded_absname = ENCODE_FILE (absname); @@ -3358,13 +3358,13 @@ variable `last-coding-system-used' to the coding system actually used. */) else if (nread > 0) { struct buffer *prev = current_buffer; - Lisp_Object buffer; + Lisp_Object workbuf; struct buffer *buf; record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); - buffer = Fget_buffer_create (build_string (" *code-converting-work*")); - buf = XBUFFER (buffer); + workbuf = Fget_buffer_create (build_string (" *code-converting-work*")); + buf = XBUFFER (workbuf); delete_all_overlays (buf); BVAR (buf, directory) = BVAR (current_buffer, directory); @@ -3876,7 +3876,7 @@ variable `last-coding-system-used' to the coding system actually used. */) if (not_regular) { - Lisp_Object val; + Lisp_Object nbytes; /* Maybe make more room. */ if (gap_size < trytry) @@ -3891,15 +3891,16 @@ variable `last-coding-system-used' to the coding system actually used. */) non_regular_fd = fd; non_regular_inserted = inserted; non_regular_nbytes = trytry; - val = internal_condition_case_1 (read_non_regular, Qnil, Qerror, - read_non_regular_quit); - if (NILP (val)) + nbytes = internal_condition_case_1 (read_non_regular, + Qnil, Qerror, + read_non_regular_quit); + if (NILP (nbytes)) { read_quit = 1; break; } - this = XINT (val); + this = XINT (nbytes); } else { @@ -3990,7 +3991,7 @@ variable `last-coding-system-used' to the coding system actually used. */) care of marker adjustment. By this way, we can run Lisp program safely before decoding the inserted text. */ Lisp_Object unwind_data; - int count = SPECPDL_INDEX (); + int count1 = SPECPDL_INDEX (); unwind_data = Fcons (BVAR (current_buffer, enable_multibyte_characters), Fcons (BVAR (current_buffer, undo_list), @@ -4017,7 +4018,7 @@ variable `last-coding-system-used' to the coding system actually used. */) if (CONSP (coding_system)) coding_system = XCAR (coding_system); } - unbind_to (count, Qnil); + unbind_to (count1, Qnil); inserted = Z_BYTE - BEG_BYTE; } @@ -4120,7 +4121,7 @@ variable `last-coding-system-used' to the coding system actually used. */) if (inserted > 0) { /* Don't run point motion or modification hooks when decoding. */ - int count = SPECPDL_INDEX (); + int count1 = SPECPDL_INDEX (); EMACS_INT old_inserted = inserted; specbind (Qinhibit_point_motion_hooks, Qt); specbind (Qinhibit_modification_hooks, Qt); @@ -4232,7 +4233,7 @@ variable `last-coding-system-used' to the coding system actually used. */) Otherwise start with an empty undo_list. */ BVAR (current_buffer, undo_list) = EQ (old_undo, Qt) ? Qt : Qnil; - unbind_to (count, Qnil); + unbind_to (count1, Qnil); } /* Call after-change hooks for the inserted text, aside from the case @@ -5064,7 +5065,7 @@ An argument specifies the modification time value to use } static Lisp_Object -auto_save_error (Lisp_Object error) +auto_save_error (Lisp_Object error_val) { Lisp_Object args[3], msg; int i, nbytes; @@ -5078,7 +5079,7 @@ auto_save_error (Lisp_Object error) args[0] = build_string ("Auto-saving %s: %s"); args[1] = BVAR (current_buffer, name); - args[2] = Ferror_message_string (error); + args[2] = Ferror_message_string (error_val); msg = Fformat (3, args); GCPRO1 (msg); nbytes = SBYTES (msg); From 4a6bea268fbac2fd64018374652f5b2c9b04b4fd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 14 Mar 2011 20:59:26 -0700 Subject: [PATCH 258/383] * dired.c (directory_files_internal_unwind): Now static. --- src/ChangeLog | 2 ++ src/dired.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index c84c2397810..7468af4c725 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Paul Eggert + * dired.c (directory_files_internal_unwind): Now static. + * fileio.c (file_name_as_directory, directory_file_name): (barf_or_query_if_file_exists, auto_save_error, auto_save_1): Now static. diff --git a/src/dired.c b/src/dired.c index d201418d78b..7891fc5f4a1 100644 --- a/src/dired.c +++ b/src/dired.c @@ -102,7 +102,7 @@ directory_files_internal_w32_unwind (Lisp_Object arg) } #endif -Lisp_Object +static Lisp_Object directory_files_internal_unwind (Lisp_Object dh) { DIR *d = (DIR *) XSAVE_VALUE (dh)->pointer; From 15206ed9236f4957cb62a0cfbd5397cf8f0cb76b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 00:04:00 -0700 Subject: [PATCH 259/383] Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254). An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in dired.c's scmp function, had undefined behavior. * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP): (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ... * buffer.h: ... to here, because these macros use current_buffer, and the new implementation with inline functions needs to have current_buffer in scope now, rather than later when the macros are used. (downcase, upcase1): New static inline functions. (DOWNCASE, UPCASE1): Reimplement using these functions. This avoids undefined behavior in expressions like DOWNCASE (x) == DOWNCASE (y), which previously suffered from race conditions in accessing the global variables case_temp1 and case_temp2. * casetab.c (case_temp1, case_temp2): Remove; no longer needed. * lisp.h (case_temp1, case_temp2): Remove their decls. * character.h (ASCII_CHAR_P): Move from here ... * lisp.h: ... to here, so that the inline functions mentioned above can use them. --- src/ChangeLog | 21 +++++++++++++++++++++ src/buffer.h | 43 +++++++++++++++++++++++++++++++++++++++++++ src/casetab.c | 6 ------ src/character.h | 3 --- src/lisp.h | 47 +++-------------------------------------------- 5 files changed, 67 insertions(+), 53 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7468af4c725..7e873e3d85d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,26 @@ 2011-03-15 Paul Eggert + Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254). + An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in + dired.c's scmp function, had undefined behavior. + * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP): + (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ... + * buffer.h: ... to here, because these macros use current_buffer, + and the new implementation with inline functions needs to have + current_buffer in scope now, rather than later when the macros + are used. + (downcase, upcase1): New static inline functions. + (DOWNCASE, UPCASE1): Reimplement using these functions. + This avoids undefined behavior in expressions like + DOWNCASE (x) == DOWNCASE (y), which previously suffered + from race conditions in accessing the global variables + case_temp1 and case_temp2. + * casetab.c (case_temp1, case_temp2): Remove; no longer needed. + * lisp.h (case_temp1, case_temp2): Remove their decls. + * character.h (ASCII_CHAR_P): Move from here ... + * lisp.h: ... to here, so that the inline functions mentioned + above can use them. + * dired.c (directory_files_internal_unwind): Now static. * fileio.c (file_name_as_directory, directory_file_name): diff --git a/src/buffer.h b/src/buffer.h index 0975d2e3adc..996e4e59c27 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -1026,4 +1026,47 @@ extern int last_per_buffer_idx; #define PER_BUFFER_VALUE(BUFFER, OFFSET) \ (*(Lisp_Object *)((OFFSET) + (char *) (BUFFER))) + +/* Current buffer's map from characters to lower-case characters. */ +#define DOWNCASE_TABLE BVAR (current_buffer, downcase_table) + +/* Current buffer's map from characters to upper-case characters. */ + +#define UPCASE_TABLE BVAR (current_buffer, upcase_table) + +/* Downcase a character, or make no change if that cannot be done. */ + +static inline EMACS_INT +downcase (int ch) +{ + Lisp_Object down = CHAR_TABLE_REF (DOWNCASE_TABLE, ch); + return NATNUMP (down) ? XFASTINT (down) : ch; +} +#define DOWNCASE(CH) downcase (CH) + +/* 1 if CH is upper case. */ + +#define UPPERCASEP(CH) (DOWNCASE (CH) != (CH)) + +/* 1 if CH is neither upper nor lower case. */ + +#define NOCASEP(CH) (UPCASE1 (CH) == (CH)) + +/* 1 if CH is lower case. */ + +#define LOWERCASEP(CH) (!UPPERCASEP (CH) && !NOCASEP(CH)) + +/* Upcase a character, or make no change if that cannot be done. */ + +#define UPCASE(CH) (!UPPERCASEP (CH) ? UPCASE1 (CH) : (CH)) + +/* Upcase a character known to be not upper case. */ + +static inline EMACS_INT +upcase1 (int ch) +{ + Lisp_Object up = CHAR_TABLE_REF (UPCASE_TABLE, ch); + return NATNUMP (up) ? XFASTINT (up) : ch; +} +#define UPCASE1(CH) upcase1 (CH) diff --git a/src/casetab.c b/src/casetab.c index 5207e5315ae..56f6b065358 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -28,11 +28,6 @@ Lisp_Object Qcase_table_p, Qcase_table; Lisp_Object Vascii_downcase_table, Vascii_upcase_table; Lisp_Object Vascii_canon_table, Vascii_eqv_table; -/* Used as a temporary in DOWNCASE and other macros in lisp.h. No - need to mark it, since it is used only very temporarily. */ -int case_temp1; -Lisp_Object case_temp2; - static void set_canon (Lisp_Object case_table, Lisp_Object range, Lisp_Object elt); static void set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt); static void shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt); @@ -302,4 +297,3 @@ syms_of_casetab (void) defsubr (&Sset_case_table); defsubr (&Sset_standard_case_table); } - diff --git a/src/character.h b/src/character.h index d29ab41557b..6d5b8110109 100644 --- a/src/character.h +++ b/src/character.h @@ -128,9 +128,6 @@ along with GNU Emacs. If not, see . */ XSETCDR ((x), tmp); \ } while (0) -/* Nonzero iff C is an ASCII character. */ -#define ASCII_CHAR_P(c) ((unsigned) (c) < 0x80) - /* Nonzero iff C is a character of code less than 0x100. */ #define SINGLE_BYTE_CHAR_P(c) ((unsigned) (c) < 0x100) diff --git a/src/lisp.h b/src/lisp.h index 3ba18186497..15c13e0467b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -841,6 +841,9 @@ struct Lisp_Vector #endif /* not __GNUC__ */ +/* Nonzero iff C is an ASCII character. */ +#define ASCII_CHAR_P(c) ((unsigned) (c) < 0x80) + /* Almost equivalent to Faref (CT, IDX) with optimization for ASCII characters. Do not check validity of CT. */ #define CHAR_TABLE_REF(CT, IDX) \ @@ -2041,50 +2044,6 @@ extern int pending_signals; #define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) -/* Variables used locally in the following case handling macros. */ -extern int case_temp1; -extern Lisp_Object case_temp2; - -/* Current buffer's map from characters to lower-case characters. */ - -#define DOWNCASE_TABLE BVAR (current_buffer, downcase_table) - -/* Current buffer's map from characters to upper-case characters. */ - -#define UPCASE_TABLE BVAR (current_buffer, upcase_table) - -/* Downcase a character, or make no change if that cannot be done. */ - -#define DOWNCASE(CH) \ - ((case_temp1 = (CH), \ - case_temp2 = CHAR_TABLE_REF (DOWNCASE_TABLE, case_temp1), \ - NATNUMP (case_temp2)) \ - ? XFASTINT (case_temp2) : case_temp1) - -/* 1 if CH is upper case. */ - -#define UPPERCASEP(CH) (DOWNCASE (CH) != (CH)) - -/* 1 if CH is neither upper nor lower case. */ - -#define NOCASEP(CH) (UPCASE1 (CH) == (CH)) - -/* 1 if CH is lower case. */ - -#define LOWERCASEP(CH) (!UPPERCASEP (CH) && !NOCASEP(CH)) - -/* Upcase a character, or make no change if that cannot be done. */ - -#define UPCASE(CH) (!UPPERCASEP (CH) ? UPCASE1 (CH) : (CH)) - -/* Upcase a character known to be not upper case. */ - -#define UPCASE1(CH) \ - ((case_temp1 = (CH), \ - case_temp2 = CHAR_TABLE_REF (UPCASE_TABLE, case_temp1), \ - NATNUMP (case_temp2)) \ - ? XFASTINT (case_temp2) : case_temp1) - extern Lisp_Object Vascii_downcase_table, Vascii_upcase_table; extern Lisp_Object Vascii_canon_table, Vascii_eqv_table; From 38b2c0769fbfc40162fc8c39170fcb28bcf69520 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 01:38:32 -0700 Subject: [PATCH 260/383] * dired.c (directory_files_internal, file_name_completion): Rename locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/dired.c | 34 +++++++++++++++++----------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7e873e3d85d..6355d81ba40 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Paul Eggert + * dired.c (directory_files_internal, file_name_completion): + Rename locals to avoid shadowing. + Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254). An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in dired.c's scmp function, had undefined behavior. diff --git a/src/dired.c b/src/dired.c index 7891fc5f4a1..4080e1711e0 100644 --- a/src/dired.c +++ b/src/dired.c @@ -233,11 +233,11 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m int len; int wanted = 0; Lisp_Object name, finalname; - struct gcpro gcpro1, gcpro2; + struct gcpro inner_gcpro1, inner_gcpro2; len = NAMLEN (dp); name = finalname = make_unibyte_string (dp->d_name, len); - GCPRO2 (finalname, name); + GCPRO2_VAR (finalname, name, inner_gcpro); /* Note: DECODE_FILE can GC; it should protect its argument, though. */ @@ -293,23 +293,23 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m /* Construct an expanded filename for the directory entry. Use the decoded names for input to Ffile_attributes. */ Lisp_Object decoded_fullname, fileattrs; - struct gcpro gcpro1, gcpro2; + struct gcpro innermost_gcpro1, innermost_gcpro2; decoded_fullname = fileattrs = Qnil; - GCPRO2 (decoded_fullname, fileattrs); + GCPRO2_VAR (decoded_fullname, fileattrs, innermost_gcpro); /* Both Fexpand_file_name and Ffile_attributes can GC. */ decoded_fullname = Fexpand_file_name (name, directory); fileattrs = Ffile_attributes (decoded_fullname, id_format); list = Fcons (Fcons (finalname, fileattrs), list); - UNGCPRO; + UNGCPRO_VAR (innermost_gcpro); } else list = Fcons (finalname, list); } - UNGCPRO; + UNGCPRO_VAR (inner_gcpro); } } @@ -676,11 +676,11 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v if (!NILP (predicate)) { Lisp_Object val; - struct gcpro gcpro1; + struct gcpro inner_gcpro1; - GCPRO1 (name); + GCPRO1_VAR (name, inner_gcpro); val = call1 (predicate, name); - UNGCPRO; + UNGCPRO_VAR (inner_gcpro); if (NILP (val)) continue; @@ -702,16 +702,16 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v Lisp_Object zero = make_number (0); /* FIXME: This is a copy of the code in Ftry_completion. */ int compare = min (bestmatchsize, SCHARS (name)); - Lisp_Object tem + Lisp_Object cmp = Fcompare_strings (bestmatch, zero, make_number (compare), name, zero, make_number (compare), completion_ignore_case ? Qt : Qnil); int matchsize - = (EQ (tem, Qt) ? compare - : XINT (tem) < 0 ? - XINT (tem) - 1 - : XINT (tem) - 1); + = (EQ (cmp, Qt) ? compare + : XINT (cmp) < 0 ? - XINT (cmp) - 1 + : XINT (cmp) - 1); if (completion_ignore_case) { @@ -735,18 +735,18 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v (((matchsize == SCHARS (name)) == (matchsize + !!directoryp == SCHARS (bestmatch))) - && (tem = Fcompare_strings (name, zero, + && (cmp = Fcompare_strings (name, zero, make_number (SCHARS (file)), file, zero, Qnil, Qnil), - EQ (Qt, tem)) - && (tem = Fcompare_strings (bestmatch, zero, + EQ (Qt, cmp)) + && (cmp = Fcompare_strings (bestmatch, zero, make_number (SCHARS (file)), file, zero, Qnil, Qnil), - ! EQ (Qt, tem)))) + ! EQ (Qt, cmp)))) bestmatch = name; } bestmatchsize = matchsize; From 1e6603953ad85904ce6db6d6b5e319f0335d534b Mon Sep 17 00:00:00 2001 From: Teodor Zlatanov Date: Tue, 15 Mar 2011 12:10:36 +0000 Subject: [PATCH 261/383] message.el (message-yank-original): Use cond instead of CL case. --- lisp/gnus/ChangeLog | 4 ++++ lisp/gnus/message.el | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 515a54cd491..a30f5fac4ad 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2011-03-15 Teodor Zlatanov + + * message.el (message-yank-original): Use cond instead of CL case. + 2011-03-15 Stefan Monnier * auth-source.el (auth-source-netrc-create): Use usual format for the diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 08c59b00bfc..f0ae6358431 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3748,13 +3748,13 @@ prefix, and don't delete any headers." (goto-char (mark t)) (insert-before-markers ?\n) (goto-char pt)))) - (case message-cite-reply-position - ('above + (cond + ((eq 'above message-cite-reply-position) (message-goto-body) (insert body-text) (insert (if (bolp) "\n" "\n\n")) (message-goto-body)) - ('below + ((eq 'below message-cite-reply-position) (message-goto-signature))) ;; Add a `message-setup-very-last-hook' here? ;; Add `gnus-article-highlight-citation' here? From d72700e549c5006c24f368f6c35db0464593b1f0 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 15 Mar 2011 12:21:30 -0400 Subject: [PATCH 262/383] * lisp/startup.el (command-line): Update package subdirectory regexp. --- lisp/ChangeLog | 4 ++++ lisp/startup.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b62d061fe7b..f09c5fa9d9e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-15 Chong Yidong + + * startup.el (command-line): Update package subdirectory regexp. + 2011-03-15 Stefan Monnier * allout.el (allout-abbreviate-flattened-numbering) diff --git a/lisp/startup.el b/lisp/startup.el index 384d81391ab..2bdb6fef505 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1191,7 +1191,7 @@ the `--debug-init' option to view a complete error backtrace." (dolist (subdir (directory-files dir)) (when (and (file-directory-p (expand-file-name subdir dir)) ;; package-subdirectory-regexp from package.el - (string-match "^\\([^.].*\\)-\\([0-9]+\\(?:[.][0-9]+\\)*\\)$" + (string-match "\\`\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)\\'" subdir)) (throw 'package-dir-found t))))))) (package-initialize)) From 7082eac6799bba5ebd39417c40c810ed0672c7d9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 10:13:02 -0700 Subject: [PATCH 263/383] * lisp.h: New macros GCPRO2_VAR, GCPRO3_VAR, etc. --- src/ChangeLog | 9 +++ src/keyboard.c | 10 +-- src/lisp.h | 204 ++++++++++++++++++++++++++----------------------- src/xfns.c | 8 +- 4 files changed, 127 insertions(+), 104 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6355d81ba40..40ba15de954 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2011-03-15 Paul Eggert + * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR): + New macros, so that the caller can use some names other than + gcpro1, gcpro2, etc. + (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms + of the new macros. + (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second + argument, for consistency with GCPRO2_VAR, etc: it is now the + prefix of the variable, not the variable itself. All uses + changed. * dired.c (directory_files_internal, file_name_completion): Rename locals to avoid shadowing. diff --git a/src/keyboard.c b/src/keyboard.c index 05b6abe97b3..2a2e24f3b1b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2942,7 +2942,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event keys = Fcopy_sequence (this_command_keys); else keys = Qnil; - GCPRO1_VAR (keys, inner_gcpro1); + GCPRO1_VAR (keys, inner_gcpro); /* Clear out this_command_keys. */ this_command_key_count = 0; @@ -2980,7 +2980,7 @@ read_char (int commandflag, int nmaps, Lisp_Object *maps, Lisp_Object prev_event if (saved_immediate_echo) echo_now (); - UNGCPRO_VAR (inner_gcpro1); + UNGCPRO_VAR (inner_gcpro); /* The input method can return no events. */ if (! CONSP (tem)) @@ -8963,7 +8963,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, struct gcpro outer_gcpro1; - GCPRO1_VAR (fake_prefixed_keys, outer_gcpro1); + GCPRO1_VAR (fake_prefixed_keys, outer_gcpro); raw_keybuf_count = 0; last_nonmenu_event = Qnil; @@ -9258,7 +9258,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, if (EQ (key, Qt)) { unbind_to (count, Qnil); - UNGCPRO_VAR (outer_gcpro1); + UNGCPRO_VAR (outer_gcpro); return -1; } @@ -9941,7 +9941,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, add_command_key (keybuf[t]); } - UNGCPRO_VAR (outer_gcpro1); + UNGCPRO_VAR (outer_gcpro); return t; } diff --git a/src/lisp.h b/src/lisp.h index 15c13e0467b..ddaf0438b00 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2109,129 +2109,143 @@ struct gcpro || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) -#define GCPRO1(varname) GCPRO1_VAR (varname, gcpro1) -#define UNGCPRO UNGCPRO_VAR (gcpro1) +#define GCPRO1(var) \ + GCPRO1_VAR (var, gcpro) +#define GCPRO2(var1, var2) \ + GCPRO2_VAR (var1, var2, gcpro) +#define GCPRO3(var1, var2, var3) \ + GCPRO3_VAR (var1, var2, var3, gcpro) +#define GCPRO4(var1, var2, var3, var4) \ + GCPRO4_VAR (var1, var2, var3, var4, gcpro) +#define GCPRO5(var1, var2, var3, var4, var5) \ + GCPRO5_VAR (var1, var2, var3, var4, var5, gcpro) +#define GCPRO6(var1, var2, var3, var4, var5, var6) \ + GCPRO6_VAR (var1, var2, var3, var4, var5, var6, gcpro) +#define UNGCPRO UNGCPRO_VAR (gcpro) #if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS /* Do something silly with gcproN vars just so gcc shuts up. */ /* You get warnings from MIPSPro... */ -#define GCPRO1_VAR(varname, gcpro1) ((void) gcpro1) -#define GCPRO2(varname1, varname2)(((void) gcpro2, (void) gcpro1)) -#define GCPRO3(varname1, varname2, varname3) \ - (((void) gcpro3, (void) gcpro2, (void) gcpro1)) -#define GCPRO4(varname1, varname2, varname3, varname4) \ - (((void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1)) -#define GCPRO5(varname1, varname2, varname3, varname4, varname5) \ - (((void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1)) -#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \ - (((void) gcpro6, (void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1)) -#define UNGCPRO_VAR(gcpro1) ((void) 0) +#define GCPRO1_VAR(var, gcpro) ((void) gcpro##1) +#define GCPRO2_VAR(var1, var2, gcpro) \ + ((void) gcpro##2, (void) gcpro##1) +#define GCPRO3_VAR(var1, var2, var3, gcpro) \ + ((void) gcpro##3, (void) gcpro##2, (void) gcpro##1) +#define GCPRO4_VAR(var1, var2, var3, var4, gcpro) \ + ((void) gcpro##4, (void) gcpro##3, (void) gcpro##2, (void) gcpro##1) +#define GCPRO5_VAR(var1, var2, var3, var4, var5, gcpro) \ + ((void) gcpro##5, (void) gcpro##4, (void) gcpro##3, (void) gcpro##2, \ + (void) gcpro##1) +#define GCPRO6_VAR(var1, var2, var3, var4, var5, var6, gcpro) \ + ((void) gcpro##6, (void) gcpro##5, (void) gcpro##4, (void) gcpro##3, \ + (void) gcpro##2, (void) gcpro##1) +#define UNGCPRO_VAR(gcpro) ((void) 0) #else /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */ #ifndef DEBUG_GCPRO -#define GCPRO1_VAR(varname, gcpro1) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \ - gcprolist = &gcpro1; } +#define GCPRO1_VAR(var, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var; gcpro##1.nvars = 1; \ + gcprolist = &gcpro##1; } -#define GCPRO2(varname1, varname2) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ - gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ - gcprolist = &gcpro2; } +#define GCPRO2_VAR(var1, var2, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ + gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ + gcprolist = &gcpro##2; } -#define GCPRO3(varname1, varname2, varname3) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ - gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ - gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ - gcprolist = &gcpro3; } +#define GCPRO3_VAR(var1, var2, var3, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ + gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ + gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ + gcprolist = &gcpro##3; } -#define GCPRO4(varname1, varname2, varname3, varname4) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ - gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ - gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ - gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ - gcprolist = &gcpro4; } +#define GCPRO4_VAR(var1, var2, var3, var4, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ + gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ + gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ + gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ + gcprolist = &gcpro##4; } -#define GCPRO5(varname1, varname2, varname3, varname4, varname5) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ - gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ - gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ - gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ - gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \ - gcprolist = &gcpro5; } +#define GCPRO5_VAR(var1, var2, var3, var4, var5, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ + gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ + gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ + gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ + gcpro##5.next = &gcpro##4; gcpro##5.var = &var5; gcpro##5.nvars = 1; \ + gcprolist = &gcpro##5; } -#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ - gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ - gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ - gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ - gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \ - gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \ - gcprolist = &gcpro6; } +#define GCPRO6_VAR(var1, var2, var3, var4, var5, var6, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ + gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ + gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ + gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ + gcpro##5.next = &gcpro##4; gcpro##5.var = &var5; gcpro##5.nvars = 1; \ + gcpro##6.next = &gcpro##5; gcpro##6.var = &var6; gcpro##6.nvars = 1; \ + gcprolist = &gcpro##6; } -#define UNGCPRO_VAR(gcpro1) (gcprolist = gcpro1.next) +#define UNGCPRO_VAR(gcpro) (gcprolist = gcpro##1.next) #else extern int gcpro_level; -#define GCPRO1_VAR(varname, gcpro1) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \ - gcpro1.level = gcpro_level++; \ - gcprolist = &gcpro1; } +#define GCPRO1_VAR(var, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var; gcpro##1.nvars = 1; \ + gcpro##1.level = gcpro_level++; \ + gcprolist = &gcpro##1; } -#define GCPRO2(varname1, varname2) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ - gcpro1.level = gcpro_level; \ - gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ - gcpro2.level = gcpro_level++; \ - gcprolist = &gcpro2; } +#define GCPRO2_VAR(var1, var2, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ + gcpro##1.level = gcpro_level; \ + gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ + gcpro##2.level = gcpro_level++; \ + gcprolist = &gcpro##2; } -#define GCPRO3(varname1, varname2, varname3) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ - gcpro1.level = gcpro_level; \ - gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ - gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ - gcpro3.level = gcpro_level++; \ - gcprolist = &gcpro3; } +#define GCPRO3_VAR(var1, var2, var3, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ + gcpro##1.level = gcpro_level; \ + gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ + gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ + gcpro##3.level = gcpro_level++; \ + gcprolist = &gcpro##3; } -#define GCPRO4(varname1, varname2, varname3, varname4) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ - gcpro1.level = gcpro_level; \ - gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ - gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ - gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ - gcpro4.level = gcpro_level++; \ - gcprolist = &gcpro4; } +#define GCPRO4_VAR(var1, var2, var3, var4, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ + gcpro##1.level = gcpro_level; \ + gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ + gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ + gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ + gcpro##4.level = gcpro_level++; \ + gcprolist = &gcpro##4; } -#define GCPRO5(varname1, varname2, varname3, varname4, varname5) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ - gcpro1.level = gcpro_level; \ - gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ - gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ - gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ - gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \ - gcpro5.level = gcpro_level++; \ - gcprolist = &gcpro5; } +#define GCPRO5_VAR(var1, var2, var3, var4, var5, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ + gcpro##1.level = gcpro_level; \ + gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ + gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ + gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ + gcpro##5.next = &gcpro##4; gcpro##5.var = &var5; gcpro##5.nvars = 1; \ + gcpro##5.level = gcpro_level++; \ + gcprolist = &gcpro##5; } -#define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \ - {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ - gcpro1.level = gcpro_level; \ - gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ - gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ - gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ - gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \ - gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \ - gcpro6.level = gcpro_level++; \ - gcprolist = &gcpro6; } +#define GCPRO6_VAR(var1, var2, var3, var4, var5, var6, gcpro) \ + {gcpro##1.next = gcprolist; gcpro##1.var = &var1; gcpro##1.nvars = 1; \ + gcpro##1.level = gcpro_level; \ + gcpro##2.next = &gcpro##1; gcpro##2.var = &var2; gcpro##2.nvars = 1; \ + gcpro##3.next = &gcpro##2; gcpro##3.var = &var3; gcpro##3.nvars = 1; \ + gcpro##4.next = &gcpro##3; gcpro##4.var = &var4; gcpro##4.nvars = 1; \ + gcpro##5.next = &gcpro##4; gcpro##5.var = &var5; gcpro##5.nvars = 1; \ + gcpro##6.next = &gcpro##5; gcpro##6.var = &var6; gcpro##6.nvars = 1; \ + gcpro##6.level = gcpro_level++; \ + gcprolist = &gcpro##6; } -#define UNGCPRO_VAR(gcpro1) \ - ((--gcpro_level != gcpro1.level) \ - ? (abort (), 0) \ - : ((gcprolist = gcpro1.next), 0)) +#define UNGCPRO_VAR(gcpro) \ + ((--gcpro_level != gcpro##1.level) \ + ? (abort (), 0) \ + : ((gcprolist = gcpro##1.next), 0)) #endif /* DEBUG_GCPRO */ #endif /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */ diff --git a/src/xfns.c b/src/xfns.c index 3f0bd2a7d6a..e50d6887179 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -3196,7 +3196,7 @@ This function is an internal primitive--use `make-frame' instead. */) f->output_data.x->mouse_pixel = -1; black = build_string ("black"); - GCPRO1_VAR (black, inner_gcpro1); + GCPRO1_VAR (black, inner_gcpro); FRAME_FOREGROUND_PIXEL (f) = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); FRAME_BACKGROUND_PIXEL (f) @@ -3209,7 +3209,7 @@ This function is an internal primitive--use `make-frame' instead. */) = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); f->output_data.x->mouse_pixel = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); - UNGCPRO_VAR (inner_gcpro1); + UNGCPRO_VAR (inner_gcpro); } /* Specify the parent under which to make this X window. */ @@ -4664,7 +4664,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, f->output_data.x->mouse_pixel = -1; black = build_string ("black"); - GCPRO1_VAR (black, inner_gcpro1); + GCPRO1_VAR (black, inner_gcpro); FRAME_FOREGROUND_PIXEL (f) = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); FRAME_BACKGROUND_PIXEL (f) @@ -4677,7 +4677,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); f->output_data.x->mouse_pixel = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); - UNGCPRO_VAR (inner_gcpro1); + UNGCPRO_VAR (inner_gcpro); } /* Set the name; the functions to which we pass f expect the name to From 930d429ccc5c5526569a7b5816958a0605fc35df Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 10:16:01 -0700 Subject: [PATCH 264/383] * cmds.c (internal_self_insert): Rename local to avoid shadowing. --- src/ChangeLog | 2 ++ src/cmds.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 40ba15de954..bc2e0b972fa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Paul Eggert + * cmds.c (internal_self_insert): Rename local to avoid shadowing. + * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR): New macros, so that the caller can use some names other than gcpro1, gcpro2, etc. diff --git a/src/cmds.c b/src/cmds.c index 5e6884c0807..fa1ac5028ae 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -485,18 +485,18 @@ internal_self_insert (int c, EMACS_INT n) : (c == ' ' || c == '\n')) && !NILP (BVAR (current_buffer, auto_fill_function))) { - Lisp_Object tem; + Lisp_Object auto_fill_result; if (c == '\n') /* After inserting a newline, move to previous line and fill that. Must have the newline in place already so filling and justification, if any, know where the end is going to be. */ SET_PT_BOTH (PT - 1, PT_BYTE - 1); - tem = call0 (BVAR (current_buffer, auto_fill_function)); + auto_fill_result = call0 (BVAR (current_buffer, auto_fill_function)); /* Test PT < ZV in case the auto-fill-function is strange. */ if (c == '\n' && PT < ZV) SET_PT_BOTH (PT + 1, PT_BYTE + 1); - if (!NILP (tem)) + if (!NILP (auto_fill_result)) hairy = 2; } From 181aa2be713f9d49a986e13228408c3f27943a47 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 10:16:14 -0700 Subject: [PATCH 265/383] * casefiddle.c (casify_object, casify_region): Now static. --- src/ChangeLog | 2 ++ src/casefiddle.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bc2e0b972fa..9187eb7c60e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Paul Eggert + * casefiddle.c (casify_object, casify_region): Now static. + * cmds.c (internal_self_insert): Rename local to avoid shadowing. * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR): diff --git a/src/casefiddle.c b/src/casefiddle.c index 26fa0db2d77..4ba323bf641 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -32,7 +32,7 @@ enum case_action {CASE_UP, CASE_DOWN, CASE_CAPITALIZE, CASE_CAPITALIZE_UP}; Lisp_Object Qidentity; -Lisp_Object +static Lisp_Object casify_object (enum case_action flag, Lisp_Object obj) { register int c, c1; @@ -193,7 +193,7 @@ The argument object is not altered--the value is a copy. */) /* flag is CASE_UP, CASE_DOWN or CASE_CAPITALIZE or CASE_CAPITALIZE_UP. b and e specify range of buffer to operate on. */ -void +static void casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) { register int c; From e45a141a5bab1fa5bc4c093eb2207d5d5c81e0f9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 10:18:02 -0700 Subject: [PATCH 266/383] * casefiddle.c (casify_region): Mark local as initialized. --- src/ChangeLog | 1 + src/casefiddle.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9187eb7c60e..1b44f7585d6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-15 Paul Eggert * casefiddle.c (casify_object, casify_region): Now static. + (casify_region): Mark local as initialized. * cmds.c (internal_self_insert): Rename local to avoid shadowing. diff --git a/src/casefiddle.c b/src/casefiddle.c index 4ba323bf641..d2c7e572125 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -201,7 +201,10 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) register int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); EMACS_INT start, end; EMACS_INT start_byte, end_byte; - EMACS_INT first = -1, last; /* Position of first and last changes. */ + + /* Position of first and last changes. */ + EMACS_INT first = -1, last IF_LINT (= 0); + EMACS_INT opoint = PT; EMACS_INT opoint_byte = PT_BYTE; From 0adf561883e07549e657a39d0a4a95cafa4d04fd Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 15 Mar 2011 13:39:56 -0400 Subject: [PATCH 267/383] Fix misuse of quote in `case'. * lisp/progmodes/ruby-mode.el (ruby-backward-sexp): * lisp/progmodes/ebrowse.el (ebrowse-draw-file-member-info): * lisp/play/gamegrid.el (gamegrid-make-face): * lisp/play/bubbles.el (bubbles--grid-width, bubbles--grid-height) (bubbles--colors, bubbles--shift-mode, bubbles--initialize-images): * lisp/notifications.el (notifications-notify): * lisp/net/xesam.el (xesam-search-engines): * lisp/net/quickurl.el (quickurl-list-insert): * lisp/vc/vc-hg.el (vc-hg-dir-printer): Fix use of case. * lisp/gnus/auth-source.el (auth-source-netrc-create): * lisp/gnus/message.el (message-yank-original): Fix use of `case'. * lisp/org/org-src.el (org-src-switch-to-buffer): * lisp/org/org-plot.el (org-plot/gnuplot-script, org-plot/gnuplot): * lisp/org/org-mouse.el (org-mouse-agenda-type): * lisp/org/org-freemind.el (org-freemind-node-to-org): * lisp/org/ob-sql.el (org-babel-execute:sql): * lisp/org/ob-exp.el (org-babel-exp-do-export, org-babel-exp-code): * lisp/org/ob-ref.el (org-babel-ref-resolve): Fix use of case. --- lisp/ChangeLog | 12 +++++++++ lisp/gnus/ChangeLog | 5 ++++ lisp/gnus/auth-source.el | 8 +++--- lisp/gnus/message.el | 6 ++--- lisp/net/quickurl.el | 10 ++++---- lisp/net/xesam.el | 8 +++--- lisp/notifications.el | 4 +-- lisp/org/ChangeLog | 10 ++++++++ lisp/org/ob-exp.el | 14 +++++------ lisp/org/ob-ref.el | 12 ++++----- lisp/org/ob-sql.el | 22 ++++++++-------- lisp/org/org-freemind.el | 6 ++--- lisp/org/org-mouse.el | 10 ++++---- lisp/org/org-plot.el | 24 +++++++++--------- lisp/org/org-src.el | 14 +++++------ lisp/play/bubbles.el | 50 ++++++++++++++++++------------------- lisp/play/gamegrid.el | 10 ++++---- lisp/progmodes/ebrowse.el | 12 ++++----- lisp/progmodes/ruby-mode.el | 2 +- lisp/vc/vc-dir.el | 6 ++--- lisp/vc/vc-hg.el | 6 ++--- 21 files changed, 139 insertions(+), 112 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f09c5fa9d9e..599cf5ba4d3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2011-03-15 Stefan Monnier + + * progmodes/ruby-mode.el (ruby-backward-sexp): + * progmodes/ebrowse.el (ebrowse-draw-file-member-info): + * play/gamegrid.el (gamegrid-make-face): + * play/bubbles.el (bubbles--grid-width, bubbles--grid-height) + (bubbles--colors, bubbles--shift-mode, bubbles--initialize-images): + * notifications.el (notifications-notify): + * net/xesam.el (xesam-search-engines): + * net/quickurl.el (quickurl-list-insert): + * vc/vc-hg.el (vc-hg-dir-printer): Fix use of case. + 2011-03-15 Chong Yidong * startup.el (command-line): Update package subdirectory regexp. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a30f5fac4ad..d806f0ac342 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-03-15 Stefan Monnier + + * auth-source.el (auth-source-netrc-create): + * message.el (message-yank-original): Fix use of `case'. + 2011-03-15 Teodor Zlatanov * message.el (message-yank-original): Use cond instead of CL case. diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index f703fbbd200..e0bea324a25 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -1130,10 +1130,10 @@ See `auth-source-search' for details on SPEC." (if (zerop (length add)) "" " ") ;; remap auth-source tokens to netrc (case r - ('user "login") - ('host "machine") - ('secret "password") - ('port "port") ; redundant but clearer + (user "login") + (host "machine") + (secret "password") + (port "port") ; redundant but clearer (t (symbol-name r))) ;; the value will be printed in %S format data)))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index f0ae6358431..1d0aaffa426 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3748,13 +3748,13 @@ prefix, and don't delete any headers." (goto-char (mark t)) (insert-before-markers ?\n) (goto-char pt)))) - (cond - ((eq 'above message-cite-reply-position) + (case message-cite-reply-position + (above (message-goto-body) (insert body-text) (insert (if (bolp) "\n" "\n\n")) (message-goto-body)) - ((eq 'below message-cite-reply-position) + (below (message-goto-signature))) ;; Add a `message-setup-very-last-hook' here? ;; Add `gnus-article-highlight-citation' here? diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index 4045a443640..c3da1707165 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -511,15 +511,15 @@ TYPE dictates what will be inserted, options are: (with-current-buffer quickurl-list-last-buffer (insert (case type - ('url (funcall quickurl-format-function url)) - ('naked-url (quickurl-url-url url)) - ('with-lookup (format "%s " + (url (funcall quickurl-format-function url)) + (naked-url (quickurl-url-url url)) + (with-lookup (format "%s " (quickurl-url-keyword url) (quickurl-url-url url))) - ('with-desc (format "%S " + (with-desc (format "%S " (quickurl-url-description url) (quickurl-url-url url))) - ('lookup (quickurl-url-keyword url))))) + (lookup (quickurl-url-keyword url))))) (error "No URL details on that line")) url)) diff --git a/lisp/net/xesam.el b/lisp/net/xesam.el index 21a22749408..64c26cfb2c9 100644 --- a/lisp/net/xesam.el +++ b/lisp/net/xesam.el @@ -414,18 +414,18 @@ If there is no registered search engine at all, the function returns `nil'." ;; Hopefully, this will change later. (setq hit-fields (case (intern vendor-id) - ('Beagle + (Beagle '("xesam:mimeType" "xesam:url")) - ('Strigi + (Strigi '("xesam:author" "xesam:cc" "xesam:charset" "xesam:contentType" "xesam:fileExtension" "xesam:id" "xesam:lineCount" "xesam:links" "xesam:mimeType" "xesam:name" "xesam:size" "xesam:sourceModified" "xesam:subject" "xesam:to" "xesam:url")) - ('TrackerXesamSession + (TrackerXesamSession '("xesam:relevancyRating" "xesam:url")) - ('Debbugs + (Debbugs '("xesam:keyword" "xesam:owner" "xesam:title" "xesam:url" "xesam:sourceModified" "xesam:mimeType" "debbugs:key")) diff --git a/lisp/notifications.el b/lisp/notifications.el index 893b9ed095f..adb9fdd641a 100644 --- a/lisp/notifications.el +++ b/lisp/notifications.el @@ -210,8 +210,8 @@ used to manipulate the notification item with (add-to-list 'hints `(:dict-entry "urgency" (:variant :byte ,(case urgency - ('low 0) - ('critical 2) + (low 0) + (critical 2) (t 1)))) t)) (when category (add-to-list 'hints `(:dict-entry diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index e75821b6860..44a2cb15b7e 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,3 +1,13 @@ +2011-03-15 Stefan Monnier + + * org-src.el (org-src-switch-to-buffer): + * org-plot.el (org-plot/gnuplot-script, org-plot/gnuplot): + * org-mouse.el (org-mouse-agenda-type): + * org-freemind.el (org-freemind-node-to-org): + * ob-sql.el (org-babel-execute:sql): + * ob-exp.el (org-babel-exp-do-export, org-babel-exp-code): + * ob-ref.el (org-babel-ref-resolve): Fix use of case. + 2011-03-06 Juanma Barranquero * org.el (org-blank-before-new-entry, org-context-in-file-links) diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index 1be45198e0d..3215bcf4d8a 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el @@ -231,10 +231,10 @@ The function respects the value of the :exports header argument." (org-babel-exp-results info type 'silent)))) (clean () (org-babel-remove-result info))) (case (intern (or (cdr (assoc :exports (nth 2 info))) "code")) - ('none (silently) (clean) "") - ('code (silently) (clean) (org-babel-exp-code info type)) - ('results (org-babel-exp-results info type)) - ('both (concat (org-babel-exp-code info type) + (none (silently) (clean) "") + (code (silently) (clean) (org-babel-exp-code info type)) + (results (org-babel-exp-results info type)) + (both (concat (org-babel-exp-code info type) "\n\n" (org-babel-exp-results info type)))))) @@ -250,8 +250,8 @@ The code block is not evaluated." (name (nth 4 info)) (args (mapcar #'cdr (org-babel-get-header (nth 2 info) :var)))) (case type - ('inline (format "=%s=" body)) - ('block + (inline (format "=%s=" body)) + (block (let ((str (format "#+BEGIN_SRC %s %s\n%s%s#+END_SRC\n" lang switches body (if (and body (string-match "\n$" body)) @@ -265,7 +265,7 @@ The code block is not evaluated." (mapconcat #'identity args ", "))) str)) str)) - ('lob + (lob (let ((call-line (and (string-match "results=" (car args)) (substring (car args) (match-end 0))))) (cond diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index 7b06e90f924..96819df8ea1 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el @@ -147,12 +147,12 @@ the variable." (let ((params (append args '((:results . "silent"))))) (setq result (case type - ('results-line (org-babel-read-result)) - ('table (org-babel-read-table)) - ('list (org-babel-read-list)) - ('file (org-babel-read-link)) - ('source-block (org-babel-execute-src-block nil nil params)) - ('lob (org-babel-execute-src-block nil lob-info params))))) + (results-line (org-babel-read-result)) + (table (org-babel-read-table)) + (list (org-babel-read-list)) + (file (org-babel-read-link)) + (source-block (org-babel-execute-src-block nil nil params)) + (lob (org-babel-execute-src-block nil lob-info params))))) (if (symbolp result) (format "%S" result) (if (and index (listp result)) diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index 3bd10d6b2bd..49859d24a17 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el @@ -66,18 +66,18 @@ This function is called by `org-babel-execute-src-block'." (out-file (or (cdr (assoc :out-file params)) (org-babel-temp-file "sql-out-"))) (command (case (intern engine) - ('msosql (format "osql %s -s \"\t\" -i %s -o %s" - (or cmdline "") - (org-babel-process-file-name in-file) - (org-babel-process-file-name out-file))) - ('mysql (format "mysql %s -e \"source %s\" > %s" + (msosql (format "osql %s -s \"\t\" -i %s -o %s" (or cmdline "") - (org-babel-process-file-name in-file) - (org-babel-process-file-name out-file))) - ('postgresql (format "psql -A -P footer=off -F \"\t\" -f %s -o %s %s" - (org-babel-process-file-name in-file) - (org-babel-process-file-name out-file) - (or cmdline ""))) + (org-babel-process-file-name in-file) + (org-babel-process-file-name out-file))) + (mysql (format "mysql %s -e \"source %s\" > %s" + (or cmdline "") + (org-babel-process-file-name in-file) + (org-babel-process-file-name out-file))) + (postgresql (format "psql -A -P footer=off -F \"\t\" -f %s -o %s %s" + (org-babel-process-file-name in-file) + (org-babel-process-file-name out-file) + (or cmdline ""))) (t (error "no support for the %s sql engine" engine))))) (with-temp-file in-file (insert (org-babel-expand-body:sql body params))) diff --git a/lisp/org/org-freemind.el b/lisp/org/org-freemind.el index c85b4bac36a..dccdf449296 100644 --- a/lisp/org/org-freemind.el +++ b/lisp/org/org-freemind.el @@ -1172,8 +1172,8 @@ PATH should be a list of steps, where each step has the form (when (< 0 (- level skip-levels)) (dolist (attrib attributes) (case (car attrib) - ('TEXT (setq text (cdr attrib))) - ('text (setq text (cdr attrib))))) + (TEXT (setq text (cdr attrib))) + (text (setq text (cdr attrib))))) (unless text ;; There should be a richcontent node holding the text: (setq text (org-freemind-get-richcontent-node-text node))) @@ -1193,7 +1193,7 @@ PATH should be a list of steps, where each step has the form (setq text (replace-regexp-in-string "\n $" "" text)) (insert text)) (case qname - ('node + (node (insert (make-string (- level skip-levels) ?*) " " text "\n") (when note (insert ":COMMENT:\n" note "\n:END:\n")) diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index d30f172f42f..cec19d89de1 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -476,11 +476,11 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" (defun org-mouse-agenda-type (type) (case type - ('tags "Tags: ") - ('todo "TODO: ") - ('tags-tree "Tags tree: ") - ('todo-tree "TODO tree: ") - ('occur-tree "Occur tree: ") + (tags "Tags: ") + (todo "TODO: ") + (tags-tree "Tags tree: ") + (todo-tree "TODO tree: ") + (occur-tree "Occur tree: ") (t "Agenda command ???"))) diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index c5f4bff24fa..10722403f7e 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el @@ -206,18 +206,18 @@ manner suitable for prepending to a user-specified script." (y-labels (plist-get params :ylabels)) (plot-str "'%s' using %s%d%s with %s title '%s'") (plot-cmd (case type - ('2d "plot") - ('3d "splot") - ('grid "splot"))) + (2d "plot") + (3d "splot") + (grid "splot"))) (script "reset") plot-lines) (flet ((add-to-script (line) (setf script (format "%s\n%s" script line)))) (when file ;; output file (add-to-script (format "set term %s" (file-name-extension file))) (add-to-script (format "set output '%s'" file))) (case type ;; type - ('2d ()) - ('3d (if map (add-to-script "set map"))) - ('grid (if map + (2d ()) + (3d (if map (add-to-script "set map"))) + (grid (if map (add-to-script "set pm3d map") (add-to-script "set pm3d")))) (when title (add-to-script (format "set title '%s'" title))) ;; title @@ -243,7 +243,7 @@ manner suitable for prepending to a user-specified script." "%Y-%m-%d-%H:%M:%S") "\""))) (unless preface (case type ;; plot command - ('2d (dotimes (col num-cols) + (2d (dotimes (col num-cols) (unless (and (equal type '2d) (or (and ind (equal (+ 1 col) ind)) (and deps (not (member (+ 1 col) deps))))) @@ -258,10 +258,10 @@ manner suitable for prepending to a user-specified script." with (or (nth col col-labels) (format "%d" (+ 1 col)))) plot-lines))))) - ('3d + (3d (setq plot-lines (list (format "'%s' matrix with %s title ''" data-file with)))) - ('grid + (grid (setq plot-lines (list (format "'%s' with %s title ''" data-file with))))) (add-to-script @@ -305,9 +305,9 @@ line directly before or after the table." (setf params (org-plot/collect-options params)))) ;; dump table to datafile (very different for grid) (case (plist-get params :plot-type) - ('2d (org-plot/gnuplot-to-data table data-file params)) - ('3d (org-plot/gnuplot-to-data table data-file params)) - ('grid (let ((y-labels (org-plot/gnuplot-to-grid-data + (2d (org-plot/gnuplot-to-data table data-file params)) + (3d (org-plot/gnuplot-to-data table data-file params)) + (grid (let ((y-labels (org-plot/gnuplot-to-grid-data table data-file params))) (when y-labels (plist-put params :ylabels y-labels))))) ;; check for timestamp ind column diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 98fdb75423d..bd1c3802044 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -335,26 +335,26 @@ buffer." (defun org-src-switch-to-buffer (buffer context) (case org-src-window-setup - ('current-window + (current-window (switch-to-buffer buffer)) - ('other-window + (other-window (switch-to-buffer-other-window buffer)) - ('other-frame + (other-frame (case context - ('exit + (exit (let ((frame (selected-frame))) (switch-to-buffer-other-frame buffer) (delete-frame frame))) - ('save + (save (kill-buffer (current-buffer)) (switch-to-buffer buffer)) (t (switch-to-buffer-other-frame buffer)))) - ('reorganize-frame + (reorganize-frame (if (eq context 'edit) (delete-other-windows)) (org-switch-to-buffer-other-window buffer) (if (eq context 'exit) (delete-other-windows))) - ('switch-invisibly + (switch-invisibly (set-buffer buffer)) (t (message "Invalid value %s for org-src-window-setup" diff --git a/lisp/play/bubbles.el b/lisp/play/bubbles.el index 8fea2cef6ad..0dc556007ba 100644 --- a/lisp/play/bubbles.el +++ b/lisp/play/bubbles.el @@ -719,57 +719,57 @@ static char * dot3d_xpm[] = { (defsubst bubbles--grid-width () "Return the grid width for the current game theme." (car (case bubbles-game-theme - ('easy + (easy bubbles--grid-small) - ('medium + (medium bubbles--grid-medium) - ('difficult + (difficult bubbles--grid-large) - ('hard + (hard bubbles--grid-huge) - ('user-defined + (user-defined bubbles-grid-size)))) (defsubst bubbles--grid-height () "Return the grid height for the current game theme." (cdr (case bubbles-game-theme - ('easy + (easy bubbles--grid-small) - ('medium + (medium bubbles--grid-medium) - ('difficult + (difficult bubbles--grid-large) - ('hard + (hard bubbles--grid-huge) - ('user-defined + (user-defined bubbles-grid-size)))) (defsubst bubbles--colors () "Return the color list for the current game theme." (case bubbles-game-theme - ('easy + (easy bubbles--colors-2) - ('medium + (medium bubbles--colors-3) - ('difficult + (difficult bubbles--colors-4) - ('hard + (hard bubbles--colors-5) - ('user-defined + (user-defined bubbles-colors))) (defsubst bubbles--shift-mode () "Return the shift mode for the current game theme." (case bubbles-game-theme - ('easy + (easy 'default) - ('medium + (medium 'default) - ('difficult + (difficult 'always) - ('hard + (hard 'always) - ('user-defined + (user-defined bubbles-shift-mode))) (defun bubbles-save-settings () @@ -1346,11 +1346,11 @@ Return t if new char is non-empty." (when (and (display-images-p) (not (eq bubbles-graphics-theme 'ascii))) (let ((template (case bubbles-graphics-theme - ('circles bubbles--image-template-circle) - ('balls bubbles--image-template-ball) - ('squares bubbles--image-template-square) - ('diamonds bubbles--image-template-diamond) - ('emacs bubbles--image-template-emacs)))) + (circles bubbles--image-template-circle) + (balls bubbles--image-template-ball) + (squares bubbles--image-template-square) + (diamonds bubbles--image-template-diamond) + (emacs bubbles--image-template-emacs)))) (setq bubbles--empty-image (create-image (replace-regexp-in-string "^\"\\(.*\\)\t.*c .*\",$" diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index d3d8350a43f..99e3b487437 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -213,19 +213,19 @@ static unsigned char gamegrid_bits[] = { (let ((data (gamegrid-match-spec-list data-spec-list)) (color (gamegrid-match-spec-list color-spec-list))) (case data - ('color-x + (color-x (gamegrid-make-color-x-face color)) - ('grid-x + (grid-x (unless gamegrid-grid-x-face (setq gamegrid-grid-x-face (gamegrid-make-grid-x-face))) gamegrid-grid-x-face) - ('mono-x + (mono-x (unless gamegrid-mono-x-face (setq gamegrid-mono-x-face (gamegrid-make-mono-x-face))) gamegrid-mono-x-face) - ('color-tty + (color-tty (gamegrid-make-color-tty-face color)) - ('mono-tty + (mono-tty (unless gamegrid-mono-tty-face (setq gamegrid-mono-tty-face (gamegrid-make-mono-tty-face))) gamegrid-mono-tty-face)))) diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index d674484345a..87e5875c943 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -3566,12 +3566,12 @@ KIND is an additional string printed in the buffer." (insert kind) (indent-to 50) (insert (case (second info) - ('ebrowse-ts-member-functions "member function") - ('ebrowse-ts-member-variables "member variable") - ('ebrowse-ts-static-functions "static function") - ('ebrowse-ts-static-variables "static variable") - ('ebrowse-ts-friends (if globals-p "define" "friend")) - ('ebrowse-ts-types "type") + (ebrowse-ts-member-functions "member function") + (ebrowse-ts-member-variables "member variable") + (ebrowse-ts-static-functions "static function") + (ebrowse-ts-static-variables "static variable") + (ebrowse-ts-friends (if globals-p "define" "friend")) + (ebrowse-ts-types "type") (t "unknown")) "\n"))) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 9d40b4d8fd7..c8b156c5441 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -974,7 +974,7 @@ With ARG, do it many times. Negative ARG means move forward." (goto-char (scan-sexps (1+ (point)) -1)) (case (char-before) (?% (forward-char -1)) - ('(?q ?Q ?w ?W ?r ?x) + ((?q ?Q ?w ?W ?r ?x) (if (eq (char-before (1- (point))) ?%) (forward-char -2)))) nil) ((looking-at "\\s\"\\|\\\\\\S_") diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index d4970207b94..01b6f2fc26e 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -104,7 +104,7 @@ See `run-hooks'." ;; We pass a filename to create-file-buffer because it is what ;; the function expects, and also what uniquify needs (if active) (with-current-buffer (create-file-buffer (expand-file-name bname dir)) - (cd dir) + (setq default-directory dir) (vc-setup-buffer (current-buffer)) ;; Reset the vc-parent-buffer-name so that it does not appear ;; in the mode-line. @@ -1002,7 +1002,7 @@ specific headers." (generate-new-buffer (format " *VC-%s* tmp status" backend)))) (lexical-let ((buffer (current-buffer))) (with-current-buffer vc-dir-process-buffer - (cd def-dir) + (setq default-directory def-dir) (erase-buffer) (vc-call-backend backend 'dir-status-files def-dir files default-state @@ -1067,7 +1067,7 @@ Throw an error if another update process is in progress." (ewoc-set-hf vc-ewoc (vc-dir-headers backend def-dir) "") (lexical-let ((buffer (current-buffer))) (with-current-buffer vc-dir-process-buffer - (cd def-dir) + (setq default-directory def-dir) (erase-buffer) (vc-call-backend backend 'dir-status def-dir diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 4ac7ef15fc7..0516abbf024 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -529,9 +529,9 @@ REV is the revision to check out into WORKFILE." (insert (propertize (format " (%s %s)" (case (vc-hg-extra-fileinfo->rename-state extra) - ('copied "copied from") - ('renamed-from "renamed from") - ('renamed-to "renamed to")) + (copied "copied from") + (renamed-from "renamed from") + (renamed-to "renamed to")) (vc-hg-extra-fileinfo->extra-name extra)) 'face 'font-lock-comment-face))))) From 85f24f61597cf8f38d5913e66a87c883f6a7690d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 10:57:31 -0700 Subject: [PATCH 268/383] * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width. All uses changed. (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion): Rename locals to avoid shadowing. --- src/ChangeLog | 5 +++++ src/indent.c | 30 +++++++++++++++--------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1b44f7585d6..21a588a87da 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2011-03-15 Paul Eggert + * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width. + All uses changed. + (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion): + Rename locals to avoid shadowing. + * casefiddle.c (casify_object, casify_region): Now static. (casify_region): Mark local as initialized. diff --git a/src/indent.c b/src/indent.c index 37ce647556d..d5e7671fa8c 100644 --- a/src/indent.c +++ b/src/indent.c @@ -274,20 +274,20 @@ skip_invisible (EMACS_INT pos, EMACS_INT *next_boundary_p, EMACS_INT to, Lisp_Ob This macro is used in current_column_1, Fmove_to_column, and compute_motion. */ -#define MULTIBYTE_BYTES_WIDTH(p, dp) \ +#define MULTIBYTE_BYTES_WIDTH(p, dp, bytes, width) \ do { \ - int c; \ + int ch; \ \ wide_column = 0; \ - c = STRING_CHAR_AND_LENGTH (p, bytes); \ + ch = STRING_CHAR_AND_LENGTH (p, bytes); \ if (BYTES_BY_CHAR_HEAD (*p) != bytes) \ width = bytes * 4; \ else \ { \ - if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, c))) \ - width = XVECTOR (DISP_CHAR_VECTOR (dp, c))->size; \ + if (dp != 0 && VECTORP (DISP_CHAR_VECTOR (dp, ch))) \ + width = XVECTOR (DISP_CHAR_VECTOR (dp, ch))->size; \ else \ - width = CHAR_WIDTH (c); \ + width = CHAR_WIDTH (ch); \ if (width > 1) \ wide_column = width; \ } \ @@ -569,14 +569,14 @@ scan_for_column (EMACS_INT *endpos, EMACS_INT *goalcol, EMACS_INT *prevcol) prev_col = col; { /* Check display property. */ - EMACS_INT end; - int width = check_display_width (scan, col, &end); + EMACS_INT endp; + int width = check_display_width (scan, col, &endp); if (width >= 0) { col += width; - if (end > scan) /* Avoid infinite loops with 0-width overlays. */ + if (endp > scan) /* Avoid infinite loops with 0-width overlays. */ { - scan = end; scan_byte = charpos_to_bytepos (scan); + scan = endp; scan_byte = charpos_to_bytepos (scan); continue; } } @@ -669,7 +669,7 @@ scan_for_column (EMACS_INT *endpos, EMACS_INT *goalcol, EMACS_INT *prevcol) int bytes, width, wide_column; ptr = BYTE_POS_ADDR (scan_byte); - MULTIBYTE_BYTES_WIDTH (ptr, dp); + MULTIBYTE_BYTES_WIDTH (ptr, dp, bytes, width); /* Subtract one to compensate for the increment that is going to happen below. */ scan_byte += bytes - 1; @@ -1657,15 +1657,15 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ { /* Start of multi-byte form. */ unsigned char *ptr; - int bytes, width, wide_column; + int mb_bytes, mb_width, wide_column; pos_byte--; /* rewind POS_BYTE */ ptr = BYTE_POS_ADDR (pos_byte); - MULTIBYTE_BYTES_WIDTH (ptr, dp); - pos_byte += bytes; + MULTIBYTE_BYTES_WIDTH (ptr, dp, mb_bytes, mb_width); + pos_byte += mb_bytes; if (wide_column) wide_column_end_hpos = hpos + wide_column; - hpos += width; + hpos += mb_width; } else if (VECTORP (charvec)) ++hpos; From 5671df8f51e552ca7d61296faf67b110b6a33235 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 10:59:31 -0700 Subject: [PATCH 269/383] * indent.c (Fvertical_motion): Mark locals as initialized. --- src/ChangeLog | 1 + src/indent.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 21a588a87da..9f5ed0a0c31 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ All uses changed. (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion): Rename locals to avoid shadowing. + (Fvertical_motion): Mark locals as initialized. * casefiddle.c (casify_object, casify_region): Now static. (casify_region): Mark local as initialized. diff --git a/src/indent.c b/src/indent.c index d5e7671fa8c..baea0641948 100644 --- a/src/indent.c +++ b/src/indent.c @@ -1995,7 +1995,7 @@ whether or not it is currently displayed in some window. */) Lisp_Object old_buffer; struct gcpro gcpro1; Lisp_Object lcols = Qnil; - double cols; + double cols IF_LINT (= 0); /* Allow LINES to be of the form (HPOS . VPOS) aka (COLUMNS . LINES). */ if (CONSP (lines) && (NUMBERP (XCAR (lines)))) @@ -2029,7 +2029,7 @@ whether or not it is currently displayed in some window. */) } else { - int it_start, first_x, it_overshoot_expected; + int it_start, first_x, it_overshoot_expected IF_LINT (= 0); SET_TEXT_POS (pt, PT, PT_BYTE); start_display (&it, w, pt); From 7e47afad4513977ba3cc5a175081f1c258a8ddfe Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 11:02:42 -0700 Subject: [PATCH 270/383] * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing. --- src/ChangeLog | 2 ++ src/character.h | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9f5ed0a0c31..d4f8061ed02 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Paul Eggert + * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing. + * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width. All uses changed. (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion): diff --git a/src/character.h b/src/character.h index 6d5b8110109..bbf5550c711 100644 --- a/src/character.h +++ b/src/character.h @@ -451,8 +451,8 @@ along with GNU Emacs. If not, see . */ #define INC_POS(pos_byte) \ do { \ - unsigned char *p = BYTE_POS_ADDR (pos_byte); \ - pos_byte += BYTES_BY_CHAR_HEAD (*p); \ + unsigned char *ptr = BYTE_POS_ADDR (pos_byte); \ + pos_byte += BYTES_BY_CHAR_HEAD (*ptr); \ } while (0) @@ -461,16 +461,16 @@ along with GNU Emacs. If not, see . */ #define DEC_POS(pos_byte) \ do { \ - unsigned char *p; \ + unsigned char *ptr; \ \ pos_byte--; \ if (pos_byte < GPT_BYTE) \ - p = BEG_ADDR + pos_byte - BEG_BYTE; \ + ptr = BEG_ADDR + pos_byte - BEG_BYTE; \ else \ - p = BEG_ADDR + GAP_SIZE + pos_byte - BEG_BYTE;\ - while (!CHAR_HEAD_P (*p)) \ + ptr = BEG_ADDR + GAP_SIZE + pos_byte - BEG_BYTE; \ + while (!CHAR_HEAD_P (*ptr)) \ { \ - p--; \ + ptr--; \ pos_byte--; \ } \ } while (0) From dbd37a958fc17c793003ea95ad61ae51cff5ff45 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 11:08:06 -0700 Subject: [PATCH 271/383] * dired.c (compile_pattern): Move decl from here ... * lisp.h: ... to here, so that it can be checked. (struct re_registers): New forward decl. --- src/ChangeLog | 4 ++++ src/dired.c | 5 ----- src/lisp.h | 4 ++++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d4f8061ed02..ba863ba5710 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-15 Paul Eggert + * dired.c (compile_pattern): Move decl from here ... + * lisp.h: ... to here, so that it can be checked. + (struct re_registers): New forward decl. + * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing. * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width. diff --git a/src/dired.c b/src/dired.c index 4080e1711e0..3e2ce5e96a6 100644 --- a/src/dired.c +++ b/src/dired.c @@ -79,11 +79,6 @@ extern struct direct *readdir (DIR *); #include "regex.h" #include "blockinput.h" -/* Returns a search buffer, with a fastmap allocated and ready to go. */ -extern struct re_pattern_buffer *compile_pattern (Lisp_Object, - struct re_registers *, - Lisp_Object, int, int); - Lisp_Object Qdirectory_files; Lisp_Object Qdirectory_files_and_attributes; Lisp_Object Qfile_name_completion; diff --git a/src/lisp.h b/src/lisp.h index ddaf0438b00..ec45b83863b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3025,6 +3025,10 @@ EXFUN (Fset_match_data, 2); EXFUN (Fmatch_beginning, 1); EXFUN (Fmatch_end, 1); extern void record_unwind_save_match_data (void); +struct re_registers; +extern struct re_pattern_buffer *compile_pattern (Lisp_Object, + struct re_registers *, + Lisp_Object, int, int); extern int fast_string_match (Lisp_Object, Lisp_Object); extern int fast_c_string_match_ignore_case (Lisp_Object, const char *); extern int fast_string_match_ignore_case (Lisp_Object, Lisp_Object); From ded6f8f72e83259be778eae9411c1855ef3a0081 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 11:08:50 -0700 Subject: [PATCH 272/383] * search.c (simple_search): Remove unused var. --- src/ChangeLog | 2 ++ src/search.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ba863ba5710..a74b15aea6f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Paul Eggert + * search.c (simple_search): Remove unused var. + * dired.c (compile_pattern): Move decl from here ... * lisp.h: ... to here, so that it can be checked. (struct re_registers): New forward decl. diff --git a/src/search.c b/src/search.c index dceff94da72..dbc82bdb3d9 100644 --- a/src/search.c +++ b/src/search.c @@ -1554,7 +1554,6 @@ simple_search (EMACS_INT n, unsigned char *pat, while (this_len > 0) { - int charlen; int pat_ch, buf_ch; DEC_BOTH (this_pos, this_pos_byte); From 1f3561e4ca0b2338e162de9ae29caa814ae3a457 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 11:13:15 -0700 Subject: [PATCH 273/383] * search.c (boyer_moore): Rename locals to avoid shadowing. * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. --- src/ChangeLog | 3 +++ src/character.h | 6 +++--- src/search.c | 16 ++++++++-------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a74b15aea6f..9793b5692f8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Paul Eggert + * search.c (boyer_moore): Rename locals to avoid shadowing. + * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. + * search.c (simple_search): Remove unused var. * dired.c (compile_pattern): Move decl from here ... diff --git a/src/character.h b/src/character.h index bbf5550c711..ad1577a5c90 100644 --- a/src/character.h +++ b/src/character.h @@ -377,10 +377,10 @@ along with GNU Emacs. If not, see . */ if (STRING_MULTIBYTE (STRING)) \ { \ unsigned char *ptr = &SDATA (STRING)[BYTEIDX]; \ - int len; \ + int ptrlen; \ \ - OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len); \ - BYTEIDX += len; \ + OUTPUT = STRING_CHAR_AND_LENGTH (ptr, ptrlen); \ + BYTEIDX += ptrlen; \ } \ else \ { \ diff --git a/src/search.c b/src/search.c index dbc82bdb3d9..9869a7aad55 100644 --- a/src/search.c +++ b/src/search.c @@ -1725,17 +1725,17 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat, /* Setup translate_prev_byte1/2/3/4 from CHAR_BASE. Only a byte following them are the target of translation. */ unsigned char str[MAX_MULTIBYTE_LENGTH]; - int len = CHAR_STRING (char_base, str); + int cblen = CHAR_STRING (char_base, str); - translate_prev_byte1 = str[len - 2]; - if (len > 2) + translate_prev_byte1 = str[cblen - 2]; + if (cblen > 2) { - translate_prev_byte2 = str[len - 3]; - if (len > 3) + translate_prev_byte2 = str[cblen - 3]; + if (cblen > 3) { - translate_prev_byte3 = str[len - 4]; - if (len > 4) - translate_prev_byte4 = str[len - 5]; + translate_prev_byte3 = str[cblen - 4]; + if (cblen > 4) + translate_prev_byte4 = str[cblen - 5]; } } } From 19ed5445872476a2728c7f9a4f0e99976f5e2e23 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 11:27:53 -0700 Subject: [PATCH 274/383] * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT): Rename locals to avoid shadowing. (regex_compile, re_match_2_internal): Move locals to avoid shadowing. --- src/ChangeLog | 4 ++ src/regex.c | 134 +++++++++++++++++++++++++------------------------- 2 files changed, 72 insertions(+), 66 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9793b5692f8..73669e11c98 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-15 Paul Eggert + * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT): + Rename locals to avoid shadowing. + (regex_compile, re_match_2_internal): Move locals to avoid shadowing. + * search.c (boyer_moore): Rename locals to avoid shadowing. * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. diff --git a/src/regex.c b/src/regex.c index 9284be95ffb..6babbfbed76 100644 --- a/src/regex.c +++ b/src/regex.c @@ -861,14 +861,14 @@ extract_number_and_incr (destination, source) do \ { \ re_wchar_t range_start, range_end; \ - re_char *p; \ + re_char *rtp; \ re_char *range_table_end \ = CHARSET_RANGE_TABLE_END ((range_table), (count)); \ \ - for (p = (range_table); p < range_table_end; p += 2 * 3) \ + for (rtp = (range_table); rtp < range_table_end; rtp += 2 * 3) \ { \ - EXTRACT_CHARACTER (range_start, p); \ - EXTRACT_CHARACTER (range_end, p + 3); \ + EXTRACT_CHARACTER (range_start, rtp); \ + EXTRACT_CHARACTER (range_end, rtp + 3); \ \ if (range_start <= (c) && (c) <= range_end) \ { \ @@ -1555,22 +1555,22 @@ do { \ /* Pop a saved register off the stack. */ #define POP_FAILURE_REG_OR_COUNT() \ do { \ - int reg = POP_FAILURE_INT (); \ - if (reg == -1) \ + int pfreg = POP_FAILURE_INT (); \ + if (pfreg == -1) \ { \ /* It's a counter. */ \ /* Here, we discard `const', making re_match non-reentrant. */ \ unsigned char *ptr = (unsigned char*) POP_FAILURE_POINTER (); \ - reg = POP_FAILURE_INT (); \ - STORE_NUMBER (ptr, reg); \ - DEBUG_PRINT3 (" Pop counter %p = %d\n", ptr, reg); \ + pfreg = POP_FAILURE_INT (); \ + STORE_NUMBER (ptr, pfreg); \ + DEBUG_PRINT3 (" Pop counter %p = %d\n", ptr, pfreg); \ } \ else \ { \ - regend[reg] = POP_FAILURE_POINTER (); \ - regstart[reg] = POP_FAILURE_POINTER (); \ + regend[pfreg] = POP_FAILURE_POINTER (); \ + regstart[pfreg] = POP_FAILURE_POINTER (); \ DEBUG_PRINT4 (" Pop reg %d (spanning %p -> %p)\n", \ - reg, regstart[reg], regend[reg]); \ + pfreg, regstart[pfreg], regend[pfreg]); \ } \ } while (0) @@ -2524,9 +2524,6 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct /* We fetch characters from PATTERN here. */ register re_wchar_t c, c1; - /* A random temporary spot in PATTERN. */ - re_char *p1; - /* Points to the end of the buffer, where we should append. */ register unsigned char *b; @@ -2894,6 +2891,8 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct case '[': { + re_char *p1; + CLEAR_RANGE_TABLE_WORK_USED (range_table_work); if (p == pend) FREE_STACK_RETURN (REG_EBRACK); @@ -5024,7 +5023,6 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int /* General temporaries. */ int mcnt; size_t reg; - boolean not; /* Just past the end of the corresponding string. */ re_char *end1, *end2; @@ -6005,46 +6003,48 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int case wordbound: case notwordbound: - not = (re_opcode_t) *(p - 1) == notwordbound; - DEBUG_PRINT2 ("EXECUTING %swordbound.\n", not?"not":""); + { + boolean not = (re_opcode_t) *(p - 1) == notwordbound; + DEBUG_PRINT2 ("EXECUTING %swordbound.\n", not?"not":""); - /* We SUCCEED (or FAIL) in one of the following cases: */ + /* We SUCCEED (or FAIL) in one of the following cases: */ - /* Case 1: D is at the beginning or the end of string. */ - if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d)) - not = !not; - else - { - /* C1 is the character before D, S1 is the syntax of C1, C2 - is the character at D, and S2 is the syntax of C2. */ - re_wchar_t c1, c2; - int s1, s2; - int dummy; + /* Case 1: D is at the beginning or the end of string. */ + if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d)) + not = !not; + else + { + /* C1 is the character before D, S1 is the syntax of C1, C2 + is the character at D, and S2 is the syntax of C2. */ + re_wchar_t c1, c2; + int s1, s2; + int dummy; #ifdef emacs - int offset = PTR_TO_OFFSET (d - 1); - int charpos = SYNTAX_TABLE_BYTE_TO_CHAR (offset); - UPDATE_SYNTAX_TABLE (charpos); + int offset = PTR_TO_OFFSET (d - 1); + int charpos = SYNTAX_TABLE_BYTE_TO_CHAR (offset); + UPDATE_SYNTAX_TABLE (charpos); #endif - GET_CHAR_BEFORE_2 (c1, d, string1, end1, string2, end2); - s1 = SYNTAX (c1); + GET_CHAR_BEFORE_2 (c1, d, string1, end1, string2, end2); + s1 = SYNTAX (c1); #ifdef emacs - UPDATE_SYNTAX_TABLE_FORWARD (charpos + 1); + UPDATE_SYNTAX_TABLE_FORWARD (charpos + 1); #endif - PREFETCH_NOLIMIT (); - GET_CHAR_AFTER (c2, d, dummy); - s2 = SYNTAX (c2); + PREFETCH_NOLIMIT (); + GET_CHAR_AFTER (c2, d, dummy); + s2 = SYNTAX (c2); - if (/* Case 2: Only one of S1 and S2 is Sword. */ - ((s1 == Sword) != (s2 == Sword)) - /* Case 3: Both of S1 and S2 are Sword, and macro - WORD_BOUNDARY_P (C1, C2) returns nonzero. */ - || ((s1 == Sword) && WORD_BOUNDARY_P (c1, c2))) - not = !not; - } - if (not) - break; - else - goto fail; + if (/* Case 2: Only one of S1 and S2 is Sword. */ + ((s1 == Sword) != (s2 == Sword)) + /* Case 3: Both of S1 and S2 are Sword, and macro + WORD_BOUNDARY_P (C1, C2) returns nonzero. */ + || ((s1 == Sword) && WORD_BOUNDARY_P (c1, c2))) + not = !not; + } + if (not) + break; + else + goto fail; + } case wordbeg: DEBUG_PRINT1 ("EXECUTING wordbeg.\n"); @@ -6224,27 +6224,29 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int case syntaxspec: case notsyntaxspec: - not = (re_opcode_t) *(p - 1) == notsyntaxspec; - mcnt = *p++; - DEBUG_PRINT3 ("EXECUTING %ssyntaxspec %d.\n", not?"not":"", mcnt); - PREFETCH (); + { + boolean not = (re_opcode_t) *(p - 1) == notsyntaxspec; + mcnt = *p++; + DEBUG_PRINT3 ("EXECUTING %ssyntaxspec %d.\n", not?"not":"", mcnt); + PREFETCH (); #ifdef emacs - { - int offset = PTR_TO_OFFSET (d); - int pos1 = SYNTAX_TABLE_BYTE_TO_CHAR (offset); - UPDATE_SYNTAX_TABLE (pos1); - } + { + int offset = PTR_TO_OFFSET (d); + int pos1 = SYNTAX_TABLE_BYTE_TO_CHAR (offset); + UPDATE_SYNTAX_TABLE (pos1); + } #endif - { - int len; - re_wchar_t c; + { + int len; + re_wchar_t c; - GET_CHAR_AFTER (c, d, len); - if ((SYNTAX (c) != (enum syntaxcode) mcnt) ^ not) - goto fail; - d += len; + GET_CHAR_AFTER (c, d, len); + if ((SYNTAX (c) != (enum syntaxcode) mcnt) ^ not) + goto fail; + d += len; + } + break; } - break; #ifdef emacs case before_dot: From abbd1bcfeca309634cb602bc570f22e232846568 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 11:32:28 -0700 Subject: [PATCH 275/383] * regex.c: (regex_compile, re_search_2, re_match_2_internal): Remove unused local vars. --- src/ChangeLog | 2 ++ src/regex.c | 13 +++---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 73669e11c98..2bcca8b0562 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT): Rename locals to avoid shadowing. (regex_compile, re_match_2_internal): Move locals to avoid shadowing. + (regex_compile, re_search_2, re_match_2_internal): + Remove unused local vars. * search.c (boyer_moore): Rename locals to avoid shadowing. * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. diff --git a/src/regex.c b/src/regex.c index 6babbfbed76..e79316d6bc6 100644 --- a/src/regex.c +++ b/src/regex.c @@ -2571,9 +2571,6 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct /* If the object matched can contain multibyte characters. */ const boolean multibyte = RE_MULTIBYTE_P (bufp); - /* If a target of matching can contain multibyte characters. */ - const boolean target_multibyte = RE_TARGET_MULTIBYTE_P (bufp); - /* Nonzero if we have pushed down into a subpattern. */ int in_subpattern = 0; @@ -2928,7 +2925,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct { boolean escaped_char = false; const unsigned char *p2 = p; - re_wchar_t ch, c2; + re_wchar_t ch; if (p == pend) FREE_STACK_RETURN (REG_EBRACK); @@ -2991,10 +2988,7 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct them). */ if (c == ':' && *p == ']') { - re_wctype_t cc; - int limit; - - cc = re_wctype (str); + re_wctype_t cc = re_wctype (str); if (cc == 0) FREE_STACK_RETURN (REG_ECTYPE); @@ -4558,7 +4552,6 @@ re_search_2 (struct re_pattern_buffer *bufp, const char *str1, int size1, const if (multibyte) { re_char *p = POS_ADDR_VSTRING (startpos); - re_char *pend = STOP_ADDR_VSTRING (startpos); int len = BYTES_BY_CHAR_HEAD (*p); range -= len; @@ -5462,7 +5455,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int else do { - int pat_charlen, buf_charlen; + int pat_charlen; int pat_ch, buf_ch; PREFETCH (); From 8fb3179241c11eef948f612d959521ac31af1560 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 11:37:02 -0700 Subject: [PATCH 276/383] * regex.c (re_match_2_internals): Fix one more "not". --- src/regex.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/regex.c b/src/regex.c index e79316d6bc6..0187a103b32 100644 --- a/src/regex.c +++ b/src/regex.c @@ -5613,8 +5613,8 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int if (!not) goto fail; d += len; - break; } + break; /* The beginning of a group is represented by start_memory. @@ -6238,8 +6238,8 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int goto fail; d += len; } - break; } + break; #ifdef emacs case before_dot: @@ -6262,18 +6262,21 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int case categoryspec: case notcategoryspec: - not = (re_opcode_t) *(p - 1) == notcategoryspec; - mcnt = *p++; - DEBUG_PRINT3 ("EXECUTING %scategoryspec %d.\n", not?"not":"", mcnt); - PREFETCH (); { - int len; - re_wchar_t c; + boolean not = (re_opcode_t) *(p - 1) == notcategoryspec; + mcnt = *p++; + DEBUG_PRINT3 ("EXECUTING %scategoryspec %d.\n", + not?"not":"", mcnt); + PREFETCH (); - GET_CHAR_AFTER (c, d, len); - if ((!CHAR_HAS_CATEGORY (c, mcnt)) ^ not) - goto fail; - d += len; + { + int len; + re_wchar_t c; + GET_CHAR_AFTER (c, d, len); + if ((!CHAR_HAS_CATEGORY (c, mcnt)) ^ not) + goto fail; + d += len; + } } break; From 0e48bb227a5b9cdabeb845422de33d62ccb1edc5 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 15 Mar 2011 19:38:57 +0100 Subject: [PATCH 277/383] * src/coding.c (detect_coding_iso_2022): Reorganize code to clarify structure. --- src/ChangeLog | 5 ++ src/coding.c | 159 +++++++++++++++++++++++++------------------------- 2 files changed, 85 insertions(+), 79 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a1538d8f3f7..72585209c24 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-15 Andreas Schwab + + * coding.c (detect_coding_iso_2022): Reorganize code to clarify + structure. + 2011-03-14 Juanma Barranquero * lisp.h (VWindow_system, Qfile_name_history): diff --git a/src/coding.c b/src/coding.c index 9a6a4484e50..0c2836c19f6 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2954,12 +2954,7 @@ detect_coding_iso_2022 (struct coding_system *coding, const unsigned char *src_end = coding->source + coding->src_bytes; int multibytep = coding->src_multibyte; int single_shifting = 0; - - /* FIXME: Does ID need to be initialized here? The "End of composition" - code below does not initialize ID even though ID is used - afterwards, and perhaps that is a bug. */ - int id = 0; - + int id; int c, c1; int consumed_chars = 0; int i; @@ -2999,40 +2994,11 @@ detect_coding_iso_2022 (struct coding_system *coding, break; single_shifting = 0; ONE_MORE_BYTE (c); - if (c >= '(' && c <= '/') - { - /* Designation sequence for a charset of dimension 1. */ - ONE_MORE_BYTE (c1); - if (c1 < ' ' || c1 >= 0x80 - || (id = iso_charset_table[0][c >= ','][c1]) < 0) - /* Invalid designation sequence. Just ignore. */ - break; - } - else if (c == '$') - { - /* Designation sequence for a charset of dimension 2. */ - ONE_MORE_BYTE (c); - if (c >= '@' && c <= 'B') - /* Designation for JISX0208.1978, GB2312, or JISX0208. */ - id = iso_charset_table[1][0][c]; - else if (c >= '(' && c <= '/') - { - ONE_MORE_BYTE (c1); - if (c1 < ' ' || c1 >= 0x80 - || (id = iso_charset_table[1][c >= ','][c1]) < 0) - /* Invalid designation sequence. Just ignore. */ - break; - } - else - /* Invalid designation sequence. Just ignore it. */ - break; - } - else if (c == 'N' || c == 'O') + if (c == 'N' || c == 'O') { /* ESC for SS2 or SS3. */ single_shifting = 1; rejected |= CATEGORY_MASK_ISO_7BIT | CATEGORY_MASK_ISO_8BIT; - break; } else if (c == '1') { @@ -3048,36 +3014,66 @@ detect_coding_iso_2022 (struct coding_system *coding, { /* ESC for start/end composition. */ composition_count = 0; - break; } else { - /* Invalid escape sequence. Just ignore it. */ - break; - } + if (c >= '(' && c <= '/') + { + /* Designation sequence for a charset of dimension 1. */ + ONE_MORE_BYTE (c1); + if (c1 < ' ' || c1 >= 0x80 + || (id = iso_charset_table[0][c >= ','][c1]) < 0) + /* Invalid designation sequence. Just ignore. */ + break; + } + else if (c == '$') + { + /* Designation sequence for a charset of dimension 2. */ + ONE_MORE_BYTE (c); + if (c >= '@' && c <= 'B') + /* Designation for JISX0208.1978, GB2312, or JISX0208. */ + id = iso_charset_table[1][0][c]; + else if (c >= '(' && c <= '/') + { + ONE_MORE_BYTE (c1); + if (c1 < ' ' || c1 >= 0x80 + || (id = iso_charset_table[1][c >= ','][c1]) < 0) + /* Invalid designation sequence. Just ignore. */ + break; + } + else + /* Invalid designation sequence. Just ignore it. */ + break; + } + else + { + /* Invalid escape sequence. Just ignore it. */ + break; + } - /* We found a valid designation sequence for CHARSET. */ - rejected |= CATEGORY_MASK_ISO_8BIT; - if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7], - id)) - found |= CATEGORY_MASK_ISO_7; - else - rejected |= CATEGORY_MASK_ISO_7; - if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_tight], - id)) - found |= CATEGORY_MASK_ISO_7_TIGHT; - else - rejected |= CATEGORY_MASK_ISO_7_TIGHT; - if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_else], - id)) - found |= CATEGORY_MASK_ISO_7_ELSE; - else - rejected |= CATEGORY_MASK_ISO_7_ELSE; - if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_8_else], - id)) - found |= CATEGORY_MASK_ISO_8_ELSE; - else - rejected |= CATEGORY_MASK_ISO_8_ELSE; + /* We found a valid designation sequence for CHARSET. */ + rejected |= CATEGORY_MASK_ISO_8BIT; + if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7], + id)) + found |= CATEGORY_MASK_ISO_7; + else + rejected |= CATEGORY_MASK_ISO_7; + if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_tight], + id)) + found |= CATEGORY_MASK_ISO_7_TIGHT; + else + rejected |= CATEGORY_MASK_ISO_7_TIGHT; + if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_else], + id)) + found |= CATEGORY_MASK_ISO_7_ELSE; + else + rejected |= CATEGORY_MASK_ISO_7_ELSE; + if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_8_else], + id)) + found |= CATEGORY_MASK_ISO_8_ELSE; + else + rejected |= CATEGORY_MASK_ISO_8_ELSE; + } break; case ISO_CODE_SO: @@ -3105,13 +3101,32 @@ detect_coding_iso_2022 (struct coding_system *coding, rejected |= CATEGORY_MASK_ISO_7BIT; if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1]) & CODING_ISO_FLAG_SINGLE_SHIFT) - found |= CATEGORY_MASK_ISO_8_1, single_shifting = 1; + { + found |= CATEGORY_MASK_ISO_8_1; + single_shifting = 1; + } if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_2]) & CODING_ISO_FLAG_SINGLE_SHIFT) - found |= CATEGORY_MASK_ISO_8_2, single_shifting = 1; + { + found |= CATEGORY_MASK_ISO_8_2; + single_shifting = 1; + } if (single_shifting) break; - goto check_extra_latin; + check_extra_latin: + if (! VECTORP (Vlatin_extra_code_table) + || NILP (XVECTOR (Vlatin_extra_code_table)->contents[c])) + { + rejected = CATEGORY_MASK_ISO; + break; + } + if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1]) + & CODING_ISO_FLAG_LATIN_EXTRA) + found |= CATEGORY_MASK_ISO_8_1; + else + rejected |= CATEGORY_MASK_ISO_8_1; + rejected |= CATEGORY_MASK_ISO_8_2; + break; default: if (c < 0) @@ -3162,20 +3177,6 @@ detect_coding_iso_2022 (struct coding_system *coding, } break; } - check_extra_latin: - single_shifting = 0; - if (! VECTORP (Vlatin_extra_code_table) - || NILP (XVECTOR (Vlatin_extra_code_table)->contents[c])) - { - rejected = CATEGORY_MASK_ISO; - break; - } - if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1]) - & CODING_ISO_FLAG_LATIN_EXTRA) - found |= CATEGORY_MASK_ISO_8_1; - else - rejected |= CATEGORY_MASK_ISO_8_1; - rejected |= CATEGORY_MASK_ISO_8_2; } } detect_info->rejected |= CATEGORY_MASK_ISO; From 952db0d7ad3872dd675d23f7e60ae3298a8d8d52 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 11:40:00 -0700 Subject: [PATCH 278/383] * regex.c (FREE_VAR): Rewrite so as not to use empty "else", which gcc can warn about. --- src/ChangeLog | 2 ++ src/regex.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2bcca8b0562..e533b07d41a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,8 @@ (regex_compile, re_match_2_internal): Move locals to avoid shadowing. (regex_compile, re_search_2, re_match_2_internal): Remove unused local vars. + (FREE_VAR): Rewrite so as not to use empty "else", + which gcc can warn about. * search.c (boyer_moore): Rename locals to avoid shadowing. * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. diff --git a/src/regex.c b/src/regex.c index 0187a103b32..9c950a42b22 100644 --- a/src/regex.c +++ b/src/regex.c @@ -4666,7 +4666,14 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2, /* Free everything we malloc. */ #ifdef MATCH_MAY_ALLOCATE -# define FREE_VAR(var) if (var) { REGEX_FREE (var); var = NULL; } else +# define FREE_VAR(var) \ + do { \ + if (var) \ + { \ + REGEX_FREE (var); \ + var = NULL; \ + } \ + } while (0) # define FREE_VARIABLES() \ do { \ REGEX_FREE_STACK (fail_stack.stack); \ From da053e48b16db6fa8dedd72d9d7f80c392259193 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 11:43:04 -0700 Subject: [PATCH 279/383] * regex.c (regex_compile, re_match_2_internal): Mark locals as initialized. --- src/ChangeLog | 1 + src/regex.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e533b07d41a..2ebe327e326 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,7 @@ Remove unused local vars. (FREE_VAR): Rewrite so as not to use empty "else", which gcc can warn about. + (regex_compile, re_match_2_internal): Mark locals as initialized. * search.c (boyer_moore): Rename locals to avoid shadowing. * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. diff --git a/src/regex.c b/src/regex.c index 9c950a42b22..6c6aa03e437 100644 --- a/src/regex.c +++ b/src/regex.c @@ -2576,9 +2576,9 @@ regex_compile (const re_char *pattern, size_t size, reg_syntax_t syntax, struct /* These hold the values of p, pattern, and pend from the main pattern when we have pushed into a subpattern. */ - re_char *main_p; - re_char *main_pattern; - re_char *main_pend; + re_char *main_p IF_LINT (= NULL); + re_char *main_pattern IF_LINT (= NULL); + re_char *main_pend IF_LINT (= NULL); #ifdef DEBUG debug++; @@ -5533,7 +5533,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const re_char *string1, int /* Start of actual range_table, or end of bitmap if there is no range table. */ - re_char *range_table; + re_char *range_table IF_LINT (= NULL); /* Nonzero if there is a range table. */ int range_table_exists; From b313f9d86378db4dd4619923572b07513c53ceac Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 11:53:29 -0700 Subject: [PATCH 280/383] * regex.c (RETALLOC_IF): Define only if needed. (WORDCHAR_P): Likewise. This one is never needed, but is used only in a comment talking about a compiler bug, so put inside the #if 0 of that comment. (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK): (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING): Remove; unused. --- src/ChangeLog | 7 +++++++ src/regex.c | 55 +++++++++++---------------------------------------- 2 files changed, 19 insertions(+), 43 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2ebe327e326..706612da945 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,6 +8,13 @@ (FREE_VAR): Rewrite so as not to use empty "else", which gcc can warn about. (regex_compile, re_match_2_internal): Mark locals as initialized. + (RETALLOC_IF): Define only if needed. + (WORDCHAR_P): Likewise. This one is never needed, but is used + only in a comment talking about a compiler bug, so put inside + the #if 0 of that comment. + (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK): + (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING): + Remove; unused. * search.c (boyer_moore): Rename locals to avoid shadowing. * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. diff --git a/src/regex.c b/src/regex.c index 6c6aa03e437..4194ccc7c00 100644 --- a/src/regex.c +++ b/src/regex.c @@ -551,8 +551,6 @@ init_syntax_once (void) /* (Re)Allocate N items of type T using malloc, or fail. */ #define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t))) #define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t))) -#define RETALLOC_IF(addr, n, t) \ - if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t) #define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t))) #define BYTEWIDTH 8 /* In bits. */ @@ -843,11 +841,6 @@ extract_number_and_incr (destination, source) ((p)[2 + CHARSET_BITMAP_SIZE (p)] \ + (p)[3 + CHARSET_BITMAP_SIZE (p)] * 0x100) -/* Test if C is listed in the bitmap of charset P. */ -#define CHARSET_LOOKUP_BITMAP(p, c) \ - ((c) < CHARSET_BITMAP_SIZE (p) * BYTEWIDTH \ - && (p)[2 + (c) / BYTEWIDTH] & (1 << ((c) % BYTEWIDTH))) - /* Return the address of end of RANGE_TABLE. COUNT is number of ranges (which is a pair of (start, end)) in the RANGE_TABLE. `* 2' is start of range and end of range. `* 3' is size of each start @@ -1413,7 +1406,6 @@ typedef struct } fail_stack_type; #define FAIL_STACK_EMPTY() (fail_stack.frame == 0) -#define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size) /* Define macros to initialize and free the failure stack. @@ -1433,8 +1425,6 @@ typedef struct fail_stack.avail = 0; \ fail_stack.frame = 0; \ } while (0) - -# define RESET_FAIL_STACK() REGEX_FREE_STACK (fail_stack.stack) #else # define INIT_FAIL_STACK() \ do { \ @@ -1442,7 +1432,8 @@ typedef struct fail_stack.frame = 0; \ } while (0) -# define RESET_FAIL_STACK() ((void)0) +# define RETALLOC_IF(addr, n, t) \ + if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t) #endif @@ -1495,17 +1486,10 @@ typedef struct #define PUSH_FAILURE_INT(item) \ fail_stack.stack[fail_stack.avail++].integer = (item) -/* Push a fail_stack_elt_t value onto the failure stack. - Assumes the variable `fail_stack'. Probably should only - be called from within `PUSH_FAILURE_POINT'. */ -#define PUSH_FAILURE_ELT(item) \ - fail_stack.stack[fail_stack.avail++] = (item) - -/* These three POP... operations complement the three PUSH... operations. +/* These POP... operations complement the PUSH... operations. All assume that `fail_stack' is nonempty. */ #define POP_FAILURE_POINTER() fail_stack.stack[--fail_stack.avail].pointer #define POP_FAILURE_INT() fail_stack.stack[--fail_stack.avail].integer -#define POP_FAILURE_ELT() fail_stack.stack[--fail_stack.avail] /* Individual items aside from the registers. */ #define NUM_NONREG_ITEMS 3 @@ -1765,16 +1749,6 @@ static int analyse_first _RE_ARGS ((re_char *p, re_char *pend, } while (0) -/* As with BUF_PUSH_2, except for three bytes. */ -#define BUF_PUSH_3(c1, c2, c3) \ - do { \ - GET_BUFFER_SPACE (3); \ - *b++ = (unsigned char) (c1); \ - *b++ = (unsigned char) (c2); \ - *b++ = (unsigned char) (c3); \ - } while (0) - - /* Store a jump with opcode OP at LOC to location TO. We store a relative address offset by the three bytes the jump itself occupies. */ #define STORE_JUMP(op, loc, to) \ @@ -4322,10 +4296,6 @@ WEAK_ALIAS (__re_search, re_search) #define HEAD_ADDR_VSTRING(P) \ (((P) >= size1 ? string2 : string1)) -/* End address of virtual concatenation of string. */ -#define STOP_ADDR_VSTRING(P) \ - (((P) >= size1 ? string2 + size2 : string1 + size1)) - /* Address of POS in the concatenation of virtual string. */ #define POS_ADDR_VSTRING(POS) \ (((POS) >= size1 ? string2 - size1 : string1) + (POS)) @@ -4636,16 +4606,6 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2, #define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) #define AT_STRINGS_END(d) ((d) == end2) - -/* Test if D points to a character which is word-constituent. We have - two special cases to check for: if past the end of string1, look at - the first character in string2; and if before the beginning of - string2, look at the last character in string1. */ -#define WORDCHAR_P(d) \ - (SYNTAX ((d) == end1 ? *string2 \ - : (d) == string2 - 1 ? *(end1 - 1) : *(d)) \ - == Sword) - /* Disabled due to a compiler bug -- see comment at case wordbound */ /* The comment at case wordbound is following one, but we don't use @@ -4657,6 +4617,15 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2, macro and introducing temporary variables works around the bug. */ #if 0 +/* Test if D points to a character which is word-constituent. We have + two special cases to check for: if past the end of string1, look at + the first character in string2; and if before the beginning of + string2, look at the last character in string1. */ +#define WORDCHAR_P(d) \ + (SYNTAX ((d) == end1 ? *string2 \ + : (d) == string2 - 1 ? *(end1 - 1) : *(d)) \ + == Sword) + /* Test if the character before D and the one at D differ with respect to being word-constituent. */ #define AT_WORD_BOUNDARY(d) \ From 2dab465b9edbb62db03cd5d2d9741415ba1014f6 Mon Sep 17 00:00:00 2001 From: Ken Manheimer Date: Tue, 15 Mar 2011 17:01:37 -0400 Subject: [PATCH 281/383] * allout.el (allout-make-topic-prefix) (allout-rebullet-heading): Invert the roles of character and string values for INSTEAD, so a string is used for the more common case of a defaulting prompt. --- lisp/ChangeLog | 6 ++++++ lisp/allout.el | 18 ++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 599cf5ba4d3..db21eb97cc0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-15 Ken Manheimer + + * allout.el (allout-make-topic-prefix) (allout-rebullet-heading): + Invert the roles of character and string values for INSTEAD, so a + string is used for the more common case of a defaulting prompt. + 2011-03-15 Stefan Monnier * progmodes/ruby-mode.el (ruby-backward-sexp): diff --git a/lisp/allout.el b/lisp/allout.el index a12101ea9a5..2df606e45c6 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -3496,8 +3496,8 @@ the current topics' depth. If INSTEAD is: - nil, then the bullet char for the context is used, per distinction or depth -- a string, then the first character of the string will be used -- a character, then the user is solicited for bullet, with that char as default +- a \(numeric) character, then character's string representation is used +- a string, then the user is asked for bullet with the first char as default - anything else, the user is solicited with bullet char per context as default \(INSTEAD overrides other options, including, eg, a distinctive @@ -3554,10 +3554,12 @@ index for each successive sibling)." ((progn (setq body (make-string (- depth 2) ?\ )) ;; The actual condition: instead) - (let* ((got - (if (and (stringp instead)(> (length instead) 0)) - (substring instead 0 1) - (allout-solicit-alternate-bullet depth instead)))) + (let ((got (cond ((stringp instead) + (if (> (length instead) 0) + (allout-solicit-alternate-bullet + depth (substring instead 0 1)))) + ((characterp instead) (char-to-string instead)) + (t (allout-solicit-alternate-bullet depth))))) ;; Gotta check whether we're numbering and got a numbered bullet: (setq numbering (and allout-numbered-bullet (not (and number-control (not index))) @@ -3951,8 +3953,8 @@ All args are optional. If INSTEAD is: - nil, then the bullet char for the context is used, per distinction or depth -- a string, then the first character of the string will be used -- a character, then the user is solicited for bullet, with that char as default +- a \(numeric) character, then character's string representation is used +- a string, then the user is asked for bullet with the first char as default - anything else, the user is solicited with bullet char per context as default Second arg DEPTH forces the topic prefix to that depth, regardless From 5da9919f99ebacbc511113134ef8f687a562d5b8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 14:14:06 -0700 Subject: [PATCH 282/383] Use functions, not macros, for up- and down-casing. --- src/buffer.h | 58 ++++++++++++++++++------------------------------ src/casefiddle.c | 22 +++++++++--------- src/dired.c | 4 ++-- src/editfns.c | 10 ++++----- src/fileio.c | 2 +- src/keyboard.c | 8 +++---- src/process.c | 2 +- src/regex.c | 4 ++-- src/search.c | 4 ++-- 9 files changed, 49 insertions(+), 65 deletions(-) diff --git a/src/buffer.h b/src/buffer.h index 996e4e59c27..d80875a0811 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -1027,46 +1027,30 @@ extern int last_per_buffer_idx; #define PER_BUFFER_VALUE(BUFFER, OFFSET) \ (*(Lisp_Object *)((OFFSET) + (char *) (BUFFER))) -/* Current buffer's map from characters to lower-case characters. */ - -#define DOWNCASE_TABLE BVAR (current_buffer, downcase_table) - -/* Current buffer's map from characters to upper-case characters. */ - -#define UPCASE_TABLE BVAR (current_buffer, upcase_table) - -/* Downcase a character, or make no change if that cannot be done. */ - -static inline EMACS_INT -downcase (int ch) +/* Downcase a character C, or make no change if that cannot be done. */ +static inline int +downcase (int c) { - Lisp_Object down = CHAR_TABLE_REF (DOWNCASE_TABLE, ch); - return NATNUMP (down) ? XFASTINT (down) : ch; + Lisp_Object downcase_table = BVAR (current_buffer, downcase_table); + Lisp_Object down = CHAR_TABLE_REF (downcase_table, c); + return NATNUMP (down) ? XFASTINT (down) : c; } -#define DOWNCASE(CH) downcase (CH) -/* 1 if CH is upper case. */ +/* 1 if C is upper case. */ +static inline int uppercasep (int c) { return downcase (c) != c; } -#define UPPERCASEP(CH) (DOWNCASE (CH) != (CH)) - -/* 1 if CH is neither upper nor lower case. */ - -#define NOCASEP(CH) (UPCASE1 (CH) == (CH)) - -/* 1 if CH is lower case. */ - -#define LOWERCASEP(CH) (!UPPERCASEP (CH) && !NOCASEP(CH)) - -/* Upcase a character, or make no change if that cannot be done. */ - -#define UPCASE(CH) (!UPPERCASEP (CH) ? UPCASE1 (CH) : (CH)) - -/* Upcase a character known to be not upper case. */ - -static inline EMACS_INT -upcase1 (int ch) +/* Upcase a character C known to be not upper case. */ +static inline int +upcase1 (int c) { - Lisp_Object up = CHAR_TABLE_REF (UPCASE_TABLE, ch); - return NATNUMP (up) ? XFASTINT (up) : ch; + Lisp_Object upcase_table = BVAR (current_buffer, upcase_table); + Lisp_Object up = CHAR_TABLE_REF (upcase_table, c); + return NATNUMP (up) ? XFASTINT (up) : c; } -#define UPCASE1(CH) upcase1 (CH) + +/* 1 if C is lower case. */ +static inline int lowercasep (int c) +{ return !uppercasep (c) && upcase1 (c) != c; } + +/* Upcase a character C, or make no change if that cannot be done. */ +static inline int upcase (int c) { return uppercasep (c) ? c : upcase1 (c); } diff --git a/src/casefiddle.c b/src/casefiddle.c index d2c7e572125..43ecd38dc7d 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -64,13 +64,13 @@ casify_object (enum case_action flag, Lisp_Object obj) multibyte = 1; if (! multibyte) MAKE_CHAR_MULTIBYTE (c1); - c = DOWNCASE (c1); + c = downcase (c1); if (inword) XSETFASTINT (obj, c | flags); else if (c == (XFASTINT (obj) & ~flagbits)) { if (! inword) - c = UPCASE1 (c1); + c = upcase1 (c1); if (! multibyte) MAKE_CHAR_UNIBYTE (c); XSETFASTINT (obj, c | flags); @@ -92,10 +92,10 @@ casify_object (enum case_action flag, Lisp_Object obj) MAKE_CHAR_MULTIBYTE (c); c1 = c; if (inword && flag != CASE_CAPITALIZE_UP) - c = DOWNCASE (c); - else if (!UPPERCASEP (c) + c = downcase (c); + else if (!uppercasep (c) && (!inword || flag != CASE_CAPITALIZE_UP)) - c = UPCASE1 (c1); + c = upcase1 (c1); if ((int) flag >= (int) CASE_CAPITALIZE) inword = (SYNTAX (c) == Sword); if (c != c1) @@ -133,10 +133,10 @@ casify_object (enum case_action flag, Lisp_Object obj) } c = STRING_CHAR_AND_LENGTH (SDATA (obj) + i_byte, len); if (inword && flag != CASE_CAPITALIZE_UP) - c = DOWNCASE (c); - else if (!UPPERCASEP (c) + c = downcase (c); + else if (!uppercasep (c) && (!inword || flag != CASE_CAPITALIZE_UP)) - c = UPCASE1 (c); + c = upcase1 (c); if ((int) flag >= (int) CASE_CAPITALIZE) inword = (SYNTAX (c) == Sword); o += CHAR_STRING (c, o); @@ -243,10 +243,10 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e) } c2 = c; if (inword && flag != CASE_CAPITALIZE_UP) - c = DOWNCASE (c); - else if (!UPPERCASEP (c) + c = downcase (c); + else if (!uppercasep (c) && (!inword || flag != CASE_CAPITALIZE_UP)) - c = UPCASE1 (c); + c = upcase1 (c); if ((int) flag >= (int) CASE_CAPITALIZE) inword = ((SYNTAX (c) == Sword) && (inword || !syntax_prefix_flag_p (c))); diff --git a/src/dired.c b/src/dired.c index 3e2ce5e96a6..176f14925b4 100644 --- a/src/dired.c +++ b/src/dired.c @@ -790,8 +790,8 @@ scmp (const char *s1, const char *s2, int len) if (completion_ignore_case) { while (l - && (DOWNCASE ((unsigned char) *s1++) - == DOWNCASE ((unsigned char) *s2++))) + && (downcase ((unsigned char) *s1++) + == downcase ((unsigned char) *s2++))) l--; } else diff --git a/src/editfns.c b/src/editfns.c index d92d3482d09..59cf269ef7b 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1374,7 +1374,7 @@ name, or nil if there is no such user. */) memcpy (r, p, q - p); r[q - p] = 0; strcat (r, SSDATA (login)); - r[q - p] = UPCASE ((unsigned char) r[q - p]); + r[q - p] = upcase ((unsigned char) r[q - p]); strcat (r, q + 1); full = build_string (r); } @@ -4213,7 +4213,7 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */) { int i1, i2; /* Check they're chars, not just integers, otherwise we could get array - bounds violations in DOWNCASE. */ + bounds violations in downcase. */ CHECK_CHARACTER (c1); CHECK_CHARACTER (c2); @@ -4224,7 +4224,7 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */) /* Do these in separate statements, then compare the variables. - because of the way DOWNCASE uses temp variables. */ + because of the way downcase uses temp variables. */ i1 = XFASTINT (c1); if (NILP (BVAR (current_buffer, enable_multibyte_characters)) && ! ASCII_CHAR_P (i1)) @@ -4237,8 +4237,8 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */) { MAKE_CHAR_MULTIBYTE (i2); } - i1 = DOWNCASE (i1); - i2 = DOWNCASE (i2); + i1 = downcase (i1); + i2 = downcase (i2); return (i1 == i2 ? Qt : Qnil); } diff --git a/src/fileio.c b/src/fileio.c index 826f2c18fbf..5d33fb93878 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -178,7 +178,7 @@ report_file_error (const char *string, Lisp_Object data) str = SSDATA (errstring); c = STRING_CHAR ((unsigned char *) str); - Faset (errstring, make_number (0), make_number (DOWNCASE (c))); + Faset (errstring, make_number (0), make_number (downcase (c))); } xsignal (Qfile_error, diff --git a/src/keyboard.c b/src/keyboard.c index 2a2e24f3b1b..fc8622de0a1 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -9836,7 +9836,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, && /* indec.start >= t && fkey.start >= t && */ keytran.start >= t && INTEGERP (key) && ((CHARACTERP (make_number (XINT (key) & ~CHAR_MODIFIER_MASK)) - && UPPERCASEP (XINT (key) & ~CHAR_MODIFIER_MASK)) + && uppercasep (XINT (key) & ~CHAR_MODIFIER_MASK)) || (XINT (key) & shift_modifier))) { Lisp_Object new_key; @@ -9847,7 +9847,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, if (XINT (key) & shift_modifier) XSETINT (new_key, XINT (key) & ~shift_modifier); else - XSETINT (new_key, (DOWNCASE (XINT (key) & ~CHAR_MODIFIER_MASK) + XSETINT (new_key, (downcase (XINT (key) & ~CHAR_MODIFIER_MASK) | (XINT (key) & CHAR_MODIFIER_MASK))); /* We have to do this unconditionally, regardless of whether @@ -9875,13 +9875,13 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, || (INTEGERP (key) && (KEY_TO_CHAR (key) < XCHAR_TABLE (BVAR (current_buffer, downcase_table))->size) - && UPPERCASEP (KEY_TO_CHAR (key)))) + && uppercasep (KEY_TO_CHAR (key)))) { Lisp_Object new_key = (modifiers & shift_modifier ? apply_modifiers (modifiers & ~shift_modifier, XCAR (breakdown)) - : make_number (DOWNCASE (KEY_TO_CHAR (key)) | modifiers)); + : make_number (downcase (KEY_TO_CHAR (key)) | modifiers)); original_uppercase = key; original_uppercase_position = t - 1; diff --git a/src/process.c b/src/process.c index c8f329c244b..7bfd2a3258a 100644 --- a/src/process.c +++ b/src/process.c @@ -495,7 +495,7 @@ status_message (struct Lisp_Process *p) string = (code_convert_string_norecord (string, Vlocale_coding_system, 0)); c1 = STRING_CHAR (SDATA (string)); - c2 = DOWNCASE (c1); + c2 = downcase (c1); if (c1 != c2) Faset (string, make_number (0), make_number (c2)); } diff --git a/src/regex.c b/src/regex.c index 4194ccc7c00..e6d0da96312 100644 --- a/src/regex.c +++ b/src/regex.c @@ -340,7 +340,7 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 }; || ((c) >= 'A' && (c) <= 'Z')) \ : SYNTAX (c) == Sword) -# define ISLOWER(c) (LOWERCASEP (c)) +# define ISLOWER(c) lowercasep (c) # define ISPUNCT(c) (IS_REAL_ASCII (c) \ ? ((c) > ' ' && (c) < 0177 \ @@ -351,7 +351,7 @@ enum syntaxcode { Swhitespace = 0, Sword = 1, Ssymbol = 2 }; # define ISSPACE(c) (SYNTAX (c) == Swhitespace) -# define ISUPPER(c) (UPPERCASEP (c)) +# define ISUPPER(c) uppercasep (c) # define ISWORD(c) (SYNTAX (c) == Sword) diff --git a/src/search.c b/src/search.c index 9869a7aad55..bf93a7fe442 100644 --- a/src/search.c +++ b/src/search.c @@ -2469,7 +2469,7 @@ since only regular expressions have distinguished subexpressions. */) else FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c, string, pos, pos_byte); - if (LOWERCASEP (c)) + if (lowercasep (c)) { /* Cannot be all caps if any original char is lower case */ @@ -2479,7 +2479,7 @@ since only regular expressions have distinguished subexpressions. */) else some_multiletter_word = 1; } - else if (UPPERCASEP (c)) + else if (uppercasep (c)) { some_uppercase = 1; if (SYNTAX (prevc) != Sword) From 880433015d01974c015718f73c203ad36e47139b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 14:22:21 -0700 Subject: [PATCH 283/383] Add ChangeLog entry for previous change. --- src/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 706612da945..a02d1473b4c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2011-03-15 Paul Eggert + Use functions, not macros, for up- and down-casing (Bug#8254). + * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP): + (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed + to use the following functions instead of these macros. + (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not + EMACS_INT, since callers assume the returned value fits in int. + (upcase1): Likewise, for UPCASE_TABLE. + (uppercasep, lowercasep, upcase): New static inline functions. + * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT): Rename locals to avoid shadowing. (regex_compile, re_match_2_internal): Move locals to avoid shadowing. From 0da09c43ea240c1f07e1f9c2e9f40cd9fcbb862f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 14:23:02 -0700 Subject: [PATCH 284/383] * editfns.c (Fchar_equal): Remove no-longer-needed workaround for the race-condition problem the old DOWNCASE. --- src/ChangeLog | 2 ++ src/editfns.c | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index a02d1473b4c..6cacc4576fb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,6 +8,8 @@ EMACS_INT, since callers assume the returned value fits in int. (upcase1): Likewise, for UPCASE_TABLE. (uppercasep, lowercasep, upcase): New static inline functions. + * editfns.c (Fchar_equal): Remove no-longer-needed workaround for + the race-condition problem the old DOWNCASE. * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT): Rename locals to avoid shadowing. diff --git a/src/editfns.c b/src/editfns.c index 59cf269ef7b..8d428eb4815 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -4222,9 +4222,6 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */) if (NILP (BVAR (current_buffer, case_fold_search))) return Qnil; - /* Do these in separate statements, - then compare the variables. - because of the way downcase uses temp variables. */ i1 = XFASTINT (c1); if (NILP (BVAR (current_buffer, enable_multibyte_characters)) && ! ASCII_CHAR_P (i1)) @@ -4237,9 +4234,7 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */) { MAKE_CHAR_MULTIBYTE (i2); } - i1 = downcase (i1); - i2 = downcase (i2); - return (i1 == i2 ? Qt : Qnil); + return (downcase (i1) == downcase (i2) ? Qt : Qnil); } /* Transpose the markers in two regions of the current buffer, and From db69b0cde386ed1e4cc928f5beb916107ee9fc88 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 14:23:54 -0700 Subject: [PATCH 285/383] Fix typo in ChangeLog. --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6cacc4576fb..91d5069d559 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -9,7 +9,7 @@ (upcase1): Likewise, for UPCASE_TABLE. (uppercasep, lowercasep, upcase): New static inline functions. * editfns.c (Fchar_equal): Remove no-longer-needed workaround for - the race-condition problem the old DOWNCASE. + the race-condition problem in the old DOWNCASE. * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT): Rename locals to avoid shadowing. From 4da60324405c45ce25b1de07c959b411463336db Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 14:33:24 -0700 Subject: [PATCH 286/383] * regex.c (IF_LINT): Add defn, for benefit of ../lib-src. --- src/ChangeLog | 2 ++ src/regex.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 91d5069d559..2ebee67dba2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-15 Paul Eggert + * regex.c (IF_LINT): Add defn, for benefit of ../lib-src. + Use functions, not macros, for up- and down-casing (Bug#8254). * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP): (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed diff --git a/src/regex.c b/src/regex.c index e6d0da96312..a60ff0ce35c 100644 --- a/src/regex.c +++ b/src/regex.c @@ -1267,6 +1267,13 @@ print_double_string (where, string1, size1, string2, size2) #endif /* not DEBUG */ +/* Use this to suppress gcc's `...may be used before initialized' warnings. */ +#ifdef lint +# define IF_LINT(Code) Code +#else +# define IF_LINT(Code) /* empty */ +#endif + /* Set by `re_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ From 76ef09b7c8407733a7e55dd1b14e7807ba83ae5b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 14:37:03 -0700 Subject: [PATCH 287/383] * character.h (PREV_CHAR_BOUNDARY): Rename local to avoid shadowing. --- src/ChangeLog | 3 ++- src/character.h | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2ebee67dba2..aa03ad660b7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -30,7 +30,8 @@ Remove; unused. * search.c (boyer_moore): Rename locals to avoid shadowing. - * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): Likewise. + * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE): + (PREV_CHAR_BOUNDARY): Likewise. * search.c (simple_search): Remove unused var. diff --git a/src/character.h b/src/character.h index ad1577a5c90..f0b0002032e 100644 --- a/src/character.h +++ b/src/character.h @@ -278,11 +278,11 @@ along with GNU Emacs. If not, see . */ do { \ if ((p) > (limit)) \ { \ - const unsigned char *p0 = (p); \ + const unsigned char *pcb = (p); \ do { \ - p0--; \ - } while (p0 >= limit && ! CHAR_HEAD_P (*p0)); \ - (p) = (BYTES_BY_CHAR_HEAD (*p0) == (p) - p0) ? p0 : (p) - 1; \ + pcb--; \ + } while (pcb >= limit && ! CHAR_HEAD_P (*pcb)); \ + (p) = (BYTES_BY_CHAR_HEAD (*pcb) == (p) - pcb) ? pcb : (p) - 1; \ } \ } while (0) From e5aab7e74931e4b4b0fd21abf4a6ea5b7f5134f4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 14:56:37 -0700 Subject: [PATCH 288/383] * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this avoids undefined behavior in theory. --- src/ChangeLog | 4 ++++ src/alloc.c | 4 ++-- src/lisp.h | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index aa03ad660b7..d34e3478255 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-15 Paul Eggert + * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. + * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this + avoids undefined behavior in theory. + * regex.c (IF_LINT): Add defn, for benefit of ../lib-src. Use functions, not macros, for up- and down-casing (Bug#8254). diff --git a/src/alloc.c b/src/alloc.c index d6b64de5af9..1ad8af0d61a 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2653,17 +2653,17 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, return val; } +#ifdef GC_CHECK_CONS_LIST /* Get an error now if there's any junk in the cons free list. */ void check_cons_list (void) { -#ifdef GC_CHECK_CONS_LIST struct Lisp_Cons *tail = cons_free_list; while (tail) tail = tail->u.chain; -#endif } +#endif /* Make a list of 1, 2, 3, 4 or 5 specified objects. */ diff --git a/src/lisp.h b/src/lisp.h index ec45b83863b..79f3b2f980b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -27,9 +27,10 @@ along with GNU Emacs. If not, see . */ types of run time checks for Lisp objects. */ #ifdef GC_CHECK_CONS_LIST -#define CHECK_CONS_LIST() check_cons_list() +extern void check_cons_list (void); +#define CHECK_CONS_LIST() check_cons_list () #else -#define CHECK_CONS_LIST() ((void)0) +#define CHECK_CONS_LIST() ((void) 0) #endif /* These are default choices for the types to use. */ From ae35e7564b5fc774798d5e9494123a2ff0522885 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 15:02:48 -0700 Subject: [PATCH 289/383] * alloc.c: (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect): Rename locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/alloc.c | 44 ++++++++++++++++++++++---------------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d34e3478255..15b6cba0278 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,9 @@ 2011-03-15 Paul Eggert * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. + (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect): + Rename locals to avoid shadowing. + * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this avoids undefined behavior in theory. diff --git a/src/alloc.c b/src/alloc.c index 1ad8af0d61a..6f379ef35f9 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2903,15 +2903,15 @@ See also the function `vector'. */) { Lisp_Object vector; register EMACS_INT sizei; - register EMACS_INT index; + register EMACS_INT i; register struct Lisp_Vector *p; CHECK_NATNUM (length); sizei = XFASTINT (length); p = allocate_vector (sizei); - for (index = 0; index < sizei; index++) - p->contents[index] = init; + for (i = 0; i < sizei; i++) + p->contents[i] = init; XSETVECTOR (vector, p); return vector; @@ -2925,14 +2925,14 @@ usage: (vector &rest OBJECTS) */) (register int nargs, Lisp_Object *args) { register Lisp_Object len, val; - register int index; + register int i; register struct Lisp_Vector *p; XSETFASTINT (len, nargs); val = Fmake_vector (len, Qnil); p = XVECTOR (val); - for (index = 0; index < nargs; index++) - p->contents[index] = args[index]; + for (i = 0; i < nargs; i++) + p->contents[i] = args[i]; return val; } @@ -2947,7 +2947,7 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT (register int nargs, Lisp_Object *args) { register Lisp_Object len, val; - register int index; + register int i; register struct Lisp_Vector *p; XSETFASTINT (len, nargs); @@ -2965,11 +2965,11 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT args[1] = Fstring_as_unibyte (args[1]); p = XVECTOR (val); - for (index = 0; index < nargs; index++) + for (i = 0; i < nargs; i++) { if (!NILP (Vpurify_flag)) - args[index] = Fpurecopy (args[index]); - p->contents[index] = args[index]; + args[i] = Fpurecopy (args[i]); + p->contents[i] = args[i]; } XSETPVECTYPE (p, PVEC_COMPILED); XSETCOMPILED (val, p); @@ -5063,18 +5063,18 @@ returns nil, because real GC can't be done. */) if (FLOATP (Vgc_cons_percentage)) { /* Set gc_cons_combined_threshold. */ - EMACS_INT total = 0; + EMACS_INT tot = 0; - total += total_conses * sizeof (struct Lisp_Cons); - total += total_symbols * sizeof (struct Lisp_Symbol); - total += total_markers * sizeof (union Lisp_Misc); - total += total_string_size; - total += total_vector_size * sizeof (Lisp_Object); - total += total_floats * sizeof (struct Lisp_Float); - total += total_intervals * sizeof (struct interval); - total += total_strings * sizeof (struct Lisp_String); + tot += total_conses * sizeof (struct Lisp_Cons); + tot += total_symbols * sizeof (struct Lisp_Symbol); + tot += total_markers * sizeof (union Lisp_Misc); + tot += total_string_size; + tot += total_vector_size * sizeof (Lisp_Object); + tot += total_floats * sizeof (struct Lisp_Float); + tot += total_intervals * sizeof (struct interval); + tot += total_strings * sizeof (struct Lisp_String); - gc_relative_threshold = total * XFLOAT_DATA (Vgc_cons_percentage); + gc_relative_threshold = tot * XFLOAT_DATA (Vgc_cons_percentage); } else gc_relative_threshold = 0; @@ -5123,9 +5123,9 @@ returns nil, because real GC can't be done. */) if (!NILP (Vpost_gc_hook)) { - int count = inhibit_garbage_collection (); + int gc_count = inhibit_garbage_collection (); safe_run_hooks (Qpost_gc_hook); - unbind_to (count, Qnil); + unbind_to (gc_count, Qnil); } /* Accumulate statistics. */ From dff45157417d1620c4fb7b6c117cc89142009b69 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 15:09:50 -0700 Subject: [PATCH 290/383] * alloc.c (mark_stack): Move local variables into the #ifdef region where they're used. --- src/ChangeLog | 2 ++ src/alloc.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 15b6cba0278..34fdc1473be 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,8 @@ * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect): Rename locals to avoid shadowing. + (mark_stack): Move local variables into the #ifdef region where + they're used. * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this avoids undefined behavior in theory. diff --git a/src/alloc.c b/src/alloc.c index 6f379ef35f9..fd1334a6ef7 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4312,12 +4312,6 @@ static void mark_stack (void) { int i; - /* jmp_buf may not be aligned enough on darwin-ppc64 */ - union aligned_jmpbuf { - Lisp_Object o; - jmp_buf j; - } j; - volatile int stack_grows_down_p = (char *) &j > (char *) stack_base; void *end; #ifdef HAVE___BUILTIN_UNWIND_INIT @@ -4327,6 +4321,14 @@ mark_stack (void) __builtin_unwind_init (); end = &end; #else /* not HAVE___BUILTIN_UNWIND_INIT */ +#ifndef GC_SAVE_REGISTERS_ON_STACK + /* jmp_buf may not be aligned enough on darwin-ppc64 */ + union aligned_jmpbuf { + Lisp_Object o; + jmp_buf j; + } j; + volatile int stack_grows_down_p = (char *) &j > (char *) stack_base; +#endif /* This trick flushes the register windows so that all the state of the process is contained in the stack. */ /* Fixme: Code in the Boehm GC suggests flushing (with `flushrs') is From 7bc26fdb5c3b50b29bff966a55394e730fbfadd8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 15:31:22 -0700 Subject: [PATCH 291/383] * alloc.c (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not needed otherwise. (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS. (GC_STRING_CHARS): Remove; not used. --- src/ChangeLog | 5 +++++ src/alloc.c | 15 +++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 34fdc1473be..9f8c2166364 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,11 @@ Rename locals to avoid shadowing. (mark_stack): Move local variables into the #ifdef region where they're used. + (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if + ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not + needed otherwise. + (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS. + (GC_STRING_CHARS): Remove; not used. * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this avoids undefined behavior in theory. diff --git a/src/alloc.c b/src/alloc.c index fd1334a6ef7..7fa2790cb1e 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -92,7 +92,8 @@ extern __malloc_size_t __malloc_extra_blocks; #endif /* not DOUG_LEA_MALLOC */ -#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) +#if ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT +#ifdef HAVE_GTK_AND_PTHREAD /* When GTK uses the file chooser dialog, different backends can be loaded dynamically. One such a backend is the Gnome VFS backend that gets loaded @@ -130,12 +131,13 @@ static pthread_mutex_t alloc_mutex; } \ while (0) -#else /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */ +#else /* ! defined HAVE_GTK_AND_PTHREAD */ #define BLOCK_INPUT_ALLOC BLOCK_INPUT #define UNBLOCK_INPUT_ALLOC UNBLOCK_INPUT -#endif /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */ +#endif /* ! defined HAVE_GTK_AND_PTHREAD */ +#endif /* ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT */ /* Value of _bytes_used, when spare_memory was freed. */ @@ -152,13 +154,11 @@ static __malloc_size_t bytes_used_when_full; #define VECTOR_UNMARK(V) ((V)->size &= ~ARRAY_MARK_FLAG) #define VECTOR_MARKED_P(V) (((V)->size & ARRAY_MARK_FLAG) != 0) -/* Value is the number of bytes/chars of S, a pointer to a struct - Lisp_String. This must be used instead of STRING_BYTES (S) or - S->size during GC, because S->size contains the mark bit for +/* Value is the number of bytes of S, a pointer to a struct Lisp_String. + Be careful during GC, because S->size contains the mark bit for strings. */ #define GC_STRING_BYTES(S) (STRING_BYTES (S)) -#define GC_STRING_CHARS(S) ((S)->size & ~ARRAY_MARK_FLAG) /* Global variables. */ struct emacs_globals globals; @@ -5306,7 +5306,6 @@ mark_object (Lisp_Object arg) #else /* not GC_CHECK_MARKED_OBJECTS */ -#define CHECK_ALLOCATED() (void) 0 #define CHECK_LIVE(LIVEP) (void) 0 #define CHECK_ALLOCATED_AND_LIVE(LIVEP) (void) 0 From d40d4be1bdebdc52a6061534d5ed1a76f54a1272 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 15:37:59 -0700 Subject: [PATCH 292/383] * alloc.c (Fmemory_limit): Cast sbrk's returned value to char *. --- src/ChangeLog | 1 + src/alloc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9f8c2166364..d62b1e2464b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -10,6 +10,7 @@ needed otherwise. (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS. (GC_STRING_CHARS): Remove; not used. + (Fmemory_limit): Cast sbrk's returned value to char *. * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this avoids undefined behavior in theory. diff --git a/src/alloc.c b/src/alloc.c index 7fa2790cb1e..6262e002ed3 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6057,7 +6057,7 @@ We divide the value by 1024 to make sure it fits in a Lisp integer. */) { Lisp_Object end; - XSETINT (end, (EMACS_INT) sbrk (0) / 1024); + XSETINT (end, (EMACS_INT) (char *) sbrk (0) / 1024); return end; } From a123622dc48a5f0e0eb32c07ce05c85e16e09c1d Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Tue, 15 Mar 2011 22:38:41 +0000 Subject: [PATCH 293/383] Merge changes made in Gnus trunk. message.texi (Insertion Variables): Document message-cite-style. nnimap.el (nnimap-open-connection-1): Allow `network-only', too. gssapi.el: New file separated out from imap.el to provide a general Kerberos 5 connection facility for Emacs. message.el (message-elide-ellipsis): Document the format spec ellipsis. message.el (message-elide-region): Allow the ellipsis to say how many lines were removed. gnus-win.el (gnus-configure-frame): Protect against trying to restore window configurations containing buffers that are now dead. nnimap.el (nnimap-parse-flags): Remove all MODSEQ entries before parsing to avoid integer overflows. (nnimap-parse-flags): Simplify the last change. (nnimap-parse-flags): Store HIGHESTMODSEQ as a string, since it may be too large for 32-bit Emacsen. gnus-art.el (gnus-article-treat-body-boundary): Fix boundary width on XEmacs, which was one character too wide. gnus-sum.el (gnus-articles-to-read): Use gnus-large-newsgroup as default number of articles to display. (gnus-articles-to-read): Use pretty names for prompt. gnus-int.el (gnus-open-server): Ditto. gnus-start.el (gnus-activate-group): Give a backtrace if debug-on-quit is set and the user hits `C-g'. (gnus-read-active-file): Ditto. gnus-group.el (gnus-group-read-ephemeral-group): Ditto. --- doc/misc/ChangeLog | 6 ++- doc/misc/message.texi | 19 ++++++++ lisp/gnus/ChangeLog | 47 ++++++++++++++++++ lisp/gnus/gnus-art.el | 8 +-- lisp/gnus/gnus-group.el | 5 +- lisp/gnus/gnus-int.el | 4 +- lisp/gnus/gnus-start.el | 9 ++-- lisp/gnus/gnus-sum.el | 16 +++--- lisp/gnus/gnus-win.el | 6 ++- lisp/gnus/gssapi.el | 105 ++++++++++++++++++++++++++++++++++++++++ lisp/gnus/message.el | 14 ++++-- lisp/gnus/nnimap.el | 25 +++++----- 12 files changed, 227 insertions(+), 37 deletions(-) create mode 100644 lisp/gnus/gssapi.el diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index ecb6cceda91..be1b4c46fba 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,4 +1,8 @@ -2011-03-14 Michael Albinus +2011-03-15 Antoine Levitt + + * message.texi (Insertion Variables): Document message-cite-style. + +2011-03-14 Michael Albinus * tramp.texi (Remote processes): New subsection "Running shell on a remote host". diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 2937037ebb3..7d61ffd9efa 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -1930,6 +1930,25 @@ posting a prepared news message. @section Insertion Variables @table @code +@item message-cite-style +@vindex message-cite-style +The overall style to be used when replying to messages. This controls +things like where the reply should be put relative to the original, +how the citation is formatted, where the signature goes, etc. + +Value is either @code{nil} (no variable overrides) or a let-style list +of pairs @code{(VARIABLE VALUE)} to override default values. + +See @code{gnus-posting-styles} to set this variable for specific +groups. Presets to impersonate popular mail agents are available in the +@code{message-cite-style-*} variables. + +@item message-cite-reply-position +@vindex message-cite-reply-position +Where the reply should be positioned. Available styles are +@code{traditional} to reply inline, @code{above} for top-posting, and +@code{below} for bottom-posting + @item message-ignored-cited-headers @vindex message-ignored-cited-headers All headers that match this regexp will be removed from yanked diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index d806f0ac342..1b4cd186951 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,8 +1,55 @@ +2011-03-15 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-open-connection-1): Allow `network-only', too. + + * gssapi.el: New file separated out from imap.el to provide a general + Kerberos 5 connection facility for Emacs. + + * message.el (message-elide-ellipsis): Document the format spec + ellipsis. + +2011-03-15 Reiner Steib + + * message.el (message-elide-region): Allow the ellipsis to say how many + lines were removed. + +2011-03-15 Lars Magne Ingebrigtsen + + * gnus-win.el (gnus-configure-frame): Protect against trying to restore + window configurations containing buffers that are now dead. + + * nnimap.el (nnimap-parse-flags): Remove all MODSEQ entries before + parsing to avoid integer overflows. + (nnimap-parse-flags): Simplify the last change. + (nnimap-parse-flags): Store HIGHESTMODSEQ as a string, since it may be + too large for 32-bit Emacsen. + 2011-03-15 Stefan Monnier * auth-source.el (auth-source-netrc-create): * message.el (message-yank-original): Fix use of `case'. +2011-03-15 Nelson Ferreira (tiny change) + + * gnus-art.el (gnus-article-treat-body-boundary): Fix boundary width on + XEmacs, which was one character too wide. + +2011-03-09 Antoine Levitt + + * gnus-sum.el (gnus-articles-to-read): Use gnus-large-newsgroup as + default number of articles to display. + (gnus-articles-to-read): Use pretty names for prompt. + +2011-03-15 Lars Magne Ingebrigtsen + + * gnus-int.el (gnus-open-server): Ditto. + + * gnus-start.el (gnus-activate-group): Give a backtrace if + debug-on-quit is set and the user hits `C-g'. + (gnus-read-active-file): Ditto. + + * gnus-group.el (gnus-group-read-ephemeral-group): Ditto. + 2011-03-15 Teodor Zlatanov * message.el (message-yank-original): Use cond instead of CL case. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index c64138b43d7..20ffa8eed6b 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -2337,10 +2337,12 @@ long lines if and only if arg is positive." (let ((start (point))) (insert "X-Boundary: ") (gnus-add-text-properties start (point) '(invisible t intangible t)) - (insert (let (str) - (while (>= (window-width) (length str)) + (insert (let (str (max (window-width))) + (if (featurep 'xemacs) + (setq max (1- max))) + (while (>= max (length str)) (setq str (concat str gnus-body-boundary-delimiter))) - (substring str 0 (window-width))) + (substring str 0 max)) "\n") (gnus-put-text-property start (point) 'gnus-decoration 'header))))) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 9ed3cf02a49..e928811b558 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -2313,9 +2313,10 @@ Return the name of the group if selection was successful." gnus-fetch-old-ephemeral-headers)) (gnus-group-read-group (or number t) t group select-articles)) group) - ;;(error nil) (quit - (message "Quit reading the ephemeral group") + (if debug-on-quit + (debug "Quit") + (message "Quit reading the ephemeral group")) nil))))) (defcustom gnus-gmane-group-download-format diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index a67063bb970..ef15a479892 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -270,7 +270,9 @@ If it is down, start it up (again)." server (error-message-string err)) nil) (quit - (gnus-message 1 "Quit trying to open server %s" server) + (if debug-on-quit + (debug "Quit") + (gnus-message 1 "Quit trying to open server %s" server)) nil))) open-offline) ;; If this hasn't been opened before, we add it to the list. diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index c6ff6044b92..afded87fe37 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1462,9 +1462,10 @@ If SCAN, request a scan of that group as well." (inline (gnus-request-group group (or dont-sub-check dont-check) method (gnus-get-info group))) - ;;(error nil) (quit - (message "Quit activating %s" group) + (if debug-on-quit + (debug "Quit") + (message "Quit activating %s" group)) nil))) (unless dont-check (setq active (gnus-parse-active)) @@ -2004,7 +2005,9 @@ If SCAN, request a scan of that group as well." ;; We catch C-g so that we can continue past servers ;; that do not respond. (quit - (message "Quit reading the active file") + (if debug-on-quit + (debug "Quit") + (message "Quit reading the active file")) nil)))))))) (defun gnus-read-active-file-1 (method force) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index a8786e39c7b..bc572f2f429 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5848,13 +5848,13 @@ If SELECT-ARTICLES, only select those articles from GROUP." (input (read-string (format - "How many articles from %s (%s %d): " - (gnus-group-decoded-name gnus-newsgroup-name) - (if initial "max" "default") - number) - (if initial - (cons (number-to-string initial) - 0))))) + "How many articles from %s (available %d, default %d): " + (gnus-group-decoded-name (gnus-group-real-name gnus-newsgroup-name)) + number + (or initial gnus-large-newsgroup)) + nil + nil + (number-to-string (or initial gnus-large-newsgroup))))) (if (string-match "^[ \t]*$" input) number input))) ((and (> scored marked) (< scored number) (> (- scored number) 20)) @@ -5862,7 +5862,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (read-string (format "%s %s (%d scored, %d total): " "How many articles from" - (gnus-group-decoded-name group) + (gnus-group-decoded-name (gnus-group-real-name gnus-newsgroup-name)) scored number)))) (if (string-match "^[ \t]*$" input) number input))) diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el index 156f9a020fd..c38f57d96cb 100644 --- a/lisp/gnus/gnus-win.el +++ b/lisp/gnus/gnus-win.el @@ -268,8 +268,10 @@ See the Gnus manual for an explanation of the syntax used.") (error "Invalid buffer type: %s" type)) (let ((buf (gnus-get-buffer-create (gnus-window-to-buffer-helper buffer)))) - (if (eq buf (window-buffer (selected-window))) (set-buffer buf) - (switch-to-buffer buf))) + (when (buffer-name buf) + (if (eq buf (window-buffer (selected-window))) + (set-buffer buf) + (switch-to-buffer buf)))) (when (memq 'frame-focus split) (setq gnus-window-frame-focus window)) ;; We return the window if it has the `point' spec. diff --git a/lisp/gnus/gssapi.el b/lisp/gnus/gssapi.el new file mode 100644 index 00000000000..3765fb84ee8 --- /dev/null +++ b/lisp/gnus/gssapi.el @@ -0,0 +1,105 @@ +;;; gssapi.el --- GSSAPI/Kerberos 5 interface for Emacs + +;; Copyright (C) 2011 Free Software Foundation, Inc. + +;; Author: Simon Josefsson +;; Lars Magne Ingebrigtsen +;; Keywords: network + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'format-spec) + +(defcustom gssapi-program (list + (concat "gsasl %s %p " + "--mechanism GSSAPI " + "--authentication-id %l") + "imtest -m gssapi -u %l -p %p %s") + "List of strings containing commands for GSSAPI (krb5) authentication. +%s is replaced with server hostname, %p with port to connect to, and +%l with the value of `imap-default-user'. The program should accept +IMAP commands on stdin and return responses to stdout. Each entry in +the list is tried until a successful connection is made." + :group 'network + :type '(repeat string)) + +(defun open-gssapi-stream (name buffer server port) + (let ((cmds gssapi-program) + cmd done) + (with-current-buffer buffer + (while (and (not done) + (setq cmd (pop cmds))) + (message "Opening GSSAPI connection with `%s'..." cmd) + (erase-buffer) + (let* ((coding-system-for-read 'binary) + (coding-system-for-write 'binary) + (process (start-process + name buffer shell-file-name shell-command-switch + (format-spec + cmd + (format-spec-make + ?s server + ?p (number-to-string port) + ?l imap-default-user)))) + response) + (when process + (while (and (memq (process-status process) '(open run)) + (goto-char (point-min)) + ;; Athena IMTEST can output SSL verify errors + (or (while (looking-at "^verify error:num=") + (forward-line)) + t) + (or (while (looking-at "^TLS connection established") + (forward-line)) + t) + ;; cyrus 1.6.x (13? < x <= 22) queries capabilities + (or (while (looking-at "^C:") + (forward-line)) + t) + ;; cyrus 1.6 imtest print "S: " before server greeting + (or (not (looking-at "S: ")) + (forward-char 3) + t) + ;; GNU SASL may print 'Trying ...' first. + (or (not (looking-at "Trying ")) + (forward-line) + t) + (not (and (looking-at "\\* \\(OK\\|PREAUTH\\|BYE\\) ") + ;; success in imtest 1.6: + (re-search-forward + (concat "^\\(\\(Authenticat.*\\)\\|\\(" + "Client authentication " + "finished.*\\)\\)") + nil t) + (setq response (match-string 1))))) + (accept-process-output process 1) + (sit-for 1)) + (erase-buffer) + (message "GSSAPI IMAP connection: %s" (or response "failed")) + (if (and response (let ((case-fold-search nil)) + (not (string-match "failed" response)))) + (setq done process) + (delete-process process) + nil)))) + done))) + +(provide 'gssapi) + +;;; gssapi.el ends here diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 1d0aaffa426..bb9215aca7c 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -49,6 +49,7 @@ (require 'mail-parse) (require 'mml) (require 'rfc822) +(require 'format-spec) (autoload 'mailclient-send-it "mailclient") ;; Emacs 22 or contrib/ @@ -438,7 +439,10 @@ whitespace)." :group 'message-various) (defcustom message-elide-ellipsis "\n[...]\n\n" - "*The string which is inserted for elided text." + "*The string which is inserted for elided text. +This is a format-spec string, and you can use %l to say how many +lines were removed, and %c to say how many characters were +removed." :type 'string :link '(custom-manual "(message)Various Commands") :group 'message-various) @@ -3535,8 +3539,12 @@ Note that this should not be used in newsgroups." An ellipsis (from `message-elide-ellipsis') will be inserted where the text was killed." (interactive "r") - (kill-region b e) - (insert message-elide-ellipsis)) + (let ((lines (count-lines b e)) + (chars (- e b))) + (kill-region b e) + (insert (format-spec message-elide-ellipsis + `((?l . ,lines) + (?c . ,chars)))))) (defvar message-caesar-translation-table nil) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index e76ead515c5..e0804f81e2e 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -340,6 +340,7 @@ textual parts.") (ports (cond ((or (eq nnimap-stream 'network) + (eq nnimap-stream 'network-only) (eq nnimap-stream 'starttls)) (nnheader-message 7 "Opening connection to %s..." nnimap-address) @@ -1452,6 +1453,11 @@ textual parts.") ;; Change \Delete etc to %Delete, so that the reader can read it. (subst-char-in-region (point-min) (point-max) ?\\ ?% t) + ;; Remove any MODSEQ entries in the buffer, because they may contain + ;; numbers that are too large for 32-bit Emacsen. + (while (re-search-forward " MODSEQ ([0-9]+)" nil t) + (replace-match "" t t)) + (goto-char (point-min)) (let (start end articles groups uidnext elems permanent-flags uidvalidity vanished highestmodseq) (dolist (elem sequences) @@ -1491,9 +1497,9 @@ textual parts.") (match-string 1))) (goto-char start) (setq highestmodseq - (and (search-forward "HIGHESTMODSEQ " + (and (re-search-forward "HIGHESTMODSEQ \\([0-9]+\\)" (or end (point-min)) t) - (read (current-buffer)))) + (match-string 1))) (goto-char end) (forward-line -1)) ;; The UID FETCH FLAGS was successful. @@ -1507,18 +1513,7 @@ textual parts.") (goto-char end)) (while (re-search-forward "^\\* [0-9]+ FETCH " start t) (let ((p (point))) - ;; FIXME: For FETCH lines like "* 2971 FETCH (FLAGS (%Recent) UID - ;; 12509 MODSEQ (13419098521433281274))" we get an - ;; overflow-error. The handler simply deletes that large number - ;; and reads again. But maybe there's a better fix... - (setq elems (condition-case nil (read (current-buffer)) - (overflow-error - ;; After an overflow-error, point is just after - ;; the too large number. So delete it and try - ;; again. - (delete-region (point) (progn (backward-word) (point))) - (goto-char p) - (read (current-buffer))))) + (setq elems (read (current-buffer))) (push (cons (cadr (memq 'UID elems)) (cadr (memq 'FLAGS elems))) articles))) @@ -1674,6 +1669,8 @@ textual parts.") (goto-char (point-max))) openp) (quit + (when debug-on-quit + (debug "Quit")) ;; The user hit C-g while we were waiting: kill the process, in case ;; it's a gnutls-cli process that's stuck (tends to happen a lot behind ;; NAT routers). From 448e0f792ba882b1876d2715865c870e1d24d505 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 15 Mar 2011 22:43:25 +0000 Subject: [PATCH 294/383] Indent. --- lisp/gnus/gnus-sum.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index bc572f2f429..0fa1d5979c7 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5849,12 +5849,14 @@ If SELECT-ARTICLES, only select those articles from GROUP." (read-string (format "How many articles from %s (available %d, default %d): " - (gnus-group-decoded-name (gnus-group-real-name gnus-newsgroup-name)) + (gnus-group-decoded-name + (gnus-group-real-name gnus-newsgroup-name)) number (or initial gnus-large-newsgroup)) nil nil - (number-to-string (or initial gnus-large-newsgroup))))) + (number-to-string + (or initial gnus-large-newsgroup))))) (if (string-match "^[ \t]*$" input) number input))) ((and (> scored marked) (< scored number) (> (- scored number) 20)) @@ -5862,7 +5864,8 @@ If SELECT-ARTICLES, only select those articles from GROUP." (read-string (format "%s %s (%d scored, %d total): " "How many articles from" - (gnus-group-decoded-name (gnus-group-real-name gnus-newsgroup-name)) + (gnus-group-decoded-name + (gnus-group-real-name gnus-newsgroup-name)) scored number)))) (if (string-match "^[ \t]*$" input) number input))) From 4c7468f6446a25c4abbbacf495d45e30103f26b7 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Tue, 15 Mar 2011 22:57:48 +0000 Subject: [PATCH 295/383] gnus-sum.el (gnus-articles-to-read): Revert back to old behaviour if we're selecting a group with unread articles. --- lisp/gnus/ChangeLog | 3 +++ lisp/gnus/gnus-sum.el | 27 ++++++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 1b4cd186951..27fdc563db9 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Lars Magne Ingebrigtsen + * gnus-sum.el (gnus-articles-to-read): Revert back to old behaviour if + we're selecting a group with unread articles. + * nnimap.el (nnimap-open-connection-1): Allow `network-only', too. * gssapi.el: New file separated out from imap.el to provide a general diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 0fa1d5979c7..385460378b1 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5798,7 +5798,8 @@ If SELECT-ARTICLES, only select those articles from GROUP." (defun gnus-articles-to-read (group &optional read-all) "Find out what articles the user wants to read." - (let* ((articles + (let* ((only-read-p t) + (articles ;; Select all articles if `read-all' is non-nil, or if there ;; are no unread articles. (if (or read-all @@ -5822,6 +5823,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (gnus-uncompress-range (gnus-active group))) (gnus-cache-articles-in-group group)) ;; Select only the "normal" subset of articles. + (setq only-read-p nil) (gnus-sorted-nunion (gnus-sorted-union gnus-newsgroup-dormant gnus-newsgroup-marked) gnus-newsgroup-unreads))) @@ -5845,18 +5847,25 @@ If SELECT-ARTICLES, only select those articles from GROUP." (let* ((cursor-in-echo-area nil) (initial (gnus-parameter-large-newsgroup-initial gnus-newsgroup-name)) + (default (if only-read-p + (or initial gnus-large-newsgroup) + number)) (input (read-string - (format - "How many articles from %s (available %d, default %d): " - (gnus-group-decoded-name - (gnus-group-real-name gnus-newsgroup-name)) - number - (or initial gnus-large-newsgroup)) + (if only-read-p + (format + "How many articles from %s (available %d, default %d): " + (gnus-group-decoded-name + (gnus-group-real-name gnus-newsgroup-name)) + number default) + (format + "How many articles from %s (%d available): " + (gnus-group-decoded-name + (gnus-group-real-name gnus-newsgroup-name)) + default)) nil nil - (number-to-string - (or initial gnus-large-newsgroup))))) + (number-to-string default)))) (if (string-match "^[ \t]*$" input) number input))) ((and (> scored marked) (< scored number) (> (- scored number) 20)) From 946f9a5b0a6df7470868acb8b39ad10b0866f73e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 16:03:11 -0700 Subject: [PATCH 296/383] * data.c (Findirect_variable): Name an expression, to avoid gcc -Wbad-function-cast warning. --- src/ChangeLog | 3 +++ src/data.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index d62b1e2464b..e2bff73bdb3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Paul Eggert + * data.c (Findirect_variable): Name an expression, to avoid + gcc -Wbad-function-cast warning. + * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect): Rename locals to avoid shadowing. diff --git a/src/data.c b/src/data.c index d0afca6a09f..288525cf5f5 100644 --- a/src/data.c +++ b/src/data.c @@ -805,7 +805,10 @@ variable chain of symbols. */) (Lisp_Object object) { if (SYMBOLP (object)) - XSETSYMBOL (object, indirect_variable (XSYMBOL (object))); + { + struct Lisp_Symbol *sym = indirect_variable (XSYMBOL (object)); + XSETSYMBOL (object, sym); + } return object; } From 112396d6542186a88963e08828cd66f6d7fe9543 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 16:06:01 -0700 Subject: [PATCH 297/383] * data.c (default_value, arithcompare, arith_driver, arith_error): Now static. --- src/ChangeLog | 1 + src/data.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e2bff73bdb3..37e2183ef70 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * data.c (Findirect_variable): Name an expression, to avoid gcc -Wbad-function-cast warning. + (default_value, arithcompare, arith_driver, arith_error): Now static. * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect): diff --git a/src/data.c b/src/data.c index 288525cf5f5..81c16fff489 100644 --- a/src/data.c +++ b/src/data.c @@ -1272,7 +1272,7 @@ set_internal (register Lisp_Object symbol, register Lisp_Object newval, register /* Return the default value of SYMBOL, but don't check for voidness. Return Qunbound if it is void. */ -Lisp_Object +static Lisp_Object default_value (Lisp_Object symbol) { struct Lisp_Symbol *sym; @@ -2219,7 +2219,7 @@ bool-vector. IDX starts at 0. */) enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; -Lisp_Object +static Lisp_Object arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) { double f1 = 0, f2 = 0; @@ -2487,7 +2487,7 @@ enum arithop static Lisp_Object float_arith_driver (double, int, enum arithop, int, Lisp_Object *); -Lisp_Object +static Lisp_Object arith_driver (enum arithop code, int nargs, register Lisp_Object *args) { register Lisp_Object val; @@ -3311,7 +3311,7 @@ syms_of_data (void) XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1; } -SIGTYPE +static SIGTYPE arith_error (int signo) { sigsetmask (SIGEMPTYMASK); From b9b84fa9b19f892520aa9fe3479d3da03a9b0da6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 16:07:15 -0700 Subject: [PATCH 298/383] * data.c (store_symval_forwarding): Rename local to avoid shadowing. --- src/ChangeLog | 1 + src/data.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 37e2183ef70..261805a8484 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * data.c (Findirect_variable): Name an expression, to avoid gcc -Wbad-function-cast warning. (default_value, arithcompare, arith_driver, arith_error): Now static. + (store_symval_forwarding): Rename local to avoid shadowing. * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect): diff --git a/src/data.c b/src/data.c index 81c16fff489..50a6ac219c4 100644 --- a/src/data.c +++ b/src/data.c @@ -910,12 +910,12 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) { - Lisp_Object buf; + Lisp_Object lbuf; struct buffer *b; - buf = Fcdr (XCAR (tail)); - if (!BUFFERP (buf)) continue; - b = XBUFFER (buf); + lbuf = Fcdr (XCAR (tail)); + if (!BUFFERP (lbuf)) continue; + b = XBUFFER (lbuf); if (! PER_BUFFER_VALUE_P (b, idx)) PER_BUFFER_VALUE (b, offset) = newval; From 8ef4622dd009b1d720155c7f2063f164f31a511e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 16:14:54 -0700 Subject: [PATCH 299/383] * lisp.h (eassert): Check that the argument compiles, even if ENABLE_CHECKING is not defined. --- src/ChangeLog | 3 +++ src/lisp.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 261805a8484..ad96221ed10 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Paul Eggert + * lisp.h (eassert): Check that the argument compiles, even if + ENABLE_CHECKING is not defined. + * data.c (Findirect_variable): Name an expression, to avoid gcc -Wbad-function-cast warning. (default_value, arithcompare, arith_driver, arith_error): Now static. diff --git a/src/lisp.h b/src/lisp.h index 79f3b2f980b..5da73c57c66 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -86,7 +86,7 @@ extern void die (const char *, const char *, int) NO_RETURN; /* Define an Emacs version of "assert", since some system ones are flaky. */ #ifndef ENABLE_CHECKING -#define eassert(X) (void) 0 +#define eassert(X) ((void) (0 && (X))) /* Check that X compiles. */ #else /* ENABLE_CHECKING */ #if defined (__GNUC__) && __GNUC__ >= 2 && defined (__STDC__) #define eassert(cond) CHECK(cond,"assertion failed: " #cond) From cdef261f74c8cf58a9b9c678e730a59b009ddad9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 16:20:25 -0700 Subject: [PATCH 300/383] * data.c (Fmake_variable_buffer_local, Fmake_local_variable): Mark variables as initialized. --- src/ChangeLog | 2 ++ src/data.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ad96221ed10..db04fe30bcf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,8 @@ gcc -Wbad-function-cast warning. (default_value, arithcompare, arith_driver, arith_error): Now static. (store_symval_forwarding): Rename local to avoid shadowing. + (Fmake_variable_buffer_local, Fmake_local_variable): Mark + variables as initialized. * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect): diff --git a/src/data.c b/src/data.c index 50a6ac219c4..6599d8fdfa3 100644 --- a/src/data.c +++ b/src/data.c @@ -1506,8 +1506,8 @@ The function `default-value' gets the default value and `set-default' sets it. { struct Lisp_Symbol *sym; struct Lisp_Buffer_Local_Value *blv = NULL; - union Lisp_Val_Fwd valcontents; - int forwarded; + union Lisp_Val_Fwd valcontents IF_LINT (= {0}); + int forwarded IF_LINT (= 0); CHECK_SYMBOL (variable); sym = XSYMBOL (variable); @@ -1582,8 +1582,8 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) (register Lisp_Object variable) { register Lisp_Object tem; - int forwarded; - union Lisp_Val_Fwd valcontents; + int forwarded IF_LINT (= 0); + union Lisp_Val_Fwd valcontents IF_LINT (= {0}); struct Lisp_Symbol *sym; struct Lisp_Buffer_Local_Value *blv = NULL; From 527469183746cf04ee8212f9debc96e56f4748be Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 16:22:38 -0700 Subject: [PATCH 301/383] * data.c (do_blv_forwarding, do_symval_forwarding): Remove; unused. --- src/ChangeLog | 1 + src/data.c | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index db04fe30bcf..31b4ee92e26 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -9,6 +9,7 @@ (store_symval_forwarding): Rename local to avoid shadowing. (Fmake_variable_buffer_local, Fmake_local_variable): Mark variables as initialized. + (do_blv_forwarding, do_symval_forwarding): Remove; unused. * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST. (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect): diff --git a/src/data.c b/src/data.c index 6599d8fdfa3..01aafbcede4 100644 --- a/src/data.c +++ b/src/data.c @@ -818,9 +818,6 @@ variable chain of symbols. */) This does not handle buffer-local variables; use swap_in_symval_forwarding for that. */ -#define do_blv_forwarding(blv) \ - ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv)) - Lisp_Object do_symval_forwarding (register union Lisp_Fwd *valcontents) { @@ -867,14 +864,6 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents) BUF non-zero means set the value in buffer BUF instead of the current buffer. This only plays a role for per-buffer variables. */ -#define store_blv_forwarding(blv, newval, buf) \ - do { \ - if ((blv)->forwarded) \ - store_symval_forwarding (BLV_FWD (blv), (newval), (buf)); \ - else \ - SET_BLV_VALUE (blv, newval); \ - } while (0) - static void store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newval, struct buffer *buf) { From a415e6946f76faecb98cb07ecd42ecdbcca5b7a4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 16:30:07 -0700 Subject: [PATCH 302/383] * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/doc.c | 36 +++++++++++++++++++++--------------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 31b4ee92e26..16cfc1d6d2f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-15 Paul Eggert + * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to + avoid shadowing. + * lisp.h (eassert): Check that the argument compiles, even if ENABLE_CHECKING is not defined. diff --git a/src/doc.c b/src/doc.c index e572d43dbf4..1ed9949e52c 100644 --- a/src/doc.c +++ b/src/doc.c @@ -322,17 +322,20 @@ string is passed through `substitute-command-keys'. */) { Lisp_Object fun; Lisp_Object funcar; - Lisp_Object tem, doc; + Lisp_Object doc; int try_reload = 1; documentation: doc = Qnil; - if (SYMBOLP (function) - && (tem = Fget (function, Qfunction_documentation), - !NILP (tem))) - return Fdocumentation_property (function, Qfunction_documentation, raw); + if (SYMBOLP (function)) + { + Lisp_Object tem = Fget (function, Qfunction_documentation); + if (!NILP (tem)) + return Fdocumentation_property (function, Qfunction_documentation, + raw); + } fun = Findirect_function (function, Qnil); if (SUBRP (fun)) @@ -348,13 +351,16 @@ string is passed through `substitute-command-keys'. */) { if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) <= COMPILED_DOC_STRING) return Qnil; - tem = AREF (fun, COMPILED_DOC_STRING); - if (STRINGP (tem)) - doc = tem; - else if (NATNUMP (tem) || CONSP (tem)) - doc = tem; else - return Qnil; + { + Lisp_Object tem = AREF (fun, COMPILED_DOC_STRING); + if (STRINGP (tem)) + doc = tem; + else if (NATNUMP (tem) || CONSP (tem)) + doc = tem; + else + return Qnil; + } } else if (STRINGP (fun) || VECTORP (fun)) { @@ -370,9 +376,8 @@ string is passed through `substitute-command-keys'. */) else if (EQ (funcar, Qlambda) || EQ (funcar, Qautoload)) { - Lisp_Object tem1; - tem1 = Fcdr (Fcdr (fun)); - tem = Fcar (tem1); + Lisp_Object tem1 = Fcdr (Fcdr (fun)); + Lisp_Object tem = Fcar (tem1); if (STRINGP (tem)) doc = tem; /* Handle a doc reference--but these never come last @@ -539,7 +544,7 @@ the same file name is found in the `doc-directory'. */) char buf[1024 + 1]; register EMACS_INT filled; register EMACS_INT pos; - register char *p, *end; + register char *p; Lisp_Object sym; char *name; int skip_file = 0; @@ -598,6 +603,7 @@ the same file name is found in the `doc-directory'. */) pos = 0; while (1) { + register char *end; if (filled < 512) filled += emacs_read (fd, &buf[filled], sizeof buf - 1 - filled); if (!filled) From e6ce307c50e6413f1ba87a315e0f8beb1a8ddac8 Mon Sep 17 00:00:00 2001 From: Ralph Schleicher Date: Wed, 16 Mar 2011 01:00:58 +0100 Subject: [PATCH 303/383] lisp/info.el: Fix bug#8258. * info (info-initialize): Replace all uses of `:' with path-separator for compatibility with non-Unix systems. Cache quoting of path-separator. --- lisp/ChangeLog | 6 ++++++ lisp/info.el | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 29b47595eb6..5bd208ba3c8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-15 Ralph Schleicher + + * info.el (info-initialize): Replace all uses of `:' with + path-separator for compatibility with non-Unix systems. + Cache quoting of path-separator. (Bug#8258) + 2011-03-12 Juanma Barranquero * avoid.el (mouse-avoidance-mode, mouse-avoidance-nudge-dist) diff --git a/lisp/info.el b/lisp/info.el index c6e20f827c1..8fd0fc70096 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -588,15 +588,15 @@ in `Info-file-supports-index-cookies-list'." (defun info-initialize () "Initialize `Info-directory-list', if that hasn't been done yet." (unless Info-directory-list - (let ((path (getenv "INFOPATH"))) + (let ((path (getenv "INFOPATH")) + (sep (regexp-quote path-separator))) (setq Info-directory-list (prune-directory-list (if path - (if (string-match ":\\'" path) - (append (split-string (substring path 0 -1) - (regexp-quote path-separator)) + (if (string-match-p (concat sep "\\'") path) + (append (split-string (substring path 0 -1) sep) (Info-default-dirs)) - (split-string path (regexp-quote path-separator))) + (split-string path sep)) (Info-default-dirs))))))) ;;;###autoload From 63c5d10bb25f33f82cda1877d4aff792c030db94 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 17:24:51 -0700 Subject: [PATCH 304/383] * editfns.c (init_editfns, Fuser_login_name, Fuser_uid): (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts, some of which prompt warnings from gcc -Wbad-function-cast. --- src/ChangeLog | 6 ++++++ src/editfns.c | 27 ++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 16cfc1d6d2f..c477a43693f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-03-16 Paul Eggert + + * editfns.c (init_editfns, Fuser_login_name, Fuser_uid): + (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts, + some of which prompt warnings from gcc -Wbad-function-cast. + 2011-03-15 Paul Eggert * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to diff --git a/src/editfns.c b/src/editfns.c index 8d428eb4815..bfe07163cc8 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -122,7 +122,7 @@ Lisp_Object Qboundary; void init_editfns (void) { - char *user_name; + const char *user_name; register char *p; struct passwd *pw; /* password entry for the current user */ Lisp_Object tem; @@ -136,7 +136,7 @@ init_editfns (void) return; #endif /* not CANNOT_DUMP */ - pw = (struct passwd *) getpwuid (getuid ()); + pw = getpwuid (getuid ()); #ifdef MSDOS /* We let the real user name default to "root" because that's quite accurate on MSDOG and because it lets Emacs find the init file. @@ -148,17 +148,17 @@ init_editfns (void) /* Get the effective user name, by consulting environment variables, or the effective uid if those are unset. */ - user_name = (char *) getenv ("LOGNAME"); + user_name = getenv ("LOGNAME"); if (!user_name) #ifdef WINDOWSNT - user_name = (char *) getenv ("USERNAME"); /* it's USERNAME on NT */ + user_name = getenv ("USERNAME"); /* it's USERNAME on NT */ #else /* WINDOWSNT */ - user_name = (char *) getenv ("USER"); + user_name = getenv ("USER"); #endif /* WINDOWSNT */ if (!user_name) { - pw = (struct passwd *) getpwuid (geteuid ()); - user_name = (char *) (pw ? pw->pw_name : "unknown"); + pw = getpwuid (geteuid ()); + user_name = pw ? pw->pw_name : "unknown"; } Vuser_login_name = build_string (user_name); @@ -1266,9 +1266,9 @@ of the user with that uid, or nil if there is no such user. */) if (NILP (uid)) return Vuser_login_name; - id = (uid_t)XFLOATINT (uid); + id = XFLOATINT (uid); BLOCK_INPUT; - pw = (struct passwd *) getpwuid (id); + pw = getpwuid (id); UNBLOCK_INPUT; return (pw ? build_string (pw->pw_name) : Qnil); } @@ -1300,7 +1300,7 @@ Value is an integer or a float, depending on the value. */) /* Make sure we don't produce a negative UID due to signed integer overflow. */ if (euid < 0) - return make_float ((double)geteuid ()); + return make_float (geteuid ()); return make_fixnum_or_float (euid); } @@ -1316,7 +1316,7 @@ Value is an integer or a float, depending on the value. */) /* Make sure we don't produce a negative UID due to signed integer overflow. */ if (uid < 0) - return make_float ((double)getuid ()); + return make_float (getuid ()); return make_fixnum_or_float (uid); } @@ -1339,14 +1339,15 @@ name, or nil if there is no such user. */) return Vuser_full_name; else if (NUMBERP (uid)) { + uid_t u = XFLOATINT (uid); BLOCK_INPUT; - pw = (struct passwd *) getpwuid ((uid_t) XFLOATINT (uid)); + pw = getpwuid (u); UNBLOCK_INPUT; } else if (STRINGP (uid)) { BLOCK_INPUT; - pw = (struct passwd *) getpwnam (SSDATA (uid)); + pw = getpwnam (SSDATA (uid)); UNBLOCK_INPUT; } else From a292836456b5f127782b10accd31ff3c0b7b445d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 15 Mar 2011 17:44:50 -0700 Subject: [PATCH 305/383] Move editfns decls to lisp.h to check interfaces. --- src/ChangeLog | 4 ++++ src/editfns.c | 2 -- src/lisp.h | 3 +++ src/process.c | 2 -- src/xrdb.c | 2 -- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index c477a43693f..69cfabaad3b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2011-03-16 Paul Eggert + * lisp.h (get_system_name, get_operating_system_release): + Move decls here, to check interfaces. + * process.c (get_operating_system_release): Move decl to lisp.h. + * xrdb.c (get_system_name): Likewise. * editfns.c (init_editfns, Fuser_login_name, Fuser_uid): (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts, some of which prompt warnings from gcc -Wbad-function-cast. diff --git a/src/editfns.c b/src/editfns.c index bfe07163cc8..9966eaaa057 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1391,8 +1391,6 @@ DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, return Vsystem_name; } -/* For the benefit of callers who don't want to include lisp.h */ - const char * get_system_name (void) { diff --git a/src/lisp.h b/src/lisp.h index 5da73c57c66..5a5e7dbec6b 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2874,6 +2874,7 @@ extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); extern void init_eval (void); extern void syms_of_eval (void); +/* Defined in editfns.c */ extern Lisp_Object Qfield; EXFUN (Fcurrent_message, 0); EXFUN (Fgoto_char, 1); @@ -2913,6 +2914,8 @@ extern Lisp_Object make_buffer_string (EMACS_INT, EMACS_INT, int); extern Lisp_Object make_buffer_string_both (EMACS_INT, EMACS_INT, EMACS_INT, EMACS_INT, int); extern void init_editfns (void); +const char *get_system_name (void); +const char *get_operating_system_release (void); extern void syms_of_editfns (void); EXFUN (Fconstrain_to_field, 5); EXFUN (Ffield_end, 3); diff --git a/src/process.c b/src/process.c index 7bfd2a3258a..39fa26e8b54 100644 --- a/src/process.c +++ b/src/process.c @@ -162,8 +162,6 @@ extern Lisp_Object QCfilter; /* Define first descriptor number available for subprocesses. */ #define FIRST_PROC_DESC 3 -extern const char *get_operating_system_release (void); - #ifndef HAVE_H_ERRNO extern int h_errno; #endif diff --git a/src/xrdb.c b/src/xrdb.c index 63e5851979c..a79f453e5e1 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -54,8 +54,6 @@ extern char *getenv (const char *); extern struct passwd *getpwuid (uid_t); extern struct passwd *getpwnam (const char *); -extern const char *get_system_name (void); - char *x_get_string_resource (XrmDatabase rdb, const char *name, const char *class); static int file_p (const char *filename); From 62973b416261f9b43e9026807651554e3cf2c9c3 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 16 Mar 2011 01:53:19 +0100 Subject: [PATCH 306/383] src/emacs.c (USAGE3): Doc fixes. --- src/ChangeLog | 4 ++++ src/emacs.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 72585209c24..44e4494d79a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-16 Juanma Barranquero + + * emacs.c (USAGE3): Doc fixes. + 2011-03-15 Andreas Schwab * coding.c (detect_coding_iso_2022): Reorganize code to clarify diff --git a/src/emacs.c b/src/emacs.c index 4455e6b4d9f..84092e18b8b 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -141,7 +141,7 @@ Lisp_Object Qfile_name_handler_alist; Lisp_Object Qrisky_local_variable; -/* If non-zero, emacs should not attempt to use a window-specific code, +/* If non-zero, Emacs should not attempt to use a window-specific code, but instead should use the virtual terminal under which it was started. */ int inhibit_window_system; @@ -169,7 +169,6 @@ static unsigned long heap_bss_diff; #define MAX_HEAP_BSS_DIFF (1024*1024) /* Nonzero means running Emacs without interactive terminal. */ - int noninteractive; /* Nonzero means remove site-lisp directories from load-path. */ @@ -249,14 +248,14 @@ Display options:\n\ --border-color, -bd COLOR main border color\n\ --border-width, -bw WIDTH width of main border\n\ --color, --color=MODE override color mode for character terminals;\n\ - MODE defaults to `auto', and can also\n\ - be `never', `auto', `always',\n\ + MODE defaults to `auto', and\n\ + can also be `never', `always',\n\ or a mode name like `ansi8'\n\ --cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ --font, -fn FONT default font; must be fixed-width\n\ --foreground-color, -fg COLOR window foreground color\n\ --fullheight, -fh make the first frame high as the screen\n\ ---fullscreen, -fs make first frame fullscreen\n\ +--fullscreen, -fs make the first frame fullscreen\n\ --fullwidth, -fw make the first frame wide as the screen\n\ --maximized, -mm make the first frame maximized\n\ --geometry, -g GEOMETRY window geometry\n\ @@ -576,7 +575,8 @@ void __main (void) enough information to do it right. */ static int -argmatch (char **argv, int argc, const char *sstr, const char *lstr, int minlen, char **valptr, int *skipptr) +argmatch (char **argv, int argc, const char *sstr, const char *lstr, + int minlen, char **valptr, int *skipptr) { char *p = NULL; int arglen; From 5ba5fb816df11ef82326f16c8d9da88169bde721 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 16 Mar 2011 02:28:20 +0100 Subject: [PATCH 307/383] lisp/progmodes/delphi.el: Fix typos. --- lisp/ChangeLog | 13 ++++++- lisp/progmodes/delphi.el | 75 ++++++++++++++++++++-------------------- 2 files changed, 50 insertions(+), 38 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index db21eb97cc0..93a6e720a78 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,17 @@ +2011-03-16 Juanma Barranquero + + * progmodes/delphi.el (delphi-search-path, delphi-indent-level) + (delphi-verbose, delphi-comment-face, delphi-string-face) + (delphi-keyword-face, delphi-ignore-changes, delphi-indent-line) + (delphi-mode-abbrev-table, delphi-debug-buffer, delphi-tab) + (delphi-find-unit, delphi-find-current-xdef, delphi-fill-comment) + (delphi-new-comment-line, delphi-font-lock-defaults) + (delphi-debug-mode-map, delphi-mode-syntax-table, delphi-mode): + Fix typos in docstrings. + 2011-03-15 Ken Manheimer - * allout.el (allout-make-topic-prefix) (allout-rebullet-heading): + * allout.el (allout-make-topic-prefix, allout-rebullet-heading): Invert the roles of character and string values for INSTEAD, so a string is used for the more common case of a defaulting prompt. diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index c376b25fae0..0f823c806e0 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el @@ -26,14 +26,14 @@ ;; To enter Delphi mode when you find a Delphi source file, one must override ;; the auto-mode-alist to associate Delphi with .pas (and .dpr and .dpk) -;; files. Emacs, by default, will otherwise enter Pascal mode. E.g. +;; files. Emacs, by default, will otherwise enter Pascal mode. E.g. ;; ;; (autoload 'delphi-mode "delphi") ;; (setq auto-mode-alist ;; (cons '("\\.\\(pas\\|dpr\\|dpk\\)$" . delphi-mode) auto-mode-alist)) ;; To get keyword, comment, and string literal coloring, be sure that font-lock -;; is running. One can manually do M-x font-lock-mode in a Delphi buffer, or +;; is running. One can manually do M-x font-lock-mode in a Delphi buffer, or ;; one can put in .emacs: ;; ;; (add-hook 'delphi-mode-hook 'turn-on-font-lock) @@ -56,8 +56,8 @@ ;; When you have entered Delphi mode, you may get more info by pressing ;; C-h m. -;; This delphi mode implementation is fairly tolerant of syntax errors, relying -;; as much as possible on the indentation of the previous statement. This also +;; This Delphi mode implementation is fairly tolerant of syntax errors, relying +;; as much as possible on the indentation of the previous statement. This also ;; makes it faster and simpler, since there is less searching for properly ;; constructed beginnings. @@ -74,15 +74,16 @@ "True if in debug mode.") (defcustom delphi-search-path "." - "*Directories to search when finding external units. It is a list of -directory strings. If only a single directory, it can be a single -string instead of a list. If a directory ends in \"...\" then that -directory is recursively searched." + "*Directories to search when finding external units. +It is a list of directory strings. If only a single directory, +it can be a single string instead of a list. If a directory +ends in \"...\" then that directory is recursively searched." :type 'string :group 'delphi) (defcustom delphi-indent-level 3 - "*Indentation of Delphi statements with respect to containing block. E.g. + "*Indentation of Delphi statements with respect to containing block. +E.g. begin // This is an indent of 3. @@ -117,7 +118,7 @@ end; end;" :group 'delphi) (defcustom delphi-verbose t ; nil - "*If true then delphi token processing progress is reported to the user." + "*If true then Delphi token processing progress is reported to the user." :type 'boolean :group 'delphi) @@ -137,17 +138,17 @@ differs from the default." :group 'delphi) (defcustom delphi-comment-face 'font-lock-comment-face - "*Face used to color delphi comments." + "*Face used to color Delphi comments." :type 'face :group 'delphi) (defcustom delphi-string-face 'font-lock-string-face - "*Face used to color delphi strings." + "*Face used to color Delphi strings." :type 'face :group 'delphi) (defcustom delphi-keyword-face 'font-lock-keyword-face - "*Face used to color delphi keywords." + "*Face used to color Delphi keywords." :type 'face :group 'delphi) @@ -720,9 +721,9 @@ routine.") (delphi-progress-done))))) (defvar delphi-ignore-changes t - "Internal flag to control if the delphi-mode responds to buffer changes. -Defaults to t in case the delphi-after-change function is called on a -non-delphi buffer. Set to nil in a delphi buffer. To override, just do: + "Internal flag to control if the Delphi mode responds to buffer changes. +Defaults to t in case the `delphi-after-change' function is called on a +non-Delphi buffer. Set to nil in a Delphi buffer. To override, just do: (let ((delphi-ignore-changes t)) ...)") (defun delphi-after-change (change-start change-end old-length) @@ -1521,8 +1522,8 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: indent))) (defun delphi-indent-line () - "Indent the current line according to the current language construct. If -before the indent, the point is moved to the indent." + "Indent the current line according to the current language construct. +If before the indent, the point is moved to the indent." (interactive) (delphi-save-match-data (let ((marked-point (point-marker)) ; Maintain our position reliably. @@ -1547,7 +1548,7 @@ before the indent, the point is moved to the indent." (set-marker marked-point nil)))) (defvar delphi-mode-abbrev-table nil - "Abbrev table in use in delphi-mode buffers.") + "Abbrev table in use in Delphi mode buffers.") (define-abbrev-table 'delphi-mode-abbrev-table ()) (defmacro delphi-ensure-buffer (buffer-var buffer-name) @@ -1568,7 +1569,7 @@ before the indent, the point is moved to the indent." ;; Debugging helpers: (defvar delphi-debug-buffer nil - "Buffer to write delphi-mode debug messages to. Created on demand.") + "Buffer to write Delphi mode debug messages to. Created on demand.") (defun delphi-debug-log (format-string &rest args) ;; Writes a message to the log buffer. @@ -1679,7 +1680,7 @@ before the indent, the point is moved to the indent." (defun delphi-tab () "Indent the region, when Transient Mark mode is enabled and the region is -active. Otherwise, indent the current line or insert a TAB, depending on the +active. Otherwise, indent the current line or insert a TAB, depending on the value of `delphi-tab-always-indents' and the current line position." (interactive) (cond ((use-region-p) @@ -1768,8 +1769,8 @@ value of `delphi-tab-always-indents' and the current line position." nil)) (defun delphi-find-unit (unit) - "Finds the specified delphi source file according to `delphi-search-path'. -If no extension is specified, .pas is assumed. Creates a buffer for the unit." + "Find the specified Delphi source file according to `delphi-search-path'. +If no extension is specified, .pas is assumed. Creates a buffer for the unit." (interactive "sDelphi unit name: ") (let* ((unit-file (if (string-match "^\\(.*\\)\\.[a-z]+$" unit) unit @@ -1791,7 +1792,7 @@ If no extension is specified, .pas is assumed. Creates a buffer for the unit." "Find the definition of the identifier under the current point, searching in external units if necessary (as listed in the current unit's use clause). The set of directories to search for a unit is specified by the global variable -delphi-search-path." +`delphi-search-path'." (interactive) (error "delphi-find-current-xdef: not implemented yet")) @@ -1802,7 +1803,7 @@ it is a routine." (error "delphi-find-current-body: not implemented yet")) (defun delphi-fill-comment () - "Fills the text of the current comment, according to `fill-column'. + "Fill the text of the current comment, according to `fill-column'. An error is raised if not in a comment." (interactive) (save-excursion @@ -1888,8 +1889,8 @@ An error is raised if not in a comment." (delphi-progress-done))))))) (defun delphi-new-comment-line () - "If in a // comment, does a newline, indented such that one is still in the -comment block. If not in a // comment, just does a normal newline." + "If in a // comment, do a newline, indented such that one is still in the +comment block. If not in a // comment, just does a normal newline." (interactive) (let ((comment (delphi-current-token))) (if (not (eq 'comment-single-line (delphi-token-kind comment))) @@ -1923,7 +1924,7 @@ comment block. If not in a // comment, just does a normal newline." nil ; Syntax begin movement doesn't apply (font-lock-fontify-region-function . delphi-fontify-region) (font-lock-verbose . delphi-fontifying-progress-step)) - "Delphi mode font-lock defaults. Syntactic fontification is ignored.") + "Delphi mode font-lock defaults. Syntactic fontification is ignored.") (defvar delphi-debug-mode-map (let ((kmap (make-sparse-keymap))) @@ -1944,7 +1945,7 @@ comment block. If not in a // comment, just does a normal newline." ("x" delphi-debug-show-is-stable) )) kmap) - "Keystrokes for delphi-mode debug commands.") + "Keystrokes for Delphi mode debug commands.") (defvar delphi-mode-map (let ((kmap (make-sparse-keymap))) @@ -1964,7 +1965,7 @@ comment block. If not in a // comment, just does a normal newline." "Keymap used in Delphi mode.") (defconst delphi-mode-syntax-table (make-syntax-table) - "Delphi mode's syntax table. It is just a standard syntax table. + "Delphi mode's syntax table. It is just a standard syntax table. This is ok since we do our own keyword/comment/string face coloring.") ;;;###autoload @@ -1976,7 +1977,7 @@ This is ok since we do our own keyword/comment/string face coloring.") \\[delphi-fill-comment]\t- Fill the current comment. \\[delphi-new-comment-line]\t- If in a // comment, do a new comment line. -M-x indent-region also works for indenting a whole region. +\\[indent-region] also works for indenting a whole region. Customization: @@ -1996,21 +1997,21 @@ Customization: `delphi-search-path' (default .) Directories to search when finding external units. `delphi-verbose' (default nil) - If true then delphi token processing progress is reported to the user. + If true then Delphi token processing progress is reported to the user. Coloring: `delphi-comment-face' (default font-lock-comment-face) - Face used to color delphi comments. + Face used to color Delphi comments. `delphi-string-face' (default font-lock-string-face) - Face used to color delphi strings. + Face used to color Delphi strings. `delphi-keyword-face' (default font-lock-keyword-face) - Face used to color delphi keywords. + Face used to color Delphi keywords. `delphi-other-face' (default nil) Face used to color everything else. -Turning on Delphi mode calls the value of the variable delphi-mode-hook with -no args, if that value is non-nil." +Turning on Delphi mode calls the value of the variable `delphi-mode-hook' +with no args, if that value is non-nil." (interactive) (kill-all-local-variables) (use-local-map delphi-mode-map) From 8a05b6681ee826c186f533900208b2226d3549a6 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Wed, 16 Mar 2011 03:13:31 +0100 Subject: [PATCH 308/383] Add warning for obsolete _emacs init file. * lisp/startup.el (command-line): Warn the user that _emacs is deprecated. * etc/NEWS: Document warning about _emacs. --- etc/ChangeLog | 4 ++++ etc/NEWS | 2 ++ lisp/ChangeLog | 4 ++++ lisp/startup.el | 30 +++++++++++++++++------------- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/etc/ChangeLog b/etc/ChangeLog index 15f613edf8f..cbe46d3a53e 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2011-03-16 Juanma Barranquero + + * NEWS: Document warning about _emacs. + 2011-03-14 Michael Albinus * NEWS: `shell' prompts for the shell path name, when the default diff --git a/etc/NEWS b/etc/NEWS index 7b4bdc46e7a..bb59e0e2a24 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -62,6 +62,8 @@ longer have any effect. (They were declared obsolete in Emacs 23.) ** New command line option `--no-site-lisp' removes site-lisp directories from load-path. -Q now implies this. +** On Windows, Emacs now warns when the obsolete _emacs init file is used. + * Changes in Emacs 24.1 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 93a6e720a78..9dcc5fb9ca5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-03-16 Juanma Barranquero + + * startup.el (command-line): Warn the user that _emacs is deprecated. + 2011-03-16 Juanma Barranquero * progmodes/delphi.el (delphi-search-path, delphi-indent-level) diff --git a/lisp/startup.el b/lisp/startup.el index 2bdb6fef505..65b1a013c21 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1006,19 +1006,23 @@ opening the first frame (e.g. open a connection to an X server).") (if init-file-user (let ((user-init-file-1 (cond - ((eq system-type 'ms-dos) - (concat "~" init-file-user "/_emacs")) - ((eq system-type 'windows-nt) - ;; Prefer .emacs on Windows. - (if (directory-files "~" nil "^\\.emacs\\(\\.elc?\\)?$") - "~/.emacs" - ;; Also support _emacs for compatibility. - (if (directory-files "~" nil "^_emacs\\(\\.elc?\\)?$") - "~/_emacs" - ;; But default to .emacs if _emacs does not exist. - "~/.emacs"))) - (t - (concat "~" init-file-user "/.emacs"))))) + ((eq system-type 'ms-dos) + (concat "~" init-file-user "/_emacs")) + ((not (eq system-type 'windows-nt)) + (concat "~" init-file-user "/.emacs")) + ;; Else deal with the Windows situation + ((directory-files "~" nil "^\\.emacs\\(\\.elc?\\)?$") + ;; Prefer .emacs on Windows. + "~/.emacs") + ((directory-files "~" nil "^_emacs\\(\\.elc?\\)?$") + ;; Also support _emacs for compatibility, but warn about it. + (display-warning + 'initialization + "`_emacs' init file is deprecated, please use `.emacs'" + :warning) + "~/_emacs") + (t ;; But default to .emacs if _emacs does not exist. + "~/.emacs")))) ;; This tells `load' to store the file name found ;; into user-init-file. (setq user-init-file t) From 545b49b4ff1d7bd8ee256dec95ea80613537eb75 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:15:43 -0700 Subject: [PATCH 309/383] * editfns.c: (Fformat_time_string, Fencode_time, Finsert_char): (Ftranslate_region_internal, Fformat): Rename or remove local vars to avoid shadowing. --- src/ChangeLog | 3 +++ src/editfns.c | 34 ++++++++++++++++------------------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 69cfabaad3b..7901d65c086 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,9 @@ * editfns.c (init_editfns, Fuser_login_name, Fuser_uid): (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts, some of which prompt warnings from gcc -Wbad-function-cast. + (Fformat_time_string, Fencode_time, Finsert_char): + (Ftranslate_region_internal, Fformat): + Rename or remove local vars to avoid shadowing. 2011-03-15 Paul Eggert diff --git a/src/editfns.c b/src/editfns.c index 9966eaaa057..b02a92d5b98 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1721,7 +1721,7 @@ The modifiers are `E' and `O'. For certain characters X, %OX is like %X, but uses the locale's number symbols. For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */) - (Lisp_Object format_string, Lisp_Object time, Lisp_Object universal) + (Lisp_Object format_string, Lisp_Object timeval, Lisp_Object universal) { time_t value; int size; @@ -1732,7 +1732,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */) CHECK_STRING (format_string); - if (! (lisp_time_argument (time, &value, &usec) + if (! (lisp_time_argument (timeval, &value, &usec) && 0 <= usec && usec < 1000000)) error ("Invalid time specification"); ns = usec * 1000; @@ -1870,7 +1870,7 @@ year values as low as 1901 do work. usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) (int nargs, register Lisp_Object *args) { - time_t time; + time_t value; struct tm tm; Lisp_Object zone = (nargs > 6 ? args[nargs - 1] : Qnil); @@ -1887,7 +1887,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) if (NILP (zone)) { BLOCK_INPUT; - time = mktime (&tm); + value = mktime (&tm); UNBLOCK_INPUT; } else @@ -1915,7 +1915,7 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) set_time_zone_rule (tzstring); BLOCK_INPUT; - time = mktime (&tm); + value = mktime (&tm); UNBLOCK_INPUT; /* Restore TZ to previous value. */ @@ -1927,10 +1927,10 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */) #endif } - if (time == (time_t) -1) + if (value == (time_t) -1) time_overflow (); - return make_time (time); + return make_time (value); } DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0, @@ -2340,7 +2340,7 @@ from adjoining text, if those properties are sticky. */) (Lisp_Object character, Lisp_Object count, Lisp_Object inherit) { register char *string; - register EMACS_INT strlen; + register EMACS_INT stringlen; register int i; register EMACS_INT n; int len; @@ -2358,18 +2358,18 @@ from adjoining text, if those properties are sticky. */) n = XINT (count) * len; if (n <= 0) return Qnil; - strlen = min (n, 256 * len); - string = (char *) alloca (strlen); - for (i = 0; i < strlen; i++) + stringlen = min (n, 256 * len); + string = (char *) alloca (stringlen); + for (i = 0; i < stringlen; i++) string[i] = str[i % len]; - while (n >= strlen) + while (n >= stringlen) { QUIT; if (!NILP (inherit)) - insert_and_inherit (string, strlen); + insert_and_inherit (string, stringlen); else - insert (string, strlen); - n -= strlen; + insert (string, stringlen); + n -= stringlen; } if (n > 0) { @@ -3029,7 +3029,6 @@ It returns the number of characters changed. */) EMACS_INT pos, pos_byte, end_pos; int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); int string_multibyte; - Lisp_Object val; validate_region (&start, &end); if (CHAR_TABLE_P (table)) @@ -3928,7 +3927,7 @@ usage: (format STRING &rest OBJECTS) */) /* handle case (precision[n] >= 0) */ int width, padding; - EMACS_INT nbytes, start, end; + EMACS_INT nbytes, start; EMACS_INT nchars_string; /* lisp_string_width ignores a precision of 0, but GNU @@ -3960,7 +3959,6 @@ usage: (format STRING &rest OBJECTS) */) info[n].start = start = nchars; nchars += nchars_string; - end = nchars; if (p > buf && multibyte From 9710023e8865ce1ac385526bbc44868cd2189cbd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:17:22 -0700 Subject: [PATCH 310/383] * editfns.c (Ftranslate_region_internal): Mark var as initialized. --- src/ChangeLog | 1 + src/editfns.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7901d65c086..88d05b56a0f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -10,6 +10,7 @@ (Fformat_time_string, Fencode_time, Finsert_char): (Ftranslate_region_internal, Fformat): Rename or remove local vars to avoid shadowing. + (Ftranslate_region_internal): Mark var as initialized. 2011-03-15 Paul Eggert diff --git a/src/editfns.c b/src/editfns.c index b02a92d5b98..1f98ff040b3 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3028,7 +3028,7 @@ It returns the number of characters changed. */) EMACS_INT size; /* Size of translate table. */ EMACS_INT pos, pos_byte, end_pos; int multibyte = !NILP (BVAR (current_buffer, enable_multibyte_characters)); - int string_multibyte; + int string_multibyte IF_LINT (= 0); validate_region (&start, &end); if (CHAR_TABLE_P (table)) From b1349114e9a58791ee0d5e505e05633cc91293f3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:19:04 -0700 Subject: [PATCH 311/383] * callint.c (quotify_arg, quotify_args): Now static. --- src/ChangeLog | 2 ++ src/callint.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 88d05b56a0f..d87c1d0fbcb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-16 Paul Eggert + * callint.c (quotify_arg, quotify_args): Now static. + * lisp.h (get_system_name, get_operating_system_release): Move decls here, to check interfaces. * process.c (get_operating_system_release): Move decl to lisp.h. diff --git a/src/callint.c b/src/callint.c index 21dd3cd4d9d..af9ee5bb9bd 100644 --- a/src/callint.c +++ b/src/callint.c @@ -118,7 +118,7 @@ usage: (interactive &optional ARGS) */) /* Quotify EXP: if EXP is constant, return it. If EXP is not constant, return (quote EXP). */ -Lisp_Object +static Lisp_Object quotify_arg (register Lisp_Object exp) { if (!INTEGERP (exp) && !STRINGP (exp) @@ -129,7 +129,7 @@ quotify_arg (register Lisp_Object exp) } /* Modify EXP by quotifying each element (except the first). */ -Lisp_Object +static Lisp_Object quotify_args (Lisp_Object exp) { register Lisp_Object tail; From a3e8cbda22e76cc2f5352638256cdc0033c00357 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:24:57 -0700 Subject: [PATCH 312/383] * callint.c (Fcall_interactively): Rename locals to avoid shadowing. --- src/ChangeLog | 1 + src/callint.c | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d87c1d0fbcb..e70683dd12a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-16 Paul Eggert * callint.c (quotify_arg, quotify_args): Now static. + (Fcall_interactively): Rename locals to avoid shadowing. * lisp.h (get_system_name, get_operating_system_release): Move decls here, to check interfaces. diff --git a/src/callint.c b/src/callint.c index af9ee5bb9bd..5ec916a5b8a 100644 --- a/src/callint.c +++ b/src/callint.c @@ -408,25 +408,25 @@ invoke it. If KEYS is omitted or nil, the return value of string++; else if (*string == '@') { - Lisp_Object event, tem; + Lisp_Object event, w; event = (next_event < key_count ? AREF (keys, next_event) : Qnil); if (EVENT_HAS_PARAMETERS (event) - && (tem = XCDR (event), CONSP (tem)) - && (tem = XCAR (tem), CONSP (tem)) - && (tem = XCAR (tem), WINDOWP (tem))) + && (w = XCDR (event), CONSP (w)) + && (w = XCAR (w), CONSP (w)) + && (w = XCAR (w), WINDOWP (w))) { - if (MINI_WINDOW_P (XWINDOW (tem)) - && ! (minibuf_level > 0 && EQ (tem, minibuf_window))) + if (MINI_WINDOW_P (XWINDOW (w)) + && ! (minibuf_level > 0 && EQ (w, minibuf_window))) error ("Attempt to select inactive minibuffer window"); /* If the current buffer wants to clean up, let it. */ if (!NILP (Vmouse_leave_buffer_hook)) call1 (Vrun_hooks, Qmouse_leave_buffer_hook); - Fselect_window (tem, Qnil); + Fselect_window (w, Qnil); } string++; } @@ -679,7 +679,7 @@ invoke it. If KEYS is omitted or nil, the return value of int first = 1; do { - Lisp_Object tem; + Lisp_Object str; if (! first) { message ("Please enter a number."); @@ -687,13 +687,13 @@ invoke it. If KEYS is omitted or nil, the return value of } first = 0; - tem = Fread_from_minibuffer (callint_message, + str = Fread_from_minibuffer (callint_message, Qnil, Qnil, Qnil, Qnil, Qnil, Qnil); - if (! STRINGP (tem) || SCHARS (tem) == 0) + if (! STRINGP (str) || SCHARS (str) == 0) args[i] = Qnil; else - args[i] = Fread (tem); + args[i] = Fread (str); } while (! NUMBERP (args[i])); } From b0e80955879267569ee146c03ae0d5a8e7e041a5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:26:16 -0700 Subject: [PATCH 313/383] * callint.c: Use const pointer when appropriate. --- src/ChangeLog | 1 + src/callint.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index e70683dd12a..ca43ce4dc8f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * callint.c (quotify_arg, quotify_args): Now static. (Fcall_interactively): Rename locals to avoid shadowing. + Use const pointer when appropriate. * lisp.h (get_system_name, get_operating_system_release): Move decls here, to check interfaces. diff --git a/src/callint.c b/src/callint.c index 5ec916a5b8a..282d8a82aa7 100644 --- a/src/callint.c +++ b/src/callint.c @@ -258,7 +258,7 @@ invoke it. If KEYS is omitted or nil, the return value of Lisp_Object prefix_arg; char *string; - char *tem; + const char *tem; /* If varies[i] > 0, the i'th argument shouldn't just have its value in this call quoted in the command history. It should be From 475545b50099448132747e79b70bbb4199559d09 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:28:57 -0700 Subject: [PATCH 314/383] * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static. --- src/ChangeLog | 2 ++ src/eval.c | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ca43ce4dc8f..4e72b9c0d2b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-16 Paul Eggert + * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static. + * callint.c (quotify_arg, quotify_args): Now static. (Fcall_interactively): Rename locals to avoid shadowing. Use const pointer when appropriate. diff --git a/src/eval.c b/src/eval.c index d0effc755a2..f9ed8712eb3 100644 --- a/src/eval.c +++ b/src/eval.c @@ -158,7 +158,7 @@ restore_stack_limits (Lisp_Object data) /* Call the Lisp debugger, giving it argument ARG. */ -Lisp_Object +static Lisp_Object call_debugger (Lisp_Object arg) { int debug_while_redisplaying; @@ -214,7 +214,7 @@ call_debugger (Lisp_Object arg) return unbind_to (count, val); } -void +static void do_debug_on_call (Lisp_Object code) { debug_on_next_call = 0; @@ -1637,7 +1637,7 @@ See also the function `condition-case'. */) if (!NILP (clause)) break; } - + if (/* Don't run the debugger for a memory-full error. (There is no room in memory to do that!) */ !NILP (error_symbol) @@ -1654,13 +1654,13 @@ See also the function `condition-case'. */) can continue code which has signaled a quit. */ if (debugger_called && EQ (real_error_symbol, Qquit)) return Qnil; - } + } if (!NILP (clause)) { Lisp_Object unwind_data = (NILP (error_symbol) ? data : Fcons (error_symbol, data)); - + h->chosen_clause = clause; unwind_to_catch (h->tag, unwind_data); } @@ -1672,7 +1672,7 @@ See also the function `condition-case'. */) if (! NILP (error_symbol)) data = Fcons (error_symbol, data); - + string = Ferror_message_string (data); fatal ("%s", SDATA (string), 0); } @@ -3057,7 +3057,7 @@ DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode, return object; } -void +static void grow_specpdl (void) { register int count = SPECPDL_INDEX (); @@ -3589,4 +3589,3 @@ The value the function returns is not used. */); defsubr (&Sbacktrace); defsubr (&Sbacktrace_frame); } - From d28a21703d47c6983e91d3d4a464546750519236 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:30:17 -0700 Subject: [PATCH 315/383] * eval.c (Fdefvar): Rewrite so as not to use empty "else". --- src/ChangeLog | 1 + src/eval.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4e72b9c0d2b..15d169a8b30 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-16 Paul Eggert * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static. + (Fdefvar): Rewrite so as not to use empty "else". * callint.c (quotify_arg, quotify_args): Now static. (Fcall_interactively): Rename locals to avoid shadowing. diff --git a/src/eval.c b/src/eval.c index f9ed8712eb3..4f6d3dd015d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -801,10 +801,11 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) LOADHIST_ATTACH (sym); } else - /* Simple (defvar ) should not count as a definition at all. - It could get in the way of other definitions, and unloading this - package could try to make the variable unbound. */ - ; + { + /* Simple (defvar ) should not count as a definition at all. + It could get in the way of other definitions, and unloading this + package could try to make the variable unbound. */ + } return sym; } From cfcbfb1aa5d013f114bc002110166fd1f5392f56 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:34:28 -0700 Subject: [PATCH 316/383] * eval.c (lisp_indirect_variable): Name an expression, to avoid gcc -Wbad-function-cast warning. --- src/ChangeLog | 2 ++ src/eval.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 15d169a8b30..a5a4657f7dc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static. (Fdefvar): Rewrite so as not to use empty "else". + (lisp_indirect_variable): Name an expression, + to avoid gcc -Wbad-function-cast warning. * callint.c (quotify_arg, quotify_args): Now static. (Fcall_interactively): Rename locals to avoid shadowing. diff --git a/src/eval.c b/src/eval.c index 4f6d3dd015d..affafadfecf 100644 --- a/src/eval.c +++ b/src/eval.c @@ -856,7 +856,8 @@ user_variable_p_eh (Lisp_Object ignore) static Lisp_Object lisp_indirect_variable (Lisp_Object sym) { - XSETSYMBOL (sym, indirect_variable (XSYMBOL (sym))); + struct Lisp_Symbol *s = indirect_variable (XSYMBOL (sym)); + XSETSYMBOL (sym, s); return sym; } From 8b2c52e913dcfed4dc39d79a994a2d301b06478a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:37:10 -0700 Subject: [PATCH 317/383] * alloc.c (mark_backtrace): Move decl from here ... * lisp.h: ... to here, so that it can be checked. --- src/ChangeLog | 3 +++ src/alloc.c | 1 - src/lisp.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a5a4657f7dc..00361255651 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-16 Paul Eggert + * alloc.c (mark_backtrace): Move decl from here ... + * lisp.h: ... to here, so that it can be checked. + * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static. (Fdefvar): Rewrite so as not to use empty "else". (lisp_indirect_variable): Name an expression, diff --git a/src/alloc.c b/src/alloc.c index 6262e002ed3..66695e7a9bc 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -270,7 +270,6 @@ Lisp_Object Qpost_gc_hook; static void mark_buffer (Lisp_Object); static void mark_terminals (void); -extern void mark_backtrace (void); static void gc_sweep (void); static void mark_glyph_matrix (struct glyph_matrix *); static void mark_face_cache (struct face_cache *); diff --git a/src/lisp.h b/src/lisp.h index 5a5e7dbec6b..074c758ce8e 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2872,6 +2872,7 @@ extern Lisp_Object safe_call (int, Lisp_Object *); extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); extern void init_eval (void); +extern void mark_backtrace (void); extern void syms_of_eval (void); /* Defined in editfns.c */ From 1faed8ae39da845b9e39d2ce7f20ee9f4e32fc31 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:44:19 -0700 Subject: [PATCH 318/383] * eval.c (Fdefvar): Rename locals to avoid shadowing. --- src/ChangeLog | 1 + src/eval.c | 34 ++++++++++++++++++---------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 00361255651..0ef92dbb53a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,7 @@ (Fdefvar): Rewrite so as not to use empty "else". (lisp_indirect_variable): Name an expression, to avoid gcc -Wbad-function-cast warning. + (Fdefvar): Rename locals to avoid shadowing. * callint.c (quotify_arg, quotify_args): Now static. (Fcall_interactively): Rename locals to avoid shadowing. diff --git a/src/eval.c b/src/eval.c index affafadfecf..f68274e6e8c 100644 --- a/src/eval.c +++ b/src/eval.c @@ -764,11 +764,11 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) if (SYMBOL_CONSTANT_P (sym)) { /* For upward compatibility, allow (defvar :foo (quote :foo)). */ - Lisp_Object tem = Fcar (tail); - if (! (CONSP (tem) - && EQ (XCAR (tem), Qquote) - && CONSP (XCDR (tem)) - && EQ (XCAR (XCDR (tem)), sym))) + Lisp_Object tem1 = Fcar (tail); + if (! (CONSP (tem1) + && EQ (XCAR (tem1), Qquote) + && CONSP (XCDR (tem1)) + && EQ (XCAR (XCDR (tem1)), sym))) error ("Constant symbol `%s' specified in defvar", SDATA (SYMBOL_NAME (sym))); } @@ -2539,8 +2539,8 @@ run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) } else { - Lisp_Object globals = Qnil; - GCPRO3 (sym, val, globals); + Lisp_Object global_vals = Qnil; + GCPRO3 (sym, val, global_vals); for (; CONSP (val) && ((cond == to_completion) @@ -2552,23 +2552,25 @@ run_hook_with_args (int nargs, Lisp_Object *args, enum run_hooks_condition cond) { /* t indicates this hook has a local binding; it means to run the global binding too. */ - globals = Fdefault_value (sym); - if (NILP (globals)) continue; + global_vals = Fdefault_value (sym); + if (NILP (global_vals)) continue; - if (!CONSP (globals) || EQ (XCAR (globals), Qlambda)) + if (!CONSP (global_vals) || EQ (XCAR (global_vals), Qlambda)) { - args[0] = globals; + args[0] = global_vals; ret = Ffuncall (nargs, args); } else { for (; - CONSP (globals) && ((cond == to_completion) - || (cond == until_success ? NILP (ret) - : !NILP (ret))); - globals = XCDR (globals)) + (CONSP (global_vals) + && (cond == to_completion + || (cond == until_success + ? NILP (ret) + : !NILP (ret)))); + global_vals = XCDR (global_vals)) { - args[0] = XCAR (globals); + args[0] = XCAR (global_vals); /* In a global value, t should not occur. If it does, we must ignore it to avoid an endless loop. */ if (!EQ (args[0], Qt)) From 1384fa33581c398a3f3393c82be071d5784b0b04 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:45:34 -0700 Subject: [PATCH 319/383] * floatfns.c (domain_error2): Define only if needed. --- src/ChangeLog | 2 ++ src/floatfns.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0ef92dbb53a..f57fa6d9e0f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-16 Paul Eggert + * floatfns.c (domain_error2): Define only if needed. + * alloc.c (mark_backtrace): Move decl from here ... * lisp.h: ... to here, so that it can be checked. diff --git a/src/floatfns.c b/src/floatfns.c index c00923643d1..c8b5236d34a 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -187,8 +187,10 @@ static const char *float_error_fn_name; xsignal3 (Qrange_error, build_string ((op)), (a1), (a2)) #define domain_error(op,arg) \ xsignal2 (Qdomain_error, build_string ((op)), (arg)) +#ifdef FLOAT_CHECK_DOMAIN #define domain_error2(op,a1,a2) \ xsignal3 (Qdomain_error, build_string ((op)), (a1), (a2)) +#endif /* Extract a Lisp number as a `double', or signal an error. */ @@ -1037,7 +1039,7 @@ syms_of_floatfns (void) defsubr (&Scopysign); defsubr (&Sfrexp); defsubr (&Sldexp); -#endif +#endif #if 0 defsubr (&Sacosh); defsubr (&Sasinh); @@ -1074,4 +1076,3 @@ syms_of_floatfns (void) defsubr (&Sround); defsubr (&Struncate); } - From a885e2ed791b15dc48a7024751872d2b5bc17034 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:47:02 -0700 Subject: [PATCH 320/383] * floatfns.c (Ffrexp, Fldexp): Rename locals to avoid shadowing. --- src/ChangeLog | 1 + src/floatfns.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index f57fa6d9e0f..131d2af5a49 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-16 Paul Eggert * floatfns.c (domain_error2): Define only if needed. + (Ffrexp, Fldexp): Rename locals to avoid shadowing. * alloc.c (mark_backtrace): Move decl from here ... * lisp.h: ... to here, so that it can be checked. diff --git a/src/floatfns.c b/src/floatfns.c index c8b5236d34a..bc03509b757 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -328,9 +328,9 @@ If X is zero, both parts (SGNFCAND and EXP) are zero. */) return Fcons (make_float (0.0), make_number (0)); else { - int exp; - double sgnfcand = frexp (f, &exp); - return Fcons (make_float (sgnfcand), make_number (exp)); + int exponent; + double sgnfcand = frexp (f, &exponent); + return Fcons (make_float (sgnfcand), make_number (exponent)); } } @@ -338,10 +338,10 @@ DEFUN ("ldexp", Fldexp, Sldexp, 1, 2, 0, doc: /* Construct number X from significand SGNFCAND and exponent EXP. Returns the floating point value resulting from multiplying SGNFCAND (the significand) by 2 raised to the power of EXP (the exponent). */) - (Lisp_Object sgnfcand, Lisp_Object exp) + (Lisp_Object sgnfcand, Lisp_Object exponent) { - CHECK_NUMBER (exp); - return make_float (ldexp (XFLOATINT (sgnfcand), XINT (exp))); + CHECK_NUMBER (exponent); + return make_float (ldexp (XFLOATINT (sgnfcand), XINT (exponent))); } #endif From 2a80c887c75a89f23efcb0c565454647e4f96570 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:48:36 -0700 Subject: [PATCH 321/383] * fns.c (require_nesting_list, require_unwind): Now static. --- src/ChangeLog | 2 ++ src/fns.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 131d2af5a49..0e8e33ee53a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-16 Paul Eggert + * fns.c (require_nesting_list, require_unwind): Now static. + * floatfns.c (domain_error2): Define only if needed. (Ffrexp, Fldexp): Rename locals to avoid shadowing. diff --git a/src/fns.c b/src/fns.c index 0026c9d12e4..ebbebdd9ee0 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2598,9 +2598,9 @@ particular subfeatures supported in this version of FEATURE. */) /* List of features currently being require'd, innermost first. */ -Lisp_Object require_nesting_list; +static Lisp_Object require_nesting_list; -Lisp_Object +static Lisp_Object require_unwind (Lisp_Object old_value) { return require_nesting_list = old_value; From 612f56dfff305bae8b6e61ea3a60502f42a8eb5b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 00:49:54 -0700 Subject: [PATCH 322/383] * fns.c (Ffillarray): Rename locals to avoid shadowing. --- src/ChangeLog | 1 + src/fns.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0e8e33ee53a..adac111aa19 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-16 Paul Eggert * fns.c (require_nesting_list, require_unwind): Now static. + (Ffillarray): Rename locals to avoid shadowing. * floatfns.c (domain_error2): Define only if needed. (Ffrexp, Fldexp): Rename locals to avoid shadowing. diff --git a/src/fns.c b/src/fns.c index ebbebdd9ee0..71f49b9cdae 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2133,15 +2133,15 @@ DEFUN ("fillarray", Ffillarray, Sfillarray, 2, 2, 0, ARRAY is a vector, string, char-table, or bool-vector. */) (Lisp_Object array, Lisp_Object item) { - register EMACS_INT size, index; + register EMACS_INT size, idx; int charval; if (VECTORP (array)) { register Lisp_Object *p = XVECTOR (array)->contents; size = ASIZE (array); - for (index = 0; index < size; index++) - p[index] = item; + for (idx = 0; idx < size; idx++) + p[idx] = item; } else if (CHAR_TABLE_P (array)) { @@ -2177,8 +2177,8 @@ ARRAY is a vector, string, char-table, or bool-vector. */) *p++ = str[i % len]; } else - for (index = 0; index < size; index++) - p[index] = charval; + for (idx = 0; idx < size; idx++) + p[idx] = charval; } else if (BOOL_VECTOR_P (array)) { @@ -2188,14 +2188,14 @@ ARRAY is a vector, string, char-table, or bool-vector. */) / BOOL_VECTOR_BITS_PER_CHAR); charval = (! NILP (item) ? -1 : 0); - for (index = 0; index < size_in_chars - 1; index++) - p[index] = charval; - if (index < size_in_chars) + for (idx = 0; idx < size_in_chars - 1; idx++) + p[idx] = charval; + if (idx < size_in_chars) { /* Mask out bits beyond the vector size. */ if (XBOOL_VECTOR (array)->size % BOOL_VECTOR_BITS_PER_CHAR) charval &= (1 << (XBOOL_VECTOR (array)->size % BOOL_VECTOR_BITS_PER_CHAR)) - 1; - p[index] = charval; + p[idx] = charval; } } else From e663c700e753d901479798b735c2ad6ac74c07d9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 01:19:22 -0700 Subject: [PATCH 323/383] * font.c (font_unparse_xlfd): Don't mix pointers to variables with pointers to constants. --- src/ChangeLog | 3 +++ src/font.c | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index adac111aa19..e9a6d5da5a3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-16 Paul Eggert + * font.c (font_unparse_xlfd): Don't mix pointers to variables with + pointers to constants. + * fns.c (require_nesting_list, require_unwind): Now static. (Ffillarray): Rename locals to avoid shadowing. diff --git a/src/font.c b/src/font.c index 35821ae34f9..3b2ae9c6620 100644 --- a/src/font.c +++ b/src/font.c @@ -1163,7 +1163,8 @@ font_parse_xlfd (char *name, Lisp_Object font) int font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes) { - char *f[XLFD_REGISTRY_INDEX + 1]; + char *p; + const char *f[XLFD_REGISTRY_INDEX + 1]; Lisp_Object val; int i, j, len = 0; @@ -1194,14 +1195,14 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes) /* Change "jisx0208*" and "jisx0208" to "jisx0208*-*". */ if (SDATA (val)[SBYTES (val) - 1] == '*') { - f[j] = alloca (SBYTES (val) + 3); - sprintf (f[j], "%s-*", SDATA (val)); + f[j] = p = alloca (SBYTES (val) + 3); + sprintf (p, "%s-*", SDATA (val)); len += SBYTES (val) + 3; } else { - f[j] = alloca (SBYTES (val) + 4); - sprintf (f[j], "%s*-*", SDATA (val)); + f[j] = p = alloca (SBYTES (val) + 4); + sprintf (p, "%s*-*", SDATA (val)); len += SBYTES (val) + 4; } } @@ -1232,8 +1233,8 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes) i = pixel_size; if (i > 0) { - f[XLFD_PIXEL_INDEX] = alloca (22); - len += sprintf (f[XLFD_PIXEL_INDEX], "%d-*", i) + 1; + f[XLFD_PIXEL_INDEX] = p = alloca (22); + len += sprintf (p, "%d-*", i) + 1; } else f[XLFD_PIXEL_INDEX] = "*-*", len += 4; @@ -1241,8 +1242,8 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes) else if (FLOATP (val)) { i = XFLOAT_DATA (val) * 10; - f[XLFD_PIXEL_INDEX] = alloca (12); - len += sprintf (f[XLFD_PIXEL_INDEX], "*-%d", i) + 1; + f[XLFD_PIXEL_INDEX] = p = alloca (12); + len += sprintf (p, "*-%d", i) + 1; } else f[XLFD_PIXEL_INDEX] = "*-*", len += 4; @@ -1250,9 +1251,8 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes) if (INTEGERP (AREF (font, FONT_DPI_INDEX))) { i = XINT (AREF (font, FONT_DPI_INDEX)); - f[XLFD_RESX_INDEX] = alloca (22); - len += sprintf (f[XLFD_RESX_INDEX], - "%d-%d", i, i) + 1; + f[XLFD_RESX_INDEX] = p = alloca (22); + len += sprintf (p, "%d-%d", i, i) + 1; } else f[XLFD_RESX_INDEX] = "*-*", len += 4; @@ -1270,8 +1270,8 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes) f[XLFD_SPACING_INDEX] = "*", len += 2; if (INTEGERP (AREF (font, FONT_AVGWIDTH_INDEX))) { - f[XLFD_AVGWIDTH_INDEX] = alloca (11); - len += sprintf (f[XLFD_AVGWIDTH_INDEX], "%ld", + f[XLFD_AVGWIDTH_INDEX] = p = alloca (11); + len += sprintf (p, "%ld", (long) XINT (AREF (font, FONT_AVGWIDTH_INDEX))) + 1; } else From 89bc529a4c8578046172d80776abcf3fadc0dbe8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 01:20:40 -0700 Subject: [PATCH 324/383] * font.c (font_parse_fcname): Remove unused vars. --- src/ChangeLog | 1 + src/font.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e9a6d5da5a3..ba1bd03265b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * font.c (font_unparse_xlfd): Don't mix pointers to variables with pointers to constants. + (font_parse_fcname): Remove unused vars. * fns.c (require_nesting_list, require_unwind): Now static. (Ffillarray): Rename locals to avoid shadowing. diff --git a/src/font.c b/src/font.c index 3b2ae9c6620..16812255e87 100644 --- a/src/font.c +++ b/src/font.c @@ -1448,12 +1448,10 @@ font_parse_fcname (char *name, Lisp_Object font) { /* Either a fontconfig-style name with no size and property data, or a GTK-style name. */ - Lisp_Object prop; Lisp_Object weight = Qnil, slant = Qnil; Lisp_Object width = Qnil, size = Qnil; char *word_start; int word_len; - int size_found = 0; /* Scan backwards from the end, looking for a size. */ for (p = name + len - 1; p >= name; p--) From 7b81e2d023093bf21cf867ec42ffff3ee7114cf5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 01:22:13 -0700 Subject: [PATCH 325/383] * font.c (font_delete_unmatched): Now static. --- src/ChangeLog | 1 + src/font.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ba1bd03265b..63e23749374 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,6 +3,7 @@ * font.c (font_unparse_xlfd): Don't mix pointers to variables with pointers to constants. (font_parse_fcname): Remove unused vars. + (font_delete_unmatched): Now static. * fns.c (require_nesting_list, require_unwind): Now static. (Ffillarray): Rename locals to avoid shadowing. diff --git a/src/font.c b/src/font.c index 16812255e87..25e2968df7f 100644 --- a/src/font.c +++ b/src/font.c @@ -2600,7 +2600,7 @@ static Lisp_Object scratch_font_spec, scratch_font_prefer; (2) doesn't match with any regexps in Vface_ignored_fonts (if non-nil). */ -Lisp_Object +static Lisp_Object font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size) { Lisp_Object entity, val; From ea838e10ea8a3e390b2d9160e02c4a5e08714850 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 01:22:49 -0700 Subject: [PATCH 326/383] * font.c (font_get_spec): Remove; unused. --- src/ChangeLog | 1 + src/font.c | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 63e23749374..1b707c4b463 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ pointers to constants. (font_parse_fcname): Remove unused vars. (font_delete_unmatched): Now static. + (font_get_spec): Remove; unused. * fns.c (require_nesting_list, require_unwind): Now static. (Ffillarray): Rename locals to avoid shadowing. diff --git a/src/font.c b/src/font.c index 25e2968df7f..ed3b3aeefc5 100644 --- a/src/font.c +++ b/src/font.c @@ -2949,22 +2949,6 @@ font_get_name (Lisp_Object font_object) } -/* Return the specification of FONT_OBJECT. */ - -Lisp_Object -font_get_spec (Lisp_Object font_object) -{ - Lisp_Object spec = font_make_spec (); - int i; - - for (i = 0; i < FONT_SIZE_INDEX; i++) - ASET (spec, i, AREF (font_object, i)); - ASET (spec, FONT_SIZE_INDEX, - make_number (XFONT_OBJECT (font_object)->pixel_size)); - return spec; -} - - /* Create a new font spec from FONT_NAME, and return it. If FONT_NAME could not be parsed by font_parse_name, return Qnil. */ From 170a2692ec2abdc4e4978206ddec6bebb6c989b2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 01:31:20 -0700 Subject: [PATCH 327/383] * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing. --- src/ChangeLog | 2 ++ src/character.h | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1b707c4b463..4b3f0ceca36 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-16 Paul Eggert + * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing. + * font.c (font_unparse_xlfd): Don't mix pointers to variables with pointers to constants. (font_parse_fcname): Remove unused vars. diff --git a/src/character.h b/src/character.h index f0b0002032e..77c670728d0 100644 --- a/src/character.h +++ b/src/character.h @@ -417,10 +417,10 @@ along with GNU Emacs. If not, see . */ if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) \ { \ unsigned char *ptr = BYTE_POS_ADDR (BYTEIDX); \ - int len; \ + int string_len; \ \ - OUTPUT= STRING_CHAR_AND_LENGTH (ptr, len); \ - BYTEIDX += len; \ + OUTPUT= STRING_CHAR_AND_LENGTH (ptr, string_len); \ + BYTEIDX += string_len; \ } \ else \ { \ From 13a547c6792935558a306bec264e0bad575cec87 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 01:34:44 -0700 Subject: [PATCH 328/383] * font.c: (font_style_to_value, font_prop_validate_style, font_unparse_fcname): (font_update_drivers, Ffont_get_glyphs, font_add_log): Rename or move locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/font.c | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 4b3f0ceca36..b056c08419e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -7,6 +7,9 @@ (font_parse_fcname): Remove unused vars. (font_delete_unmatched): Now static. (font_get_spec): Remove; unused. + (font_style_to_value, font_prop_validate_style, font_unparse_fcname): + (font_update_drivers, Ffont_get_glyphs, font_add_log): + Rename or move locals to avoid shadowing. * fns.c (require_nesting_list, require_unwind): Now static. (Ffillarray): Rename locals to avoid shadowing. diff --git a/src/font.c b/src/font.c index ed3b3aeefc5..a9a381a828d 100644 --- a/src/font.c +++ b/src/font.c @@ -311,10 +311,10 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val, int noerror { Lisp_Object table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); int len = ASIZE (table); - int i, j; if (SYMBOLP (val)) { + int i, j; char *s; Lisp_Object args[2], elt; @@ -500,10 +500,9 @@ font_prop_validate_style (Lisp_Object style, Lisp_Object val) enum font_property_index prop = (EQ (style, QCweight) ? FONT_WEIGHT_INDEX : EQ (style, QCslant) ? FONT_SLANT_INDEX : FONT_WIDTH_INDEX); - int n; if (INTEGERP (val)) { - n = XINT (val); + int n = XINT (val); if (((n >> 4) & 0xF) >= ASIZE (AREF (font_style_table, prop - FONT_WEIGHT_INDEX))) val = Qerror; @@ -1602,15 +1601,15 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes) len += strlen (":scalable=false"); /* or ":scalable=true" */ for (tail = AREF (font, FONT_EXTRA_INDEX); CONSP (tail); tail = XCDR (tail)) { - Lisp_Object key = XCAR (XCAR (tail)), val = XCDR (XCAR (tail)); + Lisp_Object key = XCAR (XCAR (tail)), value = XCDR (XCAR (tail)); len += SBYTES (SYMBOL_NAME (key)) + 1; /* for :KEY= */ - if (STRINGP (val)) - len += SBYTES (val); - else if (INTEGERP (val)) - len += sprintf (work, "%ld", (long) XINT (val)); - else if (SYMBOLP (val)) - len += (NILP (val) ? 5 : 4); /* for "false" or "true" */ + if (STRINGP (value)) + len += SBYTES (value); + else if (INTEGERP (value)) + len += sprintf (work, "%ld", (long) XINT (value)); + else if (SYMBOLP (value)) + len += (NILP (value) ? 5 : 4); /* for "false" or "true" */ } if (len > nbytes) @@ -3418,14 +3417,13 @@ Lisp_Object font_update_drivers (FRAME_PTR f, Lisp_Object new_drivers) { Lisp_Object active_drivers = Qnil; - struct font_driver *driver; struct font_driver_list *list; /* At first, turn off non-requested drivers, and turn on requested drivers. */ for (list = f->font_driver_list; list; list = list->next) { - driver = list->driver; + struct font_driver *driver = list->driver; if ((EQ (new_drivers, Qt) || ! NILP (Fmemq (driver->type, new_drivers))) != list->on) { @@ -4651,7 +4649,7 @@ the corresponding element is nil. */) Lisp_Object object) { struct font *font; - int i, len, c; + int i, len; Lisp_Object *chars, vec; USE_SAFE_ALLOCA; @@ -4669,6 +4667,7 @@ the corresponding element is nil. */) bytepos = CHAR_TO_BYTE (charpos); for (i = 0; charpos < XFASTINT (to); i++) { + int c; FETCH_CHAR_ADVANCE (c, charpos, bytepos); chars[i] = make_number (c); } @@ -4690,7 +4689,7 @@ the corresponding element is nil. */) if (STRING_MULTIBYTE (object)) for (i = 0; i < len; i++) { - c = STRING_CHAR_ADVANCE (p); + int c = STRING_CHAR_ADVANCE (p); chars[i] = make_number (c); } else @@ -4941,7 +4940,7 @@ static Lisp_Object Vfont_log_deferred; void font_add_log (const char *action, Lisp_Object arg, Lisp_Object result) { - Lisp_Object tail, val; + Lisp_Object val; int i; if (EQ (Vfont_log, Qt)) @@ -4997,6 +4996,7 @@ font_add_log (const char *action, Lisp_Object arg, Lisp_Object result) } else if (CONSP (result)) { + Lisp_Object tail; result = Fcopy_sequence (result); for (tail = result; CONSP (tail); tail = XCDR (tail)) { From 35ac2a97f505a3c0de5cc2d4cf40b5b2f22529d0 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 16 Mar 2011 10:23:26 -0400 Subject: [PATCH 329/383] * src/print.c (print_preprocess): Don't forget font objects. --- src/ChangeLog | 4 ++++ src/print.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 44e4494d79a..e25ed31f45b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-16 Stefan Monnier + + * print.c (print_preprocess): Don't forget font objects. + 2011-03-16 Juanma Barranquero * emacs.c (USAGE3): Doc fixes. diff --git a/src/print.c b/src/print.c index 29a4bfab790..f48ba57b574 100644 --- a/src/print.c +++ b/src/print.c @@ -1209,7 +1209,7 @@ print_preprocess (Lisp_Object obj) loop: if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) - || HASH_TABLE_P (obj) + || HASH_TABLE_P (obj) || FONTP (obj) || (! NILP (Vprint_gensym) && SYMBOLP (obj) && !SYMBOL_INTERNED_P (obj))) From e4021ec1d72e0493b9f80230a9324c06d0579581 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 16 Mar 2011 10:54:21 -0400 Subject: [PATCH 330/383] * strings.texi (String Conversion): Don't mention string-make-(uni|multi)byte. * nonascii.texi (Converting Representations): Fix up range. * keymaps.texi (Key Binding Commands): Update code point, avoid "unibyte character" and remove mention of unibyte bindings. Fixes: debbugs:8262 --- doc/lispref/ChangeLog | 8 ++++++++ doc/lispref/keymaps.texi | 14 +++++--------- doc/lispref/nonascii.texi | 2 +- doc/lispref/strings.texi | 4 ++-- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index a52a8e73dd1..90a1d24ce04 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,11 @@ +2011-03-16 Stefan Monnier + + * strings.texi (String Conversion): Don't mention + string-make-(uni|multi)byte (bug#8262). + * nonascii.texi (Converting Representations): Fix up range. + * keymaps.texi (Key Binding Commands): Update code point, avoid + "unibyte character" and remove mention of unibyte bindings. + 2011-03-07 Chong Yidong * Version 23.3 released. diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index bc1937442f8..1d485ab67ba 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -1707,15 +1707,11 @@ or @noindent and your language environment is multibyte Latin-1, these commands -actually bind the multibyte character with code 2294, not the unibyte -Latin-1 character with code 246 (@kbd{M-v}). In order to use this -binding, you need to enter the multibyte Latin-1 character as keyboard -input. One way to do this is by using an appropriate input method -(@pxref{Input Methods, , Input Methods, emacs, The GNU Emacs Manual}). - - If you want to use a unibyte character in the key binding, you can -construct the key sequence string using @code{multibyte-char-to-unibyte} -or @code{string-make-unibyte} (@pxref{Converting Representations}). +actually bind the multibyte character with code 246, not the byte +code 246 (@kbd{M-v}) sent by a Latin-1 terminal. In order to use this +binding, you need to teach Emacs how to decode the keyboard by using an +appropriate input method (@pxref{Input Methods, , Input Methods, emacs, The GNU +Emacs Manual}). @deffn Command global-set-key key binding This function sets the binding of @var{key} in the current global map diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index cb075e10a94..3093613ccaa 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -171,7 +171,7 @@ acceptable because the buffer's representation is a choice made by the user that cannot be overridden automatically. Converting unibyte text to multibyte text leaves @acronym{ASCII} -characters unchanged, and converts bytes with codes 128 through 159 to +characters unchanged, and converts bytes with codes 128 through 255 to the multibyte representation of raw eight-bit bytes. Converting multibyte text to unibyte converts all @acronym{ASCII} diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index bb550346e9d..925c92050e4 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -555,8 +555,8 @@ strings and integers. @code{format} (@pxref{Formatting Strings}) and @code{prin1-to-string} (@pxref{Output Functions}) can also convert Lisp objects into strings. @code{read-from-string} (@pxref{Input Functions}) can ``convert'' a string representation of a Lisp object -into an object. The functions @code{string-make-multibyte} and -@code{string-make-unibyte} convert the text representation of a string +into an object. The functions @code{string-to-multibyte} and +@code{string-to-unibyte} convert the text representation of a string (@pxref{Converting Representations}). @xref{Documentation}, for functions that produce textual descriptions From fb103ca9a72ab9ddeeea1a9cfef85b0492ab9651 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 16 Mar 2011 13:34:26 -0400 Subject: [PATCH 331/383] * src/print.c (PRINT_CIRCLE_CANDIDATE_P): New macro. (print_preprocess, print_object): New macro to fix last change. --- src/ChangeLog | 3 +++ src/print.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e25ed31f45b..c43d3ba95ec 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-16 Stefan Monnier + * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro. + (print_preprocess, print_object): New macro to fix last change. + * print.c (print_preprocess): Don't forget font objects. 2011-03-16 Juanma Barranquero diff --git a/src/print.c b/src/print.c index f48ba57b574..c7011642643 100644 --- a/src/print.c +++ b/src/print.c @@ -1173,6 +1173,16 @@ print (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag) print_object (obj, printcharfun, escapeflag); } +#define PRINT_CIRCLE_CANDIDATE_P(obj) \ + (STRINGP (obj) || CONSP (obj) \ + || (VECTORLIKEP (obj) \ + && (VECTORP (obj) || COMPILEDP (obj) \ + || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) \ + || HASH_TABLE_P (obj) || FONTP (obj))) \ + || (! NILP (Vprint_gensym) \ + && SYMBOLP (obj) \ + && !SYMBOL_INTERNED_P (obj))) + /* Construct Vprint_number_table according to the structure of OBJ. OBJ itself and all its elements will be added to Vprint_number_table recursively if it is a list, vector, compiled function, char-table, @@ -1207,12 +1217,7 @@ print_preprocess (Lisp_Object obj) halftail = obj; loop: - if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) - || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) - || HASH_TABLE_P (obj) || FONTP (obj) - || (! NILP (Vprint_gensym) - && SYMBOLP (obj) - && !SYMBOL_INTERNED_P (obj))) + if (PRINT_CIRCLE_CANDIDATE_P (obj)) { if (!HASH_TABLE_P (Vprint_number_table)) { @@ -1389,12 +1394,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag error ("Apparently circular structure being printed"); /* Detect circularities and truncate them. */ - if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) - || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) - || HASH_TABLE_P (obj) - || (! NILP (Vprint_gensym) - && SYMBOLP (obj) - && !SYMBOL_INTERNED_P (obj))) + if (PRINT_CIRCLE_CANDIDATE_P (obj)) { if (NILP (Vprint_circle) && NILP (Vprint_gensym)) { From b091141444a16b1d46a627a76957ab7af2309836 Mon Sep 17 00:00:00 2001 From: Ken Manheimer Date: Wed, 16 Mar 2011 15:03:06 -0400 Subject: [PATCH 332/383] * allout.el (allout-yank-processing): Adjust for new rebulleting regime so bullet being yanked is used without prompting the user for a choice. --- lisp/ChangeLog | 6 ++++++ lisp/allout.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9dcc5fb9ca5..e1bce10b980 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-16 Ken Manheimer + + * allout.el (allout-yank-processing): Adjust for new rebulleting + regime so bullet being yanked is used without prompting the user + for a choice. + 2011-03-16 Juanma Barranquero * startup.el (command-line): Warn the user that _emacs is deprecated. diff --git a/lisp/allout.el b/lisp/allout.el index 2df606e45c6..3fb8ed7ccd5 100644 --- a/lisp/allout.el +++ b/lisp/allout.el @@ -4599,7 +4599,7 @@ however, are left exactly like normal, non-allout-specific yanks." (if (looking-at " ") (delete-char 1)))) ;; Assert new topic's bullet - minimal effort if unchanged: - (allout-rebullet-heading prefix-bullet)) + (allout-rebullet-heading (string-to-char prefix-bullet))) (exchange-point-and-mark)))) (if rectify-numbering (progn From 3ddb06397195434207cd188506693626b8c57a32 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 14:14:06 -0700 Subject: [PATCH 333/383] * font.c (font_unparse_fcname): Abort in an "impossible" situation instead of using an uninitialized var. --- src/ChangeLog | 3 +++ src/font.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index b056c08419e..210b756e0ee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-16 Paul Eggert + * font.c (font_unparse_fcname): Abort in an "impossible" situation + instead of using an uninitialized var. + * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing. * font.c (font_unparse_xlfd): Don't mix pointers to variables with diff --git a/src/font.c b/src/font.c index a9a381a828d..5df0510b518 100644 --- a/src/font.c +++ b/src/font.c @@ -1566,8 +1566,10 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes) point_size = -1; len += 21; /* for ":pixelsize=NUM" */ } - else if (FLOATP (val)) + else { + if (! FLOATP (val)) + abort (); pixel_size = -1; point_size = (int) XFLOAT_DATA (val); len += 11; /* for "-NUM" */ From 5ad03b978fea0a7cfeb8e0b8f78484244642c1c5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 14:23:37 -0700 Subject: [PATCH 334/383] * font.c (font_sort_entities): Mark var as initialized. --- src/ChangeLog | 1 + src/font.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 210b756e0ee..1f30c599626 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * font.c (font_unparse_fcname): Abort in an "impossible" situation instead of using an uninitialized var. + (font_sort_entities): Mark var as initialized. * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing. diff --git a/src/font.c b/src/font.c index 5df0510b518..9e8b7029c22 100644 --- a/src/font.c +++ b/src/font.c @@ -2177,7 +2177,7 @@ font_sort_entities (Lisp_Object list, Lisp_Object prefer, Lisp_Object frame, int unsigned best_score; Lisp_Object best_entity; struct frame *f = XFRAME (frame); - Lisp_Object tail, vec; + Lisp_Object tail, vec IF_LINT (= Qnil); USE_SAFE_ALLOCA; for (i = FONT_WEIGHT_INDEX; i <= FONT_AVGWIDTH_INDEX; i++) From f08b802adcfe721e35de22ab868149d66c28c7f6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 14:27:03 -0700 Subject: [PATCH 335/383] * lisp.h (debug_output_compilation_hack): Add decl here, to avoid warning when compiling print.c. --- src/ChangeLog | 3 +++ src/lisp.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 1f30c599626..5f02fa1188d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-16 Paul Eggert + * lisp.h (debug_output_compilation_hack): Add decl here, to avoid + warning when compiling print.c. + * font.c (font_unparse_fcname): Abort in an "impossible" situation instead of using an uninitialized var. (font_sort_entities): Mark var as initialized. diff --git a/src/lisp.h b/src/lisp.h index 074c758ce8e..04d75d55dc6 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2763,6 +2763,7 @@ EXFUN (Fprint, 2); EXFUN (Ferror_message_string, 1); extern Lisp_Object Qstandard_output; extern Lisp_Object Qexternal_debugging_output; +extern void debug_output_compilation_hack (int); extern void temp_output_buffer_setup (const char *); extern int print_level; extern Lisp_Object Qprint_escape_newlines; From d4d7173a912c261de01021649468f06df1b1a5a3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 14:28:29 -0700 Subject: [PATCH 336/383] * print.c (Fredirect_debugging_output): Fix pointer signedess. --- src/ChangeLog | 2 ++ src/print.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5f02fa1188d..690a585b641 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-16 Paul Eggert + * print.c (Fredirect_debugging_output): Fix pointer signedess. + * lisp.h (debug_output_compilation_hack): Add decl here, to avoid warning when compiling print.c. diff --git a/src/print.c b/src/print.c index 29a4bfab790..b2e5965cd1c 100644 --- a/src/print.c +++ b/src/print.c @@ -854,7 +854,7 @@ append to existing target file. */) { file = Fexpand_file_name (file, Qnil); initial_stderr_stream = stderr; - stderr = fopen (SDATA (file), NILP (append) ? "w" : "a"); + stderr = fopen (SSDATA (file), NILP (append) ? "w" : "a"); if (stderr == NULL) { stderr = initial_stderr_stream; From cef2010db4a6e9f7264e60620c0e84123245e696 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 14:29:13 -0700 Subject: [PATCH 337/383] * lread.c (read1): Rewrite so as not to use empty "else". --- src/ChangeLog | 2 ++ src/lread.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 690a585b641..8bdb71c582b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-16 Paul Eggert + * lread.c (read1): Rewrite so as not to use empty "else". + * print.c (Fredirect_debugging_output): Fix pointer signedess. * lisp.h (debug_output_compilation_hack): Add decl here, to avoid diff --git a/src/lread.c b/src/lread.c index 3c5b627f98c..a287ed0e4bd 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2781,8 +2781,9 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) p = read_buffer + nchars; } else - /* Otherwise, READ_BUFFER contains only ASCII. */ - ; + { + /* Otherwise, READ_BUFFER contains only ASCII. */ + } /* We want readchar_count to be the number of characters, not bytes. Hence we adjust for multibyte characters in the From a6670b0ba2834d8996162596a55e09b1428e4ee6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 14:34:32 -0700 Subject: [PATCH 338/383] * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS): Rename locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/character.h | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8bdb71c582b..e68f478cb40 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-16 Paul Eggert + * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS): + Rename locals to avoid shadowing. + * lread.c (read1): Rewrite so as not to use empty "else". * print.c (Fredirect_debugging_output): Fix pointer signedess. diff --git a/src/character.h b/src/character.h index 77c670728d0..4c468e14d2c 100644 --- a/src/character.h +++ b/src/character.h @@ -397,11 +397,11 @@ along with GNU Emacs. If not, see . */ #define FETCH_STRING_CHAR_ADVANCE_NO_CHECK(OUTPUT, STRING, CHARIDX, BYTEIDX) \ do \ { \ - unsigned char *ptr = &SDATA (STRING)[BYTEIDX]; \ - int len; \ + unsigned char *fetch_ptr = &SDATA (STRING)[BYTEIDX]; \ + int fetch_len; \ \ - OUTPUT = STRING_CHAR_AND_LENGTH (ptr, len); \ - BYTEIDX += len; \ + OUTPUT = STRING_CHAR_AND_LENGTH (fetch_ptr, fetch_len); \ + BYTEIDX += fetch_len; \ CHARIDX++; \ } \ while (0) @@ -510,8 +510,8 @@ along with GNU Emacs. If not, see . */ #define BUF_INC_POS(buf, pos_byte) \ do { \ - unsigned char *p = BUF_BYTE_ADDRESS (buf, pos_byte); \ - pos_byte += BYTES_BY_CHAR_HEAD (*p); \ + unsigned char *bbp = BUF_BYTE_ADDRESS (buf, pos_byte); \ + pos_byte += BYTES_BY_CHAR_HEAD (*bbp); \ } while (0) From 0902fe454066bb22a1c3874bb8d58693f39b78df Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 14:40:51 -0700 Subject: [PATCH 339/383] * lread.c (Fload, readevalloop, read1): Rename locals to avoid shadowing. --- src/ChangeLog | 1 + src/lread.c | 58 +++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e68f478cb40..95cbf19dbd4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ Rename locals to avoid shadowing. * lread.c (read1): Rewrite so as not to use empty "else". + (Fload, readevalloop, read1): Rename locals to avoid shadowing. * print.c (Fredirect_debugging_output): Fix pointer signedess. diff --git a/src/lread.c b/src/lread.c index a287ed0e4bd..a5fd1513c39 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1020,10 +1020,10 @@ Return t if the file exists and loads successfully. */) Also, just loading a file recursively is not always an error in the general case; the second load may do something different. */ { - int count = 0; + int load_count = 0; Lisp_Object tem; for (tem = Vloads_in_progress; CONSP (tem); tem = XCDR (tem)) - if (!NILP (Fequal (found, XCAR (tem))) && (++count > 3)) + if (!NILP (Fequal (found, XCAR (tem))) && (++load_count > 3)) { if (fd >= 0) emacs_close (fd); @@ -1654,8 +1654,8 @@ readevalloop (Lisp_Object readcharfun, to a different value when evaluated. */ if (BUFFERP (readcharfun)) { - struct buffer *b = XBUFFER (readcharfun); - if (BUF_PT (b) == BUF_ZV (b)) + struct buffer *buf = XBUFFER (readcharfun); + if (BUF_PT (buf) == BUF_ZV (buf)) continue_reading_p = 0; } } @@ -2674,7 +2674,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) { char *p = read_buffer; char *end = read_buffer + read_buffer_size; - register int c; + register int ch; /* Nonzero if we saw an escape sequence specifying a multibyte character. */ int force_multibyte = 0; @@ -2684,8 +2684,8 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) int cancel = 0; int nchars = 0; - while ((c = READCHAR) >= 0 - && c != '\"') + while ((ch = READCHAR) >= 0 + && ch != '\"') { if (end - p < MAX_MULTIBYTE_LENGTH) { @@ -2696,44 +2696,44 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) end = read_buffer + read_buffer_size; } - if (c == '\\') + if (ch == '\\') { int modifiers; - c = read_escape (readcharfun, 1); + ch = read_escape (readcharfun, 1); - /* C is -1 if \ newline has just been seen */ - if (c == -1) + /* CH is -1 if \ newline has just been seen */ + if (ch == -1) { if (p == read_buffer) cancel = 1; continue; } - modifiers = c & CHAR_MODIFIER_MASK; - c = c & ~CHAR_MODIFIER_MASK; + modifiers = ch & CHAR_MODIFIER_MASK; + ch = ch & ~CHAR_MODIFIER_MASK; - if (CHAR_BYTE8_P (c)) + if (CHAR_BYTE8_P (ch)) force_singlebyte = 1; - else if (! ASCII_CHAR_P (c)) + else if (! ASCII_CHAR_P (ch)) force_multibyte = 1; - else /* i.e. ASCII_CHAR_P (c) */ + else /* i.e. ASCII_CHAR_P (ch) */ { /* Allow `\C- ' and `\C-?'. */ if (modifiers == CHAR_CTL) { - if (c == ' ') - c = 0, modifiers = 0; - else if (c == '?') - c = 127, modifiers = 0; + if (ch == ' ') + ch = 0, modifiers = 0; + else if (ch == '?') + ch = 127, modifiers = 0; } if (modifiers & CHAR_SHIFT) { /* Shift modifier is valid only with [A-Za-z]. */ - if (c >= 'A' && c <= 'Z') + if (ch >= 'A' && ch <= 'Z') modifiers &= ~CHAR_SHIFT; - else if (c >= 'a' && c <= 'z') - c -= ('a' - 'A'), modifiers &= ~CHAR_SHIFT; + else if (ch >= 'a' && ch <= 'z') + ch -= ('a' - 'A'), modifiers &= ~CHAR_SHIFT; } if (modifiers & CHAR_META) @@ -2741,7 +2741,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) /* Move the meta bit to the right place for a string. */ modifiers &= ~CHAR_META; - c = BYTE8_TO_CHAR (c | 0x80); + ch = BYTE8_TO_CHAR (ch | 0x80); force_singlebyte = 1; } } @@ -2749,20 +2749,20 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) /* Any modifiers remaining are invalid. */ if (modifiers) error ("Invalid modifier in string"); - p += CHAR_STRING (c, (unsigned char *) p); + p += CHAR_STRING (ch, (unsigned char *) p); } else { - p += CHAR_STRING (c, (unsigned char *) p); - if (CHAR_BYTE8_P (c)) + p += CHAR_STRING (ch, (unsigned char *) p); + if (CHAR_BYTE8_P (ch)) force_singlebyte = 1; - else if (! ASCII_CHAR_P (c)) + else if (! ASCII_CHAR_P (ch)) force_multibyte = 1; } nchars++; } - if (c < 0) + if (ch < 0) end_of_file_error (); /* If purifying, and string starts with \ newline, From 01f44d5a68abccff781109300abf0616949b99c5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 14:43:38 -0700 Subject: [PATCH 340/383] * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid shadowing. --- src/ChangeLog | 3 +++ src/syntax.c | 15 +++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 95cbf19dbd4..46a9daf13e8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-16 Paul Eggert + * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid + shadowing. + * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS): Rename locals to avoid shadowing. diff --git a/src/syntax.c b/src/syntax.c index 707c2c19f31..1a615d735e4 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -554,7 +554,7 @@ back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested com2end = (SYNTAX_FLAGS_COMEND_FIRST (syntax) && SYNTAX_FLAGS_COMEND_SECOND (prev_syntax)); comstart = (com2start || code == Scomment); - + /* Nasty cases with overlapping 2-char comment markers: - snmp-mode: -- c -- foo -- c -- --- c -- @@ -2363,7 +2363,7 @@ between them, return t; otherwise return nil. */) if (code == Scomment_fence) { /* Skip until first preceding unquoted comment_fence. */ - int found = 0; + int fence_found = 0; EMACS_INT ini = from, ini_byte = from_byte; while (1) @@ -2374,13 +2374,13 @@ between them, return t; otherwise return nil. */) if (SYNTAX (c) == Scomment_fence && !char_quoted (from, from_byte)) { - found = 1; + fence_found = 1; break; } else if (from == stop) break; } - if (found == 0) + if (fence_found == 0) { from = ini; /* Set point to ini + 1. */ from_byte = ini_byte; @@ -2669,12 +2669,12 @@ scan_lists (register EMACS_INT from, EMACS_INT count, EMACS_INT depth, int sexpf /* We must record the comment style encountered so that later, we can match only the proper comment begin sequence of the same style. */ - int c1, other_syntax; + int c2, other_syntax; DEC_BOTH (from, from_byte); UPDATE_SYNTAX_TABLE_BACKWARD (from); code = Sendcomment; - c1 = FETCH_CHAR_AS_MULTIBYTE (from_byte); - other_syntax = SYNTAX_WITH_FLAGS (c1); + c2 = FETCH_CHAR_AS_MULTIBYTE (from_byte); + other_syntax = SYNTAX_WITH_FLAGS (c2); comstyle = SYNTAX_FLAGS_COMMENT_STYLE (other_syntax, syntax); comnested = comnested || SYNTAX_FLAGS_COMMENT_NESTED (other_syntax); @@ -3528,4 +3528,3 @@ In both cases, LIMIT bounds the search. */); defsubr (&Sbackward_prefix_chars); defsubr (&Sparse_partial_sexp); } - From 4f63c6bb76e662fe8025969e0e16ab8906e0ba22 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 14:47:59 -0700 Subject: [PATCH 341/383] * syntax.c (back_comment, skip_chars): Mark vars as initialized. --- src/ChangeLog | 1 + src/syntax.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 46a9daf13e8..7bc0a8fcc49 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,7 @@ * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid shadowing. + (back_comment, skip_chars): Mark vars as initialized. * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS): Rename locals to avoid shadowing. diff --git a/src/syntax.c b/src/syntax.c index 1a615d735e4..c1442c396c1 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -513,7 +513,7 @@ back_comment (EMACS_INT from, EMACS_INT from_byte, EMACS_INT stop, int comnested EMACS_INT comment_end = from; EMACS_INT comment_end_byte = from_byte; EMACS_INT comstart_pos = 0; - EMACS_INT comstart_byte; + EMACS_INT comstart_byte IF_LINT (= 0); /* Place where the containing defun starts, or 0 if we didn't come across it yet. */ EMACS_INT defun_start = 0; @@ -1421,7 +1421,7 @@ skip_chars (int forwardp, Lisp_Object string, Lisp_Object lim, int handle_iso_cl register unsigned int c; unsigned char fastmap[0400]; /* Store the ranges of non-ASCII characters. */ - int *char_ranges; + int *char_ranges IF_LINT (= NULL); int n_char_ranges = 0; int negate = 0; register EMACS_INT i, i_byte; From ce701a3393e8f02410dc0d076d5ddf57ef324260 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 16:59:54 -0700 Subject: [PATCH 342/383] New file unexec.h, the (simple) interface for unexec. * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o): (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o): Depend on unexec.h. * emacs.c [!defined CANNOT_DUMP]: Include unexec.h. * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c: * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h. --- src/ChangeLog | 8 ++++++++ src/deps.mk | 18 +++++++++--------- src/emacs.c | 4 +--- src/unexaix.c | 2 ++ src/unexcoff.c | 2 ++ src/unexcw.c | 3 ++- src/unexelf.c | 2 ++ src/unexhp9k800.c | 3 ++- src/unexmacosx.c | 3 +++ src/unexsol.c | 2 ++ src/unexw32.c | 1 + 11 files changed, 34 insertions(+), 14 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7bc0a8fcc49..14d3e37a8ee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2011-03-16 Paul Eggert + New file unexec.h, the (simple) interface for unexec. + * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o): + (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o): + Depend on unexec.h. + * emacs.c [!defined CANNOT_DUMP]: Include unexec.h. + * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c: + * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h. + * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid shadowing. (back_comment, skip_chars): Mark vars as initialized. diff --git a/src/deps.mk b/src/deps.mk index 80a5721cf39..c868ff0e3c0 100644 --- a/src/deps.mk +++ b/src/deps.mk @@ -93,7 +93,7 @@ editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \ termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \ globals.h ../lib/unistd.h window.h dispextern.h keyboard.h keymap.h \ - frame.h coding.h gnutls.h msdos.h + frame.h coding.h gnutls.h msdos.h unexec.h fileio.o: fileio.c window.h buffer.h systime.h $(INTERVALS_H) character.h \ coding.h msdos.h blockinput.h atimer.h lisp.h $(config_h) frame.h \ commands.h globals.h ../lib/unistd.h @@ -200,15 +200,15 @@ terminfo.o: terminfo.c lisp.h globals.h $(config_h) tparam.o: tparam.c tparam.h lisp.h $(config_h) undo.o: undo.c buffer.h commands.h window.h dispextern.h msdos.h \ lisp.h globals.h $(config_h) -unexaix.o: unexaix.c lisp.h $(config_h) +unexaix.o: unexaix.c lisp.h unexec.h $(config_h) unexalpha.o: unexalpha.c $(config_h) -unexcw.o: unexcw.c lisp.h $(config_h) -unexcoff.o: unexcoff.c lisp.h $(config_h) -unexelf.o: unexelf.c ../lib/unistd.h $(config_h) -unexhp9k800.o: unexhp9k800.c $(config_h) -unexmacosx.o: unexmacosx.c $(config_h) -unexsol.o: unexsol.c lisp.h $(config_h) -unexw32.o: unexw32.c $(config_h) +unexcw.o: unexcw.c lisp.h unexec.h $(config_h) +unexcoff.o: unexcoff.c lisp.h unexec.h $(config_h) +unexelf.o: unexelf.c unexec.h ../lib/unistd.h $(config_h) +unexhp9k800.o: unexhp9k800.c unexec.h $(config_h) +unexmacosx.o: unexmacosx.c unexec.h $(config_h) +unexsol.o: unexsol.c lisp.h unexec.h $(config_h) +unexw32.o: unexw32.c unexec.h $(config_h) w16select.o: w16select.c dispextern.h frame.h blockinput.h atimer.h systime.h \ msdos.h buffer.h charset.h coding.h composite.h lisp.h $(config_h) widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \ diff --git a/src/emacs.c b/src/emacs.c index c49e38f7a67..d30d42f1ee4 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2085,9 +2085,7 @@ shut_down_emacs (int sig, int no_x, Lisp_Object stuff) #ifndef CANNOT_DUMP -/* FIXME: maybe this should go into header file, config.h seems the - only one appropriate. */ -extern int unexec (const char *, const char *); +#include "unexec.h" DEFUN ("dump-emacs", Fdump_emacs, Sdump_emacs, 2, 2, 0, doc: /* Dump current state of Emacs into executable file FILENAME. diff --git a/src/unexaix.c b/src/unexaix.c index fe9d13d3e47..612d7c1fecf 100644 --- a/src/unexaix.c +++ b/src/unexaix.c @@ -40,6 +40,8 @@ what you give them. Help stamp out software-hoarding! */ */ #include +#include "unexec.h" + #define PERROR(file) report_error (file, new) #include /* Define getpagesize () if the system does not. diff --git a/src/unexcoff.c b/src/unexcoff.c index 4dafabab689..1efde1a9cbc 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c @@ -50,6 +50,8 @@ along with GNU Emacs. If not, see . */ */ #include +#include "unexec.h" + #define PERROR(file) report_error (file, new) #ifndef CANNOT_DUMP /* all rest of file! */ diff --git a/src/unexcw.c b/src/unexcw.c index 02add901bbd..b5d72e61550 100644 --- a/src/unexcw.c +++ b/src/unexcw.c @@ -19,6 +19,8 @@ You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ #include +#include "unexec.h" + #include #include #include @@ -299,4 +301,3 @@ unexec (const char *outfile, const char *infile) return (0); } - diff --git a/src/unexelf.c b/src/unexelf.c index 1009c87066b..182b9f8a16b 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -386,6 +386,8 @@ raid:/nfs/raid/src/dist-18.56/src> dump -h temacs Instead we read the whole file, modify it, and write it out. */ #include +#include + extern void fatal (const char *msgid, ...); #include diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c index c0471992a72..9889ffd63fc 100644 --- a/src/unexhp9k800.c +++ b/src/unexhp9k800.c @@ -50,6 +50,8 @@ */ #include +#include "unexec.h" + #include #include #include @@ -319,4 +321,3 @@ display_header (hdr, auxhdr) hdr->unloadable_sp_location, hdr->unloadable_sp_size); } #endif /* DEBUG */ - diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 2e46c063e95..0df0bb8451d 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -95,6 +95,9 @@ along with GNU Emacs. If not, see . */ #undef malloc #undef realloc #undef free + +#include "unexec.h" + #include #include #include diff --git a/src/unexsol.c b/src/unexsol.c index e1a10f7d211..ae91c170859 100644 --- a/src/unexsol.c +++ b/src/unexsol.c @@ -1,6 +1,8 @@ /* Trivial unexec for Solaris. */ #include +#include "unexec.h" + #include #include diff --git a/src/unexw32.c b/src/unexw32.c index 829c864c960..c921cd657d5 100644 --- a/src/unexw32.c +++ b/src/unexw32.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see . */ */ #include +#include "unexec.h" #include #include From 7feda0d218772bf0917631f4bad843e2b4a83984 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 17:03:31 -0700 Subject: [PATCH 343/383] * unexec.h: New file. --- src/ChangeLog | 1 + src/unexec.h | 1 + 2 files changed, 2 insertions(+) create mode 100644 src/unexec.h diff --git a/src/ChangeLog b/src/ChangeLog index 14d3e37a8ee..168f2d72612 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-16 Paul Eggert New file unexec.h, the (simple) interface for unexec. + * unexec.h: New file. * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o): (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o): Depend on unexec.h. diff --git a/src/unexec.h b/src/unexec.h new file mode 100644 index 00000000000..343eb6d8db5 --- /dev/null +++ b/src/unexec.h @@ -0,0 +1 @@ +void unexec (const char *, const char *); From 29a6015ab3af5afe65a112b7447e343133783f5e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 17:22:09 -0700 Subject: [PATCH 344/383] * deps.mk (unexalpha.o): Remove; unused. --- src/ChangeLog | 4 ++++ src/deps.mk | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 168f2d72612..5a3ea2f71d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-17 Paul Eggert + + * deps.mk (unexalpha.o): Remove; unused. + 2011-03-16 Paul Eggert New file unexec.h, the (simple) interface for unexec. diff --git a/src/deps.mk b/src/deps.mk index c868ff0e3c0..35754dfa7de 100644 --- a/src/deps.mk +++ b/src/deps.mk @@ -201,7 +201,6 @@ tparam.o: tparam.c tparam.h lisp.h $(config_h) undo.o: undo.c buffer.h commands.h window.h dispextern.h msdos.h \ lisp.h globals.h $(config_h) unexaix.o: unexaix.c lisp.h unexec.h $(config_h) -unexalpha.o: unexalpha.c $(config_h) unexcw.o: unexcw.c lisp.h unexec.h $(config_h) unexcoff.o: unexcoff.c lisp.h unexec.h $(config_h) unexelf.o: unexelf.c unexec.h ../lib/unistd.h $(config_h) From 40c2934bb82fff3c987d0f0451631279dffc0c90 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 16 Mar 2011 20:43:54 -0400 Subject: [PATCH 345/383] * lisp/minibuffer.el (completion-all-sorted-completions): Use :completion-cycle-penalty text property if present. --- lisp/ChangeLog | 5 +++++ lisp/minibuffer.el | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e1bce10b980..957038b3e40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-17 Stefan Monnier + + * minibuffer.el (completion-all-sorted-completions): + Use :completion-cycle-penalty text property if present. + 2011-03-16 Ken Manheimer * allout.el (allout-yank-processing): Adjust for new rebulleting diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 3c8628c9cfa..fa36da01cd9 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -704,7 +704,15 @@ scroll the window of possible completions." (when last (setcdr last nil) ;; Prefer shorter completions. - (setq all (sort all (lambda (c1 c2) (< (length c1) (length c2))))) + (setq all (sort all (lambda (c1 c2) + (let ((s1 (get-text-property + 0 :completion-cycle-penalty c1)) + (s2 (get-text-property + 0 :completion-cycle-penalty c2))) + (if (eq s1 s2) + (< (length c1) (length c2)) + (< (or s1 (length c1)) + (or s2 (length c2)))))))) ;; Prefer recently used completions. (let ((hist (symbol-value minibuffer-history-variable))) (setq all (sort all (lambda (c1 c2) From d71990a1e4ff251bffa6453772c1e93f84059f5d Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 16 Mar 2011 20:30:08 -0500 Subject: [PATCH 346/383] * lisp/calc/README: Mention musical notes. * lisp/calc-units.el (calc-lu-quant): Rename from `calc-logunits-quantity'. (calcFunc-lupquant): Rename from `calcFunc-powerquant'. (calcFunc-lufquant): Rename from `calcFunc-fieldquant'. (calc-db): Rename from `calc-dblevel'. (calcFunc-dbpower): Rename from `calcFunc-dbpowerlevel'. (calcFunc-dbfield): Rename from `calcFunc-dbfieldlevel'. (calc-np): Rename from `calc-nplevel'. (calcFunc-nppower): Rename from `calcFunc-nppowerlevel'. (calcFunc-npfield): Rename from `calcFunc-npfieldlevel'. (calc-lu-plus): Rename from `calc-logunits-add'. (calcFunc-lupadd): Rename from `calcFunc-lupoweradd'. (calcFunc-lufadd): Rename from `calcFunc-lufieldadd'. (calc-lu-minus): Rename from `calc-logunits-sub'. (calcFunc-lupsub): Rename from `calcFunc-lupowersub'. (calcFunc-lufsub): Rename from `calcFunc-lufieldsub'. (calc-lu-times): Rename from `calc-logunits-mul'. (calcFunc-lupmul): Rename from `calcFunc-lupowermul'. (calcFunc-lufmul): Rename from `calcFunc-lufieldmul'. (calc-lu-divide): Rename from `calc-logunits-div'. (calcFunc-lupdiv): Rename from `calcFunc-lupowerdiv'. (calcFunc-lufdiv): Rename from `calcFunc-lufielddiv'. * lisp/calc/calc-ext.el (calc-init-extensions): Update the names of the functions being autoloaded. * lisp/calc/calc.el (calc-lu-power-reference): Rename from `calc-logunits-power-reference'. (calc-lu-field-reference): Rename from `calc-logunits-field-reference'. * lisp/calc/calc-help (calc-l-prefix-help): Mention musical note functions. * doc/misc/calc.texi (Logarithmic Units): Update the function names. --- doc/misc/ChangeLog | 4 + doc/misc/calc.texi | 235 ++++++++++++++++++++-------------------- lisp/ChangeLog | 37 +++++++ lisp/calc/README | 2 + lisp/calc/calc-ext.el | 31 +++--- lisp/calc/calc-help.el | 4 +- lisp/calc/calc-units.el | 114 +++++++++---------- lisp/calc/calc.el | 4 +- 8 files changed, 236 insertions(+), 195 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index be1b4c46fba..5dd5e3e4fdc 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2011-03-17 Jay Belanger + + * calc.texi (Logarithmic Units): Update the function names. + 2011-03-15 Antoine Levitt * message.texi (Insertion Variables): Document message-cite-style. diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 88103fc0034..d708bb47c0e 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -28126,47 +28126,15 @@ tell Calc to use a different file for the Calc init file.) @section Logarithmic Units The units @code{dB} (decibels) and @code{Np} (nepers) are logarithmic -units which are typically manipulated differently than standard units. -Calc provides commands to work with these logarithmic units. +units which are manipulated differently than standard units. Calc +provides commands to work with these logarithmic units. Decibels and nepers are used to measure power quantities as well as -field quantities (quantities whose squares are proportional to power). -The decibel and neper values of a quantity are relative to -a reference quantity; for example, the decibel value of a sound -pressure level of -@infoline @math{60 uPa} -@texline @math{60 \mu{\rm Pa}} -relative to -@infoline @math{20 uPa} -@texline @math{20 \mu{\rm Pa}} -(the threshhold of human hearing) is -@infoline @math{20 log10(60 uPa/ 20 uPa) dB = 20 log10(3) dB}, -@texline @math{20 \log_{10}(60 \mu{\rm Pa}/20 \mu{\rm Pa}) {\rm dB} = 20 \log_{10}(3) {\rm dB}}, -which is about -@infoline @math{9.54 dB}. -@texline @math{9.54 {\rm dB}}. -Note that in taking the ratio, the original units cancel and so these -logarithmic units are dimensionless. - -@vindex calc-logunits-power-reference -@vindex calc-logunits-field-reference -The Calc commands for the logarithmic units assume that power quantities -are being used unless the @kbd{H} prefix is used, in which case they assume that -field quantities are being used. For power quantities, Calc uses -@infoline @math{1 mW} -@texline @math{1 {\rm mW}} -as the default reference quantity; this default can be changed by changing -the value of the customizable variable -@code{calc-logunits-power-reference} (@pxref{Customizing Calc}). -For field quantities, Calc uses -@infoline @math{20 uPa} -@texline @math{20 \mu{\rm Pa}} -as the default reference quantity; this is the value used in acoustics -which is where decibels are commonly encountered. This default can be -changed by changing the value of the customizable variable -@code{calc-logunits-field-reference} (@pxref{Customizing Calc}). A -non-default reference quantity will be read from the stack if the -capital @kbd{O} prefix is used. +field quantities (quantities whose squares are proportional to power); +these two types of quantities are handled slightly different from each +other. By default the Calc commands work as if power quantities are +being used; with the @kbd{H} prefix the Calc commands work as if field +quantities are being used. The decibel level of a power @infoline @math{P1}, @@ -28214,6 +28182,20 @@ relative to a reference is defined as @infoline @math{20 log10(F1/F0) dB}. @texline @math{20 \log_{10}(F_{1}/F_{0}) {\rm dB}}. +For example, the decibel value of a sound pressure level of +@infoline @math{60 uPa} +@texline @math{60 \mu{\rm Pa}} +relative to +@infoline @math{20 uPa} +@texline @math{20 \mu{\rm Pa}} +(the threshhold of human hearing) is +@infoline @math{20 log10(60 uPa/ 20 uPa) dB = 20 log10(3) dB}, +@texline @math{20 \log_{10}(60 \mu{\rm Pa}/20 \mu{\rm Pa}) {\rm dB} = 20 \log_{10}(3) {\rm dB}}, +which is about +@infoline @math{9.54 dB}. +@texline @math{9.54 {\rm dB}}. +Note that in taking the ratio, the original units cancel and so these +logarithmic units are dimensionless. Nepers (named after John Napier, who is credited with inventing the logarithm) are similar to bels except they use natural logarithms instead @@ -28236,55 +28218,72 @@ is @infoline @math{ln(F1/F0) Np}. @texline @math{\ln(F_1/F_0) {\rm Np}}. +@vindex calc-lu-power-reference +@vindex calc-lu-field-reference +For power quantities, Calc uses +@infoline @math{1 mW} +@texline @math{1 {\rm mW}} +as the default reference quantity; this default can be changed by changing +the value of the customizable variable +@code{calc-lu-power-reference} (@pxref{Customizing Calc}). +For field quantities, Calc uses +@infoline @math{20 uPa} +@texline @math{20 \mu{\rm Pa}} +as the default reference quantity; this is the value used in acoustics +which is where decibels are commonly encountered. This default can be +changed by changing the value of the customizable variable +@code{calc-lu-field-reference} (@pxref{Customizing Calc}). A +non-default reference quantity will be read from the stack if the +capital @kbd{O} prefix is used. + @kindex l q -@pindex calc-logunits-quantity -@tindex powerquant -@tindex fieldquant -The @kbd{l q} (@code{calc-logunits-quantity}) [@code{powerquant}] +@pindex calc-lu-quant +@tindex pquant +@tindex fquant +The @kbd{l q} (@code{calc-lu-quant}) [@code{pquant}] command computes the power quantity corresponding to a given number of logarithmic units. With the capital @kbd{O} prefix, @kbd{O l q}, the reference level will be read from the top of the stack. (In an -algebraic formula, @code{powerquant} can be given an optional second +algebraic formula, @code{pquant} can be given an optional second argument which will be used for the reference level.) For example, @code{20 dB @key{RET} l q} will return @code{100 mW}; @code{20 dB @key{RET} 4 W @key{RET} O l q} will return @code{400 W}. -The @kbd{H l q} [@code{fieldquant}] command behaves like @kbd{l q} but +The @kbd{H l q} [@code{fquant}] command behaves like @kbd{l q} but computes field quantities instead of power quantities. @kindex l d -@pindex calc-dblevel -@tindex dbpowerlevel -@tindex dbfieldlevel +@pindex calc-db +@tindex dbpower +@tindex dbfield @kindex l n -@pindex calc-nplevel -@tindex nppowerlevel -@tindex npfieldlevel -The @kbd{l d} (@code{calc-dblevel}) [@code{dbpowerlevel}] -command will compute the decibel level of a power quantity using the -default reference level; @kbd{H l d} [@code{dbfieldlevel}] will -compute the decibel level of a field quantity. The commands @kbd{l n} -(@code{calc-nplevel}) [@code{nppowerlevel}] and @kbd{H l n} -[@code{npfieldlevel}] will similarly compute neper levels. With the -capital @kbd{O} prefix these commands will read a reference level -from the stack; in an algebraic formula the reference level can be -given as an optional second argument. +@pindex calc-np +@tindex nppower +@tindex npfield +The @kbd{l d} (@code{calc-db}) [@code{dbpower}] command will compute +the decibel level of a power quantity using the default reference +level; @kbd{H l d} [@code{dbfield}] will compute the decibel level of +a field quantity. The commands @kbd{l n} (@code{calc-np}) +[@code{nppower}] and @kbd{H l n} [@code{npfield}] will similarly +compute neper levels. With the capital @kbd{O} prefix these commands +will read a reference level from the stack; in an algebraic formula +the reference level can be given as an optional second argument. @kindex l + -@pindex calc-logunits-add -@tindex lupoweradd -@tindex lufieldadd +@pindex calc-lu-plus +@tindex lupadd +@tindex lufadd @kindex l - -@pindex calc-logunits-sub -@tindex lupowersub -@tindex lufieldsub +@pindex calc-lu-minus +@tindex lupsub +@tindex lufsub @kindex l * -@pindex calc-logunits-mul -@tindex lupowermul -@tindex lufieldmul +@pindex calc-lu-times +@tindex lupmul +@tindex lufmul @kindex l / -@pindex calc-logunits-div -@tindex lupowerdiv -@tindex lufielddiv +@pindex calc-lu-divide +@tindex lupdiv +@tindex lufdiv The sum of two power or field quantities doesn't correspond to the sum of the corresponding decibel or neper levels. If the powers corresponding to decibel levels @@ -28305,13 +28304,13 @@ $$ 10 \log_{10}(10^{D_1/10} + 10^{D_2/10}) {\rm dB}.$$ @end tex @noindent -When field quantities are combined, it often means the -corresponding powers are added and so the above formula might be used. -In acoustics, for example, the decibel sound pressure level is defined -using the field formula but the sound pressure levels are combined -as the sound power levels, and so the above formula should be used. If -two field quantities themselves are added, the new decibel level will be - +When field quantities are combined, it often means the corresponding +powers are added and so the above formula might be used. In +acoustics, for example, the sound pressure level is a field quantity +and so the decibels are often defined using the field formula, but the +sound pressure levels are combined as the sound power levels, and so +the above formula should be used. If two field quantities themselves +are added, the new decibel level will be @ifnottex @example @@ -28349,20 +28348,18 @@ $$ D + 20 \log_{10}(N) {\rm dB}.$$ @end tex @noindent -There are similar formulas for combining nepers. -The @kbd{l +} (@code{calc-logunits-add}) [@code{lupoweradd}] command -will ``add'' two logarithmic unit power levels this way; with the -@kbd{H} prefix, @kbd{H l +} [@code{lufieldadd}] will add logarithmic -unit field levels. Similarly, logarithmic units can be -``subtracted'' with @kbd{l -} (@code{calc-logunits-sub}) -[@code{lupowersub}] or @kbd{H l -} [@code{lufieldsub}]. -The @kbd{l *} (@code{calc-logunits-mul}) [@code{lupowermul}] -and @kbd{H l *} [@code{lufieldmul}] commands will ``multiply'' -a logarithmic unit by a number; the @kbd{l /} -(@code{calc-logunits-divide}) [@code{lupowerdiv}] and -@kbd{H l /} [@code{lufielddiv}] commands will ``divide'' a -logarithmic unit by a number. Note that the reference quantities don't -play a role in this arithmetic. +There are similar formulas for combining nepers. The @kbd{l +} +(@code{calc-lu-plus}) [@code{lupadd}] command will ``add'' two +logarithmic unit power levels this way; with the @kbd{H} prefix, +@kbd{H l +} [@code{lufadd}] will add logarithmic unit field levels. +Similarly, logarithmic units can be ``subtracted'' with @kbd{l -} +(@code{calc-lu-minus}) [@code{lupsub}] or @kbd{H l -} [@code{lufsub}]. +The @kbd{l *} (@code{calc-lu-times}) [@code{lupmul}] and @kbd{H l *} +[@code{lufmul}] commands will ``multiply'' a logarithmic unit by a +number; the @kbd{l /} (@code{calc-lu-divide}) [@code{lupdiv}] and +@kbd{H l /} [@code{lufdiv}] commands will ``divide'' a logarithmic +unit by a number. Note that the reference quantities don't play a role +in this arithmetic. @node Musical Notes, , Logarithmic Units, Units @section Musical Notes @@ -35539,16 +35536,16 @@ should also be added to @code{calc-embedded-announce-formula-alist} and @code{calc-embedded-open-close-plain-alist}. @end defvar -@defvar calc-logunits-power-reference -@defvarx calc-logunits-field-reference +@defvar calc-lu-power-reference +@defvarx calc-lu-field-reference See @ref{Logarithmic Units}.@* -The variables @code{calc-logunits-power-reference} and -@code{calc-logunits-field-reference} are unit expressions (written as +The variables @code{calc-lu-power-reference} and +@code{calc-lu-field-reference} are unit expressions (written as strings) which Calc will use as reference quantities for logarithmic units. -The default value of @code{calc-logunits-power-reference} is @code{"mW"} -and the default value of @code{calc-logunits-field-reference} is +The default value of @code{calc-lu-power-reference} is @code{"mW"} +and the default value of @code{calc-lu-field-reference} is @code{"20 uPa"}. @end defvar @@ -36209,26 +36206,26 @@ keystrokes are not listed in this summary. @r{ v x@: I k T @: @: @:ltpt@:(x,v)} @c -@r{ a b@: l + @: @: @:lupoweradd@:(a,b)} -@r{ a b@: H l + @: @: @:lufieldadd@:(a,b)} -@r{ a b@: l - @: @: @:lupowersub@:(a,b)} -@r{ a b@: H l - @: @: @:lufieldsub@:(a,b)} -@r{ a b@: l * @: @: @:lupowermul@:(a,b)} -@r{ a b@: H l * @: @: @:lufieldmul@:(a,b)} -@r{ a b@: l / @: @: @:lupowerdiv@:(a,b)} -@r{ a b@: H l / @: @: @:lufielddiv@:(a,b)} -@r{ a@: l d @: @: @:dbpowerlevel@:(a)} -@r{ a b@: O l d @: @: @:dbpowerlevel@:(a,b)} -@r{ a@: H l d @: @: @:dbfieldlevel@:(a)} -@r{ a b@: O H l d @: @: @:dbfieldlevel@:(a,b)} -@r{ a@: l n @: @: @:nppowerlevel@:(a)} -@r{ a b@: O l n @: @: @:nppowerlevel@:(a,b)} -@r{ a@: H l n @: @: @:npfieldlevel@:(a)} -@r{ a b@: O H l n @: @: @:npfieldlevel@:(a,b)} -@r{ a@: l q @: @: @:powerquant@:(a)} -@r{ a b@: O l q @: @: @:powerquant@:(a,b)} -@r{ a@: H l q @: @: @:fieldquant@:(a)} -@r{ a b@: O H l q @: @: @:fieldquant@:(a,b)} +@r{ a b@: l + @: @: @:lupadd@:(a,b)} +@r{ a b@: H l + @: @: @:lufadd@:(a,b)} +@r{ a b@: l - @: @: @:lupsub@:(a,b)} +@r{ a b@: H l - @: @: @:lufsub@:(a,b)} +@r{ a b@: l * @: @: @:lupmul@:(a,b)} +@r{ a b@: H l * @: @: @:lufmul@:(a,b)} +@r{ a b@: l / @: @: @:lupdiv@:(a,b)} +@r{ a b@: H l / @: @: @:lufdiv@:(a,b)} +@r{ a@: l d @: @: @:dbpower@:(a)} +@r{ a b@: O l d @: @: @:dbpower@:(a,b)} +@r{ a@: H l d @: @: @:dbfield@:(a)} +@r{ a b@: O H l d @: @: @:dbfield@:(a,b)} +@r{ a@: l n @: @: @:nppower@:(a)} +@r{ a b@: O l n @: @: @:nppower@:(a,b)} +@r{ a@: H l n @: @: @:npfield@:(a)} +@r{ a b@: O H l n @: @: @:npfield@:(a,b)} +@r{ a@: l q @: @: @:pquant@:(a)} +@r{ a b@: O l q @: @: @:pquant@:(a,b)} +@r{ a@: H l q @: @: @:fquant@:(a)} +@r{ a b@: O H l q @: @: @:fquant@:(a,b)} @r{ a@: l s @: @: @:spn@:(a)} @r{ a@: l m @: @: @:midi@:(a)} @r{ a@: l f @: @: @:freq@:(a)} diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 957038b3e40..52653f917df 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,40 @@ +2011-03-17 Jay Belanger + + * calc/README: Mention inclusion of musical notes. + + * calc/calc-units.el (calc-lu-quant): Rename from + `calc-logunits-quantity'. + (calcFunc-lupquant): Rename from `calcFunc-powerquant'. + (calcFunc-lufquant): Rename from `calcFunc-fieldquant'. + (calc-db): Rename from `calc-dblevel'. + (calcFunc-dbpower): Rename from `calcFunc-dbpowerlevel'. + (calcFunc-dbfield): Rename from `calcFunc-dbfieldlevel'. + (calc-np): Rename from `calc-nplevel'. + (calcFunc-nppower): Rename from `calcFunc-nppowerlevel'. + (calcFunc-npfield): Rename from `calcFunc-npfieldlevel'. + (calc-lu-plus): Rename from `calc-logunits-add'. + (calcFunc-lupadd): Rename from `calcFunc-lupoweradd'. + (calcFunc-lufadd): Rename from `calcFunc-lufieldadd'. + (calc-lu-minus): Rename from `calc-logunits-sub'. + (calcFunc-lupsub): Rename from `calcFunc-lupowersub'. + (calcFunc-lufsub): Rename from `calcFunc-lufieldsub'. + (calc-lu-times): Rename from `calc-logunits-mul'. + (calcFunc-lupmul): Rename from `calcFunc-lupowermul'. + (calcFunc-lufmul): Rename from `calcFunc-lufieldmul'. + (calc-lu-divide): Rename from `calc-logunits-div'. + (calcFunc-lupdiv): Rename from `calcFunc-lupowerdiv'. + (calcFunc-lufdiv): Rename from `calcFunc-lufielddiv'. + + * calc/calc-ext.el (calc-init-extensions): Update the names of the + functions being autoloaded. + + * calc/calc.el (calc-lu-power-reference): Rename from + `calc-logunits-power-reference'. + (calc-lu-field-reference): Rename from + `calc-logunits-field-reference'. + + * calc/calc-help (calc-l-prefix-help): Mention musical note functions. + 2011-03-17 Stefan Monnier * minibuffer.el (completion-all-sorted-completions): diff --git a/lisp/calc/README b/lisp/calc/README index 533b80baeb0..308b5115aa2 100644 --- a/lisp/calc/README +++ b/lisp/calc/README @@ -72,6 +72,8 @@ Summary of changes to "Calc" Emacs 24.1 +* Support for musical notes added. + * Support for logarithmic units added. * Calc no longer uses the tex prefix for TeX specific unit diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 11a26d6d125..57e7eabd1f9 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -422,13 +422,13 @@ (define-key calc-mode-map "kT" 'calc-utpt) (define-key calc-mode-map "l" nil) - (define-key calc-mode-map "lq" 'calc-logunits-quantity) - (define-key calc-mode-map "ld" 'calc-dblevel) - (define-key calc-mode-map "ln" 'calc-nplevel) - (define-key calc-mode-map "l+" 'calc-logunits-add) - (define-key calc-mode-map "l-" 'calc-logunits-sub) - (define-key calc-mode-map "l*" 'calc-logunits-mul) - (define-key calc-mode-map "l/" 'calc-logunits-divide) + (define-key calc-mode-map "lq" 'calc-lu-quant) + (define-key calc-mode-map "ld" 'calc-db) + (define-key calc-mode-map "ln" 'calc-np) + (define-key calc-mode-map "l+" 'calc-lu-plus) + (define-key calc-mode-map "l-" 'calc-lu-minus) + (define-key calc-mode-map "l*" 'calc-lu-times) + (define-key calc-mode-map "l/" 'calc-lu-divide) (define-key calc-mode-map "ls" 'calc-spn) (define-key calc-mode-map "lm" 'calc-midi) (define-key calc-mode-map "lf" 'calc-freq) @@ -943,12 +943,11 @@ calc-store-value calc-var-name) ("calc-stuff" calc-explain-why calcFunc-clean calcFunc-pclean calcFunc-pfloat calcFunc-pfrac) - ("calc-units" calcFunc-usimplify calcFunc-lufieldadd -calcFunc-lupoweradd calcFunc-lufieldsub calcFunc-lupowersub -calcFunc-lufieldmul calcFunc-lupowermul calcFunc-lufielddiv -calcFunc-lupowerdiv calcFunc-fieldquant calcFunc-powerquant -calcFunc-dbfieldlevel calcFunc-dbpowerlevel calcFunc-npfieldlevel -calcFunc-nppowerlevel calcFunc-spn calcFunc-midi calcFunc-freq + ("calc-units" calcFunc-usimplify calcFunc-lufadd calcFunc-lupadd +calcFunc-lufsub calcFunc-lupsub calcFunc-lufmul calcFunc-lupmul +calcFunc-lufdiv calcFunc-lupdiv calcFunc-fquant calcFunc-pquant +calcFunc-dbfield calcFunc-dbpower calcFunc-npfield +calcFunc-nppower calcFunc-spn calcFunc-midi calcFunc-freq math-build-units-table math-build-units-table-buffer math-check-unit-name math-convert-temperature math-convert-units math-extract-units math-remove-units math-simplify-units @@ -1180,9 +1179,9 @@ calc-convert-temperature calc-convert-units calc-define-unit calc-enter-units-table calc-explain-units calc-extract-units calc-get-unit-definition calc-permanent-units calc-quick-units calc-remove-units calc-simplify-units calc-undefine-unit -calc-view-units-table calc-logunits-quantity calc-dblevel -calc-nplevel calc-logunits-add calc-logunits-sub -calc-logunits-mul calc-logunits-divide calc-spn calc-midi +calc-view-units-table calc-lu-quant calc-db +calc-np calc-lu-plus calc-lu-minus +calc-lu-times calc-lu-divide calc-spn calc-midi calc-freq) ("calc-vec" calc-arrange-vector calc-build-vector calc-cnorm diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index d688b31b3cb..427cf6ba233 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -673,7 +673,9 @@ C-w Describe how there is no warranty for Calc." (interactive) (calc-do-prefix-help '("Quantity, DB level, Np level" - "+, -, *, /") + "+, -, *, /" + "Scientific pitch notation, Midi number, Frequency" + ) "log units" ?l)) (defun calc-v-prefix-help () diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index 7f0adc9fe7e..a74cfb60c8d 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -1623,39 +1623,39 @@ In symbolic mode, return the list (^ a b)." coef))) units))))))) -(defun calcFunc-lufieldplus (a b) +(defun calcFunc-lufadd (a b) (math-logunits-add a b nil nil)) -(defun calcFunc-lupowerplus (a b) +(defun calcFunc-lupadd (a b) (math-logunits-add a b nil t)) -(defun calcFunc-lufieldminus (a b) +(defun calcFunc-lufsub (a b) (math-logunits-add a b t nil)) -(defun calcFunc-lupowerminus (a b) +(defun calcFunc-lupsub (a b) (math-logunits-add a b t t)) -(defun calc-logunits-add (arg) +(defun calc-lu-plus (arg) (interactive "P") (calc-slow-wrapper (if (calc-is-inverse) (if (calc-is-hyperbolic) - (calc-binary-op "lu-" 'calcFunc-lufieldminus arg) - (calc-binary-op "lu-" 'calcFunc-lupowerminus arg)) + (calc-binary-op "lu-" 'calcFunc-lufsub arg) + (calc-binary-op "lu-" 'calcFunc-lupsub arg)) (if (calc-is-hyperbolic) - (calc-binary-op "lu+" 'calcFunc-lufieldplus arg) - (calc-binary-op "lu+" 'calcFunc-lupowerplus arg))))) + (calc-binary-op "lu+" 'calcFunc-lufadd arg) + (calc-binary-op "lu+" 'calcFunc-lupadd arg))))) -(defun calc-logunits-sub (arg) +(defun calc-lu-minus (arg) (interactive "P") (calc-slow-wrapper (if (calc-is-inverse) (if (calc-is-hyperbolic) - (calc-binary-op "lu+" 'calcFunc-lufieldplus arg) - (calc-binary-op "lu+" 'calcFunc-lupowerplus arg)) + (calc-binary-op "lu+" 'calcFunc-lufadd arg) + (calc-binary-op "lu+" 'calcFunc-lupadd arg)) (if (calc-is-hyperbolic) - (calc-binary-op "lu-" 'calcFunc-lufieldminus arg) - (calc-binary-op "lu-" 'calcFunc-lupowerminus arg))))) + (calc-binary-op "lu-" 'calcFunc-lufsub arg) + (calc-binary-op "lu-" 'calcFunc-lupsub arg))))) (defun math-logunits-mul (a b power) (let (logunit coef units number) @@ -1719,39 +1719,39 @@ In symbolic mode, return the list (^ a b)." (math-div (math-conditional-apply 'calcFunc-ln b) (if power 2 1))) units))))))))) -(defun calcFunc-lufieldtimes (a b) +(defun calcFunc-lufmul (a b) (math-logunits-mul a b nil)) -(defun calcFunc-lupowertimes (a b) +(defun calcFunc-lupmul (a b) (math-logunits-mul a b t)) -(defun calc-logunits-mul (arg) +(defun calc-lu-times (arg) (interactive "P") (calc-slow-wrapper (if (calc-is-inverse) (if (calc-is-hyperbolic) - (calc-binary-op "lu/" 'calcFunc-lufielddiv arg) - (calc-binary-op "lu/" 'calcFunc-lupowerdiv arg)) + (calc-binary-op "lu/" 'calcFunc-lufdiv arg) + (calc-binary-op "lu/" 'calcFunc-lupdiv arg)) (if (calc-is-hyperbolic) - (calc-binary-op "lu*" 'calcFunc-lufieldtimes arg) - (calc-binary-op "lu*" 'calcFunc-lupowertimes arg))))) + (calc-binary-op "lu*" 'calcFunc-lufmul arg) + (calc-binary-op "lu*" 'calcFunc-lupmul arg))))) -(defun calcFunc-lufielddiv (a b) +(defun calcFunc-lufdiv (a b) (math-logunits-divide a b nil)) -(defun calcFunc-lupowerdiv (a b) +(defun calcFunc-lupdiv (a b) (math-logunits-divide a b t)) -(defun calc-logunits-divide (arg) +(defun calc-lu-divide (arg) (interactive "P") (calc-slow-wrapper (if (calc-is-inverse) (if (calc-is-hyperbolic) - (calc-binary-op "lu*" 'calcFunc-lufieldtimes arg) - (calc-binary-op "lu*" 'calcFunc-lupowertimes arg)) + (calc-binary-op "lu*" 'calcFunc-lufmul arg) + (calc-binary-op "lu*" 'calcFunc-lupmul arg)) (if (calc-is-hyperbolic) - (calc-binary-op "lu/" 'calcFunc-lufielddiv arg) - (calc-binary-op "lu/" 'calcFunc-lupowerdiv arg))))) + (calc-binary-op "lu/" 'calcFunc-lufdiv arg) + (calc-binary-op "lu/" 'calcFunc-lupdiv arg))))) (defun math-logunits-quant (val ref power) (let* ((units (math-simplify (math-extract-units val))) @@ -1777,29 +1777,29 @@ In symbolic mode, return the list (^ a b)." coeff)))) runits))))) -(defvar calc-logunits-field-reference) -(defvar calc-logunits-power-reference) +(defvar calc-lu-field-reference) +(defvar calc-lu-power-reference) -(defun calcFunc-fieldquant (val &optional ref) +(defun calcFunc-fquant (val &optional ref) (unless ref - (setq ref (math-read-expr calc-logunits-field-reference))) + (setq ref (math-read-expr calc-lu-field-reference))) (math-logunits-quant val ref nil)) -(defun calcFunc-powerquant (val &optional ref) +(defun calcFunc-pquant (val &optional ref) (unless ref - (setq ref (math-read-expr calc-logunits-power-reference))) + (setq ref (math-read-expr calc-lu-power-reference))) (math-logunits-quant val ref t)) -(defun calc-logunits-quantity (arg) +(defun calc-lu-quant (arg) (interactive "P") (calc-slow-wrapper (if (calc-is-hyperbolic) (if (calc-is-option) - (calc-binary-op "lupq" 'calcFunc-fieldquant arg) - (calc-unary-op "lupq" 'calcFunc-fieldquant arg)) + (calc-binary-op "lupq" 'calcFunc-fquant arg) + (calc-unary-op "lupq" 'calcFunc-fquant arg)) (if (calc-is-option) - (calc-binary-op "lufq" 'calcFunc-powerquant arg) - (calc-unary-op "lufq" 'calcFunc-powerquant arg))))) + (calc-binary-op "lufq" 'calcFunc-pquant arg) + (calc-unary-op "lufq" 'calcFunc-pquant arg))))) (defun math-logunits-level (val ref db power) "Compute the value of VAL in decibels or nepers." @@ -1817,47 +1817,47 @@ In symbolic mode, return the list (^ a b)." '(var Np var-Np))) units))) -(defun calcFunc-dbfieldlevel (val &optional ref) +(defun calcFunc-dbfield (val &optional ref) (unless ref - (setq ref (math-read-expr calc-logunits-field-reference))) + (setq ref (math-read-expr calc-lu-field-reference))) (math-logunits-level val ref t nil)) -(defun calcFunc-dbpowerlevel (val &optional ref) +(defun calcFunc-dbpower (val &optional ref) (unless ref - (setq ref (math-read-expr calc-logunits-power-reference))) + (setq ref (math-read-expr calc-lu-power-reference))) (math-logunits-level val ref t t)) -(defun calcFunc-npfieldlevel (val &optional ref) +(defun calcFunc-npfield (val &optional ref) (unless ref - (setq ref (math-read-expr calc-logunits-field-reference))) + (setq ref (math-read-expr calc-lu-field-reference))) (math-logunits-level val ref nil nil)) -(defun calcFunc-nppowerlevel (val &optional ref) +(defun calcFunc-nppower (val &optional ref) (unless ref - (setq ref (math-read-expr calc-logunits-power-reference))) + (setq ref (math-read-expr calc-lu-power-reference))) (math-logunits-level val ref nil t)) -(defun calc-dblevel (arg) +(defun calc-db (arg) (interactive "P") (calc-slow-wrapper (if (calc-is-hyperbolic) (if (calc-is-option) - (calc-binary-op "ludb" 'calcFunc-dbfieldlevel arg) - (calc-unary-op "ludb" 'calcFunc-dbfieldlevel arg)) + (calc-binary-op "ludb" 'calcFunc-dbfield arg) + (calc-unary-op "ludb" 'calcFunc-dbfield arg)) (if (calc-is-option) - (calc-binary-op "ludb" 'calcFunc-dbpowerlevel arg) - (calc-unary-op "ludb" 'calcFunc-dbpowerlevel arg))))) + (calc-binary-op "ludb" 'calcFunc-dbpower arg) + (calc-unary-op "ludb" 'calcFunc-dbpower arg))))) -(defun calc-nplevel (arg) +(defun calc-np (arg) (interactive "P") (calc-slow-wrapper (if (calc-is-hyperbolic) (if (calc-is-option) - (calc-binary-op "lunp" 'calcFunc-npfieldlevel arg) - (calc-unary-op "lunp" 'calcFunc-npfieldlevel arg)) + (calc-binary-op "lunp" 'calcFunc-npfield arg) + (calc-unary-op "lunp" 'calcFunc-npfield arg)) (if (calc-is-option) - (calc-binary-op "lunp" 'calcFunc-nppowerlevel arg) - (calc-unary-op "lunp" 'calcFunc-nppowerlevel arg))))) + (calc-binary-op "lunp" 'calcFunc-nppower arg) + (calc-unary-op "lunp" 'calcFunc-nppower arg))))) ;;; Musical notes diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 08ae7b10113..41f549cbe2c 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -434,13 +434,13 @@ by displaying the sub-formula in `calc-selected-face'." :group 'calc :type 'boolean) -(defcustom calc-logunits-field-reference +(defcustom calc-lu-field-reference "20 uPa" "The default reference level for logarithmic units (field)." :group 'calc :type '(string)) -(defcustom calc-logunits-power-reference +(defcustom calc-lu-power-reference "mW" "The default reference level for logarithmic units (power)." :group 'calc From 43cfc33e3d04f339d929da933f131694821ad6f9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 18:49:15 -0700 Subject: [PATCH 347/383] Add Bug#. --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5a3ea2f71d0..6bb4021b876 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,7 +4,7 @@ 2011-03-16 Paul Eggert - New file unexec.h, the (simple) interface for unexec. + New file unexec.h, the (simple) interface for unexec (Bug#8267). * unexec.h: New file. * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o): (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o): From b3967b18cddd39cd736af29db48096716f35fbdf Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 18:52:35 -0700 Subject: [PATCH 348/383] * unexelf.c (unexec): Name an expression, to avoid gcc -Wbad-function-cast warning. --- src/ChangeLog | 3 +++ src/unexelf.c | 14 +++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 6bb4021b876..dc3074697e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-17 Paul Eggert + * unexelf.c (unexec): Name an expression, + to avoid gcc -Wbad-function-cast warning. + * deps.mk (unexalpha.o): Remove; unused. 2011-03-16 Paul Eggert diff --git a/src/unexelf.c b/src/unexelf.c index 182b9f8a16b..01d41a15d50 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -625,6 +625,10 @@ unexec (const char *new_name, const char *old_name) { int new_file, old_file, new_file_size; +#if defined (emacs) || !defined (DEBUG) + void *new_break; +#endif + /* Pointers to the base of the image of the two files. */ caddr_t old_base, new_base; @@ -755,7 +759,8 @@ unexec (const char *new_name, const char *old_name) old_name, old_file_h, old_section_h, 0); #if defined (emacs) || !defined (DEBUG) - new_bss_addr = (ElfW(Addr)) sbrk (0); + new_break = sbrk (0); + new_bss_addr = (ElfW(Addr)) new_break; #else new_bss_addr = old_bss_addr + old_bss_size + 0x1234; #endif @@ -956,13 +961,13 @@ unexec (const char *new_name, const char *old_name) Link Info Adralgn Entsize [22] 1 3 0x335150 0x315150 0x4 .data.rel.local - 0 0 0x4 0 + 0 0 0x4 0 [23] 8 3 0x335158 0x315158 0x42720 .bss - 0 0 0x8 0 + 0 0 0x8 0 [24] 2 0 0 0x315154 0x1c9d0 .symtab - 25 1709 0x4 0x10 + 25 1709 0x4 0x10 */ if (NEW_SECTION_H (nn).sh_offset >= old_bss_offset @@ -1309,4 +1314,3 @@ unexec (const char *new_name, const char *old_name) if (chmod (new_name, stat_buf.st_mode) == -1) fatal ("Can't chmod (%s): errno %d\n", new_name, errno); } - From 9ae7151257f2457c0a6d89fb2b97f59fb18f1b96 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 19:07:47 -0700 Subject: [PATCH 349/383] * unexelf.c: Use a different way to cause a compilation error if anyone uses n rather than nn, a way that does not involve shadowing. --- src/ChangeLog | 2 ++ src/unexelf.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index dc3074697e3..8832388994c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,8 @@ * unexelf.c (unexec): Name an expression, to avoid gcc -Wbad-function-cast warning. + Use a different way to cause a compilation error if anyone uses + n rather than nn, a way that does not involve shadowing. * deps.mk (unexalpha.o): Remove; unused. diff --git a/src/unexelf.c b/src/unexelf.c index 01d41a15d50..3e664307d59 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -1235,8 +1235,8 @@ unexec (const char *new_name, const char *old_name) ElfW(Shdr) section = NEW_SECTION_H (n); /* Cause a compilation error if anyone uses n instead of nn below. */ - struct {int a;} n; - (void)n.a; /* Prevent `unused variable' warnings. */ + #define n ((void) 0); + n /* Prevent 'macro "n" is not used' warnings. */ switch (section.sh_type) { @@ -1283,6 +1283,8 @@ unexec (const char *new_name, const char *old_name) } break; } + + #undef n } /* Write out new_file, and free the buffers. */ From 73366a004b663bed19b9bc9b83e8843c836db83f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 19:09:36 -0700 Subject: [PATCH 350/383] * unexelf.c (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused. --- src/ChangeLog | 1 + src/unexelf.c | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8832388994c..5abc9b66475 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ to avoid gcc -Wbad-function-cast warning. Use a different way to cause a compilation error if anyone uses n rather than nn, a way that does not involve shadowing. + (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused. * deps.mk (unexalpha.o): Remove; unused. diff --git a/src/unexelf.c b/src/unexelf.c index 3e664307d59..b58c78501b8 100644 --- a/src/unexelf.c +++ b/src/unexelf.c @@ -520,10 +520,6 @@ typedef struct { # define ElfW(type) ElfExpandBitsW (ELFSIZE, type) #endif -#ifndef ELF_BSS_SECTION_NAME -#define ELF_BSS_SECTION_NAME ".bss" -#endif - /* Get the address of a particular section or program header entry, * accounting for the size of the entries. */ @@ -555,8 +551,6 @@ typedef struct { (*(ElfW(Shdr) *) ((byte *) old_section_h + old_file_h->e_shentsize * (n))) #define NEW_SECTION_H(n) \ (*(ElfW(Shdr) *) ((byte *) new_section_h + new_file_h->e_shentsize * (n))) -#define OLD_PROGRAM_H(n) \ - (*(ElfW(Phdr) *) ((byte *) old_program_h + old_file_h->e_phentsize * (n))) #define NEW_PROGRAM_H(n) \ (*(ElfW(Phdr) *) ((byte *) new_program_h + new_file_h->e_phentsize * (n))) From 7914961cd705c8a88734ff87c581924bf48c3fe3 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 19:11:29 -0700 Subject: [PATCH 351/383] * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else". --- src/ChangeLog | 2 ++ src/bytecode.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 5abc9b66475..9dcab33fed5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2011-03-17 Paul Eggert + * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else". + * unexelf.c (unexec): Name an expression, to avoid gcc -Wbad-function-cast warning. Use a different way to cause a compilation error if anyone uses diff --git a/src/bytecode.c b/src/bytecode.c index bb4e87c019d..fca8a8e1ebe 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -363,6 +363,7 @@ unmark_byte_stack (void) We do this at every branch, to avoid loops that never GC. */ #define MAYBE_GC() \ + do { \ if (consing_since_gc > gc_cons_threshold \ && consing_since_gc > gc_relative_threshold) \ { \ @@ -370,7 +371,7 @@ unmark_byte_stack (void) Fgarbage_collect (); \ AFTER_POTENTIAL_GC (); \ } \ - else + } while (0) /* Check for jumping out of range. */ From 615f2d59a5ee849bc46c3fa57d41fd136f2d0962 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 19:18:00 -0700 Subject: [PATCH 352/383] * bytecode.c (CONSTANTLIM): Remove; unused. (METER_CODE, Bscan_buffer, Bread_char, Bset_mark): Define only if needed. --- src/ChangeLog | 3 +++ src/bytecode.c | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9dcab33fed5..fa08263a80a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,9 @@ 2011-03-17 Paul Eggert * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else". + (CONSTANTLIM): Remove; unused. + (METER_CODE, Bscan_buffer, Bread_char, Bset_mark): + Define only if needed. * unexelf.c (unexec): Name an expression, to avoid gcc -Wbad-function-cast warning. diff --git a/src/bytecode.c b/src/bytecode.c index fca8a8e1ebe..ce2f06dfccb 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -76,11 +76,7 @@ Lisp_Object Qbyte_code_meter; } \ } -#else /* no BYTE_CODE_METER */ - -#define METER_CODE(last_code, this_code) - -#endif /* no BYTE_CODE_METER */ +#endif /* BYTE_CODE_METER */ Lisp_Object Qbytecode; @@ -146,7 +142,9 @@ Lisp_Object Qbytecode; #define Bpreceding_char 0150 #define Bcurrent_column 0151 #define Bindent_to 0152 +#ifdef BYTE_CODE_SAFE #define Bscan_buffer 0153 /* No longer generated as of v18 */ +#endif #define Beolp 0154 #define Beobp 0155 #define Bbolp 0156 @@ -154,8 +152,12 @@ Lisp_Object Qbytecode; #define Bcurrent_buffer 0160 #define Bset_buffer 0161 #define Bsave_current_buffer_1 0162 /* Replacing Bsave_current_buffer. */ +#if 0 #define Bread_char 0162 /* No longer generated as of v19 */ +#endif +#ifdef BYTE_CODE_SAFE #define Bset_mark 0163 /* this loser is no longer generated as of v18 */ +#endif #define Binteractive_p 0164 /* Needed since interactive-p takes unevalled args */ #define Bforward_char 0165 @@ -227,7 +229,6 @@ Lisp_Object Qbytecode; #define BinsertN 0261 #define Bconstant 0300 -#define CONSTANTLIM 0100 /* Whether to maintain a `top' and `bottom' field in the stack frame. */ #define BYTE_MAINTAIN_TOP (BYTE_CODE_SAFE || BYTE_MARK_STACK) From 580b66d801d9f9d8a7484c00e047b04c20ebe0d6 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Wed, 16 Mar 2011 21:25:36 -0500 Subject: [PATCH 353/383] * lisp/calc-units.el (calcFunc-lupquant): Rename from `calcFunc-pquant' (fixing previous commit). (calcFunc-lufquant): Rename from `calcFunc-fquant' (fixing previous commit). * lisp/calc/calc-ext.el (calc-init-extensions): Update the names of the functions being autoloaded. --- doc/misc/calc.texi | 18 +++++++++--------- lisp/calc/calc-ext.el | 2 +- lisp/calc/calc-units.el | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index d708bb47c0e..f732eff5690 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -28238,17 +28238,17 @@ capital @kbd{O} prefix is used. @kindex l q @pindex calc-lu-quant -@tindex pquant -@tindex fquant -The @kbd{l q} (@code{calc-lu-quant}) [@code{pquant}] +@tindex lupquant +@tindex lufquant +The @kbd{l q} (@code{calc-lu-quant}) [@code{lupquant}] command computes the power quantity corresponding to a given number of logarithmic units. With the capital @kbd{O} prefix, @kbd{O l q}, the reference level will be read from the top of the stack. (In an -algebraic formula, @code{pquant} can be given an optional second +algebraic formula, @code{lupquant} can be given an optional second argument which will be used for the reference level.) For example, @code{20 dB @key{RET} l q} will return @code{100 mW}; @code{20 dB @key{RET} 4 W @key{RET} O l q} will return @code{400 W}. -The @kbd{H l q} [@code{fquant}] command behaves like @kbd{l q} but +The @kbd{H l q} [@code{lufquant}] command behaves like @kbd{l q} but computes field quantities instead of power quantities. @kindex l d @@ -36222,10 +36222,10 @@ keystrokes are not listed in this summary. @r{ a b@: O l n @: @: @:nppower@:(a,b)} @r{ a@: H l n @: @: @:npfield@:(a)} @r{ a b@: O H l n @: @: @:npfield@:(a,b)} -@r{ a@: l q @: @: @:pquant@:(a)} -@r{ a b@: O l q @: @: @:pquant@:(a,b)} -@r{ a@: H l q @: @: @:fquant@:(a)} -@r{ a b@: O H l q @: @: @:fquant@:(a,b)} +@r{ a@: l q @: @: @:lupquant@:(a)} +@r{ a b@: O l q @: @: @:lupquant@:(a,b)} +@r{ a@: H l q @: @: @:lufquant@:(a)} +@r{ a b@: O H l q @: @: @:lufquant@:(a,b)} @r{ a@: l s @: @: @:spn@:(a)} @r{ a@: l m @: @: @:midi@:(a)} @r{ a@: l f @: @: @:freq@:(a)} diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 57e7eabd1f9..9ea773fbb98 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -945,7 +945,7 @@ calcFunc-pclean calcFunc-pfloat calcFunc-pfrac) ("calc-units" calcFunc-usimplify calcFunc-lufadd calcFunc-lupadd calcFunc-lufsub calcFunc-lupsub calcFunc-lufmul calcFunc-lupmul -calcFunc-lufdiv calcFunc-lupdiv calcFunc-fquant calcFunc-pquant +calcFunc-lufdiv calcFunc-lupdiv calcFunc-lufquant calcFunc-lupquant calcFunc-dbfield calcFunc-dbpower calcFunc-npfield calcFunc-nppower calcFunc-spn calcFunc-midi calcFunc-freq math-build-units-table math-build-units-table-buffer diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index a74cfb60c8d..43cb5828e85 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -1780,12 +1780,12 @@ In symbolic mode, return the list (^ a b)." (defvar calc-lu-field-reference) (defvar calc-lu-power-reference) -(defun calcFunc-fquant (val &optional ref) +(defun calcFunc-lufquant (val &optional ref) (unless ref (setq ref (math-read-expr calc-lu-field-reference))) (math-logunits-quant val ref nil)) -(defun calcFunc-pquant (val &optional ref) +(defun calcFunc-lupquant (val &optional ref) (unless ref (setq ref (math-read-expr calc-lu-power-reference))) (math-logunits-quant val ref t)) @@ -1795,11 +1795,11 @@ In symbolic mode, return the list (^ a b)." (calc-slow-wrapper (if (calc-is-hyperbolic) (if (calc-is-option) - (calc-binary-op "lupq" 'calcFunc-fquant arg) - (calc-unary-op "lupq" 'calcFunc-fquant arg)) + (calc-binary-op "lupq" 'calcFunc-lufquant arg) + (calc-unary-op "lupq" 'calcFunc-lufquant arg)) (if (calc-is-option) - (calc-binary-op "lufq" 'calcFunc-pquant arg) - (calc-unary-op "lufq" 'calcFunc-pquant arg))))) + (calc-binary-op "lufq" 'calcFunc-lupquant arg) + (calc-unary-op "lufq" 'calcFunc-lupquant arg))))) (defun math-logunits-level (val ref db power) "Compute the value of VAL in decibels or nepers." From 171fc304acd841968479685a08b42299491a97ec Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 17 Mar 2011 03:30:27 +0100 Subject: [PATCH 354/383] lisp/custom.el: Trivial fixes. * custom.el (custom-known-themes): Reflow docstring. (custom-theme-load-path): Fix typo in docstring. (load-theme): Fix typo in error message. (custom-available-themes, custom-variable-theme-value): Use `let', not `let*'. --- lisp/ChangeLog | 8 ++++++++ lisp/custom.el | 16 ++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 52653f917df..5164207a5ce 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2011-03-17 Juanma Barranquero + + * custom.el (custom-known-themes): Reflow docstring. + (custom-theme-load-path): Fix typo in docstring. + (load-theme): Fix typo in error message. + (custom-available-themes, custom-variable-theme-value): + Use `let', not `let*'. + 2011-03-17 Jay Belanger * calc/README: Mention inclusion of musical notes. diff --git a/lisp/custom.el b/lisp/custom.el index 923321c03c9..cf06fe27f4d 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -789,10 +789,10 @@ E.g. dumped variables whose default depends on run-time information." (defvar custom-known-themes '(user changed) "Themes that have been defined with `deftheme'. The default value is the list (user changed). The theme `changed' -contains the settings before custom themes are applied. The -theme `user' contains all the settings the user customized and saved. -Additional themes declared with the `deftheme' macro will be added to -the front of this list.") +contains the settings before custom themes are applied. The theme +`user' contains all the settings the user customized and saved. +Additional themes declared with the `deftheme' macro will be added +to the front of this list.") (defsubst custom-theme-p (theme) "Non-nil when THEME has been defined." @@ -1071,7 +1071,7 @@ order. Each element in the list should be one of the following: named \"themes\" in `data-directory'). - a directory name (a string). -Each theme file is named NAME-theme.el, where THEME is the theme +Each theme file is named THEME-theme.el, where THEME is the theme name." :type '(repeat (choice (const :tag "custom-theme-directory" custom-theme-directory) @@ -1143,7 +1143,7 @@ Return t if THEME was successfully loaded, nil otherwise." '("" "c"))) hash) (unless fn - (error "Unable to find theme file for `%s'." theme)) + (error "Unable to find theme file for `%s'" theme)) (with-temp-buffer (insert-file-contents fn) (setq hash (sha1 (current-buffer))) @@ -1209,7 +1209,7 @@ NAME should be a symbol." (defun custom-available-themes () "Return a list of available Custom themes (symbols)." - (let* (sym themes) + (let (sym themes) (dolist (dir (custom-theme--load-path)) (when (file-directory-p dir) (dolist (file (file-expand-wildcards @@ -1335,7 +1335,7 @@ That is to say, it specifies what the value should be according to currently enabled custom themes. This function returns nil if no custom theme specifies a value for VARIABLE." - (let* ((theme-value (get variable 'theme-value))) + (let ((theme-value (get variable 'theme-value))) (if theme-value (cdr (car theme-value))))) From 57048744037204ae0cef40cdca9d8a967a4e1407 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 19:36:27 -0700 Subject: [PATCH 355/383] * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling. * process.c (allocate_pty): Don't declare stb unless it's needed. --- src/ChangeLog | 3 +++ src/process.c | 2 +- src/s/irix6-5.h | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index fa08263a80a..45cb41024ae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-17 Paul Eggert + * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling. + * process.c (allocate_pty): Don't declare stb unless it's needed. + * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else". (CONSTANTLIM): Remove; unused. (METER_CODE, Bscan_buffer, Bread_char, Bset_mark): diff --git a/src/process.c b/src/process.c index 39fa26e8b54..a026174bd23 100644 --- a/src/process.c +++ b/src/process.c @@ -545,7 +545,6 @@ allocate_pty (void) for (i = 0; i < 16; i++) #endif { - struct stat stb; /* Used in some PTY_OPEN. */ #ifdef PTY_NAME_SPRINTF PTY_NAME_SPRINTF #else @@ -562,6 +561,7 @@ allocate_pty (void) three failures in a row before deciding that we've reached the end of the ptys. */ int failed_count = 0; + struct stat stb; if (stat (pty_name, &stb) < 0) { diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index 92465ded2ef..d283571d8fb 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h @@ -60,6 +60,7 @@ char *_getpty(); #define PTY_OPEN \ { \ struct sigaction ocstat, cstat; \ + struct stat stb; \ char * name; \ sigemptyset(&cstat.sa_mask); \ cstat.sa_handler = SIG_DFL; \ @@ -95,5 +96,3 @@ char *_getpty(); /* Tested on Irix 6.5. SCM worked on earlier versions. */ #define GC_SETJMP_WORKS 1 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS - - From be02381c5db4236f51f474726003d5a97bbc61f7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 22:15:08 -0700 Subject: [PATCH 356/383] * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars. That way, the code declares only the vars that it needs. * s/aix4-2.h (PTY_ITERATION): Declare iteration vars. * s/cygwin.h (PTY_ITERATION): Likewise. * s/darwin.h (PTY_ITERATION): Likewise. * s/gnu-linux.h (PTY_ITERATION): Likewise. --- src/ChangeLog | 7 +++++++ src/process.c | 2 +- src/s/aix4-2.h | 2 +- src/s/cygwin.h | 3 +-- src/s/darwin.h | 3 +-- src/s/gnu-linux.h | 2 +- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 45cb41024ae..7e7556f0e85 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2011-03-17 Paul Eggert + * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars. + That way, the code declares only the vars that it needs. + * s/aix4-2.h (PTY_ITERATION): Declare iteration vars. + * s/cygwin.h (PTY_ITERATION): Likewise. + * s/darwin.h (PTY_ITERATION): Likewise. + * s/gnu-linux.h (PTY_ITERATION): Likewise. + * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling. * process.c (allocate_pty): Don't declare stb unless it's needed. diff --git a/src/process.c b/src/process.c index a026174bd23..ab340867150 100644 --- a/src/process.c +++ b/src/process.c @@ -535,12 +535,12 @@ static char pty_name[24]; static int allocate_pty (void) { - register int c, i; int fd; #ifdef PTY_ITERATION PTY_ITERATION #else + register int c, i; for (c = FIRST_PTY_LETTER; c <= 'z'; c++) for (i = 0; i < 16; i++) #endif diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index 443fc034570..c2715fffe01 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h @@ -32,7 +32,7 @@ along with GNU Emacs. If not, see . */ /* In AIX, you allocate a pty by opening /dev/ptc to get the master side. To get the name of the slave side, you just ttyname() the master side. */ -#define PTY_ITERATION for (c = 0; !c ; c++) +#define PTY_ITERATION int c; for (c = 0; !c ; c++) #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptc"); #define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); diff --git a/src/s/cygwin.h b/src/s/cygwin.h index ceebe23f1e7..af5308ff7bb 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h @@ -46,7 +46,7 @@ along with GNU Emacs. If not, see . */ /* Define HAVE_PTYS if the system supports pty devices. */ #define HAVE_PTYS -#define PTY_ITERATION for (i = 0; i < 1; i++) /* ick */ +#define PTY_ITERATION int i; for (i = 0; i < 1; i++) /* ick */ #define PTY_NAME_SPRINTF /* none */ #define PTY_TTY_NAME_SPRINTF /* none */ #define PTY_OPEN \ @@ -102,4 +102,3 @@ along with GNU Emacs. If not, see . */ /* Send signals to subprocesses by "typing" special chars at them. */ #define SIGNALS_VIA_CHARACTERS - diff --git a/src/s/darwin.h b/src/s/darwin.h index 4fc2f4d1031..dd0d0c34021 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h @@ -68,7 +68,7 @@ along with GNU Emacs. If not, see . */ Note: PTYs are broken on darwin <6. Use at your own risk. */ #define HAVE_PTYS /* Run only once. We need a `for'-loop because the code uses `continue'. */ -#define PTY_ITERATION for (i = 0; i < 1; i++) +#define PTY_ITERATION int i; for (i = 0; i < 1; i++) #define PTY_NAME_SPRINTF /* none */ #define PTY_TTY_NAME_SPRINTF /* none */ /* Note that openpty may fork via grantpt on Mac OS X 10.4/Darwin 8. @@ -148,4 +148,3 @@ along with GNU Emacs. If not, see . */ /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */ #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS - diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index 84fe5b92da9..178d7082f72 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h @@ -44,7 +44,7 @@ along with GNU Emacs. If not, see . */ #define UNIX98_PTYS /* Run only once. We need a `for'-loop because the code uses `continue'. */ -#define PTY_ITERATION for (i = 0; i < 1; i++) +#define PTY_ITERATION int i; for (i = 0; i < 1; i++) #ifdef HAVE_GETPT #define PTY_NAME_SPRINTF From b766f86726fc2828a035cb8db149598a3a84de96 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Mar 2011 22:18:33 -0700 Subject: [PATCH 357/383] * process.c (make_serial_process_unwind, send_process_trap): (sigchld_handler): Now static. --- src/ChangeLog | 3 +++ src/process.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 7e7556f0e85..2b7d5289e67 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-03-17 Paul Eggert + * process.c (make_serial_process_unwind, send_process_trap): + (sigchld_handler): Now static. + * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars. That way, the code declares only the vars that it needs. * s/aix4-2.h (PTY_ITERATION): Declare iteration vars. diff --git a/src/process.c b/src/process.c index ab340867150..c9b420ab2ae 100644 --- a/src/process.c +++ b/src/process.c @@ -2724,7 +2724,8 @@ usage: (serial-process-configure &rest ARGS) */) } /* Used by make-serial-process to recover from errors. */ -Lisp_Object make_serial_process_unwind (Lisp_Object proc) +static Lisp_Object +make_serial_process_unwind (Lisp_Object proc) { if (!PROCESSP (proc)) abort (); @@ -5476,7 +5477,7 @@ read_process_output (Lisp_Object proc, register int channel) jmp_buf send_process_frame; Lisp_Object process_sent_to; -SIGTYPE +static SIGTYPE send_process_trap (int ignore) { SIGNAL_THREAD_CHECK (SIGPIPE); @@ -6385,7 +6386,7 @@ process has been transmitted to the serial port. */) indirectly; if it does, that is a bug */ #ifdef SIGCHLD -SIGTYPE +static SIGTYPE sigchld_handler (int signo) { int old_errno = errno; From d6cd56f187a791983579bf5d4ce3702d2ddf2499 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 17 Mar 2011 11:30:27 +0000 Subject: [PATCH 358/383] mm-uu.el (mm-uu-dissect-text-parts): Only dissect handle that are inline. gnus-art.el (article-hide-list-identifiers): Use gnus-group-get-list-identifiers. * gnus-sum.el (gnus-group-get-list-identifiers): New function. (gnus-summary-remove-list-identifiers): Use gnus-group-get-list-identifiers to get regexp. (gnus-select-newsgroup, gnus-summary-insert-subject, gnus-summary-insert-articles): Call gnus-summary-remove-list-identifiers unconditionally. --- lisp/gnus/ChangeLog | 15 +++++++++++++++ lisp/gnus/gnus-art.el | 5 +---- lisp/gnus/gnus-sum.el | 24 +++++++++++++----------- lisp/gnus/mm-uu.el | 2 ++ 4 files changed, 31 insertions(+), 15 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 27fdc563db9..b22ed7397af 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,18 @@ +2011-03-16 Julien Danjou + + * mm-uu.el (mm-uu-dissect-text-parts): Only dissect handle that are + inline. + + * gnus-art.el (article-hide-list-identifiers): Use + gnus-group-get-list-identifiers. + + * gnus-sum.el (gnus-group-get-list-identifiers): New function. + (gnus-summary-remove-list-identifiers): Use + gnus-group-get-list-identifiers to get regexp. + (gnus-select-newsgroup, gnus-summary-insert-subject) + (gnus-summary-insert-articles): Call + gnus-summary-remove-list-identifiers unconditionally. + 2011-03-15 Lars Magne Ingebrigtsen * gnus-sum.el (gnus-articles-to-read): Revert back to old behaviour if diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 20ffa8eed6b..b994a2839bc 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -3076,10 +3076,7 @@ images if any to the browser, and deletes them when exiting the group The `gnus-list-identifiers' variable specifies what to do." (interactive) (let ((inhibit-point-motion-hooks t) - (regexp (or (gnus-parameter-list-identifier gnus-newsgroup-name) - (if (consp gnus-list-identifiers) - (mapconcat 'identity gnus-list-identifiers " *\\|") - gnus-list-identifiers))) + (regexp (gnus-group-get-list-identifiers gnus-newsgroup-name)) (inhibit-read-only t)) (when regexp (save-excursion diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 385460378b1..29a98b7d11d 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5510,12 +5510,17 @@ or a straight list of headers." (cdr (assq number gnus-newsgroup-scored)) (memq number gnus-newsgroup-processable)))))) +(defun gnus-group-get-list-identifiers (group) + "Get list identifier regexp for GROUP." + (or (gnus-parameter-list-identifier group) + (if (consp gnus-list-identifiers) + (mapconcat 'identity gnus-list-identifiers " *\\|") + gnus-list-identifiers))) + (defun gnus-summary-remove-list-identifiers () "Remove list identifiers in `gnus-list-identifiers' from articles in the current group." - (let ((regexp (if (consp gnus-list-identifiers) - (mapconcat 'identity gnus-list-identifiers " *\\|") - gnus-list-identifiers)) - changed subject) + (let ((regexp (gnus-group-get-list-identifiers gnus-newsgroup-name)) + changed subject) (when regexp (setq regexp (concat "^\\(?:R[Ee]: +\\)*\\(" regexp " *\\)")) (dolist (header gnus-newsgroup-headers) @@ -5707,8 +5712,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (when gnus-agent (gnus-agent-get-undownloaded-list)) ;; Remove list identifiers from subject - (when gnus-list-identifiers - (gnus-summary-remove-list-identifiers)) + (gnus-summary-remove-list-identifiers) ;; Check whether auto-expire is to be done in this group. (setq gnus-newsgroup-auto-expire (gnus-group-auto-expirable-p group)) @@ -6576,9 +6580,8 @@ the subject line on." (1+ (point-at-eol)) (gnus-delete-line)))))) ;; Remove list identifiers from subject. - (when gnus-list-identifiers - (let ((gnus-newsgroup-headers (list header))) - (gnus-summary-remove-list-identifiers))) + (let ((gnus-newsgroup-headers (list header))) + (gnus-summary-remove-list-identifiers)) (when old-header (mail-header-set-number header (mail-header-number old-header))) (setq gnus-newsgroup-sparse @@ -12682,8 +12685,7 @@ returned." (when gnus-agent (gnus-agent-get-undownloaded-list)) ;; Remove list identifiers from subject - (when gnus-list-identifiers - (gnus-summary-remove-list-identifiers)) + (gnus-summary-remove-list-identifiers) ;; First and last article in this newsgroup. (when gnus-newsgroup-headers (setq gnus-newsgroup-begin diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index 96dce48a774..4f7b5ed26b3 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -705,6 +705,8 @@ Assume text has been decoded if DECODED is non-nil." ;; Mutt still uses application/pgp even though ;; it has already been withdrawn. (string-match "\\`text/\\|\\`application/pgp\\'" type) + (equal (car (mm-handle-disposition handle)) + "inline") (setq children (with-current-buffer buffer From 45763476fcc967a750bb2abe3bd7a43b7a19e537 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 17 Mar 2011 16:44:02 +0100 Subject: [PATCH 359/383] src/xfaces.c (Fx_load_color_file): Read color file from absolute filename. Fixes: debbugs:8250 --- src/ChangeLog | 5 +++++ src/xfaces.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 75958169951..49b37a843b6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-03-17 Juanma Barranquero + + * xfaces.c (Fx_load_color_file): + Read color file from absolute filename (bug#8250). + 2011-03-11 Juanma Barranquero Backport revno:103582 from trunk. diff --git a/src/xfaces.c b/src/xfaces.c index e9e677d1b19..9956ef55842 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6625,7 +6625,7 @@ where R,G,B are numbers between 0 and 255 and name is an arbitrary string. */) CHECK_STRING (filename); abspath = Fexpand_file_name (filename, Qnil); - fp = fopen (SDATA (filename), "rt"); + fp = fopen (SDATA (abspath), "rt"); if (fp) { char buf[512]; From 381259ef0debba4c0bb07bb5473467c1d4d84223 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 11:41:30 -0700 Subject: [PATCH 360/383] Change unexec implementations to match prototype. --- src/ChangeLog | 1 + src/unexaix.c | 6 ++---- src/unexcoff.c | 5 +---- src/unexcw.c | 5 +---- src/unexhp9k800.c | 3 +-- src/unexmacosx.c | 4 +--- src/unexsol.c | 5 ++--- src/unexw32.c | 5 +---- 8 files changed, 10 insertions(+), 24 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d97969c24db..acc3f0308ed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -36,6 +36,7 @@ * emacs.c [!defined CANNOT_DUMP]: Include unexec.h. * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c: * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h. + Change as necessary to match prototype in unexec.h. * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid shadowing. diff --git a/src/unexaix.c b/src/unexaix.c index 612d7c1fecf..e6aad2db775 100644 --- a/src/unexaix.c +++ b/src/unexaix.c @@ -121,7 +121,8 @@ static void write_segment (int, char *, char *); * * driving logic. */ -int unexec (const char *new_name, const char *a_name) +void +unexec (const char *new_name, const char *a_name) { int new = -1, a_out = -1; @@ -141,14 +142,12 @@ int unexec (const char *new_name, const char *a_name) || unrelocate_symbols (new, a_out, a_name, new_name) < 0) { close (new); - return -1; } close (new); if (a_out >= 0) close (a_out); mark_x (new_name); - return 0; } /* **************************************************************** @@ -639,4 +638,3 @@ start_of_text (void) { return ((char *) 0x10000000); } - diff --git a/src/unexcoff.c b/src/unexcoff.c index 1efde1a9cbc..03b0015e6b9 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c @@ -524,7 +524,7 @@ adjust_lnnoptrs (int writedesc, int readdesc, const char *new_name) * * driving logic. */ -int +void unexec (const char *new_name, const char *a_name) { int new = -1, a_out = -1; @@ -545,15 +545,12 @@ unexec (const char *new_name, const char *a_name) ) { close (new); - return -1; } close (new); if (a_out >= 0) close (a_out); mark_x (new_name); - return 0; } #endif /* not CANNOT_DUMP */ - diff --git a/src/unexcw.c b/src/unexcw.c index b5d72e61550..1202e046024 100644 --- a/src/unexcw.c +++ b/src/unexcw.c @@ -249,7 +249,7 @@ add_exe_suffix_if_necessary (const char *name, char *modified) return (modified); } -int +void unexec (const char *outfile, const char *infile) { char infile_buffer[FILENAME_MAX]; @@ -263,7 +263,6 @@ unexec (const char *outfile, const char *infile) { /* can only dump once */ printf ("You can only dump Emacs once on this platform.\n"); - return (1); } report_sheap_usage (1); @@ -298,6 +297,4 @@ unexec (const char *outfile, const char *infile) ret = close (fd_out); assert (ret == 0); - - return (0); } diff --git a/src/unexhp9k800.c b/src/unexhp9k800.c index 9889ffd63fc..f27415a252c 100644 --- a/src/unexhp9k800.c +++ b/src/unexhp9k800.c @@ -76,7 +76,7 @@ run_time_remap (ignored) /* Create a new a.out file, same as old but with current data space */ -int +void unexec (const char *new_name, /* name of the new a.out file to be created */ const char *old_name) /* name of the old a.out file */ { @@ -133,7 +133,6 @@ unexec (const char *new_name, /* name of the new a.out file to be created * /* Close the binary file */ close (old); close (new); - return 0; } /* Save current data space in the file, update header. */ diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 0df0bb8451d..04e3edf463e 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -1227,7 +1227,7 @@ dump_it (void) from it. The file names of the output and input files are outfile and infile, respectively. The three other parameters are ignored. */ -int +void unexec (const char *outfile, const char *infile) { if (in_dumped_exec) @@ -1258,7 +1258,6 @@ unexec (const char *outfile, const char *infile) dump_it (); close (outfd); - return 0; } @@ -1383,4 +1382,3 @@ unexec_free (void *ptr) else malloc_zone_free (emacs_zone, (unexec_malloc_header_t *) ptr - 1); } - diff --git a/src/unexsol.c b/src/unexsol.c index ae91c170859..ef1e34e6f0f 100644 --- a/src/unexsol.c +++ b/src/unexsol.c @@ -11,14 +11,14 @@ #include "charset.h" #include "coding.h" -int +void unexec (const char *new_name, const char *old_name) { Lisp_Object data; Lisp_Object errstring; if (! dldump (0, new_name, RTLD_MEMORY)) - return 0; + return; data = Fcons (build_string (new_name), Qnil); synchronize_system_messages_locale (); @@ -28,4 +28,3 @@ unexec (const char *new_name, const char *old_name) xsignal (Qfile_error, Fcons (build_string ("Cannot unexec"), Fcons (errstring, data))); } - diff --git a/src/unexw32.c b/src/unexw32.c index c921cd657d5..cd8211d6bee 100644 --- a/src/unexw32.c +++ b/src/unexw32.c @@ -724,7 +724,7 @@ copy_executable_and_dump_data (file_data *p_infile, /* Dump out .data and .bss sections into a new executable. */ -int +void unexec (const char *new_name, const char *old_name) { file_data in_file, out_file; @@ -820,9 +820,6 @@ unexec (const char *new_name, const char *old_name) close_file_data (&in_file); close_file_data (&out_file); - - return 0; } /* eof */ - From 09f6ff021c99c2b80f39e6d8a54ef556ea108a83 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 17 Mar 2011 21:55:40 +0200 Subject: [PATCH 361/383] Update MS-Windows dependencies after 2011-03-17T18:41:30Z!eggert@cs.ucla.edu. src/makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h. --- src/ChangeLog | 4 ++++ src/makefile.w32-in | 1 + 2 files changed, 5 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index acc3f0308ed..93c8245b239 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-17 Eli Zaretskii + + * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h. + 2011-03-17 Paul Eggert Fix more problems found by GCC 4.5.2's static checks. diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 9916a884292..3d882b23d6b 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -1516,6 +1516,7 @@ $(BLD)/undo.$(O) : \ $(BLD)/unexw32.$(O) : \ $(SRC)/unexw32.c \ + $(SRC)/unexec.h \ $(CONFIG_H) \ $(SRC)/w32heap.h From fffe2e140420f75d6ad06ab9356b337570572b9b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Mar 2011 13:18:59 -0700 Subject: [PATCH 362/383] Restore failure returns to unexaix.c, unexcoff.c, unexcw.c --- src/unexaix.c | 1 + src/unexcoff.c | 1 + src/unexcw.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/unexaix.c b/src/unexaix.c index e6aad2db775..df4c5b8905c 100644 --- a/src/unexaix.c +++ b/src/unexaix.c @@ -142,6 +142,7 @@ unexec (const char *new_name, const char *a_name) || unrelocate_symbols (new, a_out, a_name, new_name) < 0) { close (new); + return; } close (new); diff --git a/src/unexcoff.c b/src/unexcoff.c index 03b0015e6b9..ef86a400239 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c @@ -545,6 +545,7 @@ unexec (const char *new_name, const char *a_name) ) { close (new); + return; } close (new); diff --git a/src/unexcw.c b/src/unexcw.c index 1202e046024..f643c196de0 100644 --- a/src/unexcw.c +++ b/src/unexcw.c @@ -263,6 +263,7 @@ unexec (const char *outfile, const char *infile) { /* can only dump once */ printf ("You can only dump Emacs once on this platform.\n"); + return; } report_sheap_usage (1); From 1518e4f02dab44ba5388cd8b0699749ee30d3eff Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Fri, 18 Mar 2011 13:45:04 +0000 Subject: [PATCH 363/383] Merge changes made in Gnus trunk. message.texi (Various Commands): Document format specs in the ellipsis. time-date.el (format-seconds): Use assoc instead of assoc-string to avoid warning on XEmacs. gnus-art.el: Require mouse, which the build bot seems to say is needed. gravatar.el (gravatar-retrieve-synchronously): Use `url-retrieve' on XEmacs, since it doesn't have url-retrieve-synchronously. time-date.el (format-seconds): Use assoc instead of assoc-string, since assoc-string doesn't exist in XEmacs. gnus-group.el (gnus-group-list-ticked): New function. (gnus-group-make-menu-bar): Provide a menu entry for it. (gnus-group-list-map): Provide a binding for it. shr.el (shr-visit-file): New command. nnimap.el (nnimap-fetch-inbox): Rewrite slightly last patch. nnimap.el (nnimap-fetch-inbox): Don't download bodies on ver4-capable servers. --- doc/misc/ChangeLog | 5 +++++ doc/misc/message.texi | 4 ++++ lisp/ChangeLog | 10 ++++++++++ lisp/calendar/time-date.el | 8 ++------ lisp/gnus/ChangeLog | 25 +++++++++++++++++++++++++ lisp/gnus/gnus-art.el | 1 + lisp/gnus/gnus-group.el | 28 ++++++++++++++++++++++++++-- lisp/gnus/gravatar.el | 6 ++++-- lisp/gnus/nnimap.el | 12 ++++++++---- lisp/gnus/shr.el | 9 +++++++++ 10 files changed, 94 insertions(+), 14 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 5dd5e3e4fdc..50f0e4e45b9 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -2,6 +2,11 @@ * calc.texi (Logarithmic Units): Update the function names. +2011-03-15 Lars Magne Ingebrigtsen + + * message.texi (Various Commands): Document format specs in the + ellipsis. + 2011-03-15 Antoine Levitt * message.texi (Insertion Variables): Document message-cite-style. diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 7d61ffd9efa..48d0028e452 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -1202,6 +1202,10 @@ The text is killed and replaced with the contents of the variable @code{message-elide-ellipsis}. The default value is to use an ellipsis (@samp{[...]}). +This is a format-spec string, and you can use @samp{%l} to say how +many lines were removed, and @samp{%c} to say how many characters were +removed. + @item C-c M-k @kindex C-c M-k @findex message-kill-address diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5164207a5ce..6d4e8424f74 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2011-03-17 Lars Magne Ingebrigtsen + + * calendar/time-date.el (format-seconds): Use assoc instead of + assoc-string to avoid warning on XEmacs. + +2011-03-17 Lars Magne Ingebrigtsen + + * calendar/time-date.el (format-seconds): Use assoc instead of + assoc-string, since assoc-string doesn't exist in XEmacs. + 2011-03-17 Juanma Barranquero * custom.el (custom-known-themes): Reflow docstring. diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index a1bfad3a5f5..62203600612 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -308,13 +308,9 @@ This function does not work for SECONDS greater than `most-positive-fixnum'." (setq start (match-end 0) spec (match-string 1 string)) (unless (string-equal spec "%") - ;; `assoc-string' is not available in XEmacs. So when compiling - ;; Gnus (`time-date.el' is part of Gnus) with XEmacs, we get - ;; a warning here. But `format-seconds' is not used anywhere in - ;; Gnus so it's not a real problem. --rsteib - (or (setq match (assoc-string spec units t)) + (or (setq match (assoc (downcase spec) units)) (error "Bad format specifier: `%s'" spec)) - (if (assoc-string spec usedunits t) + (if (assoc (downcase spec) usedunits) (error "Multiple instances of specifier: `%s'" spec)) (if (string-equal (car match) "z") (setq zeroflag t) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index b22ed7397af..04b80159e50 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,28 @@ +2011-03-17 Lars Magne Ingebrigtsen + + * gnus-art.el: Require mouse, which the build bot seems to say is + needed. + + * gravatar.el (gravatar-retrieve-synchronously): Use `url-retrieve' on + XEmacs, since it doesn't have url-retrieve-synchronously. + +2011-03-17 Antoine Levitt + + * gnus-group.el (gnus-group-list-ticked): New function. + (gnus-group-make-menu-bar): Provide a menu entry for it. + (gnus-group-list-map): Provide a binding for it. + +2011-03-17 Lars Magne Ingebrigtsen + + * shr.el (shr-visit-file): New command. + + * nnimap.el (nnimap-fetch-inbox): Rewrite slightly last patch. + +2011-03-17 Bjørn Mork + + * nnimap.el (nnimap-fetch-inbox): Don't download bodies on ver4-capable + servers. + 2011-03-16 Julien Danjou * mm-uu.el (mm-uu-dissect-text-parts): Only dissect handle that are diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index b994a2839bc..7c7e0531926 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -44,6 +44,7 @@ (require 'wid-edit) (require 'mm-uu) (require 'message) +(require 'mouse) (autoload 'gnus-msg-mail "gnus-msg" nil t) (autoload 'gnus-button-mailto "gnus-msg") diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index e928811b558..c265538e19c 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -697,7 +697,8 @@ simple manner.") "M" gnus-group-list-all-matching "l" gnus-group-list-level "c" gnus-group-list-cached - "?" gnus-group-list-dormant) + "?" gnus-group-list-dormant + "!" gnus-group-list-ticked) (gnus-define-keys (gnus-group-list-limit-map "/" gnus-group-list-map) "k" gnus-group-list-limit @@ -849,7 +850,8 @@ simple manner.") ["List all groups matching..." gnus-group-list-all-matching t] ["List active file" gnus-group-list-active t] ["List groups with cached" gnus-group-list-cached t] - ["List groups with dormant" gnus-group-list-dormant t]) + ["List groups with dormant" gnus-group-list-dormant t] + ["List groups with ticked" gnus-group-list-ticked t]) ("Sort" ["Default sort" gnus-group-sort-groups t] ["Sort by method" gnus-group-sort-groups-by-method t] @@ -4536,6 +4538,28 @@ This command may read the active file." (goto-char (point-min)) (gnus-group-position-point)) +(defun gnus-group-list-ticked (level &optional lowest) + "List all groups with ticked articles. +If the prefix LEVEL is non-nil, it should be a number that says which +level to cut off listing groups. +If LOWEST, don't list groups with level lower than LOWEST. + +This command may read the active file." + (interactive "P") + (when level + (setq level (prefix-numeric-value level))) + (when (or (not level) (>= level gnus-level-zombie)) + (gnus-cache-open)) + (funcall gnus-group-prepare-function + (or level gnus-level-subscribed) + #'(lambda (info) + (let ((marks (gnus-info-marks info))) + (assq 'tick marks))) + lowest + 'ignore) + (goto-char (point-min)) + (gnus-group-position-point)) + (defun gnus-group-listed-groups () "Return a list of listed groups." (let (point groups) diff --git a/lisp/gnus/gravatar.el b/lisp/gnus/gravatar.el index 0c97080d847..4b0c9a16283 100644 --- a/lisp/gnus/gravatar.el +++ b/lisp/gnus/gravatar.el @@ -129,8 +129,10 @@ You can provide a list of argument to pass to CB in CBARGS." "Retrieve MAIL-ADDRESS gravatar and returns it." (let ((url (gravatar-build-url mail-address))) (if (gravatar-cache-expired url) - (with-current-buffer (url-retrieve-synchronously url) - (when gravatar-automatic-caching + (with-current-buffer (if (featurep 'xemacs) + (url-retrieve url) + (url-retrieve-synchronously url)) + (when gravatar-automatic-caching (url-store-in-cache (current-buffer))) (let ((data (gravatar-data->image))) (kill-buffer (current-buffer)) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index e0804f81e2e..bcbe7b678d5 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1762,11 +1762,15 @@ textual parts.") (format "(UID %s%s)" (format (if (nnimap-ver4-p) - "BODY.PEEK[HEADER] BODY.PEEK" + "BODY.PEEK" "RFC822.PEEK")) - (if nnimap-split-download-body-default - "[]" - "[1]"))) + (cond + (nnimap-split-download-body-default + "[]") + ((nnimap-ver4-p) + "[HEADER]") + (t + "[1]")))) t)) (defun nnimap-split-incoming-mail () diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index c9c5bd5ff1c..113137a0046 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -113,6 +113,15 @@ cid: URL as the argument.") ;; Public functions and commands. +(defun shr-visit-file (file) + (interactive "fHTML file name: ") + (pop-to-buffer "*html*") + (erase-buffer) + (shr-insert-document + (with-temp-buffer + (insert-file-contents file) + (libxml-parse-html-region (point-min) (point-max))))) + ;;;###autoload (defun shr-insert-document (dom) (setq shr-content-cache nil) From a904a09a8b84daa15857197eed9eb99655d2bbb5 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 18 Mar 2011 15:52:05 -0400 Subject: [PATCH 364/383] * vc/diff-mode.el (diff-mode-map): Shadow problematic bindings from diff-mode-shared-map. (diff-mode-shared-map): Re-introduce some bindings that were problematic. Fixes: debbugs:8284 --- lisp/ChangeLog | 7 ++++--- lisp/vc/diff-mode.el | 21 ++++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d4e8424f74..3a8cf025ad6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,8 @@ -2011-03-17 Lars Magne Ingebrigtsen +2011-03-18 Stefan Monnier - * calendar/time-date.el (format-seconds): Use assoc instead of - assoc-string to avoid warning on XEmacs. + * vc/diff-mode.el (diff-mode-map): Shadow problematic bindings from + diff-mode-shared-map (bug#8284). + (diff-mode-shared-map): Re-introduce some bindings that were problematic. 2011-03-17 Lars Magne Ingebrigtsen diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 9ccb37f3a55..72f415a9b94 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -122,8 +122,7 @@ when editing big diffs)." ("\C-m" . diff-goto-source) ([mouse-2] . diff-goto-source) ;; From XEmacs' diff-mode. - ;; Standard M-w is useful, so don't change M-W. - ;;("W" . widen) + ("W" . widen) ;;("." . diff-goto-source) ;display-buffer ;;("f" . diff-goto-source) ;find-file ("o" . diff-goto-source) ;other-window @@ -135,17 +134,21 @@ when editing big diffs)." ;; Not useful if you have to metafy them. ;;(" " . scroll-up) ;;("\177" . scroll-down) - ;; Standard M-a is useful, so don't change M-A. - ;;("A" . diff-ediff-patch) - ;; Standard M-r is useful, so don't change M-r or M-R. - ;;("r" . diff-restrict-view) - ;;("R" . diff-reverse-direction) - ) + ("A" . diff-ediff-patch) + ("r" . diff-restrict-view) + ("R" . diff-reverse-direction)) "Basic keymap for `diff-mode', bound to various prefix keys." :inherit special-mode-map) (easy-mmode-defmap diff-mode-map - `(("\e" . ,diff-mode-shared-map) + `(("\e" . ,(let ((map (make-sparse-keymap))) + ;; We want to inherit most bindings from diff-mode-shared-map, + ;; but not all since they may hide useful M- global + ;; bindings when editing. + (set-keymap-parent map diff-mode-shared-map) + (dolist (key '("A" "r" "R" "g" "q" "W")) + (define-key map key nil)) + map)) ;; From compilation-minor-mode. ("\C-c\C-c" . diff-goto-source) ;; By analogy with the global C-x 4 a binding. From 06e9c2d94ef8e7cd0998bd610edcffbd1b09ff98 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 19 Mar 2011 00:48:04 +0000 Subject: [PATCH 365/383] gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p. (gnus-buffer-live-p): Check that buffer is not nil. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/gnus-util.el | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 04b80159e50..7eca03bd93b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2011-03-18 Julien Danjou + + * gnus-util.el (gnus-buffer-live-p): Simplify gnus-buffer-live-p. + (gnus-buffer-live-p): Check that buffer is not nil. + 2011-03-17 Lars Magne Ingebrigtsen * gnus-art.el: Require mouse, which the build bot seems to say is diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 42dbd5948cf..3f66b45aaab 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -672,11 +672,9 @@ If N, return the Nth ancestor instead." (when (string-match "\\(<[^<]+>\\)[ \t]*\\'" references) (match-string 1 references)))))) -(defun gnus-buffer-live-p (buffer) +(defsubst gnus-buffer-live-p (buffer) "Say whether BUFFER is alive or not." - (and buffer - (get-buffer buffer) - (buffer-name (get-buffer buffer)))) + (and buffer (buffer-live-p (get-buffer buffer)))) (defun gnus-horizontal-recenter () "Recenter the current buffer horizontally." From f2b726e626e316bdf4728d2df44b94f6bf9635b2 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 19 Mar 2011 04:22:14 +0100 Subject: [PATCH 366/383] src/makefile.w32-in: Update dependencies. --- src/ChangeLog | 4 ++++ src/makefile.w32-in | 46 +++++++++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 93c8245b239..8cbcaf4afbc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-19 Juanma Barranquero + + * makefile.w32-in: Update dependencies. + 2011-03-17 Eli Zaretskii * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h. diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 3d882b23d6b..62c40ca1f94 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -221,7 +221,7 @@ GLOBAL_SOURCES = dosfns.c msdos.c \ region-cache.c sound.c atimer.c \ doprnt.c intervals.c textprop.c composite.c SOME_MACHINE_OBJECTS = dosfns.o msdos.o \ - xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o + xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o obj = $(GLOBAL_SOURCES:.c=.o) globals.h: gl-stamp @@ -386,6 +386,7 @@ $(BLD)/alloc.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -396,7 +397,6 @@ $(BLD)/alloc.$(O) : \ $(SRC)/frame.h \ $(SRC)/intervals.h \ $(SRC)/keyboard.h \ - $(PROCESS_H) \ $(SRC)/puresize.h \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ @@ -484,8 +484,10 @@ $(BLD)/callproc.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ + $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -497,7 +499,6 @@ $(BLD)/callproc.$(O) : \ $(SRC)/dispextern.h \ $(SRC)/epaths.h \ $(SRC)/frame.h \ - $(PROCESS_H) \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ $(SRC)/systty.h \ @@ -653,6 +654,7 @@ $(BLD)/dired.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/dir.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ + $(EMACS_ROOT)/lib/filemode.h \ $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ @@ -662,7 +664,6 @@ $(BLD)/dired.$(O) : \ $(SRC)/coding.h \ $(SRC)/commands.h \ $(SRC)/composite.h \ - $(EMACS_ROOT)/lib/filemode.h \ $(SRC)/ndir.h \ $(SRC)/regex.h \ $(SRC)/systime.h @@ -673,6 +674,7 @@ $(BLD)/dispnew.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -687,7 +689,6 @@ $(BLD)/dispnew.$(O) : \ $(SRC)/indent.h \ $(SRC)/intervals.h \ $(SRC)/keyboard.h \ - $(PROCESS_H) \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ $(SRC)/termchar.h \ @@ -726,8 +727,8 @@ $(BLD)/editfns.$(O) : \ $(EMACS_ROOT)/nt/inc/pwd.h \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ - $(EMACS_ROOT)/lib/strftime.h \ $(EMACS_ROOT)/lib/intprops.h \ + $(EMACS_ROOT)/lib/strftime.h \ $(LISP_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ @@ -747,8 +748,10 @@ $(BLD)/emacs.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ + $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -757,15 +760,14 @@ $(BLD)/emacs.$(O) : \ $(SRC)/composite.h \ $(SRC)/dispextern.h \ $(SRC)/frame.h \ - $(SRC)/gnutls.h \ $(SRC)/intervals.h \ $(SRC)/keyboard.h \ $(SRC)/keymap.h \ - $(PROCESS_H) \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ $(SRC)/systty.h \ $(SRC)/termhooks.h \ + $(SRC)/unexec.h \ $(SRC)/w32.h \ $(SRC)/w32gui.h \ $(SRC)/w32heap.h \ @@ -837,6 +839,7 @@ $(BLD)/fns.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/langinfo.h \ $(EMACS_ROOT)/nt/inc/nl_types.h \ + $(EMACS_ROOT)/nt/inc/stdint.h \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(EMACS_ROOT)/lib/md5.h \ @@ -1030,6 +1033,7 @@ $(BLD)/keyboard.$(O) : \ $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1044,7 +1048,6 @@ $(BLD)/keyboard.$(O) : \ $(SRC)/keyboard.h \ $(SRC)/keymap.h \ $(SRC)/macros.h \ - $(PROCESS_H) \ $(SRC)/puresize.h \ $(SRC)/syntax.h \ $(SRC)/syssignal.h \ @@ -1182,11 +1185,11 @@ $(BLD)/w32.$(O) : \ $(EMACS_ROOT)/nt/inc/sys/socket.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/coding.h \ $(SRC)/composite.h \ $(SRC)/dispextern.h \ $(SRC)/ndir.h \ - $(PROCESS_H) \ $(SRC)/systime.h \ $(SRC)/w32.h \ $(SRC)/w32gui.h \ @@ -1225,11 +1228,11 @@ $(BLD)/w32proc.$(O) : \ $(EMACS_ROOT)/nt/inc/sys/file.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/character.h \ $(SRC)/coding.h \ $(SRC)/composite.h \ $(SRC)/dispextern.h \ - $(PROCESS_H) \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ $(SRC)/syswait.h \ @@ -1261,6 +1264,7 @@ $(BLD)/print.$(O) : \ $(EMACS_ROOT)/lib/ftoastr.h \ $(EMACS_ROOT)/lib/intprops.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1274,7 +1278,6 @@ $(BLD)/print.$(O) : \ $(SRC)/frame.h \ $(SRC)/intervals.h \ $(SRC)/keyboard.h \ - $(PROCESS_H) \ $(SRC)/systime.h \ $(SRC)/termchar.h \ $(SRC)/termhooks.h \ @@ -1289,9 +1292,11 @@ $(BLD)/process.$(O) : \ $(EMACS_ROOT)/nt/inc/arpa/inet.h \ $(EMACS_ROOT)/nt/inc/netinet/in.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ + $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ $(EMACS_ROOT)/nt/inc/sys/socket.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1302,7 +1307,6 @@ $(BLD)/process.$(O) : \ $(SRC)/dispextern.h \ $(SRC)/frame.h \ $(SRC)/keyboard.h \ - $(PROCESS_H) \ $(SRC)/sysselect.h \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ @@ -1415,10 +1419,12 @@ $(BLD)/sysdep.$(O) : \ $(EMACS_ROOT)/nt/inc/pwd.h \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ + $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ $(EMACS_ROOT)/nt/inc/sys/socket.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(EMACS_ROOT)/lib/ignore-value.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/cm.h \ @@ -1427,7 +1433,6 @@ $(BLD)/sysdep.$(O) : \ $(SRC)/dispextern.h \ $(SRC)/frame.h \ $(SRC)/keyboard.h \ - $(PROCESS_H) \ $(SRC)/sysselect.h \ $(SRC)/syssignal.h \ $(SRC)/systime.h \ @@ -1445,6 +1450,7 @@ $(BLD)/term.$(O) : \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/file.h \ + $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ $(SRC)/atimer.h \ @@ -1500,9 +1506,9 @@ $(BLD)/textprop.$(O) : \ $(BLD)/tparam.$(O) : \ $(SRC)/tparam.c \ - $(SRC)/tparam.h \ $(CONFIG_H) \ - $(LISP_H) + $(LISP_H) \ + $(SRC)/tparam.h $(BLD)/undo.$(O) : \ $(SRC)/undo.c \ @@ -1516,8 +1522,8 @@ $(BLD)/undo.$(O) : \ $(BLD)/unexw32.$(O) : \ $(SRC)/unexw32.c \ - $(SRC)/unexec.h \ $(CONFIG_H) \ + $(SRC)/unexec.h \ $(SRC)/w32heap.h $(BLD)/vm-limit.$(O) : \ @@ -1557,6 +1563,7 @@ $(BLD)/xdisp.$(O) : \ $(EMACS_ROOT)/nt/inc/unistd.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1576,7 +1583,6 @@ $(BLD)/xdisp.$(O) : \ $(SRC)/keyboard.h \ $(SRC)/keymap.h \ $(SRC)/macros.h \ - $(PROCESS_H) \ $(SRC)/region-cache.h \ $(SRC)/systime.h \ $(SRC)/termchar.h \ @@ -1668,8 +1674,10 @@ $(BLD)/w32term.$(O) : \ $(SRC)/w32term.c \ $(CONFIG_H) \ $(EMACS_ROOT)/nt/inc/unistd.h \ + $(EMACS_ROOT)/nt/inc/sys/ioctl.h \ $(EMACS_ROOT)/nt/inc/sys/time.h \ $(LISP_H) \ + $(PROCESS_H) \ $(SRC)/atimer.h \ $(SRC)/blockinput.h \ $(SRC)/buffer.h \ @@ -1686,7 +1694,6 @@ $(BLD)/w32term.$(O) : \ $(SRC)/intervals.h \ $(SRC)/keyboard.h \ $(SRC)/keymap.h \ - $(PROCESS_H) \ $(SRC)/systime.h \ $(SRC)/systty.h \ $(SRC)/termchar.h \ @@ -1709,7 +1716,6 @@ $(BLD)/w32select.$(O) : \ $(SRC)/charset.h \ $(SRC)/coding.h \ $(SRC)/composite.h \ - $(SRC)/keyboard.h \ $(SRC)/systime.h \ $(SRC)/w32gui.h \ $(SRC)/w32heap.h \ From 0a19a6f87504ef65b1c946d5daa34b794d600b20 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 19 Mar 2011 04:58:45 +0100 Subject: [PATCH 367/383] Fix typos. --- ChangeLog | 6 +++--- etc/ChangeLog | 6 +++--- etc/NEWS | 25 ++++++++++++------------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index fdde50669b5..7bb19e04ac1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -59,7 +59,7 @@ 2011-02-21 Christoph Scholtes - * lib/makefile.w32-in: ($(BLD)/md5.$(O)): Added dependency on + * lib/makefile.w32-in ($(BLD)/md5.$(O)): Added dependency on $(EMACS_ROOT)/nt/inc/stdint.h. 2011-02-21 Eli Zaretskii @@ -98,7 +98,7 @@ way to test this so I left it alone. * configure: Regenerate. -2011-02-20 Christoph Scholtes +2011-02-20 Christoph Scholtes * lib/makefile.w32-in ($(BLD)/md5.$(O)): New recipe, moved from src/makefile.w32-in. @@ -961,7 +961,7 @@ 2010-06-28 Jan Djärv - * configure.in: Add --with-x-toolkit=gtk3. Remove HAVE_GTK_MULTIDISPLAY, + * configure.in: Add --with-x-toolkit=gtk3. Remove HAVE_GTK_MULTIDISPLAY, check for gtk_file_chooser_dialog_new, and HAVE_GTK_FILE_BOTH (implied by minimum required Gtk+ 2.6). Add checks for functions introduced in Gtk+ 2.14 or newer (bug#6505). diff --git a/etc/ChangeLog b/etc/ChangeLog index cbe46d3a53e..53cd307e3cc 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -24,15 +24,15 @@ 2011-02-17 Ken Manheimer * etc/images/icons/allout-widgets/dark-bg, - etc/images/icons/allout-widgets/light-bg, - encrypted-locked.{xpm,png}, unlocked-encrypted.{xpm,png}: + * etc/images/icons/allout-widgets/light-bg, + * encrypted-locked.{xpm,png}, unlocked-encrypted.{xpm,png}: Reorganize icon directories and files to reconcile against windows short-filename clashes. 2011-02-16 Ken Manheimer * etc/images/icons/allout-widgets-dark-bg, - etc/images/icons/allout-widgets-light-bg: Icons for new + * etc/images/icons/allout-widgets-light-bg: Icons for new allout-widgets.el. * etc/images/icons/README: Include coypright and GPL 3 license for diff --git a/etc/NEWS b/etc/NEWS index bb59e0e2a24..ba33263cf44 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -185,8 +185,8 @@ If you have code that adds something to kill-emacs-hook, you should consider if it is still appropriate to add it in the noninteractive case. ** New scrolling commands `scroll-up-command' and `scroll-down-command' -(bound to C-v/[next] and M-v/[prior]) does not signal errors at top/bottom -of buffer at first key-press (instead moves to top/bottom of buffer) +(bound to C-v/[next] and M-v/[prior]) do not signal errors at top/bottom +of buffer at first key-press (instead move to top/bottom of buffer) when a new variable `scroll-error-top-bottom' is non-nil. ** New scrolling commands `scroll-up-line' and `scroll-down-line' @@ -365,7 +365,7 @@ Just set shell-dir-cookie-re to an appropriate regexp. ** Archive Mode has basic support to browse 7z archives. ** browse-url has gotten a new variable that is used for mailto: URLs, - `browse-url-mailto-function', which defaults to `browse-url-mail'. +`browse-url-mailto-function', which defaults to `browse-url-mail'. ** Directory local variables can apply to file-less buffers, in certain modes (eg dired, vc-dir, log-edit). For example, adding @@ -702,15 +702,14 @@ FIXME: This only says what was changed, but not what are the programmer-visible consequences. ** Passing a nil argument to a minor mode function now turns the mode - ON unconditionally. +ON unconditionally. ** During startup, Emacs no longer adds entries for `menu-bar-lines' -and `tool-bar-lines' to `default-frame-alist' and -`initial-frame-alist'. With these alist entries omitted, `make-frame' -checks the value of the variable `menu-bar-mode'/`tool-bar-mode' to -determine whether to create a menu-bar or tool-bar, respectively. -If the alist entries are added, they override the value of -`menu-bar-mode'/`tool-bar-mode'. +and `tool-bar-lines' to `default-frame-alist' and `initial-frame-alist'. +With these alist entries omitted, `make-frame' checks the value of the +variable `menu-bar-mode'/`tool-bar-mode' to determine whether to create +a menu-bar or tool-bar, respectively. If the alist entries are added, +they override the value of `menu-bar-mode'/`tool-bar-mode'. ** Regions created by mouse dragging are now normal active regions, similar to the ones created by shift-selection. In previous Emacs @@ -830,13 +829,13 @@ displayed with a "spinning bar". * Changes in Emacs 24.1 on non-free operating systems -** New configure.bat option --enable-checking builds emacs with extra +** New configure.bat option --enable-checking builds Emacs with extra runtime checks. ** New configure.bat option --distfiles to specify files to be -included in binary distribution +included in binary distribution. -** New make target `dist' to create binary distribution for MS Windows +** New make target `dist' to create binary distribution for MS Windows. ---------------------------------------------------------------------- From 576bce32675146e772183647c4750c1f5f9b7de7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Mar 2011 11:30:56 +0200 Subject: [PATCH 368/383] Fix emerge.el on MS-Windows and MS-DOS. lisp/emerge.el (emerge-metachars): Separate value for ms-dos and windows-nt systems. (emerge-protect-metachars): Quote correctly for ms-dos and windows-nt systems. --- lisp/ChangeLog | 7 +++++++ lisp/emerge.el | 23 ++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5bd208ba3c8..602b60c6aac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-03-19 Eli Zaretskii + + * emerge.el (emerge-metachars): Separate value for ms-dos and + windows-nt systems. + (emerge-protect-metachars): Quote correctly for ms-dos and + windows-nt systems. + 2011-03-15 Ralph Schleicher * info.el (info-initialize): Replace all uses of `:' with diff --git a/lisp/emerge.el b/lisp/emerge.el index 997077aa08f..ffae5529e1c 100644 --- a/lisp/emerge.el +++ b/lisp/emerge.el @@ -3187,21 +3187,26 @@ See also `auto-save-file-name-p'." ;; Metacharacters that have to be protected from the shell when executing ;; a diff/diff3 command. -(defcustom emerge-metachars "[ \t\n!\"#$&'()*;<=>?[\\^`{|~]" - "Characters that must be quoted with \\ when used in a shell command line. +(defcustom emerge-metachars + (if (memq system-type '(ms-dos windows-nt)) + "[ \t\"<>|?*^&=]" + "[ \t\n!\"#$&'()*;<=>?[\\^`{|~]") + "Characters that must be quoted when used in a shell command line. More precisely, a [...] regexp to match any one such character." :type 'regexp :group 'emerge) ;; Quote metacharacters (using \) when executing a diff/diff3 command. (defun emerge-protect-metachars (s) - (let ((limit 0)) - (while (string-match emerge-metachars s limit) - (setq s (concat (substring s 0 (match-beginning 0)) - "\\" - (substring s (match-beginning 0)))) - (setq limit (1+ (match-end 0))))) - s) + (if (memq system-type '(ms-dos windows-nt)) + (shell-quote-argument s) + (let ((limit 0)) + (while (string-match emerge-metachars s limit) + (setq s (concat (substring s 0 (match-beginning 0)) + "\\" + (substring s (match-beginning 0)))) + (setq limit (1+ (match-end 0))))) + s)) (provide 'emerge) From 20f5695598d3137257e24802479d003ea82eb5f9 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 19 Mar 2011 12:42:53 -0400 Subject: [PATCH 369/383] Backport fix for Bug#8219 from trunk. * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT) (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219). These macros can no longer be used for assignment. * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Assign struct members directly, instead of using BUF_BEGV etc. (record_buffer_markers, fetch_buffer_markers): New functions for recording and fetching special buffer markers. (set_buffer_internal_1, set_buffer_temp): Use them. * lread.c (unreadchar): Use SET_BUF_PT_BOTH. * insdel.c (adjust_point): Use SET_BUF_PT_BOTH. * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH. (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH. * xdisp.c (hscroll_window_tree): (reconsider_clip_changes): Use PT instead of BUF_PT. --- src/ChangeLog | 22 ++++++ src/buffer.c | 187 +++++++++++++++++++++--------------------------- src/buffer.h | 42 ++++++++--- src/insdel.c | 4 +- src/intervals.c | 16 ++--- src/lread.c | 6 +- src/xdisp.c | 4 +- 7 files changed, 148 insertions(+), 133 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 49b37a843b6..be81dd27584 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,25 @@ +2011-03-19 Chong Yidong + + * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT) + (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219). + These macros can no longer be used for assignment. + + * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): Assign + struct members directly, instead of using BUF_BEGV etc. + (record_buffer_markers, fetch_buffer_markers): New functions for + recording and fetching special buffer markers. + (set_buffer_internal_1, set_buffer_temp): Use them. + + * lread.c (unreadchar): Use SET_BUF_PT_BOTH. + + * insdel.c (adjust_point): Use SET_BUF_PT_BOTH. + + * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH. + (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH. + + * xdisp.c (hscroll_window_tree): + (reconsider_clip_changes): Use PT instead of BUF_PT. + 2011-03-17 Juanma Barranquero * xfaces.c (Fx_load_color_file): diff --git a/src/buffer.c b/src/buffer.c index 9220527313d..e7759cb5255 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -371,15 +371,17 @@ even if it is dead. The return value is never nil. */) if (! BUF_BEG_ADDR (b)) buffer_memory_full (); - BUF_PT (b) = BEG; + b->pt = BEG; + b->begv = BEG; + b->zv = BEG; + b->pt_byte = BEG_BYTE; + b->begv_byte = BEG_BYTE; + b->zv_byte = BEG_BYTE; + BUF_GPT (b) = BEG; - BUF_BEGV (b) = BEG; - BUF_ZV (b) = BEG; - BUF_Z (b) = BEG; - BUF_PT_BYTE (b) = BEG_BYTE; BUF_GPT_BYTE (b) = BEG_BYTE; - BUF_BEGV_BYTE (b) = BEG_BYTE; - BUF_ZV_BYTE (b) = BEG_BYTE; + + BUF_Z (b) = BEG; BUF_Z_BYTE (b) = BEG_BYTE; BUF_MODIFF (b) = 1; BUF_CHARS_MODIFF (b) = 1; @@ -533,6 +535,53 @@ clone_per_buffer_values (from, to) to->local_var_alist = buffer_lisp_local_variables (from); } + +/* If buffer B has markers to record PT, BEGV and ZV when it is not + current, update these markers. */ + +static void +record_buffer_markers (struct buffer *b) +{ + if (! NILP (b->pt_marker)) + { + Lisp_Object buffer; + + eassert (!NILP (b->begv_marker)); + eassert (!NILP (b->zv_marker)); + + XSETBUFFER (buffer, b); + set_marker_both (b->pt_marker, buffer, b->pt, b->pt_byte); + set_marker_both (b->begv_marker, buffer, b->begv, b->begv_byte); + set_marker_both (b->zv_marker, buffer, b->zv, b->zv_byte); + } +} + + +/* If buffer B has markers to record PT, BEGV and ZV when it is not + current, fetch these values into B->begv etc. */ + +static void +fetch_buffer_markers (struct buffer *b) +{ + if (! NILP (b->pt_marker)) + { + Lisp_Object m; + + eassert (!NILP (b->begv_marker)); + eassert (!NILP (b->zv_marker)); + + m = b->pt_marker; + SET_BUF_PT_BOTH (b, marker_position (m), marker_byte_position (m)); + + m = b->begv_marker; + SET_BUF_BEGV_BOTH (b, marker_position (m), marker_byte_position (m)); + + m = b->zv_marker; + SET_BUF_ZV_BOTH (b, marker_position (m), marker_byte_position (m)); + } +} + + DEFUN ("make-indirect-buffer", Fmake_indirect_buffer, Smake_indirect_buffer, 2, 3, "bMake indirect buffer (to buffer): \nBName of indirect buffer: ", @@ -572,12 +621,12 @@ CLONE nil means the indirect buffer's state is reset to default values. */) /* Use the base buffer's text object. */ b->text = b->base_buffer->text; - BUF_BEGV (b) = BUF_BEGV (b->base_buffer); - BUF_ZV (b) = BUF_ZV (b->base_buffer); - BUF_PT (b) = BUF_PT (b->base_buffer); - BUF_BEGV_BYTE (b) = BUF_BEGV_BYTE (b->base_buffer); - BUF_ZV_BYTE (b) = BUF_ZV_BYTE (b->base_buffer); - BUF_PT_BYTE (b) = BUF_PT_BYTE (b->base_buffer); + b->pt = b->base_buffer->pt; + b->begv = b->base_buffer->begv; + b->zv = b->base_buffer->zv; + b->pt_byte = b->base_buffer->pt_byte; + b->begv_byte = b->base_buffer->begv_byte; + b->zv_byte = b->base_buffer->zv_byte; b->newline_cache = 0; b->width_run_cache = 0; @@ -607,24 +656,23 @@ CLONE nil means the indirect buffer's state is reset to default values. */) /* Make sure the base buffer has markers for its narrowing. */ if (NILP (b->base_buffer->pt_marker)) { + eassert (NILP (b->base_buffer->begv_marker)); + eassert (NILP (b->base_buffer->zv_marker)); + b->base_buffer->pt_marker = Fmake_marker (); set_marker_both (b->base_buffer->pt_marker, base_buffer, - BUF_PT (b->base_buffer), - BUF_PT_BYTE (b->base_buffer)); - } - if (NILP (b->base_buffer->begv_marker)) - { + b->base_buffer->pt, + b->base_buffer->pt_byte); + b->base_buffer->begv_marker = Fmake_marker (); set_marker_both (b->base_buffer->begv_marker, base_buffer, - BUF_BEGV (b->base_buffer), - BUF_BEGV_BYTE (b->base_buffer)); - } - if (NILP (b->base_buffer->zv_marker)) - { + b->base_buffer->begv, + b->base_buffer->begv_byte); + b->base_buffer->zv_marker = Fmake_marker (); set_marker_both (b->base_buffer->zv_marker, base_buffer, - BUF_ZV (b->base_buffer), - BUF_ZV_BYTE (b->base_buffer)); + b->base_buffer->zv, + b->base_buffer->zv_byte); XMARKER (b->base_buffer->zv_marker)->insertion_type = 1; } @@ -632,11 +680,11 @@ CLONE nil means the indirect buffer's state is reset to default values. */) { /* Give the indirect buffer markers for its narrowing. */ b->pt_marker = Fmake_marker (); - set_marker_both (b->pt_marker, buf, BUF_PT (b), BUF_PT_BYTE (b)); + set_marker_both (b->pt_marker, buf, b->pt, b->pt_byte); b->begv_marker = Fmake_marker (); - set_marker_both (b->begv_marker, buf, BUF_BEGV (b), BUF_BEGV_BYTE (b)); + set_marker_both (b->begv_marker, buf, b->begv, b->begv_byte); b->zv_marker = Fmake_marker (); - set_marker_both (b->zv_marker, buf, BUF_ZV (b), BUF_ZV_BYTE (b)); + set_marker_both (b->zv_marker, buf, b->zv, b->zv_byte); XMARKER (b->zv_marker)->insertion_type = 1; } else @@ -1890,27 +1938,7 @@ set_buffer_internal_1 (b) /* If the old current buffer has markers to record PT, BEGV and ZV when it is not current, update them now. */ - if (! NILP (old_buf->pt_marker)) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (old_buf->pt_marker, obuf, - BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); - } - if (! NILP (old_buf->begv_marker)) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (old_buf->begv_marker, obuf, - BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); - } - if (! NILP (old_buf->zv_marker)) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (old_buf->zv_marker, obuf, - BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); - } + record_buffer_markers (old_buf); } /* Get the undo list from the base buffer, so that it appears @@ -1920,21 +1948,7 @@ set_buffer_internal_1 (b) /* If the new current buffer has markers to record PT, BEGV and ZV when it is not current, fetch them now. */ - if (! NILP (b->pt_marker)) - { - BUF_PT (b) = marker_position (b->pt_marker); - BUF_PT_BYTE (b) = marker_byte_position (b->pt_marker); - } - if (! NILP (b->begv_marker)) - { - BUF_BEGV (b) = marker_position (b->begv_marker); - BUF_BEGV_BYTE (b) = marker_byte_position (b->begv_marker); - } - if (! NILP (b->zv_marker)) - { - BUF_ZV (b) = marker_position (b->zv_marker); - BUF_ZV_BYTE (b) = marker_byte_position (b->zv_marker); - } + fetch_buffer_markers (b); /* Look down buffer's list of local Lisp variables to find and update any that forward into C variables. */ @@ -1984,50 +1998,13 @@ set_buffer_temp (b) old_buf = current_buffer; current_buffer = b; - if (old_buf) - { - /* If the old current buffer has markers to record PT, BEGV and ZV - when it is not current, update them now. */ - if (! NILP (old_buf->pt_marker)) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (old_buf->pt_marker, obuf, - BUF_PT (old_buf), BUF_PT_BYTE (old_buf)); - } - if (! NILP (old_buf->begv_marker)) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (old_buf->begv_marker, obuf, - BUF_BEGV (old_buf), BUF_BEGV_BYTE (old_buf)); - } - if (! NILP (old_buf->zv_marker)) - { - Lisp_Object obuf; - XSETBUFFER (obuf, old_buf); - set_marker_both (old_buf->zv_marker, obuf, - BUF_ZV (old_buf), BUF_ZV_BYTE (old_buf)); - } - } + /* If the old current buffer has markers to record PT, BEGV and ZV + when it is not current, update them now. */ + record_buffer_markers (old_buf); /* If the new current buffer has markers to record PT, BEGV and ZV when it is not current, fetch them now. */ - if (! NILP (b->pt_marker)) - { - BUF_PT (b) = marker_position (b->pt_marker); - BUF_PT_BYTE (b) = marker_byte_position (b->pt_marker); - } - if (! NILP (b->begv_marker)) - { - BUF_BEGV (b) = marker_position (b->begv_marker); - BUF_BEGV_BYTE (b) = marker_byte_position (b->begv_marker); - } - if (! NILP (b->zv_marker)) - { - BUF_ZV (b) = marker_position (b->zv_marker); - BUF_ZV_BYTE (b) = marker_byte_position (b->zv_marker); - } + fetch_buffer_markers (b); } DEFUN ("set-buffer", Fset_buffer, Sset_buffer, 1, 1, 0, diff --git a/src/buffer.h b/src/buffer.h index 21854571670..56d0422b7e3 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -107,22 +107,46 @@ along with GNU Emacs. If not, see . */ #define BUF_BEG(buf) (BEG) #define BUF_BEG_BYTE(buf) (BEG_BYTE) +/* The BUF_BEGV[_BYTE], BUF_ZV[_BYTE], and BUF_PT[_BYTE] macros cannot + be used for assignment; use SET_BUF_* macros below for that. */ + /* Position of beginning of accessible range of buffer. */ -#define BUF_BEGV(buf) ((buf)->begv) -#define BUF_BEGV_BYTE(buf) ((buf)->begv_byte) +#define BUF_BEGV(buf) \ + (buf == current_buffer ? BEGV \ + : NILP (buf->begv_marker) ? buf->begv \ + : marker_position (buf->begv_marker)) + +#define BUF_BEGV_BYTE(buf) \ + (buf == current_buffer ? BEGV_BYTE \ + : NILP (buf->begv_marker) ? buf->begv_byte \ + : marker_byte_position (buf->begv_marker)) /* Position of point in buffer. */ -#define BUF_PT(buf) ((buf)->pt) -#define BUF_PT_BYTE(buf) ((buf)->pt_byte) +#define BUF_PT(buf) \ + (buf == current_buffer ? PT \ + : NILP (buf->pt_marker) ? buf->pt \ + : marker_position (buf->pt_marker)) + +#define BUF_PT_BYTE(buf) \ + (buf == current_buffer ? PT_BYTE \ + : NILP (buf->pt_marker) ? buf->pt_byte \ + : marker_byte_position (buf->pt_marker)) + +/* Position of end of accessible range of buffer. */ +#define BUF_ZV(buf) \ + (buf == current_buffer ? ZV \ + : NILP (buf->zv_marker) ? buf->zv \ + : marker_position (buf->zv_marker)) + +#define BUF_ZV_BYTE(buf) \ + (buf == current_buffer ? ZV_BYTE \ + : NILP (buf->zv_marker) ? buf->zv_byte \ + : marker_byte_position (buf->zv_marker)) /* Position of gap in buffer. */ #define BUF_GPT(buf) ((buf)->text->gpt) #define BUF_GPT_BYTE(buf) ((buf)->text->gpt_byte) -/* Position of end of accessible range of buffer. */ -#define BUF_ZV(buf) ((buf)->zv) -#define BUF_ZV_BYTE(buf) ((buf)->zv_byte) - /* Position of end of buffer. */ #define BUF_Z(buf) ((buf)->text->z) #define BUF_Z_BYTE(buf) ((buf)->text->z_byte) @@ -230,8 +254,6 @@ extern void enlarge_buffer_text P_ ((struct buffer *, EMACS_INT)); /* Macros for setting the BEGV, ZV or PT of a given buffer. - SET_BUF_PT* seet to be redundant. Get rid of them? - The ..._BOTH macros take both a charpos and a bytepos, which must correspond to each other. diff --git a/src/insdel.c b/src/insdel.c index 7e0ba797fa8..b76a2d2271a 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -459,9 +459,7 @@ adjust_markers_for_insert (EMACS_INT from, EMACS_INT from_byte, static void adjust_point (EMACS_INT nchars, EMACS_INT nbytes) { - BUF_PT (current_buffer) += nchars; - BUF_PT_BYTE (current_buffer) += nbytes; - + SET_BUF_PT_BOTH (current_buffer, PT + nchars, PT_BYTE + nbytes); /* In a single-byte buffer, the two positions must be equal. */ eassert (PT_BYTE >= PT && PT_BYTE - PT <= ZV_BYTE - ZV); } diff --git a/src/intervals.c b/src/intervals.c index d47888b237c..fd8f3f55479 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1949,8 +1949,7 @@ temp_set_point_both (struct buffer *buffer, if (charpos > BUF_ZV (buffer) || charpos < BUF_BEGV (buffer)) abort (); - BUF_PT_BYTE (buffer) = bytepos; - BUF_PT (buffer) = charpos; + SET_BUF_PT_BOTH (buffer, charpos, bytepos); } /* Set point in BUFFER to CHARPOS. If the target position is @@ -2366,10 +2365,9 @@ get_local_map (position, buffer, type) old_zv = BUF_ZV (buffer); old_begv_byte = BUF_BEGV_BYTE (buffer); old_zv_byte = BUF_ZV_BYTE (buffer); - BUF_BEGV (buffer) = BUF_BEG (buffer); - BUF_ZV (buffer) = BUF_Z (buffer); - BUF_BEGV_BYTE (buffer) = BUF_BEG_BYTE (buffer); - BUF_ZV_BYTE (buffer) = BUF_Z_BYTE (buffer); + + SET_BUF_BEGV_BOTH (buffer, BUF_BEG (buffer), BUF_BEG_BYTE (buffer)); + SET_BUF_ZV_BOTH (buffer, BUF_Z (buffer), BUF_Z_BYTE (buffer)); XSETFASTINT (lispy_position, position); XSETBUFFER (lispy_buffer, buffer); @@ -2383,10 +2381,8 @@ get_local_map (position, buffer, type) if (NILP (prop)) prop = get_pos_property (lispy_position, type, lispy_buffer); - BUF_BEGV (buffer) = old_begv; - BUF_ZV (buffer) = old_zv; - BUF_BEGV_BYTE (buffer) = old_begv_byte; - BUF_ZV_BYTE (buffer) = old_zv_byte; + SET_BUF_BEGV_BOTH (buffer, old_begv, old_begv_byte); + SET_BUF_ZV_BOTH (buffer, old_zv, old_zv_byte); /* Use the local map only if it is valid. */ prop = get_keymap (prop, 0, 0); diff --git a/src/lread.c b/src/lread.c index 8f1d4af8f36..2da64632417 100644 --- a/src/lread.c +++ b/src/lread.c @@ -458,15 +458,15 @@ unreadchar (readcharfun, c) else if (BUFFERP (readcharfun)) { struct buffer *b = XBUFFER (readcharfun); - int bytepos = BUF_PT_BYTE (b); + EMACS_INT charpos = BUF_PT (b); + EMACS_INT bytepos = BUF_PT_BYTE (b); - BUF_PT (b)--; if (! NILP (b->enable_multibyte_characters)) BUF_DEC_POS (b, bytepos); else bytepos--; - BUF_PT_BYTE (b) = bytepos; + SET_BUF_PT_BOTH (b, charpos - 1, bytepos); } else if (MARKERP (readcharfun)) { diff --git a/src/xdisp.c b/src/xdisp.c index c2af4d68b6e..ade95cf3d62 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10760,7 +10760,7 @@ hscroll_window_tree (window) current_buffer = XBUFFER (w->buffer); if (w == XWINDOW (selected_window)) - pt = BUF_PT (current_buffer); + pt = PT; else { pt = marker_position (w->pointm); @@ -11194,7 +11194,7 @@ reconsider_clip_changes (w, b) int pt; if (w == XWINDOW (selected_window)) - pt = BUF_PT (current_buffer); + pt = PT; else pt = marker_position (w->pointm); From 4525ce3eb56a1f4b7c50eac9217854bbd170f660 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 19 Mar 2011 14:27:55 -0400 Subject: [PATCH 370/383] Fix tar package handling, and clean up package-subdirectory-regexp usage. * lisp/startup.el (package-subdirectory-regexp): Move from package.el. Omit \\` and \\', and let callers add them. * lisp/emacs-lisp/package.el (package-strip-version) (package-load-all-descriptors): Add \\` and \\' to package-subdirectory-regexp before using it. (package-untar-buffer): New arg DIR; ensure that file untars only into this expected directory. Remove superfluous delete-region. (package-unpack): Caller changed. (package-tar-file-info): Use package-subdirectory-regexp. --- lisp/ChangeLog | 13 +++++++++++ lisp/emacs-lisp/package.el | 47 +++++++++++++++++--------------------- lisp/startup.el | 15 +++++++++--- 3 files changed, 46 insertions(+), 29 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3a8cf025ad6..42b4d759c07 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2011-03-19 Chong Yidong + + * startup.el (package-subdirectory-regexp): Move from package.el. + Omit \\` and \\', and let callers add them. + + * emacs-lisp/package.el (package-strip-version) + (package-load-all-descriptors): Add \\` and \\' to + package-subdirectory-regexp before using it. + (package-untar-buffer): New arg DIR; ensure that file untars only + into this expected directory. Remove superfluous delete-region. + (package-unpack): Caller changed. + (package-tar-file-info): Use package-subdirectory-regexp. + 2011-03-18 Stefan Monnier * vc/diff-mode.el (diff-mode-map): Shadow problematic bindings from diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 399e0fb2e24..5dc2938fe08 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -319,12 +319,6 @@ Like `package-alist', but maps package name to a second alist. The inner alist is keyed by version.") (put 'package-obsolete-alist 'risky-local-variable t) -(defconst package-subdirectory-regexp - "\\`\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)\\'" - "Regular expression matching the name of a package subdirectory. -The first subexpression is the package name. -The second subexpression is the version string.") - (defun package-version-join (vlist) "Return the version string corresponding to the list VLIST. This is, approximately, the inverse of `version-to-list'. @@ -357,7 +351,7 @@ This is, approximately, the inverse of `version-to-list'. (defun package-strip-version (dirname) "Strip the version from a combined package name and version. E.g., if given \"quux-23.0\", will return \"quux\"" - (if (string-match package-subdirectory-regexp dirname) + (if (string-match (concat "\\`" package-subdirectory-regexp "\\'") dirname) (match-string 1 dirname))) (defun package-load-descriptor (dir package) @@ -382,12 +376,13 @@ In each valid package subdirectory, this function loads the description file containing a call to `define-package', which updates `package-alist' and `package-obsolete-alist'." (let ((all (memq 'all package-load-list)) + (regexp (concat "\\`" package-subdirectory-regexp "\\'")) name version force) (dolist (dir (cons package-user-dir package-directory-list)) (when (file-directory-p dir) (dolist (subdir (directory-files dir)) (when (and (file-directory-p (expand-file-name subdir dir)) - (string-match package-subdirectory-regexp subdir)) + (string-match regexp subdir)) (setq name (intern (match-string 1 subdir)) version (match-string 2 subdir) force (assq name package-load-list)) @@ -579,30 +574,29 @@ EXTRA-PROPERTIES is currently unused." (package-autoload-ensure-default-file generated-autoload-file)) (update-directory-autoloads pkg-dir))) -(defun package-untar-buffer () +(defvar tar-parse-info) +(declare-function tar-untar-buffer "tar-mode" ()) + +(defun package-untar-buffer (dir) "Untar the current buffer. -This uses `tar-untar-buffer' if it is available. -Otherwise it uses an external `tar' program. -`default-directory' should be set by the caller." +This uses `tar-untar-buffer' from Tar mode. All files should +untar into a directory named DIR; otherwise, signal an error." (require 'tar-mode) - (if (fboundp 'tar-untar-buffer) - (progn - ;; tar-mode messes with narrowing, so we just let it have the - ;; whole buffer to play with. - (delete-region (point-min) (point)) - (tar-mode) - (tar-untar-buffer)) - ;; FIXME: check the result. - (call-process-region (point) (point-max) "tar" nil '(nil nil) nil - "xf" "-"))) + (tar-mode) + ;; Make sure everything extracts into DIR. + (let ((regexp (concat "\\`" (regexp-quote dir) "/"))) + (dolist (tar-data tar-parse-info) + (unless (string-match regexp (aref tar-data 2)) + (error "Package does not untar cleanly into directory %s/" dir)))) + (tar-untar-buffer)) (defun package-unpack (name version) - (let ((pkg-dir (expand-file-name (concat (symbol-name name) "-" version) - package-user-dir))) + (let* ((dirname (concat (symbol-name name) "-" version)) + (pkg-dir (expand-file-name dirname package-user-dir))) (make-directory package-user-dir t) ;; FIXME: should we delete PKG-DIR if it exists? (let* ((default-directory (file-name-as-directory package-user-dir))) - (package-untar-buffer) + (package-untar-buffer dirname) (package-generate-autoloads (symbol-name name) pkg-dir) (let ((load-path (cons pkg-dir load-path))) (byte-recompile-directory pkg-dir 0 t))))) @@ -942,7 +936,8 @@ FILE is the name of the tar file to examine. The return result is a vector like `package-buffer-info'." (let ((default-directory (file-name-directory file)) (file (file-name-nondirectory file))) - (unless (string-match "^\\(.+\\)-\\([0-9.]+\\)\\.tar$" file) + (unless (string-match (concat "\\`" package-subdirectory-regexp "\\.tar\\'") + file) (error "Invalid package name `%s'" file)) (let* ((pkg-name (match-string-no-properties 1 file)) (pkg-version (match-string-no-properties 2 file)) diff --git a/lisp/startup.el b/lisp/startup.el index 65b1a013c21..e8e85a41c77 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -392,6 +392,15 @@ Warning Warning!!! Pure space overflow !!!Warning Warning :type 'directory :initialize 'custom-initialize-delay) +(defconst package-subdirectory-regexp + "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)" + "Regular expression matching the name of a package subdirectory. +The first subexpression is the package name. +The second subexpression is the version string. + +The regexp should not contain a starting \"\\`\" or a trailing + \"\\'\"; those are added automatically by callers.") + (defun normal-top-level-add-subdirs-to-load-path () "Add all subdirectories of current directory to `load-path'. More precisely, this uses only the subdirectories whose names @@ -1194,9 +1203,9 @@ the `--debug-init' option to view a complete error backtrace." (when (file-directory-p dir) (dolist (subdir (directory-files dir)) (when (and (file-directory-p (expand-file-name subdir dir)) - ;; package-subdirectory-regexp from package.el - (string-match "\\`\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\)[0-9]+\\)*\\)\\'" - subdir)) + (string-match + (concat "\\`" package-subdirectory-regexp "\\'") + subdir)) (throw 'package-dir-found t))))))) (package-initialize)) From fe0fb33e832ea83ffe8cab449eb41ed4acb691d9 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 19 Mar 2011 17:37:21 -0400 Subject: [PATCH 371/383] Fix facemenu to populate buffer inside the with-help-window call. See http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg01193.html * facemenu.el (list-colors-display): Call list-faces-display from inside with-help-window. (list-colors-print): Use display property to align the final column, instead of checking window-width. --- lisp/ChangeLog | 7 +++++++ lisp/facemenu.el | 37 ++++++++++--------------------------- 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 55f0b52bb41..5244e261c11 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-03-19 Chong Yidong + + * facemenu.el (list-colors-display): Call list-faces-display + inside with-help-window. + (list-colors-print): Use display property to align the final + column, instead of checking window-width. + 2011-03-19 Eli Zaretskii * emerge.el (emerge-metachars): Separate value for ms-dos and diff --git a/lisp/facemenu.el b/lisp/facemenu.el index 97862afb678..fffe09a84a5 100644 --- a/lisp/facemenu.el +++ b/lisp/facemenu.el @@ -567,18 +567,12 @@ You can change the color sort order by customizing `list-colors-sort'." (with-help-window buffer-name (with-current-buffer standard-output (erase-buffer) + (list-colors-print list callback) + (set-buffer-modified-p nil) (setq truncate-lines t))) - (let ((buf (get-buffer buffer-name)) - (inhibit-read-only t)) - ;; Display buffer before generating content, to allow - ;; `list-colors-print' to get the right window-width. - (with-selected-window (or (get-buffer-window buf t) (selected-window)) - (with-current-buffer buf - (list-colors-print list callback) - (set-buffer-modified-p nil))) - (when callback - (pop-to-buffer buf) - (message "Click on a color to select it.")))) + (when callback + (pop-to-buffer buffer-name) + (message "Click on a color to select it."))) (defun list-colors-print (list &optional callback) (let ((callback-fn @@ -595,30 +589,19 @@ You can change the color sort order by customizing `list-colors-sort'." (let* ((opoint (point)) (color-values (color-values (car color))) (light-p (>= (apply 'max color-values) - (* (car (color-values "white")) .5))) - (max-len (max (- (window-width) 33) 20))) + (* (car (color-values "white")) .5)))) (insert (car color)) (indent-to 22) (put-text-property opoint (point) 'face `(:background ,(car color))) (put-text-property (prog1 (point) (insert " ") - (if (cdr color) - ;; Insert as many color names as possible, fitting max-len. - (let ((names (list (car color))) - (others (cdr color)) - (len (length (car color))) - newlen) - (while (and others - (< (setq newlen (+ len 2 (length (car others)))) - max-len)) - (setq len newlen) - (push (pop others) names)) - (insert (mapconcat 'identity (nreverse names) ", "))) - (insert (car color)))) + ;; Insert all color names. + (insert (mapconcat 'identity color ","))) (point) 'face (list :foreground (car color))) - (indent-to (max (- (window-width) 8) 44)) + (insert (propertize " " 'display '(space :align-to (- right 9)))) + (insert " ") (insert (propertize (apply 'format "#%02x%02x%02x" (mapcar (lambda (c) (lsh c -8)) From ff854b0bde465a9db550dcff21d8db411c84818d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 19 Mar 2011 18:07:41 -0400 Subject: [PATCH 372/383] Add error for dired-create-directory on existing file (Bug#8246). * lisp/dired-aux.el (dired-create-directory): Signal an error if the directory already exists. --- lisp/ChangeLog | 3 +++ lisp/dired-aux.el | 5 ++++- lisp/dired.el | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5244e261c11..a60ce0be672 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-19 Chong Yidong + * dired-aux.el (dired-create-directory): Signal an error if the + directory already exists (Bug#8246). + * facemenu.el (list-colors-display): Call list-faces-display inside with-help-window. (list-colors-print): Use display property to align the final diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index c533c81be0e..9ab1fcb0e2b 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1638,11 +1638,14 @@ Optional arg HOW-TO determiness how to treat the target. ;;;###autoload (defun dired-create-directory (directory) - "Create a directory called DIRECTORY." + "Create a directory called DIRECTORY. +If DIRECTORY already exists, signal an error." (interactive (list (read-file-name "Create directory: " (dired-current-directory)))) (let* ((expanded (directory-file-name (expand-file-name directory))) (try expanded) new) + (if (file-exists-p expanded) + (error "Cannot create directory %s: file exists" expanded)) ;; Find the topmost nonexistent parent dir (variable `new') (while (and try (not (file-exists-p try)) (not (equal new try))) (setq new try diff --git a/lisp/dired.el b/lisp/dired.el index c4374503a6f..22470ea61e6 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -3627,7 +3627,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "154cdfbf451aedec60c5012b625ff329") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "2d805d6766bd7970cd446413b4ed4ce0") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ @@ -3858,6 +3858,7 @@ Not documented (autoload 'dired-create-directory "dired-aux" "\ Create a directory called DIRECTORY. +If DIRECTORY already exists, signal an error. \(fn DIRECTORY)" t nil) From 7d476bdec543cfba684a4d63b8a6bbeb775c75c3 Mon Sep 17 00:00:00 2001 From: Christian Ohler Date: Sun, 20 Mar 2011 21:17:10 +1100 Subject: [PATCH 373/383] * emacs-lisp/ert.el (ert-run-tests-batch): Remove unused variable. (ert-delete-all-tests): Use `called-interactively-p' rather than `interactive-p'. (ert--make-xrefs-region): Respect END. --- lisp/ChangeLog | 7 +++++++ lisp/emacs-lisp/ert.el | 9 ++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a60ce0be672..4e71d355886 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-03-20 Christian Ohler + + * emacs-lisp/ert.el (ert-run-tests-batch): Remove unused variable. + (ert-delete-all-tests): Use `called-interactively-p' rather than + `interactive-p'. + (ert--make-xrefs-region): Respect END. + 2011-03-19 Chong Yidong * dired-aux.el (dired-create-directory): Signal an error if the diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 5bd8fd01b1e..b2e20843856 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1482,9 +1482,8 @@ Returns the stats object." (let ((print-escape-newlines t) (print-level 5) (print-length 10)) - (let ((begin (point))) - (ert--pp-with-indentation-and-newline - (ert-test-result-with-condition-condition result)))) + (ert--pp-with-indentation-and-newline + (ert-test-result-with-condition-condition result))) (goto-char (1- (point-max))) (assert (looking-at "\n")) (delete-char 1) @@ -1603,7 +1602,7 @@ Nothing more than an interactive interface to `ert-make-test-unbound'." (defun ert-delete-all-tests () "Make all symbols in `obarray' name no test." (interactive) - (when (interactive-p) + (when (called-interactively-p 'any) (unless (y-or-n-p "Delete all tests? ") (error "Aborted"))) ;; We can't use `ert-select-tests' here since that gives us only @@ -1793,7 +1792,7 @@ EWOC and STATS are arguments for `ert--results-update-stats-display'." BEGIN and END specify a region in the current buffer." (save-excursion (save-restriction - (narrow-to-region begin (point)) + (narrow-to-region begin end) ;; Inhibit optimization in `debugger-make-xrefs' that would ;; sometimes insert unrelated backtrace info into our buffer. (let ((debugger-previous-backtrace nil)) From 3ec03f7e4696b4af1af7e1a2fef2a64ccb9224c2 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Sun, 20 Mar 2011 18:35:27 +0800 Subject: [PATCH 374/383] New variable completing-read-function to customize completing-read --- etc/NEWS | 3 +++ lisp/ChangeLog | 5 +++++ lisp/ido.el | 8 ++++---- src/ChangeLog | 6 ++++++ src/minibuf.c | 34 +++++++++++++++++++++++++++++++++- 5 files changed, 51 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index ba33263cf44..a7ec965e3d6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -81,6 +81,9 @@ error, its exit status is 1. ** Completion can cycle, depending on completion-cycle-threshold. +** `completing-read' can be customized using the new variable +`completing-read-function' + ** auto-mode-case-fold is now enabled by default. +++ diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4e71d355886..fe45788d888 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-20 Leo + + * ido.el (ido-read-internal): Use completing-read-default. + (ido-completing-read): Fix compatibility with completing-read. + 2011-03-20 Christian Ohler * emacs-lisp/ert.el (ert-run-tests-batch): Remove unused variable. diff --git a/lisp/ido.el b/lisp/ido.el index 2e67e367a8f..2a5c7cf2f0e 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1983,7 +1983,7 @@ If INITIAL is non-nil, it specifies the initial input string." (setq ido-exit nil) (setq ido-final-text (catch 'ido - (completing-read + (completing-read-default (ido-make-prompt item prompt) '(("dummy" . 1)) nil nil ; table predicate require-match (prog1 ido-text-init (setq ido-text-init nil)) ;initial-contents @@ -4740,13 +4740,13 @@ See `read-directory-name' for additional parameters." (concat ido-current-directory filename))))) ;;;###autoload -(defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def) +(defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def inherit-input-method) "Ido replacement for the built-in `completing-read'. Read a string in the minibuffer with ido-style completion. PROMPT is a string to prompt with; normally it ends in a colon and a space. CHOICES is a list of strings which are the possible completions. -PREDICATE is currently ignored; it is included to be compatible - with `completing-read'. +PREDICATE and INHERIT-INPUT-METHOD is currently ignored; it is included + to be compatible with `completing-read'. If REQUIRE-MATCH is non-nil, the user is not allowed to exit unless the input is (or completes to) an element of CHOICES or is null. If the input is null, `ido-completing-read' returns DEF, or an empty diff --git a/src/ChangeLog b/src/ChangeLog index 5aee468d933..d5d1efebef8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-03-20 Leo + + * minibuf.c (completing-read-function): New variable. + (completing-read-default): Rename from completing-read. + (completing-read): Call completing-read-function. + 2011-03-19 Juanma Barranquero * xfaces.c (Fx_load_color_file): diff --git a/src/minibuf.c b/src/minibuf.c index 8ff861b2403..3fbe14e9da0 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -72,6 +72,8 @@ Lisp_Object Qcompletion_ignore_case; Lisp_Object Qminibuffer_completion_table; Lisp_Object Qminibuffer_completion_predicate; Lisp_Object Qminibuffer_completion_confirm; +Lisp_Object Qcompleting_read_default; +Lisp_Object Vcompleting_read_function; Lisp_Object Quser_variable_p; Lisp_Object Qminibuffer_default; @@ -1674,7 +1676,27 @@ If INHERIT-INPUT-METHOD is non-nil, the minibuffer inherits the current input method and the setting of `enable-multibyte-characters'. Completion ignores case if the ambient value of - `completion-ignore-case' is non-nil. */) + `completion-ignore-case' is non-nil. + +See also `completing-read-function'. */) + (Lisp_Object prompt, Lisp_Object collection, Lisp_Object predicate, Lisp_Object require_match, Lisp_Object initial_input, Lisp_Object hist, Lisp_Object def, Lisp_Object inherit_input_method) +{ + Lisp_Object args[9]; + args[0] = Vcompleting_read_function; + args[1] = prompt; + args[2] = collection; + args[3] = predicate; + args[4] = require_match; + args[5] = initial_input; + args[6] = hist; + args[7] = def; + args[8] = inherit_input_method; + return Ffuncall (9, args); +} + +DEFUN ("completing-read-default", Fcompleting_read_default, Scompleting_read_default, 2, 8, 0, + doc: /* Default method for reading from the minibuffer with completion. +See `completing-read' for the meaning of the arguments. */) (Lisp_Object prompt, Lisp_Object collection, Lisp_Object predicate, Lisp_Object require_match, Lisp_Object initial_input, Lisp_Object hist, Lisp_Object def, Lisp_Object inherit_input_method) { Lisp_Object val, histvar, histpos, position; @@ -1972,6 +1994,9 @@ syms_of_minibuf (void) minibuf_save_list = Qnil; staticpro (&minibuf_save_list); + Qcompleting_read_default = intern_c_string ("completing-read-default"); + staticpro (&Qcompleting_read_default); + Qcompletion_ignore_case = intern_c_string ("completion-ignore-case"); staticpro (&Qcompletion_ignore_case); @@ -2116,6 +2141,12 @@ If the value is `confirm-after-completion', the user may exit with an doc: /* Non-nil means completing file names. */); Vminibuffer_completing_file_name = Qnil; + DEFVAR_LISP ("completing-read-function", + &Vcompleting_read_function, + doc: /* The function called by `completing-read' to do the work. +It should accept the same arguments as `completing-read'. */); + Vcompleting_read_function = Qcompleting_read_default; + DEFVAR_LISP ("minibuffer-help-form", Vminibuffer_help_form, doc: /* Value that `help-form' takes on inside the minibuffer. */); Vminibuffer_help_form = Qnil; @@ -2191,4 +2222,5 @@ properties. */); defsubr (&Stest_completion); defsubr (&Sassoc_string); defsubr (&Scompleting_read); + defsubr (&Scompleting_read_default); } From 45b6f6d5cba8274c2e75d3cc7cd7a14f54a7b659 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sun, 20 Mar 2011 14:57:22 +0100 Subject: [PATCH 375/383] src/minibuf.c: Fix previous change. * minibuf.c (Vcompleting_read_function): Don't declare, global variables are now in src/globals.h. (syms_of_minibuf): Remove spurious & from previous change. --- src/ChangeLog | 6 ++++++ src/minibuf.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d5d1efebef8..95bafd023b4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-03-20 Juanma Barranquero + + * minibuf.c (Vcompleting_read_function): Don't declare, global variables + are now in src/globals.h. + (syms_of_minibuf): Remove spurious & from previous change. + 2011-03-20 Leo * minibuf.c (completing-read-function): New variable. diff --git a/src/minibuf.c b/src/minibuf.c index 3fbe14e9da0..b6b79be9d3f 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -73,7 +73,6 @@ Lisp_Object Qminibuffer_completion_table; Lisp_Object Qminibuffer_completion_predicate; Lisp_Object Qminibuffer_completion_confirm; Lisp_Object Qcompleting_read_default; -Lisp_Object Vcompleting_read_function; Lisp_Object Quser_variable_p; Lisp_Object Qminibuffer_default; @@ -2142,7 +2141,7 @@ If the value is `confirm-after-completion', the user may exit with an Vminibuffer_completing_file_name = Qnil; DEFVAR_LISP ("completing-read-function", - &Vcompleting_read_function, + Vcompleting_read_function, doc: /* The function called by `completing-read' to do the work. It should accept the same arguments as `completing-read'. */); Vcompleting_read_function = Qcompleting_read_default; From 1fe275ee28e8a37fdbbd6d6cf75f1b15b9674b4b Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 20 Mar 2011 15:59:29 -0500 Subject: [PATCH 376/383] * calc/calc-menu.el (calc-units-menu): Add entries for logarithmic units and musical notes. --- lisp/ChangeLog | 5 ++ lisp/calc/calc-menu.el | 105 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fe45788d888..b12445b466f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-20 Jay Belanger + + * calc/calc-menu.el (calc-units-menu): Add entries for logarithmic + units and musical notes. + 2011-03-20 Leo * ido.el (ido-read-internal): Use completing-read-default. diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el index aaddf3e486e..d8099b0aadc 100644 --- a/lisp/calc/calc-menu.el +++ b/lisp/calc/calc-menu.el @@ -960,6 +960,111 @@ (require 'calc-units) (call-interactively 'calc-view-units-table)) :keys "u V"] + (list "Logarithmic Units" + ["Convert (1:) to dB (power)" + (progn + (require 'calc-units) + (call-interactively 'calc-db)) + :keys "l d" + :active (>= (calc-stack-size) 1)] + ["Convert (2:) to dB (power) with reference level (1:)" + (progn + (require 'calc-units) + (let ((calc-option-flag t)) + (call-interactively 'calc-db))) + :keys "O l d" + :active (>= (calc-stack-size) 2)] + ["Convert (1:) to Np (power)" + (progn + (require 'calc-units) + (call-interactively 'calc-np)) + :keys "l n" + :active (>= (calc-stack-size) 1)] + ["Convert (2:) to Np (power) with reference level (1:)" + (progn + (require 'calc-units) + (let ((calc-option-flag t)) + (call-interactively 'calc-np))) + :keys "O l n" + :active (>= (calc-stack-size) 2)] + ["Convert (1:) to power quantity" + (progn + (require 'calc-units) + (call-interactively 'calc-lu-quant)) + :keys "l q" + :active (>= (calc-stack-size) 1)] + ["Convert (2:) to power quantity with reference level (1:)" + (progn + (require 'calc-units) + (let ((calc-option-flag t)) + (call-interactively 'calc-lu-quant))) + :keys "O l q" + :active (>= (calc-stack-size) 2)] + "----" + ["Convert (1:) to dB (field)" + (progn + (require 'calc-units) + (let ((calc-hyperbolic-flag t)) + (call-interactively 'calc-db))) + :keys "H l d" + :active (>= (calc-stack-size) 1)] + ["Convert (2:) to dB (field) with reference level (1:)" + (progn + (require 'calc-units) + (let ((calc-option-flag t) + (calc-hyperbolic-flag t)) + (call-interactively 'calc-db))) + :keys "O H l d" + :active (>= (calc-stack-size) 2)] + ["Convert (1:) to Np (field)" + (progn + (require 'calc-units) + (let ((calc-hyperbolic-flag t)) + (call-interactively 'calc-np))) + :keys "H l n" + :active (>= (calc-stack-size) 1)] + ["Convert (2:) to Np (field) with reference level (1:)" + (progn + (require 'calc-units) + (let ((calc-option-flag t) + (calc-hyperbolic-flag t)) + (call-interactively 'calc-np))) + :keys "O H l d" + :active (>= (calc-stack-size) 2)] + ["Convert (1:) to field quantity" + (progn + (require 'calc-units) + (let ((calc-hyperbolic-flag t)) + (call-interactively 'calc-lu-quant))) + :keys "H l q" + :active (>= (calc-stack-size) 1)] + ["Convert (2:) to field quantity with reference level (1:)" + (progn + (require 'calc-units) + (let ((calc-option-flag t) + (calc-hyperbolic-flag)) + (call-interactively 'calc-lu-quant))) + :keys "O H l q" + :active (>= (calc-stack-size) 2)]) + (list "Musical Notes" + ["Convert (1:) to scientific pitch notation" + (progn + (require 'calc-units) + (call-interactively 'calc-spn)) + :keys "l s" + :active (>= (calc-stack-size) 1)] + ["Convert (1:) to midi number" + (progn + (require 'calc-units) + (call-interactively 'calc-midi)) + :keys "l m" + :active (>= (calc-stack-size) 1)] + ["Convert (1:) to frequency" + (progn + (require 'calc-units) + (call-interactively 'calc-freq)) + :keys "l f" + :active (>= (calc-stack-size) 1)]) "----" ["Help on Units" (calc-info-goto-node "Units")]) From 66b874939b5acd59c76fa53373f2e41871ec1fef Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 20 Mar 2011 16:58:23 -0700 Subject: [PATCH 377/383] (Re)move autotools generated files from the repository. Ref: http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00225.html * autogen/: New directory, to be excluded from releases. * autogen/copy_autogen, autogen/update_autogen: New scripts. * autogen/README: New file. * autogen/aclocal.m4, autogen/config.in, autogen/configure: * autogen/Makefile.in: Add auto-updated generated files. * autogen.sh: No longer a no-op, now it tests for autotools and runs them as necessary. * configure.in: Defaule maintainer-mode to on. * aclocal.m4, configure, lib/Makefile.in: Remove files. * src/config.in: Remove file. * INSTALL.BZR, admin/make-tarball.txt: Update instructions. --- ChangeLog | 12 + INSTALL.BZR | 27 +- admin/make-tarball.txt | 9 +- autogen.sh | 208 +++++- {lib => autogen}/Makefile.in | 0 autogen/README | 14 + aclocal.m4 => autogen/aclocal.m4 | 4 +- {src => autogen}/config.in | 3 - configure => autogen/configure | 1191 ++++++++++++++---------------- autogen/copy_autogen | 20 + autogen/update_autogen | 180 +++++ configure.in | 2 +- src/ChangeLog | 4 + 13 files changed, 1034 insertions(+), 640 deletions(-) rename {lib => autogen}/Makefile.in (100%) create mode 100644 autogen/README rename aclocal.m4 => autogen/aclocal.m4 (99%) rename {src => autogen}/config.in (99%) rename configure => autogen/configure (94%) create mode 100755 autogen/copy_autogen create mode 100755 autogen/update_autogen diff --git a/ChangeLog b/ChangeLog index 7bb19e04ac1..a58a60465d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2011-03-20 Glenn Morris + + * autogen/: New directory, to be excluded from releases. + * autogen/copy_autogen, autogen/update_autogen: New scripts. + * autogen/README: New file. + * autogen/aclocal.m4, autogen/config.in, autogen/configure: + * autogen/Makefile.in: Add auto-updated generated files. + * autogen.sh: No longer a no-op, now it tests for autotools + and runs them as necessary. + * configure.in: Defaule maintainer-mode to on. + * aclocal.m4, configure, lib/Makefile.in: Remove files. + 2011-03-13 Paul Eggert Update for gnulib. diff --git a/INSTALL.BZR b/INSTALL.BZR index 710a73c7048..3859e3cd4fc 100644 --- a/INSTALL.BZR +++ b/INSTALL.BZR @@ -4,15 +4,30 @@ See the end of the file for license conditions. Building and Installing Emacs from Bazaar -If this is the first time you go through it, you'll need to configure -before bootstrapping: +Building Emacs from Bazaar requires some tools that are not needed +when building from a release. You will need: + +autoconf - at least the version specified near the start of + configure.in (in the AC_PREREQ command). +automake - we recommend at least version 1.11. +makeinfo - not strictly necessary, but highly recommended, so that + you can build the manuals. + +The `autogen.sh' script can help you figure out if you have the +necessary tools. + +The first time you build, there are a couple of extra steps. +First, generate the `configure' script: + + $ ./autogen.sh + +(or you can just run `autoreconf -I m4'). + +You can then configure your build (use `./configure --help' to see +options you can set): $ ./configure -(Normally there is no need to run `autoconf' etc. If you do need it, -the relevant command is `autoreconf -I m4'. Be aware that this will -likely lead to conflicts next time you update from Bazaar.) - Some of the files that are included in the Emacs tarball, such as byte-compiled Lisp files, are not stored in Bazaar. Therefore, to build from Bazaar you must run "make bootstrap" instead of just "make": diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 6a8072de06c..9c47d6e1fa2 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -28,11 +28,14 @@ For each step, check for possible errors. refer to a newer release of Emacs. (This is probably needed only when preparing a major Emacs release, or branching for it.) -5. autoreconf -I m4 --force +5. Edit configure.in so that maintainer-mode is off by default. + (FIXME - need to find a better way of dealing with this). + + autoreconf -I m4 --force make bootstrap -6. Commit configure, src/config.in, etc/AUTHORS, all the files changed - by M-x set-version, and lisp/cus-edit.el (if modified). +6. Commit etc/AUTHORS, all the files changed by M-x set-version, and + lisp/cus-edit.el (if modified). Copy lisp/loaddefs.el to lisp/ldefs-boot.el and commit lisp/ldefs-boot.el. For a release, also commit the ChangeLog files in all directories. diff --git a/autogen.sh b/autogen.sh index 52184c46f51..a56b8d77826 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,207 @@ #!/bin/sh +### autogen.sh - tool to help build Emacs from a bzr checkout -echo "Please read INSTALL.BZR for instructions on how to build Emacs from Bazaar." +## Copyright (C) 2011 Free Software Foundation, Inc. -# Exit with failure, since people may have generic build scripts that -# try things like "autogen.sh && ./configure && make". -exit 1 +## Author: Glenn Morris + +## This file is part of GNU Emacs. + +## GNU Emacs is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. + +## GNU Emacs is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## You should have received a copy of the GNU General Public License +## along with GNU Emacs. If not, see . + +### Commentary: + +## The Emacs bzr repository does not include the configure script +## (and associated helpers). The first time you fetch Emacs from bzr, +## run this script to generate the necessary files. +## For more details, see the file INSTALL.BZR. + +### Code: + +## Tools we need: +progs="autoconf automake" + +## Minimum versions we need: +autoconf_min=`sed -n 's/^ *AC_PREREQ(\([0-9\.]*\)).*/\1/p' configure.in` + +## FIXME how to determine this from the sources? +automake_min=1.11 + + +## $1 = program, eg "autoconf". +## Echo the version string, eg "2.59". +## FIXME does not handle things like "1.4a", but AFAIK those are +## all old versions, so it is OK to fail there. +## Also note that we do not handle micro versions. +get_version () +{ + $1 --version 2>&1 | sed -n '1 s/.* \([1-9][0-9\.]*\).*/\1/p' +} + +## $1 = version string, eg "2.59" +## Echo the major version, eg "2". +major_version () +{ + echo $1 | sed -e 's/\([0-9][0-9]*\)\..*/\1/' +} + +## $1 = version string, eg "2.59" +## Echo the minor version, eg "59". +minor_version () +{ + echo $1 | sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/' +} + +## $1 = program +## $2 = minimum version. +## Return 0 if program is present with version >= minumum version. +## Return 1 if program is missing. +## Return 2 if program is present but too old. +## Return 3 for unexpected error (eg failed to parse version). +check_version () +{ + have_version=`get_version $1` + + [ x"$have_version" = x ] && return 1 + + have_maj=`major_version $have_version` + need_maj=`major_version $2` + + [ x"$have_maj" != x ] && [ x"$need_maj" != x ] || return 3 + + [ $have_maj -gt $need_maj ] && return 0 + [ $have_maj -lt $need_maj ] && return 2 + + have_min=`minor_version $have_version` + need_min=`minor_version $2` + + [ x"$have_min" != x ] && [ x"$need_min" != x ] || return 3 + + [ $have_min -ge $need_min ] && return 0 + return 2 +} + + +cat <. */ # define __restrict__ #endif -/* Define to `unsigned int' if does not define. */ -#undef size_t - /* Define to any substitute for sys_siglist. */ #undef sys_siglist diff --git a/configure b/autogen/configure similarity index 94% rename from configure rename to autogen/configure index 57ecd9d52eb..2f19acbf347 100755 --- a/configure +++ b/autogen/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 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 @@ -89,7 +89,6 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -215,18 +214,11 @@ IFS=$as_save_IFS # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -324,7 +316,7 @@ $as_echo X"$as_dir" | 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 @@ -364,19 +356,19 @@ else 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 @@ -538,7 +530,7 @@ test -n "$DJDIR" || exec 7<&0 &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` @@ -1228,9 +1220,8 @@ do fi case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1275,7 +1266,7 @@ do 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 @@ -1301,7 +1292,7 @@ do 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 @@ -1505,7 +1496,7 @@ do 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 @@ -1521,7 +1512,7 @@ do 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 @@ -1551,8 +1542,8 @@ do | --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." ;; *=*) @@ -1560,7 +1551,7 @@ Try \`$0 --help' for more information" # 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 ;; @@ -1570,7 +1561,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac @@ -1578,13 +1569,13 @@ done 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 @@ -1607,7 +1598,7 @@ do [\\/$]* | ?:[\\/]* ) 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' @@ -1621,8 +1612,8 @@ target=$target_alias 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 @@ -1637,9 +1628,9 @@ test "$silent" = yes && exec 6>/dev/null 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. @@ -1678,11 +1669,11 @@ else 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 @@ -1722,7 +1713,7 @@ Configuration: --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 @@ -1944,9 +1935,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF emacs configure 24.0.50 -generated by GNU Autoconf 2.68 +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 @@ -1990,7 +1981,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -2016,7 +2007,7 @@ $as_echo "$ac_try_echo"; } >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { + test $ac_status = 0; } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -2027,7 +2018,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -2040,10 +2031,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; 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 \${$3+:} false; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2079,7 +2070,7 @@ if ac_fn_c_try_cpp "$LINENO"; then : else ac_header_preproc=no fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2106,7 +2097,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2115,7 +2106,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel @@ -2156,7 +2147,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -2170,7 +2161,7 @@ ac_fn_c_check_header_compile () 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 \${$3+:} false; 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 @@ -2188,7 +2179,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile @@ -2233,23 +2224,20 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link -# 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 \${$3+:} false; 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 @@ -2258,12 +2246,8 @@ $4 int main () { -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif +#ifndef $2 + (void) $2; #endif ; @@ -2280,7 +2264,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_decl @@ -2292,7 +2276,7 @@ ac_fn_c_check_header_preproc () 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 \${$3+:} false; 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 @@ -2304,12 +2288,12 @@ if ac_fn_c_try_cpp "$LINENO"; then : else eval "$3=no" fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_preproc @@ -2322,7 +2306,7 @@ ac_fn_c_check_member () 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 \${$4+:} false; 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 @@ -2366,7 +2350,7 @@ fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_member @@ -2378,7 +2362,7 @@ ac_fn_c_check_func () 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 \${$3+:} false; 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 @@ -2433,7 +2417,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func @@ -2446,7 +2430,7 @@ ac_fn_c_check_type () 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 \${$3+:} false; then : +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2487,7 +2471,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_type @@ -2664,7 +2648,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2673,7 +2657,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2783,9 +2767,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -2819,9 +2805,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + cat <<\_ASBOX +## ----------------- ## ## Output variables. ## -## ----------------- ##" +## ----------------- ## +_ASBOX echo for ac_var in $ac_subst_vars do @@ -2834,9 +2822,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + cat <<\_ASBOX +## ------------------- ## ## File substitutions. ## -## ------------------- ##" +## ------------------- ## +_ASBOX echo for ac_var in $ac_subst_files do @@ -2850,9 +2840,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; fi if test -s confdefs.h; then - $as_echo "## ----------- ## + cat <<\_ASBOX +## ----------- ## ## confdefs.h. ## -## ----------- ##" +## ----------- ## +_ASBOX echo cat confdefs.h echo @@ -2907,12 +2899,7 @@ _ACEOF 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 @@ -2927,11 +2914,7 @@ do { $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 @@ -3022,7 +3005,7 @@ if $ac_cache_corrupted; then $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. ## @@ -3042,22 +3025,16 @@ am__api_version='1.11' 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, @@ -3086,7 +3063,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : +if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3173,11 +3150,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3199,7 +3176,7 @@ if ( # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -3209,7 +3186,7 @@ then # Ok. : else - as_fn_error $? "newly created file is older than distributed files! + as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -3263,7 +3240,7 @@ if test "$cross_compiling" != no; then set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : +if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -3303,7 +3280,7 @@ if test -z "$ac_cv_prog_STRIP"; then set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3356,7 +3333,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : + if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3408,7 +3385,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : +if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3448,7 +3425,7 @@ done $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 \${ac_cv_prog_make_${ac_make}_set+:} false; 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 @@ -3456,7 +3433,7 @@ SHELL = /bin/sh 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;; @@ -3490,7 +3467,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -3693,7 +3670,7 @@ if test "${with_x_toolkit+set}" = set; then : 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 ;; @@ -4006,7 +3983,7 @@ do 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" @@ -4121,27 +4098,27 @@ fi # 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; } -if ${ac_cv_build+:} false; then : +if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias 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='-' @@ -4159,14 +4136,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : +if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then 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 @@ -4174,7 +4151,7 @@ fi $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='-' @@ -4428,7 +4405,7 @@ fi 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 @@ -4456,7 +4433,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4496,7 +4473,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4549,7 +4526,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4589,7 +4566,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4648,7 +4625,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : +if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -4692,7 +4669,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -4746,8 +4723,8 @@ fi 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 @@ -4861,8 +4838,9 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $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; } @@ -4904,8 +4882,8 @@ done 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 @@ -4962,9 +4940,9 @@ $as_echo "$ac_try_echo"; } >&5 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 @@ -4975,7 +4953,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : +if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5015,8 +4993,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $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 @@ -5026,7 +5004,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : +if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5063,7 +5041,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : +if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -5141,7 +5119,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : +if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -5302,7 +5280,7 @@ depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -5434,7 +5412,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : +if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5558,7 +5536,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : +if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -5598,7 +5576,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -5658,7 +5636,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -5688,7 +5666,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5704,11 +5682,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -5747,7 +5725,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -5763,18 +5741,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : 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 @@ -5786,7 +5764,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : +if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -5835,7 +5813,7 @@ esac 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 @@ -5849,7 +5827,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : +if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -5901,7 +5879,7 @@ esac 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 @@ -5916,7 +5894,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6033,7 +6011,8 @@ do : 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 @@ -6047,7 +6026,7 @@ done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = xyes; then : +if test "x$ac_cv_header_minix_config_h" = x""yes; then : MINIX=yes else MINIX= @@ -6077,7 +6056,7 @@ $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if ${ac_cv_safe_to_define___extensions__+:} false; then : +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6166,7 +6145,7 @@ if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \ test x"$CPP" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5 $as_echo_n "checking whether we are using a Sun C compiler... " >&6; } - if ${emacs_cv_sunpro_c+:} false; then : + if test "${emacs_cv_sunpro_c+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6334,7 +6313,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : + if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -6364,7 +6343,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6380,11 +6359,11 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -6423,7 +6402,7 @@ else # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -6439,18 +6418,18 @@ else ac_preproc_ok=: break fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : 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 @@ -6466,7 +6445,7 @@ if test "x$RANLIB" = x; then set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : +if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -6506,7 +6485,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -6561,7 +6540,7 @@ fi ## is running in i386 mode, we can help them out. if test "$machine" = "amdx86-64"; then ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default" -if test "x$ac_cv_have_decl_i386" = xyes; then : +if test "x$ac_cv_have_decl_i386" = x""yes; then : fi @@ -6576,7 +6555,7 @@ fi set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_INSTALL_INFO+:} false; then : +if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -6616,7 +6595,7 @@ fi set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_INSTALL_INFO+:} false; then : +if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -6656,7 +6635,7 @@ fi set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_INSTALL_INFO+:} false; then : +if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -6697,7 +6676,7 @@ fi set dummy gzip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GZIP_PROG+:} false; then : +if test "${ac_cv_path_GZIP_PROG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GZIP_PROG in @@ -6740,7 +6719,7 @@ fi set dummy makeinfo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MAKEINFO+:} false; then : +if test "${ac_cv_path_MAKEINFO+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAKEINFO in @@ -6798,7 +6777,7 @@ if test "$MAKEINFO" = "no"; then if test "x${with_makeinfo}" = "xno"; then HAVE_MAKEINFO=no 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 @@ -6946,7 +6925,7 @@ esac C_SWITCH_MACHINE= if test "$machine" = "alpha"; then ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default" -if test "x$ac_cv_have_decl___ELF__" = xyes; then : +if test "x$ac_cv_have_decl___ELF__" = x""yes; then : fi @@ -6959,7 +6938,7 @@ fi 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 @@ -7014,7 +6993,7 @@ if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } -if ${ac_cv_sys_largefile_CC+:} false; then : +if test "${ac_cv_sys_largefile_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no @@ -7065,7 +7044,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } -if ${ac_cv_sys_file_offset_bits+:} false; then : +if test "${ac_cv_sys_file_offset_bits+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do @@ -7134,7 +7113,7 @@ rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } -if ${ac_cv_sys_large_files+:} false; then : +if test "${ac_cv_sys_large_files+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do @@ -7235,7 +7214,7 @@ else ## 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 @@ -7290,7 +7269,8 @@ if test "${with_sound}" != "no"; then 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 @@ -7302,7 +7282,7 @@ done # Emulation library used on NetBSD. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5 $as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; } -if ${ac_cv_lib_ossaudio__oss_ioctl+:} false; then : +if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7336,7 +7316,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5 $as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; } -if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes; then : +if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then : LIBSOUND=-lossaudio else LIBSOUND= @@ -7353,7 +7333,7 @@ fi set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -7481,7 +7461,7 @@ else 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 @@ -7516,7 +7496,8 @@ for ac_header in sys/select.h sys/time.h unistd.h utime.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 @@ -7557,7 +7538,7 @@ fi for ac_header in term.h do : ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h" -if test "x$ac_cv_header_term_h" = xyes; then : +if test "x$ac_cv_header_term_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TERM_H 1 _ACEOF @@ -7568,7 +7549,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : +if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7680,7 +7661,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : +if test "${ac_cv_header_time+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7714,7 +7695,7 @@ $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl_sys_siglist" = xyes; then : +if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 @@ -7727,7 +7708,7 @@ _ACEOF if test $ac_cv_have_decl_sys_siglist != yes; then # For Tru64, at least: ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default" -if test "x$ac_cv_have_decl___sys_siglist" = xyes; then : +if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 @@ -7745,7 +7726,7 @@ $as_echo "#define sys_siglist __sys_siglist" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if ${ac_cv_header_sys_wait_h+:} false; then : +if test "${ac_cv_header_sys_wait_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7787,7 +7768,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 $as_echo_n "checking for struct utimbuf... " >&6; } -if ${emacs_cv_struct_utimbuf+:} false; then : +if test "${emacs_cv_struct_utimbuf+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7830,7 +7811,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if ${ac_cv_type_signal+:} false; then : +if test "${ac_cv_type_signal+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7864,7 +7845,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5 $as_echo_n "checking for speed_t... " >&6; } -if ${emacs_cv_speed_t+:} false; then : +if test "${emacs_cv_speed_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7895,7 +7876,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 $as_echo_n "checking for struct timeval... " >&6; } -if ${emacs_cv_struct_timeval+:} false; then : +if test "${emacs_cv_struct_timeval+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7936,7 +7917,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5 $as_echo_n "checking for struct exception... " >&6; } -if ${emacs_cv_struct_exception+:} false; then : +if test "${emacs_cv_struct_exception+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7969,7 +7950,7 @@ fi for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = xyes; then : +if test "x$ac_cv_header_sys_socket_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF @@ -7985,7 +7966,7 @@ do : #include #endif " -if test "x$ac_cv_header_net_if_h" = xyes; then : +if test "x$ac_cv_header_net_if_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NET_IF_H 1 _ACEOF @@ -7997,7 +7978,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if ${ac_cv_struct_tm+:} false; then : +if test "${ac_cv_struct_tm+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8034,7 +8015,7 @@ ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_ #include <$ac_cv_struct_tm> " -if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : +if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 @@ -8050,7 +8031,7 @@ $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " -if test "x$ac_cv_have_decl_tzname" = xyes; then : +if test "x$ac_cv_have_decl_tzname" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 @@ -8062,7 +8043,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } -if ${ac_cv_var_tzname+:} false; then : +if test "${ac_cv_var_tzname+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8099,7 +8080,7 @@ fi ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include " -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h @@ -8113,7 +8094,7 @@ ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_i #include #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_flags" = xyes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_FLAGS 1 @@ -8129,7 +8110,7 @@ ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ #include #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = xyes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 @@ -8145,7 +8126,7 @@ ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct #include #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = xyes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_NETMASK 1 @@ -8161,7 +8142,7 @@ ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_stru #include #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = xyes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1 @@ -8177,7 +8158,7 @@ ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_if #include #endif " -if test "x$ac_cv_member_struct_ifreq_ifr_addr" = xyes; then : +if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_ADDR 1 @@ -8206,7 +8187,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } -if ${ac_cv_c_volatile+:} false; then : +if test "${ac_cv_c_volatile+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8240,7 +8221,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if ${ac_cv_c_const+:} false; then : +if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8320,7 +8301,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5 $as_echo_n "checking for void * support... " >&6; } -if ${emacs_cv_void_star+:} false; then : +if test "${emacs_cv_void_star+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8353,7 +8334,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : +if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -8571,14 +8552,14 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - as_fn_error $? "unknown endianness + as_fn_error "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5 $as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; } -if ${emacs_cv_attribute_aligned+:} false; then : +if test "${emacs_cv_attribute_aligned+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8611,7 +8592,7 @@ fi $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 \${ac_cv_prog_make_${ac_make}_set+:} false; 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 @@ -8619,7 +8600,7 @@ SHELL = /bin/sh 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;; @@ -8699,7 +8680,7 @@ deps_frag=$srcdir/src/$deps_frag { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 $as_echo_n "checking for long file names... " >&6; } -if ${ac_cv_sys_long_file_names+:} false; then : +if test "${ac_cv_sys_long_file_names+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_long_file_names=yes @@ -8755,8 +8736,8 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : + *\'*) 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 # One or both of the vars are not set, and there is no cached value. @@ -8773,7 +8754,7 @@ libdir: @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 @@ -8859,7 +8840,7 @@ else fi done fi -rm -f conftest.err conftest.i conftest.$ac_ext +rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -9039,10 +9020,10 @@ if test "${with_ns}" != no; then TEMACS_LDFLAGS2= fi ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default" -if test "x$ac_cv_header_AppKit_AppKit_h" = xyes; then : +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 @@ -9124,7 +9105,7 @@ if test "$window_system" = none && test "X$with_x" != "Xno"; then set dummy X; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_XSERVER+:} false; then : +if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$HAVE_XSERVER"; then @@ -9161,7 +9142,7 @@ fi 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. @@ -9183,14 +9164,14 @@ esac GNU_MALLOC=yes doug_lea_malloc=yes ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state" -if test "x$ac_cv_func_malloc_get_state" = xyes; then : +if test "x$ac_cv_func_malloc_get_state" = x""yes; then : else doug_lea_malloc=no fi ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state" -if test "x$ac_cv_func_malloc_set_state" = xyes; then : +if test "x$ac_cv_func_malloc_set_state" = x""yes; then : else doug_lea_malloc=no @@ -9198,7 +9179,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5 $as_echo_n "checking whether __after_morecore_hook exists... " >&6; } -if ${emacs_cv_var___after_morecore_hook+:} false; then : +if test "${emacs_cv_var___after_morecore_hook+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9284,7 +9265,8 @@ do : 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 @@ -9303,7 +9285,7 @@ done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = xyes; then : +if test "x$ac_cv_func_getpagesize" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF @@ -9313,7 +9295,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } -if ${ac_cv_func_mmap_fixed_mapped+:} false; then : +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -9488,7 +9470,7 @@ LIBS="$LIBS_SYSTEM $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9522,7 +9504,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : +if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNET 1 _ACEOF @@ -9534,7 +9516,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5 $as_echo_n "checking for main in -lXbsd... " >&6; } -if ${ac_cv_lib_Xbsd_main+:} false; then : +if test "${ac_cv_lib_Xbsd_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9562,14 +9544,14 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5 $as_echo "$ac_cv_lib_Xbsd_main" >&6; } -if test "x$ac_cv_lib_Xbsd_main" = xyes; then : +if test "x$ac_cv_lib_Xbsd_main" = x""yes; then : LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5 $as_echo_n "checking for cma_open in -lpthreads... " >&6; } -if ${ac_cv_lib_pthreads_cma_open+:} false; then : +if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9603,7 +9585,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5 $as_echo "$ac_cv_lib_pthreads_cma_open" >&6; } -if test "x$ac_cv_lib_pthreads_cma_open" = xyes; then : +if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREADS 1 _ACEOF @@ -9630,7 +9612,7 @@ case ${host_os} in aix*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 $as_echo_n "checking for -bbigtoc option... " >&6; } -if ${gdb_cv_bigtoc+:} false; then : +if test "${gdb_cv_bigtoc+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -9791,7 +9773,8 @@ XScreenNumberOfScreen XSetWMProtocols 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 @@ -9804,7 +9787,7 @@ fi if test "${window_system}" = "x11"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5 $as_echo_n "checking X11 version 6... " >&6; } - if ${emacs_cv_x11_version_6+:} false; then : + if test "${emacs_cv_x11_version_6+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9869,7 +9852,7 @@ if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -9980,7 +9963,7 @@ if test "${HAVE_X11}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10079,7 +10062,7 @@ $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h for ac_func in MagickExportImagePixels do : ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels" -if test "x$ac_cv_func_MagickExportImagePixels" = xyes; then : +if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MAGICKEXPORTIMAGEPIXELS 1 _ACEOF @@ -10105,7 +10088,7 @@ if test "${with_gtk3}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10193,7 +10176,7 @@ $as_echo "no" >&6; } 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 $as_echo "#define HAVE_GTK3 1" >>confdefs.h @@ -10214,7 +10197,7 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10302,7 +10285,7 @@ $as_echo "no" >&6; } 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 @@ -10319,7 +10302,7 @@ if test x"$pkg_check_gtk" = xyes; then for ac_func in gtk_main do : ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main" -if test "x$ac_cv_func_gtk_main" = xyes; then : +if test "x$ac_cv_func_gtk_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GTK_MAIN 1 _ACEOF @@ -10329,7 +10312,7 @@ done 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 @@ -10367,7 +10350,7 @@ if test "${HAVE_GTK}" = "yes"; then ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default #include " -if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = xyes; then : +if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : HAVE_GTK_FILE_SELECTION=yes else HAVE_GTK_FILE_SELECTION=no @@ -10377,7 +10360,7 @@ fi for ac_func in gtk_file_selection_new do : ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" -if test "x$ac_cv_func_gtk_file_selection_new" = xyes; then : +if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GTK_FILE_SELECTION_NEW 1 _ACEOF @@ -10391,7 +10374,7 @@ done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes; then : +if test "x$ac_cv_header_pthread_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF @@ -10403,7 +10386,7 @@ done if test "$ac_cv_header_pthread_h"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5 $as_echo_n "checking for pthread_self in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_self+:} false; then : +if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10437,7 +10420,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5 $as_echo "$ac_cv_lib_pthread_pthread_self" >&6; } -if test "x$ac_cv_lib_pthread_pthread_self" = xyes; then : +if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then : HAVE_GTK_AND_PTHREAD=yes fi @@ -10459,7 +10442,8 @@ $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h 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 @@ -10480,7 +10464,7 @@ if test "${with_dbus}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10575,7 +10559,7 @@ $as_echo "#define HAVE_DBUS 1" >>confdefs.h for ac_func in dbus_watch_get_unix_fd do : ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd" -if test "x$ac_cv_func_dbus_watch_get_unix_fd" = xyes; then : +if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DBUS_WATCH_GET_UNIX_FD 1 _ACEOF @@ -10597,7 +10581,7 @@ if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10691,7 +10675,7 @@ $as_echo "#define HAVE_GCONF 1" >>confdefs.h for ac_func in g_type_init do : ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" -if test "x$ac_cv_func_g_type_init" = xyes; then : +if test "x$ac_cv_func_g_type_init" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_G_TYPE_INIT 1 _ACEOF @@ -10707,7 +10691,7 @@ LIBSELINUX_LIBS= if test "${with_selinux}" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5 $as_echo_n "checking for lgetfilecon in -lselinux... " >&6; } -if ${ac_cv_lib_selinux_lgetfilecon+:} false; then : +if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10741,7 +10725,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5 $as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; } -if test "x$ac_cv_lib_selinux_lgetfilecon" = xyes; then : +if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then : HAVE_LIBSELINUX=yes else HAVE_LIBSELINUX=no @@ -10765,7 +10749,7 @@ if test "${with_gnutls}" = "yes" ; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -10867,7 +10851,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then if test "$with_xaw3d" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5 $as_echo_n "checking for xaw3d... " >&6; } - if ${emacs_cv_xaw3d+:} false; then : + if test "${emacs_cv_xaw3d+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10886,7 +10870,7 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5 $as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; } -if ${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+:} false; then : +if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10920,7 +10904,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5 $as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; } -if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = xyes; then : +if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then : emacs_cv_xaw3d=yes else emacs_cv_xaw3d=no @@ -10950,7 +10934,7 @@ $as_echo "#define HAVE_XAW3D 1" >>confdefs.h $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5 $as_echo_n "checking for libXaw... " >&6; } - if ${emacs_cv_xaw+:} false; then : + if test "${emacs_cv_xaw+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10981,7 +10965,7 @@ $as_echo "yes; using Lucid toolkit" >&6; } 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; } @@ -10996,7 +10980,7 @@ LIBXTR6= if test "${USE_X_TOOLKIT}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5 $as_echo_n "checking X11 toolkit version... " >&6; } - if ${emacs_cv_x11_toolkit_version_6+:} false; then : + if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11047,7 +11031,7 @@ $as_echo "before 6" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5 $as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; } -if ${ac_cv_lib_Xmu_XmuConvertStandardSelection+:} false; then : +if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11081,7 +11065,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5 $as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; } -if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = xyes; then : +if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXMU 1 _ACEOF @@ -11108,7 +11092,7 @@ if test "${HAVE_X11}" = "yes"; then if test "${USE_X_TOOLKIT}" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5 $as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; } -if ${ac_cv_lib_Xext_XShapeQueryExtension+:} false; then : +if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11142,7 +11126,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5 $as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; } -if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes; then : +if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXEXT 1 _ACEOF @@ -11158,7 +11142,7 @@ LIBXP= if test "${USE_X_TOOLKIT}" = "MOTIF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5 $as_echo_n "checking for Motif version 2.1... " >&6; } -if ${emacs_cv_motif_version_2_1+:} false; then : +if test "${emacs_cv_motif_version_2_1+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11188,7 +11172,7 @@ $as_echo "$emacs_cv_motif_version_2_1" >&6; } if test $emacs_cv_motif_version_2_1 = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5 $as_echo_n "checking for XpCreateContext in -lXp... " >&6; } -if ${ac_cv_lib_Xp_XpCreateContext+:} false; then : +if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11222,14 +11206,14 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5 $as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; } -if test "x$ac_cv_lib_Xp_XpCreateContext" = xyes; then : +if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then : LIBXP=-lXp fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5 $as_echo_n "checking for LessTif where some systems put it... " >&6; } -if ${emacs_cv_lesstif+:} false; then : +if test "${emacs_cv_lesstif+set}" = set; then : $as_echo_n "(cached) " >&6 else # We put this in CFLAGS temporarily to precede other -I options @@ -11388,7 +11372,7 @@ if test "${HAVE_X11}" = "yes"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -11490,7 +11474,7 @@ $as_echo "no" >&6; } set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -11582,7 +11566,7 @@ $as_echo "no" >&6; } HAVE_XRENDER=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5 $as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; } -if ${ac_cv_lib_Xrender_XRenderQueryExtension+:} false; then : +if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11616,7 +11600,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5 $as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; } -if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = xyes; then : +if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then : HAVE_XRENDER=yes fi @@ -11629,10 +11613,10 @@ fi XFT_LIBS="-lXrender $XFT_LIBS" LIBS="$XFT_LIBS $LIBS" ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_Xft_Xft_h" = xyes; then : +if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5 $as_echo_n "checking for XftFontOpen in -lXft... " >&6; } -if ${ac_cv_lib_Xft_XftFontOpen+:} false; then : +if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11666,7 +11650,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5 $as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; } -if test "x$ac_cv_lib_Xft_XftFontOpen" = xyes; then : +if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then : HAVE_XFT=yes fi @@ -11701,7 +11685,7 @@ $as_echo "#define HAVE_XFT 1" >>confdefs.h set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -11789,7 +11773,7 @@ $as_echo "no" >&6; } fi - test "$HAVE_FREETYPE" = "no" && as_fn_error $? "libxft requires libfreetype" "$LINENO" 5 + test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5 fi HAVE_LIBOTF=no @@ -11805,7 +11789,7 @@ $as_echo "#define HAVE_FREETYPE 1" >>confdefs.h set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -11898,7 +11882,7 @@ $as_echo "#define HAVE_LIBOTF 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5 $as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; } -if ${ac_cv_lib_otf_OTF_get_variation_glyphs+:} false; then : +if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -11932,7 +11916,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5 $as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; } -if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = xyes; then : +if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then : HAVE_OTF_GET_VARIATION_GLYPHS=yes else HAVE_OTF_GET_VARIATION_GLYPHS=no @@ -11957,7 +11941,7 @@ $as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -12075,10 +12059,10 @@ LIBXPM= if test "${HAVE_X11}" = "yes"; then if test "${with_xpm}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_xpm_h" = xyes; then : +if test "x$ac_cv_header_X11_xpm_h" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5 $as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; } -if ${ac_cv_lib_Xpm_XpmReadFileToPixmap+:} false; then : +if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12112,7 +12096,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5 $as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; } -if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = xyes; then : +if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then : HAVE_XPM=yes fi @@ -12164,10 +12148,10 @@ LIBJPEG= if test "${HAVE_X11}" = "yes"; then if test "${with_jpeg}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default" -if test "x$ac_cv_header_jerror_h" = xyes; then : +if test "x$ac_cv_header_jerror_h" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5 $as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; } -if ${ac_cv_lib_jpeg_jpeg_destroy_compress+:} false; then : +if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12201,7 +12185,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; } -if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then : +if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then : HAVE_JPEG=yes fi @@ -12248,7 +12232,8 @@ if test "${HAVE_X11}" = "yes"; then 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 @@ -12260,7 +12245,7 @@ done if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5 $as_echo_n "checking for png_get_channels in -lpng... " >&6; } -if ${ac_cv_lib_png_png_get_channels+:} false; then : +if test "${ac_cv_lib_png_png_get_channels+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12294,7 +12279,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5 $as_echo "$ac_cv_lib_png_png_get_channels" >&6; } -if test "x$ac_cv_lib_png_png_get_channels" = xyes; then : +if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then : HAVE_PNG=yes fi @@ -12316,13 +12301,13 @@ LIBTIFF= if test "${HAVE_X11}" = "yes"; then if test "${with_tiff}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" -if test "x$ac_cv_header_tiffio_h" = xyes; then : +if test "x$ac_cv_header_tiffio_h" = x""yes; then : tifflibs="-lz -lm" # At least one tiff package requires the jpeg library. if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5 $as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; } -if ${ac_cv_lib_tiff_TIFFGetVersion+:} false; then : +if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12356,7 +12341,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5 $as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; } -if test "x$ac_cv_lib_tiff_TIFFGetVersion" = xyes; then : +if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then : HAVE_TIFF=yes fi @@ -12379,12 +12364,12 @@ HAVE_GIF=no LIBGIF= if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" -if test "x$ac_cv_header_gif_lib_h" = xyes; then : +if test "x$ac_cv_header_gif_lib_h" = x""yes; then : # EGifPutExtensionLast only exists from version libungif-4.1.0b1. # Earlier versions can crash Emacs. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5 $as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; } -if ${ac_cv_lib_gif_EGifPutExtensionLast+:} false; then : +if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12418,7 +12403,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5 $as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; } -if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = xyes; then : +if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then : HAVE_GIF=yes else HAVE_GIF=maybe @@ -12434,7 +12419,7 @@ fi # If gif_lib.h but no libgif, try libungif. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5 $as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; } -if ${ac_cv_lib_ungif_EGifPutExtensionLast+:} false; then : +if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12468,7 +12453,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5 $as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; } -if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = xyes; then : +if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then : HAVE_GIF=yes else HAVE_GIF=no @@ -12500,7 +12485,7 @@ if test "${HAVE_X11}" = "yes"; then 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 @@ -12515,10 +12500,10 @@ LIBGPM= MOUSE_SUPPORT= if test "${with_gpm}" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default" -if test "x$ac_cv_header_gpm_h" = xyes; then : +if test "x$ac_cv_header_gpm_h" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5 $as_echo_n "checking for Gpm_Open in -lgpm... " >&6; } -if ${ac_cv_lib_gpm_Gpm_Open+:} false; then : +if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12552,7 +12537,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5 $as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; } -if test "x$ac_cv_lib_gpm_Gpm_Open" = xyes; then : +if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then : HAVE_GPM=yes fi @@ -12572,7 +12557,7 @@ fi ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default" -if test "x$ac_cv_header_malloc_malloc_h" = xyes; then : +if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then : $as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h @@ -12617,10 +12602,10 @@ HAVE_X_SM=no LIBXSM= if test "${HAVE_X11}" = "yes"; then ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default" -if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes; then : +if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5 $as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; } -if ${ac_cv_lib_SM_SmcOpenConnection+:} false; then : +if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12654,7 +12639,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5 $as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; } -if test "x$ac_cv_lib_SM_SmcOpenConnection" = xyes; then : +if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then : HAVE_X_SM=yes fi @@ -12685,7 +12670,7 @@ if test "${with_xml2}" != "no"; then set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -12776,7 +12761,7 @@ $as_echo "no" >&6; } LIBS="$LIBXML2_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5 $as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; } -if ${ac_cv_lib_xml2_htmlReadMemory+:} false; then : +if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -12810,7 +12795,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5 $as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; } -if test "x$ac_cv_lib_xml2_htmlReadMemory" = xyes; then : +if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then : HAVE_LIBXML2=yes else HAVE_LIBXML2=no @@ -12832,7 +12817,7 @@ fi # If netdb.h doesn't declare h_errno, we must declare it by hand. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5 $as_echo_n "checking whether netdb declares h_errno... " >&6; } -if ${emacs_cv_netdb_declares_h_errno+:} false; then : +if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12862,22 +12847,11 @@ $as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h fi -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if ${ac_cv_working_alloca_h+:} false; then : +if test "${ac_cv_working_alloca_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12910,7 +12884,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } -if ${ac_cv_func_alloca_works+:} false; then : +if test "${ac_cv_func_alloca_works+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12929,7 +12903,7 @@ else #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (size_t); +char *alloca (); # endif # endif # endif @@ -12973,7 +12947,7 @@ $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if ${ac_cv_os_cray+:} false; then : +if test "${ac_cv_os_cray+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13000,7 +12974,8 @@ if test $ac_cv_os_cray = yes; then 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 @@ -13014,7 +12989,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } -if ${ac_cv_c_stack_direction+:} false; then : +if test "${ac_cv_c_stack_direction+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -13064,14 +13039,14 @@ fi 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. # On HPUX 9.01, -lm does not contain logb, so check for sqrt. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } -if ${ac_cv_lib_m_sqrt+:} false; then : +if test "${ac_cv_lib_m_sqrt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13105,7 +13080,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test "x$ac_cv_lib_m_sqrt" = xyes; then : +if test "x$ac_cv_lib_m_sqrt" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -13119,7 +13094,7 @@ fi # have the same check as for liblockfile below. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5 $as_echo_n "checking for maillock in -lmail... " >&6; } -if ${ac_cv_lib_mail_maillock+:} false; then : +if test "${ac_cv_lib_mail_maillock+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13153,7 +13128,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5 $as_echo "$ac_cv_lib_mail_maillock" >&6; } -if test "x$ac_cv_lib_mail_maillock" = xyes; then : +if test "x$ac_cv_lib_mail_maillock" = x""yes; then : have_mail=yes else have_mail=no @@ -13170,7 +13145,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5 $as_echo_n "checking for maillock in -llockfile... " >&6; } -if ${ac_cv_lib_lockfile_maillock+:} false; then : +if test "${ac_cv_lib_lockfile_maillock+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -13204,7 +13179,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5 $as_echo "$ac_cv_lib_lockfile_maillock" >&6; } -if test "x$ac_cv_lib_lockfile_maillock" = xyes; then : +if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then : have_lockfile=yes else have_lockfile=no @@ -13224,7 +13199,7 @@ else set dummy liblockfile.so; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_liblockfile+:} false; then : +if test "${ac_cv_prog_liblockfile+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$liblockfile"; then @@ -13260,7 +13235,7 @@ fi 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 @@ -13268,7 +13243,7 @@ fi for ac_func in touchlock do : ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock" -if test "x$ac_cv_func_touchlock" = xyes; then : +if test "x$ac_cv_func_touchlock" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TOUCHLOCK 1 _ACEOF @@ -13279,7 +13254,7 @@ done for ac_header in maillock.h do : ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default" -if test "x$ac_cv_header_maillock_h" = xyes; then : +if test "x$ac_cv_header_maillock_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MAILLOCK_H 1 _ACEOF @@ -13349,7 +13324,8 @@ cfmakeraw cfsetspeed isnan copysign __executable_start 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 @@ -13360,7 +13336,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5 $as_echo_n "checking for __builtin_unwind_init... " >&6; } -if ${emacs_cv_func___builtin_unwind_init+:} false; then : +if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13393,7 +13369,7 @@ fi for ac_header in sys/un.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_un_h" = xyes; then : +if test "x$ac_cv_header_sys_un_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_UN_H 1 _ACEOF @@ -13405,7 +13381,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } -if ${ac_cv_sys_largefile_source+:} false; then : +if test "${ac_cv_sys_largefile_source+set}" = set; then : $as_echo_n "(cached) " >&6 else while :; do @@ -13474,7 +13450,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; } -if ${ac_cv_func_getpgrp_void+:} false; then : +if test "${ac_cv_func_getpgrp_void+set}" = set; then : $as_echo_n "(cached) " >&6 else # Use it with a single arg. @@ -13523,7 +13499,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : +if test "${ac_cv_c_bigendian+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -13741,14 +13717,14 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) - as_fn_error $? "unknown endianness + as_fn_error "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : +if test "${ac_cv_c_inline+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -13791,7 +13767,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5 $as_echo_n "checking whether strtold conforms to C99... " >&6; } -if ${gl_cv_func_c99_strtold+:} false; then : +if test "${gl_cv_func_c99_strtold+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13834,7 +13810,7 @@ $as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; } -if ${ac_cv_struct_st_dm_mode+:} false; then : +if test "${ac_cv_struct_st_dm_mode+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -13868,7 +13844,7 @@ $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default" -if test "x$ac_cv_have_decl_strmode" = xyes; then : +if test "x$ac_cv_have_decl_strmode" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 @@ -14057,7 +14033,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; } -if ${gl_cv_have_include_next+:} false; then : +if test "${gl_cv_have_include_next+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -rf conftestd1a conftestd1b conftestd2 @@ -14137,7 +14113,7 @@ $as_echo "$gl_cv_have_include_next" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 $as_echo_n "checking whether system header files limit the line length... " >&6; } -if ${gl_cv_pragma_columns+:} false; then : +if test "${gl_cv_pragma_columns+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14187,7 +14163,7 @@ $as_echo "$gl_cv_pragma_columns" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_getopt_h+:} false; then : +if test "${gl_cv_next_getopt_h+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -14246,7 +14222,7 @@ $as_echo "$gl_cv_next_getopt_h" >&6; } for ac_header in getopt.h do : ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = xyes; then : +if test "x$ac_cv_header_getopt_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_H 1 _ACEOF @@ -14263,7 +14239,7 @@ done for ac_func in getopt_long_only do : ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" -if test "x$ac_cv_func_getopt_long_only" = xyes; then : +if test "x$ac_cv_func_getopt_long_only" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_LONG_ONLY 1 _ACEOF @@ -14278,7 +14254,7 @@ done if test -z "$gl_replace_getopt"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } -if ${gl_cv_func_getopt_posix+:} false; then : +if test "${gl_cv_func_getopt_posix+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -14436,7 +14412,7 @@ $as_echo "$gl_cv_func_getopt_posix" >&6; } if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 $as_echo_n "checking for working GNU getopt function... " >&6; } -if ${gl_cv_func_getopt_gnu+:} false; then : +if test "${gl_cv_func_getopt_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the @@ -14548,7 +14524,7 @@ $as_echo "$gl_cv_func_getopt_gnu" >&6; } fi ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_getenv" = xyes; then : +if test "x$ac_cv_have_decl_getenv" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 @@ -14643,7 +14619,8 @@ fi 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 @@ -14656,7 +14633,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : +if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file @@ -14786,7 +14763,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if ${ac_cv_header_stdbool_h+:} false; then : +if test "${ac_cv_header_stdbool_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14861,7 +14838,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = xyes; then : +if test "x$ac_cv_type__Bool" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 @@ -14879,7 +14856,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 $as_echo_n "checking for wchar_t... " >&6; } -if ${gt_cv_c_wchar_t+:} false; then : +if test "${gt_cv_c_wchar_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14912,7 +14889,7 @@ $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } -if ${ac_cv_type_unsigned_long_long_int+:} false; then : +if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_type_unsigned_long_long_int=yes @@ -14970,7 +14947,7 @@ $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 $as_echo_n "checking for long long int... " >&6; } -if ${ac_cv_type_long_long_int+:} false; then : +if test "${ac_cv_type_long_long_int+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_type_long_long_int=yes @@ -15033,7 +15010,7 @@ $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include " -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h @@ -15046,7 +15023,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if ${ac_cv_header_stat_broken+:} false; then : +if test "${ac_cv_header_stat_broken+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15090,7 +15067,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if ${ac_cv_c_restrict+:} false; then : +if test "${ac_cv_c_restrict+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no @@ -15140,7 +15117,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } -if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : +if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15173,7 +15150,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } -if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : +if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15202,7 +15179,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 $as_echo_n "checking for struct timespec in ... " >&6; } -if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : +if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15251,7 +15228,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_time_h+:} false; then : +if test "${gl_cv_next_time_h+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -15294,7 +15271,7 @@ $as_echo "$gl_cv_next_time_h" >&6; } ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_localtime_r" = xyes; then : +if test "x$ac_cv_have_decl_localtime_r" = x""yes; then : ac_have_decl=1 else ac_have_decl=0 @@ -15375,14 +15352,14 @@ fi # Make sure getloadavg.c is where it belongs, at configure-time. test -f "$srcdir/$gl_source_base/getloadavg.c" || - as_fn_error $? "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5 + as_fn_error "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5 gl_save_LIBS=$LIBS # getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0, # NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7. ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" -if test "x$ac_cv_func_getloadavg" = xyes; then : +if test "x$ac_cv_func_getloadavg" = x""yes; then : else gl_have_func=no @@ -15395,7 +15372,7 @@ else if test $gl_have_func = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5 $as_echo_n "checking for elf_begin in -lelf... " >&6; } -if ${ac_cv_lib_elf_elf_begin+:} false; then : +if test "${ac_cv_lib_elf_elf_begin+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15429,13 +15406,13 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5 $as_echo "$ac_cv_lib_elf_elf_begin" >&6; } -if test "x$ac_cv_lib_elf_elf_begin" = xyes; then : +if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then : LIBS="-lelf $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 $as_echo_n "checking for kvm_open in -lkvm... " >&6; } -if ${ac_cv_lib_kvm_kvm_open+:} false; then : +if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15469,14 +15446,14 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } -if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then : +if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then : LIBS="-lkvm $LIBS" fi # Check for the 4.4BSD definition of getloadavg. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5 $as_echo_n "checking for getloadavg in -lutil... " >&6; } -if ${ac_cv_lib_util_getloadavg+:} false; then : +if test "${ac_cv_lib_util_getloadavg+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15510,7 +15487,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5 $as_echo "$ac_cv_lib_util_getloadavg" >&6; } -if test "x$ac_cv_lib_util_getloadavg" = xyes; then : +if test "x$ac_cv_lib_util_getloadavg" = x""yes; then : LIBS="-lutil $LIBS" gl_have_func=yes fi @@ -15523,7 +15500,7 @@ fi LIBS="-L/usr/local/lib $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5 $as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; } -if ${ac_cv_lib_getloadavg_getloadavg+:} false; then : +if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15557,7 +15534,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5 $as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; } -if test "x$ac_cv_lib_getloadavg_getloadavg" = xyes; then : +if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then : LIBS="-lgetloadavg $LIBS" gl_have_func=yes else LIBS=$gl_getloadavg_LIBS @@ -15583,7 +15560,7 @@ fi # Solaris has libkstat which does not require root. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 $as_echo_n "checking for kstat_open in -lkstat... " >&6; } -if ${ac_cv_lib_kstat_kstat_open+:} false; then : +if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15617,7 +15594,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } -if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : +if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBKSTAT 1 _ACEOF @@ -15633,7 +15610,7 @@ if test $gl_have_func = no; then for ac_func in pstat_getdynamic do : ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic" -if test "x$ac_cv_func_pstat_getdynamic" = xyes; then : +if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PSTAT_GETDYNAMIC 1 _ACEOF @@ -15647,7 +15624,7 @@ fi if test $gl_have_func = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5 $as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; } -if ${ac_cv_lib_perfstat_perfstat_cpu_total+:} false; then : +if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15681,7 +15658,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5 $as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; } -if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = xyes; then : +if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPERFSTAT 1 _ACEOF @@ -15695,14 +15672,14 @@ fi if test $gl_have_func = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_dg_sys_info_h" = xyes; then : +if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then : gl_have_func=yes $as_echo "#define DGUX 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5 $as_echo_n "checking for dg_sys_info in -ldgc... " >&6; } -if ${ac_cv_lib_dgc_dg_sys_info+:} false; then : +if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15736,7 +15713,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5 $as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; } -if test "x$ac_cv_lib_dgc_dg_sys_info" = xyes; then : +if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDGC 1 _ACEOF @@ -15763,7 +15740,7 @@ fi if test $gl_have_func = no; then ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_inq_stats_cpustats_h" = xyes; then : +if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then : gl_have_func=yes $as_echo "#define UMAX 1" >>confdefs.h @@ -15778,7 +15755,7 @@ fi if test $gl_have_func = no; then ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_cpustats_h" = xyes; then : +if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then : gl_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h fi @@ -15790,7 +15767,7 @@ if test $gl_have_func = no; then for ac_header in mach/mach.h do : ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_mach_h" = xyes; then : +if test "x$ac_cv_header_mach_mach_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACH_MACH_H 1 _ACEOF @@ -15804,13 +15781,13 @@ fi for ac_header in nlist.h do : ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default" -if test "x$ac_cv_header_nlist_h" = xyes; then : +if test "x$ac_cv_header_nlist_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NLIST_H 1 _ACEOF ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include " -if test "x$ac_cv_member_struct_nlist_n_un_n_name" = xyes; then : +if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_NLIST_N_UN_N_NAME 1 @@ -15864,7 +15841,7 @@ LIBS=$gl_save_LIBS for ac_header in sys/loadavg.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_loadavg_h" = xyes; then : +if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_LOADAVG_H 1 _ACEOF @@ -15883,7 +15860,7 @@ ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE #endif #include " -if test "x$ac_cv_have_decl_getloadavg" = xyes; then : +if test "x$ac_cv_have_decl_getloadavg" = x""yes; then : else HAVE_DECL_GETLOADAVG=0 @@ -15992,7 +15969,7 @@ if test $APPLE_UNIVERSAL_BUILD = 1; then fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 $as_echo_n "checking for working mktime... " >&6; } -if ${ac_cv_func_working_mktime+:} false; then : +if test "${ac_cv_func_working_mktime+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -16257,7 +16234,7 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 $as_echo_n "checking whether readlink signature is correct... " >&6; } -if ${gl_cv_decl_readlink_works+:} false; then : +if test "${gl_cv_decl_readlink_works+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16284,7 +16261,7 @@ fi $as_echo "$gl_cv_decl_readlink_works" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } -if ${gl_cv_func_readlink_works+:} false; then : +if test "${gl_cv_func_readlink_works+set}" = set; then : $as_echo_n "(cached) " >&6 else # We have readlink, so assume ln -s works. @@ -16362,7 +16339,7 @@ $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } -if ${gl_cv_func_stat_dir_slash+:} false; then : +if test "${gl_cv_func_stat_dir_slash+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -16397,7 +16374,7 @@ fi $as_echo "$gl_cv_func_stat_dir_slash" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } -if ${gl_cv_func_stat_file_slash+:} false; then : +if test "${gl_cv_func_stat_file_slash+set}" = set; then : $as_echo_n "(cached) " >&6 else touch conftest.tmp @@ -16505,7 +16482,7 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if ${gl_cv_decl_null_works+:} false; then : +if test "${gl_cv_decl_null_works+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16548,7 +16525,7 @@ $as_echo "$gl_cv_decl_null_works" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stddef_h+:} false; then : +if test "${gl_cv_next_stddef_h+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -16644,7 +16621,7 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stdint_h+:} false; then : +if test "${gl_cv_next_stdint_h+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -16700,7 +16677,7 @@ $as_echo "$gl_cv_next_stdint_h" >&6; } if test $ac_cv_header_stdint_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; } -if ${gl_cv_header_working_stdint_h+:} false; then : +if test "${gl_cv_header_working_stdint_h+set}" = set; then : $as_echo_n "(cached) " >&6 else gl_cv_header_working_stdint_h=no @@ -16973,7 +16950,8 @@ $as_echo "$gl_cv_header_working_stdint_h" >&6; } 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 @@ -17003,7 +16981,7 @@ done for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } -if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : +if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " @@ -17048,7 +17026,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 $as_echo_n "checking for bit size of $gltype... " >&6; } -if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : +if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " @@ -17092,7 +17070,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 $as_echo_n "checking whether $gltype is signed... " >&6; } -if eval \${gl_cv_type_${gltype}_signed+:} false; then : +if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17151,7 +17129,7 @@ _ACEOF for gltype in ptrdiff_t size_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval \${gl_cv_type_${gltype}_suffix+:} false; then : +if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no @@ -17223,7 +17201,7 @@ _ACEOF for gltype in sig_atomic_t wchar_t wint_t ; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 $as_echo_n "checking for $gltype integer literal suffix... " >&6; } -if eval \${gl_cv_type_${gltype}_suffix+:} false; then : +if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval gl_cv_type_${gltype}_suffix=no @@ -17310,7 +17288,7 @@ _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stdlib_h+:} false; then : +if test "${gl_cv_next_stdlib_h+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -17398,7 +17376,7 @@ $as_echo "#define my_strftime nstrftime" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } -if ${gl_cv_func_symlink_works+:} false; then : +if test "${gl_cv_func_symlink_works+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -17481,7 +17459,7 @@ $as_echo "$gl_cv_func_symlink_works" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_sys_stat_h+:} false; then : +if test "${gl_cv_next_sys_stat_h+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -17531,7 +17509,7 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; } ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include #include " -if test "x$ac_cv_type_nlink_t" = xyes; then : +if test "x$ac_cv_type_nlink_t" = x""yes; then : else @@ -17564,7 +17542,7 @@ fi HAVE_LOCALTIME_R=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } -if ${gl_cv_time_r_posix+:} false; then : +if test "${gl_cv_time_r_posix+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17646,7 +17624,7 @@ $as_echo "$gl_cv_time_r_posix" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 $as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_unistd_h+:} false; then : +if test "${gl_cv_next_unistd_h+set}" = set; then : $as_echo_n "(cached) " >&6 else @@ -17746,7 +17724,7 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } for ac_func in grantpt do : ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt" -if test "x$ac_cv_func_grantpt" = xyes; then : +if test "x$ac_cv_func_grantpt" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GRANTPT 1 _ACEOF @@ -17759,7 +17737,7 @@ done for ac_func in getpt do : ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt" -if test "x$ac_cv_func_getpt" = xyes; then : +if test "x$ac_cv_func_getpt" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPT 1 _ACEOF @@ -17776,7 +17754,7 @@ done have_tputs_et_al=true { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 $as_echo_n "checking for library containing tputs... " >&6; } -if ${ac_cv_search_tputs+:} false; then : +if test "${ac_cv_search_tputs+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -17810,11 +17788,11 @@ for ac_lib in '' ncurses terminfo termcap; do fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_tputs+:} false; then : + if test "${ac_cv_search_tputs+set}" = set; then : break fi done -if ${ac_cv_search_tputs+:} false; then : +if test "${ac_cv_search_tputs+set}" = set; then : else ac_cv_search_tputs=no @@ -17833,7 +17811,7 @@ else 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 @@ -17873,7 +17851,7 @@ case "$opsys" in freebsd) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5 $as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; } - if ${emacs_cv_freebsd_terminfo+:} false; then : + if test "${emacs_cv_freebsd_terminfo+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18015,16 +17993,16 @@ LIBHESIOD= if test "$with_hesiod" != no ; then # Don't set $LIBS here -- see comments above. FIXME which comments? ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send" -if test "x$ac_cv_func_res_send" = xyes; then : +if test "x$ac_cv_func_res_send" = x""yes; then : else ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send" -if test "x$ac_cv_func___res_send" = xyes; then : +if test "x$ac_cv_func___res_send" = x""yes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5 $as_echo_n "checking for res_send in -lresolv... " >&6; } -if ${ac_cv_lib_resolv_res_send+:} false; then : +if test "${ac_cv_lib_resolv_res_send+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18058,12 +18036,12 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5 $as_echo "$ac_cv_lib_resolv_res_send" >&6; } -if test "x$ac_cv_lib_resolv_res_send" = xyes; then : +if test "x$ac_cv_lib_resolv_res_send" = x""yes; then : resolv=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5 $as_echo_n "checking for __res_send in -lresolv... " >&6; } -if ${ac_cv_lib_resolv___res_send+:} false; then : +if test "${ac_cv_lib_resolv___res_send+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18097,7 +18075,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5 $as_echo "$ac_cv_lib_resolv___res_send" >&6; } -if test "x$ac_cv_lib_resolv___res_send" = xyes; then : +if test "x$ac_cv_lib_resolv___res_send" = x""yes; then : resolv=yes fi @@ -18113,12 +18091,12 @@ fi RESOLVLIB= fi ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost" -if test "x$ac_cv_func_hes_getmailhost" = xyes; then : +if test "x$ac_cv_func_hes_getmailhost" = x""yes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5 $as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; } -if ${ac_cv_lib_hesiod_hes_getmailhost+:} false; then : +if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18152,7 +18130,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5 $as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; } -if test "x$ac_cv_lib_hesiod_hes_getmailhost" = xyes; then : +if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then : hesiod=yes else : @@ -18191,7 +18169,7 @@ KRB4LIB= if test "${with_kerberos}" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 $as_echo_n "checking for com_err in -lcom_err... " >&6; } -if ${ac_cv_lib_com_err_com_err+:} false; then : +if test "${ac_cv_lib_com_err_com_err+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18225,7 +18203,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 $as_echo "$ac_cv_lib_com_err_com_err" >&6; } -if test "x$ac_cv_lib_com_err_com_err" = xyes; then : +if test "x$ac_cv_lib_com_err_com_err" = x""yes; then : have_com_err=yes else have_com_err=no @@ -18240,7 +18218,7 @@ $as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5 $as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; } -if ${ac_cv_lib_crypto_mit_des_cbc_encrypt+:} false; then : +if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18274,7 +18252,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = xyes; then : +if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then : have_crypto=yes else have_crypto=no @@ -18289,7 +18267,7 @@ $as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5 $as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; } -if ${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+:} false; then : +if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18323,7 +18301,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = xyes; then : +if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then : have_k5crypto=yes else have_k5crypto=no @@ -18338,7 +18316,7 @@ $as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 $as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } -if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : +if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18372,7 +18350,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; } -if test "x$ac_cv_lib_krb5_krb5_init_context" = xyes; then : +if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then : have_krb5=yes else have_krb5=no @@ -18388,7 +18366,7 @@ $as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h if test "${with_kerberos5}" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5 $as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; } -if ${ac_cv_lib_des425_des_cbc_encrypt+:} false; then : +if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18422,7 +18400,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des425_des_cbc_encrypt" = xyes; then : +if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then : have_des425=yes else have_des425=no @@ -18437,7 +18415,7 @@ $as_echo "#define HAVE_LIBDES425 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; } -if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then : +if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18471,7 +18449,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; } -if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then : +if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then : have_des=yes else have_des=no @@ -18487,7 +18465,7 @@ $as_echo "#define HAVE_LIBDES 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5 $as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; } -if ${ac_cv_lib_krb4_krb_get_cred+:} false; then : +if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18521,7 +18499,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5 $as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb4_krb_get_cred" = xyes; then : +if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then : have_krb4=yes else have_krb4=no @@ -18536,7 +18514,7 @@ $as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5 $as_echo_n "checking for krb_get_cred in -lkrb... " >&6; } -if ${ac_cv_lib_krb_krb_get_cred+:} false; then : +if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18570,7 +18548,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5 $as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; } -if test "x$ac_cv_lib_krb_krb_get_cred" = xyes; then : +if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then : have_krb=yes else have_krb=no @@ -18590,13 +18568,13 @@ $as_echo "#define HAVE_LIBKRB 1" >>confdefs.h for ac_header in krb5.h do : ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default" -if test "x$ac_cv_header_krb5_h" = xyes; then : +if test "x$ac_cv_header_krb5_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_H 1 _ACEOF ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include " -if test "x$ac_cv_member_krb5_error_text" = xyes; then : +if test "x$ac_cv_member_krb5_error_text" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_ERROR_TEXT 1 @@ -18606,7 +18584,7 @@ _ACEOF fi ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include " -if test "x$ac_cv_member_krb5_error_e_text" = xyes; then : +if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_ERROR_E_TEXT 1 @@ -18623,7 +18601,7 @@ done for ac_header in des.h do : ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default" -if test "x$ac_cv_header_des_h" = xyes; then : +if test "x$ac_cv_header_des_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DES_H 1 _ACEOF @@ -18632,7 +18610,7 @@ else for ac_header in kerberosIV/des.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_des_h" = xyes; then : +if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROSIV_DES_H 1 _ACEOF @@ -18641,7 +18619,7 @@ else for ac_header in kerberos/des.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_des_h" = xyes; then : +if test "x$ac_cv_header_kerberos_des_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROS_DES_H 1 _ACEOF @@ -18661,7 +18639,7 @@ done for ac_header in krb.h do : ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_krb_h" = xyes; then : +if test "x$ac_cv_header_krb_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB_H 1 _ACEOF @@ -18670,7 +18648,7 @@ else for ac_header in kerberosIV/krb.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberosIV_krb_h" = xyes; then : +if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROSIV_KRB_H 1 _ACEOF @@ -18679,7 +18657,7 @@ else for ac_header in kerberos/krb.h do : ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default" -if test "x$ac_cv_header_kerberos_krb_h" = xyes; then : +if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KERBEROS_KRB_H 1 _ACEOF @@ -18700,7 +18678,7 @@ done for ac_header in com_err.h do : ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_com_err_h" = xyes; then : +if test "x$ac_cv_header_com_err_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_COM_ERR_H 1 _ACEOF @@ -18721,7 +18699,7 @@ fi # to return localized messages. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } -if ${ac_cv_lib_intl_dgettext+:} false; then : +if test "${ac_cv_lib_intl_dgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18755,7 +18733,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } -if test "x$ac_cv_lib_intl_dgettext" = xyes; then : +if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINTL 1 _ACEOF @@ -18767,7 +18745,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5 $as_echo_n "checking whether localtime caches TZ... " >&6; } -if ${emacs_cv_localtime_cache+:} false; then : +if test "${emacs_cv_localtime_cache+set}" = set; then : $as_echo_n "(cached) " >&6 else if test x$ac_cv_func_tzset = xyes; then @@ -18826,7 +18804,7 @@ if test "x$HAVE_TIMEVAL" = xyes; then for ac_func in gettimeofday do : ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" -if test "x$ac_cv_func_gettimeofday" = xyes; then : +if test "x$ac_cv_func_gettimeofday" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETTIMEOFDAY 1 _ACEOF @@ -18837,7 +18815,7 @@ done if test $ac_cv_func_gettimeofday = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5 $as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; } -if ${emacs_cv_gettimeofday_two_arguments+:} false; then : +if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18881,7 +18859,7 @@ fi ok_so_far=yes ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" -if test "x$ac_cv_func_socket" = xyes; then : +if test "x$ac_cv_func_socket" = x""yes; then : else ok_so_far=no @@ -18889,7 +18867,7 @@ fi if test $ok_so_far = yes; then ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" -if test "x$ac_cv_header_netinet_in_h" = xyes; then : +if test "x$ac_cv_header_netinet_in_h" = x""yes; then : else ok_so_far=no @@ -18899,7 +18877,7 @@ fi fi if test $ok_so_far = yes; then ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" -if test "x$ac_cv_header_arpa_inet_h" = xyes; then : +if test "x$ac_cv_header_arpa_inet_h" = x""yes; then : else ok_so_far=no @@ -18933,7 +18911,7 @@ $as_echo "no" >&6; } fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = xyes; then : +if test "x$ac_cv_type_pid_t" = x""yes; then : else @@ -18946,7 +18924,7 @@ fi for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" -if test "x$ac_cv_header_vfork_h" = xyes; then : +if test "x$ac_cv_header_vfork_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF @@ -18959,7 +18937,8 @@ for ac_func in fork vfork 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 @@ -18970,7 +18949,7 @@ done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } -if ${ac_cv_func_fork_works+:} false; then : +if test "${ac_cv_func_fork_works+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -19023,7 +19002,7 @@ ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } -if ${ac_cv_func_vfork_works+:} false; then : +if test "${ac_cv_func_vfork_works+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -19159,7 +19138,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if ${emacs_cv_langinfo_codeset+:} false; then : +if test "${emacs_cv_langinfo_codeset+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19191,7 +19170,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : +if test "x$ac_cv_type_size_t" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIZE_T 1 @@ -19203,7 +19182,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } -if ${ac_cv_type_mbstate_t+:} false; then : +if test "${ac_cv_type_mbstate_t+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19239,7 +19218,7 @@ $as_echo "#define mbstate_t int" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5 $as_echo_n "checking for C restricted array declarations... " >&6; } -if ${emacs_cv_c_restrict_arr+:} false; then : +if test "${emacs_cv_c_restrict_arr+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19279,7 +19258,7 @@ if test "x$GCC" = xyes \ && 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 version=$PACKAGE_VERSION @@ -19836,21 +19815,10 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then + test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi + cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -19866,7 +19834,6 @@ DEFS=-DHAVE_CONFIG_H 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$//' @@ -19890,16 +19857,16 @@ else fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. + as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. + as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then - as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. + as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -19936,7 +19903,7 @@ fi -: "${CONFIG_STATUS=./config.status}" +: ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -20037,7 +20004,6 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -20083,19 +20049,19 @@ export LANGUAGE (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 @@ -20291,7 +20257,7 @@ $as_echo X"$as_dir" | 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 @@ -20345,7 +20311,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by emacs $as_me 24.0.50, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -20411,10 +20377,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ emacs config.status 24.0.50 -configured by $0, generated by GNU Autoconf 2.68, +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." @@ -20432,16 +20398,11 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=?*) + --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; *) ac_option=$1 ac_optarg=$2 @@ -20463,7 +20424,6 @@ do $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -20476,7 +20436,7 @@ do 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 ;; @@ -20485,7 +20445,7 @@ Try \`$0 --help' for more information.";; 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" @@ -20559,7 +20519,7 @@ do "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -20582,10 +20542,9 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= ac_tmp= + tmp= trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -20593,13 +20552,12 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" + test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp +} || 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. @@ -20633,24 +20591,24 @@ if test "x$ac_cr" = x; then 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 -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && - echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && + echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && 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 { @@ -20658,18 +20616,18 @@ rm -f conf$$files.sh 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 @@ -20677,7 +20635,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -20725,7 +20683,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && +cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init @@ -20763,29 +20721,21 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || 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 @@ -20797,7 +20747,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || +cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -20809,11 +20759,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + 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 @@ -20898,7 +20848,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _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" @@ -20911,7 +20861,7 @@ do 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 @@ -20930,7 +20880,7 @@ do for ac_f do case $ac_f in - -) ac_f="$ac_tmp/stdin";; + -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -20939,7 +20889,7 @@ do [\\/$]*) 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'" @@ -20965,8 +20915,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -21104,27 +21054,26 @@ $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then - $AWK -f "$ac_tmp/subs.awk" + $AWK -f "$tmp/subs.awk" else - $AWK -f "$ac_tmp/subs.awk" | $SHELL -fi \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + $AWK -f "$tmp/subs.awk" | $SHELL +fi >$tmp/out \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && + { 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 "$ac_tmp/stdin" + rm -f "$tmp/stdin" case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + -) 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) # @@ -21133,21 +21082,21 @@ which seems to be undefined. Please make sure it is defined" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || 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 "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -21312,7 +21261,7 @@ _ACEOF 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. @@ -21333,7 +21282,7 @@ if test "$no_create" != yes; then 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 diff --git a/autogen/copy_autogen b/autogen/copy_autogen new file mode 100755 index 00000000000..4abdbd87c0f --- /dev/null +++ b/autogen/copy_autogen @@ -0,0 +1,20 @@ +#!/bin/sh + +## Helper script for those building Emacs from bzr without autoconf etc. +## This installs some pre-generated versions of the automatically +## generated files. It is highly recommended to install the necessary +## tools instead of using this. Note that if eg configure.in +## is updated, the next time you run make it will attempt to +## regenerate configure and will fail if you do not have the required +## tools. You will have to run this script again. + +if test ! -e config.in; then + echo "You must run this script from the autogen/ directory." + exit 1 +fi + +cp configure aclocal.m4 ../ +cp config.in ../src/ +cp Makefile.in ../lib/ + +echo "You can now run configure" diff --git a/autogen/update_autogen b/autogen/update_autogen new file mode 100755 index 00000000000..e73bf16a610 --- /dev/null +++ b/autogen/update_autogen @@ -0,0 +1,180 @@ +#!/bin/bash +### update_autogen - update the generated files in Emacs autogen/ directory + +## Copyright (C) 2011 Free Software Foundation, Inc. + +## Author: Glenn Morris + +## This file is part of GNU Emacs. + +## GNU Emacs is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. + +## GNU Emacs is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## You should have received a copy of the GNU General Public License +## along with GNU Emacs. If not, see . + +### Commentary: + +## This is a helper script to update the pre-built generated files in +## the autogen/ directory. This is suitable for running from cron. +## Only Emacs maintainers need use this, so it uses bash features. + +### Code: + +function die () # write error to stderr and exit +{ + [ $# -gt 0 ] && echo "$PN: $@" >&2 + exit 1 +} + +PN=${0##*/} # basename of script +PD=${0%/*} + +[ "$PD" = "$0" ] && PD=. # if PATH includes PWD + +## This should be the autogen directory. +cd $PD +cd ../ +[ -d autogen ] || die "Could not locate autogen directory" + + +function usage () +{ + cat 1>&2 < /dev/null" EXIT + + +while getopts ":hcfq" option ; do + case $option in + (h) usage ;; + + (c) commit=1 ;; + + (f) force=1 ;; + + (q) quiet=1 ;; + + (\?) die "Bad option -$OPTARG" ;; + + (:) die "Option -$OPTARG requires an argument" ;; + + (*) die "getopts error" ;; + esac +done +shift $(( --OPTIND )) +OPTIND=1 + +[ $# -eq 0 ] || die "Wrong number of arguments" + + +function msg () +{ + [ "$quiet" ] && return 0 + echo "$@" +} # function msg + + +msg "Running bzr status..." + +bzr status -S $sources >| $tempfile || die "bzr status error for sources" + +while read stat file; do + + case $stat in + M) + msg "Locally modified: $file" + [ "$force" ] || die "There are local modifications" + ;; + + *) die "Unexpected status ($stat) for $file" ;; + esac +done < $tempfile + + +msg "Running autoreconf..." + +autoreconf -I m4 || die "autoreconf error" + + +cp $genfiles autogen/ + + +cd autogen + + +bzr status -S $basegen >| $tempfile || \ + die "bzr status error for generated files" + + +modified= + +while read stat file; do + + [ "$stat" != "M" ] && die "Unexpected status ($stat) for generated $file" + + modified="$modified $file" + +done < $tempfile + + +[ "$modified" ] || { + msg "No files were modified" + exit 0 +} + +msg "Modified file(s): $modified" + +[ "$commit" ] || exit 0 + + +msg "Committing..." + +## bzr status output is annoyingly always relative to top-level, not PWD. +cd ../ + +bzr commit -m "Auto-commit of generated files." $modified || \ + die "bzr commit error" + + +msg "Committed files: $modified" + +exit + +### update_autogen ends here diff --git a/configure.in b/configure.in index 47bdaf9bbb1..b38aa976259 100644 --- a/configure.in +++ b/configure.in @@ -229,7 +229,7 @@ AC_ARG_ENABLE(maintainer-mode, [enable make rules and dependencies not useful (and sometimes confusing) to the casual installer])], USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) + USE_MAINTAINER_MODE=yes) if test $USE_MAINTAINER_MODE = yes; then MAINT= else diff --git a/src/ChangeLog b/src/ChangeLog index 95bafd023b4..6fa2d821565 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-03-20 Glenn Morris + + * config.in: Remove file. + 2011-03-20 Juanma Barranquero * minibuf.c (Vcompleting_read_function): Don't declare, global variables From dccef361922feb8aafcb9a551d9ba54ed62b6c03 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 20 Mar 2011 20:03:58 -0400 Subject: [PATCH 378/383] Auto-commit of generated files. --- autogen/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen/configure b/autogen/configure index 2f19acbf347..4c45db1badd 100755 --- a/autogen/configure +++ b/autogen/configure @@ -3934,7 +3934,7 @@ fi if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else - USE_MAINTAINER_MODE=no + USE_MAINTAINER_MODE=yes fi if test $USE_MAINTAINER_MODE = yes; then From e22c7d937aff94c075032688f9608a0f5c7fdf89 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 20 Mar 2011 17:08:01 -0700 Subject: [PATCH 379/383] * autogen/update_autogen: Make bzr commit respect -q option. --- autogen/update_autogen | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autogen/update_autogen b/autogen/update_autogen index e73bf16a610..0b26dd27d2b 100755 --- a/autogen/update_autogen +++ b/autogen/update_autogen @@ -169,7 +169,10 @@ msg "Committing..." ## bzr status output is annoyingly always relative to top-level, not PWD. cd ../ -bzr commit -m "Auto-commit of generated files." $modified || \ +opt= +[ "$quiet" ] || opt=-q + +bzr commit $opt -m "Auto-commit of generated files." $modified || \ die "bzr commit error" From 84ea55580d499d6fe9898c3bea5083f19a94571f Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 20 Mar 2011 17:20:24 -0700 Subject: [PATCH 380/383] Fix date of merged entry. --- doc/lispref/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 437cbbd70d0..c705aae4934 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,4 +1,4 @@ -2011-03-16 Stefan Monnier +2011-03-19 Stefan Monnier * strings.texi (String Conversion): Don't mention string-make-(uni|multi)byte (bug#8262). From 99ea4cd9ea18070cd2d8bd1e6a34ae05db7213e1 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 20 Mar 2011 17:28:18 -0700 Subject: [PATCH 381/383] Fix typo in a README. --- autogen/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autogen/README b/autogen/README index 267ae129959..a16dc93c48a 100644 --- a/autogen/README +++ b/autogen/README @@ -4,7 +4,7 @@ generate them yourself using eg `autogen.sh'. File: Destination: Created by: configure ../ autoconf -config.in ../src autoconf * also used by MSDOS bzr build +config.in ../src autoheader * also used by MSDOS bzr build aclocal.m4 ../ aclocal Makefile.in ../lib automake From 4359915b869931b94d530d9c6e1347f260d66951 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 21 Mar 2011 00:30:55 -0400 Subject: [PATCH 382/383] Several fixes to cus-theme.el. * lisp/cus-theme.el: Add missing provide statement. (customize-create-theme): Extract theme value correctly. (custom-theme-visit-theme): Autoload. (customize-create-theme): Prompt before inserting default faces. --- lisp/ChangeLog | 7 +++++++ lisp/cus-theme.el | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b12445b466f..d568b07bb15 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2011-03-21 Chong Yidong + + * cus-theme.el: Add missing provide statement. + (customize-create-theme): Extract theme value correctly. + (custom-theme-visit-theme): Autoload. + (customize-create-theme): Prompt before inserting default faces. + 2011-03-20 Jay Belanger * calc/calc-menu.el (calc-units-menu): Add entries for logarithmic diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index cdc066aa91a..4f9428d497b 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -100,6 +100,9 @@ named *Custom Theme*." (make-local-variable 'custom-theme-insert-face-marker) (make-local-variable 'custom-theme-insert-variable-marker) (make-local-variable 'custom-theme--listed-faces) + (when (called-interactively-p 'interactive) + (unless (y-or-n-p "Include basic face customizations in this theme? ") + (setq custom-theme--listed-faces nil))) (if (eq theme 'user) (widget-insert "This buffer contains all the Custom settings you have made. @@ -188,7 +191,7 @@ remove them from your saved Custom file.\n\n")) (while vars (if (eq (car vars) 'custom-enabled-themes) (progn (pop vars) (pop values)) - (custom-theme-add-var-1 (pop vars) (pop values))))) + (custom-theme-add-var-1 (pop vars) (eval (pop values)))))) (setq custom-theme-insert-variable-marker (point-marker)) (widget-insert " ") (widget-create 'push-button @@ -297,8 +300,9 @@ SPEC, if non-nil, should be a face spec to which to set the widget." ;;; Reading and writing +;;;###autoload (defun custom-theme-visit-theme (theme) - "Load the custom theme THEME's settings into the current buffer." + "Set up a Custom buffer to edit custom theme THEME." (interactive (list (intern (completing-read "Find custom theme: " @@ -663,4 +667,6 @@ Theme files are named *-theme.el in `")) (widget-toggle-action widget event) (setq custom-theme-allow-multiple-selections (widget-value widget))) +(provide 'cus-theme) + ;;; cus-theme.el ends here From 4e05e67e4cd0bc1b0a4ef3176a4d0d91c6b3738e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 20 Mar 2011 23:42:23 -0700 Subject: [PATCH 383/383] * eshell/esh-opt.el (eshell-eval-using-options, eshell-process-args): Doc fixes. --- lisp/ChangeLog | 5 ++++ lisp/eshell/esh-opt.el | 55 ++++++++++++++++++++++++++++++++++++------ 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d568b07bb15..d087982edee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-03-21 Glenn Morris + + * eshell/esh-opt.el (eshell-eval-using-options, eshell-process-args): + Doc fixes. + 2011-03-21 Chong Yidong * cus-theme.el: Add missing provide statement. diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index d7162406879..a9e8f11c39a 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el @@ -35,13 +35,51 @@ Eshell commands implemented in Lisp." ;;; User Functions: -(defmacro eshell-eval-using-options (name macro-args - options &rest body-forms) +(defmacro eshell-eval-using-options (name macro-args options &rest body-forms) "Process NAME's MACRO-ARGS using a set of command line OPTIONS. -After doing so, settings will be stored in local symbols as declared -by OPTIONS; FORMS will then be evaluated -- assuming all was OK. +After doing so, stores settings in local symbols as declared by OPTIONS; +then evaluates BODY-FORMS -- assuming all was OK. -The syntax of OPTIONS is: +OPTIONS is a list, beginning with one or more elements of the form: +\(SHORT LONG VALUE SYMBOL HELP-STRING) +Each of these elements represents a particular command-line switch. + +SHORT is either nil, or a character that can be used as a switch -SHORT. +LONG is either nil, or a string that can be used as a switch --LONG. +At least one of SHORT and LONG must be non-nil. +VALUE is the value associated with the option. It can be either: + t - the option needs a value to be specified after the switch; + nil - the option is given the value t; + anything else - specifies the actual value for the option. +SYMBOL is either nil, or the name of the Lisp symbol that will be bound +to VALUE. A nil SYMBOL calls `eshell-show-usage', and so is appropriate +for a \"--help\" type option. +HELP-STRING is a documentation string for the option. + +Any remaining elements of OPTIONS are :KEYWORD arguments. Some take +arguments, some do not. The recognized :KEYWORDS are: + +:external STRING + STRING is an external command to run if there are unknown switches. + +:usage STRING + STRING is the initial part of the command's documentation string. + It appears before the options are listed. + +:post-usage STRING + STRING is an optional trailing part of the command's documentation string. + It appears after the options, but before the final part of the + documentation about the associated external command (if there is one). + +:show-usage + If present, then show the usage message if the command is called with no + arguments. + +:preserve-args + If present, do not pass MACRO-ARGS through `eshell-flatten-list' +and `eshell-stringify-list'. + +For example, OPTIONS might look like: '((?C nil nil multi-column \"multi-column display\") (nil \"help\" nil nil \"show this usage display\") @@ -52,8 +90,9 @@ The syntax of OPTIONS is: Sort entries alphabetically across.\") `eshell-eval-using-options' returns the value of the last form in -BODY-FORMS. If instead an external command is run, the tag -`eshell-external' will be thrown with the new process for its value. +BODY-FORMS. If instead an external command is run (because of +an unknown option), the tag `eshell-external' will be thrown with +the new process for its value. Lastly, any remaining arguments will be available in a locally interned variable `args' (created using a `let' form)." @@ -200,7 +239,7 @@ switch is unrecognized." (defun eshell-process-args (name args options) "Process the given ARGS using OPTIONS. -This assumes that symbols have been intern'd by `eshell-with-options'." +This assumes that symbols have been intern'd by `eshell-eval-using-options'." (let ((ai 0) arg) (while (< ai (length args)) (setq arg (nth ai args))