diff --git a/ChangeLog b/ChangeLog index 66fa0f859aa..0778d0a7b09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,43 @@ +2010-09-29 Romain Francoise + + * configure.in: Don't enable ImageMagick unless HAVE_X11. + +2010-09-28 Glenn Morris + + * configure.in (HAVE_GNUTLS): Add a description to make autoheader + happy. + +2010-09-27 Lars Magne Ingebrigtsen + + * configure.in: Enable imagemagick by default. + +2010-09-26 Lars Magne Ingebrigtsen + + * configure.in (HAVE_GNUTLS): Don't break if we don't have the + gnutls libraries. + +2010-09-26 Teodor Zlatanov + + * configure.in: Set up GnuTLS. + +2010-09-22 Chong Yidong + + * configure.in: Announce whether libxml2 is linked to. + +2010-09-20 Dan Nicolaescu + + * configure.in (LINKER): Rename to LD_FIRSTFLAG, do not include $(CC). + +2010-09-18 Eli Zaretskii + + * config.bat: Detect that libxml2 is installed and if so, build + with it. + +2010-09-13 Lars Magne Ingebrigtsen + + * configure.in (HAVE_LIBXML2): Check that the libxml2 we found can + be used. This fixes a conf problem on Mac OS X. + 2010-09-10 Lars Magne Ingebrigtsen * configure.in: Check for libxml2. diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el index 88e21d7226e..211c6f0a530 100644 --- a/admin/unidata/unidata-gen.el +++ b/admin/unidata/unidata-gen.el @@ -95,7 +95,7 @@ (with-temp-buffer ;; Insert a file of this format: ;; (CHAR NAME CATEGORY ...) - ;; where CHAR is a charater code, the following elements are strings + ;; where CHAR is a character code, the following elements are strings ;; representing character properties. (insert-file-contents unidata-text-file) (goto-char (point-min)) diff --git a/config.bat b/config.bat index 802cacc8897..63f9c5d5865 100644 --- a/config.bat +++ b/config.bat @@ -38,6 +38,7 @@ set X11= set nodebug= set djgpp_ver= set sys_malloc= +set libxml= if "%1" == "" goto usage rem ---------------------------------------------------------------------- rem See if their environment is large enough. We need 28 bytes. @@ -175,6 +176,24 @@ rem The following line disables DECL_ALIGN which in turn disables USE_LSB_TAG rem For details see lisp.h where it defines USE_LSB_TAG echo #define NO_DECL_ALIGN >>config.h2 :alignOk +Rem See if they have libxml2 later than v2.2.0 installed +Echo Checking whether libxml2 v2.2.1 or later is installed ... +rm -f junk.c junk.o junk junk.exe +rem Use djecho here because we need to quote brackets +djecho "#include " >junk.c +djecho "int main()" >>junk.c +djecho "{return (LIBXML_VERSION > 20200 ? 0 : 1);}" >>junk.c +redir -o Nul -eo gcc -I/dev/env/DJDIR/include/libxml2 -o junk junk.c +if not exist junk Goto xmlDone +if not exist junk.exe coff2exe junk +junk +If ErrorLevel 1 Goto xmlDone +Echo Configuring with libxml2 ... +sed -e "/#undef HAVE_LIBXML2/s/^.*$/#define HAVE_LIBXML2 1/" config.h3 +mv config.h3 config.h2 +set libxml=1 +:xmlDone +rm -f junk.c junk junk.exe Rem See if they requested a SYSTEM_MALLOC build if "%sys_malloc%" == "" Goto cfgDone rm -f config.tmp @@ -213,6 +232,12 @@ sed -e "/^CFLAGS *=/s/ *-gcoff//" makefile.tmp sed -e "/^LDFLAGS *=/s/=/=-s/" Makefile rm -f makefile.tmp :src6 + +if "%libxml%" == "" goto src7 +sed -e "/^LIBXML2_LIBS *=/s/=/= -lxml2 -lz -liconv/" makefile.tmp +sed -e "/^LIBXML2_CFLAGS *=/s|=|= -I/dev/env/DJDIR/include/libxml2|" Makefile +rm -f makefile.tmp +:src7 cd .. rem ---------------------------------------------------------------------- Echo Configuring the library source directory... @@ -289,6 +314,7 @@ set X11= set nodebug= set djgpp_ver= set sys_malloc= +set libxml= goto skipArchTag arch-tag: 2d2fed23-4dc6-4006-a2e4-49daf0031f33 diff --git a/configure b/configure index 6afb63b6c96..2ee3423df4c 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` @@ -599,7 +599,7 @@ WINDOW_SUPPORT TOOLTIP_SUPPORT MOUSE_SUPPORT LIB_GCC -LINKER +LD_FIRSTFLAG LD_SWITCH_SYSTEM_TEMACS POST_ALLOC_OBJ PRE_ALLOC_OBJ @@ -681,6 +681,8 @@ FONTCONFIG_LIBS FONTCONFIG_CFLAGS LIBXMU LIBXTR6 +LIBGNUTLS_LIBS +LIBGNUTLS_CFLAGS LIBSELINUX_LIBS GCONF_LIBS GCONF_CFLAGS @@ -822,6 +824,7 @@ with_gpm with_dbus with_gconf with_selinux +with_gnutls with_makeinfo with_compress_info with_pkg_config_prog @@ -910,9 +913,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. @@ -957,7 +959,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 @@ -983,7 +985,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 @@ -1187,7 +1189,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 @@ -1203,7 +1205,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 @@ -1233,8 +1235,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." ;; *=*) @@ -1242,7 +1244,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 ;; @@ -1260,13 +1262,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 @@ -1289,7 +1291,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' @@ -1303,8 +1305,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 @@ -1319,9 +1321,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. @@ -1360,11 +1362,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 @@ -1404,7 +1406,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 @@ -1519,7 +1521,7 @@ Optional Packages: --without-png don't compile with PNG image support --without-rsvg don't compile with SVG image support --without-xml2 don't compile with XML parsing support - --with-imagemagick compile with ImageMagick image support + --without-imagemagick don't compile with ImageMagick image support --without-xft don't use XFT for anti aliased fonts --without-libotf don't use libotf for OpenType font support --without-m17n-flt don't use m17n-flt for text shaping @@ -1533,6 +1535,7 @@ Optional Packages: --without-dbus don't compile with D-Bus support --without-gconf don't compile with GConf support --without-selinux don't compile with SELinux support + --without-gnutls don't use -lgnutls for SSL/TLS support --without-makeinfo don't require makeinfo for building manuals --without-compress-info don't compress the installed Info pages --with-pkg-config-prog=PATH @@ -1622,9 +1625,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 @@ -1740,7 +1743,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 : @@ -1764,10 +1767,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 @@ -1803,7 +1806,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; } @@ -1830,7 +1833,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" @@ -1894,7 +1897,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 @@ -1916,18 +1919,15 @@ $as_echo "$ac_res" >&6; } } # ac_fn_c_check_header_compile -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR +# ------------------------------------ +# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 +$as_echo_n "checking whether $2 is declared... " >&6; } +if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1936,12 +1936,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 ; @@ -1970,7 +1966,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 @@ -1982,7 +1978,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 @@ -2000,7 +1996,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 @@ -2056,7 +2052,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 @@ -2124,7 +2120,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" @@ -2173,7 +2169,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 $@ @@ -2283,9 +2279,11 @@ trap 'exit_status=$? { echo - $as_echo "## ---------------- ## + cat <<\_ASBOX +## ---------------- ## ## Cache variables. ## -## ---------------- ##" +## ---------------- ## +_ASBOX echo # The following way of writing the cache mishandles newlines in values, ( @@ -2319,9 +2317,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 @@ -2334,9 +2334,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 @@ -2350,9 +2352,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 @@ -2407,12 +2411,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 @@ -2427,11 +2426,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 @@ -2512,7 +2507,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. ## @@ -2686,7 +2681,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 ;; @@ -2757,7 +2752,7 @@ fi if test "${with_imagemagick+set}" = set; then : withval=$with_imagemagick; else - with_imagemagick=no + with_imagemagick=yes fi @@ -2852,6 +2847,14 @@ else fi +# Check whether --with-gnutls was given. +if test "${with_gnutls+set}" = set; then : + withval=$with_gnutls; +else + with_gnutls=yes +fi + + ## For the times when you want to build Emacs but don't have ## a suitable makeinfo, and can live without the manuals. @@ -2981,7 +2984,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" @@ -3099,22 +3102,16 @@ fi 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, @@ -3128,7 +3125,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # 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; } @@ -3139,16 +3136,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='-' @@ -3173,7 +3170,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 @@ -3181,7 +3178,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='-' @@ -3475,7 +3472,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 @@ -3789,8 +3786,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 @@ -3904,8 +3901,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; } @@ -3947,8 +3945,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 @@ -4005,9 +4003,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 @@ -4058,8 +4056,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 @@ -4391,7 +4389,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. @@ -4407,11 +4405,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 @@ -4450,7 +4448,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. @@ -4466,18 +4464,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 @@ -4538,7 +4536,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 @@ -4604,7 +4602,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 @@ -4736,7 +4734,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 @@ -4980,7 +4979,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. @@ -4996,11 +4995,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 @@ -5039,7 +5038,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. @@ -5055,18 +5054,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 @@ -5503,7 +5502,7 @@ if test "$MAKEINFO" = "no"; then if test "x${with_makeinfo}" = "xno"; then MAKEINFO=off elif test ! -e $srcdir/info/emacs; then - as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your + as_fn_error "You do not seem to have makeinfo >= 4.6, and your source tree does not seem to have pre-built manuals in the \`info' directory. Either install a suitable version of makeinfo, or re-run configure with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 @@ -5657,7 +5656,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 @@ -5935,7 +5934,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 @@ -5990,7 +5989,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 @@ -6181,7 +6181,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 @@ -6216,7 +6216,8 @@ for ac_header in sys/select.h sys/timeb.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 @@ -7271,8 +7272,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 @@ -7280,7 +7281,7 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h $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 @@ -7288,7 +7289,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;; @@ -7424,7 +7425,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 @@ -7442,7 +7443,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 @@ -7528,7 +7529,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 @@ -7711,7 +7712,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 @@ -7827,7 +7828,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. @@ -7950,7 +7951,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 @@ -8457,7 +8459,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 @@ -8636,8 +8639,9 @@ $as_echo "#define HAVE_RSVG 1" >>confdefs.h fi HAVE_IMAGEMAGICK=no -if test "${with_imagemagick}" != "no"; then - IMAGEMAGICK_MODULE="Wand" +if test "${HAVE_X11}" = "yes"; then + if test "${with_imagemagick}" != "no"; then + IMAGEMAGICK_MODULE="Wand" succeeded=no @@ -8735,13 +8739,13 @@ $as_echo "no" >&6; } - if test $HAVE_IMAGEMAGICK = yes; then + if test $HAVE_IMAGEMAGICK = yes; then $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h - CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" - LIBS="$IMAGEMAGICK_LIBS $LIBS" - for ac_func in MagickExportImagePixels + CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" + LIBS="$IMAGEMAGICK_LIBS $LIBS" + 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 : @@ -8752,6 +8756,7 @@ _ACEOF fi done + fi fi fi @@ -8857,7 +8862,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 @@ -8963,7 +8968,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 @@ -8990,7 +8995,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 @@ -9120,7 +9125,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 @@ -9406,6 +9412,110 @@ $as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h fi +HAVE_GNUTLS=no +if test "${with_gnutls}" = "yes" ; then + + succeeded=no + + # Extract the first word of "pkg-config", so it can be a program name with args. +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 : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "$PKG_CONFIG" = "no" ; then + HAVE_GNUTLS=no + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.2.4" >&5 +$as_echo_n "checking for gnutls >= 2.2.4... " >&6; } + + if $PKG_CONFIG --exists "gnutls >= 2.2.4" 2>&5; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + succeeded=yes + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_CFLAGS" >&5 +$as_echo_n "checking LIBGNUTLS_CFLAGS... " >&6; } + LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.2.4"|sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CFLAGS" >&5 +$as_echo "$LIBGNUTLS_CFLAGS" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_LIBS" >&5 +$as_echo_n "checking LIBGNUTLS_LIBS... " >&6; } + LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.2.4"|sed -e 's,///*,/,g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_LIBS" >&5 +$as_echo "$LIBGNUTLS_LIBS" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBGNUTLS_CFLAGS="" + LIBGNUTLS_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.2.4"` + + fi + + + + else + echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." + echo "*** See http://www.freedesktop.org/software/pkgconfig" + fi + fi + + if test $succeeded = yes; then + HAVE_GNUTLS=yes + else + HAVE_GNUTLS=no + fi + + if test "${HAVE_GNUTLS}" = "yes"; then + $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h + + fi +fi + + + HAVE_XAW3D=no LUCID_LIBW= if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then @@ -9485,7 +9595,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; } @@ -10662,7 +10772,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 @@ -10914,7 +11025,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 @@ -11187,9 +11298,57 @@ $as_echo "no" >&6; } fi if test "${HAVE_LIBXML2}" = "yes"; then + 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 : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxml2 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char htmlReadMemory (); +int +main () +{ +return htmlReadMemory (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_xml2_htmlReadMemory=yes +else + ac_cv_lib_xml2_htmlReadMemory=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +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 : + HAVE_LIBXML2=yes +else + HAVE_LIBXML2=no +fi + + if test "${HAVE_LIBXML2}" = "yes"; then $as_echo "#define HAVE_LIBXML2 1" >>confdefs.h + else + LIBXML2_LIBS="" + LIBXML2_CFLAGS="" + fi fi fi @@ -11355,7 +11514,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 @@ -11419,7 +11579,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. @@ -11615,7 +11775,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 @@ -11704,7 +11864,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 @@ -11735,7 +11896,8 @@ done 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 @@ -11787,8 +11949,8 @@ static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ -static const char *tz_strings[] = { - (const char *) 0, "TZ=GMT0", "TZ=JST-9", +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) @@ -11805,7 +11967,7 @@ spring_forward_gap () instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; @@ -11818,14 +11980,16 @@ spring_forward_gap () } static int -mktime_test1 (time_t now) +mktime_test1 (now) + time_t now; { struct tm *lt; return ! (lt = localtime (&now)) || mktime (lt) == now; } static int -mktime_test (time_t now) +mktime_test (now) + time_t now; { return (mktime_test1 (now) && mktime_test1 ((time_t) (time_t_max - now)) @@ -11849,7 +12013,8 @@ irix_6_4_bug () } static int -bigtime_test (int j) +bigtime_test (j) + int j; { struct tm tm; time_t now; @@ -11893,7 +12058,7 @@ year_2050_test () instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ - putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); t = mktime (&tm); @@ -11928,7 +12093,7 @@ main () for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) - putenv ((char*) tz_strings[i]); + putenv (tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) if (! mktime_test (t)) @@ -11980,7 +12145,7 @@ ac_have_func=no # yes means we've found a way to get the load average. # Make sure getloadavg.c is where it belongs, at configure-time. test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || - as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 + as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5 ac_save_LIBS=$LIBS @@ -12849,7 +13014,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 @@ -13996,7 +14161,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 @@ -14370,14 +14536,14 @@ 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 #### Find out which version of Emacs this is. version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \ | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` if test x"${version}" = x; then - as_fn_error $? "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5 + as_fn_error "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5 fi if test x"${version}" != x"$PACKAGE_VERSION"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5 @@ -14655,7 +14821,7 @@ fi -LINKER= +LD_FIRSTFLAG= ORDINARY_LINK= case "$opsys" in ## gnu: GNU needs its own crt0. @@ -14665,14 +14831,14 @@ case "$opsys" in ## library search parth, i.e. it won't search /usr/lib for libc and ## friends. Using -nostartfiles instead avoids this problem, and ## will also work on earlier NetBSD releases. - netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;; + netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; ## macpcc: NAKAJI Hiroyuki says ## MkLinux/LinuxPPC needs this. ## ibms390x only supports opsys = gnu-linux so it can be added here. gnu-*) case "$machine" in - macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;; + macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; esac ;; esac @@ -14680,14 +14846,14 @@ esac if test "x$ORDINARY_LINK" = "xyes"; then - LINKER="\$(CC)" + LD_FIRSTFLAG="" $as_echo "#define ORDINARY_LINK 1" >>confdefs.h -## The system files defining neither ORDINARY_LINK nor LINKER are: +## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: ## freebsd, gnu-* not on macppc|ibms390x. -elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then +elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure ## places that are difficult to figure out at make time. Fortunately, @@ -14697,18 +14863,17 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from ## searching for libraries in its internal directories, so we have to ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). - LINKER="\$(CC) -nostdlib" + LD_FIRSTFLAG="-nostdlib" fi -test "x$LINKER" = "x" && LINKER=ld ## FIXME? What setting of EDIT_LDFLAGS should this have? -test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" +test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" ## FIXME? The logic here is not precisely the same as that above. -## There is no check here for a pre-defined LINKER. +## There is no check here for a pre-defined LD_FIRSTFLAG. ## Should we only be setting LIB_GCC if LD ~ -nostdlib? LIB_GCC= if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then @@ -14802,10 +14967,13 @@ echo " Does Emacs use a gif library? ${HAVE_GIF} $LIB echo " Does Emacs use -lpng? ${HAVE_PNG}" echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" + echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" +echo " Does Emacs use -lgnutls (BROKEN)? ${HAVE_GNUTLS}" +echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" @@ -14936,7 +15104,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$//' @@ -15099,19 +15266,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 @@ -15307,7 +15474,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 @@ -15361,7 +15528,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 @@ -15427,10 +15594,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." @@ -15446,16 +15613,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 @@ -15477,7 +15639,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;; @@ -15490,7 +15651,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 ;; @@ -15499,7 +15660,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" @@ -15567,7 +15728,7 @@ do "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -15605,7 +15766,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. @@ -15639,7 +15800,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 @@ -15656,7 +15817,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 { @@ -15664,18 +15825,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 @@ -15770,28 +15931,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 @@ -15819,7 +15972,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 @@ -15904,7 +16057,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" @@ -15917,7 +16070,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 @@ -15945,7 +16098,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'" @@ -15972,7 +16125,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 @@ -16108,22 +16261,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) # @@ -16134,19 +16287,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 ;; @@ -16183,7 +16336,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. @@ -16204,7 +16357,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 03e4e1a2a00..771ce78459b 100644 --- a/configure.in +++ b/configure.in @@ -156,7 +156,7 @@ OPTION_DEFAULT_ON([gif],[don't compile with GIF image support]) OPTION_DEFAULT_ON([png],[don't compile with PNG image support]) OPTION_DEFAULT_ON([rsvg],[don't compile with SVG image support]) OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support]) -OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support]) +OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support]) OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts]) OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support]) @@ -171,6 +171,7 @@ OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux consol OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support]) OPTION_DEFAULT_ON([gconf],[don't compile with GConf support]) OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support]) +OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support]) ## For the times when you want to build Emacs but don't have ## a suitable makeinfo, and can live without the manuals. @@ -1839,17 +1840,19 @@ if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then fi HAVE_IMAGEMAGICK=no -if test "${with_imagemagick}" != "no"; then - IMAGEMAGICK_MODULE="Wand" - PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :) - AC_SUBST(IMAGEMAGICK_CFLAGS) - AC_SUBST(IMAGEMAGICK_LIBS) - - if test $HAVE_IMAGEMAGICK = yes; then - AC_DEFINE(HAVE_IMAGEMAGICK, 1, [Define to 1 if using imagemagick.]) - CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" - LIBS="$IMAGEMAGICK_LIBS $LIBS" - AC_CHECK_FUNCS(MagickExportImagePixels) +if test "${HAVE_X11}" = "yes"; then + if test "${with_imagemagick}" != "no"; then + IMAGEMAGICK_MODULE="Wand" + PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :) + AC_SUBST(IMAGEMAGICK_CFLAGS) + AC_SUBST(IMAGEMAGICK_LIBS) + + if test $HAVE_IMAGEMAGICK = yes; then + AC_DEFINE(HAVE_IMAGEMAGICK, 1, [Define to 1 if using imagemagick.]) + CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" + LIBS="$IMAGEMAGICK_LIBS $LIBS" + AC_CHECK_FUNCS(MagickExportImagePixels) + fi fi fi @@ -1999,6 +2002,16 @@ if test "${with_selinux}" = "yes"; then fi AC_SUBST(LIBSELINUX_LIBS) +HAVE_GNUTLS=no +if test "${with_gnutls}" = "yes" ; then + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.2.4], HAVE_GNUTLS=yes, HAVE_GNUTLS=no) + if test "${HAVE_GNUTLS}" = "yes"; then + AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.]) + fi +fi +AC_SUBST(LIBGNUTLS_LIBS) +AC_SUBST(LIBGNUTLS_CFLAGS) + dnl Do not put whitespace before the #include statements below. dnl Older compilers (eg sunos4 cc) choke on it. HAVE_XAW3D=no @@ -2541,7 +2554,14 @@ if test "${with_xml2}" != "no"; then ### I'm not sure what the version number should be, so I just guessed. PKG_CHECK_MODULES(LIBXML2, libxml-2.0 > 2.2.0, HAVE_LIBXML2=yes, HAVE_LIBXML2=no) if test "${HAVE_LIBXML2}" = "yes"; then - AC_DEFINE(HAVE_LIBXML2, 1, [Define to 1 if you have the libxml library (-lxml2).]) + LIBS="$LIBXML2_LIBS $LIBS" + AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no) + if test "${HAVE_LIBXML2}" = "yes"; then + AC_DEFINE(HAVE_LIBXML2, 1, [Define to 1 if you have the libxml library (-lxml2).]) + else + LIBXML2_LIBS="" + LIBXML2_CFLAGS="" + fi fi fi AC_SUBST(LIBXML2_LIBS) @@ -3366,7 +3386,7 @@ fi AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) -LINKER= +LD_FIRSTFLAG= ORDINARY_LINK= case "$opsys" in ## gnu: GNU needs its own crt0. @@ -3376,14 +3396,14 @@ case "$opsys" in ## library search parth, i.e. it won't search /usr/lib for libc and ## friends. Using -nostartfiles instead avoids this problem, and ## will also work on earlier NetBSD releases. - netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;; + netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; ## macpcc: NAKAJI Hiroyuki says ## MkLinux/LinuxPPC needs this. ## ibms390x only supports opsys = gnu-linux so it can be added here. gnu-*) case "$machine" in - macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;; + macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; esac ;; esac @@ -3391,12 +3411,12 @@ esac if test "x$ORDINARY_LINK" = "xyes"; then - LINKER="\$(CC)" + LD_FIRSTFLAG="" AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.]) -## The system files defining neither ORDINARY_LINK nor LINKER are: +## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: ## freebsd, gnu-* not on macppc|ibms390x. -elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then +elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure ## places that are difficult to figure out at make time. Fortunately, @@ -3406,18 +3426,17 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from ## searching for libraries in its internal directories, so we have to ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). - LINKER="\$(CC) -nostdlib" + LD_FIRSTFLAG="-nostdlib" fi -test "x$LINKER" = "x" && LINKER=ld ## FIXME? What setting of EDIT_LDFLAGS should this have? -test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" +test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" -AC_SUBST(LINKER) +AC_SUBST(LD_FIRSTFLAG) ## FIXME? The logic here is not precisely the same as that above. -## There is no check here for a pre-defined LINKER. +## There is no check here for a pre-defined LD_FIRSTFLAG. ## Should we only be setting LIB_GCC if LD ~ -nostdlib? LIB_GCC= if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then @@ -3690,10 +3709,13 @@ echo " Does Emacs use a gif library? ${HAVE_GIF} $LIB echo " Does Emacs use -lpng? ${HAVE_PNG}" echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" + echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" +echo " Does Emacs use -lgnutls (BROKEN)? ${HAVE_GNUTLS}" +echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 225cf9dcd74..79a2b0ec2f2 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,23 @@ +2010-09-29 Glenn Morris + + * Makefile.in (top_srcdir): Remove unused variable. + +2010-09-14 Glenn Morris + + * cal-xtra.texi (Fancy Diary Display): Emphasize that sort should be + the last hook item. + + * calendar.texi (Appointments): Also updated when a diary include file + is saved. + +2010-09-14 Glenn Morris + + * trouble.texi (Bugs): Update the section intro. + (Known Problems): New section. + (Checklist): Misc updates. Prefer M-x report-emacs-bug. + (Sending Patches): Bug fixes are best as responses to existing bugs. + * emacs.texi (Known Problems): Add menu entry for new section. + 2010-09-09 Glenn Morris * xresources.texi: Untabify. diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in index 765f6aa29fa..e2eb905128e 100644 --- a/doc/emacs/Makefile.in +++ b/doc/emacs/Makefile.in @@ -1,7 +1,8 @@ #### Makefile for the Emacs Manual # Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -# 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -23,7 +24,6 @@ # subdirectory of the source tree. This is # set by the configure script's `--srcdir' option. srcdir=@srcdir@ -top_srcdir=@top_srcdir@ # Tell make where to find source files; this is needed for the makefiles. VPATH=@srcdir@ diff --git a/doc/emacs/cal-xtra.texi b/doc/emacs/cal-xtra.texi index 60588542356..de36ccc4f5f 100644 --- a/doc/emacs/cal-xtra.texi +++ b/doc/emacs/cal-xtra.texi @@ -613,7 +613,9 @@ each day's diary entries by their time of day. Here's how: @noindent For each day, this sorts diary entries that begin with a recognizable time of day according to their times. Diary entries without times come -first within each day. +first within each day. Note how the sort command is placed at the end +of the hook list, in case earlier members of the list change the order +of the diary entries, or add items. @vindex diary-include-string Your main diary file can include other files. This permits a group of diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 5698fd5ff58..89504764d7d 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -1508,7 +1508,14 @@ automatically just after midnight. You can force an update at any time by re-enabling appointment notification. Both these actions also display the day's diary buffer, unless you set @code{appt-display-diary} to @code{nil}. The appointments list is -also updated whenever the diary file is saved. +also updated whenever the diary file (or a file it includes; see +@iftex +@inforef{Fancy Diary Display,, emacs-xtra}) +@end iftex +@ifnottex +@ref{Fancy Diary Display}) +@end ifnottex +is saved. @findex appt-add @findex appt-delete diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 4de9ee4a57a..17337d2c592 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1137,6 +1137,7 @@ Dealing with Emacs Trouble Reporting Bugs +* Known Problems:: How to read about known problems and bugs. * Bug Criteria:: Have you really found a bug? * Understanding Bug Reporting:: How to report a bug effectively. * Checklist:: Steps to follow for a good bug report. diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 0390b7da910..2f90b30bf83 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -409,29 +409,76 @@ say something to the psychotherapist, you must end it by typing @section Reporting Bugs @cindex bugs - Sometimes you will encounter a bug in Emacs. Although we cannot -promise we can or will fix the bug, and we might not even agree that it -is a bug, we want to hear about problems you encounter. Often we agree -they are bugs and want to fix them. - - To make it possible for us to fix a bug, you must report it. In order -to do so effectively, you must know when and how to do it. - - Before reporting a bug, it is a good idea to see if it is already -known. You can find the list of known problems in the file -@file{etc/PROBLEMS} in the Emacs distribution; type @kbd{C-h C-p} to read -it. Some additional user-level problems can be found in @ref{Bugs and -problems, , Bugs and problems, efaq, GNU Emacs FAQ}. Looking up your -problem in these two documents might provide you with a solution or a -work-around, or give you additional information about related issues. + If you think you have found a bug in Emacs, please report it. We +cannot promise to fix it, or always to agree that it is a bug, but we +certainly want to hear about it. The same applies for new features +you would like to see added. The following sections will help you to +construct an effective bug report. @menu +* Known Problems:: How to read about known problems and bugs. * Criteria: Bug Criteria. Have you really found a bug? * Understanding Bug Reporting:: How to report a bug effectively. * Checklist:: Steps to follow for a good bug report. * Sending Patches:: How to send a patch for GNU Emacs. @end menu +@node Known Problems +@subsection Reading Existing Bug Reports and Known Problems + + Before reporting a bug, if at all possible please check to see if it +is already known about. Indeed, it may already have been fixed in a +later release of Emacs, or in the development version. Here is a list +of the main places you can read about known issues: + +@itemize +@item +The @file{etc/PROBLEMS} file in the Emacs distribution; type @kbd{C-h +C-p} to read it. This file contains a list of particularly well-known +issues that have been encountered in compiling, installing and running +Emacs. Often, there are suggestions for workarounds and solutions. + +@item +Some additional user-level problems can be found in @ref{Bugs and +problems, , Bugs and problems, efaq, GNU Emacs FAQ}. + +@item +The @samp{bug-gnu-emacs} mailing list (also available as the newsgroup +@samp{gnu.emacs.bug}). This is where you will find most Emacs bug +reports. You can read the list archives at +@url{http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs}. If you +like, you can also subscribe to the list. Be aware that the sole +purpose of this list is to provide the Emacs maintainers with +information about bugs and feature requests. Reports may contain +fairly large amounts of data; spectators should not complain about +this. + +@item +The bug tracker at @url{http://debbugs.gnu.org}. From early 2008, +reports from the @samp{bug-gnu-emacs} list have been sent here. The +tracker contains the same information as the mailing list, just in a +different format. You may prefer to browse and read reports using the +tracker. + +@item +The @samp{emacs-pretest-bug} mailing list. This list is no longer +used, and is mainly of historical interest. At one time, it was used +for bug reports in development (i.e., not yet released) versions of +Emacs. You can read the archives for 2003 to mid 2007 at +@url{http://lists.gnu.org/archive/html/emacs-pretest-bug/}. From +late 2007 to mid 2008, the address was an alias for the +@samp{emacs-devel} mailing list. From mid 2008 onwards, it has been +an alias for @samp{bug-gnu-emacs}. + +@item +The @samp{emacs-devel} mailing list. Sometimes people report bugs to +this mailing list. This is not the main purpose of the list, however, +and it is much better to send bug reports to the bug list. You should +not feel obliged to read this list before reporting a bug. + +@end itemize + + @node Bug Criteria @subsection When Is There a Bug @@ -540,56 +587,81 @@ well. @subsection Checklist for Bug Reports @cindex reporting bugs - The best way to send a bug report is to mail it electronically to the -Emacs maintainers at @email{bug-gnu-emacs@@gnu.org}. (If you want to -suggest a change as an improvement, use the same address.) - If you'd like to read the bug reports, you can find them on the -newsgroup @samp{gnu.emacs.bug}; keep in mind, however, that as a -spectator you should not criticize anything about what you see there. -The purpose of bug reports is to give information to the Emacs -maintainers. Spectators are welcome only as long as they do not -interfere with this. In particular, some bug reports contain fairly -large amounts of data; spectators should not complain about this. + Before reporting a bug, first try to see if the problem has already +been reported (@pxref{Known Problems}). - Please do not post bug reports using netnews; mail is more reliable -than netnews about reporting your correct address, which we may need -in order to ask you for more information. If your data is more than -500,000 bytes, please don't include it directly in the bug report; -instead, offer to send it on request, or make it available by ftp and -say where. +If you are able to, try the latest release of Emacs to see if the +problem has already been fixed. Even better is to try the latest +development version. We recognize that this is not easy for some +people, so do not feel that you absolutely must do this before making +a report. @findex report-emacs-bug - A convenient way to send a bug report for Emacs is to use the command -@kbd{M-x report-emacs-bug}. This sets up a mail buffer (@pxref{Sending -Mail}) and automatically inserts @emph{some} of the essential -information. However, it cannot supply all the necessary information; -you should still read and follow the guidelines below, so you can enter -the other crucial information by hand before you send the message. + The best way to write a bug report for Emacs is to use the command +@kbd{M-x report-emacs-bug}. This sets up a mail buffer +(@pxref{Sending Mail}) and automatically inserts @emph{some} of the +essential information. However, it cannot supply all the necessary +information; you should still read and follow the guidelines below, so +you can enter the other crucial information by hand before you send +the message. You may feel that some of the information inserted by +@kbd{M-x report-emacs-bug} is not relevant, but unless you are +absolutely sure it is best to leave it, so that the developers can +decide for themselves. + +When you have finished writing your report, type @kbd{C-c C-c} and it +will be sent to the Emacs maintainers at @email{bug-gnu-emacs@@gnu.org}. +(If you want to suggest an improvement or new feature, use the same +address.) If you cannot send mail from inside Emacs, you can copy the +text of your report to your normal mail client and send it to that +address. Or you can simply send an email to that address describing +the problem. + +Your report will be sent to the @samp{bug-gnu-emacs} mailing list, and +stored in the tracker at @url{http://debbugs.gnu.org}. Please try to +include a valid reply email address, in case we need to ask you for +more information about your report. Submissions are moderated, so +there may be a delay before your report appears. + +You do not need to know how the @url{http://debbugs.gnu.org} bug +tracker works in order to report a bug, but if you want to, you can +read the tracker's online documentation to see the various features +you can use. + +All mail sent to the @samp{bug-gnu-emacs} mailing list is also +gatewayed to the @samp{bug.gnu.emacs} newsgroup. The reverse is also +true, but we ask you not to post bug reports via the newsgroup. It +can make it much harder to contact you if we need to ask for more +information, and it does not integrate well with the bug tracker. + +If your data is more than 500,000 bytes, please don't include it +directly in the bug report; instead, offer to send it on request, or +make it available by ftp and say where. To enable maintainers to investigate a bug, your report should include all these things: @itemize @bullet @item -The version number of Emacs. Without this, we won't know whether there -is any point in looking for the bug in the current version of GNU -Emacs. +The version number of Emacs. Without this, we won't know whether there is any +point in looking for the bug in the current version of GNU Emacs. -You can get the version number by typing @kbd{M-x emacs-version -@key{RET}}. If that command does not work, you probably have something -other than GNU Emacs, so you will have to report the bug somewhere -else. +@kbd{M-x report-emacs-bug} includes this information automatically, +but if you are not using that command for your report you can get the +version number by typing @kbd{M-x emacs-version @key{RET}}. If that +command does not work, you probably have something other than GNU +Emacs, so you will have to report the bug somewhere else. @item The type of machine you are using, and the operating system name and -version number. @kbd{M-x emacs-version @key{RET}} provides this -information too. Copy its output from the @samp{*Messages*} buffer, so -that you get it all and get it accurately. +version number (again, automatically included by @kbd{M-x +report-emacs-bug}). @kbd{M-x emacs-version @key{RET}} provides this +information too. Copy its output from the @samp{*Messages*} buffer, +so that you get it all and get it accurately. @item The operands given to the @code{configure} command when Emacs was -installed. +installed (automatically included by @kbd{M-x report-emacs-bug}). @item A complete list of any modifications you have made to the Emacs source. @@ -619,12 +691,15 @@ the last line is terminated, but try telling the bugs that). @item The precise commands we need to type to reproduce the bug. +If at all possible, give a full recipe for an Emacs started with the +@samp{-Q} option (@pxref{Initial Options}). This bypasses your +@file{.emacs} customizations. @findex open-dribble-file @cindex dribble file @cindex logging keystrokes -The easy way to record the input to Emacs precisely is to write a -dribble file. To start the file, execute the Lisp expression +One way to record the input to Emacs precisely is to write a dribble +file. To start the file, execute the Lisp expression @example (open-dribble-file "~/dribble") @@ -735,7 +810,7 @@ Check whether any programs you have loaded into the Lisp world, including your @file{.emacs} file, set any variables that may affect the functioning of Emacs. Also, see whether the problem happens in a freshly started Emacs without loading your @file{.emacs} file (start -Emacs with the @code{-q} switch to prevent loading the init file). If +Emacs with the @code{-Q} switch to prevent loading the init files). If the problem does @emph{not} occur then, you must report the precise contents of any programs that you must load into the Lisp world in order to cause the problem to occur. @@ -907,12 +982,10 @@ your best to help. @itemize @bullet @item Send an explanation with your changes of what problem they fix or what -improvement they bring about. For a bug fix, just include a copy of the -bug report, and explain why the change fixes the bug. - -(Referring to a bug report is not as good as including it, because then -we will have to look it up, and we have probably already deleted it if -we've already fixed the bug.) +improvement they bring about. For a fix for an existing bug, it is +best to reply to the relevant discussion on the @samp{bug-gnu-emacs} +list, or item in the @url{http://debbugs.gnu.org} tracker. Explain +why your change fixes the bug. @item Always include a proper bug report for the problem you think you have diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog index 1ab06891961..ff227a1f119 100644 --- a/doc/lispintro/ChangeLog +++ b/doc/lispintro/ChangeLog @@ -1,3 +1,9 @@ +2010-09-21 Glenn Morris + + * cons-1.eps, cons-2.eps, cons-2a.eps, cons-3.eps, cons-4.eps: + * cons-5.eps, lambda-1.eps, lambda-2.eps, lambda-3.eps: + Add first line EPSF magic comment. (Bug#7064) + 2010-06-23 Glenn Morris * emacs-lisp-intro.texi: Untabify. diff --git a/doc/lispintro/cons-1.eps b/doc/lispintro/cons-1.eps index fbae699e21b..42c350139da 100644 --- a/doc/lispintro/cons-1.eps +++ b/doc/lispintro/cons-1.eps @@ -1,14 +1,11 @@ -%! +%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 35 711 289 757 %%Title: cons-cell-diagram1 %%CreationDate: Wed Mar 8 14:26:58 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% -% Due to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1 -% -% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -% Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +% 2008, 2009, 2010 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/cons-2.eps b/doc/lispintro/cons-2.eps index 703a842e046..8ae9d8a9190 100644 --- a/doc/lispintro/cons-2.eps +++ b/doc/lispintro/cons-2.eps @@ -1,14 +1,11 @@ -%! +%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 15 712 321 775 %%Title: cons-cell-diagram2 %%CreationDate: Wed Mar 8 14:26:39 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% -% Due to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1 -% -% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -% Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +% 2008, 2009, 2010 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/cons-2a.eps b/doc/lispintro/cons-2a.eps index 4d2ae666590..916417adf9c 100644 --- a/doc/lispintro/cons-2a.eps +++ b/doc/lispintro/cons-2a.eps @@ -1,14 +1,11 @@ -%! +%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 15 702 300 767 %%Title: cons-cell-diagram2a %%CreationDate: Tue Mar 14 15:09:30 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% -% Due to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1 -% -% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -% Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +% 2008, 2009, 2010 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/cons-3.eps b/doc/lispintro/cons-3.eps index b1aa60c1c99..f6fddf0a32a 100644 --- a/doc/lispintro/cons-3.eps +++ b/doc/lispintro/cons-3.eps @@ -1,14 +1,11 @@ -%! +%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: -1 691 324 757 %%Title: cons-cell-diagram3 %%CreationDate: Wed Mar 8 14:25:41 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% -% Due to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1 -% -% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -% Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +% 2008, 2009, 2010 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/cons-4.eps b/doc/lispintro/cons-4.eps index c61b47bcbce..77389632dfd 100644 --- a/doc/lispintro/cons-4.eps +++ b/doc/lispintro/cons-4.eps @@ -1,14 +1,11 @@ -%! +%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 6 681 355 758 %%Title: cons-cell-diagram4 %%CreationDate: Wed Mar 8 14:25:06 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% -% Due to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1 -% -% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -% Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +% 2008, 2009, 2010 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/cons-5.eps b/doc/lispintro/cons-5.eps index 87c7f645b5e..67423d5354e 100644 --- a/doc/lispintro/cons-5.eps +++ b/doc/lispintro/cons-5.eps @@ -1,14 +1,11 @@ -%! +%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 15 680 305 764 %%Title: cons-cell-diagram5 %%CreationDate: Wed Mar 8 14:27:28 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% -% Due to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1 -% -% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -% Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +% 2008, 2009, 2010 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/lambda-1.eps b/doc/lispintro/lambda-1.eps index f48bdf20ff7..3510c40e005 100644 --- a/doc/lispintro/lambda-1.eps +++ b/doc/lispintro/lambda-1.eps @@ -1,14 +1,11 @@ -%! +%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 33 710 173 759 %%Title: lambda-diagram1 %%CreationDate: Wed Mar 8 14:31:53 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% -% Due to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1 -% -% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -% Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +% 2008, 2009, 2010 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/lambda-2.eps b/doc/lispintro/lambda-2.eps index 923d09657b8..f60c2b56ad3 100644 --- a/doc/lispintro/lambda-2.eps +++ b/doc/lispintro/lambda-2.eps @@ -1,14 +1,11 @@ -%! +%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 33 730 240 777 %%Title: lambda-diagram2 %%CreationDate: Wed Mar 8 14:33:09 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% -% Due to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1 -% -% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -% Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +% 2008, 2009, 2010 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispintro/lambda-3.eps b/doc/lispintro/lambda-3.eps index be7c0538e32..67c55093e7f 100644 --- a/doc/lispintro/lambda-3.eps +++ b/doc/lispintro/lambda-3.eps @@ -1,14 +1,11 @@ -%! +%!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 33 728 211 777 %%Title: lambda-diagram3 %%CreationDate: Wed Mar 8 14:33:49 1995 %%Creator: Tgif-2.16-p4 by William Chia-Wei Cheng (william@cs.UCLA.edu) -% -% Due to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1 -% -% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -% Free Software Foundation, Inc. +% Copyright (C) 1995, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +% 2008, 2009, 2010 Free Software Foundation, Inc. % % This file is part of GNU Emacs. % diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index e3df5fab9e9..ec065e9ce76 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,7 @@ +2010-09-18 Stefan Monnier + + * text.texi (Special Properties): Clarify when modification-hooks run. + 2010-09-11 Stefan Monnier * syntax.texi (Syntax Flags): Document new `c' flag. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index ff4e65d299f..04e1e714133 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -3230,12 +3230,16 @@ the @code{line-prefix} variable). @xref{Truncation}. @cindex hooks for changing a character @kindex modification-hooks @r{(text property)} If a character has the property @code{modification-hooks}, then its -value should be a list of functions; modifying that character calls all -of those functions. Each function receives two arguments: the beginning -and end of the part of the buffer being modified. Note that if a -particular modification hook function appears on several characters -being modified by a single primitive, you can't predict how many times -the function will be called. +value should be a list of functions; modifying that character calls +all of those functions before the actual modification. Each function +receives two arguments: the beginning and end of the part of the +buffer being modified. Note that if a particular modification hook +function appears on several characters being modified by a single +primitive, you can't predict how many times the function will +be called. +Furthermore, insertion will not modify any existing character, so this +hook will only be run when removing some characters, replacing them +with others, or changing their text-properties. If these functions modify the buffer, they should bind @code{inhibit-modification-hooks} to @code{t} around doing so, to diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog index 47f059e7d3c..4688c27f9b5 100644 --- a/doc/man/ChangeLog +++ b/doc/man/ChangeLog @@ -1,3 +1,7 @@ +2010-09-25 Ulrich Mueller + + * etags.1: xz compression is now supported. + 2010-08-26 Sven Joachim * emacs.1: Mention "maximized" value for the "fullscreen" X resource. diff --git a/doc/man/etags.1 b/doc/man/etags.1 index 7b515807782..cddf7295595 100644 --- a/doc/man/etags.1 +++ b/doc/man/etags.1 @@ -62,7 +62,7 @@ Files specified with absolute file names will be recorded with absolute file names. Files generated from a source file\-\-like a C file generated from a source Cweb file\-\-will be recorded with the name of the source file. -Compressed files are supported using gzip and bzip2. +Compressed files are supported using gzip, bzip2, and xz. The programs recognize the language used in an input file based on its file name and contents. The \fB\-\-language\fP switch can be used to force parsing of the file names following the switch according to the given diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 29cf98e3330..8584e4c26b5 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,84 @@ +2010-09-29 Daiki Ueno + + * epa.texi (Bug Reports): New section. + +2010-09-29 Glenn Morris + + * Makefile.in (top_srcdir): Remove unused variable. + +2010-09-26 Lars Magne Ingebrigtsen + + * gnus-news.texi: Mention nnimap-inbox. + + * gnus.texi (Picons): Document gnus-picon-inhibit-top-level-domains. + +2010-09-26 Julien Danjou + + * gnus.texi (Oort Gnus): Remove mention of ssl.el + +2010-09-26 Lars Magne Ingebrigtsen + + * gnus.texi (Security): Remove gpg.el mention. + +2010-09-26 Andreas Seltenreich + + * gnus.texi (Browse Foreign Server): New variable + gnus-browse-subscribe-newsgroup-method. + + * gnus-news.texi: Mention it. + +2010-09-26 Lars Magne Ingebrigtsen + + * gnus.texi (NoCeM): Removed. + (Startup Variables): No jingle. + +2010-09-25 Ulrich Mueller + + * woman.texi (Interface Options): xz compression is now supported. + +2010-09-25 Lars Magne Ingebrigtsen + + * gnus.texi (Article Commands): Document gnus-fetch-partial-articles. + (Unavailable Servers): Document gnus-server-copy-server. + (Using IMAP): Document the new nnimap. + +2010-09-25 Julien Danjou + + * gnus.texi (Customizing Articles): Remove gnus-treat-translate + +2010-09-24 Glenn Morris + + * url.texi (Disk Caching): Tweak previous change. + +2010-09-24 Julien Danjou + + * url.texi (Disk Caching): Mention url-cache-expire-time, + url-cache-expired, and url-fetch-from-cache. + +2010-09-24 Julien Danjou + + * gnus.texi: Add Gravatars. + +2010-09-23 Lars Magne Ingebrigtsen + + * gnus.texi (Startup Variables): Mention gnus-use-backend-marks. + +2010-09-21 Lars Magne Ingebrigtsen + + * gnus.texi (Expunging mailboxes): Update name of the expunging + command. + +2010-09-20 Katsumi Yamaoka + + * emacs-mime.texi (rfc2047): Update description for + rfc2047-encode-parameter. + +2010-09-13 Michael Albinus + + * tramp.texi (Inline methods): Remove "ssh1_old", "ssh2_old" and + "fish" methods. + (External methods): Remove "scp1_old" and "scp2_old" methods. + 2010-09-09 Michael Albinus * tramp.texi: Remove Japanese manual. Fix typo. diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in index 18d9d9a6377..063b40975bf 100644 --- a/doc/misc/Makefile.in +++ b/doc/misc/Makefile.in @@ -1,7 +1,8 @@ #### Makefile for documentation other than the Emacs manual. # Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -# 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2004, 2005, 2006, 2007, 2008, 2009, 2010 +# Free Software Foundation, Inc. # This file is part of GNU Emacs. @@ -23,7 +24,6 @@ # subdirectory of the source tree. This is # set by the configure script's `--srcdir' option. srcdir=@srcdir@ -top_srcdir=@top_srcdir@ # Tell make where to find source files; this is needed for the makefiles. VPATH=@srcdir@ diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index 451d6d0a5ff..4259fccb390 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -1986,7 +1986,8 @@ If it is @code{combined} then the region in buffer C will look like this: @comment Use @set to avoid triggering merge conflict detectors like CVS. -@set seven-left +@set seven-left <<<<<<< +@set seven-right >>>>>>> @example @value{seven-left} variant A the difference region from buffer A diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index 3e996e945fb..2a0e8569266 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi @@ -1469,21 +1469,9 @@ Decode a string and return the results. @item rfc2047-encode-parameter @findex rfc2047-encode-parameter -Encode a parameter in the RFC2047-like style. This is a replacement for -the @code{rfc2231-encode-string} function. @xref{rfc2231}. - -When attaching files as @acronym{MIME} parts, we should use the RFC2231 -encoding to specify the file names containing non-@acronym{ASCII} -characters. However, many mail softwares don't support it in practice -and recipients won't be able to extract files with correct names. -Instead, the RFC2047-like encoding is acceptable generally. This -function provides the very RFC2047-like encoding, resigning to such a -regrettable trend. To use it, put the following line in your -@file{~/.gnus.el} file: - -@lisp -(defalias 'mail-header-encode-parameter 'rfc2047-encode-parameter) -@end lisp +Encode a parameter in the RFC2047-like style. This is a substitution +for the @code{rfc2231-encode-string} function, that is the standard but +many mailers don't support it. @xref{rfc2231}. @end table diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi index f9c48b1588a..36f74415974 100644 --- a/doc/misc/epa.texi +++ b/doc/misc/epa.texi @@ -65,7 +65,8 @@ called EasyPG Library. @menu * Overview:: * Quick start:: -* Commands:: +* Commands:: +* Bug Reports:: @end menu @node Overview @@ -398,6 +399,28 @@ If non-@code{nil}, disable auto-saving when opening an encrypted file. The default value is @code{t}. @end defvar +@node Bug Reports +@chapter Bug Reports + +Bugs and problems with EasyPG Assistant are actively worked on by the +Emacs development team. Feature requests and suggestions are also +more than welcome. Use @kbd{M-x report-emacs-bug}, @pxref{Bugs, , +Bugs, emacs, Reporting Bugs}. + +When submitting a bug report, please try to describe in excruciating +detail the steps required to reproduce the problem. Also try to +collect necessary information to fix the bug, such as: + +@itemize @bullet +@item the GnuPG version. Send the output of @samp{gpg --version}. +@item the GnuPG configuration. Send the contents of @file{~/.gnupg/gpg.conf}. +@end itemize + +Before reporting the bug, you should set @code{epg-debug} in the +@file{~/.emacs} file and repeat the bug. Then, include the contents +of the @samp{ *epg-debug*} buffer. Note that the first letter of the +buffer name is a whitespace. + @bye @c End: diff --git a/doc/misc/gnus-news.texi b/doc/misc/gnus-news.texi index e820ceae4a8..028539a7fb4 100644 --- a/doc/misc/gnus-news.texi +++ b/doc/misc/gnus-news.texi @@ -18,6 +18,17 @@ @itemize @bullet +@item Supported Emacs versions +The following Emacs versions are supported by No Gnus: +@itemize @bullet + +@item Emacs 22 and up +@item XEmacs 21.4 +@item XEmacs 21.5 +@item SXEmacs + +@end itemize + @item Installation changes @itemize @bullet @@ -55,6 +66,13 @@ remove-installed-shadows}. @itemize @bullet +@item New version of @code{nnimap} + +@code{nnimap} has been reimplemented in a mostly-compatible way. See +the Gnus manual for a description of the new interface. In +particular, @code{nnimap-inbox} and the client side split method has +changed. + @item Gnus includes the Emacs Lisp @acronym{SASL} library. This provides a clean @acronym{API} to @acronym{SASL} mechanisms from @@ -87,6 +105,12 @@ EasyPG is included in Emacs 23 and available separately as well. @c ************************ @itemize @bullet + +@item +Symbols like @code{gcc-self} now has the same presedence rules in +@code{gnus-parameters} as other ``real'' variables: The last match +wins instead of the first match. + @item Old intermediate incoming mail files (@file{Incoming*}) are deleted after a couple of days, not immediately. @xref{Mail Source @@ -230,6 +254,16 @@ of the "Whomever writes:" line. You need to set @code{message-insert-formatted-citation-line} as well. @end itemize +@item Changes in Browse Server mode + +@itemize @bullet +@item Gnus' sophisticated subscription methods are now available in +Browse Server buffers as well using the variable +@code{gnus-browse-subscribe-newsgroup-method}. + +@end itemize + + @item Changes in back ends @itemize @bullet @@ -320,6 +354,8 @@ be unchanged except that the marks will be removed when copying or moving articles to a group that has not turned auto-expire on. @xref{Expiring Mail}. +@item NoCeM support has been removed. + @end itemize @end itemize diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 7248897f05b..c1acf7e0d8a 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -589,7 +589,7 @@ Article Treatment * Article Buttons:: Click on URLs, Message-IDs, addresses and the like. * Article Button Levels:: Controlling appearance of buttons. * Article Date:: Grumble, UT! -* Article Display:: Display various stuff---X-Face, Picons, Smileys +* Article Display:: Display various stuff---X-Face, Picons, Smileys, Gravatars * Article Signature:: What is a signature? * Article Miscellanea:: Various other stuff. @@ -629,9 +629,9 @@ Select Methods * Server Buffer:: Making and editing virtual servers. * Getting News:: Reading USENET news with Gnus. +* Using @acronym{IMAP}:: Reading mail from @acronym{IMAP}. * Getting Mail:: Reading your personal mail with Gnus. * Browsing the Web:: Getting messages from a plethora of Web sources. -* IMAP:: Using Gnus as a @acronym{IMAP} client. * Other Sources:: Reading directories, files. * Combined Groups:: Combining groups into one group. * Email Based Diary:: Using mails to manage diary events in Gnus. @@ -698,15 +698,6 @@ Browsing the Web * RSS:: Reading RDF site summary. * Customizing W3:: Doing stuff to Emacs/W3 from Gnus. -@acronym{IMAP} - -* Splitting in IMAP:: Splitting mail with nnimap. -* Expiring in IMAP:: Expiring mail with nnimap. -* Editing IMAP ACLs:: Limiting/enabling other users access to a mailbox. -* Expunging mailboxes:: Equivalent of a ``compress mailbox'' button. -* A note on namespaces:: How to (not) use @acronym{IMAP} namespace in Gnus. -* Debugging IMAP:: What to do when things don't work. - Other Sources * Directory Groups:: You can read a directory as if it was a newsgroup. @@ -808,7 +799,6 @@ Various * Highlighting and Menus:: Making buffers look all nice and cozy. * Buttons:: Get tendinitis in ten easy steps! * Daemons:: Gnus can do things behind your back. -* NoCeM:: How to avoid spam and other fatty foods. * Undo:: Some actions can be undone. * Predicate Specifiers:: Specifying predicates. * Moderation:: What to do if you're a moderator. @@ -1637,14 +1627,11 @@ of doing your job. Note that this variable is used before @vindex gnus-no-groups-message Message displayed by Gnus when no groups are available. -@item gnus-play-startup-jingle -@vindex gnus-play-startup-jingle -If non-@code{nil}, play the Gnus jingle at startup. - -@item gnus-startup-jingle -@vindex gnus-startup-jingle -Jingle to be played if the above variable is non-@code{nil}. The -default is @samp{Tuxedomoon.Jingle4.au}. +@item gnus-use-backend-marks +@vindex gnus-use-backend-marks +If non-@code{nil}, Gnus will store article marks both in the +@file{.newsrc.eld} file and in the backends. This will slow down +group operation some. @end table @@ -1996,8 +1983,7 @@ functions for snarfing info on the group. @vindex gnus-group-update-hook @findex gnus-group-highlight-line @code{gnus-group-update-hook} is called when a group line is changed. -It will not be called when @code{gnus-visual} is @code{nil}. This hook -calls @code{gnus-group-highlight-line} by default. +It will not be called when @code{gnus-visual} is @code{nil}. @node Group Maneuvering @@ -2611,18 +2597,6 @@ for a directory name (@code{gnus-group-make-directory-group}). @findex gnus-group-make-help-group Make the Gnus help group (@code{gnus-group-make-help-group}). -@item G a -@kindex G a (Group) -@cindex (ding) archive -@cindex archive group -@findex gnus-group-make-archive-group -@vindex gnus-group-archive-directory -@vindex gnus-group-recent-archive-directory -Make a Gnus archive group (@code{gnus-group-make-archive-group}). By -default a group pointing to the most recent articles will be created -(@code{gnus-group-recent-archive-directory}), but given a prefix, a full -group will be created from @code{gnus-group-archive-directory}. - @item G D @kindex G D (Group) @findex gnus-group-enter-directory @@ -3624,8 +3598,12 @@ Enter the current group (@code{gnus-browse-select-group}). @item u @kindex u (Browse) @findex gnus-browse-unsubscribe-current-group +@vindex gnus-browse-subscribe-newsgroup-method Unsubscribe to the current group, or, as will be the case here, -subscribe to it (@code{gnus-browse-unsubscribe-current-group}). +subscribe to it (@code{gnus-browse-unsubscribe-current-group}). You +can affect the way the new group is entered into the Group buffer +using the variable @code{gnus-browse-subscribe-newsgroup-method}. See +@pxref{Subscription Methods} for available options. @item l @itemx q @@ -5217,19 +5195,6 @@ used for fetching the file. If fetching from the first site is unsuccessful, Gnus will attempt to go through @code{gnus-group-faq-directory} and try to open them one by one. -@item H c -@kindex H c (Group) -@findex gnus-group-fetch-charter -@vindex gnus-group-charter-alist -@cindex charter -Try to open the charter for the current group in a web browser -(@code{gnus-group-fetch-charter}). Query for a group if given a -prefix argument. - -Gnus will use @code{gnus-group-charter-alist} to find the location of -the charter. If no location is known, Gnus will fetch the control -messages for the group, which in some cases includes the charter. - @item H C @kindex H C (Group) @findex gnus-group-fetch-control @@ -9250,7 +9215,8 @@ these articles easier. * Article Buttons:: Click on URLs, Message-IDs, addresses and the like. * Article Button Levels:: Controlling appearance of buttons. * Article Date:: Grumble, UT! -* Article Display:: Display various stuff---X-Face, Picons, Smileys +* Article Display:: Display various stuff: + X-Face, Picons, Gravatars, Smileys. * Article Signature:: What is a signature? * Article Miscellanea:: Various other stuff. @end menu @@ -9838,6 +9804,9 @@ Customization, emacs-mime, The Emacs MIME Manual}) to convert the can use include: @table @code +@item gnus-article-html +Use Gnus rendered based on w3m. + @item w3 Use Emacs/W3. @@ -10102,18 +10071,6 @@ string is invalid. An alist of @code{(RATE . REGEXP)} pairs used by the function @code{gnus-button-mid-or-mail-heuristic}. -@c Stuff related to gnus-button-tex-level - -@item gnus-button-ctan-handler -@findex gnus-button-ctan-handler -The function to use for displaying CTAN links. It must take one -argument, the string naming the URL. - -@item gnus-ctan-url -@vindex gnus-ctan-url -Top directory of a CTAN (Comprehensive TeX Archive Network) archive used -by @code{gnus-button-ctan-handler}. - @c Misc stuff @item gnus-article-button-face @@ -10186,14 +10143,6 @@ Related variables and functions include @code{gnus-button-mid-or-mail-heuristic}, and @code{gnus-button-mid-or-mail-heuristic-alist}. -@item gnus-button-tex-level -@vindex gnus-button-tex-level -Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN -URLs. See the variables @code{gnus-ctan-url}, -@code{gnus-button-ctan-handler}, -@code{gnus-button-ctan-directory-regexp}, and -@code{gnus-button-handle-ctan-bogus-regexp}. - @end table @@ -10291,6 +10240,7 @@ preferred format automatically. @cindex picons @cindex x-face @cindex smileys +@cindex gravatars These commands add various frivolous display gimmicks to the article buffer in Emacs versions that support them. @@ -10307,6 +10257,9 @@ their messages with (@pxref{Smileys}). Picons, on the other hand, reside on your own system, and Gnus will try to match the headers to what you have (@pxref{Picons}). +Gravatars reside on-line and are fetched from +@uref{http://www.gravatar.com/} (@pxref{Gravatars}). + All these functions are toggles---if the elements already exist, they'll be removed. @@ -10345,6 +10298,17 @@ Piconify all mail headers (i. e., @code{Cc}, @code{To}) Piconify all news headers (i. e., @code{Newsgroups} and @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}). +@item W D g +@kindex W D g (Summary) +@findex gnus-treat-from-gravatar +Gravatarify the @code{From} header (@code{gnus-treat-from-gravatar}). + +@item W D h +@kindex W D h (Summary) +@findex gnus-treat-mail-gravatar +Gravatarify all mail headers (i. e., @code{Cc}, @code{To}) +(@code{gnus-treat-from-gravatar}). + @item W D D @kindex W D D (Summary) @findex gnus-article-remove-images @@ -10830,6 +10794,16 @@ Generate and print a PostScript image of the article buffer be run just before printing the buffer. An alternative way to print article is to use Muttprint (@pxref{Saving Articles}). +@item A C +@vindex gnus-fetch-partial-articles +@findex gnus-summary-show-complete-article +If @code{gnus-fetch-partial-articles} is non-@code{nil}, Gnus will +fetch partial articles, if the backend it fetches them from supports +it. Currently only @code{nnimap} does. If you're looking at a +partial article, and want to see the complete article instead, then +the @kbd{A C} command (@code{gnus-summary-show-complete-article}) will +do so. + @end table @@ -11553,18 +11527,6 @@ sieve. @table @kbd -@item H f -@kindex H f (Summary) -@findex gnus-summary-fetch-faq -@vindex gnus-group-faq-directory -Try to fetch the @acronym{FAQ} (list of frequently asked questions) -for the current group (@code{gnus-summary-fetch-faq}). Gnus will try -to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which -is usually a directory on a remote machine. This variable can also be -a list of directories. In that case, giving a prefix to this command -will allow you to choose between the various sites. @code{ange-ftp} -or @code{efs} will probably be used for fetching the file. - @item H d @kindex H d (Summary) @findex gnus-summary-describe-group @@ -11890,8 +11852,7 @@ read the same article more than once. Unless, of course, somebody has posted it to several groups separately. Posting the same article to several groups (not cross-posting) is called @dfn{spamming}, and you are by law required to send nasty-grams to anyone who perpetrates such a -heinous crime. You may want to try NoCeM handling to filter out spam -(@pxref{NoCeM}). +heinous crime. Remember: Cross-posting is kinda ok, but posting the same article separately to several groups is not. Massive cross-posting (aka. @@ -12022,7 +11983,7 @@ To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to install an OpenPGP implementation such as GnuPG. The Lisp interface to GnuPG included with Emacs is called EasyPG (@pxref{Top, ,EasyPG, epa, EasyPG Assistant user's manual}), but PGG (@pxref{Top, ,PGG, pgg, -PGG Manual}), Mailcrypt, and gpg.el are also supported. +PGG Manual}), and Mailcrypt are also supported. @item To handle @acronym{S/MIME} message, you need to install OpenSSL. OpenSSL 0.9.6 @@ -12061,7 +12022,7 @@ public-key matching the @samp{From:} header as the recipient; @vindex mml1991-use Symbol indicating elisp interface to OpenPGP implementation for @acronym{PGP} messages. The default is @code{epg}, but @code{pgg}, -@code{mailcrypt}, and @code{gpg} are also supported although +and @code{mailcrypt} are also supported although deprecated. By default, Gnus uses the first available interface in this order. @@ -12069,7 +12030,7 @@ this order. @vindex mml2015-use Symbol indicating elisp interface to OpenPGP implementation for @acronym{PGP/MIME} messages. The default is @code{epg}, but -@code{pgg}, @code{mailcrypt}, and @code{gpg} are also supported +@code{pgg}, and @code{mailcrypt} are also supported although deprecated. By default, Gnus uses the first available interface in this order. @@ -12623,6 +12584,8 @@ controlling variable is a predicate list, as described above. @vindex gnus-treat-from-picon @vindex gnus-treat-mail-picon @vindex gnus-treat-newsgroups-picon +@vindex gnus-treat-from-gravatar +@vindex gnus-treat-mail-gravatar @vindex gnus-treat-display-smileys @vindex gnus-treat-body-boundary @vindex gnus-treat-display-x-face @@ -12641,7 +12604,6 @@ controlling variable is a predicate list, as described above. @vindex gnus-treat-highlight-headers @vindex gnus-treat-highlight-signature @vindex gnus-treat-play-sounds -@vindex gnus-treat-translate @vindex gnus-treat-x-pgp-sig @vindex gnus-treat-unfold-headers @vindex gnus-treat-fold-headers @@ -12689,6 +12651,11 @@ possible but those listed are probably sufficient for most people. @xref{Picons}. +@item gnus-treat-from-gravatar (head) +@item gnus-treat-mail-gravatar (head) + +@xref{Gravatars}. + @item gnus-treat-display-smileys (t, integer) @item gnus-treat-body-boundary (head) @@ -12743,8 +12710,6 @@ is controlled by @code{gnus-body-boundary-delimiter}. @vindex gnus-treat-play-sounds @item gnus-treat-play-sounds -@vindex gnus-treat-translate -@item gnus-treat-translate @item gnus-treat-ansi-sequences (t) @vindex gnus-treat-x-pgp-sig @item gnus-treat-x-pgp-sig (head) @@ -13735,9 +13700,9 @@ The different methods all have their peculiarities, of course. @menu * Server Buffer:: Making and editing virtual servers. * Getting News:: Reading USENET news with Gnus. +* Using @acronym{IMAP}:: Reading mail from @acronym{IMAP}. * Getting Mail:: Reading your personal mail with Gnus. * Browsing the Web:: Getting messages from a plethora of Web sources. -* IMAP:: Using Gnus as a @acronym{IMAP} client. * Other Sources:: Reading directories, files. * Combined Groups:: Combining groups into one group. * Email Based Diary:: Using mails to manage diary events in Gnus. @@ -14150,6 +14115,14 @@ Close the connections to all servers in the buffer Remove all marks to whether Gnus was denied connection from any servers (@code{gnus-server-remove-denials}). +@item c +@kindex c (Server) +@findex gnus-server-copy-server +Copy a server and give it a new name +(@code{gnus-server-copy-server}). This can be useful if you have a +complex method definition, and want to use the same definition towards +a different (physical) server. + @item L @kindex L (Server) @findex gnus-server-offline-server @@ -14814,6 +14787,121 @@ there. @end table +@node Using @acronym{IMAP} +@section Using @acronym{IMAP} +@cindex imap + +The most popular mail backend is probably @code{nnimap}, which +provides access to @acronym{IMAP} servers. @acronym{IMAP} servers +store mail remotely, so the client doesn't store anything locally. +This means that it's a convenient choice when you're reading your mail +from different locations, or with different user agents. + +@menu +* Connecting to an @acronym{IMAP} Server:: Getting started with @acronym{IMAP}. +* Customizing the @acronym{IMAP} Connection:: Variables for @acronym{IMAP} connection. +* Client-Side @acronym{IMAP} Splitting:: Put mail in the correct mail box. +@end menu + + +@node Connecting to an @acronym{IMAP} Server +@subsection Connecting to an @acronym{IMAP} Server + +Connecting to an @acronym{IMAP} can be very easy. Type @kbd{B} in the +group buffer, or (if your primary interest is reading email), say +something like: + +@example +(setq gnus-select-method + '(nnimap "imap.gmail.com")) +@end example + +You'll be prompted for a user name and password. If you grow tired of +that, then add the following to your @file{~/.authinfo} file: + +@example +machine imap.gmail.com login password port imap +@end example + +That should basically be it for most users. + + +@node Customizing the @acronym{IMAP} Connection +@subsection Customizing the @acronym{IMAP} Connection + +Here's an example method that's more complex: + +@example +(nnimap "imap.gmail.com" + (nnimap-inbox "INBOX") + (nnimap-split-methods ,nnmail-split-methods) + (nnimap-expunge t) + (nnimap-stream 'ssl) + (nnir-search-engine imap) + (nnimap-expunge-inbox t)) +@end example + +@table @code +@item nnimap-address +The address of the server, like @samp{imap.gmail.com}. + +@item nnimap-server-port +If the server uses a non-standard port, that can be specified here. A +typical port would be @samp{imap} or @samp{imaps}. + +@item nnimap-stream +How @code{nnimap} should connect to the server. Possible values are: + +@table @code +@item ssl +This is the default, and this uses standard +@acronym{TLS}/@acronym{SSL} connection. + +@item network +Non-encrypted and unsafe straight socket connection. + +@item starttls +Encrypted @acronym{STARTTLS} over the normal @acronym{IMAP} port. + +@item shell +If you need to tunnel via other systems to connect to the server, you +can use this option, and customize @code{nnimap-shell-program} to be +what you need. + +@end table + +@item nnimap-authenticator +Some @acronym{IMAP} servers allow anonymous logins. In that case, +this should be set to @code{anonymous}. + +@item nnimap-streaming +Virtually all @code{IMAP} server support fast streaming of data. If +you have problems connecting to the server, try setting this to @code{nil}. + +@end table + + +@node Client-Side @acronym{IMAP} Splitting +@subsection Client-Side @acronym{IMAP} Splitting + +Many people prefer to do the sorting/splitting of mail into their mail +boxes on the @acronym{IMAP} server. That way they don't have to +download the mail they're not all that interested in. + +If you do want to do client-side mail splitting, then the following +variables are relevant: + +@table @code +@item nnimap-inbox +This is the @acronym{IMAP} mail box that will be scanned for new mail. + +@item nnimap-split-methods +Uses the same syntax as @code{nnmail-split-methods} (@pxref{Splitting +Mail}). + +@end table + + @node Getting Mail @section Getting Mail @cindex reading mail @@ -15372,10 +15460,7 @@ Get mail from a @acronym{IMAP} server. If you don't want to use @acronym{IMAP} as intended, as a network mail reading protocol (ie with nnimap), for some reason or other, Gnus let you treat it similar to a @acronym{POP} server and fetches articles from a given -@acronym{IMAP} mailbox. @xref{IMAP}, for more information. - -Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you -may need external programs and libraries, @xref{IMAP}. +@acronym{IMAP} mailbox. @xref{Using @acronym{IMAP}}, for more information. Keywords: @@ -15844,7 +15929,7 @@ after @code{save-excursion} and @code{save-restriction} in the example above. Also note that with the nnimap backend, message bodies will not be downloaded by default. You need to set @code{nnimap-split-download-body} to @code{t} to do that -(@pxref{Splitting in IMAP}). +(@pxref{Client-Side @acronym{IMAP} Splitting}). @item (! @var{func} @var{split}) If the split is a list, and the first element is @code{!}, then @@ -16608,6 +16693,7 @@ Spool}). @end menu + @node Unix Mail Box @subsubsection Unix Mail Box @cindex nnmbox @@ -17733,739 +17819,6 @@ Put that in your @file{.emacs} file, and hitting links in W3-rendered follow the link. -@node IMAP -@section IMAP -@cindex nnimap -@cindex @acronym{IMAP} - -@acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}), -think of it as a modernized @acronym{NNTP}. Connecting to a @acronym{IMAP} -server is much similar to connecting to a news server, you just -specify the network address of the server. - -@acronym{IMAP} has two properties. First, @acronym{IMAP} can do -everything that @acronym{POP} can, it can hence be viewed as a -@acronym{POP++}. Secondly, @acronym{IMAP} is a mail storage protocol, -similar to @acronym{NNTP} being a news storage protocol---however, -@acronym{IMAP} offers more features than @acronym{NNTP} because news -is more or less read-only whereas mail is read-write. - -If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap -entry in @code{mail-sources}. With this, Gnus will fetch mails from -the @acronym{IMAP} server and store them on the local disk. This is -not the usage described in this section---@xref{Mail Sources}. - -If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap -entry in @code{gnus-secondary-select-methods}. With this, Gnus will -manipulate mails stored on the @acronym{IMAP} server. This is the kind of -usage explained in this section. - -A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP} -servers might look something like the following. (Note that for -@acronym{TLS}/@acronym{SSL}, you need external programs and libraries, -see below.) - -@lisp -(setq gnus-secondary-select-methods - '((nnimap "simpleserver") ; @r{no special configuration} - ; @r{perhaps a ssh port forwarded server:} - (nnimap "dolk" - (nnimap-address "localhost") - (nnimap-server-port 1430)) - ; @r{a UW server running on localhost} - (nnimap "barbar" - (nnimap-server-port 143) - (nnimap-address "localhost") - (nnimap-list-pattern ("INBOX" "mail/*"))) - ; @r{anonymous public cyrus server:} - (nnimap "cyrus.andrew.cmu.edu" - (nnimap-authenticator anonymous) - (nnimap-list-pattern "archive.*") - (nnimap-stream network)) - ; @r{a ssl server on a non-standard port:} - (nnimap "vic20" - (nnimap-address "vic20.somewhere.com") - (nnimap-server-port 9930) - (nnimap-stream ssl)))) -@end lisp - -After defining the new server, you can subscribe to groups on the -server using normal Gnus commands such as @kbd{U} in the Group Buffer -(@pxref{Subscription Commands}) or via the Server Buffer -(@pxref{Server Buffer}). - -The following variables can be used to create a virtual @code{nnimap} -server: - -@table @code - -@item nnimap-address -@vindex nnimap-address - -The address of the remote @acronym{IMAP} server. Defaults to the virtual -server name if not specified. - -@item nnimap-server-port -@vindex nnimap-server-port -Port on server to contact. Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}. - -Note that this should be an integer, example server specification: - -@lisp -(nnimap "mail.server.com" - (nnimap-server-port 4711)) -@end lisp - -@item nnimap-list-pattern -@vindex nnimap-list-pattern -String or list of strings of mailboxes to limit available groups to. -This is used when the server has very many mailboxes and you're only -interested in a few---some servers export your home directory via -@acronym{IMAP}, you'll probably want to limit the mailboxes to those in -@file{~/Mail/*} then. - -The string can also be a cons of REFERENCE and the string as above, what -REFERENCE is used for is server specific, but on the University of -Washington server it's a directory that will be concatenated with the -mailbox. - -Example server specification: - -@lisp -(nnimap "mail.server.com" - (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*" - ("~friend/Mail/" . "list/*")))) -@end lisp - -@item nnimap-stream -@vindex nnimap-stream -The type of stream used to connect to your server. By default, nnimap -will detect and automatically use all of the below, with the exception -of @acronym{TLS}/@acronym{SSL}. (@acronym{IMAP} over -@acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can -be automatically detected, but it's not widely deployed yet.) - -Example server specification: - -@lisp -(nnimap "mail.server.com" - (nnimap-stream ssl)) -@end lisp - -Please note that the value of @code{nnimap-stream} is a symbol! - -@itemize @bullet -@item -@dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the -@samp{gsasl} or @samp{imtest} program. -@item -@dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program. -@item -@dfn{starttls:} Connect via the STARTTLS extension (similar to -@acronym{TLS}/@acronym{SSL}). Requires the external library @samp{starttls.el} and program -@samp{starttls}. -@item -@dfn{tls:} Connect through @acronym{TLS}. Requires GNUTLS (the program -@samp{gnutls-cli}). -@item -@dfn{ssl:} Connect through @acronym{SSL}. Requires OpenSSL (the program -@samp{openssl}) or SSLeay (@samp{s_client}). -@item -@dfn{shell:} Use a shell command to start @acronym{IMAP} connection. -@item -@dfn{network:} Plain, TCP/IP network connection. -@end itemize - -@vindex imap-kerberos4-program -The @samp{imtest} program is shipped with Cyrus IMAPD. If you're -using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version -1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type} -to make @code{imap.el} use a pty instead of a pipe when communicating -with @samp{imtest}. You will then suffer from a line length -restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang -indefinitely if you have many articles in a mailbox. The variable -@code{imap-kerberos4-program} contain parameters to pass to the imtest -program. - -For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is -needed. It is available from -@uref{http://www.gnu.org/software/gnutls/}. - -@vindex imap-gssapi-program -This parameter specifies a list of command lines that invoke a GSSAPI -authenticated @acronym{IMAP} stream in a subshell. They are tried -sequentially until a connection is made, or the list has been -exhausted. By default, @samp{gsasl} from GNU SASL, available from -@uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest} -program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are -tried. - -@vindex imap-ssl-program -For @acronym{SSL} connections, the OpenSSL program is available from -@uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay, -and nnimap support it too---although the most recent versions of -SSLeay, 0.9.x, are known to have serious bugs making it -useless. Earlier versions, especially 0.8.x, of SSLeay are known to -work. The variable @code{imap-ssl-program} contain parameters to pass -to OpenSSL/SSLeay. - -@vindex imap-shell-program -@vindex imap-shell-host -For @acronym{IMAP} connections using the @code{shell} stream, the -variable @code{imap-shell-program} specify what program to call. Make -sure nothing is interfering with the output of the program, e.g., don't -forget to redirect the error output to the void. - -@item nnimap-authenticator -@vindex nnimap-authenticator - -The authenticator used to connect to the server. By default, nnimap -will use the most secure authenticator your server is capable of. - -Example server specification: - -@lisp -(nnimap "mail.server.com" - (nnimap-authenticator anonymous)) -@end lisp - -Please note that the value of @code{nnimap-authenticator} is a symbol! - -@itemize @bullet -@item -@dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires -external program @code{gsasl} or @code{imtest}. -@item -@dfn{kerberos4:} Kerberos 4 authentication. Requires external program -@code{imtest}. -@item -@dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires -external library @code{digest-md5.el}. -@item -@dfn{cram-md5:} Encrypted username/password via CRAM-MD5. -@item -@dfn{login:} Plain-text username/password via LOGIN. -@item -@dfn{anonymous:} Login as ``anonymous'', supplying your email address as password. -@end itemize - -@item nnimap-expunge-on-close -@cindex expunging -@vindex nnimap-expunge-on-close -Unlike Parmenides the @acronym{IMAP} designers have decided things that -don't exist actually do exist. More specifically, @acronym{IMAP} has -this concept of marking articles @code{Deleted} which doesn't actually -delete them, and this (marking them @code{Deleted}, that is) is what -nnimap does when you delete an article in Gnus (with @kbd{B DEL} or -similar). - -Since the articles aren't really removed when we mark them with the -@code{Deleted} flag we'll need a way to actually delete them. Feel like -running in circles yet? - -Traditionally, nnimap has removed all articles marked as @code{Deleted} -when closing a mailbox but this is now configurable by this server -variable. - -The possible options are: - -@table @code - -@item always -The default behavior, delete all articles marked as ``Deleted'' when -closing a mailbox. -@item never -Never actually delete articles. Currently there is no way of showing -the articles marked for deletion in nnimap, but other @acronym{IMAP} clients -may allow you to do this. If you ever want to run the EXPUNGE command -manually, @xref{Expunging mailboxes}. -@item ask -When closing mailboxes, nnimap will ask if you wish to expunge deleted -articles or not. - -@end table - -@item nnimap-importantize-dormant -@vindex nnimap-importantize-dormant - -If non-@code{nil} (the default), marks dormant articles as ticked (as -well), for other @acronym{IMAP} clients. Within Gnus, dormant articles will -naturally still (only) be marked as dormant. This is to make dormant -articles stand out, just like ticked articles, in other @acronym{IMAP} -clients. (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP} -has only one.) - -Probably the only reason for frobbing this would be if you're trying -enable per-user persistent dormant flags, using something like: - -@lisp -(setcdr (assq 'dormant nnimap-mark-to-flag-alist) - (format "gnus-dormant-%s" (user-login-name))) -(setcdr (assq 'dormant nnimap-mark-to-predicate-alist) - (format "KEYWORD gnus-dormant-%s" (user-login-name))) -@end lisp - -In this case, you would not want the per-user dormant flag showing up -as ticked for other users. - -@item nnimap-expunge-search-string -@cindex expunging -@vindex nnimap-expunge-search-string -@cindex expiring @acronym{IMAP} mail - -This variable contain the @acronym{IMAP} search command sent to server when -searching for articles eligible for expiring. The default is -@code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by -UID set and the second @code{%s} is replaced by a date. - -Probably the only useful value to change this to is -@code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in -messages instead of the internal article date. See section 6.4.4 of -RFC 2060 for more information on valid strings. - -However, if @code{nnimap-search-uids-not-since-is-evil} -is true, this variable has no effect since the search logic -is reversed, as described below. - -@item nnimap-authinfo-file -@vindex nnimap-authinfo-file - -A file containing credentials used to log in on servers. The format is -(almost) the same as the @code{ftp} @file{~/.netrc} file. See the -variable @code{nntp-authinfo-file} for exact syntax; also see -@ref{NNTP}. An example of an .authinfo line for an IMAP server, is: - -@example -machine students.uio.no login larsi password geheimnis port imap -@end example - -Note that it should be @code{port imap}, or @code{port 143}, if you -use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the -actual port number used is port 993 for secured IMAP. For -convenience, Gnus will accept @code{port imaps} as a synonym of -@code{port imap}. - -@item nnimap-need-unselect-to-notice-new-mail -@vindex nnimap-need-unselect-to-notice-new-mail - -Unselect mailboxes before looking for new mail in them. Some servers -seem to need this under some circumstances; it was reported that -Courier 1.7.1 did. - -@item nnimap-nov-is-evil -@vindex nnimap-nov-is-evil -@cindex Courier @acronym{IMAP} server -@cindex @acronym{NOV} - -Never generate or use a local @acronym{NOV} database. Defaults to the -value of @code{gnus-agent}. - -Using a @acronym{NOV} database usually makes header fetching much -faster, but it uses the @code{UID SEARCH UID} command, which is very -slow on some servers (notably some versions of Courier). Since the Gnus -Agent caches the information in the @acronym{NOV} database without using -the slow command, this variable defaults to true if the Agent is in use, -and false otherwise. - -@item nnimap-search-uids-not-since-is-evil -@vindex nnimap-search-uids-not-since-is-evil -@cindex Courier @acronym{IMAP} server -@cindex expiring @acronym{IMAP} mail - -Avoid the @code{UID SEARCH UID @var{message numbers} NOT SINCE -@var{date}} command, which is slow on some @acronym{IMAP} servers -(notably, some versions of Courier). Instead, use @code{UID SEARCH SINCE -@var{date}} and prune the list of expirable articles within Gnus. - -When Gnus expires your mail (@pxref{Expiring Mail}), it starts with a -list of expirable articles and asks the IMAP server questions like ``Of -these articles, which ones are older than a week?'' While this seems -like a perfectly reasonable question, some IMAP servers take a long time -to answer it, since they seemingly go looking into every old article to -see if it is one of the expirable ones. Curiously, the question ``Of -@emph{all} articles, which ones are newer than a week?'' seems to be -much faster to answer, so setting this variable causes Gnus to ask this -question and figure out the answer to the real question itself. - -This problem can really sneak up on you: when you first configure Gnus, -everything works fine, but once you accumulate a couple thousand -messages, you start cursing Gnus for being so slow. On the other hand, -if you get a lot of email within a week, setting this variable will -cause a lot of network traffic between Gnus and the IMAP server. - -@item nnimap-logout-timeout -@vindex nnimap-logout-timeout - -There is a case where a connection to a @acronym{IMAP} server is unable -to close, when connecting to the server via a certain kind of network, -e.g. @acronym{VPN}. In that case, it will be observed that a connection -between Emacs and the local network looks alive even if the server has -closed a connection for some reason (typically, a timeout). -Consequently, Emacs continues waiting for a response from the server for -the @code{LOGOUT} command that Emacs sent, or hangs in other words. If -you are in such a network, setting this variable to a number of seconds -will be helpful. If it is set, a hung connection will be closed -forcibly, after this number of seconds from the time Emacs sends the -@code{LOGOUT} command. It should not be too small value but too large -value will be inconvenient too. Perhaps the value 1.0 will be a good -candidate but it might be worth trying some other values. - -Example server specification: - -@lisp -(nnimap "mail.server.com" - (nnimap-logout-timeout 1.0)) -@end lisp - -@end table - -@menu -* Splitting in IMAP:: Splitting mail with nnimap. -* Expiring in IMAP:: Expiring mail with nnimap. -* Editing IMAP ACLs:: Limiting/enabling other users access to a mailbox. -* Expunging mailboxes:: Equivalent of a ``compress mailbox'' button. -* A note on namespaces:: How to (not) use @acronym{IMAP} namespace in Gnus. -* Debugging IMAP:: What to do when things don't work. -@end menu - - - -@node Splitting in IMAP -@subsection Splitting in IMAP -@cindex splitting imap mail - -Splitting is something Gnus users have loved and used for years, and now -the rest of the world is catching up. Yeah, dream on, not many -@acronym{IMAP} servers have server side splitting and those that have -splitting seem to use some non-standard protocol. This means that -@acronym{IMAP} support for Gnus has to do its own splitting. - -And it does. - -(Incidentally, people seem to have been dreaming on, and Sieve has -gaining a market share and is supported by several IMAP servers. -Fortunately, Gnus support it too, @xref{Sieve Commands}.) - -Here are the variables of interest: - -@table @code - -@item nnimap-split-crosspost -@cindex splitting, crosspost -@cindex crosspost -@vindex nnimap-split-crosspost - -If non-@code{nil}, do crossposting if several split methods match the -mail. If @code{nil}, the first match in @code{nnimap-split-rule} -found will be used. - -Nnmail equivalent: @code{nnmail-crosspost}. - -@item nnimap-split-inbox -@cindex splitting, inbox -@cindex inbox -@vindex nnimap-split-inbox - -A string or a list of strings that gives the name(s) of @acronym{IMAP} -mailboxes to split from. Defaults to @code{nil}, which means that -splitting is disabled! - -@lisp -(setq nnimap-split-inbox - '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap")) -@end lisp - -No nnmail equivalent. - -@item nnimap-split-rule -@cindex splitting, rules -@vindex nnimap-split-rule - -New mail found in @code{nnimap-split-inbox} will be split according to -this variable. - -This variable contains a list of lists, where the first element in the -sublist gives the name of the @acronym{IMAP} mailbox to move articles -matching the regexp in the second element in the sublist. Got that? -Neither did I, we need examples. - -@lisp -(setq nnimap-split-rule - '(("INBOX.nnimap" - "^Sender: owner-nnimap@@vic20.globalcom.se") - ("INBOX.junk" "^Subject:.*MAKE MONEY") - ("INBOX.private" ""))) -@end lisp - -This will put all articles from the nnimap mailing list into mailbox -INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line -into INBOX.junk and everything else in INBOX.private. - -The first string may contain @samp{\\1} forms, like the ones used by -replace-match to insert sub-expressions from the matched text. For -instance: - -@lisp -("INBOX.lists.\\1" "^Sender: owner-\\([a-z-]+\\)@@") -@end lisp - -The first element can also be the symbol @code{junk} to indicate that -matching messages should simply be deleted. Use with care. - -The second element can also be a function. In that case, it will be -called with the first element of the rule as the argument, in a buffer -containing the headers of the article. It should return a -non-@code{nil} value if it thinks that the mail belongs in that group. - -Nnmail users might recollect that the last regexp had to be empty to -match all articles (like in the example above). This is not required in -nnimap. Articles not matching any of the regexps will not be moved out -of your inbox. (This might affect performance if you keep lots of -unread articles in your inbox, since the splitting code would go over -them every time you fetch new mail.) - -These rules are processed from the beginning of the alist toward the -end. The first rule to make a match will ``win'', unless you have -crossposting enabled. In that case, all matching rules will ``win''. - -This variable can also have a function as its value, the function will -be called with the headers narrowed and should return a group where it -thinks the article should be split to. See @code{nnimap-split-fancy}. - -The splitting code tries to create mailboxes if it needs to. - -To allow for different split rules on different virtual servers, and -even different split rules in different inboxes on the same server, -the syntax of this variable have been extended along the lines of: - -@lisp -(setq nnimap-split-rule - '(("my1server" (".*" (("ding" "ding@@gnus.org") - ("junk" "From:.*Simon")))) - ("my2server" ("INBOX" nnimap-split-fancy)) - ("my[34]server" (".*" (("private" "To:.*Simon") - ("junk" my-junk-func)))))) -@end lisp - -The virtual server name is in fact a regexp, so that the same rules -may apply to several servers. In the example, the servers -@code{my3server} and @code{my4server} both use the same rules. -Similarly, the inbox string is also a regexp. The actual splitting -rules are as before, either a function, or a list with group/regexp or -group/function elements. - -Nnmail equivalent: @code{nnmail-split-methods}. - -@item nnimap-split-predicate -@cindex splitting -@vindex nnimap-split-predicate - -Mail matching this predicate in @code{nnimap-split-inbox} will be -split, it is a string and the default is @samp{UNSEEN UNDELETED}. - -This might be useful if you use another @acronym{IMAP} client to read mail in -your inbox but would like Gnus to split all articles in the inbox -regardless of readedness. Then you might change this to -@samp{UNDELETED}. - -@item nnimap-split-fancy -@cindex splitting, fancy -@findex nnimap-split-fancy -@vindex nnimap-split-fancy - -It's possible to set @code{nnimap-split-rule} to -@code{nnmail-split-fancy} if you want to use fancy -splitting. @xref{Fancy Mail Splitting}. - -However, to be able to have different fancy split rules for nnmail and -nnimap back ends you can set @code{nnimap-split-rule} to -@code{nnimap-split-fancy} and define the nnimap specific fancy split -rule in @code{nnimap-split-fancy}. - -Example: - -@lisp -(setq nnimap-split-rule 'nnimap-split-fancy - nnimap-split-fancy ...) -@end lisp - -Nnmail equivalent: @code{nnmail-split-fancy}. - -@item nnimap-split-download-body -@findex nnimap-split-download-body -@vindex nnimap-split-download-body - -Set to non-@code{nil} to download entire articles during splitting. -This is generally not required, and will slow things down -considerably. You may need it if you want to use an advanced -splitting function that analyzes the body to split the article. - -@end table - -@node Expiring in IMAP -@subsection Expiring in IMAP -@cindex expiring @acronym{IMAP} mail - -Even though @code{nnimap} is not a proper @code{nnmail} derived back -end, it supports most features in regular expiring (@pxref{Expiring -Mail}). Unlike splitting in @acronym{IMAP} (@pxref{Splitting in -IMAP}) it does not clone the @code{nnmail} variables (i.e., creating -@var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables. What -follows below are the variables used by the @code{nnimap} expiry -process. - -A note on how the expire mark is stored on the @acronym{IMAP} server is -appropriate here as well. The expire mark is translated into a -@code{imap} client specific mark, @code{gnus-expire}, and stored on the -message. This means that likely only Gnus will understand and treat -the @code{gnus-expire} mark properly, although other clients may allow -you to view client specific flags on the message. It also means that -your server must support permanent storage of client specific flags on -messages. Most do, fortunately. - -If expiring @acronym{IMAP} mail seems very slow, try setting the server -variable @code{nnimap-search-uids-not-since-is-evil}. - -@table @code - -@item nnmail-expiry-wait -@item nnmail-expiry-wait-function - -These variables are fully supported. The expire value can be a -number, the symbol @code{immediate} or @code{never}. - -@item nnmail-expiry-target - -This variable is supported, and internally implemented by calling the -@code{nnmail} functions that handle this. It contains an optimization -that if the destination is a @acronym{IMAP} group on the same server, the -article is copied instead of appended (that is, uploaded again). - -@end table - -@node Editing IMAP ACLs -@subsection Editing IMAP ACLs -@cindex editing imap acls -@cindex Access Control Lists -@cindex Editing @acronym{IMAP} ACLs -@kindex G l (Group) -@findex gnus-group-nnimap-edit-acl - -ACL stands for Access Control List. ACLs are used in @acronym{IMAP} for -limiting (or enabling) other users access to your mail boxes. Not all -@acronym{IMAP} servers support this, this function will give an error if it -doesn't. - -To edit an ACL for a mailbox, type @kbd{G l} -(@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL -editing window with detailed instructions. - -Some possible uses: - -@itemize @bullet -@item -Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags) -on your mailing list mailboxes enables other users on the same server to -follow the list without subscribing to it. -@item -At least with the Cyrus server, you are required to give the user -``anyone'' posting ("p") capabilities to have ``plussing'' work (that is, -mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox -INBOX.mailbox). -@end itemize - -@node Expunging mailboxes -@subsection Expunging mailboxes -@cindex expunging - -@cindex expunge -@cindex manual expunging -@kindex G x (Group) -@findex gnus-group-nnimap-expunge - -If you're using the @code{never} setting of @code{nnimap-expunge-on-close}, -you may want the option of expunging all deleted articles in a mailbox -manually. This is exactly what @kbd{G x} does. - -Currently there is no way of showing deleted articles, you can just -delete them. - -@node A note on namespaces -@subsection A note on namespaces -@cindex IMAP namespace -@cindex namespaces - -The @acronym{IMAP} protocol has a concept called namespaces, described -by the following text in the RFC2060: - -@display -5.1.2. Mailbox Namespace Naming Convention - - By convention, the first hierarchical element of any mailbox name - which begins with "#" identifies the "namespace" of the remainder of - the name. This makes it possible to disambiguate between different - types of mailbox stores, each of which have their own namespaces. - - For example, implementations which offer access to USENET - newsgroups MAY use the "#news" namespace to partition the USENET - newsgroup namespace from that of other mailboxes. Thus, the - comp.mail.misc newsgroup would have an mailbox name of - "#news.comp.mail.misc", and the name "comp.mail.misc" could refer - to a different object (e.g. a user's private mailbox). -@end display - -While there is nothing in this text that warrants concern for the -@acronym{IMAP} implementation in Gnus, some servers use namespace -prefixes in a way that does not work with how Gnus uses mailbox names. - -Specifically, University of Washington's @acronym{IMAP} server uses -mailbox names like @code{#driver.mbx/read-mail} which are valid only -in the @sc{create} and @sc{append} commands. After the mailbox is -created (or a messages is appended to a mailbox), it must be accessed -without the namespace prefix, i.e. @code{read-mail}. Since Gnus do -not make it possible for the user to guarantee that user entered -mailbox names will only be used with the CREATE and APPEND commands, -you should simply not use the namespace prefixed mailbox names in -Gnus. - -See the UoW IMAPD documentation for the @code{#driver.*/} prefix -for more information on how to use the prefixes. They are a power -tool and should be used only if you are sure what the effects are. - -@node Debugging IMAP -@subsection Debugging IMAP -@cindex IMAP debugging -@cindex protocol dump (IMAP) - -@acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or -@acronym{POP3}. Implementation bugs are not unlikely, and we do our -best to fix them right away. If you encounter odd behavior, chances -are that either the server or Gnus is buggy. - -If you are familiar with network protocols in general, you will -probably be able to extract some clues from the protocol dump of the -exchanges between Gnus and the server. Even if you are not familiar -with network protocols, when you include the protocol dump in -@acronym{IMAP}-related bug reports you are helping us with data -critical to solving the problem. Therefore, we strongly encourage you -to include the protocol dump when reporting IMAP bugs in Gnus. - - -@vindex imap-log -Because the protocol dump, when enabled, generates lots of data, it is -disabled by default. You can enable it by setting @code{imap-log} as -follows: - -@lisp -(setq imap-log t) -@end lisp - -This instructs the @code{imap.el} package to log any exchanges with -the server. The log is stored in the buffer @samp{*imap-log*}. Look -for error messages, which sometimes are tagged with the keyword -@code{BAD}---but when submitting a bug, make sure to include all the -data. - @node Other Sources @section Other Sources @@ -22378,7 +21731,6 @@ four days, Gnus will decay the scores four times, for instance. * Highlighting and Menus:: Making buffers look all nice and cozy. * Buttons:: Get tendinitis in ten easy steps! * Daemons:: Gnus can do things behind your back. -* NoCeM:: How to avoid spam and other fatty foods. * Undo:: Some actions can be undone. * Predicate Specifiers:: Specifying predicates. * Moderation:: What to do if you're a moderator. @@ -23397,13 +22749,12 @@ your @file{~/.gnus.el} file: (gnus-demon-add-handler 'gnus-demon-close-connections 30 t) @end lisp -@findex gnus-demon-add-nocem @findex gnus-demon-add-scanmail @findex gnus-demon-add-rescan @findex gnus-demon-add-scan-timestamps @findex gnus-demon-add-disconnection Some ready-made functions to do this have been created: -@code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection}, +@code{gnus-demon-add-disconnection}, @code{gnus-demon-add-nntp-close-connection}, @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and @code{gnus-demon-add-scanmail}. Just put those functions in your @@ -23422,152 +22773,6 @@ is a sure-fire way of getting booted off any respectable system. So behave. -@node NoCeM -@section NoCeM -@cindex nocem -@cindex spam - -@dfn{Spamming} is posting the same article lots and lots of times. -Spamming is bad. Spamming is evil. - -Spamming is usually canceled within a day or so by various anti-spamming -agencies. These agencies usually also send out @dfn{NoCeM} messages. -NoCeM is pronounced ``no see-'em'', and means what the name -implies---these are messages that make the offending articles, like, go -away. - -What use are these NoCeM messages if the articles are canceled anyway? -Some sites do not honor cancel messages and some sites just honor cancels -from a select few people. Then you may wish to make use of the NoCeM -messages, which are distributed in the newsgroups -@samp{news.lists.filters}, @samp{alt.nocem.misc}, etc. - -Gnus can read and parse the messages in this group automatically, and -this will make spam disappear. - -There are some variables to customize, of course: - -@table @code -@item gnus-use-nocem -@vindex gnus-use-nocem -Set this variable to @code{t} to set the ball rolling. It is @code{nil} -by default. - -You can also set this variable to a positive number as a group level. -In that case, Gnus scans NoCeM messages when checking new news if this -value is not exceeding a group level that you specify as the prefix -argument to some commands, e.g. @code{gnus}, -@code{gnus-group-get-new-news}, etc. Otherwise, Gnus does not scan -NoCeM messages if you specify a group level that is smaller than this -value to those commands. For example, if you use 1 or 2 on the mail -groups and the levels on the news groups remain the default, 3 is the -best choice. - -@item gnus-nocem-groups -@vindex gnus-nocem-groups -Gnus will look for NoCeM messages in the groups in this list. The -default is -@lisp -("news.lists.filters" "alt.nocem.misc") -@end lisp - -@item gnus-nocem-issuers -@vindex gnus-nocem-issuers -There are many people issuing NoCeM messages. This list says what -people you want to listen to. The default is: - -@lisp -("Adri Verhoef" - "alba-nocem@@albasani.net" - "bleachbot@@httrack.com" - "news@@arcor-online.net" - "news@@uni-berlin.de" - "nocem@@arcor.de" - "pgpmoose@@killfile.org" - "xjsppl@@gmx.de") -@end lisp - -Known despammers that you can put in this list are listed at@* -@uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}. - -You do not have to heed NoCeM messages from all these people---just the -ones you want to listen to. You also don't have to accept all NoCeM -messages from the people you like. Each NoCeM message has a @dfn{type} -header that gives the message a (more or less, usually less) rigorous -definition. Common types are @samp{spam}, @samp{spew}, @samp{mmf}, -@samp{binary}, and @samp{troll}. To specify this, you have to use -@code{(@var{issuer} @var{conditions} @dots{})} elements in the list. -Each condition is either a string (which is a regexp that matches types -you want to use) or a list on the form @code{(not @var{string})}, where -@var{string} is a regexp that matches types you don't want to use. - -For instance, if you want all NoCeM messages from Chris Lewis except his -@samp{troll} messages, you'd say: - -@lisp -("clewis@@ferret.ocunix.on.ca" ".*" (not "troll")) -@end lisp - -On the other hand, if you just want nothing but his @samp{spam} and -@samp{spew} messages, you'd say: - -@lisp -("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam") -@end lisp - -The specs are applied left-to-right. - - -@item gnus-nocem-verifyer -@vindex gnus-nocem-verifyer -@findex gnus-nocem-epg-verify -@findex pgg-verify -This should be a function for verifying that the NoCeM issuer is who she -says she is. This variable defaults to @code{gnus-nocem-epg-verify} if -EasyPG is available, otherwise defaults to @code{pgg-verify}. The -function should return non-@code{nil} if the verification is successful, -otherwise (including the case the NoCeM message was not signed) should -return @code{nil}. If this is too slow and you don't care for -verification (which may be dangerous), you can set this variable to -@code{nil}. - -Formerly the default was @code{mc-verify}, which is a Mailcrypt -function. While you can still use it, you can change it into -@code{gnus-nocem-epg-verify} or @code{pgg-verify} running with GnuPG if -you are willing to add the @acronym{PGP} public keys to GnuPG's keyring. - -@item gnus-nocem-directory -@vindex gnus-nocem-directory -This is where Gnus will store its NoCeM cache files. The default is@* -@file{~/News/NoCeM/}. - -@item gnus-nocem-expiry-wait -@vindex gnus-nocem-expiry-wait -The number of days before removing old NoCeM entries from the cache. -The default is 15. If you make it shorter Gnus will be faster, but you -might then see old spam. - -@item gnus-nocem-check-from -@vindex gnus-nocem-check-from -Non-@code{nil} means check for valid issuers in message bodies. -Otherwise don't bother fetching articles unless their author matches a -valid issuer; that is much faster if you are selective about the -issuers. - -@item gnus-nocem-check-article-limit -@vindex gnus-nocem-check-article-limit -If non-@code{nil}, the maximum number of articles to check in any NoCeM -group. @code{nil} means no restriction. NoCeM groups can be huge and -very slow to process. - -@end table - -Using NoCeM could potentially be a memory hog. If you have many living -(i. e., subscribed or unsubscribed groups), your Emacs process will grow -big. If this is a problem, you should kill off all (or most) of your -unsubscribed groups (@pxref{Subscription Commands}). - - @node Undo @section Undo @cindex undo @@ -23701,6 +22906,7 @@ stuff, so Gnus has taken advantage of that. * Face:: Display a funkier, teensier colored image. * Smileys:: Show all those happy faces the way they were meant to be shown. * Picons:: How to display pictures of what you're reading. +* Gravatars:: Display the avatar of people you read. * XVarious:: Other XEmacsy Gnusey variables. @end menu @@ -24027,8 +23233,56 @@ want to add @samp{"unknown"} to this list. Ordered list of suffixes on picon file names to try. Defaults to @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs. +@item gnus-picon-inhibit-top-level-domains +@vindex gnus-picon-inhibit-top-level-domains +If non-@code{nil} (which is the default), don't display picons for +things like @samp{.net} and @samp{.de}, which aren't usually very +interesting. + @end table +@node Gravatars +@subsection Gravatars + +@iftex +@iflatex +\include{gravatars} +@end iflatex +@end iftex + +A gravatar is an image registered to an e-mail address. + +You can submit yours on-line at @uref{http://www.gravatar.com}. + +The following variables offer control over how things are displayed. + +@table @code + +@item gnus-gravatar-size +@vindex gnus-gravatar-size +The size in pixels of gravatars. Gravatars are always square, so one +number for the size is enough. + +@item gnus-gravatar-relief +@vindex gnus-gravatar-relief +If non-nil, adds a shadow rectangle around the image. The value, +relief, specifies the width of the shadow lines, in pixels. If relief +is negative, shadows are drawn so that the image appears as a pressed +button; otherwise, it appears as an unpressed button. + +@end table + +If you want to see them in the From field, set: +@lisp +(setq gnus-treat-from-gravatar 'head) +@end lisp + +If you want to see them in the Cc and To fields, set: + +@lisp +(setq gnus-treat-mail-gravatar 'head) +@end lisp + @node XVarious @subsection Various XEmacs Variables @@ -24364,7 +23618,7 @@ call the external tools during splitting. Example fancy split method: Note that with the nnimap back end, message bodies will not be downloaded by default. You need to set @code{nnimap-split-download-body} to @code{t} to do that -(@pxref{Splitting in IMAP}). +(@pxref{Client-Side @acronym{IMAP} Splitting}). That is about it. As some spam is likely to get through anyway, you might want to have a nifty function to call when you happen to read @@ -24646,14 +23900,14 @@ the value @samp{spam} means @samp{nnimap+your-server:spam}. The value @vindex nnimap-split-download-body Note for IMAP users: if you use the @code{spam-check-bogofilter}, @code{spam-check-ifile}, and @code{spam-check-stat} spam back ends, -you should also set the variable @code{nnimap-split-download-body} -to @code{t}. These spam back ends are most useful when they can -``scan'' the full message body. By default, the nnimap back end only -retrieves the message headers; @code{nnimap-split-download-body} tells -it to retrieve the message bodies as well. We don't set this by -default because it will slow @acronym{IMAP} down, and that is not an -appropriate decision to make on behalf of the user. @xref{Splitting -in IMAP}. +you should also set the variable @code{nnimap-split-download-body} to +@code{t}. These spam back ends are most useful when they can ``scan'' +the full message body. By default, the nnimap back end only retrieves +the message headers; @code{nnimap-split-download-body} tells it to +retrieve the message bodies as well. We don't set this by default +because it will slow @acronym{IMAP} down, and that is not an +appropriate decision to make on behalf of the user. @xref{Client-Side +@acronym{IMAP} Splitting}. You have to specify one or more spam back ends for @code{spam-split} to use, by setting the @code{spam-use-*} variables. @xref{Spam Back @@ -27569,13 +26823,6 @@ Mail can be re-scanned by a daemonic process (@pxref{Daemons}). @end iflatex @end iftex -@item -Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}). - -@lisp -(setq gnus-use-nocem t) -@end lisp - @item Groups can be made permanently visible (@pxref{Listing Groups}). @@ -28092,9 +27339,7 @@ The revised Gnus @acronym{FAQ} is included in the manual, @acronym{TLS} wrapper shipped with Gnus @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and -@acronym{NNTP} via @file{tls.el} and GNUTLS. The old -@acronym{TLS}/@acronym{SSL} support via (external third party) -@file{ssl.el} and OpenSSL still works. +@acronym{NNTP} via @file{tls.el} and GNUTLS. @item Improved anti-spam features. @@ -29672,7 +28917,7 @@ group and article numbers are when fetching articles by on successful article retrieval. -@item (nnchoke-request-group GROUP &optional SERVER FAST) +@item (nnchoke-request-group GROUP &optional SERVER FAST INFO) Get data on @var{group}. This function also has the side effect of making @var{group} the current group. @@ -29680,6 +28925,9 @@ making @var{group} the current group. If @var{fast}, don't bother to return useful data, just make @var{group} the current group. +If @var{info}, it allows the backend to update the group info +structure. + Here's an example of some result data and a definition of the same: @example diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 6b922476596..ad56520f892 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi @@ -1090,11 +1090,11 @@ the passphrase prompt. @subsection Using PGP/MIME @acronym{PGP/MIME} requires an external OpenPGP implementation, such -as @uref{http://www.gnupg.org/, GNU Privacy Guard}. Pre-OpenPGP -implementations such as PGP 2.x and PGP 5.x are also supported. One +as @uref{http://www.gnupg.org/, GNU Privacy Guard}. Pre-OpenPGP +implementations such as PGP 2.x and PGP 5.x are also supported. One Emacs interface to the PGP implementations, PGG (@pxref{Top, ,PGG, -pgg, PGG Manual}), is included, but Mailcrypt and Florian Weimer's -@code{gpg.el} are also supported. @xref{PGP Compatibility}. +pgg, PGG Manual}), is included, but Mailcrypt is also supported. +@xref{PGP Compatibility}. @cindex gpg-agent Message internally calls GnuPG (the @command{gpg} command) to perform diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 604130d2606..775e4788de0 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -619,10 +619,6 @@ or 2 to connect to the remote host. (You can also specify in @file{~/.ssh/config}, the SSH configuration file, which protocol should be used, and use the regular @option{ssh} method.) -Two other variants, @option{ssh1_old} and @option{ssh2_old}, use the -@command{ssh1} and @command{ssh2} commands explicitly. If you don't -know what these are, you do not need these options. - All the methods based on @command{ssh} have an additional feature: you can specify a host name which looks like @file{host#42} (the real host name, then a hash sign, then a port number). This means to connect to @@ -731,19 +727,6 @@ expects PuTTY session names, calling @samp{plink -load @var{session} hasn't defined a user name. Different port numbers must be defined in the session. - -@item @option{fish} -@cindex method fish -@cindex fish method - -This is an experimental implementation of the fish protocol, known from -the GNU Midnight Commander or the KDE Konqueror. @value{tramp} expects -the fish server implementation from the KDE kioslave. That means, the -file @file{~/.fishsrv.pl} is expected to reside on the remote host. - -The implementation lacks good performance. The code is offered anyway, -maybe somebody can improve the performance. - @end table @@ -803,10 +786,6 @@ or 2 to connect to the remote host. (You can also specify in @file{~/.ssh/config}, the SSH configuration file, which protocol should be used, and use the regular @option{scp} method.) -Two other variants, @option{scp1_old} and @option{scp2_old}, use the -@command{ssh1} and @command{ssh2} commands explicitly. If you don't -know what these are, you do not need these options. - All the @command{ssh} based methods support the @samp{-p} feature where you can specify a port number to connect to in the host name. For example, the host name @file{host#42} tells @value{tramp} to diff --git a/doc/misc/url.texi b/doc/misc/url.texi index a6bbf0bd3eb..acb4145f120 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi @@ -731,14 +731,6 @@ directory to store the cache files. It defaults to sub-directory @file{cache} of @code{url-configuration-directory}. @end defopt -@c Fixme: function v. option, but neither used. -@c @findex url-cache-expired -@c @defopt url-cache-expired -@c This is a function to decide whether or not a cache entry has expired. -@c It takes two times as it parameters and returns non-@code{nil} if the -@c second time is ``too old'' when compared with the first time. -@c @end defopt - @defopt url-cache-creation-function The cache relies on a scheme for mapping URLs to files in the cache. This variable names a function which sets the type of cache to use. @@ -768,6 +760,22 @@ more likely to conflict with other files. @end smallexample @end defun +@defun url-cache-expired +This function returns non-nil if a cache entry has expired (or is absent). +The arguments are a URL and optional expiration delay in seconds +(default @var{url-cache-expire-time}). +@end defun + +@defopt url-cache-expire-time +This variable is the default number of seconds to use for the +expire-time argument of the function @code{url-cache-expired}. +@end defopt + +@defun url-fetch-from-cache +This function takes a URL as its argument and returns a buffer +containing the data cached for that URL. +@end defun + @c Fixme: never actually used currently? @c @defopt url-standalone-mode @c @cindex Relying on cache diff --git a/doc/misc/woman.texi b/doc/misc/woman.texi index ba772c4b4a1..788c10b87dd 100644 --- a/doc/misc/woman.texi +++ b/doc/misc/woman.texi @@ -1121,8 +1121,8 @@ A regular match expression used to match compressed man file extensions for which decompressors are available and handled by auto-compression mode. It should begin with @code{\\.} and end with @code{\\'} and @emph{must not} be optional. The default value is -@code{"\\.\\(g?z\\|bz2\\)\\'"}, which matches the @code{gzip} and -@code{bzip2} compression extensions. +@code{"\\.\\(g?z\\|bz2\\|xz\\)\\'"}, which matches the @code{gzip}, +@code{bzip2}, and @code{xz} compression extensions. @emph{Do not change this unless you are sure you know what you are doing!} diff --git a/etc/ChangeLog b/etc/ChangeLog index 7069d0b9ecb..5b78767cfda 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,11 @@ +2010-09-21 Eric Ludlam + + * srecode/java.srt: Make NAME be a prompt. + +2010-09-13 Michael Albinus + + * NEWS: Some Tramp methods are discontinued. + 2010-09-11 Glenn Morris * emacs.bash, emacs.csh, ms-kermit: Remove obsolete files (use diff --git a/etc/NEWS b/etc/NEWS index b72b000b2fe..0535690dede 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -49,7 +49,7 @@ also depend on Gtk+. You can disable them with --without-rsvg and ** There is a new configure option --enable-use-lisp-union-type. This is only useful for Emacs developers to debug certain types of bugs. -These is not a new feature; only the configure flag is new. +This is not a new feature; only the configure flag is new. --- ** New translation of the Emacs Tutorial in Hebrew is available @@ -114,14 +114,15 @@ top, left, right or bottom. The Options => Show/Hide menu has entries for this. ** ImageMagick support. -It is now possible to use the Imagemagick library to load many new -image formats in Emacs. To enable this, use the configure option -`--with-imagemagick'. +It is now possible to use the ImageMagick library to load many new +image formats in Emacs. By default, Emacs links with the ImageMagick +libraries if they are present at build time. To disable this, use +the configure option `--without-imagemagick'. The new function `imagemagick-types' returns a list of image file extensions that your installation of ImageMagick supports. The function `imagemagick-register-types' enables ImageMagick support for -these imaeg types, minus those listed in `imagemagick-types-inhibit'. +these image types, minus those listed in `imagemagick-types-inhibit'. See the Emacs Lisp Reference Manual for more information. @@ -157,7 +158,7 @@ when a new variable `scroll-error-top-bottom' is non-nil. scroll a line instead of full screen. ** New property `scroll-command' should be set on a command's symbol to -define it as a scroll command affected by `scroll-preserve-screen-position. +define it as a scroll command affected by `scroll-preserve-screen-position'. ** Trash changes @@ -189,8 +190,6 @@ loaded, customize `package-load-list'. ** completion-at-point is now an alias for complete-symbol. -** mouse-region-delete-keys has been deleted. - ** Deletion changes *** New option `delete-active-region'. @@ -236,6 +235,8 @@ kill ring). * Changes in Specialized Modes and Packages in Emacs 24.1 +** latex-electric-env-pair-mode keeps \begin..\end matched on the fly. + ** FIXME: xdg-open for browse-url and reportbug, 2010/08. (Close bug#4546?) ** Archive Mode has basic support to browse 7z archives. @@ -257,6 +258,7 @@ You can get a comparable behavior with: (setq completion-pcm-complete-word-inserts-delimiters t) ** mpc.el: Can use pseudo tags of the form tag1|tag2 as a union of two tags. + ** Customize *** Customize buffers now contain a search field. @@ -319,9 +321,11 @@ variables `sql-product', `sql-user', `sql-server', `sql-database' and *** `sql-dialect' is a synonym for `sql-product'. -*** Added ability to login with a port on MySQL. +*** Added ability to login with a port on MySQL and Postgres. The custom variable `sql-port' can be specified for connection to -MySQL servers. +MySQL or Postgres servers. By default, the port is not listed in +either login parameter, but will be added to the command line if set +to a non-zero value. *** Dynamic selection of product in an SQL interactive session. If you use `sql-product-interactive' to start an SQL interactive @@ -348,22 +352,34 @@ Each supported product has a custom variable `sql-*-login-params' which is a list of the parameters to be prompted for before a connection is established. -By default, the value of the parameter is simply prompted for. For -`server' and `database', they can be specified in a list as shown -below: +The lists consist of the following five tokens: `user', `password', +`database', `server', and `port'. The order in which they appear is +the order in which they are prompted. The tokens symbols can be +replaced by a sublist starting with the token and followed by a plist +which control the prompting for values. The tokens `user', +`database', and `server' each can take a property of :default which +specifies the value to be used if no value is entered. The +`database', `server', and `port' tokens handle the :completion +property which restricts the entry to either one of the values in the +list or to one of the values returned by the function provided as the +property value. The `database' and `server' tokens also accept the +:file property whose value is a regexp to identify useful file names. - (server :file ARG) - (database :file ARG) - (server :completion ARG) - (database :completion ARG) + (user :default DEF) + (database :default DEF + :file FILEPAT + :completion COMPLETE) + (server :default DEF + :file FILEPAT + :completion COMPLETE) -The ARG when :file is specified is a regexp that will match valid file -names (without the directory portion). Generally these strings will -be of the form ".+\.SUF" where SUF is the desired file suffix. +The FILEPAT when :file is specified is a regexp that will match valid +file names (without the directory portion). Generally these strings +will be of the form ".+\.SUF" where SUF is the desired file suffix. -When :completion is specified, the ARG corresponds to the PREDICATE -argument to the `completing-read' function (a list of possible values -or a function returning such a list). +When :completion is specified, the COMPLETE corresponds to the +PREDICATE argument to the `completing-read' function (a list of +possible values or a function returning such a list). *** Added `sql-connection-alist' to record login parameter values. An alist for recording different username, database and server @@ -393,7 +409,7 @@ SQLite database without prompting; the "prd" connection would prompt for the users password and then connect to the Oracle database. **** Added SQL->Start... submenu when connections are defined. -When connections have been defined, There is a submenu available that +When connections have been defined, there is a submenu available that allows the user to select one to start a SQLi session. The "Start SQLi Session" item moves to the "Start..." submenu when cnnections have been defined. @@ -403,6 +419,26 @@ When a SQLi session is not started by a connection then `sql-save-connection' will gather the login params specified for the session and save them as a new connection. +*** List database objects and details. +Once a SQL interactive session has been started, you can get a list of +the objects in the database and see details of those objects. The +objects shown and the details available are product specific. + +**** List all objects. +Using `M-x sql-list-all', `C-c C-l a' or selecting "SQL->List all +objects" will list all the objects in the database. At a minimum it +lists the tables and views in the database. Preceeding the command by +universal argument may provide additional details or extend the +listing to include other schemas objects. The list will appear in a +separate window in view-mode. + +**** List Table details. +Using `M-x sql-list-table', `C-c C-l t' or selecting "SQL->List Table +details" will ask for the name of a database table or view and display +the list of columns in the relation. Preceeding the comand with the +universal argument may provide additional details about each column. +The list will appear in a separate window in view-mode. + *** Added option `sql-send-terminator'. When set makes sure that each command sent with `sql-send-*' commands are properly terminated and submitted to the SQL processor. @@ -434,6 +470,11 @@ threads simultaneously. *** It is possible now, to access alternative buses than the default system or session bus. +** Tramp + +*** The following access methods are discontinued: "ssh1_old", +"ssh2_old", "scp1_old", "scp2_old" and "fish". + * New Modes and Packages in Emacs 24.1 @@ -498,7 +539,7 @@ syntactic rules. ** prog-mode is a new major-mode meant to be the parent of programming mode. ** define-minor-mode accepts a new keyword :variable. -** `delete-file' and `delete-directory now accept optional arg TRASH. +** `delete-file' and `delete-directory' now accept optional arg TRASH. Trashing is performed if TRASH and `delete-by-moving-to-trash' are both non-nil. Interactively, TRASH defaults to t, unless a prefix argument is supplied (see Trash changes, above). @@ -521,10 +562,13 @@ by the Graphic Control Extension of the image. ** XML and HTML parsing *** If Emacs is compiled with libxml2 support (which is the default), -two new Emacs Lisp-level functions are defined: `html-parse-string' -(which will parse "real world" HTML) and `xml-parse-string' (which -parses XML). Both return an Emacs Lisp parse tree. See the Emacs -Lisp Reference Manual for details. +two new Emacs Lisp-level functions are defined: +`xml-parse-html-string-internal' (which will parse "real world" HTML) +and `xml-parse-string-internal' (which parses XML). Both return an +Emacs Lisp parse tree. + +FIXME: These should be front-ended by xml.el. + ** Isearch diff --git a/etc/NEWS.23 b/etc/NEWS.23 index 74291bab8ab..bee89d368b5 100644 --- a/etc/NEWS.23 +++ b/etc/NEWS.23 @@ -40,6 +40,10 @@ This can be used in place of the default appt-message-warning-time. * Lisp changes in Emacs 23.3 +** `e' and `pi' are now called `float-e' and `float-pi'. + The old names are obsolete. +** The use of unintern without an obarray arg is declared obsolete. + ** New function byte-to-string, like char-to-string but for bytes. diff --git a/etc/srecode/java.srt b/etc/srecode/java.srt index c449f0d77c9..d4cc986a323 100644 --- a/etc/srecode/java.srt +++ b/etc/srecode/java.srt @@ -83,7 +83,7 @@ public Class {{?NAME}} {{#PARENTS}}{{#FIRST}}extends {{/FIRST}}{{#NOTFIRST}}impl template include :blank "An include statement." ---- -import {{NAME}}; +import {{?NAME}}; ---- context misc diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4f3f386310a..2c386257c10 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,8 +1,19 @@ +2010-09-29 Juanma Barranquero + + * makefile.w32-in (../src/config.h): Remove target, it is stale. + + * emacsclient.c (main): Remove unused variables. + (start_daemon_and_retry_set_socket): Use EXIT_FAILURE. + +2010-09-25 Ulrich Mueller + + * etags.c (compressors, print_language_names): Support xz compression. + 2010-08-11 Jan Djärv - * fakemail.c: Include stdlib.h for getenv. Remove declaration of + * fakemail.c: Include stdlib.h for getenv. Remove declaration of popen, fclose and pclose. - (my_name, fatal, error, put_line): Use const char* + (my_name, fatal, error, put_line): Use const char*. (main): Remove extern getenv, mail_program_name is const char*. * update-game-score.c (get_prefix, write_scores, main): Use const char*. @@ -12,7 +23,7 @@ * pop.h (pop_multi_first): Use const char *. (_ARGS): Remove. - * pop.c (pop_multi_first, socket_connection, sendline): Use conat char*. + * pop.c (pop_multi_first, socket_connection, sendline): Use const char*. * movemail.c (fatal, error, concat): Use const char *. @@ -57,7 +68,7 @@ 2010-08-06 Dan Nicolaescu * emacsclient.c: Move socket related #includes together with the - rest of the #includes. Move a WINDOWSNT includes closer together. + rest of the #includes. Move WINDOWSNT includes closer together. (HAVE_CONFIG_H): Remove. (NO_RETURN): Remove, defined in config.h. (main): Convert definition to standard C. @@ -160,7 +171,7 @@ (fatal): Make static. (error): Likewise. (pfatal_with_name): Likewise. - (pfatal_and_delete). Likewise. + (pfatal_and_delete): Likewise. (concat): Likewise. (xmalloc): Likewise. (popmail): Likewise. diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index e8ffbe7c562..1f96c481129 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1476,7 +1476,7 @@ start_daemon_and_retry_set_socket (void) else if (dpid < 0) { fprintf (stderr, "Error: Cannot fork!\n"); - exit (1); + exit (EXIT_FAILURE); } else { @@ -1576,8 +1576,6 @@ main (int argc, char **argv) int i; for (i = 0; environ[i]; i++) { - char *name = xstrdup (environ[i]); - char *value = strchr (name, '='); send_to_emacs (emacs_socket, "-env "); quote_argument (emacs_socket, environ[i]); send_to_emacs (emacs_socket, " "); diff --git a/lib-src/etags.c b/lib-src/etags.c index 42e4017ab50..abc8b06dd8e 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -561,6 +561,7 @@ static compressor compressors[] = { "gz", "gzip -d -c"}, { "GZ", "gzip -d -c"}, { "bz2", "bzip2 -d -c" }, + { "xz", "xz -d -c" }, { NULL } }; @@ -874,7 +875,7 @@ followed by the name of an interpreter. If no such sequence is found,\n\ Fortran is tried first; if no tags are found, C is tried next.\n\ When parsing any C file, a \"class\" or \"template\" keyword\n\ switches to C++."); - puts ("Compressed files are supported using gzip and bzip2.\n\ + puts ("Compressed files are supported using gzip, bzip2, and xz.\n\ \n\ For detailed help on a given language use, for example,\n\ etags --help --lang=ada."); diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in index 72a04ecff89..552dd1349fc 100644 --- a/lib-src/makefile.w32-in +++ b/lib-src/makefile.w32-in @@ -371,6 +371,7 @@ cleanall: clean # Headers we would preprocess if we could. # ../src/config.h: ../nt/$(CONFIG_H) + $(DEL) $@ echo $(CONFIG_H) has changed. Re-run configure.bat. exit -1 diff --git a/lisp/ChangeLog.10 b/lisp/ChangeLog.10 index cf4d13ccefb..32c3688f935 100644 --- a/lisp/ChangeLog.10 +++ b/lisp/ChangeLog.10 @@ -4757,7 +4757,7 @@ * files.el (insert-directory): Decode by what specified. * language/japan-util.el (setup-japanese-environment-internal): - By defalt, use japanese-iso-8bit for file names, and prefer + By default, use japanese-iso-8bit for file names, and prefer japanese-shift-jis on DOS and Windows. * international/quail.el (quail-show-guidance-buf): Make the quail @@ -21636,7 +21636,7 @@ 2001-11-26 Sam Steingold * frame.el (show-trailing-whitespace): Remove :set argument (the - value was essentially identical to the defalt). + value was essentially identical to the default). 2001-11-26 Pavel Janík diff --git a/lisp/ChangeLog.11 b/lisp/ChangeLog.11 index c1ee441ea6b..2543ce03b6f 100644 --- a/lisp/ChangeLog.11 +++ b/lisp/ChangeLog.11 @@ -2000,7 +2000,7 @@ (math-rewrite, math-rewrite-phase): Replace variable expr by declared variable. (math-rewrite-heads-heads, math-rewrite-heads-skips) - (math-rewrite-heads-blanks ): New variables. + (math-rewrite-heads-blanks): New variables. (math-rewrite-heads, math-rewrite-heads-rec): Replace variables heads, skips and blanks by declared variables. (math-rwcomp-subst-old, math-rwcomp-subst-new) @@ -11832,7 +11832,7 @@ (ido-saved-vc-hb): Rename from ido-saved-vc-mt. Uses changed. (ido-no-final-slash): New defun. (ido-make-prompt, ido-file-internal, ido-toggle-vc) - (ido-read-file-name): ): Toggle VC checking via + (ido-read-file-name): Toggle VC checking via vc-handled-backends instead of vc-master-templates. (ido-file-internal): Handle ido-use-url-at-point and ido-use-filename-at-point via code borrowed from ffap-guesser. diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12 index 640c45dfc0c..242cfb8c953 100644 --- a/lisp/ChangeLog.12 +++ b/lisp/ChangeLog.12 @@ -1140,7 +1140,7 @@ (rcirc-keepalive-seconds): Remove variable. (rcirc-server-name, rcirc-timeout-timer, rcirc-connecting) (rcirc-process, rcirc-user-disconnect): New variables. - (rcirc-connect): Initalize new variables. + (rcirc-connect): Initialize new variables. (rcirc-keepalive): Don't send keepalive pings before connection is completed. (rcirc-sentinel): Do mark all channels with activity when diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13 index 630a4bc0865..8ce74b4e34f 100644 --- a/lisp/ChangeLog.13 +++ b/lisp/ChangeLog.13 @@ -7567,7 +7567,7 @@ (ediff-setup-windows-plain-merge) (ediff-setup-windows-plain-compare, ediff-setup-control-frame) (ediff-refresh-control-frame, ediff-get-visible-buffer-window): - * ediff-util.el (ediff-setup-keymap, ) + * ediff-util.el (ediff-setup-keymap) (ediff-toggle-wide-display, ediff-toggle-multiframe) (ediff-toggle-use-toolbar, ediff-really-quit) (ediff-good-frame-under-mouse) diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14 index 79a8b3776f2..504ca4f0aa0 100644 --- a/lisp/ChangeLog.14 +++ b/lisp/ChangeLog.14 @@ -1,3 +1,7 @@ +2009-02-07 Dave Love + + * net/tls.el (open-tls-stream): Don't query killing process. + 2009-06-21 Chong Yidong * Branch for 23.1. diff --git a/lisp/ChangeLog.3 b/lisp/ChangeLog.3 index f99f2ec4ec0..4c36aa94509 100644 --- a/lisp/ChangeLog.3 +++ b/lisp/ChangeLog.3 @@ -172,7 +172,7 @@ Choose string< or < as predicate. Reorder messages by exchanging them, with inhibit-quit bound. (rmail-fetch-field): Start by widening. - (rmail-sortable-date-strng): Deleted. + (rmail-sortable-date-string): Deleted. (rmail-make-date-sortable): New function, used instead. * paths.el (gnus-local-organization): Renamed from ...-your-... diff --git a/lisp/ChangeLog.8 b/lisp/ChangeLog.8 index 6e1de200f7c..82f11450a7b 100644 --- a/lisp/ChangeLog.8 +++ b/lisp/ChangeLog.8 @@ -1172,7 +1172,7 @@ 1999-12-03 Kenichi Handa - * international/mule-util.el (truncate-string-to-width): Docsting + * international/mule-util.el (truncate-string-to-width): Docstring fixed. 1999-12-02 Stefan Monnier diff --git a/lisp/ChangeLog.9 b/lisp/ChangeLog.9 index 56239cd3104..344ec373e75 100644 --- a/lisp/ChangeLog.9 +++ b/lisp/ChangeLog.9 @@ -5773,7 +5773,7 @@ 2001-02-05 Kenichi Handa * isearch.el (isearch-forward): Add description about input method - in the docsting. + in the docstring. 2001-02-04 Stefan Monnier @@ -8121,7 +8121,7 @@ * dired.el (dired-get-filename): Return filename verbatim if LOCALP is `verbatim'. * dired-aux.el (dired-add-entry): Call `dired-get-filename' with - `verbatim' so that we don't inadvertently delete a non-existant + `verbatim' so that we don't inadvertently delete a non-existent directory name. 2000-11-27 Kenichi Handa @@ -19040,7 +19040,7 @@ (fontset-default-styles): Likewise. (x-modify-font-name): Function removed. (create-fontset-from-fontset-spec): Ignore the argument STYLE-VARIANT. - (create-fontset-from-ascii-font): Docsting adjusted for the above + (create-fontset-from-ascii-font): Docstring adjusted for the above change. (instantiate-fontset, resolve-fontset-name): Functions removed. (fontset-list): Now implemented by C code. diff --git a/lisp/ChangeLog.trunk b/lisp/ChangeLog.trunk index f0e59a6c6a6..3ca07c33e15 100644 --- a/lisp/ChangeLog.trunk +++ b/lisp/ChangeLog.trunk @@ -1,3 +1,753 @@ +2010-09-29 Lars Magne Ingebrigtsen + + * net/gnutls.el (starttls-negotiate): Loop a lot longer. + (starttls-negotiate): Just call boot, and let the handshake be + triggered from the read loop. + +2010-09-29 Glenn Morris + + * calendar/diary-lib.el (diary-list-entries): Use temp buffers when + not displaying the diary. + (diary-add-to-list): If no buffer-file-name, fall back to diary-file. + * calendar/appt.el (appt-check): No longer need to kill diary. + + * calendar/diary-lib.el (diary-list-entries): Move the + "Preparing..." message entirely here. + (diary-simple-display, diary-fancy-display): Move "Preparing..." + messages to diary-list-entries. + (diary-include-other-diary-files): Use LIST-ONLY rather than setting + diary-display-function. + + * calendar/diary-lib.el (diary-include-other-diary-files): + Trap some recursive includes. + + * calendar/appt.el (appt-activate): Check diary file. + +2010-09-29 Katsumi Yamaoka + + * pgg.el (pgg-run-at-time-1): Define it for XEmacs only; fix if/else + construction. + + * calendar/time-date.el: No need to require cl for Emacs 21. + +2010-09-28 Glenn Morris + + * calendar/appt.el (appt-check): Minor simplification. + +2010-09-28 Katsumi Yamaoka + + * mail/sendmail.el (mail-citation-prefix-regexp): Remove "}" from + citation prefix. + +2010-09-27 Andreas Schwab + + * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): + Avoid infinite recursion on erroneous lambda form. (Bug#7114) + +2010-09-27 Kenichi Handa + + * tar-mode.el (tar-header-block-tokenize): Decode filenames in + "ustar" format. + +2010-09-27 Kenichi Handa + + * international/mule.el (define-coding-system): Docstring fixed. + + * international/mule-diag.el (describe-character-set): Use princ + with proper print-length and print-level instead of insert. + +2010-09-27 Juanma Barranquero + + * window.el (walk-windows): Doc fix (bug#7105). + +2010-09-27 Stefan Monnier + + * emacs-lisp/float-sup.el (e): Remove. + +2010-09-27 Teodor Zlatanov + + * net/gnutls.el (gnutls, gnutls-log-level): Add group and custom + variable. + (starttls-negotiate): Use it. + +2010-09-27 Lars Magne Ingebrigtsen + + * net/gnutls.el (starttls-negotiate): Stop looping when we get a t + back. + +2010-09-26 Stefan Monnier + + * emacs-lisp/pcase.el (pcase-let*, pcase-let): plet -> pcase-let. + +2010-09-26 Lars Magne Ingebrigtsen + + * net/gnutls.el (starttls-negotiate): Avoid the cl.el decf function. + + * net/netrc.el (netrc-store-data): New function. + +2010-09-26 Teodor Zlatanov + + * net/gnutls.el: GnuTLS glue code to set up a connection. + +2010-09-25 Julien Danjou + + * notifications.el: Call dbus-register-signal only if it is bound. + +2010-09-25 Glenn Morris + + * eshell/em-alias.el, eshell/em-banner.el, eshell/em-basic.el: + * eshell/em-cmpl.el, eshell/em-dirs.el, eshell/em-glob.el: + * eshell/em-hist.el, eshell/em-ls.el, eshell/em-pred.el: + * eshell/em-prompt.el, eshell/em-rebind.el, eshell/em-script.el: + * eshell/em-smart.el, eshell/em-term.el, eshell/em-unix.el: + * eshell/esh-cmd.el, eshell/esh-ext.el, eshell/esh-io.el: + * eshell/esh-mode.el, eshell/esh-proc.el, eshell/esh-test.el: + * eshell/esh-util.el, eshell/esh-var.el: + Remove leading `*' from docs of faces and defcustoms. + +2010-09-25 Ulrich Mueller + + * eshell/em-ls.el (eshell-ls-archive-regexp): + * eshell/esh-util.el (eshell-tar-regexp): + * ibuffer.el (ibuffer-compressed-file-name-regexp): + * info.el (Info-suffix-list): + * international/mule.el (auto-coding-alist): + * woman.el (woman-file-regexp, woman-file-compression-regexp): + * progmodes/etags.el (tags-compression-info-list): + Support xz compression. + +2010-09-25 Chong Yidong + + * files.el (get-free-disk-space): Don't assume the "df" output + columns line up (Bug#6995). + +2010-09-25 Juanma Barranquero + + * finder.el (finder-unknown-keywords): + * progmodes/gdb-mi.el (gdb-jsonify-buffer, gdb-running-threads-count): + * progmodes/etags.el (tags-table-including): Fix typos in docstrings. + +2010-09-25 Juanma Barranquero + + * server.el (server-start): Revert part of 2010-08-08 change. Using + address 127.0.0.1 for local host is now done in Fmake_network_process. + +2010-09-24 Glenn Morris + + * image-mode.el, progmodes/compile.el, progmodes/gud.el: + * progmodes/mixal-mode.el, textmodes/bibtex-style.el: + * textmodes/css-mode.el, textmodes/dns-mode.el: + Move autoloaded auto-mode-alist entries to files.el. + * files.el (auto-mode-alist): Move entries here. + +2010-09-23 Glenn Morris + + * isearch.el (isearch-lazy-highlight-cleanup) + (isearch-lazy-highlight-initial-delay) + (isearch-lazy-highlight-interval) + (isearch-lazy-highlight-max-at-a-time, isearch-lazy-highlight-face): + * net/net-utils.el (ipconfig-program-options): + Move aliases to options before the associated definitions. + +2010-09-23 Stefan Monnier + + * newcomment.el (comment-normalize-vars): Better test validity of + comment-end-skip. + +2010-09-23 Stefan Monnier + + * emacs-lisp/float-sup.el (float-pi): New name for `pi'. + (float-e): New name for `e'. + (degrees-to-radians, radians-to-degrees): + * calendar/solar.el (solar-longitude): + * calculator.el (calculator-registers, calculator-funcall): + * textmodes/artist.el (artist-spray-random-points): + * play/bubbles.el (bubbles--initialize-images): Use new names. + +2010-09-23 Eric M. Ludlam + + Update to CEDET 1.0's version of EIEIO. + + * emacs-lisp/eieio.el (eieio-specialized-key-to-generic-key): + New function. + (eieio-defmethod, eieio-generic-form, eieio-generic-call): Use it. + (eieio-default-eval-maybe): Eval val instead of unquoting only. + (class-precedence-list): If class is nil, return nil. + (eieio-generic-call): If class of first input arg is nil, don't + look up static methods, and do check for primary methods. + (initialize-instance): See if the default needs to be evaluated + during the constructor. + (eieio-perform-slot-validation-for-default): Don't do the check + for values that will eventually be evaluated. + (eieio-eval-default-p): New function. + (eieio-default-eval-maybe): Use it. + +2010-09-23 Jan Moringen + + * emacs-lisp/eieio.el (eieio-defclass): Allow :c3 + method-invocation-order. + (eieio-c3-candidate, eieio-c3-merge-lists): New functions. + (eieio-class-precedence-dfs): Compute class precedence list using + dfs algorithm. + (eieio-class-precedence-bfs): Compute class precedence list using + bfs algorithm. + (eieio-class-precedence-c3): Compute class precedence list using + c3 algorithm. + (class-precedence-list): New function. + (eieiomt-method-list, eieiomt-sym-optimize): Use it. + (inconsistent-class-hierarchy): New error symbol. + (call-next-method): Stow the replacement argument list for future + call-next-method invocations. + +2010-09-23 Glenn Morris + + * calendar/appt.el (appt-check): If not displaying the diary, + use (diary 1) to only get the entries we need. + (appt-make-list): Sort diary-list-entries, if we cannot guarantee + that it is in day order. (Bug#7019) + + * calendar/appt.el (appt-check): Rather than showing the diary, + just turn off invisible display, and only if needed. + + * calendar/diary-lib.el (diary-list-entries): Doc fix. (Bug#7019) + +2010-09-23 Glenn Morris + + * emacs-lisp/bytecomp.el (byte-compile-file-form-defvar): + (byte-compile-defvar, byte-compile-cl-warn): + Start warnings with lower-case, like the majority. + + * files.el (auto-mode-alist): Add .xa, .xw, .xsw for ld-script-mode. + + * files.el (auto-mode-alist): Prefer C-mode for .xs. (Bug#7071) + + * progmodes/ld-script.el (auto-mode-alist): Move to files.el. + * files.el (auto-mode-alist): Move ld-script entries here, further down + the list. + + * vc/add-log.el: Don't require timezone when compiling. + (timezone-make-date-sortable): Autoload it. + (change-log-sortable-date-at): Don't require timezone. + Use `ignore-errors'. + + * comint.el (comint-use-prompt-regexp-instead-of-fields): + Move alias before definition, so it does not need autoloading. + + * emulation/crisp.el, emulation/cua-base.el, emulation/edt.el: + * emulation/pc-select.el, emulation/vip.el, international/iso-ascii.el: + * international/kkc.el, international/ogonek.el, mail/feedmail.el: + * net/browse-url.el, net/eudc-vars.el, net/net-utils.el: + * net/rcompile.el, net/rlogin.el, textmodes/enriched.el: + * textmodes/makeinfo.el, textmodes/page-ext.el, textmodes/picture.el: + * textmodes/refer.el, textmodes/spell.el, textmodes/table.el: + * textmodes/tex-mode.el, textmodes/two-column.el: + Remove leading `*' from docs of defcustoms etc. + +2010-09-23 Teodor Zlatanov + + * net/netrc.el (netrc-parse): Remove encrypt.el mentions. + +2010-09-22 Dan Christensen + + * calendar/time-date.el (date-to-time): Try using parse-time-string + first before using the slower timezone-make-date-arpa-standard. + +2010-09-22 Katsumi Yamaoka + + * calendar/time-date.el (format-seconds): Comment fix. + +2010-09-22 Glenn Morris + + * emacs-lisp/package.el (package-menu-mode): `revert-buffer-function' + is not automatically buffer-local. + +2010-09-21 Stefan Monnier + + * emacs-lisp/smie.el (smie-debug--describe-cycle): Fix typo. + (smie-indent-comment): Be more careful with comment-start-skip. + (smie-indent-comment-close, smie-indent-comment-inside): New funs. + (smie-indent-functions): Use them. + +2010-09-21 Michael Albinus + + * net/ange-ftp.el (ange-ftp-skip-msgs): Add "^504 ..." message. + +2010-09-21 Jan Djärv + + * menu-bar.el (menu-bar-set-tool-bar-position): customize-set-variable + tool-bar-position. Don't modify frame parameters here. + (menu-bar-options-save): Add tool-bar-position. + + * tool-bar.el (tool-bar-position): New defcustom (Bug#7049). + +2010-09-20 Stefan Monnier + + * textmodes/reftex-parse.el (reftex-what-macro) + (reftex-context-substring): Let-bind forward-sexp-function to nil + since we don't need/want to treat \begin...\end as a block (bug#7053). + + * emacs-lisp/lisp.el (up-list): Don't do nothing silently. + + * simple.el (blink-matching-open): Use syntax-class. + + * progmodes/pascal.el (pascal-mode): Use define-derived-mode. + Set invisibility spec for pascal's outline mode. + (pascal-outline-change): Clean up calling convention. + (pascal-show-all, pascal-hide-other-defuns): Update callers. + + * progmodes/prolog.el (prolog-smie-forward-token) + (prolog-smie-backward-token): New functions. + (prolog-mode-variables): Use them to parse "!," correctly. + Set up smie-blink-matching for ".". + + * textmodes/ispell.el (ispell-start, ispell-end): Rename from `start' + and `end'. + (ispell-region, ispell-process-line): Update users. + + * textmodes/reftex-parse.el (reftex-what-macro): Don't hardcode + point-min==1. + + * textmodes/ispell.el: Fix commenting convention. + (ispell-parse-output): Simplify, use push. + (ispell-region): Use match-string-no-properties. + (ispell-begin-skip-region-regexp): Use mapconcat to simplify. + (ispell-minor-mode): Use define-minor-mode. + (ispell-message): Remove unused var `skip-regexp'. + (ispell-add-per-file-word-list): Use dynamic let-binding. + Try and use the proper comment marker. + + * mail/sendmail.el: Fix commenting convention. + (sendmail-send-it): Use line-beginning-position. + + * help-fns.el (describe-variable): Add original value, if applicable. + +2010-09-20 Juanma Barranquero + + * subr.el (y-or-n-p): Remove leftover code from 2010-09-17T13:30:30Z!monnier@iro.umontreal.ca. + + * emacs-lisp/smie.el (smie-indent--hanging-p): Use `smie-indent--bolp'. + +2010-09-19 Stefan Monnier + + * emacs-lisp/smie.el (smie-bnf-precedence-table): Improve error message. + (smie-debug--prec2-cycle, smie-debug--describe-cycle): New functions. + (smie-prec2-levels): Use them to better diagnose precedence cycles. + (smie-blink-matching-check): Don't signal a mismatch if car is t. + (smie-blink-matching-open): Rewrite to remove assumptions, so that + something like "." can also be a closer. + (smie--associative-p, smie-indent--hanging-p, smie-indent--bolp) + (smie-indent--offset, smie-indent--offset-rule, smie-indent--column): + Rename internal functions to use "--". Update callers. + + * frame.el (make-frame-names-alist): Don't list frames on other displays. + + * fringe.el (fringe-styles): New var. + (fringe-mode, fringe-query-style): Use it. + +2010-09-18 Michael R. Mauger + + * progmodes/sql.el: Version 2.8 + (sql-login-params): Update widget structure; changes still needed. + (sql-product-alist): Add :list-all and :list-table features for + SQLite, Postgres and MySQL products. + (sql-redirect): Handle default value. + (sql-execute, sql-execute-feature): New functions. + (sql-read-table-name): New function. + (sql-list-all, sql-list-table): New functions. User API. + (sql-mode-map, sql-interactive-mode-map): Add key definitions + for above functions. + (sql-mode-menu, sql-interactive-mode-menu): Add menu definitions + for above functions. + (sql-postgres-login-params): Add user and database defaults. + (sql-buffer-live-p): Bug fix. + (sql-product-history): New variable. + (sql-read-product): New function. Use it. + (sql-set-product, sql-product-interactive): Use it. + (sql-connection-history): New variable. + (sql-read-connection): New function. Use it. + (sql-connect): New function. + (sql-for-each-login): Redesign function interface. + (sql-make-alternate-buffer-name, sql-save-connection): Use it. + (sql-get-login-ext, sql-get-login): Use it. Handle default values. + (sql-comint): Check for program. Existing live buffer. + (sql-comint-postgres): Add port parameter. + +2010-09-19 Stefan Monnier + + * emacs-lisp/warnings.el: Fix commenting convention. + (display-warning): Use special mode and make the buffer read-only. + +2010-09-18 Jay Belanger + + * calc/calc-prog.el (calc-read-parse-table-part): Don't "fix" the + empty string when it follows a repeated or optional pattern. + +2010-09-18 Stefan Monnier + + * indent.el (indent-according-to-mode): Apply syntax-propertize. + (indent-region): Use indent-according-to-mode. + +2010-09-18 Eli Zaretskii + + * fringe.el (fringe-mode): Doc fix. + +2010-09-14 Kan-Ru Chen (tiny change) + + * textmodes/nroff-mode.el (nroff-view): Kill old buffer before + refreshing the preview buffer. + +2010-09-18 Stefan Monnier + + * textmodes/tex-mode.el (tex-syntax-propertize-rules) + (latex-syntax-propertize-rules): New consts; replace + tex-font-lock-syntactic-keywords. + (tex-env-mark, latex-env-before-change): New functions. + (latex-electric-env-pair-mode): New minor mode. + (tex-font-lock-verb): Change arguments; do move point. + (tex-font-lock-syntactic-face-function): Adjust to new verbatim + representation as a form of comment. + (tex-font-lock-keywords-1): Remove workaround, now unneeded. + (doctex-syntax-propertize-rules): New const; replaces + doctex-font-lock-syntactic-keywords. + (tex-common-initialization, doctex-mode): Use syntax-propertize-rules. + + * progmodes/fortran.el (fortran--font-lock-syntactic-keywords): Remove. + (fortran-make-syntax-propertize-function): New function; replaces + fortran-font-lock-syntactic-keywords. + (fortran-mode): Use it. + (fortran-line-length): Use it. Improve interactive spec. + + * emacs-lisp/syntax.el (syntax-propertize-precompile-rules): New macro. + (syntax-propertize-rules): Add var-ref case. Fix offset computation + when adding surrounding \(..\). + + * progmodes/js.el (js-mode): Fix last change (bug#7054). + +2010-09-17 Stefan Monnier + + * obsolete/old-whitespace.el (whitespace-rescan-files-in-buffers): + Use with-current-buffer. + + * isearch.el (isearch-face): Rename from `isearch'. + (isearch-highlight): Use new name. + +2010-09-17 Eli Zaretskii + + * fringe.el (fringe-mode, fringe-query-style): Use 4 pixels, not + 5, for `half' width fringes. (Bug#6933) + +2010-09-17 Stefan Monnier + + * emacs-lisp/bytecomp.el (byte-compile-file-form-defvar) + (byte-compile-defvar): "foo/bar" does not lack a prefix. + + * subr.el (y-or-n-p): Add the "(y or n)" that was lost somehow. + +2010-09-17 Stephen Berman + + * dframe.el (dframe-reposition-frame-emacs): Use tool-bar-pixel-width + in calculating new frame position. Add more space between new and + parent on the left (Bug#7048). + +2010-09-17 Michael Albinus + + * net/tramp-compat.el (tramp-compat-with-temp-message): Make it a + defmacro. + +2010-09-16 Chong Yidong + + * mail/sendmail.el: Add "*unsent mail*" to same-window-buffer-names. + + * term/x-win.el (x-cut-buffer-or-selection-value): Define as + obsolete alias for x-selection-value. + + * ido.el (ido-make-buffer-list): Fix error in 2010-08-22 merge. + +2010-09-16 Michael Albinus + + * net/tramp-cmds.el (tramp-cleanup-connection): Set tramp-autoload + cookie. + +2010-09-15 Michael Albinus + + * net/tramp-compat.el (tramp-compat-with-temp-message) + (tramp-compat-font-lock-add-keywords, tramp-compat-process-get) + (tramp-compat-process-put): New defuns. + + * net/tramp.el (top): + * net/tramp-gvfs.el (top): + * net/tramp-cache.el (top): Use `tramp-compat-font-lock-add-keywords'. + + * net/tramp.el (tramp-progress-reporter-update): + Use `tramp-compat-funcall'. + + * net/tramp.el (tramp-process-actions): + * net/tramp-gvfs.el (tramp-handle-vc-registered): + * net/tramp-sh.el (tramp-gvfs-handler-askquestion) + (tramp-get-remote-stat, tramp-get-remote-readlink): + Use `tramp-compat-with-temp-message'. + + * net/tramp-sh.el (top): Require 'cl. + (tramp-handle-start-file-process): Use `tramp-compat-process-get'. + (tramp-open-connection-setup-interactive-shell): + Use `tramp-compat-process-put'. + +2010-09-15 Alan Mackenzie + + * progmodes/cc-engine.el (c-forward-<>-arglist-recur): Correct the + indentation. + (c-forward-<>-arglist-recur): Fix an infinite recursion. + +2010-09-15 Stefan Monnier + + * emacs-lisp/bytecomp.el (byte-compile-warning-types): New type + `lexical' for warnings related to lexical scoping. + (byte-compile-file-form-defvar, byte-compile-defvar): Warn about + global vars which don't have a prefix and could hence affect lexical + scoping in unrelated files. + +2010-09-14 Lars Magne Ingebrigtsen + + * net/imap.el: Revert back to version + cb950ed8ff3e0f40dac437a51b269166f9ffb60d, since some of the changes + seem problematic. + +2010-09-14 Juanma Barranquero + + * obsolete/old-whitespace.el (whitespace-unload-function): + Explicitly pass `obarray' to `unintern' to avoid a warning. + +2010-09-14 Stefan Monnier + + * emacs-lisp/byte-run.el (set-advertised-calling-convention): + Add `when' argument. Update callers. + + * subr.el (unintern): Declare the obarray arg mandatory. + +2010-09-14 Glenn Morris + + * calendar/diary-lib.el (diary-list-entries-hook, diary-sort-entries): + Doc fixes. + + * calendar/diary-lib.el (diary-included-files): New variable. + (diary-list-entries): Maybe initialize diary-included-files. + (diary-include-other-diary-files): Append to diary-included-files. + * calendar/appt.el (appt-update-list): Also check the members of + diary-included-files. (Bug#6999) + (appt-check): Doc fix. + +2010-09-14 David Reitter + + * simple.el (line-move-visual): Do not truncate goal column to + integer size. (Bug#7020) + +2010-09-14 Stefan Monnier + + * repeat.el (repeat): Allow repeating when the last event is a click. + Suggested by Drew Adams (bug#6256). + +2010-09-14 Sascha Wilde + + * vc/vc-hg.el (vc-hg-state,vc-hg-working-revision): + Replace setting HGRCPATH to "" by some less invasive --config options. + +2010-09-14 Stefan Monnier + + * font-lock.el (font-lock-beginning-of-syntax-function): + Mark as obsolete. + +2010-09-14 Glenn Morris + + * menu-bar.el (menu-bar-options-save): Fix handling of menu-bar + and tool-bar modes. (Bug#6211) + (menu-bar-mode): Move setting of standard-value after the + minor-mode definition, otherwise it seems to have no effect. + +2010-09-14 Masatake YAMATO + + * progmodes/antlr-mode.el (antlr-font-lock-additional-keywords): + Fix typo. (Bug#6976) + +2010-09-14 Vinicius Jose Latorre + + * whitespace.el: Allow cleaning up blanks without blank + visualization (Bug#6651). Adjust help window for + whitespace-toggle-options (Bug#6479). Allow to use fill-column + instead of whitespace-line-column (from EmacsWiki). New version 13.1. + (whitespace-style): Add new value 'face. Adjust docstring. + (whitespace-space, whitespace-hspace, whitespace-tab): + Adjust foreground property face. + (whitespace-line-column): Adjust docstring and type declaration. + (whitespace-style-value-list, whitespace-toggle-option-alist) + (whitespace-help-text): Adjust const initialization. + (whitespace-toggle-options, global-whitespace-toggle-options): + Adjust docstring. + (whitespace-display-window, whitespace-interactive-char) + (whitespace-style-face-p, whitespace-color-on): Adjust code. + (whitespace-help-scroll): New fun. + +2010-09-14 Katsumi Yamaoka + + * calendar/time-date.el (format-seconds): Comment fix. + +2010-09-13 Michael R. Mauger + + * progmodes/sql.el: Version 2.7. + (sql-buffer-live-p): Improve detection. + (sql-find-sqli-buffer, sql-set-sqli-buffer-generally) + (sql-set-sqli-buffer): Use it. + (sql-product-interactive): Run `sql-set-sqli-hook'. + (sql-rename-buffer): Code cleanup. + (sql-redirect, sql-redirect-value): New functions. More to come. + +2010-09-13 Juanma Barranquero + + Port tramp-related Makefile changes of 2010-09-08T14:42:54Z!michael.albinus@gmx.de, 2010-09-13T15:17:01Z!michael.albinus@gmx.de to Windows. + * makefile.w32-in (LOADDEFS): Add $(lisp)/net/tramp-loaddefs.el. + (TRAMP_SRC): New macro. + ($(lisp)/net/tramp-loaddefs.el): New target. + +2010-09-13 Michael Albinus + + Major code cleanup. Split tramp.el into tramp.el and tramp-sh.el. + + * Makefile.in (TRAMP_SRC): Remove tramp-fish.el. Add tramp-sh.el. + + * net/tramp.el (top): Don't show loading message. Require just + 'tramp-compat, everything else is required there. + Use `ignore-errors' where appropriate. + (tramp-inline-compress-start-size, tramp-copy-size-limit) + (tramp-terminal-type, tramp-end-of-output) + (tramp-initial-end-of-output, tramp-completion-function-alist-rsh) + (tramp-completion-function-alist-ssh) + (tramp-completion-function-alist-telnet) + (tramp-completion-function-alist-su) + (tramp-completion-function-alist-putty, tramp-remote-path) + (tramp-remote-process-environment, tramp-sh-extra-args) + (tramp-actions-before-shell, tramp-uudecode) + (tramp-perl-file-truename, tramp-perl-file-name-all-completions) + (tramp-perl-file-attributes) + (tramp-perl-directory-files-and-attributes) + (tramp-perl-encode-with-module, tramp-perl-decode-with-module) + (tramp-perl-encode, tramp-perl-decode) + (tramp-vc-registered-read-file-names, tramp-file-mode-type-map) + (tramp-file-name-handler-alist, tramp-make-tramp-temp-file) + (tramp-handle-make-symbolic-link, tramp-handle-load) + (tramp-handle-file-name-as-directory) + (tramp-handle-file-name-directory) + (tramp-handle-file-name-nondirectory, tramp-handle-file-truename) + (tramp-handle-file-exists-p, tramp-handle-file-attributes) + (tramp-do-file-attributes-with-ls) + (tramp-do-file-attributes-with-perl) + (tramp-do-file-attributes-with-stat) + (tramp-handle-set-visited-file-modtime) + (tramp-handle-verify-visited-file-modtime) + (tramp-handle-set-file-modes, tramp-handle-set-file-times) + (tramp-set-file-uid-gid, tramp-remote-selinux-p) + (tramp-handle-file-selinux-context) + (tramp-handle-set-file-selinux-context) + (tramp-handle-file-executable-p, tramp-handle-file-readable-p) + (tramp-handle-file-newer-than-file-p, tramp-handle-file-modes) + (tramp-handle-file-directory-p, tramp-handle-file-regular-p) + (tramp-handle-file-symlink-p, tramp-handle-file-writable-p) + (tramp-handle-file-ownership-preserved-p) + (tramp-handle-directory-file-name, tramp-handle-directory-files) + (tramp-handle-directory-files-and-attributes) + (tramp-do-directory-files-and-attributes-with-perl) + (tramp-do-directory-files-and-attributes-with-stat) + (tramp-handle-file-name-all-completions) + (tramp-handle-file-name-completion, tramp-handle-add-name-to-file) + (tramp-handle-copy-file, tramp-handle-copy-directory) + (tramp-handle-rename-file, tramp-do-copy-or-rename-file) + (tramp-do-copy-or-rename-file-via-buffer) + (tramp-do-copy-or-rename-file-directly) + (tramp-do-copy-or-rename-file-out-of-band) + (tramp-handle-make-directory, tramp-handle-delete-directory) + (tramp-handle-delete-file) + (tramp-handle-dired-recursive-delete-directory) + (tramp-handle-dired-compress-file, tramp-handle-dired-uncache) + (tramp-handle-insert-directory) + (tramp-handle-unhandled-file-name-directory) + (tramp-handle-expand-file-name) + (tramp-handle-substitute-in-file-name) + (tramp-handle-executable-find, tramp-process-sentinel) + (tramp-handle-start-file-process, tramp-handle-process-file) + (tramp-handle-call-process-region, tramp-handle-shell-command) + (tramp-handle-file-local-copy, tramp-handle-file-remote-p) + (tramp-handle-insert-file-contents) + (tramp-handle-insert-file-contents-literally) + (tramp-handle-find-backup-file-name) + (tramp-handle-make-auto-save-file-name, tramp-handle-write-region) + (tramp-vc-registered-file-names, tramp-handle-vc-registered) + (tramp-sh-file-name-handler, tramp-vc-file-name-handler) + (tramp-maybe-send-script, tramp-set-auto-save, tramp-run-test) + (tramp-run-test2, tramp-find-executable, tramp-set-remote-path) + (tramp-find-file-exists-command, tramp-open-shell) + (tramp-find-shell, tramp-barf-if-no-shell-prompt) + (tramp-open-connection-setup-interactive-shell) + (tramp-local-coding-commands, tramp-remote-coding-commands) + (tramp-find-inline-encoding, tramp-call-local-coding-command) + (tramp-inline-compress-commands, tramp-find-inline-compress) + (tramp-compute-multi-hops, tramp-maybe-open-connection) + (tramp-send-command, tramp-wait-for-output) + (tramp-send-command-and-check, tramp-barf-unless-okay) + (tramp-send-command-and-read, tramp-mode-string-to-int) + (tramp-convert-file-attributes, tramp-check-cached-permissions) + (tramp-file-mode-from-int, tramp-file-mode-permissions) + (tramp-shell-case-fold, tramp-make-copy-program-file-name) + (tramp-method-out-of-band-p, tramp-local-host-p) + (tramp-get-remote-path, tramp-get-remote-tmpdir) + (tramp-get-ls-command, tramp-get-ls-command-with-dired) + (tramp-get-test-command, tramp-get-test-nt-command) + (tramp-get-file-exists-command, tramp-get-remote-ln) + (tramp-get-remote-perl, tramp-get-remote-stat) + (tramp-get-remote-readlink, tramp-get-remote-trash) + (tramp-get-remote-id, tramp-get-remote-uid, tramp-get-remote-gid) + (tramp-get-local-uid, tramp-get-local-gid) + (tramp-get-inline-compress, tramp-get-inline-coding): Move to + tramp-sh.el. + (tramp-methods, tramp-default-method-alist) + (tramp-default-user-alist, tramp-foreign-file-name-handler-alist): + Move initialization to tramp-sh.el. + (tramp-temp-name-prefix): Make it a defconst. + (tramp-dissect-file-name): Don't check anymore for multi-hop + methods. + (tramp-debug-outline-regexp): Add a docstring. + (tramp-debug-outline-level): Rename from `tramp-outline-level'. + (tramp-get-debug-buffer): Use it. + + * net/tramp-cache.el (top): Set tramp-autoload cookie for + initialization forms. + (tramp-set-connection-property): Don't protect `tramp-message' + call, it isn't necessary any longer. + (tramp-dump-connection-properties): Use `ignore-errors'. + + * net/tramp-compat.el (top): Require 'advice, 'format-spec, + 'password-cache and 'auth-source. + + * net/tramp-gvfs.el (top): + * net/tramp-smb.el (top): Require 'tramp-sh. + + * net/tramp-gw.el (tramp-gw-open-network-stream): Use `ignore-errors'. + + * net/tramp-sh.el: New file, derived from tramp.el. + (top): Initialize `tramp-methods', `tramp-default-method-alist', + `tramp-default-user-alist', `tramp-foreign-file-name-handler-alist'. + Remove "scp1_old", "scp2_old", "ssh1_old", "ssh2_old". + Use `ignore-errors' where appropriate. + (tramp-sh-file-name-handler-alist): Rename from + `tramp-file-name-handler-alist'. + (tramp-send-command-and-check): Return t or nil. Remove all + `zerop' checks, where called. + (tramp-handle-set-file-modes) + (tramp-do-copy-or-rename-file-directly) + (tramp-handle-delete-directory, tramp-handle-delete-file) + (tramp-maybe-send-script): Use `tramp-barf-unless-okay'. + (tramp-sh-file-name-handler, tramp-send-command-and-check) + (tramp-get-remote-ln): Set tramp-autoload cookie. + + * net/tramp-fish.el: Remove file. + 2010-09-13 Daiki Ueno * epa-file.el (epa-file-insert-file-contents): If visiting, bind @@ -11,7 +761,7 @@ 2010-09-12 Stefan Monnier - * subr.el (y-or-n-p): New function, moved from src/fns.c. Use read-key. + * subr.el (y-or-n-p): New function, moved from src/fns.c; use read-key. 2010-09-12 Leo @@ -52,12 +802,10 @@ (sql-comint-mysql): Handle "sql-port" as a numeric. (sql-port-history): Delete unused variable. (sql-get-login): Default "sql-port" to a number. - (sql-product-alist): Correct Postgres prompt and terminator - regexp. + (sql-product-alist): Correct Postgres prompt and terminator regexp. (sql-sqlite-program): Dynamically detect presence of "sqlite" or "sqlite3" executables. - (sql-sqlite-login-params): Add "*.sqlite[23]?" database name - pattern. + (sql-sqlite-login-params): Add "*.sqlite[23]?" database name pattern. (sql-buffer-live-p): New function. (sql-mode-menu, sql-send-string): Use it. (sql-mode-oracle-font-lock-keywords): Improve SQL*Plus REMARK @@ -67,7 +815,7 @@ 2010-09-10 Lars Magne Ingebrigtsen - * net/netrc.el (netrc-credentials): New conveniency function. + * net/netrc.el (netrc-credentials): New convenience function. 2010-09-10 Stefan Monnier @@ -548,7 +1296,7 @@ `default-directory' unless using Ispell per-directory personal dictionaries and not in a mini-buffer under XEmacs. (kill-buffer-hook): Do not kill ispell process on exit when - `ispell-process-directory' is "~/". (Bug#6143) + `ispell-process-directory' is "~/". (Bug#6143) 2010-09-02 Jan Djärv @@ -618,8 +1366,8 @@ Setup standard-display-table for 8-bit characters by storing 8-bit characters in the element vector. - * disp-table.el (standard-display-8bit): Setup - standard-display-table for 8-bit characters by storing 8-bit + * disp-table.el (standard-display-8bit): + Setup standard-display-table for 8-bit characters by storing 8-bit characters in the element vector. (standard-display-european): Likewise. @@ -848,8 +1596,7 @@ 2010-08-26 David Reitter * server.el (server-visit-files): Run pre-command-hook and - post-command-hook for each buffer while it is current - (Bug#6910). + post-command-hook for each buffer while it is current (Bug#6910). (server-execute): Do not run hooks here. 2010-08-26 Michael Albinus @@ -885,8 +1632,8 @@ (tramp-compat-file-attributes): Handle only `wrong-number-of-arguments' error. - * net/tramp-fish.el (tramp-fish-handle-copy-file): Add - PRESERVE_SELINUX_CONTEXT. + * net/tramp-fish.el (tramp-fish-handle-copy-file): + Add PRESERVE_SELINUX_CONTEXT. (tramp-fish-handle-delete-file): Add TRASH arg. (tramp-fish-handle-directory-files-and-attributes): Do not use `tramp-fish-handle-file-attributes. @@ -904,8 +1651,8 @@ (with-tramp-dbus-call-method): Format trace message. (tramp-gvfs-handle-copy-file): Handle PRESERVE-SELINUX-CONTEXT. (tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): - Implement backup call, when operation on local files fails. Use - progress reporter. Flush properties of changed files. + Implement backup call, when operation on local files fails. + Use progress reporter. Flush properties of changed files. (tramp-gvfs-handle-delete-file): Add TRASH arg. Use `tramp-compat-delete-file'. (tramp-gvfs-handle-expand-file-name): Expand "~/". @@ -916,17 +1663,17 @@ into account for the resulting file name. (tramp-gvfs-handler-askquestion): Preserve current message, in order to let progress reporter continue afterwards. (Bug#6257) - Return dummy mountpoint, when the answer is "no". See - `tramp-gvfs-maybe-open-connection'. + Return dummy mountpoint, when the answer is "no". + See `tramp-gvfs-maybe-open-connection'. (tramp-gvfs-handler-mounted-unmounted) (tramp-gvfs-connection-mounted-p): Test also for new mountspec - attribute "default_location". Set "prefix" property. Handle - default-location. + attribute "default_location". Set "prefix" property. + Handle default-location. (tramp-gvfs-mount-spec): Return both prefix and mountspec. (tramp-gvfs-maybe-open-connection): Test, whether mountpoint exists. Raise an error, if not (due to a corresponding answer - "no" in interactive questions, for example). Use - `tramp-compat-funcall'. + "no" in interactive questions, for example). + Use `tramp-compat-funcall'. * net/tramp-imap.el (top): Autoload `epg-make-context'. (tramp-imap-handle-copy-file): Add PRESERVE-SELINUX-CONTEXT. @@ -935,8 +1682,8 @@ (tramp-imap-handle-file-local-copy): Use `with-progress-reporter'. (tramp-imap-handle-delete-file): Add TRASH arg. - * net/tramp-smb.el (tramp-smb-handle-copy-file): Add - PRESERVE-SELINUX-CONTEXT. + * net/tramp-smb.el (tramp-smb-handle-copy-file): + Add PRESERVE-SELINUX-CONTEXT. (tramp-smb-handle-copy-file) (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file) (tramp-smb-handle-write-region, tramp-smb-maybe-open-connection): @@ -1003,8 +1750,8 @@ (tramp-get-remote-path): Use `copy-tree'. (tramp-completion-handle-file-name-all-completions): Ensure, that non remote files are still checked. Oops. - (tramp-handle-copy-file, tramp-do-copy-or-rename-file): Handle - PRESERVE-SELINUX-CONTEXT. + (tramp-handle-copy-file, tramp-do-copy-or-rename-file): + Handle PRESERVE-SELINUX-CONTEXT. (tramp-do-copy-or-rename-file): Add progress reporter. (tramp-do-copy-or-rename-file-directly): Do not use `tramp-handle-file-remote-p'. @@ -1018,8 +1765,8 @@ cache. (tramp-handle-expand-file-name) (tramp-completion-handle-file-name-all-completions) - (tramp-completion-handle-file-name-completion): Use - `tramp-connectable-p'. + (tramp-completion-handle-file-name-completion): + Use `tramp-connectable-p'. (tramp-handle-start-file-process): Set connection property "vec". Use it, in order to invalidate file caches. Check only for `remote-tty' process property. @@ -1190,10 +1937,10 @@ 2010-08-22 Leo Fix buffer-list rename&refresh after killing a buffer in ido. - * lisp/ido.el: Revert Óscar's. + * ido.el: Revert Óscar's. (ido-kill-buffer-at-head): Exit the minibuffer with ido-exit=refresh. Remember the buffers at head, rather than their name. - * lisp/iswitchb.el (iswitchb-kill-buffer): Re-make the list. + * iswitchb.el (iswitchb-kill-buffer): Re-make the list. 2010-08-22 Kirk Kelsey (tiny change) Stefan Monnier @@ -1658,10 +2405,10 @@ 2010-08-08 Stephen Peters * calendar/icalendar.el - (icalendar--split-value): Fixed splitting regexp. (Bug#6766) - (icalendar--get-weekday-numbers): New + (icalendar--split-value): Fix splitting regexp. (Bug#6766) + (icalendar--get-weekday-numbers): New. (icalendar--convert-recurring-to-diary): Handle multiple byday - values in weekly rules. (Bug#6766) + values in weekly rules. (Bug#6766) 2010-08-08 Ulf Jasper @@ -1930,8 +2677,6 @@ * help-fns.el (find-lisp-object-file-name): Doc fix (bug#6494). - * cedet/semantic/db-file.el (object-write): Fix typo in docstring. - * time.el (display-time-day-and-date): Remove spurious * in docstring. (display-time-world-buffer-name, display-time-world-mode-map): Fix typos in docstrings. @@ -2536,8 +3281,7 @@ 2010-07-03 Michael Albinus * net/zeroconf.el (zeroconf-resolve-service) - (zeroconf-service-resolver-handler): Use - `dbus-byte-array-to-string'. + (zeroconf-service-resolver-handler): Use `dbus-byte-array-to-string'. (zeroconf-publish-service): Use `dbus-string-to-byte-array'. 2010-07-03 Jan Moringen @@ -2699,8 +3443,7 @@ * emacs-lisp/package-x.el: New file. Package uploading functionality split out from package.el. - * startup.el (command-line): Load packages after reading init - file. + * startup.el (command-line): Load packages after reading init file. 2010-06-17 Tom Tromey @@ -2709,7 +3452,7 @@ 2010-06-22 Dan Nicolaescu Fix vc-annotate for renamed files when using Git. - * vc-git.el (vc-git-find-revision): Deal with empty results from + * vc/vc-git.el (vc-git-find-revision): Deal with empty results from ls-files. Doe not pass the object as a file name to cat-file, it is not a file name. (vc-git-annotate-command): Pass the file name using -- to avoid @@ -2730,29 +3473,29 @@ 2010-06-22 Dan Nicolaescu Fix annotating other revisions for renamed files in vc-annotate. - * vc-annotate.el (vc-annotate): Add an optional argument for the + * vc/vc-annotate.el (vc-annotate): Add an optional argument for the VC backend. Use it when non-nil. (vc-annotate-warp-revision): Pass the VC backend to vc-annotate. (Bug#6487) Fix vc-annotate-show-changeset-diff-revision-at-line for git. - * vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): + * vc/vc-annotate.el (vc-annotate-show-diff-revision-at-line-internal): Do not pass the file name to the 'previous-revision call when we don't want a file diff. (Bug#6489) 2010-06-21 Dan Nicolaescu Fix finding revisions for renamed files in vc-annotate. - * vc.el (vc-find-revision): Add an optional argument for + * vc/vc.el (vc-find-revision): Add an optional argument for the VC backend. Use it when non-nil. - * vc-annotate.el (vc-annotate-find-revision-at-line): Pass the VC + * vc/vc-annotate.el (vc-annotate-find-revision-at-line): Pass the VC backend to vc-find-revision. (Bug#6487) 2010-06-21 Dan Nicolaescu Fix reading file names in Git annotate buffers. - * vc-git.el (vc-git-annotate-extract-revision-at-line): Remove - trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481) + * vc/vc-git.el (vc-git-annotate-extract-revision-at-line): + Remove trailing whitespace. Suggested by Eric Hanchrow. (Bug#6481) 2010-06-20 Alan Mackenzie @@ -2798,7 +3541,7 @@ 2010-06-16 Stefan Monnier - * vc-annotate.el (vc-annotate): Use vc-read-revision. + * vc/vc-annotate.el (vc-annotate): Use vc-read-revision. 2010-06-16 Glenn Morris @@ -2816,7 +3559,7 @@ 2010-06-16 Bob Rogers (tiny change) - * vc-svn.el (vc-svn-after-dir-status): Fix regexp for Subversions + * vc/vc-svn.el (vc-svn-after-dir-status): Fix regexp for Subversions older than version 1.6. (Bug#6361) 2010-06-16 Helmut Eller @@ -3119,12 +3862,6 @@ * international/mule.el (make-translation-table-from-vector): Doc fix. -2010-06-03 Eric Ludlam - - * cedet/semantic/lex-spp.el - (semantic-lex-spp-table-write-slot-value): Instead of erroring on - invalid values during save, just save a nil (Bug#6324). - 2010-06-03 Glenn Morris * desktop.el (desktop-clear-preserve-buffers): @@ -3233,11 +3970,6 @@ * vc-bzr.el (vc-bzr-revision-completion-table): Apply `file-directory-p' to the filename part rather than to the whole text. -2010-05-31 Jonathan Marchand (tiny change) - - * cedet/ede/cpp-root.el (ede-set-project-variables): Fix feature name - (bug#6231). - 2010-05-31 Stefan Monnier * man.el (Man-completion-table): Let the user type "-k " (bug#6319). @@ -3547,7 +4279,7 @@ * bs.el, expand.el, ido.el, image-dired.el, lpr.el, pcomplete.el, * skeleton.el, term.el, time.el, wid-edit.el, woman.el, * calc/calc-graph.el, calc/calc-help.el, calc/calc-incom.el, - * calc/calc.el, emacs-cl-extra.el, emacs-cl-loaddefs.el, + * calc/calc.el, emacs-lisp/cl-extra.el, emacs-lips/cl-loaddefs.el, * emulation/cua-rect.el, emulation/viper-ex.el, eshell/esh-test.el, * eshell/eshell.el, gnus/gnus-uu.el, gnus/nndoc.el, gnus/nnrss.el, * gnus/rfc2047.el, gnus/utf7.el, international/utf-7.el, @@ -4218,7 +4950,7 @@ 2010-05-07 Christian von Roques (tiny change) - * lisp/epg.el (epg-key-capablity-alist): Add "D" flag (Bug#5592). + * epg.el (epg-key-capablity-alist): Add "D" flag (Bug#5592). 2010-05-07 Katsumi Yamaoka @@ -4388,67 +5120,6 @@ (filter-buffer-substring-functions): New variable. (filter-buffer-substring): Use it. Remove unused arg `noprops'. - Use a mode-line spec rather than a static string in Semantic. - * cedet/semantic/util-modes.el: - (semantic-minor-modes-format): New var to replace... - (semantic-minor-modes-status): Remove. - (semantic-mode-line-update): Construct a mode-line spec rather than - a static string so that mouse buttons can be used on individual minor - modes and so that semantic-mode-line-update only needs to be called - when global settings are changed. - (semantic-add-minor-mode, semantic-toggle-minor-mode-globally): - Call semantic-mode-line-update. - (semantic-toggle-minor-mode-globally): Don't assume mode is on - minor-mode-alist, check semantic-minor-mode-alist as well. - (semantic-stickyfunc-mode, semantic-show-parser-state-auto-marker) - (semantic-show-parser-state-marker, semantic-show-parser-state-mode) - (semantic-show-unmatched-syntax-mode, semantic-highlight-edits-mode): - * cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode): - * cedet/semantic/idle.el (semantic-idle-scheduler-mode) - (define-semantic-idle-service, semantic-idle-summary-mode): - * cedet/semantic/decorate/mode.el (semantic-decoration-mode): - Don't call semantic-mode-line-update any more. - -2010-05-02 Stefan Monnier - - Use define-minor-mode in CEDET where applicable. - - * cedet/srecode/mode.el (srecode-minor-mode,global-srecode-minor-mode): - Use define-minor-mode. - - * cedet/semantic/util-modes.el (semantic-add-minor-mode): - Remove unused arg `keymap' and code redundant with define-minor-mode. - (semantic-toggle-minor-mode-globally): Only handle arg -1 and 1. - (semantic-stickyfunc-mode, global-semantic-show-unmatched-syntax-mode) - (semantic-highlight-func-mode, global-semantic-show-parser-state-mode) - (global-semantic-highlight-edits-mode, semantic-highlight-edits-mode) - (semantic-show-unmatched-syntax-mode, semantic-show-parser-state-mode) - (global-semantic-stickyfunc-mode, global-semantic-highlight-func-mode): - Use define-minor-mode. - (semantic-stickyfunc-mode-setup, semantic-highlight-edits-mode-setup) - (semantic-show-unmatched-syntax-mode-setup) - (semantic-show-parser-state-mode-setup) - (semantic-highlight-func-mode-setup): Inline into sole caller. - - * cedet/semantic/mru-bookmark.el (global-semantic-mru-bookmark-mode) - (semantic-mru-bookmark-mode): Use define-minor-mode. - (semantic-mru-bookmark-mode-setup): Inline into sole caller. - - * cedet/semantic/idle.el (define-semantic-idle-service): - Use define-minor-mode and inline setup function into its sole caller. - (semantic-idle-scheduler-mode-setup) - (semantic-idle-summary-mode-setup): Inline into sole caller. - (global-semantic-idle-scheduler-mode, semantic-idle-scheduler-mode): - Use define-minor-mode. - - * cedet/semantic/decorate/mode.el (global-semantic-decoration-mode) - (semantic-decoration-mode): Use define-minor-mode. - (semantic-decoration-mode-setup): Inline into sole caller. - - * cedet/ede/dired.el (ede-dired-minor-mode): Initialize in declaration. - (ede-dired-minor-mode): Use define-minor-mode and derived-mode-p. - (ede-dired-add-to-target): Use dolist. - 2010-05-01 Toru TSUNEYOSHI Michael Albinus @@ -4491,11 +5162,6 @@ * minibuffer.el (tags-completion-at-point-function): New function. (completion-at-point-functions): Use it. - * cedet/semantic.el (semantic-completion-at-point-function): - New function. - (semantic-mode): Use semantic-completion-at-point-function for - completion-at-point-functions instead. - * progmodes/etags.el (complete-tag): Revert last change. 2010-04-29 Alan Mackenzie @@ -4522,12 +5188,6 @@ * progmodes/etags.el (complete-tag): Move to minibuffer.el. - * cedet/semantic.el (semantic-mode): When enabled, add - semantic-ia-complete-symbol to completion-at-point-functions. - - * cedet/semantic/ia.el (semantic-ia-complete-symbol): Return nil - if Semantic is not active. - 2010-04-28 Michael Albinus * net/tramp.el (tramp-remote-selinux-p): New defun. @@ -4813,11 +5473,6 @@ (vc-bzr-shelve-apply-and-keep, vc-bzr-shelve-snapshot): Don't use *vc-bzr-shelve*. -2010-04-19 Chong Yidong - - * cedet/ede/pmake.el (ede-proj-makefile-insert-variables): - Don't destroy list before using it. - 2010-04-19 Dan Nicolaescu Fix the version number for added files. @@ -4943,25 +5598,25 @@ 2010-04-18 Jay Belanger - * calc.el (calc-mode-map): Bind "O" to `calc-missing-key'. + * calc/calc.el (calc-mode-map): Bind "O" to `calc-missing-key'. - * calc-bin.el (calc-radix): Have the "O" option turn on + * calc/calc-bin.el (calc-radix): Have the "O" option turn on twos-complement mode. 2010-04-17 Jay Belanger - * calc-ext.el (calc-init-extensions): Add keybinding for 'calc-option'. - Add `calc-option-prefix-help' to calc-help autoloads. + * calc/calc-ext.el (calc-init-extensions): Add keybinding for + 'calc-option'. Add `calc-option-prefix-help' to calc-help autoloads. (calc-inverse): Add "Option" to message, as appropriate. (calc-hyperbolic): Add "Option" to message, as appropriate. (calc-option, calc-is-option): New functions. - * calc-help.el (calc-full-help): Add `calc-option-help'. + * calc/calc-help.el (calc-full-help): Add `calc-option-help'. (calc-option-prefix-help): New function. - * calc-misc.el (calc-help): Add "Option" entry. + * calc/calc-misc.el (calc-help): Add "Option" entry. - * calc.el (calc-local-var-list): Add `calc-option-flag'. + * calc/calc.el (calc-local-var-list): Add `calc-option-flag'. (calc-option-flag): New variable. (calc-do): Set `calc-option-flag to nil. (calc-set-mode-line): Add "Opt " as appropriate. @@ -5295,7 +5950,7 @@ Enable recentf-mode if using virtual buffers. * ido.el (recentf-list): Declare for byte-compiler. - (ido-virtual-buffers): Move up to silence byte-compiler. Add docstring. + (ido-virtual-buffers): Move up to silence byte-compiler. Add docstring. (ido-make-buffer-list): Simplify. (ido-add-virtual-buffers-to-list): Simplify. Enable recentf-mode. @@ -5360,12 +6015,6 @@ * emacs-lisp/authors.el (authors-fixed-entries): Add entry for Eli Zaretskii. -2010-04-02 Juanma Barranquero - - * cedet/semantic/imenu.el (semantic-imenu-bucketize-type-members) - (semantic-create-imenu-directory-index): Fix typos in docstrings. - (semantic-imenu-goto-function): Reflow docstring. - 2010-04-02 Juri Linkov * ehelp.el (electric-help-orig-major-mode): @@ -5538,9 +6187,9 @@ 2010-03-27 Nick Roberts Restore GDB/MI fuctionality removed by 2009-12-29T07:15:34Z!nickrob@snap.net.nz. - * lisp/progmodes/gdb-mi.el: Restore. - * lisp/progmodes/gdb-ui.el: Remove. - * lisp/progmodes/gud.el: Re-accommodate for gdb-mi.el. + * progmodes/gdb-mi.el: Restore. + * progmodes/gdb-ui.el: Remove. + * progmodes/gud.el: Re-accommodate for gdb-mi.el. 2010-03-25 Glenn Morris @@ -5580,8 +6229,6 @@ * faces.el (set-face-attribute): Fix typo in docstring. (face-valid-attribute-values): Reflow docstring. - * cedet/srecode/table.el (srecode-template-table): Fix docstring typo. - 2010-03-24 Glenn Morris * textmodes/flyspell.el (sgml-lexical-context): Autoload it (Bug#5752). @@ -5641,10 +6288,6 @@ * net/trampver.el: Update release number. -2010-03-24 Glenn Morris - - * Makefile.in (ELCFILES): Add cedet/semantic/imenu.el. - 2010-03-24 Michael Albinus * net/tramp.el (tramp-find-executable): @@ -5654,11 +6297,6 @@ (tramp-open-connection-setup-interactive-shell): Remove workaround for OpenSolaris bug, it is not needed anymore. -2010-03-24 Eric M. Ludlam - - * cedet/semantic/imenu.el: New file, from the CEDET repository - (Bug#5412). - 2010-03-24 Glenn Morris * emacs-lisp/cl-macs.el (defsubst*): Add autoload cookie. (Bug#4427) @@ -5685,11 +6323,6 @@ * log-edit.el (log-edit-before-checkin-process): Doc fix. - * cedet/semantic/bovine/c.el (semantic-c-describe-environment): - Consistently check ede-object is bound throughout. - - * cedet/ede/project-am.el (ede-shell-run-something): Declare. - 2010-03-23 Sam Steingold Fix bug#5620: recalculate all markers on compilation buffer @@ -6126,11 +6759,6 @@ (vc-git-show-log-entry): Use prog1. (vc-git-after-dir-status-stage): Remove unused var `remaining'. -2010-03-06 Glenn Morris - - * cedet/semantic/grammar.el (semantic-grammar-header-template): - Update template copyright to GPLv3+. - 2010-03-05 Stefan Monnier * man.el (Man-files-regexp): Tighten up the regexp (bug#5686). @@ -6197,9 +6825,6 @@ * textmodes/reftex-toc.el (reftex-toc-promote-prepare): * emacs-lisp/elint.el (elint-add-required-env): - * cedet/semantic/db-find.el - (semanticdb-find-translate-path-brutish-default): - * cedet/ede/make.el (ede-make-check-version): * calendar/icalendar.el (icalendar--add-diary-entry): * calc/calcalg2.el (math-tracing-integral): * files.el (recover-session-finish): Use with-current-buffer @@ -6243,11 +6868,6 @@ * files.el (hack-local-variables-filter): For eval forms, also check safe-local-variable-p (Bug#5636). -2010-02-24 Eduard Wiebe - - * javascript.el (wisent-javascript-jv-expand-tag): Avoid c(ad)ddr - and use c(ad)r of cddr (Bug#5640). - 2010-02-22 Michael Albinus * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Protect @@ -6364,12 +6984,6 @@ * doc-view.el (doc-view): Add to data custom group. - * cedet/data-debug.el (data-debug): Move to extensions group. - - * cedet/ede.el (ede): - * cedet/srecode.el (srecode): - * cedet/semantic.el (semantic): Put in tools and extensions group. - * nxml/nxml-mode.el (nxml-faces): Remove from font-lock-faces group. * textmodes/flyspell.el (flyspell-word): Obey the offset specified @@ -6406,10 +7020,6 @@ * outline.el (outline-head-from-level): * simple.el (with-wrapper-hook): - * cedet/ede.el (ede-run-target, project-delete-target) - (project-dist-files, ede-name, ede-documentation, ede-parent-project) - (ede-adebug-project, ede-adebug-project-parent) - (ede-adebug-project-root): * emacs-lisp/elint.el (elint-extra-errors, elint-current-buffer) (elint-defun, elint-buffer-env, elint-top-form-logged) (elint-unbound-variable): @@ -6858,70 +7468,10 @@ 2010-01-18 Juanma Barranquero - * cedet/ede/locate.el (ede-locate-file-in-project) - (ede-locate-file-in-project-impl): Fix typos in docstrings. - (ede-enable-locate-on-project): Fix typos in error messages. - - * cedet/semantic/util-modes.el (semantic-unmatched-syntax-face) - (semantic-stickyfunc-old-hlf, semantic-stickyfunc-header-line-format) - (semantic-stickyfunc-sticky-classes, semantic-highlight-func-mode-setup) - (semantic-stickyfunc-fetch-stickyline): Fix typos in docstrings. - (semantic-stickyfunc-popup-menu, semantic-highlight-func-popup-menu): - Fix typos in menu help. - * emacs-lisp/chart.el (chart-file-count, chart-rmail-from): Fix typos in chart titles. * whitespace.el (whitespace-style, global-whitespace-newline-mode): - * cedet/semantic.el (semantic-require-version, semantic--buffer-cache) - (semantic-unmatched-syntax-cache-check, semantic-unmatched-syntax-hook) - (semantic--before-fetch-tags-hook, semantic-new-buffer-fcn-was-run) - (semantic--umatched-syntax-needs-refresh-p, semantic-elapsed-time) - (semantic-parse-stream, semantic-parse-region) - (semantic-parse-region-default, semantic--set-buffer-cache) - (semantic-minimum-working-buffer-size, semantic-refresh-tags-safe) - (semantic-bovinate-toplevel, semantic-load-system-cache-loaded) - (semantic-default-submodes): - * cedet/semantic/db-ebrowse.el (semanticdb-table-ebrowse) - (semanticdb-create-ebrowse-database) - (semanticdb-find-tags-for-completion-method) - (semanticdb-find-tags-by-class-method) - (semanticdb-deep-find-tags-by-name-method) - (semanticdb-deep-find-tags-for-completion-method): - * cedet/semantic/db-el.el (semanticdb-elisp-mapatom-collector) - (semanticdb-find-tags-by-name-method, emacs-lisp-mode) - (semanticdb-find-tags-for-completion-method) - (semanticdb-find-tags-by-class-method) - (semanticdb-deep-find-tags-for-completion-method): - * cedet/semantic/db-find.el (semanticdb-find-translate-path) - (semanticdb-find-need-cache-update-p, semanticdb-find-result-with-nil-p) - (semanticdb-find-scanned-include-tags, semanticdb-find-tags-collector) - (semanticdb-find-tags-by-name-method) - (semanticdb-find-tags-by-name-regexp-method) - (semanticdb-find-tags-for-completion-method) - (semanticdb-find-tags-by-class-method) - (semanticdb-find-tags-external-children-of-type-method) - (semanticdb-find-tags-subclasses-of-type-method) - (semanticdb-deep-find-tags-by-name-method) - (semanticdb-deep-find-tags-by-name-regexp-method) - (semanticdb-deep-find-tags-for-completion-method): - * cedet/semantic/db-global.el (semanticdb-enable-gnu-global-hook) - (semanticdb-enable-gnu-global-in-buffer) - (semanticdb-find-tags-for-completion-method) - (semanticdb-deep-find-tags-by-name-method) - (semanticdb-deep-find-tags-for-completion-method): - * cedet/semantic/db-javascript.el (semanticdb-javascript-tags) - (javascript-mode, semanticdb-find-translate-path) - (semanticdb-find-tags-for-completion-method) - (semanticdb-find-tags-by-class-method) - (semanticdb-deep-find-tags-by-name-method) - (semanticdb-deep-find-tags-for-completion-method) - (semanticdb-find-tags-external-children-of-type-method): - * cedet/semantic/idle.el (semantic-idle-work-core-handler) - (define-semantic-idle-service, semantic-idle-summary-useful-context-p) - (global-semantic-idle-scheduler-mode): - * cedet/srecode/dictionary.el (srecode-field-value) - (srecode-dictionary-add-section-dictionary): * emacs-lisp/eieio.el (eieio-error-unsupported-class-tags) (eieio-generic-form, eieio-help-mode-augmentation-maybee, eieio-browse) (describe-class, eieio-describe-generic, describe-generic): @@ -6973,13 +7523,8 @@ * calc/calc.el (calc-command-flags): Give it an initial value. -2010-01-17 Glenn Morris - - * cedet/semantic/idle.el (semantic-idle-work-for-one-buffer): Doc fix. - 2010-01-17 Juanma Barranquero - * cedet/semantic.el (semantic-mode): * files.el (minibuffer-with-setup-hook): * textmodes/artist.el (artist-mt, artist-key-undraw-continously) (artist-key-draw-continously, artist-key-do-continously-continously) @@ -7011,17 +7556,6 @@ 2010-01-16 Mario Lang - * cedet/ede/cpp-root.el (ede-cpp-root-project): - * cedet/ede/files.el (ede-expand-filename): - * cedet/ede/simple.el (ede-simple-project): - * cedet/semantic/complete.el (semantic-complete-read-tag-engine) - (semantic-complete-inline-tag-engine): - * cedet/semantic/db-el.el (semanticdb-equivalent-mode): - * cedet/semantic/db-global.el (semanticdb-equivalent-mode): - * cedet/semantic/db-javascript.el (semanticdb-equivalent-mode): - * cedet/semantic/db.el (semanticdb-equivalent-mode): - * cedet/semantic/decorate/include.el (semantic-decoration-unknown-include-describe): - * cedet/semantic/idle.el (semantic-idle-work-for-one-buffer): * emacs-lisp/chart.el (chart-translate-namezone): * textmodes/artist.el (artist-compute-popup-menu-table): Remove duplicated words in doc-strings. @@ -7050,13 +7584,6 @@ * find-cmd.el (find-constituents): * vc-arch.el (vc-arch-root): * window.el (window-body-height, pop-up-frames): - * cedet/semantic/edit.el (semantic-reparse-needed-change-hook) - (semantic-no-reparse-needed-change-hook): - * cedet/srecode/insert.el (srecode-resolve-argument-list) - (srecode-template-inserter-blank, srecode-template-inserter-variable) - (srecode-template-inserter-ask, srecode-template-inserter-width) - (srecode-template-inserter-section-start) - (srecode-template-inserter-section-end, srecode-insert-method): * emacs-lisp/eieio-base.el (eieio-singleton, slot-missing): * progmodes/ada-stmt.el (ada-if): * progmodes/gdb-ui.el (gdb-jsonify-buffer): @@ -7127,36 +7654,6 @@ * mail/emacsbug.el (report-emacs-bug-pretest-address): Set it to bug-gnu-emacs rather than emacs-pretest-bug. -2010-01-12 Juanma Barranquero - - * cedet/data-debug.el (data-debug): Fix customization group reference. - -2010-01-12 Juanma Barranquero - - * cedet/semantic/analyze.el (semantic-analyze-push-error) - (semantic-analyze-context, semantic-analyze-context-assignment) - (semantic-analyze-find-tag-sequence, semantic-analyze-find-tag): - * cedet/semantic/java.el (java-mode, semantic-tag-include-filename) - (semantic-java-doc-keywords-map): - * cedet/semantic/bovine/c.el (c-mode, semantic-c-member-of-autocast) - (semantic-lex-c-nested-namespace-ignore-second, semantic-parse-region) - (semantic-c-parse-lexical-token, semantic-c-debug-mode-init-pch) - (semantic-c-classname, semantic-format-tag-uml-prototype) - (semantic-c-dereference-namespace, semantic-analyze-type-constants): - * cedet/semantic/bovine/el.el (semantic-elisp-form-to-doc-string) - (semantic-emacs-lisp-obsoleted-doc, semantic-up-context) - (semantic-get-local-variables, semantic-end-of-command) - (semantic-beginning-of-command, semantic-ctxt-current-class-list) - (lisp-mode): - * cedet/semantic/bovine/make.el (makefile-mode): - * cedet/semantic/wisent/python.el (wisent-python-string-re) - (wisent-python-implicit-line-joining-p, wisent-python-forward-string) - (wisent-python-lex-beginning-of-line, wisent-python-lex-end-of-line) - (semantic-lex, semantic-get-local-variables, python-mode): - * cedet/semantic/wisent/python-wy.el (wisent-python-wy--keyword-table): - * cedet/srecode/extract.el (srecode-extract-state-set) - (srecode-extract-method): Fix typos in docstrings. - 2010-01-11 Sam Steingold * imenu.el (imenu-default-create-index-function): Detect infinite @@ -7215,17 +7712,9 @@ 2010-01-10 Chong Yidong - * cedet/semantic.el (semantic-new-buffer-setup-functions): - Add python parser. - * Makefile.in (ELCFILES): Add wisent/python-wy.el and wisent/python.el. -2010-01-10 Richard Kim - - * cedet/semantic/wisent/python-wy.el: - * cedet/semantic/wisent/python.el: New files. - 2010-01-09 Chong Yidong * man.el (Man-goto-section): Signal error if the section is not @@ -7409,9 +7898,6 @@ * mpc.el (mpc-playlist-delete): Fix typo in error messages. - * cedet/semantic/db-typecache.el (semanticdb-typecache-find-default): - Fix typo in docstring. - * net/imap-hash.el (imap-hash-make): Doc fix. (imap-hash-test): Fix typo in error message; reflow docstring. (imap-hash-p, imap-hash-get, imap-hash-put, imap-hash-make-message) @@ -7640,14 +8126,6 @@ `Info-display-images-node', and not put the `invisible' property in this case. -2009-12-14 Chong Yidong - - * cedet/semantic/mru-bookmark.el (global-semantic-mru-bookmark-mode) - (semantic-mru-bookmark-mode): Doc fixes. - - * cedet/semantic/db.el (semanticdb-cache-get): Use error instead - of assert. - 2009-12-13 Glenn Morris * mail/emacsbug.el (message-sort-headers): Define for compiler. @@ -8065,9 +8543,6 @@ * bindings.el (complete-symbol): Call semantic-ia-complete-symbol if possible. - * cedet/semantic/ia.el (semantic-ia-complete-symbol): - Make argument optional. - * shell.el (shell): Require ansi-color (Bug#5113). * ansi-color.el (ansi-color-for-comint-mode): Default to t. @@ -8095,24 +8570,6 @@ (Info-mode-menu): Add `Info-virtual-index' to the menu. (Info-mode): Add `Info-virtual-index' to the docstring. -2009-12-05 Eric Ludlam - - * cedet/semantic/bovine/c.el (semantic-c-describe-environment): - Describe project macro symbols. - - * cedet/semantic/complete.el (semantic-complete-do-completion): - Don't call semantic-collector-current-exact-match. - - * cedet/ede.el (ede-apply-preprocessor-map): Accept lists of - ede-objects as targets. - - * cedet/ede/pmake.el (ede-proj-makefile-insert-variables): Output - a target's object list even if compiler vars are already in the - Makefile. - - * cedet/ede/emacs.el (ede-preprocessor-map): Add config.h to the - list of headers producing necessary macros. - 2009-12-05 Roland Winkler * textmodes/bibtex.el (bibtex-map-entries): Use marker to keep @@ -8995,9 +9452,6 @@ * bookmark.el (bookmark-bmenu-hide-filenames): Remove assignment to deleted variable bookmark-bmenu-bookmark-column. - * cedet/semantic/idle.el (global-semantic-idle-scheduler-mode): - Move after definition of global-semantic-idle-tag-highlight-mode. - 2009-11-24 Stefan Monnier * bookmark.el (bookmark-bmenu-search): Clear echo area when exiting. @@ -9062,56 +9516,6 @@ * dired-x.el (dired-guess-shell-alist-default): Support xz format. (Bug#4953) -2009-11-22 Chong Yidong - - * cedet/srecode/map.el (srecode-get-maps): - * cedet/semantic/wisent/wisent.el (wisent-parse-toggle-verbose-flag): - * cedet/semantic/wisent/comp.el (wisent-toggle-verbose-flag): - * cedet/semantic/decorate/mode.el (semantic-decoration-mode) - (semantic-toggle-decoration-style): - * cedet/semantic/decorate/include.el - (semantic-decoration-include-describe) - (semantic-decoration-unknown-include-describe) - (semantic-decoration-unparsed-include-describe) - (semantic-decoration-all-include-summary): - * cedet/semantic/bovine/c.el (semantic-c-debug-mode-init): - * cedet/semantic/analyze/complete.el - (semantic-analyze-possible-completions): - * cedet/semantic/util-modes.el (semantic-highlight-edits-mode) - (semantic-show-unmatched-syntax-mode) - (semantic-show-parser-state-mode, semantic-stickyfunc-mode) - (semantic-highlight-func-mode): - * cedet/semantic/util.el (semantic-describe-buffer): - * cedet/semantic/symref.el (semantic-symref-find-references-by-name) - (semantic-symref-find-tags-by-name) - (semantic-symref-find-tags-by-regexp) - (semantic-symref-find-tags-by-completion) - (semantic-symref-find-file-references-by-name) - (semantic-symref-find-text): - * cedet/semantic/senator.el (senator-copy-tag, senator-kill-tag) - (senator-yank-tag): - * cedet/semantic/scope.el (semantic-calculate-scope): - * cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode): - * cedet/semantic/idle.el (semantic-idle-scheduler-mode) - (define-semantic-idle-service): - * cedet/semantic/complete.el (semantic-complete-analyze-inline) - (semantic-complete-analyze-inline-idle): - * cedet/semantic/analyze.el (semantic-analyze-current-context): - * cedet/mode-local.el (describe-mode-local-bindings) - (describe-mode-local-bindings-in-mode): - * cedet/ede/make.el (ede-make-check-version): - * cedet/ede/locate.el (ede-enable-locate-on-project): - * cedet/cedet-idutils.el (cedet-idutils-expand-filename) - (cedet-idutils-version-check): - * cedet/cedet-global.el (cedet-gnu-global-expand-filename) - (cedet-gnu-global-version-check): - * cedet/cedet-cscope.el (cedet-cscope-expand-filename) - (cedet-cscope-version-check): Use called-interactively-p instead - of interactive-p. - - * cedet/semantic/ia.el (semantic-ia-completion-format-tag-function): - Use semantic-format-tag-prototype. - 2009-11-22 Michael Kifer * emulation/viper-cmd.el: Use viper-last-command-char instead of @@ -9138,12 +9542,6 @@ * progmodes/subword.el (subword-mode-map): Fix subword-mode-map generation from word-movement command names. -2009-11-21 Chong Yidong - - * cedet/semantic/complete.el (semantic-complete-read-tag-engine) - (semantic-complete-jump-local, semantic-complete-jump): - Improve prompt string. - 2009-11-21 Jan Djärv * cus-start.el (all): Add native condition for font-use-system-font. @@ -9230,13 +9628,6 @@ (bookmark-bmenu-search): New command. (bookmark-bmenu-mode-map): Bind it. -2009-11-20 Chong Yidong - - * cedet/semantic/complete.el (semantic-complete-inline-map): Doc fix. - - * cedet/semantic/idle.el (define-semantic-idle-service) - (semantic-idle-summary-mode, semantic-idle-completions): Doc fix. - 2009-11-20 Tassilo Horn * progmodes/cc-cmds.el: declare-functioned forward-subword and @@ -9283,17 +9674,6 @@ * Makefile.in (ELCFILES): Regenerate. -2009-11-20 Chong Yidong - - * cedet/cedet.el (cedet-menu-map): Re-order menu items. - - * cedet/semantic.el: Enable idle-mode menu items only if - global-semantic-idle-scheduler-mode is enabled. - (semantic-default-submodes): Doc fix. - - * cedet/semantic/idle.el (global-semantic-idle-scheduler-mode): - When turning off, disable other idle modes. - 2009-11-20 Jay Belanger * calc/calc.el (calc-set-mode-line): @@ -9600,13 +9980,6 @@ * strokes.el (strokes-update-window-configuration): Make strokes buffer current before erasing (Bug#4906). - * cedet/semantic/idle.el (semantic-idle-summary-mode) - (semantic-idle-summary-mode): Define using define-minor-mode - instead of define-semantic-idle-service. - (semantic-idle-summary-mode): New function. - (semantic-idle-summary-mode-setup): Use pre-command-hook to ensure - that mouse motion does not reset the echo area. - 2009-11-15 Juri Linkov * simple.el (set-mark-default-inactive): Add :type, :group @@ -9975,9 +10348,6 @@ 2009-11-08 Chong Yidong - * cedet/semantic/ctxt.el (semantic-get-local-variables): Disable - the progress reporter entirely. - * emulation/cua-base.el: Add CUA property to some CC mode commands (Bug#4100). @@ -10260,79 +10630,6 @@ * emacs-lisp/autoload.el (generated-autoload-feature): Remove. (autoload-rubric): Don't use any more. - * cedet/semantic/fw.el (semantic/loaddefs): - * cedet/srecode.el (srecode/loaddefs): - * cedet/ede.el (ede/loaddefs): Load rather than require. - * cedet/ede/cpp-root.el: - * cedet/ede/emacs.el: - * cedet/ede/files.el: - * cedet/ede/linux.el: - * cedet/ede/locate.el: - * cedet/ede/make.el: - * cedet/ede/shell.el: - * cedet/ede/speedbar.el: - * cedet/ede/system.el: - * cedet/ede/util.el: - * cedet/semantic/analyze.el: - * cedet/semantic/bovine.el: - * cedet/semantic/complete.el: - * cedet/semantic/ctxt.el: - * cedet/semantic/db-file.el: - * cedet/semantic/db-find.el: - * cedet/semantic/db-global.el: - * cedet/semantic/db-mode.el: - * cedet/semantic/db-typecache.el: - * cedet/semantic/db.el: - * cedet/semantic/debug.el: - * cedet/semantic/dep.el: - * cedet/semantic/doc.el: - * cedet/semantic/edit.el: - * cedet/semantic/find.el: - * cedet/semantic/format.el: - * cedet/semantic/html.el: - * cedet/semantic/ia-sb.el: - * cedet/semantic/ia.el: - * cedet/semantic/idle.el: - * cedet/semantic/lex-spp.el: - * cedet/semantic/lex.el: - * cedet/semantic/mru-bookmark.el: - * cedet/semantic/scope.el: - * cedet/semantic/senator.el: - * cedet/semantic/sort.el: - * cedet/semantic/symref.el: - * cedet/semantic/tag-file.el: - * cedet/semantic/tag-ls.el: - * cedet/semantic/tag-write.el: - * cedet/semantic/tag.el: - * cedet/semantic/util-modes.el: - * cedet/semantic/analyze/complete.el: - * cedet/semantic/analyze/refs.el: - * cedet/semantic/bovine/c.el: - * cedet/semantic/bovine/gcc.el: - * cedet/semantic/bovine/make.el: - * cedet/semantic/bovine/scm.el: - * cedet/semantic/decorate/include.el: - * cedet/semantic/decorate/mode.el: - * cedet/semantic/symref/cscope.el: - * cedet/semantic/symref/global.el: - * cedet/semantic/symref/grep.el: - * cedet/semantic/symref/idutils.el: - * cedet/semantic/symref/list.el: - * cedet/semantic/wisent/java-tags.el: - * cedet/semantic/wisent/javascript.el: - * cedet/srecode/compile.el: - * cedet/srecode/cpp.el: - * cedet/srecode/document.el: - * cedet/srecode/el.el: - * cedet/srecode/expandproto.el: - * cedet/srecode/getset.el: - * cedet/srecode/insert.el: - * cedet/srecode/java.el: - * cedet/srecode/map.el: - * cedet/srecode/mode.el: - * cedet/srecode/template.el: - * cedet/srecode/texi.el: Remove the file-local setting of - generated-autoload-feature. * emacs-lisp/byte-run.el (define-obsolete-variable-alias): Use dolist, and only put a prop if it is non-nil. @@ -10349,8 +10646,6 @@ 2009-11-03 Glenn Morris - * cedet/mode-local.el (with-mode-local): Doc fix. - * emacs-lisp/bytecomp.el (byte-compile-file-form-defvar) (byte-compile-file-form-define-abbrev-table) (byte-compile-file-form-custom-declare-variable) @@ -10472,12 +10767,6 @@ * menu-bar.el (menu-bar-tools-menu): Add Semantic and EDE menu items. - * cedet/cedet.el (cedet-menu-map): Remove Semantic and EDE menu - items. - - * cedet/ede.el (ede-minor-mode): - * cedet/semantic.el (semantic-mode): Toggle menu separators. - 2009-10-31 Stefan Monnier * textmodes/two-column.el (2C-split): @@ -10631,89 +10920,12 @@ (byte-compile-variable-ref, byte-compile-setq-default): Respect `constants' member of byte-compile-warnings. - * cedet/semantic/tag.el (semantic--tag-link-list-to-buffer): - Use mapc rather than mapcar because the return value is never used. - - * cedet/srecode/template.el, cedet/semantic/wisent/javascript.el: - * cedet/semantic/wisent/java-tags.el, cedet/semantic/texi.el: - * cedet/semantic/html.el: - Suppress harmless warnings about setting up semantic-imenu (not - part of Emacs) variables. - 2009-10-30 Stefan Monnier * vc-bzr.el (vc-bzr-revision-keywords): New var. (vc-bzr-revision-completion-table): Use it to fix completion of "s:" to "submit:". - * cedet/srecode/srt-mode.el (semantic-analyze-possible-completions): - * cedet/semantic/symref/list.el (semantic-symref-rb-toggle-expand-tag): - * cedet/semantic/symref/grep.el (semantic-symref-perform-search): - * cedet/semantic/bovine/gcc.el (semantic-gcc-query): - * cedet/semantic/bovine/c.el (semantic-c-parse-lexical-token): - * cedet/semantic/analyze/debug.el (semantic-analyzer-debug-add-buttons) - (semantic-analyzer-debug-global-symbol) - (semantic-analyzer-debug-missing-innertype) - (semantic-analyzer-debug-insert-include-summary): - * cedet/semantic/util.el (semantic-file-tag-table): - (semantic-describe-buffer-var-helper, semantic-something-to-tag-table) - (semantic-recursive-find-nonterminal-by-name): - * cedet/semantic/tag-ls.el (semantic-tag-calculate-parent-default): - * cedet/semantic/tag-file.el (semantic-prototype-file): - * cedet/semantic/symref.el (semantic-symref-parse-tool-output): - * cedet/semantic/sb.el (semantic-sb-fetch-tag-table): - * cedet/semantic/lex-spp.el (semantic-lex-spp-lex-text-string): - * cedet/semantic/idle.el (semantic-idle-work-for-one-buffer): - (semantic-idle-summary-maybe-highlight): - * cedet/semantic/ia-sb.el (semantic-ia-speedbar) - (semantic-ia-sb-tag-info): - * cedet/semantic/grammar.el (semantic-analyze-possible-completions): - * cedet/semantic/find.el (semantic-brute-find-tag-by-position): - * cedet/semantic/ede-grammar.el (project-compile-target): - (ede-proj-makefile-insert-variables): - * cedet/semantic/debug.el (semantic-debug-set-parser-location): - (semantic-debug-set-source-location, semantic-debug-interface-layout) - (semantic-debug-mode, semantic-debug): - * cedet/semantic/db.el (semanticdb-needs-refresh-p): - * cedet/semantic/db-typecache.el (semanticdb-typecache-refresh-for-buffer): - * cedet/semantic/db-javascript.el (semanticdb-equivalent-mode): - * cedet/semantic/db-find.el (semanticdb-find-log-new-search) - (semanticdb-find-translate-path-includes--internal) - (semanticdb-reset-log, semanticdb-find-log-activity): - * cedet/semantic/db-file.el (object-write): - * cedet/semantic/db-el.el (semanticdb-equivalent-mode): - * cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-C-file-p) - (semanticdb-create-ebrowse-database): - * cedet/semantic/db-debug.el (semanticdb-table-sanity-check): - * cedet/semantic/complete.el (semantic-displayor-focus-request) - (semantic-collector-calculate-completions-raw) - (semantic-complete-read-tag-analyzer): - * cedet/semantic/analyze.el (semantic-analyze-pulse): - * cedet/ede/util.el (ede-update-version-in-source): - * cedet/ede/proj.el (project-delete-target): - * cedet/ede/proj-elisp.el (ede-update-version-in-source) - (ede-proj-flush-autoconf): - * cedet/ede/pconf.el (ede-proj-configure-synchronize) - (ede-proj-configure-synchronize): - * cedet/ede/locate.el (ede-locate-file-in-project-impl): - * cedet/ede/linux.el (ede-linux-version): - * cedet/ede/emacs.el (ede-emacs-version): - * cedet/ede/dired.el (ede-dired-add-to-target): - * cedet/ede.el (ede-buffer-header-file, ede-find-target) - (ede-buffer-documentation-files, ede-project-buffers, ede-set) - (ede-target-buffers, ede-buffers, ede-make-project-local-variable): - * cedet/cedet-idutils.el (cedet-idutils-fnid-call): - (cedet-idutils-lid-call, cedet-idutils-expand-filename) - (cedet-idutils-version-check): - * cedet/cedet-global.el (cedet-gnu-global-call): - (cedet-gnu-global-expand-filename, cedet-gnu-global-root) - (cedet-gnu-global-version-check, cedet-gnu-global-scan-hits): - * cedet/cedet-cscope.el (cedet-cscope-call) - (cedet-cscope-expand-filename, cedet-cscope-version-check): - Use with-current-buffer. - * cedet/ede.el (ede-make-project-local-variable) - (ede-set-project-variables, ede-set): Use dolist. - 2009-10-30 Dan Nicolaescu * textmodes/ispell.el (ispell-skip-region-alist): @@ -10757,16 +10969,6 @@ (calc-embedded-finish-command, calc-embedded-stack-change): * calc/calc-aent.el (calcAlg-enter): Use with-current-buffer. - * cedet/mode-local.el (make-obsolete-overload): Add `when' argument. - (overload-docstring-extension): Use that info. - * cedet/semantic/fw.el (semantic-alias-obsolete): Pass the `when' info. - * cedet/semantic/idle.el (semantic-eldoc-current-symbol-info): - * cedet/semantic/tag-ls.el (semantic-nonterminal-protection) - (semantic-nonterminal-abstract, semantic-nonterminal-leaf) - (semantic-nonterminal-full-name): Add the new `when' info. - * cedet/semantic/decorate/mode.el (semantic/decorate): Require CL for - `assert'. - * pcomplete.el (pcomplete-comint-setup): If there's a choice, replace shell-dynamic-complete-filename in preference to comint-dynamic-complete-filename. @@ -10907,36 +11109,6 @@ * bookmark.el (bookmark-bmenu-list): Don't use switch-to-buffer if we're inside a dedicated or minibuffer window. -2009-10-25 Stefan Monnier - - * cedet/semantic/fw.el (semantic-alias-obsolete) - (semantic-varalias-obsolete): Make the `when' arg mandatory. - (define-mode-overload-implementation): - * cedet/semantic/decorate/mode.el (semantic-decorate-pending-decoration-hooks): - * cedet/semantic/wisent.el (wisent-lex-make-token-table): - * cedet/semantic/util.el (semantic-file-token-stream) - (semantic-something-to-stream): - * cedet/semantic/tag.el (semantic-tag-make-assoc-list) - (semantic-expand-nonterminal): - * cedet/semantic/tag-file.el (semantic-find-nonterminal) - (semantic-find-dependency, semantic-find-nonterminal) - (semantic-find-dependency): - * cedet/semantic/lex.el (semantic-flex-start, semantic-flex-end) - (semantic-flex-text, semantic-flex-make-keyword-table) - (semantic-flex-keyword-p, semantic-flex-keyword-put) - (semantic-flex-keyword-get, semantic-flex-map-keywords) - (semantic-flex-keywords, semantic-flex-buffer, semantic-flex-list): - * cedet/semantic/java.el (semantic-java-prototype-nonterminal): - * cedet/semantic/idle.el (semantic-before-idle-scheduler-reparse-hooks) - (semantic-after-idle-scheduler-reparse-hooks): - * cedet/semantic/edit.el (semantic-edits-incremental-reparse-failed-hooks): - * cedet/semantic/db-mode.el (semanticdb-mode-hooks): - * cedet/semantic.el (semantic-toplevel-bovine-table) - (semantic-toplevel-bovine-cache) - (semantic-before-toplevel-bovination-hook, semantic-init-hooks) - (semantic-init-mode-hooks, semantic-init-db-hooks) - (semantic-bovination-working-type): Provide the `when' arg. - 2009-10-24 Karl Fogel * bookmark.el: Update documentation, especially documentation @@ -10965,15 +11137,6 @@ * files.el (delete-directory): Delete symlinks to directories with delete-file (Bug#4739). -2009-10-24 Chong Yidong - - * cedet/semantic/util.el (semantic-recursive-find-nonterminal-by-name): - * cedet/semantic/tag.el (semantic-token-type-parent): Add WHEN - argument to make-obsolete. - - * cedet/semantic/fw.el (semantic-alias-obsolete) - (semantic-varalias-obsolete): Add optional WHEN argument. - 2009-10-24 Dan Nicolaescu * vc.el (vc-backend-for-registration): Rename from @@ -11175,16 +11338,6 @@ * help-fns.el: Don't require help-mode (to avoid bootstrap issues). -2009-10-21 Eric Ludlam - - * cedet/semantic/bovine/c.el (semantic-c-debug-mode-init) - (semantic-c-debug-mode-init-pch): New functions. - (semantic-c-debug-mode-init-last-mode): New var. - (semantic-c-parse-lexical-token): Use them. - - * cedet/semantic/lex-spp.el (semantic-lex-spp-anlyzer-do-replace): - When extracting the argument list, limit only by point-max. - 2009-10-21 Michael Albinus * net/tramp-smb.el (tramp-smb-get-stat-capability): New defun. @@ -11299,81 +11452,6 @@ (tar-header-block-tokenize): Decode the username and groupname. (tar-chown-entry, tar-chgrp-entry): Encode the names (bug#4730). -2009-10-17 Chong Yidong - - * cedet/srecode/srt.el: - * cedet/srecode/compile.el: - * cedet/semantic/mru-bookmark.el: - * cedet/semantic/debug.el: - * cedet/semantic/complete.el: - * cedet/semantic/analyze.el: Require CL when compiling. - -2009-10-17 Eric Ludlam - - * cedet/semantic/scope.el - (semantic-analyze-scoped-inherited-tag-map): Wrap calculation of - tmpscope so that the regular scope will continue to work. - - * cedet/semantic/idle.el (semantic-idle-tag-highlight): - Use semantic-idle-summary-highlight-face as the highlighting. - - * emacs-lisp/eieio-base.el (eieio-persistent-save): If buffer - contains multibyte characters, choose first applicable coding - system automatically. - - * cedet/ede/project-am.el (project-run-target): New method. - (project-run-target): New method. - - * cedet/ede.el (ede-target): Add run target menu item. - (ede-project, ede-minor-keymap): Add ede-run-target binding. - (ede-run-target): New function. - (ede-target::project-run-target): New method. - - * cedet/ede/proj.el (project-run-target): New method. - - * cedet/ede/proj-shared.el (ede-gcc-libtool-shared-compiler) - (ede-g++-libtool-shared-compiler): Remove SHELL. Remove COMMANDS. - Add :rules. - (ede-proj-target-makefile-shared-object): Only libtool compilers - now available. Add linkers for libtool. - (ede-cc-linker-libtool, ede-g++-linker-libtool): New. - (ede-proj-makefile-target-name): Always use .la extension. - - * cedet/ede/proj-prog.el (project-run-target): New method. - - * cedet/ede/proj-obj.el (ede-cc-linker): Rename from ede-gcc-linker. - (ede-g++-linker): Change Change link lines. - - * cedet/ede/pmake.el (ede-pmake-insert-variable-shared): - When searching for old variables, go to the end of the buffer and - search backward from there. - (ede-proj-makefile-automake-insert-subdirs) - (ede-proj-makefile-automake-insert-extradist): New methods. - (ede-proj-makefile-create): Use them. - - * cedet/ede/pconf.el (ede-proj-configure-test-required-file): - Force FILE to expand to the current target. Use file-exists-p to - check that it exists. - - * cedet/ede/linux.el (ede-linux-version): Don't call "head". - (ede-linux-load): Wrap dir in file-name-as-directory. - Set :version slot. - - * cedet/ede/files.el (ede-get-locator-object): When enabling - locate, do so on "top". - - * cedet/ede/emacs.el (ede-emacs-file-existing): Wrap "dir" in - file-name-as-directory during compare. - (ede-emacs-version): Return Emacs/XEmacs differentiator. - Get version number from different places. Don't call egrep. - (ede-emacs-load): Set :version slot. Call file-name-as-directory - to set the directory. - - * cedet/ede/shell.el: New file. - - * cedet/inversion.el (inversion-decoders): Allow for stray . in - alpha/beta variants. - 2009-10-17 Stefan Monnier * international/mule-cmds.el (select-safe-coding-system): If the file @@ -11381,9 +11459,6 @@ 2009-10-17 Glenn Morris - * cedet/semantic/grammar.el (semantic-grammar--lex-delim-spec): - All errors should have messages. - * foldout.el (foldout-mouse-swallow-events): * gs.el (gs-load-image): Replace obsolete forms of sit-for, sleep-for. @@ -11682,16 +11757,6 @@ * calendar/calendar.el (calendar-split-width-threshold): New option. (calendar-basic-setup): Use calendar-split-width-threshold. -2009-10-10 Sascha Wilde - - * cedet/ede/proj-shared.el (ede-proj-makefile-target-name): - Use .la for Automake. - -2009-10-09 Chong Yidong - - * cedet/ede/pconf.el (ede-proj-configure-synchronize): - Use "autoreconf -i". Suggested by Andreas Schwab. - 2009-10-09 Juanma Barranquero * international/mule-cmds.el (ucs-names): Exclude new "Enclosed @@ -11720,13 +11785,6 @@ (bookmark-jump-other-window): Just invoke bookmark-jump with new argument now, so the two function's behaviors will match. (Bug#3645) -2009-10-08 Chong Yidong - - * cedet/ede/proj.el (project-make-dist, project-compile-project): - Fix filename test. - (ede-proj-dist-makefile): Use expand-file-name instead of concat - to expand file names. - 2009-10-08 Michael Albinus * net/tramp.el (tramp-file-name-real-user, tramp-file-name-domain) @@ -11738,15 +11796,6 @@ (tramp-smb-handle-expand-file-name): Implement "~" expansion. (tramp-smb-maybe-open-connection): Flush the cache only if necessary. -2009-10-08 Chong Yidong - - * cedet/ede/proj-obj.el (ede-gcc-linker): New var. - (ede-proj-target-makefile-objectcode): Use it. - - * cedet/ede/source.el (ede-want-any-source-files-p) - (ede-want-any-auxiliary-files-p, ede-want-any-files-p): - Return search result. This error was introduced while merging. - 2009-10-07 Juanma Barranquero * makefile.w32-in (WINS_UPDATES): Fix typo in previous change. @@ -12021,63 +12070,20 @@ (Info-bookmark-jump): Document with a doc string, not just a comment. (Bug#4203) -2009-10-04 Chong Yidong - - * cedet/semantic.el (semantic-new-buffer-setup-functions): New option. - (semantic-new-buffer-fcn): Call parser setup functions here. - (semantic-mode): Don't call parser setup functions here, it's done - in semantic-new-buffer-fcn now. - (semantic-mode): Parse all existing buffers when enabled. - - * cedet/srecode/compile.el (srecode-compile-file): - Call semantic-new-buffer-fcn if the buffer has not been parsed. - -2009-10-04 Chong Yidong - - * cedet/ede/pmake.el (ede-pmake-insert-variable-once): Delete. - - * cedet/ede/proj-comp.el: Don't require ede/pmake at toplevel. - (proj-comp-insert-variable-once): New macro, renamed from - ede-pmake-insert-variable-once in ede/pmake.edl. - (ede-proj-makefile-insert-variables): Use it. - 2009-10-04 Michael Albinus * files.el (copy-directory): New defun. * dired-aux.el (dired-copy-file-recursive): Use it. -2009-10-04 Juanma Barranquero - - * cedet/ede/makefile-edit.el (makefile-beginning-of-command) - (makefile-end-of-command): - * cedet/srecode/srt-mode.el (semantic-beginning-of-context) - (semantic-end-of-context): Fix previous change. Doc fixes. - 2009-10-04 Juanma Barranquero * files-x.el (modify-dir-local-variable) - (copy-dir-locals-to-file-locals-prop-line): - * cedet/ede/makefile-edit.el (makefile-beginning-of-command) - (makefile-end-of-command): - * cedet/semantic/lex.el (semantic-lex-token): - * cedet/semantic/analyze/fcn.el - (semantic-analyze-dereference-metatype-1): - * cedet/semantic/bovine/c.el (semantic-lex-cpp-define) - (semantic-lex-cpp-undef): - * cedet/semantic/wisent/wisent.el (wisent-skip-block): - * cedet/srecode/srt-mode.el (semantic-beginning-of-context) - (semantic-end-of-context): Fix typos in docstrings. + (copy-dir-locals-to-file-locals-prop-line): Fix typos in + docstrings. * recentf.el (recentf-unload-function): New function. -2009-10-04 Chong Yidong - - * cedet/ede.el (ede-project-placeholder-cache-file): - * cedet/semantic/db-file.el (semanticdb-default-save-directory): - * cedet/srecode/map.el (srecode-map-save-file): - Use locate-user-emacs-file. Suggested by Juanma Barranquero. - 2009-10-04 Glenn Morris * window.el (window-full-height-p): Add doc string. @@ -12086,51 +12092,6 @@ * window.el (window-full-height-p): New function. (Bug#4543) -2009-10-03 Chong Yidong - - * cedet/srecode/insert.el: Require srecode/args. - - * cedet/srecode/args.el: Require srecode/dictionary instead of - srecode/insert. - - * cedet/srecode/srt-mode.el (srecode-template-mode): Doc fix. - - * files.el (auto-mode-alist): Add .srt and Project.ede. - - * cedet/semantic.el (semantic-mode): - Handle srecode-template-mode-hook as well. - (semantic-mode): Use js-mode-hook for Javascript hook. - - * cedet/srecode/template.el: Remove hook variable. - - * cedet/ede/proj-comp.el: Require ede/pmake when compiling. - - * cedet/ede.el (ede-target-forms-menu): Don't enable if no - projects exist. - (ede-project-placeholder-cache-file): Default to a file in - user-emacs-directory. - - * cedet/srecode/map.el (srecode-map-base-template-dir): Look for - templates in data-directory. - (srecode-map-save-file): Default to a file in user-emacs-directory. - - * cedet/ede/srecode.el (ede-srecode-setup): Use default templates - directory. - -2009-09-30 Eric Ludlam - - * cedet/semantic/util-modes.el (semantic-highlight-func-mode): - Doc fix. - - * cedet/ede/proj-comp.el (ede-proj-makefile-insert-variables): - Only insert each variable once. - - * cedet/ede/pmake.el (ede-pmake-insert-variable-once): New macro. - (ede-pmake-insert-variable-shared): Use it. - - * cedet/ede/cpp-root.el (ede-preprocessor-map): Do not deref table - for lexical table iff table is nil. - 2009-10-03 Dan Nicolaescu * vc.el: Remove commented out code. @@ -12150,9 +12111,6 @@ the frame is wide. (calendar-generate-window): Test for shrinkability rather than width. - * cedet/semantic/db-find.el (data-debug-insert-tag-list): Comment out - declaration, currently false. - * mail/rmail.el (rmail-generate-viewer-buffer): Be more careful about reusing existing buffers, in case we happen to visit two files with the same basename. (Bug#4593) @@ -12422,142 +12380,10 @@ * emacs-lisp/eieio.el (defclass, eieio-defclass-autoload) (eieio-copy-parents-into-subclass, make-instance, class-children) (eieio-generic-form): - * cedet/cedet-files.el (cedet-directory-name-to-file-name): - * cedet/cedet-idutils.el (cedet-idutils-search) - (cedet-idutils-expand-filename, cedet-idutils-support-for-directory) - (cedet-idutils-version-check): - * cedet/cedet.el (cedet-version): - * cedet/data-debug.el (data-debug-insert-overlay-button) - (data-debug-insert-overlay-list-button) - (data-debug-insert-buffer-button) - (data-debug-insert-buffer-list-button) - (data-debug-insert-process-button, data-debug-insert-ring-button) - (data-debug-insert-widget, data-debug-insert-stuff-list-button) - (data-debug-insert-stuff-vector-button) - (data-debug-insert-symbol-button, data-debug-insert-string) - (data-debug-insert-number, data-debug-insert-lambda-expression) - (data-debug-insert-nil, data-debug-insert-simple-thing) - (data-debug-insert-custom, data-debug-edebug-expr): - * cedet/ede.el (ede-auto-add-method, ede-project-class-files) - (global-ede-mode-map, ede-new, ede-debug-target) - (ede-customize-current-target, ede-buffers, ede-map-buffers, ede-set): - * cedet/semantic.el (semantic-minimum-working-buffer-size) - (semantic-fetch-tags, semantic-submode-list) - (semantic-default-submodes): - * cedet/ede/source.el (ede-source-match): - * cedet/ede/project-am.el (project-am-type-alist, project-add-file) - (project-am-package-info): - * cedet/ede/proj.el (ede-proj-target, project-new-target): - * cedet/ede/proj-elisp.el (ede-proj-tweak-autoconf): - * cedet/ede/proj-comp.el (ede-current-build-list): - * cedet/ede/makefile-edit.el (makefile-move-to-macro): - * cedet/ede/files.el (ede-toplevel-project-or-nil): - * cedet/ede/cpp-root.el (initialize-instance): - * cedet/ede/autoconf-edit.el (autoconf-find-last-macro) - (autoconf-parameter-strip, autoconf-insert-new-macro): - * cedet/semantic/wisent.el (wisent-lex-eoi): - * cedet/semantic/util-modes.el (global-semantic-show-parser-state-mode) - (semantic-show-parser-state-mode): - * cedet/semantic/texi.el (semantic-texi-environment-regexp): - * cedet/semantic/tag.el (semantic-tag-new-variable) - (semantic-tag-class, semantic-tag-new-variable, semantic-tag-copy) - (semantic--tag-deep-copy-attributes, semantic--tag-deep-copy-value) - (semantic--tag-deep-copy-tag-list) - (semantic-tag-components-with-overlays-default): - * cedet/semantic/symref.el (semantic-symref-find-text): - * cedet/semantic/senator.el (senator-yank-tag) - (senator-transpose-tags-up): - * cedet/semantic/scope.el (semantic-analyze-scoped-tags-default) - (semantic-analyze-scoped-inherited-tags, semantic-scope-find): - * cedet/semantic/sb.el (semantic-sb-autoexpand-length): - * cedet/semantic/lex.el (semantic-lex-comment-regex) - (semantic-lex-maximum-depth, define-lex, semantic-lex-token) - (semantic-lex-unterminated-syntax-protection, define-lex-analyzer): - * cedet/semantic/lex-spp.el - (semantic-lex-spp-dynamic-macro-symbol-obarray-stack) - (semantic-lex-spp-symbol, semantic-lex-spp-one-token-to-txt): - * cedet/semantic/idle.el - (semantic-idle-summary-current-symbol-info-brutish) - (semantic-idle-summary-current-symbol-info-default): - * cedet/semantic/grammar.el (semantic-grammar-recreate-package) - (semantic--grammar-macro-compl-dict): - * cedet/semantic/grammar-wy.el (semantic-grammar-wy--parse-table): - * cedet/semantic/format.el (semantic-format-tag-custom-list) - (semantic-format-tag-canonical-name-default): - * cedet/semantic/find.el (semantic-find-tag-by-overlay-in-region) - (semantic-find-tags-for-completion) - (semantic-find-tags-by-scope-protection-default) - (semantic-deep-find-tags-for-completion): - * cedet/semantic/edit.el - (semantic-edits-incremental-reparse-failed-hook) - (semantic-edits-verbose-flag, semantic-edits-assert-valid-region) - (semantic-edits-splice-remove, semantic-edits-splice-replace): - * cedet/semantic/doc.el (semantic-documentation-comment-preceeding-tag): - * cedet/semantic/dep.el (semantic-dependency-include-path): - * cedet/semantic/db.el (semanticdb-default-find-index-class) - (semanticdb-match-any-mode, semanticdb-with-match-any-mode) - (semanticdb-project-roots): - * cedet/semantic/db-find.el (semanticdb-implied-include-tags) - (semanticdb-find-adebug-insert-scanned-tag-cons) - (semanticdb-find-log-buffer-name, semanticdb-find-result-mapc) - (semanticdb-brute-deep-find-tags-for-completion): - * cedet/semantic/db-ebrowse.el (semanticdb-ebrowse-add-tree-to-table): - * cedet/semantic/ctxt.el (semantic-beginning-of-context-default) - (semantic-end-of-context-default) - (semantic-ctxt-current-function-default) - (semantic-ctxt-scoped-types-default): - * cedet/semantic/complete.el (semantic-complete-read-tag-engine) - (semantic-complete-inline-tag-engine) - (semantic-complete-inline-custom-type) - (semantic-complete-read-tag-analyzer): - * cedet/semantic/chart.el (semantic-chart-tags-by-class) - (semantic-chart-database-size): - * cedet/semantic/analyze.el (semantic-analyze-current-symbol) - (semantic-analyze-current-context): - * cedet/semantic/symref/list.el (semantic-symref) - (semantic-symref-hide-buffer, semantic-symref-symbol): - * cedet/semantic/symref/grep.el (semantic-symref-grep-use-template): - * cedet/semantic/symref/filter.el (semantic-symref-hits-in-region): - * cedet/semantic/bovine/el.el (semantic-elisp-form-to-doc-string): - * cedet/semantic/bovine/c.el (semantic-lex-c-preprocessor-symbol-map) - (semantic-c-parse-token-hack-depth, semantic-c--template-name-1) - (semantic-c-dereference-template): - * cedet/semantic/analyze/refs.el (semantic--analyze-refs-full-lookup) - (semantic--analyze-refs-full-lookup-with-parents) - (semantic--analyze-refs-full-lookup-simple): - * cedet/semantic/analyze/complete.el - (semantic-analyze-possible-completions): - * cedet/srecode/table.el (srecode-mode-table-new): - * cedet/srecode/srt.el (srecode-read-variable-name): - * cedet/srecode/srt-mode.el (srecode-macro-help, srecode-in-macro-p): - * cedet/srecode/semantic.el (srecode-semantic-handle-:tag) - (srecode-semantic-handle-:tagtype, srecode-semantic-insert-tag): - * cedet/srecode/map.el (srecode-current-map): - * cedet/srecode/insert.el (srecode-insert) - (srecode-insert-variable-secondname-handler, srecode-insert-method) - (srecode-template-inserter-point-override) - (srecode-insert-include-lookup): - * cedet/srecode/getset.el (srecode-auto-choose-class): - * cedet/srecode/extract.el (srecode-inserter-extract): - * cedet/srecode/document.el - (srecode-document-autocomment-return-last-alist) - (srecode-document-autocomment-param-type-alist) - (srecode-document-insert-function-comment) - (srecode-document-insert-variable-one-line-comment) - (srecode-document-function-name-comment): - * cedet/srecode/dictionary.el (srecode-create-dictionary) - (srecode-compound-toString): - * cedet/srecode/compile.el (srecode-flush-active-templates): - * cedet/srecode/args.el (srecode-semantic-handle-:blank): - Doc/message fixes. * vc-cvs.el (vc-cvs-parse-entry): Be more careful with the match-data. (Bug#4555). - * cedet/semantic/bovine/gcc.el - (semantic-c-reset-preprocessor-symbol-map): Fix declaration. - (semantic-gcc-get-include-paths, semantic-gcc-setup-data): Doc fixes. - * emacs-lisp/check-declare.el (check-declare-scan): Read the declaration rather than parsing it as a regexp. This relaxes the layout requirements and makes errors easier to detect. @@ -12572,41 +12398,8 @@ * term/w32-win.el (setup-default-fontset, set-fontset-font): Remove unused declarations. -2009-10-01 Juanma Barranquero - - * cedet/semantic/wisent/javat-wy.el - (wisent-java-tags-wy--keyword-table): Use \000 instead of literal ^@. - -2009-09-30 Juanma Barranquero - - * cedet/srecode/expandproto.el: Fix provide statement. - -2009-09-30 Eric Ludlam - - * emacs-lisp/eieio.el (boolean-p): Delete. - -2009-09-30 Sascha Wilde - - * cedet/ede/srecode.el: Fix provide statement. - 2009-09-30 Glenn Morris - * cedet/ede/proj.el (ede-proj-target-makefile-miscelaneous): - * cedet/ede/proj-aux.el (ede-aux-source): - * cedet/ede/proj-misc.el (ede-proj-target-makefile-miscelaneous) - (ede-misc-source): - * cedet/semantic/mru-bookmark.el (semantic-mrub-completing-read) - (semantic-mrub-switch-tags): Fix doc typos. - - * cedet/semantic/db-global.el (data-debug-new-buffer) - (data-debug-insert-thing): Remove unneeded declarations (one broken). - (semanticdb-enable-gnu-global-databases): Fix prompt typo. - - * cedet/semantic/analyze/fcn.el (semantic-scope-find): Fix declaration. - - * cedet/semantic/bovine/gcc.el (semantic-gcc-setup): Replace runtime - use of CL function `remove-if-not'. - * emacs-lisp/authors.el (authors-ignored-files): Add "js2-mode.el". * emacs-lisp/elint.el (elint-init-form): Report declarations where the @@ -12644,16 +12437,6 @@ 2009-09-29 Glenn Morris - * cedet/semantic/symref/idutils.el: - * cedet/semantic/symref/list.el: Relicense under GPLv3+. - - * cedet/ede/srecode.el (srecode-resolve-arguments): Fix declaration. - - * cedet/semantic/complete.el (semantic-displayor-focus-abstract-child-p): - * cedet/semantic/tag-file.el (semanticdb-table-child-p): - * cedet/srecode/compile.el (srecode-template-inserter-newline-child-p): - Mark declarations not understood by check-declare. - * emacs-lisp/check-declare.el (check-declare-locate): Remove pointless file-name-nondirectory call preventing location of cedet files. (check-declare-verify): Use literal search rather than re-search. @@ -12691,15 +12474,6 @@ * Makefile.in (ELCFILES): Add CEDET files. -2009-09-28 Eric Ludlam - - CEDET (development tools) package merged. - - * cedet/*.el: - * cedet/ede/*.el: - * cedet/semantic/*.el: - * cedet/srecode/*.el: New files. - 2009-09-28 Michael Albinus * Makefile.in (ELCFILES): Add net/tramp-imap.elc. @@ -12713,26 +12487,6 @@ * net/tramp-imap.el: New package. -2009-09-28 Eric Ludlam - - * emacs-lisp/chart.el: - * emacs-lisp/eieio-base.el: - * emacs-lisp/eieio-comp.el: - * emacs-lisp/eieio-custom.el: - * emacs-lisp/eieio-datadebug.el: - * emacs-lisp/eieio-opt.el: - * emacs-lisp/eieio-speedbar.el: - * emacs-lisp/eieio.el: New files. - - * cedet/cedet-cscope.el: - * cedet/cedet-files.el: - * cedet/cedet-global.el: - * cedet/cedet-idutils.el: - * cedet/data-debug.el: - * cedet/inversion.el: - * cedet/mode-local.el: - * cedet/pulse.el: New files. - 2009-09-27 Vinicius Jose Latorre * whitespace.el (whitespace-trailing-regexp) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 391375b2d18..acc073650db 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -346,9 +346,9 @@ $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC) TRAMP_DIR = $(lisp)/net TRAMP_SRC = $(TRAMP_DIR)/tramp.el $(TRAMP_DIR)/tramp-cache.el \ $(TRAMP_DIR)/tramp-cmds.el $(TRAMP_DIR)/tramp-compat.el \ - $(TRAMP_DIR)/tramp-fish.el $(TRAMP_DIR)/tramp-ftp.el \ - $(TRAMP_DIR)/tramp-gvfs.el $(TRAMP_DIR)/tramp-gw.el \ - $(TRAMP_DIR)/tramp-imap.el $(TRAMP_DIR)/tramp-smb.el \ + $(TRAMP_DIR)/tramp-ftp.el $(TRAMP_DIR)/tramp-gvfs.el \ + $(TRAMP_DIR)/tramp-gw.el $(TRAMP_DIR)/tramp-imap.el \ + $(TRAMP_DIR)/tramp-sh.el $(TRAMP_DIR)/tramp-smb.el \ $(TRAMP_DIR)/tramp-uu.el $(TRAMP_DIR)/trampver.el $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 5e4adace91e..91017627699 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -627,7 +627,8 @@ (error "Separator not allowed with { ... }?")) (if (string-match "\\`\"" sep) (setq sep (read-from-string sep))) - (setq sep (calc-fix-token-name sep)) + (if (> (length sep) 0) + (setq sep (calc-fix-token-name sep))) (setq part (nconc part (list (list sym p (and (> (length sep) 0) diff --git a/lisp/calculator.el b/lisp/calculator.el index a20efdbc122..d03b2082bdb 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -369,7 +369,8 @@ documentation for an example.") Used for repeating operations in calculator-repR/L.") (defvar calculator-registers ; use user-bindings first - (append calculator-user-registers (list (cons ?e e) (cons ?p pi))) + (append calculator-user-registers + (list (cons ?e float-e) (cons ?p float-pi))) "The association list of calculator register values.") (defvar calculator-saved-global-map nil @@ -1300,7 +1301,7 @@ arguments." (calculator-funcall __f__ x y)))) (fset 'D (function (lambda (x) - (if calculator-deg (/ (* x 180) pi) x)))) + (if calculator-deg (/ (* x 180) float-pi) x)))) (unwind-protect (eval f) (if Fbound (fset 'F Fsave) (fmakunbound 'F)) (if Dbound (fset 'D Dsave) (fmakunbound 'D))))) diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index ad36531bb40..cd0f049027b 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -48,8 +48,9 @@ ;; package is activated. Additionally, the appointments list is ;; recreated automatically at 12:01am for those who do not logout ;; every day or are programming late. It is also updated when the -;; `diary-file' is saved. Calling `appt-check' with an argument (or -;; re-enabling the package) forces a re-initialization at any time. +;; `diary-file' (or a file it includes) is saved. Calling +;; `appt-check' with an argument (or re-enabling the package) forces a +;; re-initialization at any time. ;; ;; In order to add or delete items from today's list, without ;; changing the diary file, use `appt-add' and `appt-delete'. @@ -256,13 +257,11 @@ The variable `appt-audible' controls the audible reminder." (message "%s" string))))) -(defvar diary-selective-display) - (defun appt-check (&optional force) "Check for an appointment and update any reminder display. If optional argument FORCE is non-nil, reparse the diary file for appointments. Otherwise the diary file is only parsed once per day, -and when saved. +or when it (or a file it includes) is saved. Note: the time must be the first thing in the line in the diary for a warning to be issued. The format of the time can be either @@ -325,7 +324,7 @@ displayed in a window: (mode-line-only (unless full-check appt-now-displayed)) now cur-comp-time appt-comp-time appt-warn-time) (when (or full-check mode-line-only) - (save-excursion + (save-excursion ; FIXME ? ;; Convert current time to minutes after midnight (12.01am = 1). (setq now (decode-time) cur-comp-time (+ (* 60 (nth 2 now)) (nth 1 now))) @@ -333,28 +332,16 @@ displayed in a window: (if (or force ; eg initialize, diary save (null appt-prev-comp-time) ; first check (< cur-comp-time appt-prev-comp-time)) ; new day - (condition-case nil + (ignore-errors + (let ((diary-hook (if (assoc 'appt-make-list diary-hook) + diary-hook + (cons 'appt-make-list diary-hook)))) (if appt-display-diary - (let ((diary-hook - (if (assoc 'appt-make-list diary-hook) - diary-hook - (cons 'appt-make-list diary-hook)))) - (diary)) - (let* ((diary-display-function 'appt-make-list) - (d-buff (find-buffer-visiting diary-file)) - (selective - (if d-buff ; diary buffer exists - (with-current-buffer d-buff - diary-selective-display)))) (diary) - ;; If the diary buffer existed before this command, - ;; restore its display state. Otherwise, kill it. - (if d-buff - ;; Displays the diary buffer. - (or selective (diary-show-all-entries)) - (and (setq d-buff (find-buffer-visiting diary-file)) - (kill-buffer d-buff))))) - (error nil))) + ;; Not displaying the diary, so we can ignore + ;; diary-number-of-entries. Since appt.el only + ;; works on a daily basis, no need for more entries. + (diary-list-entries (calendar-current-date) 1 t))))) (setq appt-prev-comp-time cur-comp-time appt-mode-string nil appt-display-count nil) @@ -570,6 +557,17 @@ appointment package (if it is not already active)." (let ((entry-list diary-entries-list) (new-time-string "") time-string) + ;; Below, we assume diary-entries-list was in date + ;; order. It is, unless something on + ;; diary-list-entries-hook has changed it, eg + ;; diary-include-other-files (bug#7019). It must be + ;; in date order if number = 1. + (and diary-list-entries-hook + appt-display-diary + (not (eq diary-number-of-entries 1)) + (not (memq (car (last diary-list-entries-hook)) + '(diary-sort-entries sort-diary-entries))) + (setq entry-list (sort entry-list 'diary-entry-compare))) ;; Skip diary entries for dates before today. (while (and entry-list (calendar-date-compare @@ -643,8 +641,10 @@ hour and minute parts." (defun appt-update-list () "If the current buffer is visiting the diary, update appointments. -This function is intended for use with `write-file-functions'." - (and (string-equal buffer-file-name (expand-file-name diary-file)) +This function also acts on any file listed in `diary-included-files'. +It is intended for use with `write-file-functions'." + (and (member buffer-file-name (append diary-included-files + (list (expand-file-name diary-file)))) appt-timer (let ((appt-display-diary nil)) (appt-check t))) @@ -690,6 +690,7 @@ ARG is positive, otherwise off." (cancel-timer appt-timer) (setq appt-timer nil)) (when appt-active + (diary-check-diary-file) (add-hook 'write-file-functions 'appt-update-list) (setq appt-timer (run-at-time t 60 'appt-check) global-mode-string diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 39354bd31e3..ddabeb7dbad 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -187,11 +187,12 @@ you will probably also want to add `diary-mark-included-diary-files' to (setq diary-display-function 'diary-fancy-display) (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) - (add-hook 'diary-list-entries-hook 'diary-sort-entries) + (add-hook 'diary-list-entries-hook 'diary-sort-entries t) in your `.emacs' file to cause the fancy diary buffer to be displayed with diary entries from various included files, each day's entries sorted into -lexicographic order." +lexicographic order. Note how the sort function is placed last, +so that it can sort the entries included from other files." :type 'hook :options '(diary-include-other-diary-files diary-sort-entries) :group 'diary) @@ -593,19 +594,20 @@ The entry is added to the list as (DATE STRING SPECIFIER LOCATOR GLOBCOLOR), where LOCATOR has the form (MARKER FILENAME LITERAL), FILENAME being the file containing the diary entry." (when (and date string) - (if diary-file-name-prefix - (let ((prefix (funcall diary-file-name-prefix-function - (buffer-file-name)))) - (or (string-equal prefix "") - (setq string (format "[%s] %s" prefix string))))) - (and diary-modify-entry-list-string-function - (setq string (funcall diary-modify-entry-list-string-function - string))) - (setq diary-entries-list - (append diary-entries-list - (list (list date string specifier - (list marker (buffer-file-name) literal) - globcolor)))))) + ;; b-f-n is nil if we are visiting an include file in a temp-buffer. + (let ((dfile (or (buffer-file-name) diary-file))) + (if diary-file-name-prefix + (let ((prefix (funcall diary-file-name-prefix-function dfile))) + (or (string-equal prefix "") + (setq string (format "[%s] %s" prefix string))))) + (and diary-modify-entry-list-string-function + (setq string (funcall diary-modify-entry-list-string-function + string))) + (setq diary-entries-list + (append diary-entries-list + (list (list date string specifier + (list marker dfile literal) + globcolor))))))) (define-obsolete-function-alias 'add-to-diary-list 'diary-add-to-list "23.1") @@ -699,6 +701,9 @@ of the appropriate type." (1+ (calendar-absolute-from-gregorian gdate)))))) (goto-char (point-min))) +(defvar diary-included-files nil + "List of any diary files included in the last call to `diary-list-entries'.") + ;; FIXME non-greg and list hooks run same number of times? (defun diary-list-entries (date number &optional list-only) "Create and display a buffer containing the relevant lines in `diary-file'. @@ -706,14 +711,26 @@ The arguments are DATE and NUMBER; the entries selected are those for NUMBER days starting with date DATE. The other entries are hidden using overlays. If NUMBER is less than 1, this function does nothing. -Returns a list of all relevant diary entries found, if any, in order by date. +Returns a list of all relevant diary entries found. The list entries have the form ((MONTH DAY YEAR) STRING SPECIFIER) where \(MONTH DAY YEAR) is the date of the entry, STRING is the entry text, and SPECIFIER is the applicability. If the variable `diary-list-include-blanks' is non-nil, this list includes a dummy diary entry consisting of the empty string for a date with no diary entries. -After the list is prepared, the following hooks are run: +If entries are being produced for multiple dates (i.e., NUMBER > 1), +then this function normally returns the entries from any given +diary file in date order. The entries for any given day are in +the order in which they were found in the file, not necessarily +in time-of-day order. Note that any functions present on the +hooks (see below) may add entries, or change the order. For +example, `diary-include-other-diary-files' adds entries from any +include files that it finds to the end of the original list. The +entries from each file will be in date order, but the overall +list will not be. If you want the entire list to be in time order, +add `diary-sort-entries' to the end of `diary-list-entries-hook'. + +After the initial list is prepared, the following hooks are run: `diary-nongregorian-listing-hook' can cull dates from the diary and each included file, for example to process Islamic diary @@ -742,62 +759,74 @@ LIST-ONLY is non-nil, in which case it just returns the list." (let* ((original-date date) ; save for possible use in the hooks (date-string (calendar-date-string date)) (diary-buffer (find-buffer-visiting diary-file)) - diary-entries-list file-glob-attrs) - (message "Preparing diary...") - (save-current-buffer - (if (not diary-buffer) - (set-buffer (find-file-noselect diary-file t)) - (set-buffer diary-buffer) - (or (verify-visited-file-modtime diary-buffer) - (revert-buffer t t))) - ;; Setup things like the header-line-format and invisibility-spec. - (if (eq major-mode (default-value 'major-mode)) - (diary-mode) - ;; This kludge is to make customizations to - ;; diary-header-line-flag after diary has been displayed - ;; take effect. Unconditionally calling (diary-mode) - ;; clobbers file local variables. - ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00363.html - ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00404.html - (if (eq major-mode 'diary-mode) - (setq header-line-format (and diary-header-line-flag - diary-header-line-format)))) - ;; d-s-p is passed to the diary display function. - (let ((diary-saved-point (point))) - (save-excursion - (save-restriction - (widen) ; bug#5093 - (setq file-glob-attrs (cadr (diary-pull-attrs nil ""))) - (with-syntax-table diary-syntax-table - (goto-char (point-min)) - (unless list-only - (let ((ol (make-overlay (point-min) (point-max) nil t nil))) - (set (make-local-variable 'diary-selective-display) t) - (overlay-put ol 'invisible 'diary) - (overlay-put ol 'evaporate t))) - (dotimes (idummy number) - (let ((sexp-found (diary-list-sexp-entries date)) - (entry-found (diary-list-entries-2 - date diary-nonmarking-symbol - file-glob-attrs list-only))) - (if diary-list-include-blanks - (or sexp-found entry-found - (diary-add-to-list date "" "" "" ""))) - (setq date - (calendar-gregorian-from-absolute - (1+ (calendar-absolute-from-gregorian date))))))) - (goto-char (point-min)) - (run-hooks 'diary-nongregorian-listing-hook - 'diary-list-entries-hook) - (unless list-only - (if (and diary-display-function - (listp diary-display-function)) - ;; Backwards compatibility. - (run-hooks 'diary-display-function) - (funcall (or diary-display-function - 'diary-simple-display)))) - (run-hooks 'diary-hook) - diary-entries-list))))))) + ;; Dynamically bound in diary-include-other-diary-files. + (d-incp (and (boundp 'diary-including) diary-including)) + diary-entries-list file-glob-attrs temp-buff) + (unless d-incp + (setq diary-included-files nil) + (message "Preparing diary...")) + (unwind-protect + (with-current-buffer (or diary-buffer + (if list-only + (setq temp-buff (generate-new-buffer + " *diary-temp*")) + (find-file-noselect diary-file t))) + (if diary-buffer + (or (verify-visited-file-modtime diary-buffer) + (revert-buffer t t))) + (if temp-buff + ;; If including, caller has already verified it is readable. + (insert-file-contents diary-file) + ;; Setup things like the header-line-format and invisibility-spec. + (if (eq major-mode (default-value 'major-mode)) + (diary-mode) + ;; This kludge is to make customizations to + ;; diary-header-line-flag after diary has been displayed + ;; take effect. Unconditionally calling (diary-mode) + ;; clobbers file local variables. + ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-03/msg00363.html + ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00404.html + (if (eq major-mode 'diary-mode) + (setq header-line-format (and diary-header-line-flag + diary-header-line-format))))) + ;; d-s-p is passed to the diary display function. + (let ((diary-saved-point (point))) + (save-excursion + (save-restriction + (widen) ; bug#5093 + (setq file-glob-attrs (cadr (diary-pull-attrs nil ""))) + (with-syntax-table diary-syntax-table + (goto-char (point-min)) + (unless list-only + (let ((ol (make-overlay (point-min) (point-max) nil t nil))) + (set (make-local-variable 'diary-selective-display) t) + (overlay-put ol 'invisible 'diary) + (overlay-put ol 'evaporate t))) + (dotimes (idummy number) + (let ((sexp-found (diary-list-sexp-entries date)) + (entry-found (diary-list-entries-2 + date diary-nonmarking-symbol + file-glob-attrs list-only))) + (if diary-list-include-blanks + (or sexp-found entry-found + (diary-add-to-list date "" "" "" ""))) + (setq date + (calendar-gregorian-from-absolute + (1+ (calendar-absolute-from-gregorian date))))))) + (goto-char (point-min)) + (run-hooks 'diary-nongregorian-listing-hook + 'diary-list-entries-hook) + (unless list-only + (if (and diary-display-function + (listp diary-display-function)) + ;; Backwards compatibility. + (run-hooks 'diary-display-function) + (funcall (or diary-display-function + 'diary-simple-display)))) + (run-hooks 'diary-hook))))) + (and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff))) + (or d-incp (message "Preparing diary...done")) + diary-entries-list))) (define-obsolete-function-alias 'list-diary-entries 'diary-list-entries "22.1") @@ -827,16 +856,18 @@ the variable `diary-include-string'." nil t) (let ((diary-file (match-string-no-properties 1)) (diary-list-entries-hook 'diary-include-other-diary-files) - (diary-display-function 'ignore) - diary-hook diary-list-include-blanks) + (diary-including t) + diary-hook diary-list-include-blanks efile) (if (file-exists-p diary-file) (if (file-readable-p diary-file) - (unwind-protect - (setq diary-entries-list - (append diary-entries-list - (diary-list-entries original-date number))) - (with-current-buffer (find-buffer-visiting diary-file) - (diary-unhide-everything))) + (if (member (setq efile (expand-file-name diary-file)) + diary-included-files) + (error "Recursive diary include for %s" diary-file) + (setq diary-included-files + (append diary-included-files (list efile)) + diary-entries-list + (append diary-entries-list + (diary-list-entries original-date number t)))) (beep) (message "Can't read included diary file %s" diary-file) (sleep-for 2)) @@ -905,8 +936,7 @@ in the mode line. This is an option for `diary-display-function'." (let ((window (display-buffer (current-buffer)))) ;; d-s-p is passed from diary-list-entries. (set-window-point window diary-saved-point) - (set-window-start window (point-min)))) - (message "Preparing diary...done")))) + (set-window-start window (point-min))))))) (define-obsolete-function-alias 'simple-diary-display 'diary-simple-display "23.1") @@ -1028,8 +1058,7 @@ This is an option for `diary-display-function'." (if (eq major-mode 'diary-fancy-display-mode) (run-hooks 'diary-fancy-display-mode-hook) (diary-fancy-display-mode)) - (calendar-set-mode-line date-string) - (message "Preparing diary...done")))) + (calendar-set-mode-line date-string)))) (define-obsolete-function-alias 'fancy-diary-display 'diary-fancy-display "23.1") @@ -1574,7 +1603,10 @@ be used instead of a colon (:) to separate the hour and minute parts." (string-lessp ts1 ts2))))))) (defun diary-sort-entries () - "Sort the list of diary entries by time of day." + "Sort the list of diary entries by time of day. +If you add this function to `diary-list-entries-hook', it should +be the last item in the hook, in case earlier items add diary +entries, or change the order." (setq diary-entries-list (sort diary-entries-list 'diary-entry-compare))) (define-obsolete-function-alias 'sort-diary-entries 'diary-sort-entries "23.1") diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 8cf831f9945..b7a728461f0 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -753,12 +753,12 @@ The values of `calendar-daylight-savings-starts', (sin (mod (+ (cadr x) (* (nth 2 x) U)) - (* 2 pi))))) + (* 2 float-pi))))) solar-data-list))))) (aberration (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973))) - (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 pi))) - (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 pi))) + (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 float-pi))) + (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 float-pi))) (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2)))))) (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0))) diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index d99d13e431d..84fc465f984 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -39,9 +39,6 @@ ;;; Code: -;; Only necessary for `declare' when compiling Gnus with Emacs 21. -(eval-when-compile (require 'cl)) - (defmacro with-decoded-time-value (varlist &rest body) "Decode a time value and bind it according to VARLIST, then eval BODY. @@ -97,20 +94,20 @@ and type 2 is the list (HIGH LOW MICRO)." (autoload 'timezone-make-date-arpa-standard "timezone") ;;;###autoload +;; `parse-time-string' isn't sufficiently general or robust. It fails +;; to grok some of the formats that timezone does (e.g. dodgy +;; post-2000 stuff from some Elms) and either fails or returns bogus +;; values. timezone-make-date-arpa-standard should help. (defun date-to-time (date) "Parse a string DATE that represents a date-time and return a time value. If DATE lacks timezone information, GMT is assumed." (condition-case () - (apply 'encode-time - (parse-time-string - ;; `parse-time-string' isn't sufficiently general or - ;; robust. It fails to grok some of the formats that - ;; timezone does (e.g. dodgy post-2000 stuff from some - ;; Elms) and either fails or returns bogus values. Lars - ;; reverted this change, but that loses non-trivially - ;; often for me. -- fx - (timezone-make-date-arpa-standard date))) - (error (error "Invalid date: %s" date)))) + (apply 'encode-time (parse-time-string date)) + (error (condition-case () + (apply 'encode-time + (parse-time-string + (timezone-make-date-arpa-standard date))) + (error (error "Invalid date: %s" date)))))) ;; Bit of a mess. Emacs has float-time since at least 21.1. ;; This file is synced to Gnus, and XEmacs packages may have been written @@ -317,10 +314,10 @@ 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 Emacs 21. So when compiling - ;; Gnus (`time-date.el' is part of Gnus) with Emacs 21, we get a - ;; warning here. But `format-seconds' is not used anywhere in Gnus so - ;; it's not a real problem. --rsteib + ;; `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)) (error "Bad format specifier: `%s'" spec)) (if (assoc-string spec usedunits t) diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog new file mode 100644 index 00000000000..85f0410541a --- /dev/null +++ b/lisp/cedet/ChangeLog @@ -0,0 +1,1457 @@ +2010-09-25 Chong Yidong + + * ede/linux.el (ede-project-class-files): + * ede/generic.el (ede-generic-new-autoloader): + * ede/emacs.el (ede-project-class-files): + * ede/simple.el (ede-project-class-files): + * ede/cpp-root.el (ede-project-class-files): Fix require name. + +2010-09-25 Juanma Barranquero + + * semantic/lex.el (semantic-ignore-comments): Doc fix. + + * semantic/symref/list.el (semantic-symref-list-rename-open-hits): + Fix typo in error message. + (semantic-symref-list-map-open-hits): Fix typo in docstring. + +2010-09-21 Eric Ludlam + + Synch SRecode to CEDET 1.0. + + * pulse.el (pulse-momentary-highlight-overlay): If pulse-flag is + 'never, disable all pulsing. + + * cedet.el (cedet-version): + * srecode.el (srecode-version): Bump version to 1.0. + + * srecode/texi.el (srecode-texi-insert-tag-as-doc): New function. + (semantic-insert-foreign-tag): Use it. + + * srecode/mode.el (srecode-bind-insert): Call + srecode-load-tables-for-mode. + (srecode-minor-mode-templates-menu): Do not list templates that + are not in the current project. + (srecode-menu-bar): Add binding for srecode-macro-help. + + * srecode/table.el (srecode-template-table): Add :project slot. + (srecode-dump): Dump it. + + * srecode/map.el (srecode-map-update-map): Make map loading more + robust. + + * srecode/insert.el (srecode-insert-fcn): Merge template + dictionary before resolving arguments. + (srecode-insert-method-helper): Add error checking to make sure + that we only have dictionaries. + (srecode-insert-method): Check template nesting depth when using + point inserter override. + (srecode-insert-method): Install override with depth limit. + + * srecode/getset.el (srecode-insert-getset): Force tag table + update. Don't query the class if it is empty. + + * srecode/find.el (srecode-template-get-table) + (srecode-template-get-table-for-binding) + (srecode-all-template-hash): Skip if not in current project. + (srecode-template-table-in-project-p): New method. + + * srecode/fields.el (srecode-fields-exit-confirmation): New option. + (srecode-field-exit-ask): Use it. + + * srecode/dictionary.el (srecode-dictionary-add-template-table): + Do not add variables in tables not for the current project. + (srecode-compound-toString): Handle cases where the default value + is another compound value. + (srecode-dictionary-lookup-name): New optional argument + NON-RECURSIVE, which inhibits visiting dictionary parents. + (srecode-dictionary-add-section-dictionary) + (srecode-dictionary-merge): New optional argument FORCE adds + values even if an identically named entry exists. + (srecode-dictionary-add-entries): New method. + (srecode-create-dictionaries-from-tags): New function. + + * srecode/cpp.el (srecode-cpp): New defgroup. + (srecode-cpp-namespaces): New option. + (srecode-semantic-handle-:using-namespaces) + (srecode-cpp-apply-templates): New functions. + (srecode-semantic-apply-tag-to-dict): Handle template parameters + by calling `srecode-cpp-apply-templates'. + + * srecode/compile.el (srecode-compile-templates): Fix directory + compare of built-in templates. Give built-ins lower piority. + Support special variable "project". + (srecode-compile-template-table): Set :project slot of new tables. + (srecode-compile-one-template-tag): Use + srecode-create-dictionaries-from-tags. + +2010-09-21 Eric Ludlam + + Synch EDE to CEDET 1.0. + + * cedet-idutils.el (cedet-idutils-make-command): New option. + (cedet-idutils-mkid-call): + (cedet-idutils-create/update-database): New functions. + + * cedet-cscope.el (cedet-cscope-create): + (cedet-cscope-create/update-database): New functions. + (cedet-cscope-support-for-directory): Make interactive. + + * cedet-global.el (cedet-global-gtags-command): New option. + (cedet-gnu-global-gtags-call) + (cedet-gnu-global-create/update-database): New functions. + + * ede.el (ede-save-cache): Fix recentf-exclude expression. + (ede-make-dist): Always use toplevel project. + (ede-buffer-object): If we fail to find an object in the current + project, loop upward looking for a match. If no target is found, + use most local project. + (ede-buffer-belongs-to-target-p) + (ede-buffer-belongs-to-project-p): New functions. + (ede-initialize-state-current-buffer): New function. + (ede-target-forms-menu, ede-project-buffers): Use them. + (ede-minor-mode, ede-reset-all-buffers): Use it. + (project-interactive-select-target, project-add-file): Don't use + ede-project-force-load. + (ede-buffer-object): New arg PROJSYM. + (ede-minor-mode): Remove ede-directory-project-p test. + (ede-initialize-state-current-buffer): Don't test for + ede-directory-project-p if there is a matching open project. + (ede-customize-forms-menu): Prevent error if there is no project. + (ede-load-project-file): Set ede-constructing to the thing being + constructed, instead of t. + (ede-project-force-load): Deleted. + + * ede/base.el: + * ede/auto.el: + * ede/custom.el: New files. + + * ede/autoconf-edit.el (autoconf-find-last-macro) + (autoconf-parameters-for-macro): Parse multiline parameters of + macros. Optionally ignore case and at bol for macro. + (autoconf-parameter-strip): Use greedy match for newlines. + (autoconf-new-automake-string): Deleted. + (autoconf-new-program): Use SRecode to fill an empty file. + + * ede/cpp-root.el (ede-create-lots-of-projects-under-dir): New + function. + + * ede/files.el (ede-flush-project-hash): New command. + (ede-convert-path): Add optional PROJECT arg. + (ede-directory-project-p): Obey ".ede-ignore". + (ede-expand-filename-local) + (ede-expand-filename-impl-via-subproj): New methods. + (ede-expand-filename-impl): Use them. + (ede-project-root, ede-project-root-directory): Move to + ede/auto.el. + + * ede/locate.el (ede-locate-flush-hash): + (ede-locate-create/update-root-database): New methods. + (initialize-instance): Use ede-locate-flush-hash. + + * ede/pmake.el (ede-proj-makefile-insert-variables): If this is + the top project and not a metasubproject, set TOP to CURDIR. + (ede-proj-makefile-insert-variables): Output a target's object + list whether or not the vars are already in the Makefile. + (ede-pmake-insert-variable-once): New macro. + + * ede/project-am.el (project-am-with-makefile-current): Add + recentf-exclude. + (project-am-load-makefile): Obey an optional suggested name. + (project-am-expand-subdirlist): New function. + (project-am-makefile::project-rescan): Use it. Combine SUBDIRS + and DIST_SUBDIRS. + (project-am-meta-type-alist): A list to scan better Makefile.am + (project-am-scan-for-targets): Scan also over + project-am-meta-type-alist. + (ede-system-include-path): Simple implementation. + (ede-find-target): Deleted. EDE core takes care of this. + (ede-buffer-mine): Create the searched filename as relative. + (project-am-load): Simplify, using autoconf-edit. + (project-am-extract-package-info): Fix separators. + + * ede/proj.el (project-run-target): New method. + (project-make-dist, project-compile-project): Use + ede-proj-automake-p to determine which kind of compile to use. + (project-rescan): Call ede-load-project-file. + (ede-buffer-mine): Add more file names that belong to the project. + (ede-proj-compilers): Improve error message. + + * ede/proj-obj.el (ede-ld-linker): Use the LDDEPS variable. + (ede-source-c++): Add more C++ extensions. + (ede-proj-target-makefile-objectcode): Quote initforms. Support + lex and yacc. + + * ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed. + (ede-proj-makefile-insert-variables): New, add LDDEPS. + (ede-proj-makefile-insert-automake-post-variables): Add LDADD + variable. Use ldlibs-local slot. Add a -l to ldlibs strings. + (ede-proj-target-makefile-program): Swap order of two slots so + they show up in the same order as in the command line. + (ede-proj-target-makefile-program): Add ldlibs-local slot. + + * ede/proj-shared.el (ede-g++-libtool-shared-compiler): Fix + inference rule to use cpp files. + (ede-proj-target-makefile-shared-object): Quote initforms. + + * ede/proj-misc.el (ede-proj-target-makefile-miscelaneous): + * ede/proj-info.el (ede-proj-target-makefile-info): + * ede/proj-aux.el (ede-proj-target-aux): + * ede/proj-archive.el (ede-proj-target-makefile-archive): + * ede/proj-elisp.el (ede-proj-target-elisp) + (ede-proj-target-elisp-autoloads): Quote initforms. + + * ede/srecode.el (ede-srecode-setup): Load autoconf templates. + + * ede/shell.el (ede-shell-buffer): Fix buffer name. + + * ede/pconf.el (ede-proj-configure-synchronize): If user events + occur while waiting for the compile process to finish, pull them + in and discard those events. + +2010-09-19 Eric Ludlam + + Synch Semantic to CEDET 1.0. + + * semantic.el (semantic-version): Update to 2.0. + (semantic-mode-map): Add "," and "m" bindings. + (navigate-menu): Update. + + * semantic/symref.el (semantic-symref-calculate-rootdir): + New function. + (semantic-symref-detect-symref-tool): Use it. + + * semantic/symref/grep.el (semantic-symref-grep-shell): New var. + (semantic-symref-perform-search): Use it. Calculate root dir with + semantic-symref-calculate-rootdir. + (semantic-symref-derive-find-filepatterns): Improve error message. + + * semantic/symref/list.el + (semantic-symref-results-mode-map): New bindings. + (semantic-symref-auto-expand-results): New option. + (semantic-symref-results-dump): Obey auto-expand. + (semantic-symref-list-expand-all, semantic-symref-regexp) + (semantic-symref-list-contract-all) + (semantic-symref-list-map-open-hits) + (semantic-symref-list-update-open-hits) + (semantic-symref-list-create-macro-on-open-hit) + (semantic-symref-list-call-macro-on-open-hits): New functions. + (semantic-symref-list-menu-entries) + (semantic-symref-list-menu): New vars. + (semantic-symref-list-map-open-hits): Move cursor to beginning of + match before calling the mapped function. + + * semantic/doc.el + (semantic-documentation-comment-preceeding-tag): Do nothing if the + mode doesn't provide comment-start-skip. + + * semantic/scope.el + (semantic-analyze-scope-nested-tags-default): Strip duplicates. + (semantic-analyze-scoped-inherited-tag-map): Take the tag we are + looking for as part of the scoped tags list. + + * semantic/html.el (semantic-default-html-setup): Add + senator-step-at-tag-classes. + + * semantic/decorate/include.el + (semantic-decoration-on-unknown-includes): Change light bgcolor. + (semantic-decoration-on-includes-highlight-default): Check that + the include tag has a postion. + + * semantic/complete.el (semantic-collector-local-members): + (semantic-complete-read-tag-local-members) + (semantic-complete-jump-local-members): New class and functions. + (semantic-complete-self-insert): Save excursion before completing. + + * semantic/analyze/complete.el + (semantic-analyze-possible-completions-default): If no completions + are found, return the raw by-name-only completion list. Add FLAGS + arguments. Add support for 'no-tc (type constraint) and + 'no-unique, or no stripping duplicates. + (semantic-analyze-possible-completions-default): Add FLAGS arg. + + * semantic/util-modes.el + (semantic-stickyfunc-show-only-functions-p): New option. + (semantic-stickyfunc-fetch-stickyline): Don't show stickytext for + the very first line in a buffer. + + * semantic/util.el (semantic-hack-search) + (semantic-recursive-find-nonterminal-by-name) + (semantic-current-tag-interactive): Deleted. + (semantic-describe-buffer): Fix expand-nonterminal. Add + lex-syntax-mods, type relation separator char, and command + separation char. + (semantic-sanity-check): Only message if called interactively. + + * semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the + :filename property and the tag position. + + * semantic/lex-spp.el (semantic-lex-spp-lex-text-string): + Add recursion limit. + + * semantic/imenu.el (semantic-imenu-bucketize-type-members): + Make this buffer local, not the obsoleted variable. + + * semantic/idle.el: Add breadcrumbs support. + (semantic-idle-summary-current-symbol-info-default) + (semantic-idle-tag-highlight) + (semantic-idle-completion-list-default): Use + semanticdb-without-unloaded-file-searches for speed, and to + conform to the controls that specify if the idle timer is supposed + to be parsing unparsed includes. + (semantic-idle-symbol-highlight-face) + (semantic-idle-symbol-maybe-highlight): Rename from *-summary-*. + Callers changed. + (semantic-idle-work-parse-neighboring-files-flag): Default to nil. + (semantic-idle-work-update-headers-flag): New var. + (semantic-idle-work-for-one-buffer): Use it. + (semantic-idle-local-symbol-highlight): Rename from + semantic-idle-tag-highlight. + (semantic-idle-truncate-long-summaries): New option. + + * semantic/ia.el (semantic-ia-cache) + (semantic-ia-get-completions): Deleted. Callers changed. + (semantic-ia-show-variants): New command. + (semantic-ia-show-doc): If doc is empty, don't make a temp buffer. + (semantic-ia-show-summary): If there isn't anything to show, say so. + + * semantic/grammar.el (semantic-grammar-create-package): + Save the buffer even in batch mode. + + * semantic/fw.el + (semanticdb-without-unloaded-file-searches): New macro. + + * semantic/dep.el (semantic-dependency-find-file-on-path): + Fix case dereferencing ede-object when it is a list. + + * semantic/db-typecache.el (semanticdb-expand-nested-tag) + (semanticdb-typecache-faux-namespace): New functions. + (semanticdb-typecache-file-tags) + (semanticdb-typecache-merge-streams): Use them. + (semanticdb-typecache-file-tags): When deriving tags from a file, + give the mode a chance to monkey with the tag copy. + (semanticdb-typecache-find-default): Wrap find in save-excursion. + (semanticdb-typecache-find-by-name-helper): Merge found names down. + + * semantic/db-global.el + (semanticdb-enable-gnu-global-in-buffer): Don't show messages if + GNU Global is not available and we don't want to throw an error. + + * semantic/db-find.el (semanticdb-find-result-nth-in-buffer): + When trying to normalize the tag to a buffer, don't error if + set-buffer method doesn't exist. + + * semantic/db-file.el (semanticdb-save-db): Simplify msg. + + * semantic/db.el (semanticdb-refresh-table): If forcing a + refresh on a file not in a buffer, use semantic-find-file-noselect + and delete the buffer after use. + (semanticdb-current-database-list): When calculating root via + hooks, force it through true-filename and skip the list of + possible roots. + + * semantic/ctxt.el (semantic-ctxt-imported-packages): New. + + * semantic/analyze/debug.el + (semantic-analyzer-debug-insert-tag): Reset standard output to + current buffer. + (semantic-analyzer-debug-global-symbol) + (semantic-analyzer-debug-missing-innertype): Change "prefix" to + "symbol" in messages. + + * semantic/analyze/refs.el: (semantic-analyze-refs-impl) + (semantic-analyze-refs-proto): When calculating value, make sure + the found tag is 'similar' to the originating tag. + (semantic--analyze-refs-find-tags-with-parent): Attempt to + identify matches via imported symbols of parents. + (semantic--analyze-refs-full-lookup-with-parents): Do a deep + search during the brute search. + + * semantic/analyze.el + (semantic-analyze-find-tag-sequence-default): Be robust to + calculated scopes being nil. + + * semantic/bovine/c.el (semantic-c-describe-environment): Add + project macro symbol array. + (semantic-c-parse-lexical-token): Add recursion limit. + (semantic-ctxt-imported-packages, semanticdb-expand-nested-tag): + New overrides. + (semantic-expand-c-tag-namelist): Split a full type from a typedef + out to its own tag. + (semantic-expand-c-tag-namelist): Do not split out a typedef'd + inline type if it is an anonymous type. + (semantic-c-reconstitute-token): Use the optional initializers as + a clue that some function is probably a constructor. When + defining the type of these constructors, split the parent name, + and use only the class part, if applicable. + + * semantic/bovine/c-by.el: + * semantic/wisent/python-wy.el: Regenerate. + +2010-07-20 Juanma Barranquero + + * semantic/db-file.el (object-write): Fix typo in docstring. + +2010-06-03 Eric Ludlam + + * semantic/lex-spp.el + (semantic-lex-spp-table-write-slot-value): Instead of erroring on + invalid values during save, just save a nil (Bug#6324). + +2010-05-31 Jonathan Marchand (tiny change) + + * ede/cpp-root.el (ede-set-project-variables): Fix feature name + (bug#6231). + +2010-05-02 Stefan Monnier + + Use a mode-line spec rather than a static string in Semantic. + * semantic/util-modes.el: + (semantic-minor-modes-format): New var to replace... + (semantic-minor-modes-status): Remove. + (semantic-mode-line-update): Construct a mode-line spec rather than + a static string so that mouse buttons can be used on individual minor + modes and so that semantic-mode-line-update only needs to be called + when global settings are changed. + (semantic-add-minor-mode, semantic-toggle-minor-mode-globally): + Call semantic-mode-line-update. + (semantic-toggle-minor-mode-globally): Don't assume mode is on + minor-mode-alist, check semantic-minor-mode-alist as well. + (semantic-stickyfunc-mode, semantic-show-parser-state-auto-marker) + (semantic-show-parser-state-marker, semantic-show-parser-state-mode) + (semantic-show-unmatched-syntax-mode, semantic-highlight-edits-mode): + * semantic/mru-bookmark.el (semantic-mru-bookmark-mode): + * semantic/idle.el (semantic-idle-scheduler-mode) + (define-semantic-idle-service, semantic-idle-summary-mode): + * semantic/decorate/mode.el (semantic-decoration-mode): + Don't call semantic-mode-line-update any more. + +2010-05-02 Stefan Monnier + + Use define-minor-mode in CEDET where applicable. + + * srecode/mode.el (srecode-minor-mode,global-srecode-minor-mode): + Use define-minor-mode. + + * semantic/util-modes.el (semantic-add-minor-mode): + Remove unused arg `keymap' and code redundant with define-minor-mode. + (semantic-toggle-minor-mode-globally): Only handle arg -1 and 1. + (semantic-stickyfunc-mode, global-semantic-show-unmatched-syntax-mode) + (semantic-highlight-func-mode, global-semantic-show-parser-state-mode) + (global-semantic-highlight-edits-mode, semantic-highlight-edits-mode) + (semantic-show-unmatched-syntax-mode, semantic-show-parser-state-mode) + (global-semantic-stickyfunc-mode, global-semantic-highlight-func-mode): + Use define-minor-mode. + (semantic-stickyfunc-mode-setup, semantic-highlight-edits-mode-setup) + (semantic-show-unmatched-syntax-mode-setup) + (semantic-show-parser-state-mode-setup) + (semantic-highlight-func-mode-setup): Inline into sole caller. + + * semantic/mru-bookmark.el (global-semantic-mru-bookmark-mode) + (semantic-mru-bookmark-mode): Use define-minor-mode. + (semantic-mru-bookmark-mode-setup): Inline into sole caller. + + * semantic/idle.el (define-semantic-idle-service): + Use define-minor-mode and inline setup function into its sole caller. + (semantic-idle-scheduler-mode-setup) + (semantic-idle-summary-mode-setup): Inline into sole caller. + (global-semantic-idle-scheduler-mode, semantic-idle-scheduler-mode): + Use define-minor-mode. + + * semantic/decorate/mode.el (global-semantic-decoration-mode) + (semantic-decoration-mode): Use define-minor-mode. + (semantic-decoration-mode-setup): Inline into sole caller. + + * ede/dired.el (ede-dired-minor-mode): Initialize in declaration. + (ede-dired-minor-mode): Use define-minor-mode and derived-mode-p. + (ede-dired-add-to-target): Use dolist. + +2010-04-18 Chong Yidong + + * ede/pmake.el (ede-proj-makefile-insert-variables): + Don't destroy list before using it. + +2010-04-29 Chong Yidong + + * semantic.el (semantic-completion-at-point-function): + New function. + (semantic-mode): Use semantic-completion-at-point-function for + completion-at-point-functions instead. + +2010-04-28 Chong Yidong + + * semantic.el (semantic-mode): When enabled, add + semantic-ia-complete-symbol to completion-at-point-functions. + + * semantic/ia.el (semantic-ia-complete-symbol): Return nil + if Semantic is not active. + +2010-04-19 Chong Yidong + + * ede/pmake.el (ede-proj-makefile-insert-variables): + Don't destroy list before using it. + +2010-04-02 Juanma Barranquero + + * semantic/imenu.el (semantic-imenu-bucketize-type-members) + (semantic-create-imenu-directory-index): Fix typos in docstrings. + (semantic-imenu-goto-function): Reflow docstring. + +2010-03-24 Juanma Barranquero + + * srecode/table.el (srecode-template-table): Fix docstring typo. + +2010-03-24 Glenn Morris + + * semantic/bovine/c.el (semantic-c-describe-environment): + Consistently check ede-object is bound throughout. + + * ede/project-am.el (ede-shell-run-something): Declare. + +2010-03-13 Eric M. Ludlam + + * semantic/imenu.el: New file, from the CEDET repository + (Bug#5412). + +2010-03-06 Glenn Morris + + * semantic/grammar.el (semantic-grammar-header-template): + Update template copyright to GPLv3+. + +2010-02-28 Chong Yidong + + * semantic/db-find.el + (semanticdb-find-translate-path-brutish-default): + * ede/make.el (ede-make-check-version): Use + with-current-buffer instead of save-excursion. + +2010-02-24 Eduard Wiebe + + * semantic/wisent/javascript.el (wisent-javascript-jv-expand-tag): + Avoid c(ad)ddr and use c(ad)r of cddr (Bug#5640). + +2010-02-16 Chong Yidong + + * data-debug.el (data-debug): Move to extensions group. + + * ede.el (ede): + * srecode.el (srecode): + * semantic.el (semantic): Put in tools and extensions group. + +2010-02-14 Juanma Barranquero + + * ede.el (ede-run-target, project-delete-target) + (project-dist-files, ede-name, ede-documentation, ede-parent-project) + (ede-adebug-project, ede-adebug-project-parent) + (ede-adebug-project-root): Fix typos in docstrings. + +2010-01-18 Juanma Barranquero + + * ede/locate.el (ede-locate-file-in-project) + (ede-locate-file-in-project-impl): Fix typos in docstrings. + (ede-enable-locate-on-project): Fix typos in error messages. + + * semantic/util-modes.el (semantic-unmatched-syntax-face) + (semantic-stickyfunc-old-hlf, semantic-stickyfunc-header-line-format) + (semantic-stickyfunc-sticky-classes, semantic-highlight-func-mode-setup) + (semantic-stickyfunc-fetch-stickyline): Fix typos in docstrings. + (semantic-stickyfunc-popup-menu, semantic-highlight-func-popup-menu): + Fix typos in menu help. + + * semantic.el (semantic-require-version, semantic--buffer-cache) + (semantic-unmatched-syntax-cache-check, semantic-unmatched-syntax-hook) + (semantic--before-fetch-tags-hook, semantic-new-buffer-fcn-was-run) + (semantic--umatched-syntax-needs-refresh-p, semantic-elapsed-time) + (semantic-parse-stream, semantic-parse-region) + (semantic-parse-region-default, semantic--set-buffer-cache) + (semantic-minimum-working-buffer-size, semantic-refresh-tags-safe) + (semantic-bovinate-toplevel, semantic-load-system-cache-loaded) + (semantic-default-submodes): + * semantic/db-ebrowse.el (semanticdb-table-ebrowse) + (semanticdb-create-ebrowse-database) + (semanticdb-find-tags-for-completion-method) + (semanticdb-find-tags-by-class-method) + (semanticdb-deep-find-tags-by-name-method) + (semanticdb-deep-find-tags-for-completion-method): + * semantic/db-el.el (semanticdb-elisp-mapatom-collector) + (semanticdb-find-tags-by-name-method, emacs-lisp-mode) + (semanticdb-find-tags-for-completion-method) + (semanticdb-find-tags-by-class-method) + (semanticdb-deep-find-tags-for-completion-method): + * semantic/db-find.el (semanticdb-find-translate-path) + (semanticdb-find-need-cache-update-p, semanticdb-find-result-with-nil-p) + (semanticdb-find-scanned-include-tags, semanticdb-find-tags-collector) + (semanticdb-find-tags-by-name-method) + (semanticdb-find-tags-by-name-regexp-method) + (semanticdb-find-tags-for-completion-method) + (semanticdb-find-tags-by-class-method) + (semanticdb-find-tags-external-children-of-type-method) + (semanticdb-find-tags-subclasses-of-type-method) + (semanticdb-deep-find-tags-by-name-method) + (semanticdb-deep-find-tags-by-name-regexp-method) + (semanticdb-deep-find-tags-for-completion-method): + * semantic/db-global.el (semanticdb-enable-gnu-global-hook) + (semanticdb-enable-gnu-global-in-buffer) + (semanticdb-find-tags-for-completion-method) + (semanticdb-deep-find-tags-by-name-method) + (semanticdb-deep-find-tags-for-completion-method): + * semantic/db-javascript.el (semanticdb-javascript-tags) + (javascript-mode, semanticdb-find-translate-path) + (semanticdb-find-tags-for-completion-method) + (semanticdb-find-tags-by-class-method) + (semanticdb-deep-find-tags-by-name-method) + (semanticdb-deep-find-tags-for-completion-method) + (semanticdb-find-tags-external-children-of-type-method): + * semantic/idle.el (semantic-idle-work-core-handler) + (define-semantic-idle-service, semantic-idle-summary-useful-context-p) + (global-semantic-idle-scheduler-mode): + * srecode/dictionary.el (srecode-field-value) + (srecode-dictionary-add-section-dictionary): + Fix typos in docstrings. + +2010-01-17 Glenn Morris + + * semantic/idle.el (semantic-idle-work-for-one-buffer): Doc fix. + +2010-01-17 Juanma Barranquero + + * semantic.el (semantic-mode): Fix typos in docstrings. + +2010-01-16 Mario Lang + + * ede/cpp-root.el (ede-cpp-root-project): + * ede/files.el (ede-expand-filename): + * ede/simple.el (ede-simple-project): + * semantic/complete.el (semantic-complete-read-tag-engine) + (semantic-complete-inline-tag-engine): + * semantic/db-el.el (semanticdb-equivalent-mode): + * semantic/db-global.el (semanticdb-equivalent-mode): + * semantic/db-javascript.el (semanticdb-equivalent-mode): + * semantic/db.el (semanticdb-equivalent-mode): + * semantic/decorate/include.el (semantic-decoration-unknown-include-describe): + * semantic/idle.el (semantic-idle-work-for-one-buffer): + Remove duplicated words in doc-strings. + +2010-01-14 Juanma Barranquero + + * semantic/edit.el (semantic-reparse-needed-change-hook) + (semantic-no-reparse-needed-change-hook): + * srecode/insert.el (srecode-resolve-argument-list) + (srecode-template-inserter-blank, srecode-template-inserter-variable) + (srecode-template-inserter-ask, srecode-template-inserter-width) + (srecode-template-inserter-section-start) + (srecode-template-inserter-section-end, srecode-insert-method): + +2010-01-12 Juanma Barranquero + + * data-debug.el (data-debug): Fix customization group reference. + +2010-01-12 Juanma Barranquero + + * semantic/analyze.el (semantic-analyze-push-error) + (semantic-analyze-context, semantic-analyze-context-assignment) + (semantic-analyze-find-tag-sequence, semantic-analyze-find-tag): + * semantic/java.el (java-mode, semantic-tag-include-filename) + (semantic-java-doc-keywords-map): + * semantic/bovine/c.el (c-mode, semantic-c-member-of-autocast) + (semantic-lex-c-nested-namespace-ignore-second, semantic-parse-region) + (semantic-c-parse-lexical-token, semantic-c-debug-mode-init-pch) + (semantic-c-classname, semantic-format-tag-uml-prototype) + (semantic-c-dereference-namespace, semantic-analyze-type-constants): + * semantic/bovine/el.el (semantic-elisp-form-to-doc-string) + (semantic-emacs-lisp-obsoleted-doc, semantic-up-context) + (semantic-get-local-variables, semantic-end-of-command) + (semantic-beginning-of-command, semantic-ctxt-current-class-list) + (lisp-mode): + * semantic/bovine/make.el (makefile-mode): + * semantic/wisent/python.el (wisent-python-string-re) + (wisent-python-implicit-line-joining-p, wisent-python-forward-string) + (wisent-python-lex-beginning-of-line, wisent-python-lex-end-of-line) + (semantic-lex, semantic-get-local-variables, python-mode): + * semantic/wisent/python-wy.el (wisent-python-wy--keyword-table): + * srecode/extract.el (srecode-extract-state-set) + (srecode-extract-method): Fix typos in docstrings. + +2010-01-10 Chong Yidong + + * semantic.el (semantic-new-buffer-setup-functions): + Add python parser. + +2010-01-10 Richard Kim + + * semantic/wisent/python-wy.el: + * semantic/wisent/python.el: New files. + +2010-01-02 Juanma Barranquero + + * semantic/db-typecache.el (semanticdb-typecache-find-default): + Fix typo in docstring. + +2009-12-14 Chong Yidong + + * semantic/mru-bookmark.el (global-semantic-mru-bookmark-mode) + (semantic-mru-bookmark-mode): Doc fixes. + + * semantic/db.el (semanticdb-cache-get): Use error instead + of assert. + +2009-12-05 Chong Yidong + + * semantic/ia.el (semantic-ia-complete-symbol): + Make argument optional. + +2009-12-05 Eric Ludlam + + * semantic/bovine/c.el (semantic-c-describe-environment): + Describe project macro symbols. + + * semantic/complete.el (semantic-complete-do-completion): + Don't call semantic-collector-current-exact-match. + + * ede.el (ede-apply-preprocessor-map): Accept lists of + ede-objects as targets. + + * ede/pmake.el (ede-proj-makefile-insert-variables): Output + a target's object list even if compiler vars are already in the + Makefile. + + * ede/emacs.el (ede-preprocessor-map): Add config.h to the + list of headers producing necessary macros. + +2009-11-24 Glenn Morris + + * semantic/idle.el (global-semantic-idle-scheduler-mode): + Move after definition of global-semantic-idle-tag-highlight-mode. + +2009-11-22 Chong Yidong + + * srecode/map.el (srecode-get-maps): + * semantic/wisent/wisent.el (wisent-parse-toggle-verbose-flag): + * semantic/wisent/comp.el (wisent-toggle-verbose-flag): + * semantic/decorate/mode.el (semantic-decoration-mode) + (semantic-toggle-decoration-style): + * semantic/decorate/include.el + (semantic-decoration-include-describe) + (semantic-decoration-unknown-include-describe) + (semantic-decoration-unparsed-include-describe) + (semantic-decoration-all-include-summary): + * semantic/bovine/c.el (semantic-c-debug-mode-init): + * semantic/analyze/complete.el + (semantic-analyze-possible-completions): + * semantic/util-modes.el (semantic-highlight-edits-mode) + (semantic-show-unmatched-syntax-mode) + (semantic-show-parser-state-mode, semantic-stickyfunc-mode) + (semantic-highlight-func-mode): + * semantic/util.el (semantic-describe-buffer): + * semantic/symref.el (semantic-symref-find-references-by-name) + (semantic-symref-find-tags-by-name) + (semantic-symref-find-tags-by-regexp) + (semantic-symref-find-tags-by-completion) + (semantic-symref-find-file-references-by-name) + (semantic-symref-find-text): + * semantic/senator.el (senator-copy-tag, senator-kill-tag) + (senator-yank-tag): + * semantic/scope.el (semantic-calculate-scope): + * semantic/mru-bookmark.el (semantic-mru-bookmark-mode): + * semantic/idle.el (semantic-idle-scheduler-mode) + (define-semantic-idle-service): + * semantic/complete.el (semantic-complete-analyze-inline) + (semantic-complete-analyze-inline-idle): + * semantic/analyze.el (semantic-analyze-current-context): + * mode-local.el (describe-mode-local-bindings) + (describe-mode-local-bindings-in-mode): + * ede/make.el (ede-make-check-version): + * ede/locate.el (ede-enable-locate-on-project): + * cedet-idutils.el (cedet-idutils-expand-filename) + (cedet-idutils-version-check): + * cedet-global.el (cedet-gnu-global-expand-filename) + (cedet-gnu-global-version-check): + * cedet-cscope.el (cedet-cscope-expand-filename) + (cedet-cscope-version-check): Use called-interactively-p instead + of interactive-p. + + * semantic/ia.el (semantic-ia-completion-format-tag-function): + Use semantic-format-tag-prototype. + +2009-11-21 Chong Yidong + + * semantic/complete.el (semantic-complete-read-tag-engine) + (semantic-complete-jump-local, semantic-complete-jump): + Improve prompt string. + +2009-11-20 Chong Yidong + + * semantic/complete.el (semantic-complete-inline-map): Doc fix. + + * semantic/idle.el (define-semantic-idle-service) + (semantic-idle-summary-mode, semantic-idle-completions): Doc fix. + +2009-11-20 Chong Yidong + + * cedet.el (cedet-menu-map): Re-order menu items. + + * semantic.el: Enable idle-mode menu items only if + global-semantic-idle-scheduler-mode is enabled. + (semantic-default-submodes): Doc fix. + + * semantic/idle.el (global-semantic-idle-scheduler-mode): + When turning off, disable other idle modes. + +2009-11-15 Chong Yidong + + * semantic/idle.el (semantic-idle-summary-mode) + (semantic-idle-summary-mode): Define using define-minor-mode + instead of define-semantic-idle-service. + (semantic-idle-summary-mode): New function. + (semantic-idle-summary-mode-setup): Use pre-command-hook to ensure + that mouse motion does not reset the echo area. + +2009-11-08 Chong Yidong + + * semantic/ctxt.el (semantic-get-local-variables): Disable + the progress reporter entirely. + +2009-11-03 Stefan Monnier + + * semantic/fw.el (semantic/loaddefs): + * srecode.el (srecode/loaddefs): + * ede.el (ede/loaddefs): Load rather than require. + * ede/cpp-root.el: + * ede/emacs.el: + * ede/files.el: + * ede/linux.el: + * ede/locate.el: + * ede/make.el: + * ede/shell.el: + * ede/speedbar.el: + * ede/system.el: + * ede/util.el: + * semantic/analyze.el: + * semantic/bovine.el: + * semantic/complete.el: + * semantic/ctxt.el: + * semantic/db-file.el: + * semantic/db-find.el: + * semantic/db-global.el: + * semantic/db-mode.el: + * semantic/db-typecache.el: + * semantic/db.el: + * semantic/debug.el: + * semantic/dep.el: + * semantic/doc.el: + * semantic/edit.el: + * semantic/find.el: + * semantic/format.el: + * semantic/html.el: + * semantic/ia-sb.el: + * semantic/ia.el: + * semantic/idle.el: + * semantic/lex-spp.el: + * semantic/lex.el: + * semantic/mru-bookmark.el: + * semantic/scope.el: + * semantic/senator.el: + * semantic/sort.el: + * semantic/symref.el: + * semantic/tag-file.el: + * semantic/tag-ls.el: + * semantic/tag-write.el: + * semantic/tag.el: + * semantic/util-modes.el: + * semantic/analyze/complete.el: + * semantic/analyze/refs.el: + * semantic/bovine/c.el: + * semantic/bovine/gcc.el: + * semantic/bovine/make.el: + * semantic/bovine/scm.el: + * semantic/decorate/include.el: + * semantic/decorate/mode.el: + * semantic/symref/cscope.el: + * semantic/symref/global.el: + * semantic/symref/grep.el: + * semantic/symref/idutils.el: + * semantic/symref/list.el: + * semantic/wisent/java-tags.el: + * semantic/wisent/javascript.el: + * srecode/compile.el: + * srecode/cpp.el: + * srecode/document.el: + * srecode/el.el: + * srecode/expandproto.el: + * srecode/getset.el: + * srecode/insert.el: + * srecode/java.el: + * srecode/map.el: + * srecode/mode.el: + * srecode/template.el: + * srecode/texi.el: Remove the file-local setting of + generated-autoload-feature. + +2009-11-03 Glenn Morris + + * mode-local.el (with-mode-local): Doc fix. + +2009-10-31 Chong Yidong + + * cedet.el (cedet-menu-map): Remove Semantic and EDE menu + items. + + * ede.el (ede-minor-mode): + * semantic.el (semantic-mode): Toggle menu separators. + +2009-10-31 Glenn Morris + + * semantic/tag.el (semantic--tag-link-list-to-buffer): + Use mapc rather than mapcar because the return value is never used. + + * srecode/template.el, semantic/wisent/javascript.el: + * semantic/wisent/java-tags.el, semantic/texi.el: + * semantic/html.el: + Suppress harmless warnings about setting up semantic-imenu (not + part of Emacs) variables. + +2009-10-30 Stefan Monnier + + * srecode/srt-mode.el (semantic-analyze-possible-completions): + * semantic/symref/list.el (semantic-symref-rb-toggle-expand-tag): + * semantic/symref/grep.el (semantic-symref-perform-search): + * semantic/bovine/gcc.el (semantic-gcc-query): + * semantic/bovine/c.el (semantic-c-parse-lexical-token): + * semantic/analyze/debug.el (semantic-analyzer-debug-add-buttons) + (semantic-analyzer-debug-global-symbol) + (semantic-analyzer-debug-missing-innertype) + (semantic-analyzer-debug-insert-include-summary): + * semantic/util.el (semantic-file-tag-table): + (semantic-describe-buffer-var-helper, semantic-something-to-tag-table) + (semantic-recursive-find-nonterminal-by-name): + * semantic/tag-ls.el (semantic-tag-calculate-parent-default): + * semantic/tag-file.el (semantic-prototype-file): + * semantic/symref.el (semantic-symref-parse-tool-output): + * semantic/sb.el (semantic-sb-fetch-tag-table): + * semantic/lex-spp.el (semantic-lex-spp-lex-text-string): + * semantic/idle.el (semantic-idle-work-for-one-buffer): + (semantic-idle-summary-maybe-highlight): + * semantic/ia-sb.el (semantic-ia-speedbar) + (semantic-ia-sb-tag-info): + * semantic/grammar.el (semantic-analyze-possible-completions): + * semantic/find.el (semantic-brute-find-tag-by-position): + * semantic/ede-grammar.el (project-compile-target): + (ede-proj-makefile-insert-variables): + * semantic/debug.el (semantic-debug-set-parser-location): + (semantic-debug-set-source-location, semantic-debug-interface-layout) + (semantic-debug-mode, semantic-debug): + * semantic/db.el (semanticdb-needs-refresh-p): + * semantic/db-typecache.el (semanticdb-typecache-refresh-for-buffer): + * semantic/db-javascript.el (semanticdb-equivalent-mode): + * semantic/db-find.el (semanticdb-find-log-new-search) + (semanticdb-find-translate-path-includes--internal) + (semanticdb-reset-log, semanticdb-find-log-activity): + * semantic/db-file.el (object-write): + * semantic/db-el.el (semanticdb-equivalent-mode): + * semantic/db-ebrowse.el (semanticdb-ebrowse-C-file-p) + (semanticdb-create-ebrowse-database): + * semantic/db-debug.el (semanticdb-table-sanity-check): + * semantic/complete.el (semantic-displayor-focus-request) + (semantic-collector-calculate-completions-raw) + (semantic-complete-read-tag-analyzer): + * semantic/analyze.el (semantic-analyze-pulse): + * ede/util.el (ede-update-version-in-source): + * ede/proj.el (project-delete-target): + * ede/proj-elisp.el (ede-update-version-in-source) + (ede-proj-flush-autoconf): + * ede/pconf.el (ede-proj-configure-synchronize) + (ede-proj-configure-synchronize): + * ede/locate.el (ede-locate-file-in-project-impl): + * ede/linux.el (ede-linux-version): + * ede/emacs.el (ede-emacs-version): + * ede/dired.el (ede-dired-add-to-target): + * ede.el (ede-buffer-header-file, ede-find-target) + (ede-buffer-documentation-files, ede-project-buffers, ede-set) + (ede-target-buffers, ede-buffers, ede-make-project-local-variable): + * cedet-idutils.el (cedet-idutils-fnid-call): + (cedet-idutils-lid-call, cedet-idutils-expand-filename) + (cedet-idutils-version-check): + * cedet-global.el (cedet-gnu-global-call): + (cedet-gnu-global-expand-filename, cedet-gnu-global-root) + (cedet-gnu-global-version-check, cedet-gnu-global-scan-hits): + * cedet-cscope.el (cedet-cscope-call) + (cedet-cscope-expand-filename, cedet-cscope-version-check): + Use with-current-buffer. + * ede.el (ede-make-project-local-variable) + (ede-set-project-variables, ede-set): Use dolist. + +2009-10-28 Stefan Monnier + + * mode-local.el (make-obsolete-overload): Add `when' argument. + (overload-docstring-extension): Use that info. + * semantic/fw.el (semantic-alias-obsolete): Pass the `when' info. + * semantic/idle.el (semantic-eldoc-current-symbol-info): + * semantic/tag-ls.el (semantic-nonterminal-protection) + (semantic-nonterminal-abstract, semantic-nonterminal-leaf) + (semantic-nonterminal-full-name): Add the new `when' info. + * semantic/decorate/mode.el (semantic/decorate): Require CL for + `assert'. + +2009-10-25 Stefan Monnier + + * semantic/fw.el (semantic-alias-obsolete) + (semantic-varalias-obsolete): Make the `when' arg mandatory. + (define-mode-overload-implementation): + * semantic/decorate/mode.el (semantic-decorate-pending-decoration-hooks): + * semantic/wisent.el (wisent-lex-make-token-table): + * semantic/util.el (semantic-file-token-stream) + (semantic-something-to-stream): + * semantic/tag.el (semantic-tag-make-assoc-list) + (semantic-expand-nonterminal): + * semantic/tag-file.el (semantic-find-nonterminal) + (semantic-find-dependency, semantic-find-nonterminal) + (semantic-find-dependency): + * semantic/lex.el (semantic-flex-start, semantic-flex-end) + (semantic-flex-text, semantic-flex-make-keyword-table) + (semantic-flex-keyword-p, semantic-flex-keyword-put) + (semantic-flex-keyword-get, semantic-flex-map-keywords) + (semantic-flex-keywords, semantic-flex-buffer, semantic-flex-list): + * semantic/java.el (semantic-java-prototype-nonterminal): + * semantic/idle.el (semantic-before-idle-scheduler-reparse-hooks) + (semantic-after-idle-scheduler-reparse-hooks): + * semantic/edit.el (semantic-edits-incremental-reparse-failed-hooks): + * semantic/db-mode.el (semanticdb-mode-hooks): + * semantic.el (semantic-toplevel-bovine-table) + (semantic-toplevel-bovine-cache) + (semantic-before-toplevel-bovination-hook, semantic-init-hooks) + (semantic-init-mode-hooks, semantic-init-db-hooks) + (semantic-bovination-working-type): Provide the `when' arg. + +2009-10-24 Chong Yidong + + * semantic/util.el (semantic-recursive-find-nonterminal-by-name): + * semantic/tag.el (semantic-token-type-parent): Add WHEN + argument to make-obsolete. + + * semantic/fw.el (semantic-alias-obsolete) + (semantic-varalias-obsolete): Add optional WHEN argument. + +2009-10-21 Eric Ludlam + + * semantic/bovine/c.el (semantic-c-debug-mode-init) + (semantic-c-debug-mode-init-pch): New functions. + (semantic-c-debug-mode-init-last-mode): New var. + (semantic-c-parse-lexical-token): Use them. + + * semantic/lex-spp.el (semantic-lex-spp-anlyzer-do-replace): + When extracting the argument list, limit only by point-max. + +2009-10-17 Chong Yidong + + * srecode/srt.el: + * srecode/compile.el: + * semantic/mru-bookmark.el: + * semantic/debug.el: + * semantic/complete.el: + * semantic/analyze.el: Require CL when compiling. + +2009-10-17 Eric Ludlam + + * semantic/scope.el + (semantic-analyze-scoped-inherited-tag-map): Wrap calculation of + tmpscope so that the regular scope will continue to work. + + * semantic/idle.el (semantic-idle-tag-highlight): + Use semantic-idle-summary-highlight-face as the highlighting. + + * emacs-lisp/eieio-base.el (eieio-persistent-save): If buffer + contains multibyte characters, choose first applicable coding + system automatically. + + * ede/project-am.el (project-run-target): New method. + (project-run-target): New method. + + * ede.el (ede-target): Add run target menu item. + (ede-project, ede-minor-keymap): Add ede-run-target binding. + (ede-run-target): New function. + (ede-target::project-run-target): New method. + + * ede/proj.el (project-run-target): New method. + + * ede/proj-shared.el (ede-gcc-libtool-shared-compiler) + (ede-g++-libtool-shared-compiler): Remove SHELL. Remove COMMANDS. + Add :rules. + (ede-proj-target-makefile-shared-object): Only libtool compilers + now available. Add linkers for libtool. + (ede-cc-linker-libtool, ede-g++-linker-libtool): New. + (ede-proj-makefile-target-name): Always use .la extension. + + * ede/proj-prog.el (project-run-target): New method. + + * ede/proj-obj.el (ede-cc-linker): Rename from ede-gcc-linker. + (ede-g++-linker): Change Change link lines. + + * ede/pmake.el (ede-pmake-insert-variable-shared): + When searching for old variables, go to the end of the buffer and + search backward from there. + (ede-proj-makefile-automake-insert-subdirs) + (ede-proj-makefile-automake-insert-extradist): New methods. + (ede-proj-makefile-create): Use them. + + * ede/pconf.el (ede-proj-configure-test-required-file): + Force FILE to expand to the current target. Use file-exists-p to + check that it exists. + + * ede/linux.el (ede-linux-version): Don't call "head". + (ede-linux-load): Wrap dir in file-name-as-directory. + Set :version slot. + + * ede/files.el (ede-get-locator-object): When enabling + locate, do so on "top". + + * ede/emacs.el (ede-emacs-file-existing): Wrap "dir" in + file-name-as-directory during compare. + (ede-emacs-version): Return Emacs/XEmacs differentiator. + Get version number from different places. Don't call egrep. + (ede-emacs-load): Set :version slot. Call file-name-as-directory + to set the directory. + + * ede/shell.el: New file. + + * inversion.el (inversion-decoders): Allow for stray . in + alpha/beta variants. + +2009-10-17 Glenn Morris + + * semantic/grammar.el (semantic-grammar--lex-delim-spec): + All errors should have messages. + +2009-10-10 Sascha Wilde + + * ede/proj-shared.el (ede-proj-makefile-target-name): + Use .la for Automake. + +2009-10-09 Chong Yidong + + * ede/pconf.el (ede-proj-configure-synchronize): + Use "autoreconf -i". Suggested by Andreas Schwab. + +2009-10-08 Chong Yidong + + * ede/proj.el (project-make-dist, project-compile-project): + Fix filename test. + (ede-proj-dist-makefile): Use expand-file-name instead of concat + to expand file names. + +2009-10-08 Chong Yidong + + * ede/proj-obj.el (ede-gcc-linker): New var. + (ede-proj-target-makefile-objectcode): Use it. + + * ede/source.el (ede-want-any-source-files-p) + (ede-want-any-auxiliary-files-p, ede-want-any-files-p): + Return search result. This error was introduced while merging. + +2009-10-04 Chong Yidong + + * semantic.el (semantic-new-buffer-setup-functions): New option. + (semantic-new-buffer-fcn): Call parser setup functions here. + (semantic-mode): Don't call parser setup functions here, it's done + in semantic-new-buffer-fcn now. + (semantic-mode): Parse all existing buffers when enabled. + + * srecode/compile.el (srecode-compile-file): + Call semantic-new-buffer-fcn if the buffer has not been parsed. + +2009-10-04 Chong Yidong + + * ede/pmake.el (ede-pmake-insert-variable-once): Delete. + + * ede/proj-comp.el: Don't require ede/pmake at toplevel. + (proj-comp-insert-variable-once): New macro, renamed from + ede-pmake-insert-variable-once in ede/pmake.edl. + (ede-proj-makefile-insert-variables): Use it. + +2009-10-04 Juanma Barranquero + + * ede/makefile-edit.el (makefile-beginning-of-command) + (makefile-end-of-command): + * srecode/srt-mode.el (semantic-beginning-of-context) + (semantic-end-of-context): Fix previous change. Doc fixes. + +2009-10-04 Juanma Barranquero + + * ede/makefile-edit.el (makefile-beginning-of-command) + (makefile-end-of-command): + * semantic/lex.el (semantic-lex-token): + * semantic/analyze/fcn.el + (semantic-analyze-dereference-metatype-1): + * semantic/bovine/c.el (semantic-lex-cpp-define) + (semantic-lex-cpp-undef): + * semantic/wisent/wisent.el (wisent-skip-block): + * srecode/srt-mode.el (semantic-beginning-of-context) + (semantic-end-of-context): Fix typos in docstrings. + +2009-10-04 Chong Yidong + + * ede.el (ede-project-placeholder-cache-file): + * semantic/db-file.el (semanticdb-default-save-directory): + * srecode/map.el (srecode-map-save-file): + Use locate-user-emacs-file. Suggested by Juanma Barranquero. + +2009-10-03 Chong Yidong + + * srecode/insert.el: Require srecode/args. + + * srecode/args.el: Require srecode/dictionary instead of + srecode/insert. + + * srecode/srt-mode.el (srecode-template-mode): Doc fix. + + * files.el (auto-mode-alist): Add .srt and Project.ede. + + * semantic.el (semantic-mode): + Handle srecode-template-mode-hook as well. + (semantic-mode): Use js-mode-hook for Javascript hook. + + * srecode/template.el: Remove hook variable. + + * ede/proj-comp.el: Require ede/pmake when compiling. + + * ede.el (ede-target-forms-menu): Don't enable if no + projects exist. + (ede-project-placeholder-cache-file): Default to a file in + user-emacs-directory. + + * srecode/map.el (srecode-map-base-template-dir): Look for + templates in data-directory. + (srecode-map-save-file): Default to a file in user-emacs-directory. + + * ede/srecode.el (ede-srecode-setup): Use default templates + directory. + +2009-09-30 Eric Ludlam + + * semantic/util-modes.el (semantic-highlight-func-mode): + Doc fix. + + * ede/proj-comp.el (ede-proj-makefile-insert-variables): + Only insert each variable once. + + * ede/pmake.el (ede-pmake-insert-variable-once): New macro. + (ede-pmake-insert-variable-shared): Use it. + + * ede/cpp-root.el (ede-preprocessor-map): Do not deref table + for lexical table iff table is nil. + +2009-10-01 Glenn Morris + + * semantic/bovine/gcc.el + (semantic-c-reset-preprocessor-symbol-map): Fix declaration. + (semantic-gcc-get-include-paths, semantic-gcc-setup-data): Doc fixes. + +2009-10-03 Glenn Morris + + * semantic/db-find.el (data-debug-insert-tag-list): Comment out + declaration, currently false. + +2009-10-01 Glenn Morris + + * cedet-files.el (cedet-directory-name-to-file-name): + * cedet-idutils.el (cedet-idutils-search) + (cedet-idutils-expand-filename, cedet-idutils-support-for-directory) + (cedet-idutils-version-check): + * cedet.el (cedet-version): + * data-debug.el (data-debug-insert-overlay-button) + (data-debug-insert-overlay-list-button) + (data-debug-insert-buffer-button) + (data-debug-insert-buffer-list-button) + (data-debug-insert-process-button, data-debug-insert-ring-button) + (data-debug-insert-widget, data-debug-insert-stuff-list-button) + (data-debug-insert-stuff-vector-button) + (data-debug-insert-symbol-button, data-debug-insert-string) + (data-debug-insert-number, data-debug-insert-lambda-expression) + (data-debug-insert-nil, data-debug-insert-simple-thing) + (data-debug-insert-custom, data-debug-edebug-expr): + * ede.el (ede-auto-add-method, ede-project-class-files) + (global-ede-mode-map, ede-new, ede-debug-target) + (ede-customize-current-target, ede-buffers, ede-map-buffers, ede-set): + * semantic.el (semantic-minimum-working-buffer-size) + (semantic-fetch-tags, semantic-submode-list) + (semantic-default-submodes): + * ede/source.el (ede-source-match): + * ede/project-am.el (project-am-type-alist, project-add-file) + (project-am-package-info): + * ede/proj.el (ede-proj-target, project-new-target): + * ede/proj-elisp.el (ede-proj-tweak-autoconf): + * ede/proj-comp.el (ede-current-build-list): + * ede/makefile-edit.el (makefile-move-to-macro): + * ede/files.el (ede-toplevel-project-or-nil): + * ede/cpp-root.el (initialize-instance): + * ede/autoconf-edit.el (autoconf-find-last-macro) + (autoconf-parameter-strip, autoconf-insert-new-macro): + * semantic/wisent.el (wisent-lex-eoi): + * semantic/util-modes.el (global-semantic-show-parser-state-mode) + (semantic-show-parser-state-mode): + * semantic/texi.el (semantic-texi-environment-regexp): + * semantic/tag.el (semantic-tag-new-variable) + (semantic-tag-class, semantic-tag-new-variable, semantic-tag-copy) + (semantic--tag-deep-copy-attributes, semantic--tag-deep-copy-value) + (semantic--tag-deep-copy-tag-list) + (semantic-tag-components-with-overlays-default): + * semantic/symref.el (semantic-symref-find-text): + * semantic/senator.el (senator-yank-tag) + (senator-transpose-tags-up): + * semantic/scope.el (semantic-analyze-scoped-tags-default) + (semantic-analyze-scoped-inherited-tags, semantic-scope-find): + * semantic/sb.el (semantic-sb-autoexpand-length): + * semantic/lex.el (semantic-lex-comment-regex) + (semantic-lex-maximum-depth, define-lex, semantic-lex-token) + (semantic-lex-unterminated-syntax-protection, define-lex-analyzer): + * semantic/lex-spp.el + (semantic-lex-spp-dynamic-macro-symbol-obarray-stack) + (semantic-lex-spp-symbol, semantic-lex-spp-one-token-to-txt): + * semantic/idle.el + (semantic-idle-summary-current-symbol-info-brutish) + (semantic-idle-summary-current-symbol-info-default): + * semantic/grammar.el (semantic-grammar-recreate-package) + (semantic--grammar-macro-compl-dict): + * semantic/grammar-wy.el (semantic-grammar-wy--parse-table): + * semantic/format.el (semantic-format-tag-custom-list) + (semantic-format-tag-canonical-name-default): + * semantic/find.el (semantic-find-tag-by-overlay-in-region) + (semantic-find-tags-for-completion) + (semantic-find-tags-by-scope-protection-default) + (semantic-deep-find-tags-for-completion): + * semantic/edit.el + (semantic-edits-incremental-reparse-failed-hook) + (semantic-edits-verbose-flag, semantic-edits-assert-valid-region) + (semantic-edits-splice-remove, semantic-edits-splice-replace): + * semantic/doc.el (semantic-documentation-comment-preceeding-tag): + * semantic/dep.el (semantic-dependency-include-path): + * semantic/db.el (semanticdb-default-find-index-class) + (semanticdb-match-any-mode, semanticdb-with-match-any-mode) + (semanticdb-project-roots): + * semantic/db-find.el (semanticdb-implied-include-tags) + (semanticdb-find-adebug-insert-scanned-tag-cons) + (semanticdb-find-log-buffer-name, semanticdb-find-result-mapc) + (semanticdb-brute-deep-find-tags-for-completion): + * semantic/db-ebrowse.el (semanticdb-ebrowse-add-tree-to-table): + * semantic/ctxt.el (semantic-beginning-of-context-default) + (semantic-end-of-context-default) + (semantic-ctxt-current-function-default) + (semantic-ctxt-scoped-types-default): + * semantic/complete.el (semantic-complete-read-tag-engine) + (semantic-complete-inline-tag-engine) + (semantic-complete-inline-custom-type) + (semantic-complete-read-tag-analyzer): + * semantic/chart.el (semantic-chart-tags-by-class) + (semantic-chart-database-size): + * semantic/analyze.el (semantic-analyze-current-symbol) + (semantic-analyze-current-context): + * semantic/symref/list.el (semantic-symref) + (semantic-symref-hide-buffer, semantic-symref-symbol): + * semantic/symref/grep.el (semantic-symref-grep-use-template): + * semantic/symref/filter.el (semantic-symref-hits-in-region): + * semantic/bovine/el.el (semantic-elisp-form-to-doc-string): + * semantic/bovine/c.el (semantic-lex-c-preprocessor-symbol-map) + (semantic-c-parse-token-hack-depth, semantic-c--template-name-1) + (semantic-c-dereference-template): + * semantic/analyze/refs.el (semantic--analyze-refs-full-lookup) + (semantic--analyze-refs-full-lookup-with-parents) + (semantic--analyze-refs-full-lookup-simple): + * semantic/analyze/complete.el + (semantic-analyze-possible-completions): + * srecode/table.el (srecode-mode-table-new): + * srecode/srt.el (srecode-read-variable-name): + * srecode/srt-mode.el (srecode-macro-help, srecode-in-macro-p): + * srecode/semantic.el (srecode-semantic-handle-:tag) + (srecode-semantic-handle-:tagtype, srecode-semantic-insert-tag): + * srecode/map.el (srecode-current-map): + * srecode/insert.el (srecode-insert) + (srecode-insert-variable-secondname-handler, srecode-insert-method) + (srecode-template-inserter-point-override) + (srecode-insert-include-lookup): + * srecode/getset.el (srecode-auto-choose-class): + * srecode/extract.el (srecode-inserter-extract): + * srecode/document.el + (srecode-document-autocomment-return-last-alist) + (srecode-document-autocomment-param-type-alist) + (srecode-document-insert-function-comment) + (srecode-document-insert-variable-one-line-comment) + (srecode-document-function-name-comment): + * srecode/dictionary.el (srecode-create-dictionary) + (srecode-compound-toString): + * srecode/compile.el (srecode-flush-active-templates): + * srecode/args.el (srecode-semantic-handle-:blank): + Doc/message fixes. + +2009-10-01 Juanma Barranquero + + * semantic/wisent/javat-wy.el + (wisent-java-tags-wy--keyword-table): Use \000 instead of literal ^@. + +2009-09-30 Juanma Barranquero + + * srecode/expandproto.el: Fix provide statement. + +2009-09-30 Eric Ludlam + + * emacs-lisp/eieio.el (boolean-p): Delete. + +2009-09-30 Sascha Wilde + + * ede/srecode.el: Fix provide statement. + +2009-09-30 Glenn Morris + + * ede/proj.el (ede-proj-target-makefile-miscelaneous): + * ede/proj-aux.el (ede-aux-source): + * ede/proj-misc.el (ede-proj-target-makefile-miscelaneous) + (ede-misc-source): + * semantic/mru-bookmark.el (semantic-mrub-completing-read) + (semantic-mrub-switch-tags): Fix doc typos. + + * semantic/db-global.el (data-debug-new-buffer) + (data-debug-insert-thing): Remove unneeded declarations (one broken). + (semanticdb-enable-gnu-global-databases): Fix prompt typo. + + * semantic/analyze/fcn.el (semantic-scope-find): Fix declaration. + + * semantic/bovine/gcc.el (semantic-gcc-setup): Replace runtime + use of CL function `remove-if-not'. + +2009-09-29 Glenn Morris + + * semantic/symref/idutils.el: + * semantic/symref/list.el: Relicense under GPLv3+. + + * ede/srecode.el (srecode-resolve-arguments): Fix declaration. + + * semantic/complete.el (semantic-displayor-focus-abstract-child-p): + * semantic/tag-file.el (semanticdb-table-child-p): + * srecode/compile.el (srecode-template-inserter-newline-child-p): + Mark declarations not understood by check-declare. + +2009-09-28 Eric Ludlam + + CEDET (development tools) package merged. + + * *.el: + * ede/*.el: + * semantic/*.el: + * srecode/*.el: New files. + +2009-09-28 Eric Ludlam + + * emacs-lisp/chart.el: + * emacs-lisp/eieio-base.el: + * emacs-lisp/eieio-comp.el: + * emacs-lisp/eieio-custom.el: + * emacs-lisp/eieio-datadebug.el: + * emacs-lisp/eieio-opt.el: + * emacs-lisp/eieio-speedbar.el: + * emacs-lisp/eieio.el: New files. + + * cedet-cscope.el: + * cedet-files.el: + * cedet-global.el: + * cedet-idutils.el: + * data-debug.el: + * inversion.el: + * mode-local.el: + * pulse.el: New files. diff --git a/lisp/cedet/cedet-cscope.el b/lisp/cedet/cedet-cscope.el index 18cb7071d5c..211c7fb4b01 100644 --- a/lisp/cedet/cedet-cscope.el +++ b/lisp/cedet/cedet-cscope.el @@ -73,6 +73,12 @@ SCOPE is the scope of the search, such as 'project or 'subdirs." ) (cedet-cscope-call (list "-d" "-L" idx searchtext)))) +(defun cedet-cscope-create (flags) + "Create a CScope database at the current directory. +FLAGS are additional flags to pass to cscope beyond the +options -cR." + (cedet-cscope-call (append (list "-cR") flags))) + (defun cedet-cscope-call (flags) "Call CScope with the list of FLAGS." (let ((b (get-buffer-create "*CEDET CScope*")) @@ -113,13 +119,19 @@ Return a fully qualified filename." If DIR is not supplied, use the current default directory. This works by running cscope on a bogus symbol, and looking for the error code." + (interactive "DDirectory: ") (save-excursion (let ((default-directory (or dir default-directory))) (set-buffer (cedet-cscope-call (list "-d" "-L" "-7" "moose"))) (goto-char (point-min)) - (if (looking-at "[^ \n]*cscope: ") - nil - t)))) + (let ((ans (looking-at "[^ \n]*cscope: "))) + (if (called-interactively-p 'interactive) + (if ans + (message "No support for CScope in %s" default-directory) + (message "CScope is supported in %s" default-directory)) + (if ans + nil + t)))))) (defun cedet-cscope-version-check (&optional noerror) "Check the version of the installed CScope command. @@ -151,6 +163,14 @@ return nil." (message "CScope %s - Good enough for CEDET." rev)) t))))) +(defun cedet-cscope-create/update-database (&optional dir) + "Create a CScope database in DIR. +CScope will automatically choose incremental rebuild if +there is already a database in DIR." + (interactive "DDirectory: ") + (let ((default-directory dir)) + (cedet-cscope-create nil))) + (provide 'cedet-cscope) ;; arch-tag: 9973f1ad-f13b-4399-bc67-7f488478d78d diff --git a/lisp/cedet/cedet-global.el b/lisp/cedet/cedet-global.el index b98bd316935..da4e618a749 100644 --- a/lisp/cedet/cedet-global.el +++ b/lisp/cedet/cedet-global.el @@ -34,6 +34,12 @@ :type 'string :group 'cedet) +(defcustom cedet-global-gtags-command "gtags" + "Command name for the GNU Global gtags executable. +GTAGS is used to create the tags table queried by the 'global' command." + :type 'string + :group 'cedet) + ;;; Code: (defun cedet-gnu-global-search (searchtext texttype type scope) "Perform a search with GNU Global, return the created buffer. @@ -76,6 +82,19 @@ SCOPE is the scope of the search, such as 'project or 'subdirs." flags) b)) +(defun cedet-gnu-global-gtags-call (flags) + "Create GNU Global TAGS using gtags with FLAGS." + (let ((b (get-buffer-create "*CEDET Global gtags*")) + (cd default-directory) + ) + (with-current-buffer b + (setq default-directory cd) + (erase-buffer)) + (apply 'call-process cedet-global-gtags-command + nil b nil + flags) + b)) + (defun cedet-gnu-global-expand-filename (filename) "Expand the FILENAME with GNU Global. Return a fully qualified filename." @@ -153,6 +172,18 @@ return nil." ;; Return the results (nreverse hits)))) +(defun cedet-gnu-global-create/update-database (&optional dir) + "Create a GNU Global database in DIR. +If a database already exists, then just update it." + (interactive "DDirectory: ") + (let ((root (cedet-gnu-global-root dir))) + (if root (setq dir root)) + (let ((default-directory dir)) + (cedet-gnu-global-gtags-call + (when root + '("-i");; Incremental update flag. + ))))) + (provide 'cedet-global) ;; arch-tag: 0d0d3ac2-91ef-4820-bb2b-1d59ccf38392 diff --git a/lisp/cedet/cedet-idutils.el b/lisp/cedet/cedet-idutils.el index 44c325b78cd..627a458b657 100644 --- a/lisp/cedet/cedet-idutils.el +++ b/lisp/cedet/cedet-idutils.el @@ -44,6 +44,11 @@ :type 'string :group 'cedet) +(defcustom cedet-idutils-make-command "mkid" + "Command name for the ID Utils executable for creating token databases." + :type 'string + :group 'cedet) + (defun cedet-idutils-search (searchtext texttype type scope) "Perform a search with ID Utils, return the created buffer. SEARCHTEXT is text to find. @@ -105,6 +110,20 @@ Return the created buffer with with program output." flags) b)) +(defun cedet-idutils-mkid-call (flags) + "Call ID Utils mkid with the list of FLAGS. +Return the created buffer with with program output." + (let ((b (get-buffer-create "*CEDET mkid*")) + (cd default-directory) + ) + (with-current-buffer b + (setq default-directory cd) + (erase-buffer)) + (apply 'call-process cedet-idutils-make-command + nil b nil + flags) + b)) + ;;; UTIL CALLS ;; (defun cedet-idutils-expand-filename (filename) @@ -172,6 +191,12 @@ return nil." (message "ID Utils %s - Good enough for CEDET." rev)) t))))) +(defun cedet-idutils-create/update-database (&optional dir) + "Create an IDUtils database in DIR. +IDUtils must start from scratch when updating a database." + (interactive "DDirectory: ") + (let ((default-directory dir)) + (cedet-idutils-mkid-call nil))) (provide 'cedet-idutils) diff --git a/lisp/cedet/cedet.el b/lisp/cedet/cedet.el index 6a6d09fda69..80a092ab9ea 100644 --- a/lisp/cedet/cedet.el +++ b/lisp/cedet/cedet.el @@ -36,19 +36,19 @@ (declare-function inversion-find-version "inversion") -(defconst cedet-version "1.0pre7" +(defconst cedet-version "1.0" "Current version of CEDET.") (defconst cedet-packages `( ;;PACKAGE MIN-VERSION (cedet ,cedet-version) - (eieio "1.2") - (semantic "2.0pre7") - (srecode "1.0pre7") - (ede "1.0pre7") - (speedbar "1.0.3")) - "Table of CEDET packages to install.") + (eieio "1.3") + (semantic "2.0") + (srecode "1.0") + (ede "1.0") + (speedbar "1.0")) + "Table of CEDET packages installed.") (defvar cedet-menu-map ;(make-sparse-keymap "CEDET menu") (let ((map (make-sparse-keymap "CEDET menu"))) diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 807c7797668..fbe66d12202 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el @@ -44,24 +44,24 @@ (require 'eieio) (require 'eieio-speedbar) (require 'ede/source) +(require 'ede/base) +(require 'ede/auto) + (load "ede/loaddefs" nil 'nomessage) +(declare-function ede-commit-project "ede/custom") (declare-function ede-convert-path "ede/files") (declare-function ede-directory-get-open-project "ede/files") (declare-function ede-directory-get-toplevel-open-project "ede/files") (declare-function ede-directory-project-p "ede/files") (declare-function ede-find-subproject-for-directory "ede/files") (declare-function ede-project-directory-remove-hash "ede/files") -(declare-function ede-project-root "ede/files") -(declare-function ede-project-root-directory "ede/files") (declare-function ede-toplevel "ede/files") (declare-function ede-toplevel-project "ede/files") (declare-function ede-up-directory "ede/files") -(declare-function data-debug-new-buffer "data-debug") -(declare-function data-debug-insert-object-slots "eieio-datadebug") (declare-function semantic-lex-make-spp-table "semantic/lex-spp") -(defconst ede-version "1.0pre7" +(defconst ede-version "1.0" "Current version of the Emacs EDE.") ;;; Code: @@ -95,314 +95,6 @@ target willing to take the file. 'never means never perform the check." :group 'ede :type 'sexp) ; make this be a list of options some day - -;;; Top level classes for projects and targets - -(defclass ede-project-autoload () - ((name :initarg :name - :documentation "Name of this project type") - (file :initarg :file - :documentation "The lisp file belonging to this class.") - (proj-file :initarg :proj-file - :documentation "Name of a project file of this type.") - (proj-root :initarg :proj-root - :type function - :documentation "A function symbol to call for the project root. -This function takes no arguments, and returns the current directories -root, if available. Leave blank to use the EDE directory walking -routine instead.") - (initializers :initarg :initializers - :initform nil - :documentation - "Initializers passed to the project object. -These are used so there can be multiple types of projects -associated with a single object class, based on the initilizeres used.") - (load-type :initarg :load-type - :documentation "Fn symbol used to load this project file.") - (class-sym :initarg :class-sym - :documentation "Symbol representing the project class to use.") - (new-p :initarg :new-p - :initform t - :documentation - "Non-nil if this is an option when a user creates a project.") - ) - "Class representing minimal knowledge set to run preliminary EDE functions. -When more advanced functionality is needed from a project type, that projects -type is required and the load function used.") - -(defvar ede-project-class-files - (list - (ede-project-autoload "edeproject-makefile" - :name "Make" :file 'ede/proj - :proj-file "Project.ede" - :load-type 'ede-proj-load - :class-sym 'ede-proj-project) - (ede-project-autoload "edeproject-automake" - :name "Automake" :file 'ede/proj - :proj-file "Project.ede" - :initializers '(:makefile-type Makefile.am) - :load-type 'ede-proj-load - :class-sym 'ede-proj-project) - (ede-project-autoload "automake" - :name "automake" :file 'ede/project-am - :proj-file "Makefile.am" - :load-type 'project-am-load - :class-sym 'project-am-makefile - :new-p nil) - (ede-project-autoload "cpp-root" - :name "CPP ROOT" :file 'ede/cpp-root - :proj-file 'ede-cpp-root-project-file-for-dir - :proj-root 'ede-cpp-root-project-root - :load-type 'ede-cpp-root-load - :class-sym 'ede-cpp-root - :new-p nil) - (ede-project-autoload "emacs" - :name "EMACS ROOT" :file 'ede/emacs - :proj-file "src/emacs.c" - :proj-root 'ede-emacs-project-root - :load-type 'ede-emacs-load - :class-sym 'ede-emacs-project - :new-p nil) - (ede-project-autoload "linux" - :name "LINUX ROOT" :file 'ede/linux - :proj-file "scripts/ver_linux" - :proj-root 'ede-linux-project-root - :load-type 'ede-linux-load - :class-sym 'ede-linux-project - :new-p nil) - (ede-project-autoload "simple-overlay" - :name "Simple" :file 'ede/simple - :proj-file 'ede-simple-projectfile-for-dir - :load-type 'ede-simple-load - :class-sym 'ede-simple-project)) - "List of vectors defining how to determine what type of projects exist.") - -;;; Generic project information manager objects - -(defclass ede-target (eieio-speedbar-directory-button) - ((buttonface :initform speedbar-file-face) ;override for superclass - (name :initarg :name - :type string - :custom string - :label "Name" - :group (default name) - :documentation "Name of this target.") - ;; @todo - I think this should be "dir", and not "path". - (path :initarg :path - :type string - ;:custom string - ;:label "Path to target" - ;:group (default name) - :documentation "The path to the sources of this target. -Relative to the path of the project it belongs to.") - (source :initarg :source - :initform nil - ;; I'd prefer a list of strings. - :type list - :custom (repeat (string :tag "File")) - :label "Source Files" - :group (default source) - :documentation "Source files in this target.") - (versionsource :initarg :versionsource - :initform nil - :type list - :custom (repeat (string :tag "File")) - :label "Source Files with Version String" - :group (source) - :documentation - "Source files with a version string in them. -These files are checked for a version string whenever the EDE version -of the master project is changed. When strings are found, the version -previously there is updated.") - ;; Class level slots - ;; -; (takes-compile-command :allocation :class -; :initarg :takes-compile-command -; :type boolean -; :initform nil -; :documentation -; "Non-nil if this target requires a user approved command.") - (sourcetype :allocation :class - :type list ;; list of symbols - :documentation - "A list of `ede-sourcecode' objects this class will handle. -This is used to match target objects with the compilers they can use, and -which files this object is interested in." - :accessor ede-object-sourcecode) - (keybindings :allocation :class - :initform (("D" . ede-debug-target)) - :documentation -"Keybindings specialized to this type of target." - :accessor ede-object-keybindings) - (menu :allocation :class - :initform ( [ "Debug target" ede-debug-target - (and ede-object - (obj-of-class-p ede-object ede-target)) ] - ) - [ "Run target" ede-run-target - (and ede-object - (obj-of-class-p ede-object ede-target)) ] - :documentation "Menu specialized to this type of target." - :accessor ede-object-menu) - ) - "A top level target to build.") - -(defclass ede-project-placeholder (eieio-speedbar-directory-button) - ((name :initarg :name - :initform "Untitled" - :type string - :custom string - :label "Name" - :group (default name) - :documentation "The name used when generating distribution files.") - (version :initarg :version - :initform "1.0" - :type string - :custom string - :label "Version" - :group (default name) - :documentation "The version number used when distributing files.") - (directory :type string - :initarg :directory - :documentation "Directory this project is associated with.") - (dirinode :documentation "The inode id for :directory.") - (file :type string - :initarg :file - :documentation "File name where this project is stored.") - (rootproject ; :initarg - no initarg, don't save this slot! - :initform nil - :type (or null ede-project-placeholder-child) - :documentation "Pointer to our root project.") - ) - "Placeholder object for projects not loaded into memory. -Projects placeholders will be stored in a user specific location -and querying them will cause the actual project to get loaded.") - -(defclass ede-project (ede-project-placeholder) - ((subproj :initform nil - :type list - :documentation "Sub projects controlled by this project. -For Automake based projects, each directory is treated as a project.") - (targets :initarg :targets - :type list - :custom (repeat (object :objectcreatefcn ede-new-target-custom)) - :label "Local Targets" - :group (targets) - :documentation "List of top level targets in this project.") - (locate-obj :type (or null ede-locate-base-child) - :documentation - "A locate object to use as a backup to `ede-expand-filename'.") - (tool-cache :initarg :tool-cache - :type list - :custom (repeat object) - :label "Tool: " - :group tools - :documentation "List of tool cache configurations in this project. -This allows any tool to create, manage, and persist project-specific settings.") - (mailinglist :initarg :mailinglist - :initform "" - :type string - :custom string - :label "Mailing List Address" - :group name - :documentation - "An email address where users might send email for help.") - (web-site-url :initarg :web-site-url - :initform "" - :type string - :custom string - :label "Web Site URL" - :group name - :documentation "URL to this projects web site. -This is a URL to be sent to a web site for documentation.") - (web-site-directory :initarg :web-site-directory - :initform "" - :custom string - :label "Web Page Directory" - :group name - :documentation - "A directory where web pages can be found by Emacs. -For remote locations use a path compatible with ange-ftp or EFS. -You can also use TRAMP for use with rcp & scp.") - (web-site-file :initarg :web-site-file - :initform "" - :custom string - :label "Web Page File" - :group name - :documentation - "A file which contains the home page for this project. -This file can be relative to slot `web-site-directory'. -This can be a local file, use ange-ftp, EFS, or TRAMP.") - (ftp-site :initarg :ftp-site - :initform "" - :type string - :custom string - :label "FTP site" - :group name - :documentation - "FTP site where this project's distribution can be found. -This FTP site should be in Emacs form, as needed by `ange-ftp', but can -also be of a form used by TRAMP for use with scp, or rcp.") - (ftp-upload-site :initarg :ftp-upload-site - :initform "" - :type string - :custom string - :label "FTP Upload site" - :group name - :documentation - "FTP Site to upload new distributions to. -This FTP site should be in Emacs form as needed by `ange-ftp'. -If this slot is nil, then use `ftp-site' instead.") - (configurations :initarg :configurations - :initform ("debug" "release") - :type list - :custom (repeat string) - :label "Configuration Options" - :group (settings) - :documentation "List of available configuration types. -Individual target/project types can form associations between a configuration, -and target specific elements such as build variables.") - (configuration-default :initarg :configuration-default - :initform "debug" - :custom string - :label "Current Configuration" - :group (settings) - :documentation "The default configuration.") - (local-variables :initarg :local-variables - :initform nil - :custom (repeat (cons (sexp :tag "Variable") - (sexp :tag "Value"))) - :label "Project Local Variables" - :group (settings) - :documentation "Project local variables") - (keybindings :allocation :class - :initform (("D" . ede-debug-target) - ("R" . ede-run-target)) - :documentation "Keybindings specialized to this type of target." - :accessor ede-object-keybindings) - (menu :allocation :class - :initform - ( - [ "Update Version" ede-update-version ede-object ] - [ "Version Control Status" ede-vc-project-directory ede-object ] - [ "Edit Project Homepage" ede-edit-web-page - (and ede-object (oref (ede-toplevel) web-site-file)) ] - [ "Browse Project URL" ede-web-browse-home - (and ede-object - (not (string= "" (oref (ede-toplevel) web-site-url)))) ] - "--" - [ "Rescan Project Files" ede-rescan-toplevel t ] - [ "Edit Projectfile" ede-edit-file-target - (and ede-object - (or (listp ede-object) - (not (obj-of-class-p ede-object ede-project)))) ] - ) - :documentation "Menu specialized to this type of target." - :accessor ede-object-menu) - ) - "Top level EDE project specification. -All specific project types must derive from this project." - :method-invocation-order :depth-first) ;;; Management variables @@ -431,109 +123,13 @@ This object's class determines how to compile and debug from a buffer.") If `ede-object' is nil, then commands will operate on this object.") (defvar ede-constructing nil - "Non nil when constructing a project hierarchy.") + "Non nil when constructing a project hierarchy. +If the project is being constructed from an autoload, then the +value is the autoload object being used.") (defvar ede-deep-rescan nil "Non nil means scan down a tree, otherwise rescans are top level only. Do not set this to non-nil globally. It is used internally.") - -;;; The EDE persistent cache. -;; -(defcustom ede-project-placeholder-cache-file - (locate-user-emacs-file "ede-projects.el" ".projects.ede") - "File containing the list of projects EDE has viewed." - :group 'ede - :type 'file) - -(defvar ede-project-cache-files nil - "List of project files EDE has seen before.") - -(defun ede-save-cache () - "Save a cache of EDE objects that Emacs has seen before." - (interactive) - (let ((p ede-projects) - (c ede-project-cache-files) - (recentf-exclude '(ignore)) - ) - (condition-case nil - (progn - (set-buffer (find-file-noselect ede-project-placeholder-cache-file t)) - (erase-buffer) - (insert ";; EDE project cache file. -;; This contains a list of projects you have visited.\n(") - (while p - (when (and (car p) (ede-project-p p)) - (let ((f (oref (car p) file))) - (when (file-exists-p f) - (insert "\n \"" f "\"")))) - (setq p (cdr p))) - (while c - (insert "\n \"" (car c) "\"") - (setq c (cdr c))) - (insert "\n)\n") - (condition-case nil - (save-buffer 0) - (error - (message "File %s could not be saved." - ede-project-placeholder-cache-file))) - (kill-buffer (current-buffer)) - ) - (error - (message "File %s could not be read." - ede-project-placeholder-cache-file)) - - ))) - -(defun ede-load-cache () - "Load the cache of EDE projects." - (save-excursion - (let ((cachebuffer nil)) - (condition-case nil - (progn - (setq cachebuffer - (find-file-noselect ede-project-placeholder-cache-file t)) - (set-buffer cachebuffer) - (goto-char (point-min)) - (let ((c (read (current-buffer))) - (new nil) - (p ede-projects)) - ;; Remove loaded projects from the cache. - (while p - (setq c (delete (oref (car p) file) c)) - (setq p (cdr p))) - ;; Remove projects that aren't on the filesystem - ;; anymore. - (while c - (when (file-exists-p (car c)) - (setq new (cons (car c) new))) - (setq c (cdr c))) - ;; Save it - (setq ede-project-cache-files (nreverse new)))) - (error nil)) - (when cachebuffer (kill-buffer cachebuffer)) - ))) - -;;; Important macros for doing commands. -;; -(defmacro ede-with-projectfile (obj &rest forms) - "For the project in which OBJ resides, execute FORMS." - (list 'save-window-excursion - (list 'let* (list - (list 'pf - (list 'if (list 'obj-of-class-p - obj 'ede-target) - ;; @todo -I think I can change - ;; this to not need ede-load-project-file - ;; but I'm not sure how to test well. - (list 'ede-load-project-file - (list 'oref obj 'path)) - obj)) - '(dbka (get-file-buffer (oref pf file)))) - '(if (not dbka) (find-file (oref pf file)) - (switch-to-buffer dbka)) - (cons 'progn forms) - '(if (not dbka) (kill-buffer (current-buffer)))))) -(put 'ede-with-projectfile 'lisp-indent-function 1) ;;; Prompting @@ -611,6 +207,18 @@ Argument LIST-O-O is the list of objects to choose from." :enable ede-object :visible global-ede-mode)) +(defun ede-buffer-belongs-to-target-p () + "Return non-nil if this buffer belongs to at least one target." + (let ((obj ede-object)) + (if (consp obj) + (setq obj (car obj))) + (and obj (obj-of-class-p obj ede-target)))) + +(defun ede-buffer-belongs-to-project-p () + "Return non-nil if this buffer belongs to at least one target." + (if (or (null ede-object) (consp ede-object)) nil + (obj-of-class-p ede-object ede-project))) + (defun ede-menu-obj-of-class-p (class) "Return non-nil if some member of `ede-object' is a child of CLASS." (if (listp ede-object) @@ -672,9 +280,7 @@ Argument MENU-DEF is the menu definition to use." (and (ede-current-project) (oref (ede-current-project) targets)) ] [ "Remove File" ede-remove-file - (and ede-object - (or (listp ede-object) - (not (obj-of-class-p ede-object ede-project)))) ] + (ede-buffer-belongs-to-project-p) ] "-") (if (not obj) nil @@ -718,7 +324,7 @@ Argument MENU-DEF is the definition of the current menu." (let* ((obj (ede-current-project)) targ) (when obj - (setq targ (when (slot-boundp obj 'targets) + (setq targ (when (and obj (slot-boundp obj 'targets)) (oref obj targets))) ;; Make custom menus for everything here. (append (list @@ -804,31 +410,49 @@ provided `global-ede-mode' is enabled." (eq major-mode 'vc-dired-mode)) (ede-dired-minor-mode (if ede-minor-mode 1 -1))) (ede-minor-mode - (if (and (not ede-constructing) - (ede-directory-project-p default-directory t)) - (let* ((ROOT nil) - (proj (ede-directory-get-open-project default-directory - 'ROOT))) - (when (not proj) - ;; @todo - this could be wasteful. - (setq proj (ede-load-project-file default-directory 'ROOT))) - (setq ede-object-project proj) - (setq ede-object-root-project - (or ROOT (ede-project-root proj))) - (setq ede-object (ede-buffer-object)) - (if (and (not ede-object) ede-object-project) - (ede-auto-add-to-target)) - (ede-apply-target-options)) + (if (not ede-constructing) + (ede-initialize-state-current-buffer) ;; If we fail to have a project here, turn it back off. (ede-minor-mode -1))))) +(defun ede-initialize-state-current-buffer () + "Initialize the current buffer's state for EDE. +Sets buffer local variables for EDE." + (let* ((ROOT nil) + (proj (ede-directory-get-open-project default-directory + 'ROOT))) + (when (or proj ROOT + (ede-directory-project-p default-directory t)) + + (when (not proj) + ;; @todo - this could be wasteful. + (setq proj (ede-load-project-file default-directory 'ROOT))) + + (setq ede-object (ede-buffer-object (current-buffer) + 'ede-object-project)) + + (setq ede-object-root-project + (or ROOT (ede-project-root ede-object-project))) + + (if (and (not ede-object) ede-object-project) + (ede-auto-add-to-target)) + + (ede-apply-target-options)))) + (defun ede-reset-all-buffers (onoff) "Reset all the buffers due to change in EDE. ONOFF indicates enabling or disabling the mode." (let ((b (buffer-list))) (while b (when (buffer-file-name (car b)) - (ede-buffer-object (car b)) + (with-current-buffer (car b) + ;; Reset all state variables + (setq ede-object nil + ede-object-project nil + ede-object-root-project nil) + ;; Now re-initialize this buffer. + (ede-initialize-state-current-buffer) + ) ) (setq b (cdr b))))) @@ -967,6 +591,7 @@ Optional argument NAME is the name to give this project." r) ) nil t))) + (require 'ede/custom) ;; Make sure we have a valid directory (when (not (file-exists-p default-directory)) (error "Cannot create project in non-existent directory %s" default-directory)) @@ -1014,20 +639,6 @@ Optional argument NAME is the name to give this project." "Add into PROJ-A, the subproject PROJ-B." (oset proj-a subproj (cons proj-b (oref proj-a subproj)))) -(defmethod ede-subproject-relative-path ((proj ede-project) &optional parent-in) - "Get a path name for PROJ which is relative to the parent project. -If PARENT is specified, then be relative to the PARENT project. -Specifying PARENT is useful for sub-sub projects relative to the root project." - (let* ((parent (or parent-in (ede-parent-project proj))) - (dir (file-name-directory (oref proj file)))) - (if (and parent (not (eq parent proj))) - (file-relative-name dir (file-name-directory (oref parent file))) - ""))) - -(defmethod ede-subproject-p ((proj ede-project)) - "Return non-nil if PROJ is a sub project." - (ede-parent-project proj)) - (defun ede-invoke-method (sym &rest args) "Invoke method SYM on the current buffer's project object. ARGS are additional arguments to pass to method sym." @@ -1162,175 +773,9 @@ Optional argument FORCE forces the file to be removed without asking." (defun ede-make-dist () "Create a distribution from the current project." (interactive) - (let ((ede-object (ede-current-project))) + (let ((ede-object (ede-toplevel))) (ede-invoke-method 'project-make-dist))) -;;; Customization -;; -;; Routines for customizing projects and targets. - -(defvar eieio-ede-old-variables nil - "The old variables for a project.") - -(defalias 'customize-project 'ede-customize-project) -(defun ede-customize-project (&optional group) - "Edit fields of the current project through EIEIO & Custom. -Optional GROUP specifies the subgroup of slots to customize." - (interactive "P") - (require 'eieio-custom) - (let* ((ov (oref (ede-current-project) local-variables)) - (cp (ede-current-project)) - (group (if group (eieio-read-customization-group cp)))) - (eieio-customize-object cp group) - (make-local-variable 'eieio-ede-old-variables) - (setq eieio-ede-old-variables ov))) - -(defalias 'customize-target 'ede-customize-current-target) -(defun ede-customize-current-target(&optional group) - "Edit fields of the current target through EIEIO & Custom. -Optional argument OBJ is the target object to customize. -Optional argument GROUP is the slot group to display." - (interactive "P") - (require 'eieio-custom) - (if (not (obj-of-class-p ede-object ede-target)) - (error "Current file is not part of a target")) - (let ((group (if group (eieio-read-customization-group ede-object)))) - (ede-customize-target ede-object group))) - -(defun ede-customize-target (obj group) - "Edit fields of the current target through EIEIO & Custom. -Optional argument OBJ is the target object to customize. -Optional argument GROUP is the slot group to display." - (require 'eieio-custom) - (if (and obj (not (obj-of-class-p obj ede-target))) - (error "No logical target to customize")) - (eieio-customize-object obj (or group 'default))) -;;; Target Sorting -;; -;; Target order can be important, but custom doesn't support a way -;; to resort items in a list. This function by David Engster allows -;; targets to be re-arranged. - -(defvar ede-project-sort-targets-order nil - "Variable for tracking target order in `ede-project-sort-targets'.") - -(defun ede-project-sort-targets () - "Create a custom-like buffer for sorting targets of current project." - (interactive) - (let ((proj (ede-current-project)) - (count 1) - current order) - (switch-to-buffer (get-buffer-create "*EDE sort targets*")) - (erase-buffer) - (setq ede-object-project proj) - (widget-create 'push-button - :notify (lambda (&rest ignore) - (let ((targets (oref ede-object-project targets)) - cur newtargets) - (while (setq cur (pop ede-project-sort-targets-order)) - (setq newtargets (append newtargets - (list (nth cur targets))))) - (oset ede-object-project targets newtargets)) - (ede-commit-project ede-object-project) - (kill-buffer)) - " Accept ") - (widget-insert " ") - (widget-create 'push-button - :notify (lambda (&rest ignore) - (kill-buffer)) - " Cancel ") - (widget-insert "\n\n") - (setq ede-project-sort-targets-order nil) - (mapc (lambda (x) - (add-to-ordered-list - 'ede-project-sort-targets-order - x x)) - (number-sequence 0 (1- (length (oref proj targets))))) - (ede-project-sort-targets-list) - (use-local-map widget-keymap) - (widget-setup) - (goto-char (point-min)))) - -(defun ede-project-sort-targets-list () - "Sort the target list while using `ede-project-sort-targets'." - (save-excursion - (let ((count 0) - (targets (oref ede-object-project targets)) - (inhibit-read-only t) - (inhibit-modification-hooks t)) - (goto-char (point-min)) - (forward-line 2) - (delete-region (point) (point-max)) - (while (< count (length targets)) - (if (> count 0) - (widget-create 'push-button - :notify `(lambda (&rest ignore) - (let ((cur ede-project-sort-targets-order)) - (add-to-ordered-list - 'ede-project-sort-targets-order - (nth ,count cur) - (1- ,count)) - (add-to-ordered-list - 'ede-project-sort-targets-order - (nth (1- ,count) cur) ,count)) - (ede-project-sort-targets-list)) - " Up ") - (widget-insert " ")) - (if (< count (1- (length targets))) - (widget-create 'push-button - :notify `(lambda (&rest ignore) - (let ((cur ede-project-sort-targets-order)) - (add-to-ordered-list - 'ede-project-sort-targets-order - (nth ,count cur) (1+ ,count)) - (add-to-ordered-list - 'ede-project-sort-targets-order - (nth (1+ ,count) cur) ,count)) - (ede-project-sort-targets-list)) - " Down ") - (widget-insert " ")) - (widget-insert (concat " " (number-to-string (1+ count)) ".: " - (oref (nth (nth count ede-project-sort-targets-order) - targets) name) "\n")) - (setq count (1+ count)))))) - -;;; Customization hooks -;; -;; These hooks are used when finishing up a customization. -(defmethod eieio-done-customizing ((proj ede-project)) - "Call this when a user finishes customizing PROJ." - (let ((ov eieio-ede-old-variables) - (nv (oref proj local-variables))) - (setq eieio-ede-old-variables nil) - (while ov - (if (not (assoc (car (car ov)) nv)) - (save-excursion - (mapc (lambda (b) - (set-buffer b) - (kill-local-variable (car (car ov)))) - (ede-project-buffers proj)))) - (setq ov (cdr ov))) - (mapc (lambda (b) (ede-set-project-variables proj b)) - (ede-project-buffers proj)))) - -(defmethod eieio-done-customizing ((target ede-target)) - "Call this when a user finishes customizing TARGET." - nil) - -(defmethod ede-commit-project ((proj ede-project)) - "Commit any change to PROJ to its file." - nil - ) - - -;;; EDE project placeholder methods -;; -(defmethod ede-project-force-load ((this ede-project-placeholder)) - "Make sure the placeholder THIS is replaced with the real thing. -Return the new object created in its place." - this - ) - ;;; EDE project target baseline methods. ;; @@ -1343,9 +788,9 @@ Return the new object created in its place." ;; methods based on those below. (defmethod project-interactive-select-target ((this ede-project-placeholder) prompt) - ; checkdoc-params: (prompt) + ; checkdoc-params: (prompt) "Make sure placeholder THIS is replaced with the real thing, and pass through." - (project-interactive-select-target (ede-project-force-load this) prompt)) + (project-interactive-select-target this prompt)) (defmethod project-interactive-select-target ((this ede-project) prompt) "Interactively query for a target that exists in project THIS. @@ -1354,9 +799,9 @@ Argument PROMPT is the prompt to use when querying the user for a target." (cdr (assoc (completing-read prompt ob nil t) ob)))) (defmethod project-add-file ((this ede-project-placeholder) file) - ; checkdoc-params: (file) + ; checkdoc-params: (file) "Make sure placeholder THIS is replaced with the real thing, and pass through." - (project-add-file (ede-project-force-load this) file)) + (project-add-file this file)) (defmethod project-add-file ((ot ede-target) file) "Add the current buffer into project project target OT. @@ -1413,132 +858,6 @@ Argument COMMAND is the command to use for compiling the target." (defmethod project-rescan ((this ede-project)) "Rescan the EDE proj project THIS." (error "Rescanning a project is not supported by %s" (object-name this))) - -;;; Default methods for EDE classes -;; -;; These are methods which you might want to override, but there is -;; no need to in most situations because they are either a) simple, or -;; b) cosmetic. - -(defmethod ede-name ((this ede-target)) - "Return the name of THIS target." - (oref this name)) - -(defmethod ede-target-name ((this ede-target)) - "Return the name of THIS target, suitable for make or debug style commands." - (oref this name)) - -(defmethod ede-name ((this ede-project)) - "Return a short-name for THIS project file. -Do this by extracting the lowest directory name." - (oref this name)) - -(defmethod ede-description ((this ede-project)) - "Return a description suitable for the minibuffer about THIS." - (format "Project %s: %d subprojects, %d targets." - (ede-name this) (length (oref this subproj)) - (length (oref this targets)))) - -(defmethod ede-description ((this ede-target)) - "Return a description suitable for the minibuffer about THIS." - (format "Target %s: with %d source files." - (ede-name this) (length (oref this source)))) - -(defmethod ede-want-file-p ((this ede-target) file) - "Return non-nil if THIS target wants FILE." - ;; By default, all targets reference the source object, and let it decide. - (let ((src (ede-target-sourcecode this))) - (while (and src (not (ede-want-file-p (car src) file))) - (setq src (cdr src))) - src)) - -(defmethod ede-want-file-source-p ((this ede-target) file) - "Return non-nil if THIS target wants FILE." - ;; By default, all targets reference the source object, and let it decide. - (let ((src (ede-target-sourcecode this))) - (while (and src (not (ede-want-file-source-p (car src) file))) - (setq src (cdr src))) - src)) - -(defun ede-header-file () - "Return the header file for the current buffer. -Not all buffers need headers, so return nil if no applicable." - (if ede-object - (ede-buffer-header-file ede-object (current-buffer)) - nil)) - -(defmethod ede-buffer-header-file ((this ede-project) buffer) - "Return nil, projects don't have header files." - nil) - -(defmethod ede-buffer-header-file ((this ede-target) buffer) - "There are no default header files in EDE. -Do a quick check to see if there is a Header tag in this buffer." - (with-current-buffer buffer - (if (re-search-forward "::Header:: \\([a-zA-Z0-9.]+\\)" nil t) - (buffer-substring-no-properties (match-beginning 1) - (match-end 1)) - (let ((src (ede-target-sourcecode this)) - (found nil)) - (while (and src (not found)) - (setq found (ede-buffer-header-file (car src) (buffer-file-name)) - src (cdr src))) - found)))) - -(defun ede-documentation-files () - "Return the documentation files for the current buffer. -Not all buffers need documentations, so return nil if no applicable. -Some projects may have multiple documentation files, so return a list." - (if ede-object - (ede-buffer-documentation-files ede-object (current-buffer)) - nil)) - -(defmethod ede-buffer-documentation-files ((this ede-project) buffer) - "Return all documentation in project THIS based on BUFFER." - ;; Find the info node. - (ede-documentation this)) - -(defmethod ede-buffer-documentation-files ((this ede-target) buffer) - "Check for some documentation files for THIS. -Also do a quick check to see if there is a Documentation tag in this BUFFER." - (with-current-buffer buffer - (if (re-search-forward "::Documentation:: \\([a-zA-Z0-9.]+\\)" nil t) - (buffer-substring-no-properties (match-beginning 1) - (match-end 1)) - ;; Check the master project - (let ((cp (ede-toplevel))) - (ede-buffer-documentation-files cp (current-buffer)))))) - -(defmethod ede-documentation ((this ede-project)) - "Return a list of files that provide documentation. -Documentation is not for object THIS, but is provided by THIS for other -files in the project." - (let ((targ (oref this targets)) - (proj (oref this subproj)) - (found nil)) - (while targ - (setq found (append (ede-documentation (car targ)) found) - targ (cdr targ))) - (while proj - (setq found (append (ede-documentation (car proj)) found) - proj (cdr proj))) - found)) - -(defmethod ede-documentation ((this ede-target)) - "Return a list of files that provide documentation. -Documentation is not for object THIS, but is provided by THIS for other -files in the project." - nil) - -(defun ede-html-documentation-files () - "Return a list of HTML documentation files associated with this project." - (ede-html-documentation (ede-toplevel)) - ) - -(defmethod ede-html-documentation ((this ede-project)) - "Return a list of HTML files provided by project THIS." - - ) (defun ede-ecb-project-paths () "Return a list of all paths for all active EDE projects. @@ -1550,24 +869,8 @@ This functions is meant for use with ECB." d) p (cdr p))) d)) - -;;; EDE project-autoload methods -;; -(defmethod ede-dir-to-projectfile ((this ede-project-autoload) dir) - "Return a full file name of project THIS found in DIR. -Return nil if the project file does not exist." - (let* ((d (file-name-as-directory dir)) - (root (ede-project-root-directory this d)) - (pf (oref this proj-file)) - (f (cond ((stringp pf) - (expand-file-name pf (or root d))) - ((and (symbolp pf) (fboundp pf)) - (funcall pf (or root d))))) - ) - (when (and f (file-exists-p f)) - f))) -;;; EDE basic functions +;;; PROJECT LOADING/TRACKING ;; (defun ede-add-project-to-global-list (proj) "Add the project PROJ to the master list of projects. @@ -1603,7 +906,7 @@ Optional ROOTRETURN will return the root project for DIR." (if p (ede-load-project-file p) nil) ;; recomment as we go - ;nil + ;;nil )) ;; Do nothing if we are buiding an EDE project already (ede-constructing @@ -1612,7 +915,7 @@ Optional ROOTRETURN will return the root project for DIR." (t (setq toppath (ede-toplevel-project path)) ;; We found the top-most directory. Check to see if we already - ;; have an object defining it's project. + ;; have an object defining its project. (setq pfc (ede-directory-project-p toppath t)) ;; See if it's been loaded before @@ -1620,7 +923,7 @@ Optional ROOTRETURN will return the root project for DIR." ede-projects)) (if (not o) ;; If not, get it now. - (let ((ede-constructing t)) + (let ((ede-constructing pfc)) (setq o (funcall (oref pfc load-type) toppath)) (when (not o) (error "Project type error: :load-type failed to create a project")) @@ -1649,9 +952,14 @@ Optional ROOTRETURN will return the root project for DIR." (delete (oref found file) ede-project-cache-files))) found))))) +;;; PROJECT ASSOCIATIONS +;; +;; Moving between relative projects. Associating between buffers and +;; projects. + (defun ede-parent-project (&optional obj) "Return the project belonging to the parent directory. -Returns nil if there is no previous directory. +Return nil if there is no previous directory. Optional argument OBJ is an object to find the parent of." (let* ((proj (or obj ede-object-project)) ;; Current project. (root (if obj (ede-project-root obj) @@ -1701,17 +1009,38 @@ If optional DIR is provided, get the project for DIR instead." ;; Return what we found. ans)) -(defun ede-buffer-object (&optional buffer) +(defun ede-buffer-object (&optional buffer projsym) "Return the target object for BUFFER. -This function clears cached values and recalculates." +This function clears cached values and recalculates. +Optional PROJSYM is a symbol, which will be set to the project +that contains the target that becomes buffer's object." (save-excursion (if (not buffer) (setq buffer (current-buffer))) (set-buffer buffer) (setq ede-object nil) - (let ((po (ede-current-project))) - (if po (setq ede-object (ede-find-target po buffer)))) - (if (= (length ede-object) 1) - (setq ede-object (car ede-object))) + (let* ((localpo (ede-current-project)) + (po localpo) + (top (ede-toplevel po))) + (if po (setq ede-object (ede-find-target po buffer))) + ;; If we get nothing, go with the backup plan of slowly + ;; looping upward + (while (and (not ede-object) (not (eq po top))) + (setq po (ede-parent-project po)) + (if po (setq ede-object (ede-find-target po buffer)))) + ;; Filter down to 1 project if there are dups. + (if (= (length ede-object) 1) + (setq ede-object (car ede-object))) + ;; Track the project, if needed. + (when (and projsym (symbolp projsym)) + (if ede-object + ;; If we found a target, then PO is the + ;; project to use. + (set projsym po) + ;; If there is no ede-object, then the projsym + ;; is whichever part of the project is most local. + (set projsym localpo)) + )) + ;; Return our findings. ede-object)) (defmethod ede-target-in-project-p ((proj ede-project) target) @@ -1738,14 +1067,6 @@ could become slow in time." projs (cdr projs))) ans)) -(defun ede-maybe-checkout (&optional buffer) - "Check BUFFER out of VC if necessary." - (save-excursion - (if buffer (set-buffer buffer)) - (if (and buffer-read-only vc-mode - (y-or-n-p "Checkout Makefile.am from VC? ")) - (vc-toggle-read-only)))) - (defmethod ede-find-target ((proj ede-project) buffer) "Fetch the target in PROJ belonging to BUFFER or nil." (with-current-buffer buffer @@ -1786,7 +1107,7 @@ This includes buffers controlled by a specific target of PROJECT." (pl nil)) (while bl (with-current-buffer (car bl) - (if (and ede-object (eq (ede-current-project) project)) + (if (ede-buffer-belongs-to-project-p) (setq pl (cons (car bl) pl)))) (setq bl (cdr bl))) pl)) @@ -1857,6 +1178,16 @@ See also `ede-map-subprojects'." Return the first non-nil value returned by PROC." (eval (cons 'or (ede-map-targets this proc)))) +;;; VC Handling +;; +(defun ede-maybe-checkout (&optional buffer) + "Check BUFFER out of VC if necessary." + (save-excursion + (if buffer (set-buffer buffer)) + (if (and buffer-read-only vc-mode + (y-or-n-p "Checkout Makefile.am from VC? ")) + (vc-toggle-read-only)))) + ;;; Some language specific methods. ;; @@ -1913,7 +1244,7 @@ Return the first non-nil value returned by PROC." (with-current-buffer buffer (dolist (v (oref project local-variables)) (make-local-variable (car v)) - ;; set it's value here? + ;; set its value here? (set (car v) (cdr v))))) (defun ede-set (variable value &optional proj) @@ -1936,60 +1267,6 @@ is the project to use, instead of `ede-current-project'." "Commit change to local variables in PROJ." nil) - -;;; Accessors for more complex types where oref is inappropriate. -;; -(defmethod ede-target-sourcecode ((this ede-target)) - "Return the sourcecode objects which THIS permits." - (let ((sc (oref this sourcetype)) - (rs nil)) - (while (and (listp sc) sc) - (setq rs (cons (symbol-value (car sc)) rs) - sc (cdr sc))) - rs)) - - -;;; Debugging. - -(defun ede-adebug-project () - "Run adebug against the current EDE project. -Display the results as a debug list." - (interactive) - (require 'data-debug) - (when (ede-current-project) - (data-debug-new-buffer "*Analyzer ADEBUG*") - (data-debug-insert-object-slots (ede-current-project) "") - )) - -(defun ede-adebug-project-parent () - "Run adebug against the current EDE parent project. -Display the results as a debug list." - (interactive) - (require 'data-debug) - (when (ede-parent-project) - (data-debug-new-buffer "*Analyzer ADEBUG*") - (data-debug-insert-object-slots (ede-parent-project) "") - )) - -(defun ede-adebug-project-root () - "Run adebug against the current EDE parent project. -Display the results as a debug list." - (interactive) - (require 'data-debug) - (when (ede-toplevel) - (data-debug-new-buffer "*Analyzer ADEBUG*") - (data-debug-insert-object-slots (ede-toplevel) "") - )) - -;;; Hooks & Autoloads -;; -;; These let us watch various activities, and respond appropriately. - -;; (add-hook 'edebug-setup-hook -;; (lambda () -;; (def-edebug-spec ede-with-projectfile -;; (form def-body)))) - (provide 'ede) ;; Include this last because it depends on ede. diff --git a/lisp/cedet/ede/auto.el b/lisp/cedet/ede/auto.el new file mode 100644 index 00000000000..52e0e3c3cf3 --- /dev/null +++ b/lisp/cedet/ede/auto.el @@ -0,0 +1,128 @@ +;;; ede/auto.el --- Autoload features for EDE + +;; Copyright (C) 2010 Free Software Foundation, Inc. + +;; Author: Eric M. Ludlam + +;; 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: +;; +;; EDE Autoloads are a way to refer to different project types without +;; loading those projects into Emacs. +;; +;; These routines are used to detect a project in a filesystem before +;; handing over control to the usual EDE project system. + +;;; Code: + +(require 'eieio) + +(defclass ede-project-autoload () + ((name :initarg :name + :documentation "Name of this project type") + (file :initarg :file + :documentation "The lisp file belonging to this class.") + (proj-file :initarg :proj-file + :documentation "Name of a project file of this type.") + (proj-root :initarg :proj-root + :type function + :documentation "A function symbol to call for the project root. +This function takes no arguments, and returns the current directories +root, if available. Leave blank to use the EDE directory walking +routine instead.") + (initializers :initarg :initializers + :initform nil + :documentation + "Initializers passed to the project object. +These are used so there can be multiple types of projects +associated with a single object class, based on the initilizeres used.") + (load-type :initarg :load-type + :documentation "Fn symbol used to load this project file.") + (class-sym :initarg :class-sym + :documentation "Symbol representing the project class to use.") + (new-p :initarg :new-p + :initform t + :documentation + "Non-nil if this is an option when a user creates a project.") + ) + "Class representing minimal knowledge set to run preliminary EDE functions. +When more advanced functionality is needed from a project type, that projects +type is required and the load function used.") + +(defvar ede-project-class-files + (list + (ede-project-autoload "edeproject-makefile" + :name "Make" :file 'ede/proj + :proj-file "Project.ede" + :load-type 'ede-proj-load + :class-sym 'ede-proj-project) + (ede-project-autoload "edeproject-automake" + :name "Automake" :file 'ede/proj + :proj-file "Project.ede" + :initializers '(:makefile-type Makefile.am) + :load-type 'ede-proj-load + :class-sym 'ede-proj-project) + (ede-project-autoload "automake" + :name "automake" :file 'ede/project-am + :proj-file "Makefile.am" + :load-type 'project-am-load + :class-sym 'project-am-makefile + :new-p nil)) + "List of vectors defining how to determine what type of projects exist.") + +;;; EDE project-autoload methods +;; +(defmethod ede-project-root ((this ede-project-autoload)) + "If a project knows its root, return it here. +Allows for one-project-object-for-a-tree type systems." + nil) + +(defmethod ede-project-root-directory ((this ede-project-autoload) + &optional file) + "If a project knows its root, return it here. +Allows for one-project-object-for-a-tree type systems. +Optional FILE is the file to test. If there is no FILE, use +the current buffer." + (when (not file) + (setq file default-directory)) + (when (slot-boundp this :proj-root) + (let ((rootfcn (oref this proj-root))) + (when rootfcn + (condition-case nil + (funcall rootfcn file) + (error + (funcall rootfcn))) + )))) + +(defmethod ede-dir-to-projectfile ((this ede-project-autoload) dir) + "Return a full file name of project THIS found in DIR. +Return nil if the project file does not exist." + (let* ((d (file-name-as-directory dir)) + (root (ede-project-root-directory this d)) + (pf (oref this proj-file)) + (f (cond ((stringp pf) + (expand-file-name pf (or root d))) + ((and (symbolp pf) (fboundp pf)) + (funcall pf (or root d))))) + ) + (when (and f (file-exists-p f)) + f))) + + +(provide 'ede/auto) + +;;; ede/auto.el ends here diff --git a/lisp/cedet/ede/autoconf-edit.el b/lisp/cedet/ede/autoconf-edit.el index 3973fc7f6af..df976bf17af 100644 --- a/lisp/cedet/ede/autoconf-edit.el +++ b/lisp/cedet/ede/autoconf-edit.el @@ -27,20 +27,8 @@ ;;; Code: (require 'autoconf) - -(defvar autoconf-new-automake-string - "dnl Process this file with autoconf to produce a configure script - -AC_INIT(%s) -AM_INIT_AUTOMAKE([%s], 0) -AM_CONFIG_HEADER(config.h) - -dnl End the configure script. -AC_OUTPUT(Makefile, [date > stamp-h] )\n" - "This string is used to initialize a new configure.in. -The default is designed to be used with automake. -The first %s will be filled with the test file. -The second %s will be filled with the program name.") +(declare-function ede-srecode-setup "ede/srecode") +(declare-function ede-srecode-insert "ede/srecode") (defun autoconf-new-program (rootdir program testfile) "Initialize a new configure.in in ROOTDIR for PROGRAM using TESTFILE. @@ -49,6 +37,7 @@ PROGRAM is the program to be configured. TESTFILE is the file used with AC_INIT. configure the initial configure script using `autoconf-new-automake-string'" (interactive "DRoot Dir: \nsProgram: \nsTest File: ") + (require 'ede/srecode) (if (bufferp rootdir) (set-buffer rootdir) (let ((cf1 (expand-file-name "configure.in" rootdir)) @@ -62,7 +51,12 @@ configure the initial configure script using `autoconf-new-automake-string'" (find-file cf2))) ;; Note, we only ask about overwrite if a string/path is specified. (erase-buffer) - (insert (format autoconf-new-automake-string testfile program))) + (ede-srecode-setup) + (ede-srecode-insert + "file:ede-empty" + "TEST_FILE" testfile + "PROGRAM" program) + ) (defvar autoconf-preferred-macro-order '("AC_INIT" @@ -151,42 +145,44 @@ From the autoconf manual: (beginning-of-line) (looking-at (concat "\\(A[CM]_" macro "\\|" macro "\\)")))) -(defun autoconf-find-last-macro (macro) +(defun autoconf-find-last-macro (macro &optional ignore-bol) "Move to the last occurrence of MACRO in FILE, and return that point. The last macro is usually the one in which we would like to insert more items such as CHECK_HEADERS." - (let ((op (point))) + (let ((op (point)) (atbol (if ignore-bol "" "^"))) (goto-char (point-max)) - (if (re-search-backward (concat "^" (regexp-quote macro) "\\s-*\\((\\|$\\)") nil t) + (if (re-search-backward (concat atbol (regexp-quote macro) "\\s-*\\((\\|$\\)") nil t) (progn - (beginning-of-line) + (unless ignore-bol (beginning-of-line)) (point)) (goto-char op) nil))) (defun autoconf-parameter-strip (param) "Strip the parameter PARAM of whitespace and miscellaneous characters." - (when (string-match "^\\s-*\\[?\\s-*" param) + ;; force greedy match for \n. + (when (string-match "\\`\n*\\s-*\\[?\\s-*" param) (setq param (substring param (match-end 0)))) - (when (string-match "\\s-*\\]?\\s-*$" param) + (when (string-match "\\s-*\\]?\\s-*\\'" param) (setq param (substring param 0 (match-beginning 0)))) param) -(defun autoconf-parameters-for-macro (macro) +(defun autoconf-parameters-for-macro (macro &optional ignore-bol ignore-case) "Retrieve the parameters to MACRO. Returns a list of the arguments passed into MACRO as strings." - (save-excursion - (when (autoconf-find-last-macro macro) - (forward-sexp 1) - (mapcar - #'autoconf-parameter-strip - (when (looking-at "(") - (let* ((start (+ (point) 1)) - (end (save-excursion - (forward-sexp 1) - (- (point) 1))) - (ans (buffer-substring-no-properties start end))) - (split-string ans "," t))))))) + (let ((case-fold-search ignore-case)) + (save-excursion + (when (autoconf-find-last-macro macro ignore-bol) + (forward-sexp 1) + (mapcar + #'autoconf-parameter-strip + (when (looking-at "(") + (let* ((start (+ (point) 1)) + (end (save-excursion + (forward-sexp 1) + (- (point) 1))) + (ans (buffer-substring-no-properties start end))) + (split-string ans "," t)))))))) (defun autoconf-position-for-macro (macro) "Position the cursor where a new MACRO could be inserted. diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el new file mode 100644 index 00000000000..c2bfe1872a2 --- /dev/null +++ b/lisp/cedet/ede/base.el @@ -0,0 +1,636 @@ +;;; ede/base.el --- Baseclasses for EDE. + +;; Copyright (C) 2010 Free Software Foundation, Inc. + +;; Author: Eric M. Ludlam + +;; 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: +;; +;; Baseclasses for EDE. +;; +;; Contains all the base structures needed by EDE. + +;;; Code: +(require 'eieio) +(require 'eieio-speedbar) +(require 'ede/auto) + +;; Defined in ede.el: +(defvar ede-projects) +(defvar ede-object) +(defvar ede-object-root-project) + +(declare-function data-debug-new-buffer "data-debug") +(declare-function data-debug-insert-object-slots "eieio-datadebug") +(declare-function ede-parent-project "ede" (&optional obj)) +(declare-function ede-current-project "ede" (&optional dir)) + +;;; TARGET +;; +;; The TARGET is an entity in a project that knows about files +;; and features of those files. + +(defclass ede-target (eieio-speedbar-directory-button) + ((buttonface :initform speedbar-file-face) ;override for superclass + (name :initarg :name + :type string + :custom string + :label "Name" + :group (default name) + :documentation "Name of this target.") + ;; @todo - I think this should be "dir", and not "path". + (path :initarg :path + :type string + ;:custom string + ;:label "Path to target" + ;:group (default name) + :documentation "The path to the sources of this target. +Relative to the path of the project it belongs to.") + (source :initarg :source + :initform nil + ;; I'd prefer a list of strings. + :type list + :custom (repeat (string :tag "File")) + :label "Source Files" + :group (default source) + :documentation "Source files in this target.") + (versionsource :initarg :versionsource + :initform nil + :type list + :custom (repeat (string :tag "File")) + :label "Source Files with Version String" + :group (source) + :documentation + "Source files with a version string in them. +These files are checked for a version string whenever the EDE version +of the master project is changed. When strings are found, the version +previously there is updated.") + ;; Class level slots + ;; + (sourcetype :allocation :class + :type list ;; list of symbols + :documentation + "A list of `ede-sourcecode' objects this class will handle. +This is used to match target objects with the compilers they can use, and +which files this object is interested in." + :accessor ede-object-sourcecode) + (keybindings :allocation :class + :initform (("D" . ede-debug-target)) + :documentation +"Keybindings specialized to this type of target." + :accessor ede-object-keybindings) + (menu :allocation :class + :initform ( [ "Debug target" ede-debug-target + (ede-buffer-belongs-to-target-p) ] + [ "Run target" ede-run-target + (ede-buffer-belongs-to-target-p) ] + ) + :documentation "Menu specialized to this type of target." + :accessor ede-object-menu) + ) + "A target is a structure that describes a file set that produces something. +Targets, as with 'Make', is an entity that will manage a file set +and knows how to compile or otherwise transform those files into some +other desired outcome.") + +;;; PROJECT/PLACEHOLDER +;; +;; Project placeholders are minimum parts of a project used +;; by the project cache. The project cache can refer to these placeholders, +;; and swap them out with the real-deal when that project is loaded. +;; +(defclass ede-project-placeholder (eieio-speedbar-directory-button) + ((name :initarg :name + :initform "Untitled" + :type string + :custom string + :label "Name" + :group (default name) + :documentation "The name used when generating distribution files.") + (version :initarg :version + :initform "1.0" + :type string + :custom string + :label "Version" + :group (default name) + :documentation "The version number used when distributing files.") + (directory :type string + :initarg :directory + :documentation "Directory this project is associated with.") + (dirinode :documentation "The inode id for :directory.") + (file :type string + :initarg :file + :documentation "File name where this project is stored.") + (rootproject ; :initarg - no initarg, don't save this slot! + :initform nil + :type (or null ede-project-placeholder-child) + :documentation "Pointer to our root project.") + ) + "Placeholder object for projects not loaded into memory. +Projects placeholders will be stored in a user specific location +and querying them will cause the actual project to get loaded.") + +;;; PROJECT +;; +;; An EDE project controls a set of TARGETS, and can also contain +;; multiple SUBPROJECTS. +;; +;; The project defines a set of features that need to be built from +;; files, in addition as to controlling what to do with the file set, +;; such as creating distributions, compilation, and web sites. +;; +;; Projects can also affect how EDE works, by changing what appears in +;; the EDE menu, or how some keys are bound. +;; +(defclass ede-project (ede-project-placeholder) + ((subproj :initform nil + :type list + :documentation "Sub projects controlled by this project. +For Automake based projects, each directory is treated as a project.") + (targets :initarg :targets + :type list + :custom (repeat (object :objectcreatefcn ede-new-target-custom)) + :label "Local Targets" + :group (targets) + :documentation "List of top level targets in this project.") + (locate-obj :type (or null ede-locate-base-child) + :documentation + "A locate object to use as a backup to `ede-expand-filename'.") + (tool-cache :initarg :tool-cache + :type list + :custom (repeat object) + :label "Tool: " + :group tools + :documentation "List of tool cache configurations in this project. +This allows any tool to create, manage, and persist project-specific settings.") + (mailinglist :initarg :mailinglist + :initform "" + :type string + :custom string + :label "Mailing List Address" + :group name + :documentation + "An email address where users might send email for help.") + (web-site-url :initarg :web-site-url + :initform "" + :type string + :custom string + :label "Web Site URL" + :group name + :documentation "URL to this projects web site. +This is a URL to be sent to a web site for documentation.") + (web-site-directory :initarg :web-site-directory + :initform "" + :custom string + :label "Web Page Directory" + :group name + :documentation + "A directory where web pages can be found by Emacs. +For remote locations use a path compatible with ange-ftp or EFS. +You can also use TRAMP for use with rcp & scp.") + (web-site-file :initarg :web-site-file + :initform "" + :custom string + :label "Web Page File" + :group name + :documentation + "A file which contains the home page for this project. +This file can be relative to slot `web-site-directory'. +This can be a local file, use ange-ftp, EFS, or TRAMP.") + (ftp-site :initarg :ftp-site + :initform "" + :type string + :custom string + :label "FTP site" + :group name + :documentation + "FTP site where this project's distribution can be found. +This FTP site should be in Emacs form, as needed by `ange-ftp', but can +also be of a form used by TRAMP for use with scp, or rcp.") + (ftp-upload-site :initarg :ftp-upload-site + :initform "" + :type string + :custom string + :label "FTP Upload site" + :group name + :documentation + "FTP Site to upload new distributions to. +This FTP site should be in Emacs form as needed by `ange-ftp'. +If this slot is nil, then use `ftp-site' instead.") + (configurations :initarg :configurations + :initform ("debug" "release") + :type list + :custom (repeat string) + :label "Configuration Options" + :group (settings) + :documentation "List of available configuration types. +Individual target/project types can form associations between a configuration, +and target specific elements such as build variables.") + (configuration-default :initarg :configuration-default + :initform "debug" + :custom string + :label "Current Configuration" + :group (settings) + :documentation "The default configuration.") + (local-variables :initarg :local-variables + :initform nil + :custom (repeat (cons (sexp :tag "Variable") + (sexp :tag "Value"))) + :label "Project Local Variables" + :group (settings) + :documentation "Project local variables") + (keybindings :allocation :class + :initform (("D" . ede-debug-target) + ("R" . ede-run-target)) + :documentation "Keybindings specialized to this type of target." + :accessor ede-object-keybindings) + (menu :allocation :class + :initform + ( + [ "Update Version" ede-update-version ede-object ] + [ "Version Control Status" ede-vc-project-directory ede-object ] + [ "Edit Project Homepage" ede-edit-web-page + (and ede-object (oref (ede-toplevel) web-site-file)) ] + [ "Browse Project URL" ede-web-browse-home + (and ede-object + (not (string= "" (oref (ede-toplevel) web-site-url)))) ] + "--" + [ "Rescan Project Files" ede-rescan-toplevel t ] + [ "Edit Projectfile" ede-edit-file-target + (ede-buffer-belongs-to-project-p) ] + ) + :documentation "Menu specialized to this type of target." + :accessor ede-object-menu) + ) + "Top level EDE project specification. +All specific project types must derive from this project." + :method-invocation-order :depth-first) + +;;; Important macros for doing commands. +;; +(defmacro ede-with-projectfile (obj &rest forms) + "For the project in which OBJ resides, execute FORMS." + (list 'save-window-excursion + (list 'let* (list + (list 'pf + (list 'if (list 'obj-of-class-p + obj 'ede-target) + ;; @todo -I think I can change + ;; this to not need ede-load-project-file + ;; but I'm not sure how to test well. + (list 'ede-load-project-file + (list 'oref obj 'path)) + obj)) + '(dbka (get-file-buffer (oref pf file)))) + '(if (not dbka) (find-file (oref pf file)) + (switch-to-buffer dbka)) + (cons 'progn forms) + '(if (not dbka) (kill-buffer (current-buffer)))))) +(put 'ede-with-projectfile 'lisp-indent-function 1) + +;;; The EDE persistent cache. +;; +;; The cache is a way to mark where all known projects live without +;; loading those projects into memory, or scanning for them each time +;; emacs starts. +;; +(defcustom ede-project-placeholder-cache-file + (locate-user-emacs-file "ede-projects.el" ".projects.ede") + "File containing the list of projects EDE has viewed." + :group 'ede + :type 'file) + +(defvar ede-project-cache-files nil + "List of project files EDE has seen before.") + +(defun ede-save-cache () + "Save a cache of EDE objects that Emacs has seen before." + (interactive) + (let ((p ede-projects) + (c ede-project-cache-files) + (recentf-exclude '( (lambda (f) t) )) + ) + (condition-case nil + (progn + (set-buffer (find-file-noselect ede-project-placeholder-cache-file t)) + (erase-buffer) + (insert ";; EDE project cache file. +;; This contains a list of projects you have visited.\n(") + (while p + (when (and (car p) (ede-project-p p)) + (let ((f (oref (car p) file))) + (when (file-exists-p f) + (insert "\n \"" f "\"")))) + (setq p (cdr p))) + (while c + (insert "\n \"" (car c) "\"") + (setq c (cdr c))) + (insert "\n)\n") + (condition-case nil + (save-buffer 0) + (error + (message "File %s could not be saved." + ede-project-placeholder-cache-file))) + (kill-buffer (current-buffer)) + ) + (error + (message "File %s could not be read." + ede-project-placeholder-cache-file)) + + ))) + +(defun ede-load-cache () + "Load the cache of EDE projects." + (save-excursion + (let ((cachebuffer nil)) + (condition-case nil + (progn + (setq cachebuffer + (find-file-noselect ede-project-placeholder-cache-file t)) + (set-buffer cachebuffer) + (goto-char (point-min)) + (let ((c (read (current-buffer))) + (new nil) + (p ede-projects)) + ;; Remove loaded projects from the cache. + (while p + (setq c (delete (oref (car p) file) c)) + (setq p (cdr p))) + ;; Remove projects that aren't on the filesystem + ;; anymore. + (while c + (when (file-exists-p (car c)) + (setq new (cons (car c) new))) + (setq c (cdr c))) + ;; Save it + (setq ede-project-cache-files (nreverse new)))) + (error nil)) + (when cachebuffer (kill-buffer cachebuffer)) + ))) + +;;; Get the cache usable. + +;; @TODO - Remove this cache setup, or use this for something helpful. +;;(add-hook 'kill-emacs-hook 'ede-save-cache) +;;(when (not noninteractive) +;; ;; No need to load the EDE cache if we aren't interactive. +;; ;; This occurs during batch byte-compiling of other tools. +;; (ede-load-cache)) + + +;;; METHODS +;; +;; The methods in ede-base handle project related behavior, and DO NOT +;; related to EDE mode commands directory, such as keybindings. +;; +;; Mode related methods are in ede.el. These methods are related +;; project specific activities not directly tied to a keybinding. +(defmethod ede-subproject-relative-path ((proj ede-project) &optional parent-in) + "Get a path name for PROJ which is relative to the parent project. +If PARENT is specified, then be relative to the PARENT project. +Specifying PARENT is useful for sub-sub projects relative to the root project." + (let* ((parent (or parent-in (ede-parent-project proj))) + (dir (file-name-directory (oref proj file)))) + (if (and parent (not (eq parent proj))) + (file-relative-name dir (file-name-directory (oref parent file))) + ""))) + +(defmethod ede-subproject-p ((proj ede-project)) + "Return non-nil if PROJ is a sub project." + ;; @TODO - Use this in more places, and also pay attention to + ;; metasubproject in ede-proj.el + (ede-parent-project proj)) + + +;;; Default descriptive methods for EDE classes +;; +;; These are methods which you might want to override, but there is +;; no need to in most situations because they are either a) simple, or +;; b) cosmetic. + +(defmethod ede-name ((this ede-target)) + "Return the name of THIS target." + (oref this name)) + +(defmethod ede-target-name ((this ede-target)) + "Return the name of THIS target, suitable for make or debug style commands." + (oref this name)) + +(defmethod ede-name ((this ede-project)) + "Return a short-name for THIS project file. +Do this by extracting the lowest directory name." + (oref this name)) + +(defmethod ede-description ((this ede-project)) + "Return a description suitable for the minibuffer about THIS." + (format "Project %s: %d subprojects, %d targets." + (ede-name this) (length (oref this subproj)) + (length (oref this targets)))) + +(defmethod ede-description ((this ede-target)) + "Return a description suitable for the minibuffer about THIS." + (format "Target %s: with %d source files." + (ede-name this) (length (oref this source)))) + +;;; HEADERS/DOC +;; +;; Targets and projects are often associated with other files, such as +;; header files, documentation files and the like. Have strong +;; associations can make useful user commands to quickly navigate +;; between the files base on their associations. +;; +(defun ede-header-file () + "Return the header file for the current buffer. +Not all buffers need headers, so return nil if no applicable." + (if ede-object + (ede-buffer-header-file ede-object (current-buffer)) + nil)) + +(defmethod ede-buffer-header-file ((this ede-project) buffer) + "Return nil, projects don't have header files." + nil) + +(defmethod ede-buffer-header-file ((this ede-target) buffer) + "There are no default header files in EDE. +Do a quick check to see if there is a Header tag in this buffer." + (with-current-buffer buffer + (if (re-search-forward "::Header:: \\([a-zA-Z0-9.]+\\)" nil t) + (buffer-substring-no-properties (match-beginning 1) + (match-end 1)) + (let ((src (ede-target-sourcecode this)) + (found nil)) + (while (and src (not found)) + (setq found (ede-buffer-header-file (car src) (buffer-file-name)) + src (cdr src))) + found)))) + +(defun ede-documentation-files () + "Return the documentation files for the current buffer. +Not all buffers need documentations, so return nil if no applicable. +Some projects may have multiple documentation files, so return a list." + (if ede-object + (ede-buffer-documentation-files ede-object (current-buffer)) + nil)) + +(defmethod ede-buffer-documentation-files ((this ede-project) buffer) + "Return all documentation in project THIS based on BUFFER." + ;; Find the info node. + (ede-documentation this)) + +(defmethod ede-buffer-documentation-files ((this ede-target) buffer) + "Check for some documentation files for THIS. +Also do a quick check to see if there is a Documentation tag in this BUFFER." + (with-current-buffer buffer + (if (re-search-forward "::Documentation:: \\([a-zA-Z0-9.]+\\)" nil t) + (buffer-substring-no-properties (match-beginning 1) + (match-end 1)) + ;; Check the master project + (let ((cp (ede-toplevel))) + (ede-buffer-documentation-files cp (current-buffer)))))) + +(defmethod ede-documentation ((this ede-project)) + "Return a list of files that provide documentation. +Documentation is not for object THIS, but is provided by THIS for other +files in the project." + (let ((targ (oref this targets)) + (proj (oref this subproj)) + (found nil)) + (while targ + (setq found (append (ede-documentation (car targ)) found) + targ (cdr targ))) + (while proj + (setq found (append (ede-documentation (car proj)) found) + proj (cdr proj))) + found)) + +(defmethod ede-documentation ((this ede-target)) + "Return a list of files that provide documentation. +Documentation is not for object THIS, but is provided by THIS for other +files in the project." + nil) + +(defun ede-html-documentation-files () + "Return a list of HTML documentation files associated with this project." + (ede-html-documentation (ede-toplevel)) + ) + +(defmethod ede-html-documentation ((this ede-project)) + "Return a list of HTML files provided by project THIS." + + ) + +;;; Default "WANT" methods. +;; +;; These methods are used to determine if a target "wants", or could +;; somehow handle a file, or some source type. +;; +(defmethod ede-want-file-p ((this ede-target) file) + "Return non-nil if THIS target wants FILE." + ;; By default, all targets reference the source object, and let it decide. + (let ((src (ede-target-sourcecode this))) + (while (and src (not (ede-want-file-p (car src) file))) + (setq src (cdr src))) + src)) + +(defmethod ede-want-file-source-p ((this ede-target) file) + "Return non-nil if THIS target wants FILE." + ;; By default, all targets reference the source object, and let it decide. + (let ((src (ede-target-sourcecode this))) + (while (and src (not (ede-want-file-source-p (car src) file))) + (setq src (cdr src))) + src)) + +(defmethod ede-target-sourcecode ((this ede-target)) + "Return the sourcecode objects which THIS permits." + (let ((sc (oref this sourcetype)) + (rs nil)) + (while (and (listp sc) sc) + (setq rs (cons (symbol-value (car sc)) rs) + sc (cdr sc))) + rs)) + + +;;; Debugging. +;; +(defun ede-adebug-project () + "Run adebug against the current EDE project. +Display the results as a debug list." + (interactive) + (require 'data-debug) + (when (ede-current-project) + (data-debug-new-buffer "*Analyzer ADEBUG*") + (data-debug-insert-object-slots (ede-current-project) "") + )) + +(defun ede-adebug-project-parent () + "Run adebug against the current EDE parent project. +Display the results as a debug list." + (interactive) + (require 'data-debug) + (when (ede-parent-project) + (data-debug-new-buffer "*Analyzer ADEBUG*") + (data-debug-insert-object-slots (ede-parent-project) "") + )) + +(defun ede-adebug-project-root () + "Run adebug against the current EDE parent project. +Display the results as a debug list." + (interactive) + (require 'data-debug) + (when (ede-toplevel) + (data-debug-new-buffer "*Analyzer ADEBUG*") + (data-debug-insert-object-slots (ede-toplevel) "") + )) + + + +;;; TOPLEVEL PROJECT +;; +;; The toplevel project is a way to identify the EDE structure that belongs +;; to the top of a project. + +(defun ede-toplevel (&optional subproj) + "Return the ede project which is the root of the current project. +Optional argument SUBPROJ indicates a subproject to start from +instead of the current project." + (or ede-object-root-project + (let* ((cp (or subproj (ede-current-project)))) + (or (and cp (ede-project-root cp)) + (progn + (while (ede-parent-project cp) + (setq cp (ede-parent-project cp))) + cp))))) + + +;;; Hooks & Autoloads +;; +;; These let us watch various activities, and respond appropriately. + +;; (add-hook 'edebug-setup-hook +;; (lambda () +;; (def-edebug-spec ede-with-projectfile +;; (form def-body)))) + +(provide 'ede/base) + +;; Local variables: +;; generated-autoload-file: "loaddefs.el" +;; generated-autoload-load-name: "ede/base" +;; End: + +;;; ede/base.el ends here diff --git a/lisp/cedet/ede/cpp-root.el b/lisp/cedet/ede/cpp-root.el index cae4d090a39..1c850f7ad95 100644 --- a/lisp/cedet/ede/cpp-root.el +++ b/lisp/cedet/ede/cpp-root.el @@ -131,7 +131,7 @@ ;; (add-to-list 'ede-project-class-files ;; (ede-project-autoload "cpp-root" ;; :name "CPP ROOT" -;; :file 'ede-cpp-root +;; :file 'ede/cpp-root ;; :proj-file 'MY-FILE-FOR-DIR ;; :proj-root 'MY-ROOT-FCN ;; :load-type 'MY-LOAD @@ -237,6 +237,18 @@ ROOTPROJ is nil, since there is only one project." ;; Snoop through our master list. (ede-cpp-root-file-existing dir)) +;;;###autoload +(add-to-list 'ede-project-class-files + (ede-project-autoload "cpp-root" + :name "CPP ROOT" + :file 'ede/cpp-root + :proj-file 'ede-cpp-root-project-file-for-dir + :proj-root 'ede-cpp-root-project-root + :load-type 'ede-cpp-root-load + :class-sym 'ede-cpp-root + :new-p nil) + t) + ;;; CLASSES ;; ;; EDE sets up projects with two kinds of objects. @@ -504,6 +516,21 @@ Also set up the lexical preprocessor map." "Get the pre-processor map for project THIS." (ede-preprocessor-map (ede-target-parent this))) +;;; Quick Hack +(defun ede-create-lots-of-projects-under-dir (dir projfile &rest attributes) + "Create a bunch of projects under directory DIR. +PROJFILE is a file name sans directory that indicates a subdirectory +is a project directory. +Generic ATTRIBUTES, such as :include-path can be added. +Note: This needs some work." + (let ((files (directory-files dir t))) + (dolist (F files) + (if (file-exists-p (expand-file-name projfile F)) + `(ede-cpp-root-project (file-name-nondirectory F) + :name (file-name-nondirectory F) + :file (expand-file-name projfile F) + attributes))))) + (provide 'ede/cpp-root) ;; Local variables: diff --git a/lisp/cedet/ede/custom.el b/lisp/cedet/ede/custom.el new file mode 100644 index 00000000000..d823e015840 --- /dev/null +++ b/lisp/cedet/ede/custom.el @@ -0,0 +1,215 @@ +;;; ede.el --- customization of EDE projects. + +;; Copyright (C) 2010 Free Software Foundation, Inc. + +;; Author: Eric M. Ludlam + +;; 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: +;; +;; Customization commands/hooks for EDE. +;; +;; EIEIO supports customizing objects, and EDE uses this to allow +;; users to change basic settings in their projects. +;; + +;;; Code: +;;; Customization +;; +;; Routines for customizing projects and targets. + +(require 'ede) +(eval-when-compile (require 'eieio-custom)) + +(defvar eieio-ede-old-variables nil + "The old variables for a project.") + +;;; Customization Commands +;; +;; These commands initialize custoization of EDE control objects. + +;;;###autoload +(defun ede-customize-project () + "Edit fields of the current project through EIEIO & Custom." + (interactive) + (require 'eieio-custom) + (let* ((ov (oref (ede-current-project) local-variables)) + (cp (ede-current-project))) + (ede-customize cp) + (make-local-variable 'eieio-ede-old-variables) + (setq eieio-ede-old-variables ov))) + +;;;###autoload +(defalias 'customize-project 'ede-customize-project) + +;;;###autoload +(defun ede-customize-current-target() + "Edit fields of the current target through EIEIO & Custom." + (interactive) + (require 'eieio-custom) + (if (not (obj-of-class-p ede-object ede-target)) + (error "Current file is not part of a target")) + (ede-customize-target ede-object)) + +;;;###autoload +(defalias 'customize-target 'ede-customize-current-target) + +(defun ede-customize-target (obj) + "Edit fields of the current target through EIEIO & Custom. +OBJ is the target object to customize." + (require 'eieio-custom) + (if (and obj (not (obj-of-class-p obj ede-target))) + (error "No logical target to customize")) + (ede-customize obj)) + +(defmethod ede-customize ((proj ede-project)) + "Customize the EDE project PROJ." + (eieio-customize-object proj 'default)) + +(defmethod ede-customize ((target ede-target)) + "Customize the EDE TARGET." + (eieio-customize-object target 'default)) + +;;; Target Sorting +;; +;; Target order can be important, but custom doesn't support a way +;; to resort items in a list. This function by David Engster allows +;; targets to be re-arranged. + +(defvar ede-project-sort-targets-order nil + "Variable for tracking target order in `ede-project-sort-targets'.") + +;;;###autoload +(defun ede-project-sort-targets () + "Create a custom-like buffer for sorting targets of current project." + (interactive) + (let ((proj (ede-current-project)) + (count 1) + current order) + (switch-to-buffer (get-buffer-create "*EDE sort targets*")) + (erase-buffer) + (setq ede-object-project proj) + (widget-create 'push-button + :notify (lambda (&rest ignore) + (let ((targets (oref ede-object-project targets)) + cur newtargets) + (while (setq cur (pop ede-project-sort-targets-order)) + (setq newtargets (append newtargets + (list (nth cur targets))))) + (oset ede-object-project targets newtargets)) + (ede-commit-project ede-object-project) + (kill-buffer)) + " Accept ") + (widget-insert " ") + (widget-create 'push-button + :notify (lambda (&rest ignore) + (kill-buffer)) + " Cancel ") + (widget-insert "\n\n") + (setq ede-project-sort-targets-order nil) + (mapc (lambda (x) + (add-to-ordered-list + 'ede-project-sort-targets-order + x x)) + (number-sequence 0 (1- (length (oref proj targets))))) + (ede-project-sort-targets-list) + (use-local-map widget-keymap) + (widget-setup) + (goto-char (point-min)))) + +(defun ede-project-sort-targets-list () + "Sort the target list while using `ede-project-sort-targets'." + (save-excursion + (let ((count 0) + (targets (oref ede-object-project targets)) + (inhibit-read-only t) + (inhibit-modification-hooks t)) + (goto-char (point-min)) + (forward-line 2) + (delete-region (point) (point-max)) + (while (< count (length targets)) + (if (> count 0) + (widget-create 'push-button + :notify `(lambda (&rest ignore) + (let ((cur ede-project-sort-targets-order)) + (add-to-ordered-list + 'ede-project-sort-targets-order + (nth ,count cur) + (1- ,count)) + (add-to-ordered-list + 'ede-project-sort-targets-order + (nth (1- ,count) cur) ,count)) + (ede-project-sort-targets-list)) + " Up ") + (widget-insert " ")) + (if (< count (1- (length targets))) + (widget-create 'push-button + :notify `(lambda (&rest ignore) + (let ((cur ede-project-sort-targets-order)) + (add-to-ordered-list + 'ede-project-sort-targets-order + (nth ,count cur) (1+ ,count)) + (add-to-ordered-list + 'ede-project-sort-targets-order + (nth (1+ ,count) cur) ,count)) + (ede-project-sort-targets-list)) + " Down ") + (widget-insert " ")) + (widget-insert (concat " " (number-to-string (1+ count)) ".: " + (oref (nth (nth count ede-project-sort-targets-order) + targets) name) "\n")) + (setq count (1+ count)))))) + +;;; Customization hooks +;; +;; These hooks are used when finishing up a customization. +(defmethod eieio-done-customizing ((proj ede-project)) + "Call this when a user finishes customizing PROJ." + (let ((ov eieio-ede-old-variables) + (nv (oref proj local-variables))) + (setq eieio-ede-old-variables nil) + (while ov + (if (not (assoc (car (car ov)) nv)) + (save-excursion + (mapc (lambda (b) + (set-buffer b) + (kill-local-variable (car (car ov)))) + (ede-project-buffers proj)))) + (setq ov (cdr ov))) + (mapc (lambda (b) (ede-set-project-variables proj b)) + (ede-project-buffers proj)))) + +;; These two methods should be implemented by subclasses of +;; project and targets in order to account for user specified +;; changes. +(defmethod eieio-done-customizing ((target ede-target)) + "Call this when a user finishes customizing TARGET." + nil) + +(defmethod ede-commit-project ((proj ede-project)) + "Commit any change to PROJ to its file." + nil + ) + +(provide 'ede/custom) + +;; Local variables: +;; generated-autoload-file: "loaddefs.el" +;; generated-autoload-load-name: "ede/custom" +;; End: + +;;; ede/custom.el ends here diff --git a/lisp/cedet/ede/dired.el b/lisp/cedet/ede/dired.el index 82784740615..59644a03ec8 100644 --- a/lisp/cedet/ede/dired.el +++ b/lisp/cedet/ede/dired.el @@ -76,11 +76,11 @@ negative, force off." "Add files to Target: ")))) (dolist (file (dired-get-marked-files t)) (project-add-file target file) - ;; Find the buffer for this files, and set it's ede-object + ;; Find the buffer for this files, and set its ede-object (if (get-file-buffer file) - (with-current-buffer (get-file-buffer file) - (setq ede-object nil) - (setq ede-object (ede-buffer-object (current-buffer))))))) + (with-current-buffer (get-file-buffer file) + (setq ede-object nil) + (setq ede-object (ede-buffer-object (current-buffer))))))) (provide 'ede/dired) diff --git a/lisp/cedet/ede/emacs.el b/lisp/cedet/ede/emacs.el index 45cbce27409..fefd8f99415 100644 --- a/lisp/cedet/ede/emacs.el +++ b/lisp/cedet/ede/emacs.el @@ -133,6 +133,18 @@ ROOTPROJ is nil, since there is only one project." ) ) +;;;###autoload +(add-to-list 'ede-project-class-files + (ede-project-autoload "emacs" + :name "EMACS ROOT" + :file 'ede/emacs + :proj-file "src/emacs.c" + :proj-root 'ede-emacs-project-root + :load-type 'ede-emacs-load + :class-sym 'ede-emacs-project + :new-p nil) + t) + (defclass ede-emacs-target-c (ede-target) () "EDE Emacs Project target for C code. @@ -150,7 +162,7 @@ All directories need at least one target.") (defmethod initialize-instance ((this ede-emacs-project) &rest fields) - "Make sure the :file is fully expanded." + "Make sure the targets slot is bound." (call-next-method) (unless (slot-boundp this 'targets) (oset this :targets nil))) diff --git a/lisp/cedet/ede/files.el b/lisp/cedet/ede/files.el index 2f86b766158..87145d8c8a1 100644 --- a/lisp/cedet/ede/files.el +++ b/lisp/cedet/ede/files.el @@ -38,6 +38,7 @@ (declare-function ede-locate-file-in-hash "ede/locate") (declare-function ede-locate-add-file-to-hash "ede/locate") (declare-function ede-locate-file-in-project "ede/locate") +(declare-function ede-locate-flush-hash "ede/locate") (defvar ede--disable-inode nil "Set to 't' to simulate systems w/out inode support.") @@ -57,44 +58,29 @@ the current EDE project." (ede-project-root-directory (ede-current-project)))) (find-file fname))) +(defun ede-flush-project-hash () + "Flush the file locate hash for the current project." + (interactive) + (require 'ede/locate) + (let* ((loc (ede-get-locator-object (ede-current-project)))) + (ede-locate-flush-hash loc))) + ;;; Placeholders for ROOT directory scanning on base objects ;; (defmethod ede-project-root ((this ede-project-placeholder)) - "If a project knows it's root, return it here. + "If a project knows its root, return it here. Allows for one-project-object-for-a-tree type systems." (oref this rootproject)) (defmethod ede-project-root-directory ((this ede-project-placeholder) &optional file) - "If a project knows it's root, return it here. + "If a project knows its root, return it here. Allows for one-project-object-for-a-tree type systems. Optional FILE is the file to test. It is ignored in preference of the anchor file for the project." (file-name-directory (expand-file-name (oref this file)))) -(defmethod ede-project-root ((this ede-project-autoload)) - "If a project knows it's root, return it here. -Allows for one-project-object-for-a-tree type systems." - nil) - -(defmethod ede-project-root-directory ((this ede-project-autoload) - &optional file) - "If a project knows it's root, return it here. -Allows for one-project-object-for-a-tree type systems. -Optional FILE is the file to test. If there is no FILE, use -the current buffer." - (when (not file) - (setq file default-directory)) - (when (slot-boundp this :proj-root) - (let ((rootfcn (oref this proj-root))) - (when rootfcn - (condition-case nil - (funcall rootfcn file) - (error - (funcall rootfcn))) - )))) - (defmethod ede--project-inode ((proj ede-project-placeholder)) "Get the inode of the directory project PROJ is in." (if (slot-boundp proj 'dirinode) @@ -262,27 +248,30 @@ Do this whenever a new project is created, as opposed to loaded." (defun ede-directory-project-p (dir &optional force) "Return a project description object if DIR has a project. Optional argument FORCE means to ignore a hash-hit of 'nomatch. -This depends on an up to date `ede-project-class-files' variable." - (let* ((dirtest (expand-file-name dir)) - (match (ede-directory-project-from-hash dirtest))) - (cond - ((and (eq match 'nomatch) (not force)) - nil) - ((and match (not (eq match 'nomatch))) - match) - (t - (let ((types ede-project-class-files) - (ret nil)) - ;; Loop over all types, loading in the first type that we find. - (while (and types (not ret)) - (if (ede-dir-to-projectfile (car types) dirtest) - (progn - ;; We found one! Require it now since we will need it. - (require (oref (car types) file)) - (setq ret (car types)))) - (setq types (cdr types))) - (ede-directory-project-add-description-to-hash dirtest (or ret 'nomatch)) - ret))))) +This depends on an up to date `ede-project-class-files' variable. +Any directory that contains the file .ede-ignore will allways +return nil." + (when (not (file-exists-p (expand-file-name ".ede-ignore" dir))) + (let* ((dirtest (expand-file-name dir)) + (match (ede-directory-project-from-hash dirtest))) + (cond + ((and (eq match 'nomatch) (not force)) + nil) + ((and match (not (eq match 'nomatch))) + match) + (t + (let ((types ede-project-class-files) + (ret nil)) + ;; Loop over all types, loading in the first type that we find. + (while (and types (not ret)) + (if (ede-dir-to-projectfile (car types) dirtest) + (progn + ;; We found one! Require it now since we will need it. + (require (oref (car types) file)) + (setq ret (car types)))) + (setq types (cdr types))) + (ede-directory-project-add-description-to-hash dirtest (or ret 'nomatch)) + ret)))))) ;;; TOPLEVEL ;; @@ -324,7 +313,7 @@ nil is returned if the current directory is not a part of a project." ;; If PROJ didn't know, or there is no PROJ, then ;; Loop up to the topmost project, and then load that single - ;; project, and it's sub projects. When we are done, identify the + ;; project, and its sub projects. When we are done, identify the ;; sub-project object belonging to file. (while (and (not ans) newpath proj) (setq toppath newpath @@ -338,24 +327,6 @@ nil is returned if the current directory is not a part of a project." ) (or ans toppath)))))) -;;; TOPLEVEL PROJECT -;; -;; The toplevel project is a way to identify the EDE structure that belongs -;; to the top of a project. - -(defun ede-toplevel (&optional subproj) - "Return the ede project which is the root of the current project. -Optional argument SUBPROJ indicates a subproject to start from -instead of the current project." - (or ede-object-root-project - (let* ((cp (or subproj (ede-current-project))) - ) - (or (and cp (ede-project-root cp)) - (progn - (while (ede-parent-project cp) - (setq cp (ede-parent-project cp))) - cp))))) - ;;; DIRECTORY CONVERSION STUFF ;; (defmethod ede-convert-path ((this ede-project) path) @@ -372,11 +343,13 @@ Argument THIS is the project to convert PATH to." (substring fptf (match-end 0)) (error "Cannot convert relativize path %s" fp)))))) -(defmethod ede-convert-path ((this ede-target) path) +(defmethod ede-convert-path ((this ede-target) path &optional project) "Convert path in a standard way for a given project. Default to making it project relative. -Argument THIS is the project to convert PATH to." - (let ((proj (ede-target-parent this))) +Argument THIS is the project to convert PATH to. +Optional PROJECT is the project that THIS belongs to. Associating +a target to a project is expensive, so using this can speed things up." + (let ((proj (or project (ede-target-parent this)))) (if proj (let ((p (ede-convert-path proj path)) (lp (or (oref this path) ""))) @@ -406,7 +379,8 @@ FILENAME should be just a filename which occurs in a directory controlled by this project. Optional argument FORCE forces the default filename to be provided even if it doesn't exist. -If FORCE equals 'newfile, then the cache is ignored." +If FORCE equals 'newfile, then the cache is ignored and a new file in THIS +is returned." (require 'ede/locate) (let* ((loc (ede-get-locator-object this)) (ha (ede-locate-file-in-hash loc filename)) @@ -467,17 +441,8 @@ doesn't exist." (proj (oref this subproj)) (found nil)) ;; find it Locally. - (setq found - (cond ((file-exists-p (expand-file-name filename path)) - (expand-file-name filename path)) - ((file-exists-p (expand-file-name (concat "include/" filename) path)) - (expand-file-name (concat "include/" filename) path)) - (t - (while (and (not found) proj) - (setq found (when (car proj) - (ede-expand-filename (car proj) filename)) - proj (cdr proj))) - found))) + (setq found (or (ede-expand-filename-local this filename) + (ede-expand-filename-impl-via-subproj this filename))) ;; Use an external locate tool. (when (not found) (require 'ede/locate) @@ -485,6 +450,30 @@ doesn't exist." ;; Return it found)) +(defmethod ede-expand-filename-local ((this ede-project) filename) + "Expand filename locally to project THIS with filesystem tests." + (let ((path (ede-project-root-directory this))) + (cond ((file-exists-p (expand-file-name filename path)) + (expand-file-name filename path)) + ((file-exists-p (expand-file-name (concat "include/" filename) path)) + (expand-file-name (concat "include/" filename) path))))) + +(defmethod ede-expand-filename-impl-via-subproj ((this ede-project) filename) + "Return a fully qualified file name based on project THIS. +FILENAME should be just a filename which occurs in a directory controlled +by this project." + (let ((proj (list (ede-toplevel this))) + (found nil)) + ;; find it Locally. + (while (and (not found) proj) + (let ((thisproj (car proj))) + (setq proj (append (cdr proj) (oref thisproj subproj))) + (setq found (when thisproj + (ede-expand-filename-local thisproj filename))) + )) + ;; Return it + found)) + (defmethod ede-expand-filename ((this ede-target) filename &optional force) "Return a fully qualified file name based on target THIS. FILENAME should be a filename which occurs in a directory in which THIS works. diff --git a/lisp/cedet/ede/generic.el b/lisp/cedet/ede/generic.el new file mode 100644 index 00000000000..c2d31f56a13 --- /dev/null +++ b/lisp/cedet/ede/generic.el @@ -0,0 +1,442 @@ +;;; ede/generic.el --- Base Support for generic build systems + +;; Copyright (C) 2010 Free Software Foundation, Inc. + +;; Author: Eric M. Ludlam + +;; 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: +;; +;; There are a lot of build systems out there, and EDE can't support +;; them all fully. The ede-generic.el system is the base for +;; supporting alternate build systems in a simple way, automatically. +;; +;; The structure is for the ede-generic baseclass, which is augmented +;; by simple sub-classes that can be created by users on an as needed +;; basis. The generic system will have targets for many language +;; types, and create the targets on an as needed basis. All +;; sub-project types will recycle the same generic target types. +;; +;; The generic target types will only be implemented for languages +;; where having EDE support actually matters, with a single MISC to +;; represent anything else. +;; +;; TOO MANY PROJECTS DETECTED: +;; +;; If enabling ede-generic support starts identifying too many +;; projects, drop a file called `.ede-ignore' into any directory where +;; you do not want a project to be. +;; +;; Customization: +;; +;; Since these projects are all so increadibly generic, a user will +;; need to configure some aspects of the project by hand. In order to +;; enable this without configuring the project objects directly (which +;; are auto-generated) a special ede-generic-confg object is defined to +;; hold the basics. Generic projects will identify and use these +;; config files. +;; +;; Adding support for new projects: +;; +;; To add support to EDE Generic for new project types is very quick. +;; See the end of this file for examples such as CMake and SCons. +;; +;; Support consists of one class for your project, specifying the file +;; name used by the project system you want to support. It also +;; should implement th method `ede-generic-setup-configuration' to +;; prepopulate the configurable portion of the generic project with +;; build details. +;; +;; Lastly, call `ede-generic-new-autoloader' to setup your project so +;; EDE can use it. +;; +;; Adding support for new types of source code: +;; +;; Sources of different types are supported with a simple class which +;; subclasses `ede-generic-target'. The slots `shortname' and +;; `extension' should be given new initial values. +;; +;; Optionally, any target method used by EDE can then be overriden. +;; The ede-generic-target-c-cpp has some example methods setting up +;; the pre-processor map and system include path. +;; +;; NOTE: It is not necessary to modify ede-generic.el to add any of +;; the above described support features. + +(require 'eieio-opt) +(require 'ede) +(require 'semantic/db) + +;;; Code: +;; +;; Start with the configuration system +(defclass ede-generic-config (eieio-persistent) + ((extension :initform ".ede") + (file-header-line :initform ";; EDE Generic Project Configuration") + (project :initform nil + :documentation + "The project this config is bound to.") + ;; Generic customizations + (build-command :initarg :build-command + :initform "make -k" + :type string + :custom string + :group (default build) + :documentation + "Command used for building this project.") + (debug-command :initarg :debug-command + :initform "gdb " + :type string + :custom string + :group (default build) + :documentation + "Command used for debugging this project.") + ;; C target customixations + (c-include-path :initarg :c-include-path + :initform nil + :type list + :custom (repeat (string :tag "Path")) + :group c + :documentation + "The include path used by C/C++ projects.") + (c-preprocessor-table :initarg :c-preprocessor-table + :initform nil + :type list + :custom (repeat (cons (string :tag "Macro") + (string :tag "Value"))) + :group c + :documentation + "Preprocessor Symbols for this project.") + (c-preprocessor-files :initarg :c-preprocessor-files + :initform nil + :type list + :custom (repeat (string :tag "Include File"))) + ) + "User Configuration object for a generic project.") + +(defun ede-generic-load (dir &optional rootproj) + "Return a Generic Project object if there is a match. +Return nil if there isn't one. +Argument DIR is the directory it is created for. +ROOTPROJ is nil, since there is only one project." + ;; Doesn't already exist, so lets make one. + (let* ((alobj ede-constructing) + (this nil)) + (when (not alobj) (error "Cannot load generic project without the autoload instance")) + + (setq this + (funcall (oref alobj class-sym) + (symbol-name (oref alobj class-sym)) + :name (file-name-nondirectory + (directory-file-name dir)) + :version "1.0" + :directory (file-name-as-directory dir) + :file (expand-file-name (oref alobj :proj-file)) )) + (ede-add-project-to-global-list this) + )) + +;;; Base Classes for the system +(defclass ede-generic-target (ede-target) + ((shortname :initform "" + :type string + :allocation :class + :documentation + "Something prepended to the target name.") + (extension :initform "" + :type string + :allocation :class + :documentation + "Regular expression representing the extension used for this target. +subclasses of this base target will override the default value.") + ) + "Baseclass for all targets belonging to the generic ede system." + :abstract t) + +(defclass ede-generic-project (ede-project) + ((buildfile :initform "" + :type string + :allocation :class + :documentation "The file name that identifies a project of this type. +The class allocated value is replace by different sub classes.") + (config :initform nil + :type (or null ede-generic-config) + :documentation + "The configuration object for this project.") + ) + "The baseclass for all generic EDE project types." + :abstract t) + +(defmethod initialize-instance ((this ede-generic-project) + &rest fields) + "Make sure the targets slot is bound." + (call-next-method) + (unless (slot-boundp this 'targets) + (oset this :targets nil)) + ) + +(defmethod ede-generic-get-configuration ((proj ede-generic-project)) + "Return the configuration for the project PROJ." + (let ((config (oref proj config))) + (when (not config) + (let ((fname (expand-file-name "EDEConfig.el" + (oref proj :directory)))) + (if (file-exists-p fname) + ;; Load in the configuration + (setq config (eieio-persistent-read fname)) + ;; Create a new one. + (setq config (ede-generic-config + "Configuration" + :file fname)) + ;; Set initial values based on project. + (ede-generic-setup-configuration proj config)) + ;; Link things together. + (oset proj config config) + (oset config project proj))) + config)) + +(defmethod ede-generic-setup-configuration ((proj ede-generic-project) config) + "Default configuration setup method." + nil) + +(defmethod ede-commit-project ((proj ede-generic-project)) + "Commit any change to PROJ to its file." + (let ((config (ede-generic-get-configuration proj))) + (ede-commit config))) + +;;; A list of different targets +(defclass ede-generic-target-c-cpp (ede-generic-target) + ((shortname :initform "C/C++") + (extension :initform "\\([ch]\\(pp\\|xx\\|\\+\\+\\)?\\|cc\\|hh\\|CC?\\)")) + "EDE Generic Project target for C and C++ code. +All directories need at least one target.") + +(defclass ede-generic-target-el (ede-generic-target) + ((shortname :initform "ELisp") + (extension :initform "el")) + "EDE Generic Project target for Emacs Lisp code. +All directories need at least one target.") + +(defclass ede-generic-target-fortran (ede-generic-target) + ((shortname :initform "Fortran") + (extension :initform "[fF]9[05]\\|[fF]\\|for")) + "EDE Generic Project target for Fortran code. +All directories need at least one target.") + +(defclass ede-generic-target-texi (ede-generic-target) + ((shortname :initform "Texinfo") + (extension :initform "texi")) + "EDE Generic Project target for texinfo code. +All directories need at least one target.") + +;; MISC must always be last since it will always match the file. +(defclass ede-generic-target-misc (ede-generic-target) + ((shortname :initform "Misc") + (extension :initform "")) + "EDE Generic Project target for Misc files. +All directories need at least one target.") + +;;; Automatic target aquisition. +(defun ede-generic-find-matching-target (class dir targets) + "Find a target that is a CLASS and is in DIR in the list of TARGETS." + (let ((match nil)) + (dolist (T targets) + (when (and (object-of-class-p T class) + (string= (oref T :path) dir)) + (setq match T) + )) + match)) + +(defmethod ede-find-target ((proj ede-generic-project) buffer) + "Find an EDE target in PROJ for BUFFER. +If one doesn't exist, create a new one for this directory." + (let* ((ext (file-name-extension (buffer-file-name buffer))) + (classes (eieio-build-class-alist 'ede-generic-target t)) + (cls nil) + (targets (oref proj targets)) + (dir default-directory) + (ans nil) + ) + ;; Pick a matching class type. + (when ext + (dolist (C classes) + (let* ((classsym (intern (car C))) + (extreg (oref classsym extension))) + (when (and (not (string= extreg "")) + (string-match (concat "^" extreg "$") ext)) + (setq cls classsym))))) + (when (not cls) (setq cls 'ede-generic-target-misc)) + ;; find a pre-existing matching target + (setq ans (ede-generic-find-matching-target cls dir targets)) + ;; Create a new instance if there wasn't one + (when (not ans) + (setq ans (make-instance + cls + :name (oref cls shortname) + :path dir + :source nil)) + (object-add-to-list proj :targets ans) + ) + ans)) + +;;; C/C++ support +(defmethod ede-preprocessor-map ((this ede-generic-target-c-cpp)) + "Get the pre-processor map for some generic C code." + (let* ((proj (ede-target-parent this)) + (root (ede-project-root proj)) + (config (ede-generic-get-configuration proj)) + filemap + ) + ;; Preprocessor files + (dolist (G (oref config :c-preprocessor-files)) + (let ((table (semanticdb-file-table-object + (ede-expand-filename root G)))) + (when table + (when (semanticdb-needs-refresh-p table) + (semanticdb-refresh-table table)) + (setq filemap (append filemap (oref table lexical-table))) + ))) + ;; The core table + (setq filemap (append filemap (oref config :c-preprocessor-table))) + + filemap + )) + +(defmethod ede-system-include-path ((this ede-generic-target-c-cpp)) + "Get the system include path used by project THIS." + (let* ((proj (ede-target-parent this)) + (config (ede-generic-get-configuration proj))) + (oref config c-include-path))) + +;;; Customization +;; +(defmethod ede-customize ((proj ede-generic-project)) + "Customize the EDE project PROJ." + (let ((config (ede-generic-get-configuration proj))) + (eieio-customize-object config))) + +(defmethod ede-customize ((target ede-generic-target)) + "Customize the EDE TARGET." + ;; Nothing unique for the targets, use the project. + (ede-customize-project)) + +(defmethod eieio-done-customizing ((config ede-generic-config)) + "Called when EIEIO is done customizing the configuration object. +We need to go back through the old buffers, and update them with +the new configuration." + (ede-commit config) + ;; Loop over all the open buffers, and re-apply. + (ede-map-targets + (oref config project) + (lambda (target) + (ede-map-target-buffers + target + (lambda (b) + (with-current-buffer b + (ede-apply-target-options))))))) + +(defmethod ede-commit ((config ede-generic-config)) + "Commit all changes to the configuration to disk." + (eieio-persistent-save config)) + +;;; Creating Derived Projects: +;; +;; Derived projects need an autoloader so that EDE can find the +;; different projects on disk. +(defun ede-generic-new-autoloader (internal-name external-name + projectfile class) + "Add a new EDE Autoload instance for identifying a generic project. +INTERNAL-NAME is a long name that identifies thsi project type. +EXTERNAL-NAME is a shorter human readable name to describe the project. +PROJECTFILE is a file name that identifies a project of this type to EDE, such as +a Makefile, or SConstruct file. +CLASS is the EIEIO class that is used to track this project. It should subclass +the class `ede-generic-project' project." + (add-to-list 'ede-project-class-files + (ede-project-autoload internal-name + :name external-name + :file 'ede/generic + :proj-file projectfile + :load-type 'ede-generic-load + :class-sym class + :new-p nil) + ;; Generics must go at the end, since more specific types + ;; can create Makefiles also. + t)) + +;;;###autoload +(defun ede-enable-generic-projects () + "Enable generic project loaders." + (interactive) + (ede-generic-new-autoloader "edeproject-makefile" "Make" + "Makefile" 'ede-generic-makefile-project) + (ede-generic-new-autoloader "edeproject-scons" "SCons" + "SConstruct" 'ede-generic-scons-project) + (ede-generic-new-autoloader "edeproject-cmake" "CMake" + "CMakeLists" 'ede-generic-cmake-project) + ) + + +;;; SPECIFIC TYPES OF GENERIC BUILDS +;; + +;;; MAKEFILE + +(defclass ede-generic-makefile-project (ede-generic-project) + ((buildfile :initform "Makefile") + ) + "Generic Project for makefiles.") + +(defmethod ede-generic-setup-configuration ((proj ede-generic-makefile-project) config) + "Setup a configuration for Make." + (oset config build-command "make -k") + (oset config debug-command "gdb ") + ) + + +;;; SCONS +(defclass ede-generic-scons-project (ede-generic-project) + ((buildfile :initform "SConstruct") + ) + "Generic Project for scons.") + +(defmethod ede-generic-setup-configuration ((proj ede-generic-scons-project) config) + "Setup a configuration for SCONS." + (oset config build-command "scons") + (oset config debug-command "gdb ") + ) + + +;;; CMAKE +(defclass ede-generic-cmake-project (ede-generic-project) + ((buildfile :initform "CMakeLists") + ) + "Generic Project for cmake.") + +(defmethod ede-generic-setup-configuration ((proj ede-generic-cmake-project) config) + "Setup a configuration for CMake." + (oset config build-command "cmake") + (oset config debug-command "gdb ") + ) + +(provide 'ede/generic) + +;; Local variables: +;; generated-autoload-file: "loaddefs.el" +;; generated-autoload-load-name: "ede/generic" +;; End: + +;;; ede/generic.el ends here diff --git a/lisp/cedet/ede/linux.el b/lisp/cedet/ede/linux.el index 451c1ea5212..9ae4c91a2a0 100644 --- a/lisp/cedet/ede/linux.el +++ b/lisp/cedet/ede/linux.el @@ -112,6 +112,18 @@ ROOTPROJ is nil, since there is only one project." ) ) +;;;###autoload +(add-to-list 'ede-project-class-files + (ede-project-autoload "linux" + :name "LINUX ROOT" + :file 'ede/linux + :proj-file "scripts/ver_linux" + :proj-root 'ede-linux-project-root + :load-type 'ede-linux-load + :class-sym 'ede-linux-project + :new-p nil) + t) + (defclass ede-linux-target-c (ede-target) () "EDE Linux Project target for C code. @@ -124,7 +136,7 @@ All directories need at least one target.") (defmethod initialize-instance ((this ede-linux-project) &rest fields) - "Make sure the :file is fully expanded." + "Make sure the targets slot is bound." (call-next-method) (unless (slot-boundp this 'targets) (oset this :targets nil))) diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index 099e193f010..c2ca81c668b 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el @@ -121,7 +121,7 @@ based on `ede-locate-setup-options'." ;; Basic setup. (call-next-method) ;; Make sure we have a hash table. - (oset loc hash (make-hash-table :test 'equal)) + (ede-locate-flush-hash loc) ) (defmethod ede-locate-ok-in-project :static ((loc ede-locate-base) @@ -129,6 +129,10 @@ based on `ede-locate-setup-options'." "Is it ok to use this project type under ROOT." t) +(defmethod ede-locate-flush-hash ((loc ede-locate-base)) + "For LOC, flush hashtable and start from scratch." + (oset loc hash (make-hash-table :test 'equal))) + (defmethod ede-locate-file-in-hash ((loc ede-locate-base) filestring) "For LOC, is the file FILESTRING in our hashtable?" @@ -160,6 +164,13 @@ that created this EDE locate object." nil ) +(defmethod ede-locate-create/update-root-database :STATIC + ((loc ede-locate-base) root) + "Create or update the database for the current project. +You cannot create projects for the baseclass." + (error "Cannot create/update a database of type %S" + (object-name loc))) + ;;; LOCATE ;; ;; Using the standard unix "locate" command. @@ -242,6 +253,11 @@ that created this EDE locate object." (let ((default-directory (oref loc root))) (cedet-gnu-global-expand-filename filesubstring))) +(defmethod ede-locate-create/update-root-database :STATIC + ((loc ede-locate-global) root) + "Create or update the GNU Global database for the current project." + (cedet-gnu-global-create/update-database root)) + ;;; IDUTILS ;; (defclass ede-locate-idutils (ede-locate-base) @@ -280,6 +296,11 @@ that created this EDE locate object." (let ((default-directory (oref loc root))) (cedet-idutils-expand-filename filesubstring))) +(defmethod ede-locate-create/update-root-database :STATIC + ((loc ede-locate-idutils) root) + "Create or update the GNU Global database for the current project." + (cedet-idutils-create/update-database root)) + ;;; CSCOPE ;; (defclass ede-locate-cscope (ede-locate-base) @@ -315,6 +336,11 @@ that created this EDE locate object." (let ((default-directory (oref loc root))) (cedet-cscope-expand-filename filesubstring))) +(defmethod ede-locate-create/update-root-database :STATIC + ((loc ede-locate-cscope) root) + "Create or update the GNU Global database for the current project." + (cedet-cscope-create/update-database root)) + (provide 'ede/locate) ;; Local variables: diff --git a/lisp/cedet/ede/pconf.el b/lisp/cedet/ede/pconf.el index f9a1fb44f15..0983aeb16b8 100644 --- a/lisp/cedet/ede/pconf.el +++ b/lisp/cedet/ede/pconf.el @@ -126,7 +126,11 @@ don't do it. A value of nil means to just do it.") (while compilation-in-progress (accept-process-output) - (sit-for 1)) + ;; If sit for indicates that input is waiting, then + ;; read and discard whatever it is that is going on. + (when (not (sit-for 1)) + (read-event nil nil .1) + )) (with-current-buffer "*compilation*" (goto-char (point-max)) diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el index 19c4b26edcd..94874d031b7 100644 --- a/lisp/cedet/ede/pmake.el +++ b/lisp/cedet/ede/pmake.el @@ -262,6 +262,18 @@ Execute BODY in a location where a value can be placed." (goto-char (point-max)))) (put 'ede-pmake-insert-variable-shared 'lisp-indent-function 1) +(defmacro ede-pmake-insert-variable-once (varname &rest body) + "Add VARNAME into the current Makefile if it doesn't exist. +Execute BODY in a location where a value can be placed." + `(let ((addcr t) (v ,varname)) + (unless (re-search-backward (concat "^" v "\\s-*=") nil t) + (insert v "=") + ,@body + (if addcr (insert "\n")) + (goto-char (point-max))) + )) +(put 'ede-pmake-insert-variable-once 'lisp-indent-function 1) + ;;; SOURCE VARIABLE NAME CONSTRUCTION (defsubst ede-pmake-varname (obj) @@ -369,10 +381,14 @@ NOTE: Not yet in use! This is part of an SRecode conversion of conf-table)) (let* ((top "") (tmp this)) + ;; Use relative paths for subdirs. (while (ede-parent-project tmp) (setq tmp (ede-parent-project tmp) top (concat "../" top))) - (insert "\ntop=" top)) + ;; If this is the top, then use CURDIR. + (if (and (not (oref this metasubproject)) (string= top "")) + (insert "\ntop=\"$(CURDIR)\"/") + (insert "\ntop=" top))) (insert "\nede_FILES=" (file-name-nondirectory (oref this file)) " " (file-name-nondirectory (ede-proj-dist-makefile this)) "\n")) @@ -425,14 +441,13 @@ sources variable." (link (ede-proj-linkers this)) (name (ede-proj-makefile-target-name this)) (src (oref this source))) + (ede-proj-makefile-insert-object-variables (car comp) name src) (dolist (obj comp) (ede-compiler-only-once obj (ede-proj-makefile-insert-variables obj))) - (ede-proj-makefile-insert-object-variables (car comp) name src) - (while link - (ede-linker-only-once (car link) - (ede-proj-makefile-insert-variables (car link))) - (setq link (cdr link))))) + (dolist (linker link) + (ede-linker-only-once linker + (ede-proj-makefile-insert-variables linker))))) (defmethod ede-proj-makefile-insert-automake-pre-variables ((this ede-proj-target)) diff --git a/lisp/cedet/ede/proj-archive.el b/lisp/cedet/ede/proj-archive.el index 3057f967b0f..2d4620ea47c 100644 --- a/lisp/cedet/ede/proj-archive.el +++ b/lisp/cedet/ede/proj-archive.el @@ -29,7 +29,7 @@ (defclass ede-proj-target-makefile-archive (ede-proj-target-makefile-objectcode) - ((availablelinkers :initform (ede-archive-linker))) + ((availablelinkers :initform '(ede-archive-linker))) "This target generates an object code archive.") (defvar ede-archive-linker diff --git a/lisp/cedet/ede/proj-aux.el b/lisp/cedet/ede/proj-aux.el index 26bc9540e82..4f00d6ea60b 100644 --- a/lisp/cedet/ede/proj-aux.el +++ b/lisp/cedet/ede/proj-aux.el @@ -29,7 +29,7 @@ ;;; Code: (defclass ede-proj-target-aux (ede-proj-target) - ((sourcetype :initform (ede-aux-source))) + ((sourcetype :initform '(ede-aux-source))) "This target consists of aux files such as READMEs and COPYING.") (defvar ede-aux-source diff --git a/lisp/cedet/ede/proj-elisp.el b/lisp/cedet/ede/proj-elisp.el index ecdefb2a522..879f36ff4e2 100644 --- a/lisp/cedet/ede/proj-elisp.el +++ b/lisp/cedet/ede/proj-elisp.el @@ -36,8 +36,8 @@ ((menu :initform nil) (keybindings :initform nil) (phony :initform t) - (sourcetype :initform (ede-source-emacs)) - (availablecompilers :initform (ede-emacs-compiler ede-xemacs-compiler)) + (sourcetype :initform '(ede-source-emacs)) + (availablecompilers :initform '(ede-emacs-compiler ede-xemacs-compiler)) (aux-packages :initarg :aux-packages :initform nil :type list @@ -259,7 +259,7 @@ is found, such as a `-version' variable, or the standard header." ;; Autoload generators ;; (defclass ede-proj-target-elisp-autoloads (ede-proj-target-elisp) - ((availablecompilers :initform (ede-emacs-cedet-autogen-compiler)) + ((availablecompilers :initform '(ede-emacs-cedet-autogen-compiler)) (aux-packages :initform ("cedet-autogen")) (phony :initform t) (autoload-file :initarg :autoload-file diff --git a/lisp/cedet/ede/proj-info.el b/lisp/cedet/ede/proj-info.el index 667d6d0bff9..1e9060fe315 100644 --- a/lisp/cedet/ede/proj-info.el +++ b/lisp/cedet/ede/proj-info.el @@ -31,9 +31,9 @@ (defclass ede-proj-target-makefile-info (ede-proj-target-makefile) ((menu :initform nil) (keybindings :initform nil) - (availablecompilers :initform (ede-makeinfo-compiler - ede-texi2html-compiler)) - (sourcetype :initform (ede-makeinfo-source)) + (availablecompilers :initform '(ede-makeinfo-compiler + ede-texi2html-compiler)) + (sourcetype :initform '(ede-makeinfo-source)) (mainmenu :initarg :mainmenu :initform "" :type string diff --git a/lisp/cedet/ede/proj-misc.el b/lisp/cedet/ede/proj-misc.el index 9c25dafe102..34a10859fdd 100644 --- a/lisp/cedet/ede/proj-misc.el +++ b/lisp/cedet/ede/proj-misc.el @@ -35,8 +35,8 @@ ;; FIXME this isn't how you spell "miscellaneous". :( (defclass ede-proj-target-makefile-miscelaneous (ede-proj-target-makefile) - ((sourcetype :initform (ede-misc-source)) - (availablecompilers :initform (ede-misc-compile)) + ((sourcetype :initform '(ede-misc-source)) + (availablecompilers :initform '(ede-misc-compile)) (submakefile :initarg :submakefile :initform "" :type string diff --git a/lisp/cedet/ede/proj-obj.el b/lisp/cedet/ede/proj-obj.el index 241ace2f167..6be76f1f11b 100644 --- a/lisp/cedet/ede/proj-obj.el +++ b/lisp/cedet/ede/proj-obj.el @@ -39,28 +39,32 @@ (configuration-variables :initform ("debug" . (("CFLAGS" . "-g") ("LDFLAGS" . "-g")))) ;; @TODO - add an include path. - (availablecompilers :initform (ede-gcc-compiler - ede-g++-compiler - ede-gfortran-compiler - ede-gfortran-module-compiler - ;; More C and C++ compilers, plus - ;; fortran or pascal can be added here - )) - (availablelinkers :initform (ede-g++-linker - ede-cc-linker - ede-gfortran-linker - ede-ld-linker - ;; Add more linker thingies here. - )) - (sourcetype :initform (ede-source-c - ede-source-c++ - ede-source-f77 - ede-source-f90 - ;; ede-source-other - ;; This object should take everything that - ;; gets compiled into objects like fortran - ;; and pascal. - )) + (availablecompilers :initform '(ede-gcc-compiler + ede-g++-compiler + ede-gfortran-compiler + ede-gfortran-module-compiler + ede-lex-compiler + ede-yacc-compiler + ;; More C and C++ compilers, plus + ;; fortran or pascal can be added here + )) + (availablelinkers :initform '(ede-g++-linker + ede-cc-linker + ede-ld-linker + ede-gfortran-linker + ;; Add more linker thingies here. + )) + (sourcetype :initform '(ede-source-c + ede-source-c++ + ede-source-f77 + ede-source-f90 + ede-source-lex + ede-source-yacc + ;; ede-source-other + ;; This object should take everything that + ;; gets compiled into objects like fortran + ;; and pascal. + )) ) "Abstract class for Makefile based object code generating targets. Belonging to this group assumes you could make a .o from an element source @@ -115,15 +119,15 @@ file.") :name "cc" :sourcetype '(ede-source-c) :variables '(("C_LINK" . "$(CC) $(CFLAGS) $(LDFLAGS) -L.")) - :commands '("$(C_LINK) -o $@ $^") + :commands '("$(C_LINK) -o $@ $^ $(LDDEPS)") :objectextention "") "Linker for C sourcecode.") (defvar ede-source-c++ (ede-sourcecode "ede-source-c++" :name "C++" - :sourcepattern "\\.\\(cpp\\|cc\\|cxx\\)$" - :auxsourcepattern "\\.\\(hpp\\|hh?\\|hxx\\)$" + :sourcepattern "\\.\\(c\\(pp?\\|c\\|xx\\|++\\)\\|C\\\(PP\\)?\\)$" + :auxsourcepattern "\\.\\(hpp?\\|hh?\\|hxx\\|H\\)$" :garbagepattern '("*.o" "*.obj" ".deps/*.P" ".lo")) "C++ source code definition.") @@ -158,11 +162,43 @@ file.") ;; Only use this linker when c++ exists. :sourcetype '(ede-source-c++) :variables '(("CXX_LINK" . "$(CXX) $(CFLAGS) $(LDFLAGS) -L.")) - :commands '("$(CXX_LINK) -o $@ $^") + :commands '("$(CXX_LINK) -o $@ $^ $(LDDEPS)") :autoconf '("AC_PROG_CXX") :objectextention "") "Linker needed for c++ programs.") +;;; LEX +(defvar ede-source-lex + (ede-sourcecode "ede-source-lex" + :name "lex" + :sourcepattern "\\.l\\(l\\|pp\\|++\\)") + "Lex source code definition. +No garbage pattern since it creates C or C++ code.") + +(defvar ede-lex-compiler + (ede-object-compiler + "ede-lex-compiler" + ;; Can we support regular makefiles too?? + :autoconf '("AC_PROG_LEX") + :sourcetype '(ede-source-lex)) + "Compiler used for Lexical source.") + +;;; YACC +(defvar ede-source-yacc + (ede-sourcecode "ede-source-yacc" + :name "yacc" + :sourcepattern "\\.y\\(y\\|pp\\|++\\)") + "Yacc source code definition. +No garbage pattern since it creates C or C++ code.") + +(defvar ede-yacc-compiler + (ede-object-compiler + "ede-yacc-compiler" + ;; Can we support regular makefiles too?? + :autoconf '("AC_PROG_YACC") + :sourcetype '(ede-source-yacc)) + "Compiler used for yacc/bison grammar files source.") + ;;; Fortran Compiler/Linker ;; ;; Contributed by David Engster @@ -233,7 +269,7 @@ file.") :name "ld" :variables '(("LD" . "ld") ("LD_LINK" . "$(LD) $(LDFLAGS) -L.")) - :commands '("$(LD_LINK) -o $@ $^") + :commands '("$(LD_LINK) -o $@ $^ $(LDDEPS)") :objectextention "") "Linker needed for c++ programs.") diff --git a/lisp/cedet/ede/proj-prog.el b/lisp/cedet/ede/proj-prog.el index 2c0237e41c2..9b06dc007b3 100644 --- a/lisp/cedet/ede/proj-prog.el +++ b/lisp/cedet/ede/proj-prog.el @@ -34,14 +34,14 @@ ;;; Code: (defclass ede-proj-target-makefile-program (ede-proj-target-makefile-objectcode) - ((ldlibs :initarg :ldlibs - :initform nil - :type list - :custom (repeat (string :tag "Library")) - :documentation - "Libraries, such as \"m\" or \"Xt\" which this program depends on. -The linker flag \"-l\" is automatically prepended. Do not include a \"lib\" -prefix, or a \".so\" suffix. + ((ldlibs-local :initarg :ldlibs-local + :initform nil + :type list + :custom (repeat (string :tag "Local Library")) + :documentation + "Libraries that are part of this project. +The full path to these libraries should be specified, such as: +../lib/libMylib.la or ../ar/myArchive.a Note: Currently only used for Automake projects." ) @@ -51,10 +51,21 @@ Note: Currently only used for Automake projects." :custom (repeat (string :tag "Link Flag")) :documentation "Additional flags to add when linking this target. -Use ldlibs to add addition libraries. Use this to specify specific -options to the linker. +Use this to specify specific options to the linker. +A Common use may be to add -L to specify in-project locations of libraries +specified with ldlibs.") + (ldlibs :initarg :ldlibs + :initform nil + :type list + :custom (repeat (string :tag "Library")) + :documentation + "Libraries, such as \"m\" or \"Xt\" which this program depends on. +The linker flag \"-l\" is automatically prepended. Do not include a \"lib\" +prefix, or a \".so\" suffix. +Use the 'ldflags' slot to specify where in-project libraries might be. -Note: Not currently used. This bug needs to be fixed.") +Note: Currently only used for Automake projects." + ) ) "This target is an executable program.") @@ -70,27 +81,24 @@ Note: Not currently used. This bug needs to be fixed.") "Insert bin_PROGRAMS variables needed by target THIS." (ede-pmake-insert-variable-shared (concat (ede-name this) "_LDADD") - (mapc (lambda (c) (insert " -l" c)) (oref this ldlibs))) - ;; For other targets THIS depends on - ;; - ;; NOTE: FIX THIS - ;; - ;;(ede-pmake-insert-variable-shared - ;; (concat (ede-name this) "_DEPENDENCIES") - ;; (mapcar (lambda (d) (insert d)) (oref this FOOOOOOOO))) + (mapc (lambda (l) (insert " " l)) (oref this ldlibs-local)) + (mapc (lambda (c) (insert " " c)) (oref this ldflags)) + (when (oref this ldlibs) + (mapc (lambda (d) (insert " -l" d)) (oref this ldlibs))) + ) (call-next-method)) -(defmethod ede-proj-makefile-insert-rules ((this ede-proj-target-makefile-program)) - "Insert rules needed by THIS target." - (let ((ede-proj-compiler-object-linkflags - (mapconcat 'identity (oref this ldflags) " "))) +(defmethod ede-proj-makefile-insert-variables ((this ede-proj-target-makefile-program)) + "Insert variables needed by the compiler THIS." + (call-next-method) + (let ((lf (mapconcat 'identity (oref this ldflags) " "))) (with-slots (ldlibs) this (if ldlibs - (setq ede-proj-compiler-object-linkflags - (concat ede-proj-compiler-object-linkflags - " -l" - (mapconcat 'identity ldlibs " -l"))))) - (call-next-method))) + (setq lf + (concat lf " -l" (mapconcat 'identity ldlibs " -l"))))) + ;; LDFLAGS as needed. + (when (and lf (not (string= "" lf))) + (ede-pmake-insert-variable-once "LDDEPS" (insert lf))))) (defmethod project-debug-target ((obj ede-proj-target-makefile-program)) "Debug a program target OBJ." diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el index 46a8a480b52..e1111f9f38b 100644 --- a/lisp/cedet/ede/proj-shared.el +++ b/lisp/cedet/ede/proj-shared.el @@ -34,15 +34,15 @@ ;;; Code: (defclass ede-proj-target-makefile-shared-object (ede-proj-target-makefile-program) - ((availablecompilers :initform (ede-gcc-libtool-shared-compiler - ;;ede-gcc-shared-compiler - ede-g++-libtool-shared-compiler - ;;ede-g++-shared-compiler - )) - (availablelinkers :initform (ede-cc-linker-libtool - ede-g++-linker-libtool - ;; Add more linker thingies here. - )) + ((availablecompilers :initform '(ede-gcc-libtool-shared-compiler + ;;ede-gcc-shared-compiler + ede-g++-libtool-shared-compiler + ;;ede-g++-shared-compiler + )) + (availablelinkers :initform '(ede-cc-linker-libtool + ede-g++-linker-libtool + ;; Add more linker thingies here. + )) (ldflags :custom (repeat (string :tag "Libtool flag")) :documentation "Additional flags to add when linking this shared library. @@ -124,7 +124,7 @@ Use ldlibs to add addition libraries.") :rules (list (ede-makefile-rule "c++-inference-rule-libtool" :target "%.o" - :dependencies "%.c" + :dependencies "%.cpp" :rules '("@echo '$(LTCOMPILE) -o $@ $<'; \\" "$(LTCOMPILE) -o $@ $<" ) diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el index 3cdf42dc841..41887431d31 100644 --- a/lisp/cedet/ede/proj.el +++ b/lisp/cedet/ede/proj.el @@ -29,7 +29,6 @@ ;; rebuild. The targets provided in ede-proj can be augmented with ;; additional target types inherited directly from `ede-proj-target'. -;; (eval-and-compile '(require 'ede)) (require 'ede/proj-comp) (require 'ede/make) @@ -336,7 +335,9 @@ Argument TARGET is the project we are completing customization on." (or (string= (file-name-nondirectory (oref this file)) f) (string= (ede-proj-dist-makefile this) f) (string-match "Makefile\\(\\.\\(in\\|am\\)\\)?$" f) - (string-match "config\\(ure\\.in\\|\\.stutus\\)?$" f) + (string-match "config\\(ure\\.\\(in\\|ac\\)\\|\\.status\\)?$" f) + (string-match "config.h\\(\\.in\\)?" f) + (member f '("AUTHORS" "NEWS" "COPYING" "INSTALL" "README")) ))) (defmethod ede-buffer-mine ((this ede-proj-target) buffer) @@ -398,11 +399,11 @@ Argument TARGET is the project we are completing customization on." :source nil))) (defmethod project-delete-target ((this ede-proj-target)) - "Delete the current target THIS from it's parent project." + "Delete the current target THIS from its parent project." (let ((p (ede-current-project)) (ts (oref this source))) ;; Loop across all sources. If it exists in a buffer, - ;; clear it's object. + ;; clear its object. (while ts (let* ((default-directory (oref this path)) (b (get-file-buffer (car ts)))) @@ -413,7 +414,7 @@ Argument TARGET is the project we are completing customization on." (setq ede-object nil) (ede-apply-object-keymap)))))) (setq ts (cdr ts))) - ;; Remove THIS from it's parent. + ;; Remove THIS from its parent. ;; The two vectors should be pointer equivalent. (oset p targets (delq this (oref p targets))) (ede-proj-save (ede-current-project)))) @@ -447,15 +448,13 @@ FILE must be massaged by `ede-convert-path'." (defmethod project-make-dist ((this ede-proj-project)) "Build a distribution for the project based on THIS target." - ;; I'm a lazy bum, so I'll make a makefile for doing this sort - ;; of thing, and rely only on that small section of code. (let ((pm (ede-proj-dist-makefile this)) (df (project-dist-files this))) (if (and (file-exists-p (car df)) (not (y-or-n-p "Dist file already exists. Rebuild? "))) (error "Try `ede-update-version' before making a distribution")) (ede-proj-setup-buildenvironment this) - (if (string= (file-name-nondirectory pm) "Makefile.am") + (if (ede-proj-automake-p this) (setq pm (expand-file-name "Makefile" (file-name-directory pm)))) (compile (concat ede-make-command " -f " pm " dist")))) @@ -473,7 +472,7 @@ Argument COMMAND is the command to use when compiling." (let ((pm (ede-proj-dist-makefile proj)) (default-directory (file-name-directory (oref proj file)))) (ede-proj-setup-buildenvironment proj) - (if (string= (file-name-nondirectory pm) "Makefile.am") + (if (ede-proj-automake-p proj) (setq pm (expand-file-name "Makefile" (file-name-directory pm)))) (compile (concat ede-make-command" -f " pm " all")))) @@ -539,7 +538,15 @@ Converts all symbols into the objects to be used." (if (ede-want-any-source-files-p (symbol-value (car st)) sources) (let ((c (ede-proj-find-compiler avail (car st)))) (if c (setq comp (cons c comp))))) - (setq st (cdr st))))) + (setq st (cdr st))) + ;; Provide a good error msg. + (unless comp + (error "Could not find compiler match for source code extension \"%s\". +You may need to add support for this type of file." + (if sources + (file-name-extension (car sources)) + ""))) + )) ;; Return the disovered compilers comp))) @@ -664,18 +671,9 @@ Optional argument FORCE will force items to be regenerated." (let ((root (or (ede-project-root this) this)) ) (setq ede-projects (delq root ede-projects)) - (ede-proj-load (ede-project-root-directory root)) + (ede-load-project-file (ede-project-root-directory root)) )) -(defmethod project-rescan ((this ede-proj-target) readstream) - "Rescan target THIS from the read list READSTREAM." - (setq readstream (cdr (cdr readstream))) ;; constructor/name - (while readstream - (let ((tag (car readstream)) - (val (car (cdr readstream)))) - (eieio-oset this tag val)) - (setq readstream (cdr (cdr readstream))))) - (provide 'ede/proj) ;; arch-tag: eb8a40f8-0d2c-41c4-b273-af04101d1cdf diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el index 3eb1f9c2183..ccfb1a242b4 100644 --- a/lisp/cedet/ede/project-am.el +++ b/lisp/cedet/ede/project-am.el @@ -30,27 +30,19 @@ ;; fashion. ;; ;; project-am uses the structure defined in all good GNU projects with -;; the Automake file as it's base template, and then maintains that +;; the Automake file as its base template, and then maintains that ;; information during edits, automatically updating the automake file ;; where appropriate. - -;; (eval-and-compile -;; ;; Compatibility for makefile mode. -;; (condition-case nil -;; (require 'makefile "make-mode") -;; (error (require 'make-mode "make-mode"))) - -;; ;; Requiring the .el files prevents incomplete builds. -;; (require 'eieio "eieio.el") -;; (require 'ede "ede.el")) - (require 'make-mode) (require 'ede) (require 'ede/make) (require 'ede/makefile-edit) +(require 'semantic/find) ;; for semantic-find-tags-by-... +(require 'ede/autoconf-edit) (declare-function autoconf-parameters-for-macro "ede/autoconf-edit") +(declare-function ede-shell-run-something "ede/shell") (eval-when-compile (require 'compile)) ;;; Code: @@ -104,7 +96,7 @@ ;; ("ltlibcustom" project-am-lib ".*?_LTLIBRARIES" t) ) "Alist of type names and the type of object to create for them. -Each entry is of th form: +Each entry is of the form: (EMACSNAME CLASS AUTOMAKEVAR INDIRECT) where EMACSNAME is a name for Emacs to use. CLASS is the EDE target class to represent the target. @@ -113,6 +105,23 @@ AUTOMAKEVAR is the Automake variable to identify. This cannot be a INDIRECT is optional. If it is non-nil, then the variable in question lists other variables that need to be looked up.") + +(defconst project-am-meta-type-alist + '((project-am-program "_PROGRAMS$" t) + (project-am-lib "_\\(LIBS\\|LIBRARIES\\|LTLIBRARIES\\)$" t) + + ;; direct primary target use a dummy object (man target) + ;; update to: * 3.3 Uniform in automake-1.11 info node. + (project-am-man "_\\(DATA\\|HEADERS\\|PYTHON\\|JAVA\\|SCRIPTS\\|MANS\\|TEXINFOS\\)$" nil) + ) + "Alist of meta-target type, each entry has form: + (CLASS REGEXPVAR INDIRECT) +where CLASS is the EDE target class for target. +REGEXPVAR is the regexp used in `semantic-find-tags-by-name-regexp'. +INDIRECT is optional. If it is non-nil, then the variable in it have +other meta-variable based on this name.") + + (defclass project-am-target (ede-target) nil "Base target class for everything in project-am.") @@ -291,16 +300,6 @@ buffer being in order to provide a smart default target type." ;; Rescan the object in this makefile. (project-rescan ede-object)))) -;(defun project-am-rescan-toplevel () -; "Rescan all projects in which the current buffer resides." -; (interactive) -; (let* ((tlof (project-am-find-topmost-level default-directory)) -; (tlo (project-am-load tlof)) -; (ede-deep-rescan t)) ; scan deep in this case. -; ;; tlo is the top level object for whatever file we are in -; ;; or nil. If we have an object, call the rescan method. -; (if tlo (project-am-rescan tlo)))) - ;; ;; NOTE TO SELF ;; @@ -406,6 +405,7 @@ Argument COMMAND is the command to use for compiling the target." (defmethod project-run-target ((obj project-am-objectcode)) "Run the current project target in comint buffer." + (require 'ede/shell) (let ((tb (get-buffer-create " *padt*")) (dd (oref obj path)) (cmd nil)) @@ -429,45 +429,17 @@ Argument COMMAND is the command to use for compiling the target." ;;; Project loading and saving ;; -(defun project-am-load (project &optional rootproj) - "Read an automakefile PROJECT into our data structure. -Make sure that the tree down to our makefile is complete so that there -is cohesion in the project. Return the project file (or sub-project). +(defun project-am-load (directory &optional rootproj) + "Read an automakefile DIRECTORY into our data structure. If a given set of projects has already been loaded, then do nothing but return the project for the directory given. Optional ROOTPROJ is the root EDE project." - ;; @TODO - rationalize this to the newer EDE way of doing things. - (setq project (expand-file-name project)) - (let* ((ede-constructing t) - (fn (project-am-find-topmost-level (file-name-as-directory project))) - (amo nil) - (trimmed (if (string-match (regexp-quote fn) - project) - (replace-match "" t t project) - "")) - (subdir nil)) - (setq amo (object-assoc (expand-file-name "Makefile.am" fn) - 'file ede-projects)) - (if amo - (error "Synchronous error in ede/project-am objects") - (let ((project-am-constructing t)) - (setq amo (project-am-load-makefile fn)))) - (if (not amo) - nil - ;; Now scan down from amo, and find the current directory - ;; from the PROJECT file. - (while (< 0 (length trimmed)) - (if (string-match "\\([a-zA-Z0-9.-]+\\)/" trimmed) - (setq subdir (match-string 0 trimmed) - trimmed (replace-match "" t t trimmed)) - (error "Error scanning down path for project")) - (setq amo (project-am-subtree - amo - (expand-file-name "Makefile.am" - (expand-file-name subdir fn))) - fn (expand-file-name subdir fn))) - amo) - )) + (let* ((ede-constructiong t) + (amo (object-assoc (expand-file-name "Makefile.am" directory) + 'file ede-projects))) + (when (not amo) + (setq amo (project-am-load-makefile directory))) + amo)) (defun project-am-find-topmost-level (dir) "Find the topmost automakefile starting with DIR." @@ -488,17 +460,19 @@ Kill the makefile if it was not loaded before the load." (fb nil) (kb (get-file-buffer fn))) (if (not (file-exists-p fn)) - nil - (save-excursion - (if kb (setq fb kb) - ;; We need to find-file this thing, but don't use - ;; any semantic features. - (let ((semantic-init-hook nil)) - (setq fb (find-file-noselect fn))) - ) - (set-buffer fb) - (prog1 ,@forms - (if (not kb) (kill-buffer (current-buffer)))))))) + nil + (save-excursion + (if kb (setq fb kb) + ;; We need to find-file this thing, but don't use + ;; any semantic features. + (let ((semantic-init-hook nil) + (recentf-exclude '( (lambda (f) t) )) + ) + (setq fb (find-file-noselect fn))) + ) + (set-buffer fb) + (prog1 ,@forms + (if (not kb) (kill-buffer (current-buffer)))))))) (put 'project-am-with-makefile-current 'lisp-indent-function 1) (add-hook 'edebug-setup-hook @@ -507,14 +481,18 @@ Kill the makefile if it was not loaded before the load." (form def-body)))) -(defun project-am-load-makefile (path) +(defun project-am-load-makefile (path &optional suggestedname) "Convert PATH into a project Makefile, and return its project object. -It does not check for existing project objects. Use `project-am-load'." +It does not check for existing project objects. Use `project-am-load'. +Optional argument SUGGESTEDNAME will be the project name. +This is used when subprojects are made in named subdirectories." (project-am-with-makefile-current path (if (and ede-object (project-am-makefile-p ede-object)) ede-object (let* ((pi (project-am-package-info path)) - (pn (or (nth 0 pi) (project-am-last-dir fn))) + (sfn (when suggestedname + (project-am-last-dir suggestedname))) + (pn (or sfn (nth 0 pi) (project-am-last-dir fn))) (ver (or (nth 1 pi) "0.0")) (bug (nth 2 pi)) (cof (nth 3 pi)) @@ -532,21 +510,6 @@ It does not check for existing project objects. Use `project-am-load'." ampf)))) ;;; Methods: -(defmethod ede-find-target ((amf project-am-makefile) buffer) - "Fetch the target belonging to BUFFER." - (or (call-next-method) - (let ((targ (oref amf targets)) - (sobj (oref amf subproj)) - (obj nil)) - (while (and targ (not obj)) - (if (ede-buffer-mine (car targ) buffer) - (setq obj (car targ))) - (setq targ (cdr targ))) - (while (and sobj (not obj)) - (setq obj (project-am-buffer-object (car sobj) buffer) - sobj (cdr sobj))) - obj))) - (defmethod project-targets-for-file ((proj project-am-makefile)) "Return a list of targets the project PROJ." (oref proj targets)) @@ -556,44 +519,110 @@ It does not check for existing project objects. Use `project-am-load'." CURRPROJ is the current project being scanned. DIR is the directory to apply to new targets." (let* ((otargets (oref currproj targets)) + ;; `ntargets' results in complete targets list + ;; not only the new targets by diffing. (ntargets nil) (tmp nil) ) - (mapc - ;; Map all the different types - (lambda (typecar) - (let ((macro (nth 2 typecar)) - (class (nth 1 typecar)) - (indirect (nth 3 typecar)) - ;(name (car typecar)) - ) - (if indirect - ;; Map all the found objects - (mapc (lambda (lstcar) - (setq tmp (object-assoc lstcar 'name otargets)) - (when (not tmp) - (setq tmp (apply class lstcar :name lstcar - :path dir nil))) - (project-rescan tmp) - (setq ntargets (cons tmp ntargets))) - (makefile-macro-file-list macro)) - ;; Non-indirect will have a target whos sources - ;; are actual files, not names of other targets. - (let ((files (makefile-macro-file-list macro))) - (when files - (setq tmp (object-assoc macro 'name otargets)) - (when (not tmp) - (setq tmp (apply class macro :name macro - :path dir nil))) - (project-rescan tmp) - (setq ntargets (cons tmp ntargets)) - )) - ) - )) - project-am-type-alist) - ntargets)) -(defmethod project-rescan ((this project-am-makefile)) + (mapc + ;; Map all the different types + (lambda (typecar) + (let ((macro (nth 2 typecar)) + (class (nth 1 typecar)) + (indirect (nth 3 typecar)) + ) + (if indirect + ;; Map all the found objects + (mapc (lambda (lstcar) + (setq tmp (object-assoc lstcar 'name otargets)) + (when (not tmp) + (setq tmp (apply class lstcar :name lstcar + :path dir nil))) + (project-rescan tmp) + (setq ntargets (cons tmp ntargets))) + (makefile-macro-file-list macro)) + ;; Non-indirect will have a target whos sources + ;; are actual files, not names of other targets. + (let ((files (makefile-macro-file-list macro))) + (when files + (setq tmp (object-assoc macro 'name otargets)) + (when (not tmp) + (setq tmp (apply class macro :name macro + :path dir nil))) + (project-rescan tmp) + (setq ntargets (cons tmp ntargets)) + )) + ) + )) + project-am-type-alist) + + ;; At now check variables for meta-target regexp + ;; We have to check ntargets to avoid useless rescan. + ;; Also we have check otargets to prevent duplication. + (mapc + (lambda (typecar) + (let ((class (nth 0 typecar)) + (metaregex (nth 1 typecar)) + (indirect (nth 2 typecar))) + (if indirect + ;; Map all the found objects + (mapc + (lambda (lstcar) + (unless (object-assoc lstcar 'name ntargets) + (or + (setq tmp (object-assoc lstcar 'name otargets)) + (setq tmp (apply class lstcar :name lstcar + :path dir nil))) + (project-rescan tmp) + (setq ntargets (cons tmp ntargets)))) + ;; build a target list to map over + (let (atargets) + (dolist (TAG + (semantic-find-tags-by-name-regexp + metaregex (semantic-find-tags-by-class + 'variable (semantic-fetch-tags)))) + ;; default-value have to be a list + (when (cadr (assoc ':default-value TAG)) + (setq atargets + (append + (nreverse (cadr (assoc ':default-value TAG))) + atargets)))) + (nreverse atargets))) + + ;; else not indirect, TODO: FIX various direct meta type in a sane way. + (dolist (T (semantic-find-tags-by-name-regexp + metaregex (semantic-find-tags-by-class + 'variable (semantic-fetch-tags)))) + (unless (setq tmp (object-assoc (car T) 'name ntargets)) + (or (setq tmp (object-assoc (car T) 'name otargets)) + ;; we are really new + (setq tmp (apply class (car T) :name (car T) + :path dir nil))) + (project-rescan tmp) + (setq ntargets (cons tmp ntargets)))) + ))) + project-am-meta-type-alist) + ntargets)) + +(defun project-am-expand-subdirlist (place subdirs) + "Store in PLACE the SUBDIRS expanded from variables. +Strip out duplicates, and recurse on variables." + (mapc (lambda (sp) + (let ((var (makefile-extract-varname-from-text sp))) + (if var + ;; If it is a variable, expand that variable, and keep going. + (project-am-expand-subdirlist + place (makefile-macro-file-list var)) + ;; Else, add SP in if it isn't a dup. + (if (member sp (symbol-value place)) + nil ; don't do it twice. + (set place (cons sp (symbol-value place))) ;; add + )))) + subdirs) + ) + +(defmethod project-rescan ((this project-am-makefile) &optional suggestedname) "Rescan the makefile for all targets and sub targets." (project-am-with-makefile-current (file-name-directory (oref this file)) ;;(message "Scanning %s..." (oref this file)) @@ -603,10 +632,10 @@ DIR is the directory to apply to new targets." (bug (nth 2 pi)) (cof (nth 3 pi)) (osubproj (oref this subproj)) - (csubproj (or - ;; If DIST_SUBDIRS doesn't exist, then go for the - ;; static list of SUBDIRS. The DIST version should - ;; contain SUBDIRS plus extra stuff. + ;; 1/30/10 - We need to append these two lists together, + ;; then strip out duplicates. Expanding this list (via + ;; references to other variables should also strip out dups + (csubproj (append (makefile-macro-file-list "DIST_SUBDIRS") (makefile-macro-file-list "SUBDIRS"))) (csubprojexpanded nil) @@ -617,79 +646,57 @@ DIR is the directory to apply to new targets." (tmp nil) (ntargets (project-am-scan-for-targets this dir)) ) - - (and pn (string= (directory-file-name - (oref this directory)) - (directory-file-name - (project-am-find-topmost-level - (oref this directory)))) - (oset this name pn) - (and pv (oset this version pv)) - (and bug (oset this mailinglist bug)) - (oset this configureoutputfiles cof)) - -; ;; LISP is different. Here there is only one kind of lisp (that I know of -; ;; anyway) so it doesn't get mapped when it is found. -; (if (makefile-move-to-macro "lisp_LISP") -; (let ((tmp (project-am-lisp "lisp" -; :name "lisp" -; :path dir))) -; (project-rescan tmp) -; (setq ntargets (cons tmp ntargets)))) -; + (if suggestedname + (oset this name (project-am-last-dir suggestedname)) + ;; Else, setup toplevel project info. + (and pn (string= (directory-file-name + (oref this directory)) + (directory-file-name + (project-am-find-topmost-level + (oref this directory)))) + (oset this name pn) + (and pv (oset this version pv)) + (and bug (oset this mailinglist bug)) + (oset this configureoutputfiles cof))) ;; Now that we have this new list, chuck the old targets ;; and replace it with the new list of targets I just created. (oset this targets (nreverse ntargets)) ;; We still have a list of targets. For all buffers, make sure ;; their object still exists! - ;; FIGURE THIS OUT - - (mapc (lambda (sp) - (let ((var (makefile-extract-varname-from-text sp)) - ) - (if (not var) - (setq csubprojexpanded (cons sp csubprojexpanded)) - ;; If it is a variable, expand that variable, and keep going. - (let ((varexp (makefile-macro-file-list var))) - (dolist (V varexp) - (setq csubprojexpanded (cons V csubprojexpanded))))) - )) - csubproj) - + (project-am-expand-subdirlist 'csubprojexpanded csubproj) ;; Ok, now lets look at all our sub-projects. (mapc (lambda (sp) - (let* ((subdir (file-name-as-directory - (expand-file-name - sp (file-name-directory (oref this :file))))) - (submake (expand-file-name - "Makefile.am" - subdir))) - (if (string= submake (oref this :file)) - nil ;; don't recurse.. please! - - ;; For each project id found, see if we need to recycle, - ;; and if we do not, then make a new one. Check the deep - ;; rescan value for behavior patterns. - (setq tmp (object-assoc - submake - 'file osubproj)) - (if (not tmp) - (setq tmp - (condition-case nil - ;; In case of problem, ignore it. - (project-am-load-makefile subdir) - (error nil))) - ;; If we have tmp, then rescan it only if deep mode. - (if ede-deep-rescan - (project-rescan tmp))) - ;; Tac tmp onto our list of things to keep, but only - ;; if tmp was found. - (when tmp - ;;(message "Adding %S" (object-print tmp)) - (setq nsubproj (cons tmp nsubproj))))) - ) - (nreverse csubprojexpanded)) + (let* ((subdir (file-name-as-directory + (expand-file-name + sp (file-name-directory (oref this :file))))) + (submake (expand-file-name + "Makefile.am" + subdir))) + (if (string= submake (oref this :file)) + nil ;; don't recurse.. please! + ;; For each project id found, see if we need to recycle, + ;; and if we do not, then make a new one. Check the deep + ;; rescan value for behavior patterns. + (setq tmp (object-assoc + submake + 'file osubproj)) + (if (not tmp) + (setq tmp + (condition-case nil + ;; In case of problem, ignore it. + (project-am-load-makefile subdir subdir) + (error nil))) + ;; If we have tmp, then rescan it only if deep mode. + (if ede-deep-rescan + (project-rescan tmp subdir))) + ;; Tac tmp onto our list of things to keep, but only + ;; if tmp was found. + (when tmp + ;;(message "Adding %S" (object-print tmp)) + (setq nsubproj (cons tmp nsubproj))))) + ) + (nreverse csubprojexpanded)) (oset this subproj nsubproj) ;; All elements should be updated now. ))) @@ -698,12 +705,16 @@ DIR is the directory to apply to new targets." (defmethod project-rescan ((this project-am-program)) "Rescan object THIS." (oset this :source (makefile-macro-file-list (project-am-macro this))) + (unless (oref this :source) + (oset this :source (list (concat (oref this :name) ".c")))) (oset this :ldadd (makefile-macro-file-list (concat (oref this :name) "_LDADD")))) (defmethod project-rescan ((this project-am-lib)) "Rescan object THIS." - (oset this :source (makefile-macro-file-list (project-am-macro this)))) + (oset this :source (makefile-macro-file-list (project-am-macro this))) + (unless (oref this :source) + (oset this :source (list (concat (file-name-sans-extension (oref this :name)) ".c"))))) (defmethod project-rescan ((this project-am-texinfo)) "Rescan object THIS." @@ -728,19 +739,6 @@ DIR is the directory to apply to new targets." (defmethod project-rescan ((this project-am-extra-dist)) "Rescan object THIS." (oset this :source (makefile-macro-file-list "EXTRA_DIST"))) - ;; NOTE: The below calls 'file' then checks that it is some sort of - ;; text file. The file command may not be available on all platforms - ;; and some files may not exist yet. (ie - auto-generated) - - ;;(mapc - ;; (lambda (f) - ;; ;; prevent garbage to be parsed, could we use :aux ? - ;; (if (and (not (member f (oref this :source))) - ;; (string-match-p "ASCII\\|text" - ;; (shell-command-to-string - ;; (concat "file " f)))) - ;; (oset this :source (cons f (oref this :source))))) - ;; (makefile-macro-file-list "EXTRA_DIST"))) (defmethod project-am-macro ((this project-am-objectcode)) "Return the default macro to 'edit' for this object type." @@ -810,22 +808,24 @@ nil means that this buffer belongs to no-one." (defmethod ede-buffer-mine ((this project-am-objectcode) buffer) "Return t if object THIS lays claim to the file in BUFFER." - (member (file-name-nondirectory (buffer-file-name buffer)) + (member (file-relative-name (buffer-file-name buffer) (oref this :path)) (oref this :source))) (defmethod ede-buffer-mine ((this project-am-texinfo) buffer) "Return t if object THIS lays claim to the file in BUFFER." - (let ((bfn (buffer-file-name buffer))) - (or (string= (oref this :name) (file-name-nondirectory bfn)) - (member (file-name-nondirectory bfn) (oref this :include))))) + (let ((bfn (file-relative-name (buffer-file-name buffer) + (oref this :path)))) + (or (string= (oref this :name) bfn) + (member bfn (oref this :include))))) (defmethod ede-buffer-mine ((this project-am-man) buffer) "Return t if object THIS lays claim to the file in BUFFER." - (string= (oref this :name) (buffer-file-name buffer))) + (string= (oref this :name) + (file-relative-name (buffer-file-name buffer) (oref this :path)))) (defmethod ede-buffer-mine ((this project-am-lisp) buffer) "Return t if object THIS lays claim to the file in BUFFER." - (member (file-name-nondirectory (buffer-file-name buffer)) + (member (file-relative-name (buffer-file-name buffer) (oref this :path)) (oref this :source))) (defmethod project-am-subtree ((ampf project-am-makefile) subdir) @@ -956,7 +956,6 @@ Kill the Configure buffer if it was not already in a buffer." (cond ;; Try configure.in or configure.ac (conf-in - (require 'ede/autoconf-edit) (project-am-with-config-current conf-in (let ((aci (autoconf-parameters-for-macro "AC_INIT")) (aia (autoconf-parameters-for-macro "AM_INIT_AUTOMAKE")) @@ -982,7 +981,7 @@ Kill the Configure buffer if it was not already in a buffer." (t acf)))) (if (> (length outfiles) 1) (setq configfiles outfiles) - (setq configfiles (split-string (car outfiles) " " t))) + (setq configfiles (split-string (car outfiles) "\\s-" t))) ) )) ) @@ -1007,6 +1006,18 @@ Calculates the info with `project-am-extract-package-info'." (when top (setq dir (oref top :directory))) (project-am-extract-package-info dir))) +;; for simple per project include path extension +(defmethod ede-system-include-path ((this project-am-makefile)) + "Return `project-am-localvars-include-path', usually local variable +per file or in .dir-locals.el or similar." + (bound-and-true-p project-am-localvars-include-path)) + +(defmethod ede-system-include-path ((this project-am-target)) + "Return `project-am-localvars-include-path', usually local variable +per file or in .dir-locals.el or similar." + (bound-and-true-p project-am-localvars-include-path)) + + (provide 'ede/project-am) ;; arch-tag: 528db935-f186-4240-b647-e305c5b784a2 diff --git a/lisp/cedet/ede/shell.el b/lisp/cedet/ede/shell.el index edc75f42dee..d967a878350 100644 --- a/lisp/cedet/ede/shell.el +++ b/lisp/cedet/ede/shell.el @@ -70,7 +70,7 @@ COMMAND is a text string representing the thing to be run." (defmethod ede-shell-buffer ((target ede-target)) "Get the buffer for running shell commands for TARGET." (let ((name (ede-name target))) - (get-buffer-create (format "*EDE Shell %s" name)))) + (get-buffer-create (format "*EDE Shell %s*" name)))) (provide 'ede/shell) diff --git a/lisp/cedet/ede/simple.el b/lisp/cedet/ede/simple.el index e0a526e9ead..d42baa45f6a 100644 --- a/lisp/cedet/ede/simple.el +++ b/lisp/cedet/ede/simple.el @@ -21,6 +21,10 @@ ;;; Commentary: ;; +;; NOTE: EDE Simple Projects are considered obsolete. Use generic +;; projects instead. They have much better automatic support and +;; simpler configuration. +;; ;; A vast majority of projects use non-EDE project techniques, such ;; as hand written Makefiles, or other IDE's. ;; @@ -41,6 +45,14 @@ ;;; Code: +(add-to-list 'ede-project-class-files + (ede-project-autoload "simple-overlay" + :name "Simple" :file 'ede/simple + :proj-file 'ede-simple-projectfile-for-dir + :load-type 'ede-simple-load + :class-sym 'ede-simple-project) + t) + (defcustom ede-simple-save-directory "~/.ede" "*Directory where simple EDE project overlays are saved." :group 'ede diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index 3a961787f9a..466705175ed 100644 --- a/lisp/cedet/ede/speedbar.el +++ b/lisp/cedet/ede/speedbar.el @@ -108,7 +108,7 @@ Argument DIR is the directory from which to derive the list of objects." ;;; Some special commands useful in EDE ;; (defun ede-speedbar-remove-file-from-target () - "Remove the file at point from it's target." + "Remove the file at point from its target." (interactive) (if (stringp (speedbar-line-token)) (progn diff --git a/lisp/cedet/ede/srecode.el b/lisp/cedet/ede/srecode.el index d68c620a1ab..3b131dd3753 100644 --- a/lisp/cedet/ede/srecode.el +++ b/lisp/cedet/ede/srecode.el @@ -43,7 +43,9 @@ (srecode-map-update-map t) ;; We don't call this unless we need it. Load in the templates. (srecode-load-tables-for-mode 'makefile-mode) - (srecode-load-tables-for-mode 'makefile-mode 'ede)) + (srecode-load-tables-for-mode 'makefile-mode 'ede) + (srecode-load-tables-for-mode 'autoconf-mode) + (srecode-load-tables-for-mode 'autoconf-mode 'ede)) (defmacro ede-srecode-insert-with-dictionary (template &rest forms) "Insert TEMPLATE after executing FORMS with a dictionary. diff --git a/lisp/cedet/pulse.el b/lisp/cedet/pulse.el index ce11c18e609..593f196982b 100644 --- a/lisp/cedet/pulse.el +++ b/lisp/cedet/pulse.el @@ -3,6 +3,7 @@ ;;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam +;; Version: 1.0 ;; This file is part of GNU Emacs. @@ -57,10 +58,14 @@ (error nil))) (defcustom pulse-flag (pulse-available-p) - "*Non-nil means to pulse the overlay face for momentary highlighting. -Pulsing involves a bright highlight that slowly shifts to the background -color. Non-nil just means to highlight with an unchanging color for a short -time. + "Whether to use pulsing for momentary highlighting. +Pulsing involves a bright highlight that slowly shifts to the +background color. + +If the value is nil, highlight with an unchanging color until a +key is pressed. +If the value is `never', do no coloring at all. +Any other value means to the default pulsing behavior. If `pulse-flag' is non-nil, but `pulse-available-p' is nil, then this flag is ignored." @@ -178,22 +183,23 @@ Be sure to call `pulse-reset-face' after calling pulse." Optional argument FACE specifies the fact to do the highlighting." (overlay-put o 'original-face (overlay-get o 'face)) (add-to-list 'pulse-momentary-overlay o) - (if (or (not pulse-flag) (not (pulse-available-p))) - ;; Provide a face... clear on next command - (progn - (overlay-put o 'face (or face 'pulse-highlight-start-face)) - (add-hook 'pre-command-hook - 'pulse-momentary-unhighlight) - ) - ;; pulse it. - (unwind-protect + (if (eq pulse-flag 'never) + nil + (if (or (not pulse-flag) (not (pulse-available-p))) + ;; Provide a face... clear on next command (progn - (overlay-put o 'face 'pulse-highlight-face) - ;; The pulse function puts FACE onto 'pulse-highlight-face. - ;; Thus above we put our face on the overlay, but pulse - ;; with a reference face needed for the color. - (pulse face)) - (pulse-momentary-unhighlight)))) + (overlay-put o 'face (or face 'pulse-highlight-start-face)) + (add-hook 'pre-command-hook + 'pulse-momentary-unhighlight)) + ;; pulse it. + (unwind-protect + (progn + (overlay-put o 'face 'pulse-highlight-face) + ;; The pulse function puts FACE onto 'pulse-highlight-face. + ;; Thus above we put our face on the overlay, but pulse + ;; with a reference face needed for the color. + (pulse face)) + (pulse-momentary-unhighlight))))) (defun pulse-momentary-unhighlight () "Unhighlight a line recently highlighted." diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el index f5d3f54f205..ede96e39183 100644 --- a/lisp/cedet/semantic.el +++ b/lisp/cedet/semantic.el @@ -5,7 +5,7 @@ ;; Author: Eric M. Ludlam ;; Keywords: syntax tools -;; Version: 2.0pre7 +;; Version: 2.0 ;; This file is part of GNU Emacs. @@ -39,7 +39,7 @@ (require 'semantic/tag) (require 'semantic/lex) -(defvar semantic-version "2.0pre7" +(defvar semantic-version "2.0" "Current version of Semantic.") (declare-function inversion-test "inversion") @@ -876,6 +876,7 @@ Throw away all the old tags, and recreate the tag database." ;; (define-key km "i" 'senator-isearch-toggle-semantic-mode) (define-key map "\C-c,j" 'semantic-complete-jump-local) (define-key map "\C-c,J" 'semantic-complete-jump) + (define-key map "\C-c,m" 'semantic-complete-jump-local-members) (define-key map "\C-c,g" 'semantic-symref-symbol) (define-key map "\C-c,G" 'semantic-symref) (define-key map "\C-c,p" 'senator-previous-tag) @@ -886,6 +887,7 @@ Throw away all the old tags, and recreate the tag database." (define-key map "\C-c,\M-w" 'senator-copy-tag) (define-key map "\C-c,\C-y" 'senator-yank-tag) (define-key map "\C-c,r" 'senator-copy-tag-to-register) + (define-key map "\C-c,," 'semantic-force-refresh) (define-key map [?\C-c ?, up] 'senator-transpose-tags-up) (define-key map [?\C-c ?, down] 'senator-transpose-tags-down) (define-key map "\C-c,l" 'semantic-analyze-possible-completions) @@ -951,6 +953,9 @@ Throw away all the old tags, and recreate the tag database." (define-key navigate-menu [semantic-complete-jump] '(menu-item "Find Tag Globally..." semantic-complete-jump :help "Read a tag name and find it in the current project")) + (define-key navigate-menu [semantic-complete-jump-local-members] + '(menu-item "Find Local Members ..." semantic-complete-jump-local-members + :help "Read a tag name and find a local member with that name")) (define-key navigate-menu [semantic-complete-jump-local] '(menu-item "Find Tag in This Buffer..." semantic-complete-jump-local :help "Read a tag name and find it in this buffer")) diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el index 72e43fe0f82..4009685683b 100644 --- a/lisp/cedet/semantic/analyze.el +++ b/lisp/cedet/semantic/analyze.el @@ -253,7 +253,7 @@ Optional argument THROWSYM specifies a symbol the throw on non-recoverable error (tag nil) ; tag return list (tagtype nil) ; tag types return list (fname nil) - (miniscope (clone scope)) + (miniscope (when scope (clone scope))) ) ;; First order check. Is this wholely contained in the typecache? (setq tmp (semanticdb-typecache-find sequence)) @@ -297,11 +297,12 @@ Optional argument THROWSYM specifies a symbol the throw on non-recoverable error ;; and we can use it directly. (cond ((semantic-tag-of-class-p tmp 'type) ;; update the miniscope when we need to analyze types directly. - (let ((rawscope - (apply 'append - (mapcar 'semantic-tag-type-members - tagtype)))) - (oset miniscope fullscope rawscope)) + (when miniscope + (let ((rawscope + (apply 'append + (mapcar 'semantic-tag-type-members + tagtype)))) + (oset miniscope fullscope rawscope))) ;; Now analayze the type to remove metatypes. (or (semantic-analyze-type tmp miniscope) tmp)) @@ -351,7 +352,7 @@ Optional argument SCOPE specifies a scope object which has additional tags which are in SCOPE and do not need prefixing to find. -This is a wrapper on top of semanticdb, semanticdb-typecache, +This is a wrapper on top of semanticdb, semanticdb typecache, semantic-scope, and semantic search functions. Almost all searches use the same arguments." (let ((namelst (if (consp name) name ;; test if pre-split. diff --git a/lisp/cedet/semantic/analyze/complete.el b/lisp/cedet/semantic/analyze/complete.el index 959bae407b1..7f0c7d8a22a 100644 --- a/lisp/cedet/semantic/analyze/complete.el +++ b/lisp/cedet/semantic/analyze/complete.el @@ -63,11 +63,15 @@ Used as options when completing.") ;;; MAIN completion calculator ;; ;;;###autoload -(define-overloadable-function semantic-analyze-possible-completions (context) +(define-overloadable-function semantic-analyze-possible-completions (context &rest flags) "Return a list of semantic tags which are possible completions. CONTEXT is either a position (such as point), or a precalculated context. Passing in a context is useful if the caller also needs to access parts of the analysis. +The remaining FLAGS arguments are passed to the mode specific completion engine. +Bad flags should be ignored by modes that don't use them. +See `semantic-analyze-possible-completions-default' for details on the default FLAGS. + Completions run through the following filters: * Elements currently in scope * Constants currently in scope @@ -98,9 +102,13 @@ in a buffer." (get-buffer-window "*Possible Completions*"))) ans))) -(defun semantic-analyze-possible-completions-default (context) +(defun semantic-analyze-possible-completions-default (context &optional flags) "Default method for producing smart completions. -Argument CONTEXT is an object specifying the locally derived context." +Argument CONTEXT is an object specifying the locally derived context. +The optional argument FLAGS changes which return options are returned. +FLAGS can be any number of: + 'no-tc - do not apply data-type constraint. + 'no-unique - do not apply unique by name filtering." (let* ((a context) (desired-type (semantic-analyze-type-constraint a)) (desired-class (oref a prefixclass)) @@ -109,8 +117,13 @@ Argument CONTEXT is an object specifying the locally derived context." (completetext nil) (completetexttype nil) (scope (oref a scope)) - (localvar (oref scope localvar)) - (c nil)) + (localvar (when scope (oref scope localvar))) + (origc nil) + (c nil) + (any nil) + (do-typeconstraint (not (memq 'no-tc flags))) + (do-unique (not (memq 'no-unique flags))) + ) ;; Calculate what our prefix string is so that we can ;; find all our matching text. @@ -160,33 +173,36 @@ Argument CONTEXT is an object specifying the locally derived context." ;; Argument list and local variables (semantic-find-tags-for-completion completetext localvar) ;; The current scope - (semantic-find-tags-for-completion completetext (oref scope fullscope)) + (semantic-find-tags-for-completion completetext (when scope (oref scope fullscope))) ;; The world (semantic-analyze-find-tags-by-prefix completetext)) ) ) - (let ((origc c) + (let ((loopc c) (dtname (semantic-tag-name desired-type))) + ;; Save off our first batch of completions + (setq origc c) + ;; Reset c. (setq c nil) ;; Loop over all the found matches, and catagorize them ;; as being possible features. - (while origc + (while (and loopc do-typeconstraint) (cond ;; Strip operators - ((semantic-tag-get-attribute (car origc) :operator-flag) + ((semantic-tag-get-attribute (car loopc) :operator-flag) nil ) ;; If we are completing from within some prefix, ;; then we want to exclude constructors and destructors ((and completetexttype - (or (semantic-tag-get-attribute (car origc) :constructor-flag) - (semantic-tag-get-attribute (car origc) :destructor-flag))) + (or (semantic-tag-get-attribute (car loopc) :constructor-flag) + (semantic-tag-get-attribute (car loopc) :destructor-flag))) nil ) @@ -197,17 +213,17 @@ Argument CONTEXT is an object specifying the locally derived context." ;; Ok, we now have a completion list based on the text we found ;; we want to complete on. Now filter that stream against the ;; type we want to search for. - ((string= dtname (semantic-analyze-type-to-name (semantic-tag-type (car origc)))) - (setq c (cons (car origc) c)) + ((string= dtname (semantic-analyze-type-to-name (semantic-tag-type (car loopc)))) + (setq c (cons (car loopc) c)) ) ;; Now anything that is a compound type which could contain ;; additional things which are of the desired type - ((semantic-tag-type (car origc)) - (let ((att (semantic-analyze-tag-type (car origc) scope)) + ((semantic-tag-type (car loopc)) + (let ((att (semantic-analyze-tag-type (car loopc) scope)) ) (if (and att (semantic-tag-type-members att)) - (setq c (cons (car origc) c)))) + (setq c (cons (car loopc) c)))) ) ) ; cond @@ -215,11 +231,11 @@ Argument CONTEXT is an object specifying the locally derived context." ;; No desired type, no other restrictions. Just add. (t - (setq c (cons (car origc) c))) + (setq c (cons (car loopc) c))) ); cond - (setq origc (cdr origc))) + (setq loopc (cdr loopc))) (when desired-type ;; Some types, like the enum in C, have special constant values that @@ -241,15 +257,16 @@ Argument CONTEXT is an object specifying the locally derived context." (when desired-class (setq c (semantic-analyze-tags-of-class-list c desired-class))) - ;; Pull out trash. - ;; NOTE TO SELF: Is this too slow? - ;; OTHER NOTE: Do we not want to strip duplicates by name and - ;; only by position? When are duplicate by name but not by tag - ;; useful? - (setq c (semantic-unique-tag-table-by-name c)) + (if do-unique + (if c + ;; Pull out trash. + ;; NOTE TO SELF: Is this too slow? + (setq c (semantic-unique-tag-table-by-name c)) + (setq c (semantic-unique-tag-table-by-name origc))) + (when (not c) + (setq c origc))) ;; All done! - c)) (provide 'semantic/analyze/complete) diff --git a/lisp/cedet/semantic/analyze/debug.el b/lisp/cedet/semantic/analyze/debug.el index 1f253214fcb..490b57bf83a 100644 --- a/lisp/cedet/semantic/analyze/debug.el +++ b/lisp/cedet/semantic/analyze/debug.el @@ -54,6 +54,8 @@ )) +;; @TODO - If this happens, but the last found type is +;; a datatype, then the below is wrong (defun semantic-analyzer-debug-found-prefix (ctxt) "Debug the prefix found by the analyzer output CTXT." (let* ((pf (oref ctxt prefix)) @@ -97,7 +99,7 @@ Argument COMP are possible completions here." ) (with-output-to-temp-buffer (help-buffer) (with-current-buffer standard-output - (princ "Unable to find prefix ") + (princ "Unable to find symbol ") (princ prefix) (princ ".\n\n") @@ -217,7 +219,7 @@ Argument COMP are possible completions here." (when (not dt) (error "Missing Innertype debugger is confused")) (with-output-to-temp-buffer (help-buffer) (with-current-buffer standard-output - (princ "Cannot find prefix \"") + (princ "Cannot find symbol \"") (princ prefixitem) (princ "\" in datatype: ") @@ -550,24 +552,25 @@ PARENT is a possible parent (by nesting) tag." (let ((str (semantic-format-tag-prototype tag parent))) (if (and (semantic-tag-with-position-p tag) (semantic-tag-file-name tag)) - (insert-button str - 'mouse-face 'custom-button-pressed-face - 'tag tag - 'action - `(lambda (button) - (let ((buff nil) - (pnt nil)) - (save-excursion - (semantic-go-to-tag - (button-get button 'tag)) - (setq buff (current-buffer)) - (setq pnt (point))) - (if (get-buffer-window buff) - (select-window (get-buffer-window buff)) - (pop-to-buffer buff t)) - (goto-char pnt) - (pulse-line-hook-function))) - ) + (with-current-buffer standard-output + (insert-button str + 'mouse-face 'custom-button-pressed-face + 'tag tag + 'action + `(lambda (button) + (let ((buff nil) + (pnt nil)) + (save-excursion + (semantic-go-to-tag + (button-get button 'tag)) + (setq buff (current-buffer)) + (setq pnt (point))) + (if (get-buffer-window buff) + (select-window (get-buffer-window buff)) + (pop-to-buffer buff t)) + (goto-char pnt) + (pulse-line-hook-function))) + )) (princ "\"") (princ str) (princ "\"")) diff --git a/lisp/cedet/semantic/analyze/refs.el b/lisp/cedet/semantic/analyze/refs.el index 0ccde88ff4a..ec903f0afcc 100644 --- a/lisp/cedet/semantic/analyze/refs.el +++ b/lisp/cedet/semantic/analyze/refs.el @@ -104,6 +104,7 @@ Use `semantic-analyze-current-tag' to debug this fcn." "Return the implementations derived in the reference analyzer REFS. Optional argument IN-BUFFER indicates that the returned tag should be in an active buffer." (let ((allhits (oref refs rawsearchdata)) + (tag (oref refs :tag)) (impl nil) ) (semanticdb-find-result-mapc @@ -113,7 +114,8 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti (aT (cdr ans)) (aDB (car ans)) ) - (when (not (semantic-tag-prototype-p aT)) + (when (and (not (semantic-tag-prototype-p aT)) + (semantic-tag-similar-p tag aT :prototype-flag :parent)) (when in-buffer (save-excursion (semantic-go-to-tag aT aDB))) (push aT impl)))) allhits) @@ -123,6 +125,7 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti "Return the prototypes derived in the reference analyzer REFS. Optional argument IN-BUFFER indicates that the returned tag should be in an active buffer." (let ((allhits (oref refs rawsearchdata)) + (tag (oref refs :tag)) (proto nil)) (semanticdb-find-result-mapc (lambda (T DB) @@ -131,7 +134,8 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti (aT (cdr ans)) (aDB (car ans)) ) - (when (semantic-tag-prototype-p aT) + (when (and (semantic-tag-prototype-p aT) + (semantic-tag-similar-p tag aT :prototype-flag :parent)) (when in-buffer (save-excursion (semantic-go-to-tag aT aDB))) (push aT proto)))) allhits) @@ -142,8 +146,8 @@ Optional argument IN-BUFFER indicates that the returned tag should be in an acti (defun semantic--analyze-refs-full-lookup (tag scope) "Perform a full lookup for all occurrences of TAG in the current project. TAG should be the tag currently under point. -PARENT is the list of tags that are parents to TAG by -containment, as opposed to reference." +SCOPE is the scope the cursor is in. From this a list of parents is +derived. If SCOPE does not have parents, then only a simple lookup is done." (if (not (oref scope parents)) ;; If this tag has some named parent, but is not (semantic--analyze-refs-full-lookup-simple tag) @@ -177,20 +181,36 @@ CLASS is the class of the tag that ought to be returned." ans)) (defun semantic--analyze-refs-find-tags-with-parent (find-results parents) - "Find in FIND-RESULTS all tags with PARNTS. + "Find in FIND-RESULTS all tags with PARENTS. NAME is the name of the tag needing finding. PARENTS is a list of names." - (let ((ans nil)) + (let ((ans nil) (usingnames nil)) + ;; Loop over the find-results passed in. (semanticdb-find-result-mapc (lambda (tag db) (let* ((p (semantic-tag-named-parent tag)) - (ps (when (stringp p) - (semantic-analyze-split-name p)))) + (ps (when (stringp p) (semantic-analyze-split-name p)))) (when (stringp ps) (setq ps (list ps))) - (when (and ps (equal ps parents)) - ;; We could optimize this, but it seems unlikely. - (push (list db tag) ans)) - )) + (when ps + ;; If there is a perfect match, then use it. + (if (equal ps parents) + (push (list db tag) ans)) + ;; No match, find something from our list of using names. + ;; Do we need to split UN? + (save-excursion + (semantic-go-to-tag tag db) + (setq usingnames nil) + (let ((imports (semantic-ctxt-imported-packages))) + ;; Derive the names from all the using statements. + (mapc (lambda (T) + (setq usingnames + (cons (semantic-format-tag-name-from-anything T) usingnames))) + imports)) + (dolist (UN usingnames) + (when (equal (cons UN ps) parents) + (push (list db tag) ans) + (setq usingnames (cdr usingnames)))) + )))) find-results) ans)) @@ -206,7 +226,7 @@ TAG should be the tag currently under point." ;; Find all hits for the first parent name. (brute (semanticdb-find-tags-collector (lambda (table tags) - (semanticdb-find-tags-by-name-method table name tags) + (semanticdb-deep-find-tags-by-name-method table name tags) ) nil nil t)) ;; Prime the answer. @@ -214,6 +234,7 @@ TAG should be the tag currently under point." ) ;; First parent is already search to initialize "brute". (setq plist (cdr plist)) + ;; Go through the list of parents, and try to find matches. ;; As we cycle through plist, for each level look for NAME, ;; and compare the named-parent, and also dive into the next item of @@ -253,7 +274,8 @@ Only works for tags in the global namespace." (lambda (table tags) (semanticdb-find-tags-by-name-method table name tags) ) - nil nil t)) + nil ;; This may need to be the entire project?? + nil t)) ) (when (and (not brute) (not noerror)) diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index aab87f7eb25..03d370401af 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el @@ -39,6 +39,7 @@ (declare-function semantic-brute-find-tag-by-attribute "semantic/find") (declare-function semanticdb-minor-mode-p "semantic/db-mode") (declare-function semanticdb-needs-refresh-p "semantic/db") +(declare-function semanticdb-typecache-faux-namespace "semantic/db-typecache") (declare-function c-forward-conditional "cc-cmds") (declare-function ede-system-include-path "ede") @@ -158,7 +159,7 @@ part of the preprocessor map.") Each entry is a cons cell like this: ( \"KEYWORD\" . \"REPLACEMENT\" ) Where KEYWORD is the macro that gets replaced in the lexical phase, -and REPLACEMENT is a string that is inserted in it's place. Empty string +and REPLACEMENT is a string that is inserted in its place. Empty string implies that the lexical analyzer will discard KEYWORD when it is encountered. Alternately, it can be of the form: @@ -295,6 +296,7 @@ Moves completely over balanced #if blocks." (cond ((looking-at "^\\s-*#\\s-*if") ;; We found a nested if. Skip it. + ;; @TODO - can we use the new c-scan-conditionals (c-forward-conditional 1)) ((looking-at "^\\s-*#\\s-*elif") ;; We need to let the preprocessor analize this one. @@ -348,7 +350,6 @@ Uses known macro tables in SPP to determine what block to skip." ;; (message "%s %s yes" ift sym) (beginning-of-line) (setq pt (point)) - ;;(c-forward-conditional 1) ;; This skips only a section of a conditional. Once that section ;; is opened, encountering any new #else or related conditional ;; should be skipped. @@ -356,8 +357,8 @@ Uses known macro tables in SPP to determine what block to skip." (setq semantic-lex-end-point (point)) (semantic-push-parser-warning (format "Skip #%s %s" ift sym) pt (point)) -;; (semantic-lex-push-token -;; (semantic-lex-token 'c-preprocessor-skip pt (point))) + ;; (semantic-lex-push-token + ;; (semantic-lex-token 'c-preprocessor-skip pt (point))) nil) ;; Else, don't ignore it, but do handle the internals. ;;(message "%s %s no" ift sym) @@ -703,58 +704,60 @@ the regular parser." (symtext (semantic-lex-token-text lexicaltoken)) (macros (get-text-property 0 'macros symtext)) ) - (with-current-buffer buf - (erase-buffer) - (when (not (eq major-mode mode)) - (save-match-data + (if (> semantic-c-parse-token-hack-depth 5) + nil + (with-current-buffer buf + (erase-buffer) + (when (not (eq major-mode mode)) + (save-match-data - ;; Protect against user hooks throwing errors. - (condition-case nil - (funcall mode) - (error - (if (y-or-n-p - (format "There was an error initializing %s in buffer \"%s\". Debug your hooks? " - mode (buffer-name))) - (semantic-c-debug-mode-init mode) - (message "Macro parsing state may be broken...") - (sit-for 1)))) - ) ; save match data + ;; Protect against user hooks throwing errors. + (condition-case nil + (funcall mode) + (error + (if (y-or-n-p + (format "There was an error initializing %s in buffer \"%s\". Debug your hooks? " + mode (buffer-name))) + (semantic-c-debug-mode-init mode) + (message "Macro parsing state may be broken...") + (sit-for 1)))) + ) ; save match data - ;; Hack in mode-local - (activate-mode-local-bindings) - ;; CHEATER! The following 3 lines are from - ;; `semantic-new-buffer-fcn', but we don't want to turn - ;; on all the other annoying modes for this little task. - (setq semantic-new-buffer-fcn-was-run t) - (semantic-lex-init) - (semantic-clear-toplevel-cache) - (remove-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook - t) - ) - ;; Get the macro symbol table right. - (setq semantic-lex-spp-dynamic-macro-symbol-obarray spp-syms) - ;; (message "%S" macros) - (dolist (sym macros) - (semantic-lex-spp-symbol-set (car sym) (cdr sym))) + ;; Hack in mode-local + (activate-mode-local-bindings) + ;; CHEATER! The following 3 lines are from + ;; `semantic-new-buffer-fcn', but we don't want to turn + ;; on all the other annoying modes for this little task. + (setq semantic-new-buffer-fcn-was-run t) + (semantic-lex-init) + (semantic-clear-toplevel-cache) + (remove-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook + t) + ) + ;; Get the macro symbol table right. + (setq semantic-lex-spp-dynamic-macro-symbol-obarray spp-syms) + ;; (message "%S" macros) + (dolist (sym macros) + (semantic-lex-spp-symbol-set (car sym) (cdr sym))) - (insert symtext) + (insert symtext) - (setq stream - (semantic-parse-region-default - (point-min) (point-max) nonterminal depth returnonerror)) + (setq stream + (semantic-parse-region-default + (point-min) (point-max) nonterminal depth returnonerror)) - ;; Clean up macro symbols - (dolist (sym macros) - (semantic-lex-spp-symbol-remove (car sym))) + ;; Clean up macro symbols + (dolist (sym macros) + (semantic-lex-spp-symbol-remove (car sym))) - ;; Convert the text of the stream. - (dolist (tag stream) - ;; Only do two levels here 'cause I'm lazy. - (semantic--tag-set-overlay tag (list start end)) - (dolist (stag (semantic-tag-components-with-overlays tag)) - (semantic--tag-set-overlay stag (list start end)) - )) - ) + ;; Convert the text of the stream. + (dolist (tag stream) + ;; Only do two levels here 'cause I'm lazy. + (semantic--tag-set-overlay tag (list start end)) + (dolist (stag (semantic-tag-components-with-overlays tag)) + (semantic--tag-set-overlay stag (list start end)) + )) + )) stream)) (defvar semantic-c-debug-mode-init-last-mode nil @@ -920,8 +923,34 @@ now. ;; of type "typedef". ;; Each elt of NAME is ( STARS NAME ) (let ((vl nil) - (names (semantic-tag-name tag))) + (names (semantic-tag-name tag)) + (super (semantic-tag-get-attribute tag :superclasses)) + (addlast nil)) + + (when (and (semantic-tag-of-type-p tag "typedef") + (semantic-tag-of-class-p super 'type) + (semantic-tag-type-members super)) + ;; This is a typedef of a real type. Extract + ;; the super class, and stick it into the tags list. + (setq addlast super) + + ;; Clone super and remove the members IFF super has a name. + ;; Note: anonymous struct/enums that are typedef'd shouldn't + ;; exist in the top level type list, so they will appear only + ;; in the :typedef slot of the typedef. + (setq super (semantic-tag-clone super)) + (if (not (string= (semantic-tag-name super) "")) + (semantic-tag-put-attribute super :members nil) + (setq addlast nil)) + + ;; Add in props to the full superclass. + (when addlast + (semantic--tag-copy-properties tag addlast) + (semantic--tag-set-overlay addlast (semantic-tag-overlay tag))) + ) + (while names + (setq vl (cons (semantic-tag-new-type (nth 1 (car names)) ; name "typedef" @@ -938,16 +967,18 @@ now. ;; is expanded out as. Just the ;; name shows up as a parent of this ;; typedef. - :typedef - (semantic-tag-get-attribute tag :superclasses) + :typedef super ;;(semantic-tag-type-superclasses tag) :documentation (semantic-tag-docstring tag)) vl)) (semantic--tag-copy-properties tag (car vl)) - (semantic--tag-set-overlay (car vl) - (semantic-tag-overlay tag)) + (semantic--tag-set-overlay (car vl) (semantic-tag-overlay tag)) (setq names (cdr names))) + + ;; Add typedef superclass last. + (when addlast (setq vl (cons addlast vl))) + vl)) ((and (listp (car tag)) (semantic-tag-of-class-p (car tag) 'variable)) @@ -999,6 +1030,7 @@ Optional argument STAR and REF indicate the number of * and & in the typedef." (car tokenpart))) (and (stringp (car (nth 2 tokenpart))) (string= (car (nth 2 tokenpart)) (car tokenpart))) + (nth 10 tokenpart) ; initializers ) (not (car (nth 3 tokenpart))))) (fcnpointer (string-match "^\\*" (car tokenpart))) @@ -1029,7 +1061,10 @@ Optional argument STAR and REF indicate the number of * and & in the typedef." (semantic-tag-new-type ;; name (or (car semantic-c-classname) - (car (nth 2 tokenpart))) + (let ((split (semantic-analyze-split-name-c-mode + (car (nth 2 tokenpart))))) + (if (stringp split) split + (car (last split))))) ;; type (or (cdr semantic-c-classname) "class") @@ -1580,6 +1615,48 @@ DO NOT return the list of tags encompassing point." tagreturn )) +(define-mode-local-override semantic-ctxt-imported-packages c++-mode (&optional point) + "Return the list of using tag types in scope of POINT." + (when point (goto-char (point))) + (let ((tagsaroundpoint (semantic-find-tag-by-overlay)) + (namereturn nil) + (tmp nil) + ) + ;; Collect using statements from the top level. + (setq tmp (semantic-find-tags-by-class 'using (current-buffer))) + (dolist (T tmp) (setq namereturn (cons (semantic-tag-type T) namereturn))) + ;; Move through the tags around point looking for more using statements + (while (cdr tagsaroundpoint) ; don't search the last one + (setq tmp (semantic-find-tags-by-class 'using (semantic-tag-components (car tagsaroundpoint)))) + (dolist (T tmp) (setq namereturn (cons (semantic-tag-type T) namereturn))) + (setq tagsaroundpoint (cdr tagsaroundpoint)) + ) + namereturn)) + +(define-mode-local-override semanticdb-expand-nested-tag c++-mode (tag) + "Expand TAG if it has a fully qualified name. +For types with a :parent, create faux namespaces to put TAG into." + (let ((p (semantic-tag-get-attribute tag :parent))) + (if (and p (semantic-tag-of-class-p tag 'type)) + ;; Expand the tag + (let ((s (semantic-analyze-split-name p)) + (newtag (semantic-tag-copy tag nil t))) + ;; Erase the qualified name. + (semantic-tag-put-attribute newtag :parent nil) + ;; Fixup the namespace name + (setq s (if (stringp s) (list s) (nreverse s))) + ;; Loop over all the parents, creating the nested + ;; namespace. + (require 'semantic/db-typecache) + (dolist (namespace s) + (setq newtag (semanticdb-typecache-faux-namespace + namespace (list newtag))) + ) + ;; Return the last created namespace. + newtag) + ;; Else, return tag unmodified. + tag))) + (define-mode-local-override semantic-get-local-variables c++-mode () "Do what `semantic-get-local-variables' does, plus add `this' if needed." (let* ((origvar (semantic-get-local-variables-default)) @@ -1759,7 +1836,9 @@ DO NOT return the list of tags encompassing point." (princ "\n") )) - (when (arrayp semantic-lex-spp-project-macro-symbol-obarray) + (when (and (boundp 'ede-object) + ede-object + (arrayp semantic-lex-spp-project-macro-symbol-obarray)) (princ "\n Project symbol map:\n") (when (and (boundp 'ede-object) ede-object) (princ " Your project symbol map is derived from the EDE object:\n ") diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el index d72b12083a0..1f8ee260ade 100644 --- a/lisp/cedet/semantic/complete.el +++ b/lisp/cedet/semantic/complete.el @@ -1206,6 +1206,27 @@ Uses semanticdb for searching all tags in the current project." (require 'semantic/db-find) (semanticdb-brute-deep-find-tags-for-completion prefix (oref obj path))) +;;; Current Datatype member search. +(defclass semantic-collector-local-members (semantic-collector-project-abstract) + ((scope :initform nil + :type (or null semantic-scope-cache) + :documentation + "The scope the local members are being completed from.")) + "Completion engine for tags in a project.") + +(defmethod semantic-collector-calculate-completions-raw + ((obj semantic-collector-local-members) prefix completionlist) + "Calculate the completions for prefix from completionlist." + (let* ((scope (or (oref obj scope) + (oset obj scope (semantic-calculate-scope)))) + (localstuff (oref scope scope))) + (list + (cons + (oref scope :table) + (semantic-find-tags-for-completion prefix localstuff))))) + ;(semanticdb-brute-deep-find-tags-for-completion prefix (oref obj path)))) + +;;; Smart completion collector (defclass semantic-collector-analyze-completions (semantic-collector-abstract) ((context :initarg :context :type semantic-analyze-context @@ -1800,6 +1821,28 @@ HISTORY is a symbol representing a variable to store the history in." history) ) +(defun semantic-complete-read-tag-local-members (prompt &optional + default-tag + initial-input + history) + "Ask for a tag by name from the local type members. +Available tags are from the the current scope. +Completion options are presented in a traditional way, with highlighting +to resolve same-name collisions. +PROMPT is a string to prompt with. +DEFAULT-TAG is a semantic tag or string to use as the default value. +If INITIAL-INPUT is non-nil, insert it in the minibuffer initially. +HISTORY is a symbol representing a variable to store the history in." + (semantic-complete-read-tag-engine + (semantic-collector-local-members prompt :buffer (current-buffer)) + (semantic-displayor-traditional-with-focus-highlight "simple") + ;;(semantic-displayor-tooltip "simple") + prompt + default-tag + initial-input + history) + ) + (defun semantic-complete-read-tag-project (prompt &optional default-tag initial-input @@ -1979,7 +2022,7 @@ completion works." ;;;###autoload (defun semantic-complete-jump-local () - "Jump to a semantic symbol." + "Jump to a local semantic symbol." (interactive) (let ((tag (semantic-complete-read-tag-buffer-deep "Jump to symbol: "))) (when (semantic-tag-p tag) @@ -2004,6 +2047,23 @@ completion works." (semantic-tag-class tag) (semantic-tag-name tag))))) +;;;###autoload +(defun semantic-complete-jump-local-members () + "Jump to a semantic symbol." + (interactive) + (let* ((tag (semantic-complete-read-tag-local-members "Jump to symbol: "))) + (when (semantic-tag-p tag) + (let ((start (condition-case nil (semantic-tag-start tag) + (error nil)))) + (unless start + (error "Tag %s has no location" (semantic-format-tag-prototype tag))) + (push-mark) + (goto-char start) + (semantic-momentary-highlight-tag tag) + (message "%S: %s " + (semantic-tag-class tag) + (semantic-tag-name tag)))))) + ;;;###autoload (defun semantic-complete-analyze-and-replace () "Perform prompt completion to do in buffer completion. @@ -2075,15 +2135,17 @@ use `semantic-complete-analyze-inline' to complete." ;; Prepare for doing completion, but exit quickly if there is keyboard ;; input. - (when (and (not (semantic-exit-on-input 'csi - (semantic-fetch-tags) - (semantic-throw-on-input 'csi) - nil)) - (= arg 1) - (not (semantic-exit-on-input 'csi - (semantic-analyze-current-context) - (semantic-throw-on-input 'csi) - nil))) + (when (save-window-excursion + (save-excursion + (and (not (semantic-exit-on-input 'csi + (semantic-fetch-tags) + (semantic-throw-on-input 'csi) + nil)) + (= arg 1) + (not (semantic-exit-on-input 'csi + (semantic-analyze-current-context) + (semantic-throw-on-input 'csi) + nil))))) (condition-case nil (semantic-complete-analyze-inline) ;; Ignore errors. Seems likely that we'll get some once in a while. diff --git a/lisp/cedet/semantic/ctxt.el b/lisp/cedet/semantic/ctxt.el index 3561bc7bea1..b158adffc14 100644 --- a/lisp/cedet/semantic/ctxt.el +++ b/lisp/cedet/semantic/ctxt.el @@ -599,12 +599,18 @@ that may or may not have a name.)") "Return a list of scoped types by name for the current context at POINT. This is very different for various languages, and does nothing unless overridden." - (if point (goto-char point)) - (let ((case-fold-search semantic-case-fold)) - ;; We need to look at TYPES within the bounds of locally parse arguments. - ;; C needs to find using statements and the like too. Bleh. - nil - )) + nil) + +(define-overloadable-function semantic-ctxt-imported-packages (&optional point) + "Return a list of package tags or names which are being imported at POINT. +The return value is a list of strings which are package names +that are implied in code. Thus a C++ symbol: + foo::bar(); +where there is a statement such as: + using baz; +means that the first symbol might be: + baz::foo::bar();" + nil) (provide 'semantic/ctxt) diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el index 95d634920b5..3c96290cc93 100644 --- a/lisp/cedet/semantic/db-file.el +++ b/lisp/cedet/semantic/db-file.el @@ -245,7 +245,7 @@ If DB is not specified, then use the current database." ;; @todo - It should ask if we are not called from a hook. ;; How? (if (or supress-questions - (y-or-n-p (format "Skip Error: %S ?" (car (cdr foo))))) + (y-or-n-p (format "Skip Error: %s ?" (car (cdr foo))))) (message "Save Error: %S: %s" (car (cdr foo)) objname) (error "%S" (car (cdr foo)))))))) diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el index 4c2626ca8bd..b266fc8bdfc 100644 --- a/lisp/cedet/semantic/db-find.el +++ b/lisp/cedet/semantic/db-find.el @@ -202,7 +202,7 @@ This class will cache data derived during various searches.") (when (oref idx type-cache) (semantic-reset (oref idx type-cache))) ;; Clear the scope. Scope doesn't have the data it needs to track - ;; it's own reset. + ;; its own reset. (semantic-scope-reset-cache) ) @@ -262,13 +262,13 @@ This class will cache data derived during various searches.") "Translate PATH into a list of semantic tables. Path translation involves identifying the PATH input argument in one of the following ways: - nil - Take the current buffer, and use it's include list + nil - Take the current buffer, and use its include list buffer - Use that buffer's include list. filename - Use that file's include list. If the file is not in a buffer, see of there is a semanticdb table for it. If not, read that file into a buffer. tag - Get that tag's buffer of file file. See above. - table - Search that table, and it's include list. + table - Search that table, and its include list. find result - Search the results of a previous find. In addition, once the base path is found, there is the possibility of @@ -1006,9 +1006,14 @@ is still made current." (when norm ;; The normalized tags can now be found based on that ;; tags table. - (semanticdb-set-buffer (car norm)) - ;; Now reset ans - (setq ans (cdr norm)) + (condition-case foo + (progn + (semanticdb-set-buffer (car norm)) + ;; Now reset ans + (setq ans (cdr norm))) + ;; Don't error for this case, but don't store + ;; the thing either. + (no-method-definition nil)) )) ) ;; Return the tag. @@ -1019,10 +1024,10 @@ is still made current." FCN takes two arguments. The first is a TAG, and the second is a DB from whence TAG originated. Returns result." - (mapc (lambda (sublst) - (mapc (lambda (tag) - (funcall fcn tag (car sublst))) - (cdr sublst))) + (mapc (lambda (sublst-icky) + (mapc (lambda (tag-icky) + (funcall fcn tag-icky (car sublst-icky))) + (cdr sublst-icky))) result) result) diff --git a/lisp/cedet/semantic/db-global.el b/lisp/cedet/semantic/db-global.el index 444efbd17e0..3d827b9ede0 100644 --- a/lisp/cedet/semantic/db-global.el +++ b/lisp/cedet/semantic/db-global.el @@ -93,7 +93,7 @@ if optional DONT-ERR-IF-NOT-AVAILABLE is non-nil; else throw an error." '(omniscience)) ) (if dont-err-if-not-available - (message "No Global support in %s" default-directory) + nil; (message "No Global support in %s" default-directory) (error "No Global support in %s" default-directory)) )) diff --git a/lisp/cedet/semantic/db-typecache.el b/lisp/cedet/semantic/db-typecache.el index d7c4f0a5abd..71b15fdf82a 100644 --- a/lisp/cedet/semantic/db-typecache.el +++ b/lisp/cedet/semantic/db-typecache.el @@ -217,6 +217,14 @@ Adds a filename and copies the tags." (semanticdb-full-filename table) tags)) +(defun semanticdb-typecache-faux-namespace (name members) + "Create a new namespace tag with NAME and a set of MEMBERS. +The new tag will be a faux tag, used as a placeholder in a typecache." + (let ((tag (semantic-tag-new-type name "namespace" members nil))) + ;; Make sure we mark this as a fake tag. + (semantic-tag-set-faux tag) + tag)) + (defun semanticdb-typecache-merge-streams (cache1 cache2) "Merge into CACHE1 and CACHE2 together. The Caches will be merged in place." (if (or (and (not cache1) (not cache2)) @@ -256,23 +264,22 @@ Adds a filename and copies the tags." (setq ans (cons next ans)) ;; ELSE - We have a NAME match. (setq type (semantic-tag-type next)) - (if (semantic-tag-of-type-p prev type) ; Are they the same datatype + (if (or (semantic-tag-of-type-p prev type) ; Are they the same datatype + (semantic-tag-faux-p prev) + (semantic-tag-faux-p next) ; or either a faux tag? + ) ;; Same Class, we can do a merge. (cond ((and (semantic-tag-of-class-p next 'type) (string= type "namespace")) ;; Namespaces - merge the children together. (setcar ans - (semantic-tag-new-type + (semanticdb-typecache-faux-namespace (semantic-tag-name prev) ; - they are the same - "namespace" ; - we know this as fact (semanticdb-typecache-merge-streams (semanticdb-typecache-safe-tag-members prev) (semanticdb-typecache-safe-tag-members next)) - nil ; - no attributes )) - ;; Make sure we mark this as a fake tag. - (semantic-tag-set-faux (car ans)) ) ((semantic-tag-prototype-p next) ;; NEXT is a prototype... so keep previous. @@ -299,6 +306,12 @@ Adds a filename and copies the tags." ;;; Refresh / Query API ;; ;; Queries that can be made for the typecache. +(define-overloadable-function semanticdb-expand-nested-tag (tag) + "Expand TAG from fully qualified names. +If TAG has fully qualified names, expand it to a series of nested +namespaces instead." + tag) + (defmethod semanticdb-typecache-file-tags ((table semanticdb-abstract-table)) "No tags available from non-file based tables." nil) @@ -313,10 +326,13 @@ all included files." ;; Make sure our file-tags list is up to date. (when (not (oref cache filestream)) - (let ((tags (semantic-find-tags-by-class 'type table))) + (let ((tags (semantic-find-tags-by-class 'type table)) + (exptags nil)) (when tags (setq tags (semanticdb-typecache-safe-tag-list tags table)) - (oset cache filestream (semanticdb-typecache-merge-streams tags nil))))) + (dolist (T tags) + (push (semanticdb-expand-nested-tag T) exptags)) + (oset cache filestream (semanticdb-typecache-merge-streams exptags nil))))) ;; Return our cache. (oref cache filestream) @@ -372,6 +388,7 @@ a master list." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Search Routines +;; ;;;###autoload (define-overloadable-function semanticdb-typecache-find (type &optional path find-file-match) "Search the typecache for TYPE in PATH. @@ -386,16 +403,20 @@ TYPE is the datatype to find. PATH is the search path, which should be one table object. If FIND-FILE-MATCH is non-nil, then force the file belonging to the found tag to be loaded." - (semanticdb-typecache-find-method (or path semanticdb-current-table) - type find-file-match)) + (if (not (and (featurep 'semanticdb) semanticdb-current-database)) + nil ;; No DB, no search + (save-excursion + (semanticdb-typecache-find-method (or path semanticdb-current-table) + type find-file-match)))) (defun semanticdb-typecache-find-by-name-helper (name table) "Find the tag with NAME in TABLE, which is from a typecache. If more than one tag has NAME in TABLE, we will prefer the tag that is of class 'type." (let* ((names (semantic-find-tags-by-name name table)) - (types (semantic-find-tags-by-class 'type names))) - (or (car-safe types) (car-safe names)))) + (nmerge (semanticdb-typecache-merge-streams names nil)) + (types (semantic-find-tags-by-class 'type nmerge))) + (or (car-safe types) (car-safe nmerge)))) (defmethod semanticdb-typecache-find-method ((table semanticdb-abstract-table) type find-file-match) diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el index 3f638a212f0..3ce774b0a99 100644 --- a/lisp/cedet/semantic/db.el +++ b/lisp/cedet/semantic/db.el @@ -542,10 +542,25 @@ Optional argument FORCE will force a refresh even if the file in question is not in a buffer. Avoid using FORCE for most uses, as an old cache may be sufficient for the general case. Forced updates can be slow. This will call `semantic-fetch-tags' if that file is in memory." - (when (or (semanticdb-in-buffer-p obj) force) + (cond + ;; + ;; Already in a buffer, just do it. + ((semanticdb-in-buffer-p obj) + (semanticdb-set-buffer obj) + (semantic-fetch-tags)) + ;; + ;; Not in a buffer. Forcing a load. + (force + ;; Patch from Iain Nicol. -- + ;; @TODO: I wonder if there is a way to recycle + ;; semanticdb-create-table-for-file-not-in-buffer (save-excursion - (semanticdb-set-buffer obj) - (semantic-fetch-tags)))) + (let ((buff (semantic-find-file-noselect + (semanticdb-full-filename obj)))) + (set-buffer buff) + (semantic-fetch-tags) + ;; Kill off the buffer if it didn't exist when we were called. + (kill-buffer buff)))))) (defmethod semanticdb-needs-refresh-p ((obj semanticdb-table)) "Return non-nil of OBJ's tag list is out of date. @@ -808,12 +823,14 @@ Always append `semanticdb-project-system-databases' if (setq root (run-hook-with-args-until-success 'semanticdb-project-root-functions dir)) - ;; Find roots based on strings - (while (and roots (not root)) - (let ((r (file-truename (car roots)))) - (if (string-match (concat "^" (regexp-quote r)) dir) - (setq root r))) - (setq roots (cdr roots))) + (if root + (setq root (file-truename root)) + ;; Else, Find roots based on strings + (while roots + (let ((r (file-truename (car roots)))) + (if (string-match (concat "^" (regexp-quote r)) dir) + (setq root r))) + (setq roots (cdr roots)))) ;; If no roots are found, use this directory. (unless root (setq root dir)) diff --git a/lisp/cedet/semantic/decorate.el b/lisp/cedet/semantic/decorate.el index 314ca2bf46d..f28ce1741f1 100644 --- a/lisp/cedet/semantic/decorate.el +++ b/lisp/cedet/semantic/decorate.el @@ -45,7 +45,7 @@ Optional FACE specifies the face to use." )) (defun semantic-unhighlight-tag (tag) - "Unhighlight TAG, restoring it's previous face." + "Unhighlight TAG, restoring its previous face." (let ((o (semantic-tag-overlay tag))) (semantic-overlay-put o 'face (car (semantic-overlay-get o 'old-face))) (semantic-overlay-put o 'old-face (cdr (semantic-overlay-get o 'old-face))) diff --git a/lisp/cedet/semantic/decorate/include.el b/lisp/cedet/semantic/decorate/include.el index 94273dcfaf7..3d6013b7339 100644 --- a/lisp/cedet/semantic/decorate/include.el +++ b/lisp/cedet/semantic/decorate/include.el @@ -118,7 +118,7 @@ Used by the decoration style: `semantic-decoration-on-includes'." '((((class color) (background dark)) (:background "#900000")) (((class color) (background light)) - (:background "#ff5050"))) + (:background "#fff0f0"))) "*Face used to show includes that cannot be found. Used by the decoration style: `semantic-decoration-on-unknown-includes'." :group 'semantic-faces) @@ -302,16 +302,19 @@ This mode provides a nice context menu on the include statements." ) )) - (let ((ol (semantic-decorate-tag tag - (semantic-tag-start tag) - (semantic-tag-end tag) - face)) - ) - (semantic-overlay-put ol 'mouse-face 'highlight) - (semantic-overlay-put ol 'keymap map) - (semantic-overlay-put ol 'help-echo - "Header File : mouse-3 - Context menu") - ))) + ;; @TODO - if not a tag w/ a position, we need to get one. How? + + (when (semantic-tag-with-position-p tag) + (let ((ol (semantic-decorate-tag tag + (semantic-tag-start tag) + (semantic-tag-end tag) + face)) + ) + (semantic-overlay-put ol 'mouse-face 'highlight) + (semantic-overlay-put ol 'keymap map) + (semantic-overlay-put ol 'help-echo + "Header File : mouse-3 - Context menu") + )))) ;;; Regular Include Functions ;; diff --git a/lisp/cedet/semantic/dep.el b/lisp/cedet/semantic/dep.el index b36e25c6220..c05650caec7 100644 --- a/lisp/cedet/semantic/dep.el +++ b/lisp/cedet/semantic/dep.el @@ -208,7 +208,8 @@ provided mode, not from the current major mode." mode 'semantic-dependency-system-include-path)) (edesys (when (and (featurep 'ede) ede-minor-mode ede-object) - (ede-system-include-path ede-object))) + (ede-system-include-path + (if (listp ede-object) (car ede-object) ede-object)))) (locp (mode-local-value mode 'semantic-dependency-include-path)) (found nil)) diff --git a/lisp/cedet/semantic/doc.el b/lisp/cedet/semantic/doc.el index c8a3c12e1b2..aca01bd9830 100644 --- a/lisp/cedet/semantic/doc.el +++ b/lisp/cedet/semantic/doc.el @@ -78,7 +78,8 @@ just the lexical token and not the string." (start (if starttag (semantic-tag-end starttag) (point-min)))) - (when (re-search-backward comment-start-skip start t) + (when (and comment-start-skip + (re-search-backward comment-start-skip start t)) ;; We found a comment that doesn't belong to the body ;; of a function. (semantic-doc-snarf-comment-for-tag nosnarf))) diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el index b7e5f7f7a0e..49790861632 100644 --- a/lisp/cedet/semantic/fw.el +++ b/lisp/cedet/semantic/fw.el @@ -310,6 +310,17 @@ FILE, NOWARN, RAWFILE, and WILDCARDS are passed into `find-file-noselect'" (find-file-noselect file nowarn rawfile wildcards))) )) +;;; Database restriction settings +;; +(defmacro semanticdb-without-unloaded-file-searches (forms) + "Execute FORMS with `unloaded' removed from the current throttle." + `(let ((semanticdb-find-default-throttle + (if (featurep 'semanticdb-find) + (remq 'unloaded semanticdb-find-default-throttle) + nil))) + ,forms)) +(put 'semanticdb-without-unloaded-file-searches 'lisp-indent-function 1) + ;; ;;; Editor goodies ;-) ;; ;; diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index 8f5d1cd3e14..65365768f98 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -928,6 +928,12 @@ Lisp code." ;; If running interactively, eval declarations and epilogue ;; code, then pop to the buffer visiting the generated file. (eval-region (point) (point-max)) + ;; Loop over the defvars and eval them explicitly to force + ;; them to be evaluated and ready to use. + (goto-char (point-min)) + (while (re-search-forward "(defvar " nil t) + (eval-defun nil)) + ;; Move cursor to a logical spot in the generated code. (goto-char (point-min)) (pop-to-buffer (current-buffer)) ;; The generated code has been evaluated and updated into diff --git a/lisp/cedet/semantic/html.el b/lisp/cedet/semantic/html.el index 1a7ada02e34..7597370dff5 100644 --- a/lisp/cedet/semantic/html.el +++ b/lisp/cedet/semantic/html.el @@ -243,6 +243,7 @@ tag with greater section value than LEVEL is found." semantic-imenu-bucketize-file nil semantic-imenu-bucketize-type-members nil senator-step-at-start-end-tag-classes '(section) + senator-step-at-tag-classes '(section) semantic-stickyfunc-sticky-classes '(section) ) (semantic-install-function-overrides diff --git a/lisp/cedet/semantic/ia.el b/lisp/cedet/semantic/ia.el index 710b52f37d6..c7e1458fa3f 100644 --- a/lisp/cedet/semantic/ia.el +++ b/lisp/cedet/semantic/ia.el @@ -40,7 +40,8 @@ (require 'pulse) (eval-when-compile (require 'semantic/analyze) - (require 'semantic/analyze/refs)) + (require 'semantic/analyze/refs) + (require 'semantic/find)) (declare-function imenu--mouse-menu "imenu") @@ -57,14 +58,6 @@ :group 'semantic :type semantic-format-tag-custom-list) -(defvar semantic-ia-cache nil - "Cache of the last completion request. -Of the form ( POINT . COMPLETIONS ) where POINT is a location in the -buffer where the completion was requested. COMPLETONS is the list -of semantic tag names that provide logical completions from that -location.") -(make-variable-buffer-local 'semantic-ia-cache) - ;;; COMPLETION HELPER ;; ;; This overload function handles inserting a tag @@ -86,23 +79,16 @@ location.") (insert "(")) (t nil)))) -(declare-function semantic-analyze-possible-completions - "semantic/analyze/complete") +(defalias 'semantic-ia-get-completions 'semantic-ia-get-completions-deprecated + "`Semantic-ia-get-completions' is obsolete. +Use `semantic-analyze-possible-completions' instead.") -(defun semantic-ia-get-completions (context point) - "Fetch the completion of CONTEXT at POINT. -Supports caching." - ;; Cache the current set of symbols so that we can get at - ;; them quickly the second time someone presses the - ;; complete button. - (let ((symbols - (if (and semantic-ia-cache - (= point (car semantic-ia-cache))) - (cdr semantic-ia-cache) - (semantic-analyze-possible-completions context)))) - ;; Set the cache - (setq semantic-ia-cache (cons point symbols)) - symbols)) +(defun semantic-ia-get-completions-deprecated (context point) + "A function to help transition away from `semantic-ia-get-completions'. +Return completions based on CONTEXT at POINT. +You should not use this, nor the aliased version. +Use `semantic-analyze-possible-completions' instead." + (semantic-analyze-possible-completions context)) ;;;###autoload (defun semantic-ia-complete-symbol (&optional pos) @@ -119,7 +105,7 @@ Completion options are calculated with `semantic-analyze-possible-completions'." ;; ;; The second step derives completions from that context. (let* ((a (semantic-analyze-current-context pos)) - (syms (semantic-ia-get-completions a pos)) + (syms (semantic-analyze-possible-completions a)) (pre (car (reverse (oref a prefix))))) ;; If PRE was actually an already completed symbol, it doesn't ;; come in as a string, but as a tag instead. @@ -173,7 +159,7 @@ Completion options are calculated with `semantic-analyze-possible-completions'." "Pop up a tooltip for completion at POINT." (interactive "d") (let* ((a (semantic-analyze-current-context point)) - (syms (semantic-ia-get-completions a point)) + (syms (semantic-analyze-possible-completions a)) (x (mod (- (current-column) (window-hscroll)) (window-width))) (y (save-excursion @@ -212,8 +198,48 @@ Completion options are calculated with `semantic-analyze-possible-completions'." ;; tag associated with the current context. (semantic-analyze-interesting-tag ctxt))) ) - (when pf - (message "%s" (semantic-format-tag-summarize pf nil t))))) + (if pf + (message "%s" (semantic-format-tag-summarize pf nil t)) + (message "No summary info availalble")))) + +;;; Variants +;; +;; Show all variants for the symbol under point. + +;;;###autoload +(defun semantic-ia-show-variants (point) + "Display a list of all variants for the symbol under POINT." + (interactive "P") + (let* ((ctxt (semantic-analyze-current-context point)) + (comp nil)) + + ;; We really want to look at the function if we are on an + ;; argument. Are there some additional rules we care about for + ;; changing the CTXT we look at? + (when (semantic-analyze-context-functionarg-p ctxt) + (goto-char (cdr (oref ctxt bounds))) + (setq ctxt (semantic-analyze-current-context (point)))) + + ;; Get the "completion list", but remove ALL filters to get the master list + ;; of all the possible things. + (setq comp (semantic-analyze-possible-completions ctxt 'no-unique 'no-tc)) + + ;; Special case for a single type. List the constructors? + (when (and (= (length comp) 1) (semantic-tag-of-class-p (car comp) 'type)) + (setq comp (semantic-find-tags-by-name (semantic-tag-name (car comp)) + (semantic-tag-type-members (car comp))))) + + ;; Display the results. + (cond ((= (length comp) 0) + (message "No Variants found.")) + ((= (length comp) 1) + (message "%s" (semantic-format-tag-summarize (car comp) nil t))) + (t + (with-output-to-temp-buffer "*Symbol Variants*" + (semantic-analyze-princ-sequence comp "" (current-buffer))) + (shrink-window-if-larger-than-buffer + (get-buffer-window "*Symbol Variants*"))) + ))) ;;; FAST Jump ;; @@ -354,18 +380,21 @@ See `semantic-ia-fast-jump' for details on how it works. ;; The default tries to find a comment in front of the tag ;; and then strings off comment prefixes. (let ((doc (semantic-documentation-for-tag (car pf)))) - (with-output-to-temp-buffer "*TAG DOCUMENTATION*" - (princ "Tag: ") - (princ (semantic-format-tag-prototype (car pf))) - (princ "\n") - (princ "\n") - (princ "Snarfed Documentation: ") - (princ "\n") - (princ "\n") - (if doc - (princ doc) - (princ " Documentation unavailable.")) - ))) + (if (or (null doc) (string= doc "")) + (message "Doc unavailable for: %s" + (semantic-format-tag-prototype (car pf))) + (with-output-to-temp-buffer "*TAG DOCUMENTATION*" + (princ "Tag: ") + (princ (semantic-format-tag-prototype (car pf))) + (princ "\n") + (princ "\n") + (princ "Snarfed Documentation: ") + (princ "\n") + (princ "\n") + (if doc + (princ doc) + (princ " Documentation unavailable.")) + )))) (t (message "Unknown tag."))) )) diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index a2db3b549d6..585ad693dc8 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el @@ -49,6 +49,7 @@ (defvar eldoc-last-message) (declare-function eldoc-message "eldoc") (declare-function semantic-analyze-interesting-tag "semantic/analyze") +(declare-function semantic-analyze-unsplit-name "semantic/analyze/fcn") (declare-function semantic-complete-analyze-inline-idle "semantic/complete") (declare-function semanticdb-deep-find-tags-by-name "semantic/db-find") (declare-function semanticdb-save-all-db-idle "semantic/db") @@ -294,12 +295,18 @@ call additional functions registered with the timer calls." ;; ;; Unlike the shorter timer, the WORK timer will kick of tasks that ;; may take a long time to complete. -(defcustom semantic-idle-work-parse-neighboring-files-flag t +(defcustom semantic-idle-work-parse-neighboring-files-flag nil "*Non-nil means to parse files in the same dir as the current buffer. Disable to prevent lots of excessive parsing in idle time." :group 'semantic :type 'boolean) +(defcustom semantic-idle-work-update-headers-flag nil + "*Non-nil means to parse through header files in idle time. +Disable to prevent idle time parsing of many files. If completion +is called that work will be done then instead." + :group 'semantic + :type 'boolean) (defun semantic-idle-work-for-one-buffer (buffer) "Do long-processing work for BUFFER. @@ -312,6 +319,9 @@ Returns t if all processing succeeded." (semantic-idle-scheduler-refresh-tags) t) + ;; Option to disable this work. + semantic-idle-work-update-headers-flag + ;; Force all our include files to get read in so we ;; are ready to provide good smart completion and idle ;; summary information @@ -603,6 +613,11 @@ turned on in every Semantic-supported buffer.") ;;; SUMMARY MODE ;; ;; A mode similar to eldoc using semantic +(defcustom semantic-idle-truncate-long-summaries t + "Truncate summaries that are too long to fit in the minibuffer. +This can prevent minibuffer resizing in idle time." + :group 'semantic + :type 'boolean) (defcustom semantic-idle-summary-function 'semantic-format-tag-summarize-with-file @@ -654,21 +669,16 @@ Use the semantic analyzer to find the symbol information." "Return a string message describing the current context. This function will disable loading of previously unloaded files by semanticdb as a time-saving measure." - (let ( - (semanticdb-find-default-throttle - (if (featurep 'semantic/db-find) - (remq 'unloaded semanticdb-find-default-throttle) - nil)) - ) - (save-excursion - ;; use whicever has success first. - (or - (semantic-idle-summary-current-symbol-keyword) + (semanticdb-without-unloaded-file-searches + (save-excursion + ;; use whichever has success first. + (or + (semantic-idle-summary-current-symbol-keyword) - (semantic-idle-summary-current-symbol-info-context) + (semantic-idle-summary-current-symbol-info-context) - (semantic-idle-summary-current-symbol-info-brutish) - )))) + (semantic-idle-summary-current-symbol-info-brutish) + )))) (defvar semantic-idle-summary-out-of-context-faces '( @@ -732,6 +742,14 @@ current tag to display information." (let ((w (1- (window-width (minibuffer-window))))) (if (> (length str) w) (setq str (substring str 0 w))))) + ;; I borrowed some bits from eldoc to shorten the + ;; message. + (when semantic-idle-truncate-long-summaries + (let ((ea-width (1- (window-width (minibuffer-window)))) + (strlen (length str))) + (when (> strlen ea-width) + (setq str (substring str 0 ea-width))))) + ;; Display it (eldoc-message str)))) (define-minor-mode semantic-idle-summary-mode @@ -791,12 +809,12 @@ turned on in every Semantic-supported buffer." ;; of all uses of the symbol that is under the cursor. ;; ;; This is to mimic the Eclipse tool of a similar nature. -(defvar semantic-idle-summary-highlight-face 'region - "Face used for the summary highlight.") +(defvar semantic-idle-symbol-highlight-face 'region + "Face used for highlighting local symbols.") -(defun semantic-idle-summary-maybe-highlight (tag) - "Perhaps add highlighting onto TAG. -TAG was found as the thing under point. If it happens to be +(defun semantic-idle-symbol-maybe-highlight (tag) + "Perhaps add highlighting to the symbol represented by TAG. +TAG was found as the symbol under point. If it happens to be visible, then highlight it." (require 'pulse) (let* ((region (when (and (semantic-tag-p tag) @@ -817,12 +835,12 @@ visible, then highlight it." (point) (get-buffer-window (current-buffer) 'visible)) (if (< (semantic-overlay-end region) (point-at-eol)) (pulse-momentary-highlight-overlay - region semantic-idle-summary-highlight-face) + region semantic-idle-symbol-highlight-face) ;; Not the same (pulse-momentary-highlight-region (semantic-overlay-start region) (point-at-eol) - semantic-idle-summary-highlight-face))) + semantic-idle-symbol-highlight-face))) )) ((vectorp region) (let ((start (aref region 0)) @@ -842,17 +860,19 @@ visible, then highlight it." (pulse-momentary-highlight-region start (if (<= end (point-at-eol)) end (point-at-eol)) - semantic-idle-summary-highlight-face))) + semantic-idle-symbol-highlight-face))) )))) nil)) -(define-semantic-idle-service semantic-idle-tag-highlight - "Highlight the tag, and references of the symbol under point. +(define-semantic-idle-service semantic-idle-local-symbol-highlight + "Highlight the tag and symbol references of the symbol under point. Call `semantic-analyze-current-context' to find the reference tag. Call `semantic-symref-hits-in-region' to identify local references." (require 'pulse) (when (semantic-idle-summary-useful-context-p) - (let* ((ctxt (semantic-analyze-current-context)) + (let* ((ctxt + (semanticdb-without-unloaded-file-searches + (semantic-analyze-current-context))) (Hbounds (when ctxt (oref ctxt bounds))) (target (when ctxt (car (reverse (oref ctxt prefix))))) (tag (semantic-current-tag)) @@ -862,7 +882,7 @@ Call `semantic-symref-hits-in-region' to identify local references." (when ctxt ;; Highlight the original tag? Protect against problems. (condition-case nil - (semantic-idle-summary-maybe-highlight target) + (semantic-idle-symbol-maybe-highlight target) (error nil)) ;; Identify all hits in this current tag. (when (semantic-tag-p target) @@ -871,7 +891,7 @@ Call `semantic-symref-hits-in-region' to identify local references." target (lambda (start end prefix) (when (/= start (car Hbounds)) (pulse-momentary-highlight-region - start end semantic-idle-summary-highlight-face)) + start end semantic-idle-symbol-highlight-face)) (semantic-throw-on-input 'symref-highlight) ) (semantic-tag-start tag) @@ -891,7 +911,7 @@ If ARG is positive or nil, enable, if it is negative, disable." ;; When turning off, disable other idle modes. (when (null global-semantic-idle-scheduler-mode) (global-semantic-idle-summary-mode -1) - (global-semantic-idle-tag-highlight-mode -1) + (global-semantic-idle-local-symbol-highlight-mode -1) (global-semantic-idle-completions-mode -1)) (semantic-toggle-minor-mode-globally 'semantic-idle-scheduler-mode @@ -903,25 +923,23 @@ If ARG is positive or nil, enable, if it is negative, disable." ;; This mode uses tooltips to display a (hopefully) short list of possible ;; completions available for the text under point. It provides ;; NO provision for actually filling in the values from those completions. +(defun semantic-idle-completions-end-of-symbol-p () + "Return non-nil if the cursor is at the END of a symbol. +If the cursor is in the middle of a symbol, then we shouldn't be +doing fancy completions." + (not (looking-at "\\w\\|\\s_"))) (defun semantic-idle-completion-list-default () "Calculate and display a list of completions." - (when (semantic-idle-summary-useful-context-p) + (when (and (semantic-idle-summary-useful-context-p) + (semantic-idle-completions-end-of-symbol-p)) ;; This mode can be fragile. Ignore problems. ;; If something doesn't do what you expect, run ;; the below command by hand instead. (condition-case nil - (let ( - ;; Don't go loading in oodles of header libraries in - ;; IDLE time. - (semanticdb-find-default-throttle - (if (featurep 'semantic/db-find) - (remq 'unloaded semanticdb-find-default-throttle) - nil)) - ) - ;; Use idle version. - (require 'semantic/complete) - (semantic-complete-analyze-inline-idle) + (semanticdb-without-unloaded-file-searches + ;; Use idle version. + (semantic-complete-analyze-inline-idle) ) (error nil)) )) @@ -949,6 +967,347 @@ completion. ;; Add the ability to override sometime. (semantic-idle-completion-list-default)) + +;;; Breadcrumbs for tag under point +;; +;; Service that displays a breadcrumbs indication of the tag under +;; point and its parents in the header or mode line. +;; + +(defcustom semantic-idle-breadcrumbs-display-function + #'semantic-idle-breadcrumbs--display-in-header-line + "Function to display the tag under point in idle time. +This function should take a list of Semantic tags as its only +argument. The tags are sorted according to their nesting order, +starting with the outermost tag. The function should call +`semantic-idle-breadcrumbs-format-tag-list-function' to convert +the tag list into a string." + :group 'semantic + :type '(choice + (const :tag "Display in header line" + semantic-idle-breadcrumbs--display-in-header-line) + (const :tag "Display in mode line" + semantic-idle-breadcrumbs--display-in-mode-line) + (function :tag "Other function"))) + +(defcustom semantic-idle-breadcrumbs-format-tag-list-function + #'semantic-idle-breadcrumbs--format-linear + "Function to format the list of tags containing point. +This function should take a list of Semantic tags and an optional +maximum length of the produced string as its arguments. The +maximum length is a hint and can be ignored. When the maximum +length is omitted, an unconstrained string should be +produced. The tags are sorted according to their nesting order, +starting with the outermost tag. Single tags should be formatted +using `semantic-idle-breadcrumbs-format-tag-function' unless +special formatting is required." + :group 'semantic + :type '(choice + (const :tag "Format tags as list, innermost last" + semantic-idle-breadcrumbs--format-linear) + (const :tag "Innermost tag with details, followed by remaining tags" + semantic-idle-breadcrumbs--format-innermost-first) + (function :tag "Other function"))) + +(defcustom semantic-idle-breadcrumbs-format-tag-function + #'semantic-format-tag-abbreviate + "Function to call to format information about tags. +This function should take a single argument, a Semantic tag, and +return a string to display. +Some useful functions are found in `semantic-format-tag-functions'." + :group 'semantic + :type semantic-format-tag-custom-list) + +(defcustom semantic-idle-breadcrumbs-separator 'mode-specific + "Specify how to separate tags in the breadcrumbs string. +An arbitrary string or a mode-specific scope nesting +string (like, for example, \"::\" in C++, or \".\" in Java) can +be used." + :group 'semantic + :type '(choice + (const :tag "Use mode specific separator" + mode-specific) + (string :tag "Specify separator string"))) + +(defcustom semantic-idle-breadcrumbs-header-line-prefix + semantic-stickyfunc-indent-string ;; TODO not optimal + "String used to indent the breadcrumbs string. +Customize this string to match the space used by scrollbars and +fringe." + :group 'semantic + :type 'string) + +(defvar semantic-idle-breadcrumbs-popup-menu nil + "Menu used when a tag displayed by `semantic-idle-breadcrumbs-mode' is clicked.") + +(defun semantic-idle-breadcrumbs--popup-menu (event) + "Popup a menu that displays things to do to the clicked tag. +Argument EVENT describes the event that caused this function to +be called." + (interactive "e") + (let ((old-window (selected-window)) + (window (semantic-event-window event))) + (select-window window t) + (semantic-popup-menu semantic-idle-breadcrumbs-popup-menu) + (select-window old-window))) + +(defmacro semantic-idle-breadcrumbs--tag-function (function) + "Return lambda expression calling FUNCTION when called from a popup." + `(lambda (event) + (interactive "e") + (let* ((old-window (selected-window)) + (window (semantic-event-window event)) + (column (car (nth 6 (nth 1 event)))) ;; TODO semantic-event-column? + (tag (progn + (select-window window t) + (plist-get + (text-properties-at column header-line-format) + 'tag)))) + (,function tag) + (select-window old-window))) + ) + +;; TODO does this work for mode-line case? +(defvar semantic-idle-breadcrumbs-popup-map + (let ((map (make-sparse-keymap))) + ;; mouse-1 goes to clicked tag + (define-key map + [ header-line mouse-1 ] + (semantic-idle-breadcrumbs--tag-function + semantic-go-to-tag)) + ;; mouse-3 pops up a context menu + (define-key map + [ header-line mouse-3 ] + 'semantic-idle-breadcrumbs--popup-menu) + map) + "Keymap for semantic idle breadcrumbs minor mode.") + +(easy-menu-define + semantic-idle-breadcrumbs-popup-menu + semantic-idle-breadcrumbs-popup-map + "Semantic Breadcrumbs Mode Menu" + (list + "Breadcrumb Tag" + (semantic-menu-item + (vector + "Go to Tag" + (semantic-idle-breadcrumbs--tag-function + semantic-go-to-tag) + :active t + :help "Jump to this tag")) + ;; TODO these entries need minor changes (optional tag argument) in + ;; senator-copy-tag etc + ;; (semantic-menu-item + ;; (vector + ;; "Copy Tag" + ;; (semantic-idle-breadcrumbs--tag-function + ;; senator-copy-tag) + ;; :active t + ;; :help "Copy this tag")) + ;; (semantic-menu-item + ;; (vector + ;; "Kill Tag" + ;; (semantic-idle-breadcrumbs--tag-function + ;; senator-kill-tag) + ;; :active t + ;; :help "Kill tag text to the kill ring, and copy the tag to + ;; the tag ring")) + ;; (semantic-menu-item + ;; (vector + ;; "Copy Tag to Register" + ;; (semantic-idle-breadcrumbs--tag-function + ;; senator-copy-tag-to-register) + ;; :active t + ;; :help "Copy this tag")) + ;; (semantic-menu-item + ;; (vector + ;; "Narrow to Tag" + ;; (semantic-idle-breadcrumbs--tag-function + ;; senator-narrow-to-defun) + ;; :active t + ;; :help "Narrow to the bounds of the current tag")) + ;; (semantic-menu-item + ;; (vector + ;; "Fold Tag" + ;; (semantic-idle-breadcrumbs--tag-function + ;; senator-fold-tag-toggle) + ;; :active t + ;; :style 'toggle + ;; :selected '(let ((tag (semantic-current-tag))) + ;; (and tag (semantic-tag-folded-p tag))) + ;; :help "Fold the current tag to one line")) + "---" + (semantic-menu-item + (vector + "About this Header Line" + (lambda () + (interactive) + (describe-function 'semantic-idle-breadcrumbs-mode)) + :active t + :help "Display help about this header line.")) + ) + ) + +(define-semantic-idle-service semantic-idle-breadcrumbs + "Display breadcrumbs for the tag under point and its parents." + (let* ((scope (semantic-calculate-scope)) + (tag-list (if scope + ;; If there is a scope, extract the tag and its + ;; parents. + (append (oref scope parents) + (when (oref scope tag) + (list (oref scope tag)))) + ;; Fall back to tags by overlay + (semantic-find-tag-by-overlay)))) + ;; Display the tags. + (funcall semantic-idle-breadcrumbs-display-function tag-list))) + +(defun semantic-idle-breadcrumbs--display-in-header-line (tag-list) + "Display the tags in TAG-LIST in the header line of their buffer." + (let ((width (- (nth 2 (window-edges)) + (nth 0 (window-edges))))) + ;; Format TAG-LIST and put the formatted string into the header + ;; line. + (setq header-line-format + (concat + semantic-idle-breadcrumbs-header-line-prefix + (if tag-list + (semantic-idle-breadcrumbs--format-tag-list + tag-list + (- width + (length semantic-idle-breadcrumbs-header-line-prefix))) + (propertize + "" + 'face + 'font-lock-comment-face))))) + + ;; Update the header line. + (force-mode-line-update)) + +(defun semantic-idle-breadcrumbs--display-in-mode-line (tag-list) + "Display the tags in TAG-LIST in the mode line of their buffer. +TODO THIS FUNCTION DOES NOT WORK YET." + + (error "This function does not work yet") + + (let ((width (- (nth 2 (window-edges)) + (nth 0 (window-edges))))) + (setq mode-line-format + (semantic-idle-breadcrumbs--format-tag-list tag-list width))) + + (force-mode-line-update)) + +(defun semantic-idle-breadcrumbs--format-tag-list (tag-list max-length) + "Format TAG-LIST using configured functions respecting MAX-LENGTH. +If the initial formatting result is longer than MAX-LENGTH, it is +shortened at the beginning." + ;; Format TAG-LIST using the configured formatting function. + (let* ((complete-format (funcall + semantic-idle-breadcrumbs-format-tag-list-function + tag-list max-length)) + ;; Determine length of complete format. + (complete-length (length complete-format))) + ;; Shorten string if necessary. + (if (<= complete-length max-length) + complete-format + (concat "... " + (substring + complete-format + (- complete-length (- max-length 4)))))) + ) + +(defun semantic-idle-breadcrumbs--format-linear + (tag-list &optional max-length) + "Format TAG-LIST as a linear list, starting with the outermost tag. +MAX-LENGTH is not used." + (require 'semantic/analyze/fcn) + (let* ((format-pieces (mapcar + #'semantic-idle-breadcrumbs--format-tag + tag-list)) + ;; Format tag list, putting configured separators between the + ;; tags. + (complete-format (cond + ;; Mode specific separator. + ((eq semantic-idle-breadcrumbs-separator + 'mode-specific) + (semantic-analyze-unsplit-name format-pieces)) + + ;; Custom separator. + ((stringp semantic-idle-breadcrumbs-separator) + (mapconcat + #'identity + format-pieces + semantic-idle-breadcrumbs-separator))))) + complete-format) + ) + +(defun semantic-idle-breadcrumbs--format-innermost-first + (tag-list &optional max-length) + "Format TAG-LIST placing the innermost tag first, separated from its parents. +If MAX-LENGTH is non-nil, the innermost tag is shortened." + (let* (;; Separate and format remaining tags. Calculate length of + ;; resulting string. + (rest-tags (butlast tag-list)) + (rest-format (if rest-tags + (concat + " | " + (semantic-idle-breadcrumbs--format-linear + rest-tags)) + "")) + (rest-length (length rest-format)) + ;; Format innermost tag and calculate length of resulting + ;; string. + (inner-format (semantic-idle-breadcrumbs--format-tag + (car (last tag-list)) + #'semantic-format-tag-prototype)) + (inner-length (length inner-format)) + ;; Calculate complete length and shorten string for innermost + ;; tag if MAX-LENGTH is non-nil and the complete string is + ;; too long. + (complete-length (+ inner-length rest-length)) + (inner-short (if (and max-length + (<= complete-length max-length)) + inner-format + (concat (substring + inner-format + 0 + (- inner-length + (- complete-length max-length) + 4)) + " ...")))) + ;; Concat both parts. + (concat inner-short rest-format)) + ) + +(defun semantic-idle-breadcrumbs--format-tag (tag &optional format-function) + "Format TAG using the configured function or FORMAT-FUNCTION. +This function also adds text properties for help-echo, mouse +highlighting and a keymap." + (let ((formatted (funcall + (or format-function + semantic-idle-breadcrumbs-format-tag-function) + tag nil t))) + (add-text-properties + 0 (length formatted) + (list + 'tag + tag + 'help-echo + (format + "Tag %s +Type: %s +mouse-1: jump to tag +mouse-3: popup context menu" + (semantic-tag-name tag) + (semantic-tag-class tag)) + 'mouse-face + 'highlight + 'keymap + semantic-idle-breadcrumbs-popup-map) + formatted) + formatted)) + + (provide 'semantic/idle) ;; Local variables: diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el index 9ce986553aa..e38b50bcd57 100644 --- a/lisp/cedet/semantic/imenu.el +++ b/lisp/cedet/semantic/imenu.el @@ -99,7 +99,7 @@ A nil value means to keep them in the same order. Overriden to nil if `semantic-imenu-bucketize-file' is nil." :group 'semantic-imenu :type 'boolean) -(make-variable-buffer-local 'semantic-imenu-bucketize-type-parts) +(make-variable-buffer-local 'semantic-imenu-bucketize-type-members) (semantic-varalias-obsolete 'semantic-imenu-bucketize-type-parts 'semantic-imenu-bucketize-type-members "23.2") diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el index 58ad681008c..88b77e50e1d 100644 --- a/lisp/cedet/semantic/lex-spp.el +++ b/lisp/cedet/semantic/lex-spp.el @@ -864,42 +864,45 @@ and variable state from the current buffer." semantic-lex-spp-expanded-macro-stack )) ) - (with-current-buffer buf - (erase-buffer) - ;; Below is a painful hack to make sure everything is setup correctly. - (when (not (eq major-mode mode)) - (save-match-data + (if (> semantic-lex-spp-hack-depth 5) + nil + (with-current-buffer buf + (erase-buffer) + ;; Below is a painful hack to make sure everything is setup correctly. + (when (not (eq major-mode mode)) + (save-match-data - ;; Protect against user-hooks that throw errors. - (condition-case nil - (funcall mode) - (error nil)) + ;; Protect against user-hooks that throw errors. + (condition-case nil + (funcall mode) + (error nil)) - ;; Hack in mode-local - (activate-mode-local-bindings) - ;; CHEATER! The following 3 lines are from - ;; `semantic-new-buffer-fcn', but we don't want to turn - ;; on all the other annoying modes for this little task. - (setq semantic-new-buffer-fcn-was-run t) - (semantic-lex-init) - (semantic-clear-toplevel-cache) - (remove-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook - t) - )) + ;; Hack in mode-local + (activate-mode-local-bindings) - ;; Second Cheat: copy key variables regarding macro state from the - ;; the originating buffer we are parsing. We need to do this every time - ;; since the state changes. - (dolist (V important-vars) - (set V (semantic-buffer-local-value V origbuff))) - (insert text) - (goto-char (point-min)) + ;; CHEATER! The following 3 lines are from + ;; `semantic-new-buffer-fcn', but we don't want to turn + ;; on all the other annoying modes for this little task. + (setq semantic-new-buffer-fcn-was-run t) + (semantic-lex-init) + (semantic-clear-toplevel-cache) + (remove-hook 'semantic-lex-reset-hooks 'semantic-lex-spp-reset-hook + t) + )) - (setq fresh-toks (semantic-lex-spp-stream-for-macro (point-max)))) + ;; Second Cheat: copy key variables regarding macro state from the + ;; the originating buffer we are parsing. We need to do this every time + ;; since the state changes. + (dolist (V important-vars) + (set V (semantic-buffer-local-value V origbuff))) + (insert text) + (goto-char (point-min)) - (dolist (tok fresh-toks) - (when (memq (semantic-lex-token-class tok) '(symbol semantic-list)) - (setq toks (cons tok toks)))) + (setq fresh-toks (semantic-lex-spp-stream-for-macro (point-max)))) + + (dolist (tok fresh-toks) + (when (memq (semantic-lex-token-class tok) '(symbol semantic-list)) + (setq toks (cons tok toks))))) (nreverse toks))) diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index af312494a81..e0fed29b4fa 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el @@ -1810,8 +1810,8 @@ what syntax class CHAR has.") (defvar semantic-ignore-comments t "Default comment handling. -t means to strip comments when flexing. Nil means to keep comments -as part of the token stream.") +The value t means to strip comments when flexing; nil means +to keep comments as part of the token stream.") (make-variable-buffer-local 'semantic-ignore-comments) (defvar semantic-flex-enable-newlines nil diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el index 6da2e9d779a..f2472ef9410 100644 --- a/lisp/cedet/semantic/scope.el +++ b/lisp/cedet/semantic/scope.el @@ -67,7 +67,7 @@ :documentation "The list of types currently in scope. For C++, this would contain anonymous namespaces known, and -anything labled by a `using' statement.") +anything labeled by a `using' statement.") (parents :initform nil :documentation "List of parents in scope w/in the body of this function. @@ -239,8 +239,11 @@ are from nesting data types." ) ;; In case of arg lists or some-such, throw out non-types. (while (and stack (not (semantic-tag-of-class-p pparent 'type))) - (setq stack (cdr stack) - pparent (car (cdr stack)))) + (setq stack (cdr stack) pparent (car (cdr stack)))) + + ;; Remove duplicates + (while (member pparent scopetypes) + (setq stack (cdr stack) pparent (car (cdr stack)))) ;; Step 1: ;; Analyze the stack of tags we are nested in as parents. @@ -611,7 +614,7 @@ whose tags can be searched when needed, OR it may be a scope object." ;; to do any of the stuff related to variables and what-not. (setq tmpscope (semantic-scope-cache "mini")) (let* ( ;; Step 1: - (scopetypes (semantic-analyze-scoped-types (point))) + (scopetypes (cons type (semantic-analyze-scoped-types (point)))) (parents (semantic-analyze-scope-nested-tags (point) scopetypes)) ;;(parentinherited (semantic-analyze-scope-lineage-tags parents scopetypes)) (lscope nil) diff --git a/lisp/cedet/semantic/sort.el b/lisp/cedet/semantic/sort.el index 1cbb6787460..064ef19ab9a 100644 --- a/lisp/cedet/semantic/sort.el +++ b/lisp/cedet/semantic/sort.el @@ -463,7 +463,7 @@ include the default behavior, and merely extend your own." ) (defun semantic-tag-external-member-parent-default (tag) - "Return the name of TAGs parent only if TAG is not defined in it's parent." + "Return the name of TAGs parent only if TAG is not defined in its parent." ;; Use only the extra spec because a type has a parent which ;; means something completely different. (let ((tp (semantic-tag-get-attribute tag :parent))) @@ -473,7 +473,7 @@ include the default behavior, and merely extend your own." (define-overloadable-function semantic-tag-external-member-p (parent tag) "Return non-nil if PARENT is the parent of TAG. TAG is an external member of PARENT when it is somehow tagged -as having PARENT as it's parent. +as having PARENT as its parent. PARENT and TAG must both be semantic tags. The default behavior, if not overridden with diff --git a/lisp/cedet/semantic/symref.el b/lisp/cedet/semantic/symref.el index f1e3f9a5d95..d36beffc95f 100644 --- a/lisp/cedet/semantic/symref.el +++ b/lisp/cedet/semantic/symref.el @@ -71,6 +71,7 @@ (declare-function data-debug-insert-object-slots "eieio-datadebug") (declare-function ede-toplevel "ede/files") (declare-function ede-project-root-directory "ede/files") +(declare-function ede-up-directory "ede/files") ;;; Code: (defvar semantic-symref-tool 'detect @@ -98,16 +99,27 @@ is supported. If no tools are supported, then 'grep is assumed.") +(defun semantic-symref-calculate-rootdir () + "Calculate the root directory for a symref search. +Start with and EDE project, or use the default directory." + (let* ((rootproj (when (and (featurep 'ede) ede-minor-mode) + (ede-toplevel))) + (rootdirbase (if rootproj + (ede-project-root-directory rootproj) + default-directory))) + (if (and rootproj (condition-case nil + ;; Hack for subprojects. + (oref rootproj :metasubproject) + (error nil))) + (ede-up-directory rootdirbase) + rootdirbase))) + (defun semantic-symref-detect-symref-tool () "Detect the symref tool to use for the current buffer." (if (not (eq semantic-symref-tool 'detect)) semantic-symref-tool ;; We are to perform a detection for the right tool to use. - (let* ((rootproj (when (and (featurep 'ede) ede-minor-mode) - (ede-toplevel))) - (rootdir (if rootproj - (ede-project-root-directory rootproj) - default-directory)) + (let* ((rootdir (semantic-symref-calculate-rootdir)) (tools semantic-symref-tool-alist)) (while (and tools (eq semantic-symref-tool 'detect)) (when (funcall (car (car tools)) rootdir) diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el index b326062e97d..521babc1f6e 100644 --- a/lisp/cedet/semantic/symref/grep.el +++ b/lisp/cedet/semantic/symref/grep.el @@ -30,10 +30,6 @@ (require 'semantic/symref) (require 'grep) -(defvar ede-minor-mode) -(declare-function ede-toplevel "ede/files") -(declare-function ede-project-root-directory "ede/files") - ;;; Code: ;;; GREP @@ -86,7 +82,7 @@ Optional argument MODE specifies the `major-mode' to test." " -o ") " \\)")) (t - (error "Configuration for `semantic-symref-tool-grep' needed for %s" major-mode)) + (error "Customize `semantic-symref-filepattern-alist' for %s" major-mode)) ))) (defvar semantic-symref-grep-expand-keywords @@ -119,6 +115,12 @@ GREPPATTERN is the pattern used by grep." ;;(message "New command: %s" cmd) cmd)) +(defcustom semantic-symref-grep-shell "sh" + "The shell command to use for executing find/grep. +This shell should support pipe redirect syntax." + :group 'semantic + :type 'string) + (defmethod semantic-symref-perform-search ((tool semantic-symref-tool-grep)) "Perform a search with Grep." ;; Grep doesn't support some types of searches. @@ -129,19 +131,7 @@ GREPPATTERN is the pattern used by grep." ;; Find the root of the project, and do a find-grep... (let* (;; Find the file patterns to use. (pat (cdr (assoc major-mode semantic-symref-filepattern-alist))) - (rootdir (cond - ;; Project root via EDE. - ((eq (oref tool :searchscope) 'project) - (let ((rootproj (when (and (featurep 'ede) ede-minor-mode) - (ede-toplevel)))) - (if rootproj - (ede-project-root-directory rootproj) - default-directory))) - ;; Calculate the target files as just in - ;; this directory... cause I'm lazy. - ((eq (oref tool :searchscope) 'target) - default-directory) - )) + (rootdir (semantic-symref-calculate-rootdir)) (filepattern (semantic-symref-derive-find-filepatterns)) ;; Grep based flags. (grepflags (cond ((eq (oref tool :resulttype) 'file) @@ -168,10 +158,10 @@ GREPPATTERN is the pattern used by grep." (let ((cmd (concat "find " default-directory " -type f " filepattern " -print0 " "| xargs -0 grep -H " grepflags "-e " greppat))) ;;(message "Old command: %s" cmd) - (call-process "sh" nil b nil "-c" cmd) + (call-process semantic-symref-grep-shell nil b nil "-c" cmd) ) (let ((cmd (semantic-symref-grep-use-template rootdir filepattern grepflags greppat))) - (call-process "sh" nil b nil "-c" cmd)) + (call-process semantic-symref-grep-shell nil b nil "-c" cmd)) )) (setq ans (semantic-symref-parse-tool-output tool b)) ;; Return the answer diff --git a/lisp/cedet/semantic/symref/list.el b/lisp/cedet/semantic/symref/list.el index cfc032af9ad..53044e278ac 100644 --- a/lisp/cedet/semantic/symref/list.el +++ b/lisp/cedet/semantic/symref/list.el @@ -33,6 +33,7 @@ (require 'semantic/symref) (require 'semantic/complete) +(require 'semantic/senator) (require 'pulse) ;;; Code: @@ -42,9 +43,9 @@ "Find references to the current tag. This command uses the currently configured references tool within the current project to find references to the current tag. The -references are the organized by file and the name of the function +references are organized by file and the name of the function they are used in. -Display the references in`semantic-symref-results-mode'." +Display the references in `semantic-symref-results-mode'." (interactive) (semantic-fetch-tags) (let ((ct (semantic-current-tag)) @@ -65,6 +66,24 @@ Display the references in`semantic-symref-results-mode'." "Find references to the symbol SYM. This command uses the currently configured references tool within the current project to find references to the input SYM. The +references are organized by file and the name of the function +they are used in. +Display the references in `semantic-symref-results-mode'." + (interactive (list (semantic-tag-name (semantic-complete-read-tag-buffer-deep + "Symrefs for: ")))) + (semantic-fetch-tags) + (let ((res nil) + ) + ;; Gather results and tags + (message "Gathering References...") + (setq res (semantic-symref-find-references-by-name sym)) + (semantic-symref-produce-list-on-results res sym))) + +;;;###autoload +(defun semantic-symref-regexp (sym) + "Find references to the a symbol regexp SYM. +This command uses the currently configured references tool within the +current project to find references to the input SYM. The references are the organized by file and the name of the function they are used in. Display the references in`semantic-symref-results-mode'." @@ -75,7 +94,7 @@ Display the references in`semantic-symref-results-mode'." ) ;; Gather results and tags (message "Gathering References...") - (setq res (semantic-symref-find-references-by-name sym)) + (setq res (semantic-symref-find-text sym)) (semantic-symref-produce-list-on-results res sym))) @@ -110,11 +129,59 @@ Display the references in`semantic-symref-results-mode'." (define-key km "n" 'semantic-symref-list-next-line) (define-key km "p" 'semantic-symref-list-prev-line) (define-key km "q" 'semantic-symref-hide-buffer) + (define-key km "\C-c\C-e" 'semantic-symref-list-expand-all) + (define-key km "\C-c\C-r" 'semantic-symref-list-contract-all) + (define-key km "R" 'semantic-symref-list-rename-open-hits) + (define-key km "(" 'semantic-symref-list-create-macro-on-open-hit) + (define-key km "E" 'semantic-symref-list-call-macro-on-open-hits) km) "Keymap used in `semantic-symref-results-mode'.") +(defvar semantic-symref-list-menu-entries + (list + "Symref" + (semantic-menu-item + ["Toggle Line Open" + semantic-symref-list-toggle-showing + :active t + :help "Toggle the current line open or closed." + ]) + (semantic-menu-item + ["Expand All Entries" + semantic-symref-list-expand-all + :active t + :help "Expand every expandable entry." + ]) + (semantic-menu-item + ["Contract All Entries" + semantic-symref-list-contract-all + :active t + :help "Close every expandable entry." + ]) + (semantic-menu-item + ["Rename Symbol in Open hits" + semantic-symref-list-rename-open-hits + :active t + :help "Rename the searched for symbol in all hits that are currently open." + ]) + ) + "Menu entries for the Semantic Symref list mode.") + +(defvar semantic-symref-list-menu nil + "Menu keymap build from `semantic-symref-results-mode'.") + +(easy-menu-define semantic-symref-list-menu + semantic-symref-results-mode-map + "Symref Mode Menu" + semantic-symref-list-menu-entries) + +(defcustom semantic-symref-auto-expand-results nil + "Non-nil to expand symref results on buffer creation." + :group 'semantic-symref + :type 'boolean) + (defcustom semantic-symref-results-mode-hook nil - "*Hook run when `semantic-symref-results-mode' starts." + "Hook run when `semantic-symref-results-mode' starts." :group 'semantic-symref :type 'hook) @@ -189,6 +256,10 @@ Some useful functions are found in `semantic-format-tag-functions'." )) + ;; Auto expand + (when semantic-symref-auto-expand-results + (semantic-symref-list-expand-all)) + ;; Clean up the mess (toggle-read-only 1) (set-buffer-modified-p nil) @@ -305,7 +376,8 @@ BUTTON is the button that was clicked." (win (selected-window)) ) (switch-to-buffer-other-window buff) - (with-no-warnings (goto-line line)) + (goto-char (point-min)) + (forward-line (1- line)) (pulse-momentary-highlight-one-line (point)) (when (eq last-command-event ?\s) (select-window win)) ) @@ -323,6 +395,158 @@ BUTTON is the button that was clicked." (forward-line -1) (back-to-indentation)) +(defun semantic-symref-list-expand-all () + "Expand all the nodes in the current buffer." + (interactive) + (let ((start (make-marker))) + (move-marker start (point)) + (goto-char (point-min)) + (while (re-search-forward "\\[[+]\\]" nil t) + (semantic-symref-list-toggle-showing)) + ;; Restore position + (goto-char start))) + +(defun semantic-symref-list-contract-all () + "Expand all the nodes in the current buffer." + (interactive) + (let ((start (make-marker))) + (move-marker start (point)) + (goto-char (point-min)) + (while (re-search-forward "\\[[-]\\]" nil t) + (semantic-symref-list-toggle-showing)) + ;; Restore position + (goto-char start))) + +;;; UTILS +;; +;; List mode utils for understadning the current line + +(defun semantic-symref-list-on-hit-p () + "Return the line number if the cursor is on a buffer line with a hit. +Hits are the line of code from the buffer, not the tag summar or file lines." + (save-excursion + (end-of-line) + (let* ((ol (car (semantic-overlays-at (1- (point)))))) ;; trust this for now + (when ol (semantic-overlay-get ol 'line))))) + + +;;; Keyboard Macros on a Hit +;; +;; Record a macro on a hit, and store in a special way for execution later. +(defun semantic-symref-list-create-macro-on-open-hit () + "Record a keyboard macro at the location of the hit in the current list. +Under point should be one hit for the active keyword. Move +cursor to the beginning of that symbol, then record a macro as if +`kmacro-start-macro' was pressed. Use `kmacro-end-macro', +{kmacro-end-macro} to end the macro, and return to the symbol found list." + (interactive) + (let* ((oldsym (oref (oref semantic-symref-current-results + :created-by) + :searchfor)) + (ol (save-excursion + (end-of-line) + (car (semantic-overlays-at (1- (point)))))) + (tag (when ol (semantic-overlay-get ol 'tag))) + (line (when ol (semantic-overlay-get ol 'line)))) + (when (not line) + (error "Cannot create macro on a non-hit line")) + ;; Go there, and do something useful. + (switch-to-buffer-other-window (semantic-tag-buffer tag)) + (goto-char (point-min)) + (forward-line (1- line)) + (when (not (re-search-forward (regexp-quote oldsym) (point-at-eol) t)) + (error "Cannot find hit. Cannot record macro")) + (goto-char (match-beginning 0)) + ;; Cursor is now in the right location. Start recording a macro. + (kmacro-start-macro nil) + ;; Notify the user + (message "Complete with C-x ). Use E in the symref buffer to call this macro."))) + +(defun semantic-symref-list-call-macro-on-open-hits () + "Call the most recently created keyboard macro on each hit. +Cursor is placed at the beginning of the symbol found, even if +there is more than one symbol on the current line. The +previously recorded macro is then executed." + (interactive) + (save-window-excursion + (let ((count (semantic-symref-list-map-open-hits + (lambda () + (switch-to-buffer (current-buffer)) + (kmacro-call-macro nil))))) + (semantic-symref-list-update-open-hits) + (message "Executed Macro %d times." count)))) + +;;; REFACTORING EDITS +;; +;; Utilities and features for refactoring across a list of hits. +;; +(defun semantic-symref-list-rename-open-hits (newname) + "Rename the discovered symbol references to NEWNAME. +Only renames the locations that are open in the symref list. +Closed items will be skipped." + (interactive + (list (read-string "Rename to: " + (oref (oref semantic-symref-current-results + :created-by) + :searchfor)))) + (let ((count (semantic-symref-list-map-open-hits + (lambda () (replace-match newname nil t))))) + (semantic-symref-list-update-open-hits) + (message "Renamed %d occurrences." count))) + +;;; REFACTORING UTILITIES +;; +;; Refactoring tools want to operate on only the "good" stuff the +;; user selected. +(defun semantic-symref-list-map-open-hits (function) + "For every open hit in the symref buffer, perform FUNCTION. +The `match-data' will be set to a successful hit of the searched for symbol. +Return the number of occurrences FUNCTION was operated upon." + + ;; First Pass in this function - a straight rename. + ;; Second Pass - Allow context specification based on + ;; class members. (Not Done) + + (let ((oldsym (oref (oref semantic-symref-current-results + :created-by) + :searchfor)) + (count 0)) + (save-excursion + (goto-char (point-min)) + (while (not (eobp)) + ;; Is this line a "hit" line? + (let* ((ol (car (semantic-overlays-at (1- (point))))) ;; trust this for now + (tag (when ol (semantic-overlay-get ol 'tag))) + (line (when ol (semantic-overlay-get ol 'line)))) + (when line + ;; The "line" means we have an open hit. + (with-current-buffer (semantic-tag-buffer tag) + (goto-char (point-min)) + (forward-line (1- line)) + (beginning-of-line) + (while (re-search-forward (regexp-quote oldsym) (point-at-eol) t) + (setq count (1+ count)) + (save-excursion ;; Leave cursor after the matched name. + (goto-char (match-beginning 0)) ;; Go to beginning of that sym + (funcall function)))))) + ;; Go to the next line + (forward-line 1) + (end-of-line))) + count)) + +(defun semantic-symref-list-update-open-hits () + "Update the text for all the open hits in the symref list." + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "\\[-\\]" nil t) + (end-of-line) + (let* ((ol (car (semantic-overlays-at (1- (point))))) ;; trust this for now + (tag (when ol (semantic-overlay-get ol 'tag)))) + ;; If there is a tag, then close/open it. + (when tag + (semantic-symref-list-toggle-showing) + (semantic-symref-list-toggle-showing)))))) + (provide 'semantic/symref/list) ;; Local variables: diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el index c324d5cfb46..e9094fcb051 100644 --- a/lisp/cedet/semantic/tag.el +++ b/lisp/cedet/semantic/tag.el @@ -687,18 +687,24 @@ This function is for internal use only." ;; (defun semantic-tag-deep-copy-one-tag (tag &optional filter) "Make a deep copy of TAG, applying FILTER to each child-tag. -Properties and overlay info are not copied. -FILTER takes TAG as an argument, and should returns a semantic-tag. +No properties are copied except for :filename. +Overlay will be a vector. +FILTER takes TAG as an argument, and should return a `semantic-tag'. It is safe for FILTER to modify the input tag and return it." (when (not filter) (setq filter 'identity)) (when (not (semantic-tag-p tag)) (signal 'wrong-type-argument (list tag 'semantic-tag-p))) - (funcall filter (list (semantic-tag-name tag) - (semantic-tag-class tag) - (semantic--tag-deep-copy-attributes - (semantic-tag-attributes tag) filter) - nil - nil))) + (let ((ol (semantic-tag-overlay tag)) + (fn (semantic-tag-file-name tag))) + (funcall filter (list (semantic-tag-name tag) + (semantic-tag-class tag) + (semantic--tag-deep-copy-attributes + (semantic-tag-attributes tag) filter) + ;; Only copy the filename property + (when fn (list :filename fn)) + ;; Only setup a vector if we had an overlay. + (when ol (vector (semantic-tag-start tag) + (semantic-tag-end tag))))))) (defun semantic--tag-deep-copy-attributes (attrs &optional filter) "Make a deep copy of ATTRS, applying FILTER to each child-tag. @@ -877,7 +883,7 @@ That is the value of the `:throws' attribute." "Return the parent of the function that TAG describes. That is the value of the `:parent' attribute. A function has a parent if it is a method of a class, and if the -function does not appear in body of it's parent class." +function does not appear in body of its parent class." (semantic-tag-named-parent tag)) (defsubst semantic-tag-function-destructor-p (tag) diff --git a/lisp/cedet/semantic/texi.el b/lisp/cedet/semantic/texi.el index e6ab498ea04..2879998a1a8 100644 --- a/lisp/cedet/semantic/texi.el +++ b/lisp/cedet/semantic/texi.el @@ -591,12 +591,16 @@ Note: TYPE not yet implemented." ;; ;; Test for doc string ;; (unless docstring ;; (error "Could not find documentation for %s" (semantic-tag-name tag))) +;; +;; (require 'srecode) +;; (require 'srecode-texi) +;; ;; ;; If we have a string, do the replacement. ;; (delete-region (semantic-tag-start tag) ;; (semantic-tag-end tag)) ;; ;; Use useful functions from the docaument library. -;; (require 'document) -;; (document-insert-texinfo doctag (semantic-tag-buffer doctag)) +;; (srecode-texi-insert-tag-as-doc doctag) +;; ;(semantic-insert-foreign-tag doctag) ;; )) ;; (defun semantic-texi-update-doc-from-source (&optional tag) diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el index 9f53dffea98..ccfdc1c906e 100644 --- a/lisp/cedet/semantic/util-modes.el +++ b/lisp/cedet/semantic/util-modes.el @@ -743,6 +743,13 @@ minor mode is enabled." "List of tag classes which stickyfunc will display in the header line.") (make-variable-buffer-local 'semantic-stickyfunc-sticky-classes) +(defcustom semantic-stickyfunc-show-only-functions-p nil + "Non-nil means don't show lines that aren't part of a tag. +If this is nil, then comments or other text between tags that is +1 line above the top of the current window will be shown." + :group 'semantic + :type 'boolean) + (defun semantic-stickyfunc-tag-to-stick () "Return the tag to stick at the current point." (let ((tags (nreverse (semantic-find-tag-by-overlay (point))))) @@ -759,45 +766,51 @@ minor mode is enabled." "Make the function at the top of the current window sticky. Capture its function declaration, and place it in the header line. If there is no function, disable the header line." - (let ((str - (save-excursion - (goto-char (window-start (selected-window))) - (forward-line -1) - (end-of-line) - ;; Capture this function - (let* ((tag (semantic-stickyfunc-tag-to-stick))) - ;; TAG is nil if there was nothing of the appropriate type there. - (if (not tag) - ;; Set it to be the text under the header line - (buffer-substring (point-at-bol) (point-at-eol)) - ;; Get it - (goto-char (semantic-tag-start tag)) - ;; Klaus Berndl : - ;; goto the tag name; this is especially needed for languages - ;; like c++ where a often used style is like: - ;; void - ;; ClassX::methodM(arg1...) - ;; { - ;; ... - ;; } - ;; Without going to the tag-name we would get"void" in the - ;; header line which is IMHO not really useful - (search-forward (semantic-tag-name tag) nil t) - (buffer-substring (point-at-bol) (point-at-eol)) - )))) - (start 0)) - (while (string-match "%" str start) - (setq str (replace-match "%%" t t str 0) - start (1+ (match-end 0))) - ) - ;; In 21.4 (or 22.1) the heder doesn't expand tabs. Hmmmm. - ;; We should replace them here. - ;; - ;; This hack assumes that tabs are kept smartly at tab boundaries - ;; instead of in a tab boundary where it might only represent 4 spaces. - (while (string-match "\t" str start) - (setq str (replace-match " " t t str 0))) - str)) + (save-excursion + (goto-char (window-start (selected-window))) + (let* ((noshow (bobp)) + (str + (progn + (forward-line -1) + (end-of-line) + ;; Capture this function + (let* ((tag (semantic-stickyfunc-tag-to-stick))) + ;; TAG is nil if there was nothing of the appropriate type there. + (if (not tag) + ;; Set it to be the text under the header line + (if noshow + "" + (if semantic-stickyfunc-show-only-functions-p "" + (buffer-substring (point-at-bol) (point-at-eol)) + )) + ;; Go get the first line of this tag. + (goto-char (semantic-tag-start tag)) + ;; Klaus Berndl : + ;; goto the tag name; this is especially needed for languages + ;; like c++ where a often used style is like: + ;; void + ;; ClassX::methodM(arg1...) + ;; { + ;; ... + ;; } + ;; Without going to the tag-name we would get"void" in the + ;; header line which is IMHO not really useful + (search-forward (semantic-tag-name tag) nil t) + (buffer-substring (point-at-bol) (point-at-eol)) + )))) + (start 0)) + (while (string-match "%" str start) + (setq str (replace-match "%%" t t str 0) + start (1+ (match-end 0))) + ) + ;; In 21.4 (or 22.1) the header doesn't expand tabs. Hmmmm. + ;; We should replace them here. + ;; + ;; This hack assumes that tabs are kept smartly at tab boundaries + ;; instead of in a tab boundary where it might only represent 4 spaces. + (while (string-match "\t" str start) + (setq str (replace-match " " t t str 0))) + str))) (defun semantic-stickyfunc-menu (event) "Popup a menu that can help a user understand stickyfunc-mode. diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el index 86c3517fb54..2b3f53a49d3 100644 --- a/lisp/cedet/semantic/util.el +++ b/lisp/cedet/semantic/util.el @@ -132,44 +132,6 @@ buffer, or a filename. If SOMETHING is nil return nil." (semantic-alias-obsolete 'semantic-something-to-stream 'semantic-something-to-tag-table "23.2") -;;; Recursive searching through dependency trees -;; -;; This will depend on the general searching APIS defined above. -;; but will add full recursion through the dependencies list per -;; stream. -(defun semantic-recursive-find-nonterminal-by-name (name buffer) - "Recursively find the first occurrence of NAME. -Start search with BUFFER. Recurse through all dependencies till found. -The return item is of the form (BUFFER TOKEN) where BUFFER is the buffer -in which TOKEN (the token found to match NAME) was found. - -THIS ISN'T USED IN SEMANTIC. DELETE ME SOON." - (with-current-buffer buffer - (let* ((stream (semantic-fetch-tags)) - (includelist (or (semantic-find-tags-by-class 'include stream) - "empty.silly.thing")) - (found (semantic-find-first-tag-by-name name stream)) - (unfound nil)) - (while (and (not found) includelist) - (let ((fn (semantic-dependency-tag-file (car includelist)))) - (if (and fn (not (member fn unfound))) - (with-current-buffer (save-match-data - (find-file-noselect fn)) - (message "Scanning %s" (buffer-file-name)) - (setq stream (semantic-fetch-tags)) - (setq found (semantic-find-first-tag-by-name name stream)) - (if found - (setq found (cons (current-buffer) (list found))) - (setq includelist - (append includelist - (semantic-find-tags-by-class - 'include stream)))) - (setq unfound (cons fn unfound))))) - (setq includelist (cdr includelist))) - found))) -(make-obsolete 'semantic-recursive-find-nonterminal-by-name - "Do not use this function." "23.2") - ;;; Completion APIs ;; ;; These functions provide minibuffer reading/completion for lists of @@ -315,11 +277,12 @@ If TAG is not specified, use the tag at point." (princ "Buffer specific configuration items:\n") (let ((vars '(major-mode semantic-case-fold - semantic-expand-nonterminal + semantic-tag-expand-function semantic-parser-name semantic-parse-tree-state semantic-lex-analyzer semantic-lex-reset-hooks + semantic-lex-syntax-modifications ))) (dolist (V vars) (semantic-describe-buffer-var-helper V buff))) @@ -334,7 +297,8 @@ If TAG is not specified, use the tag at point." semantic-after-toplevel-cache-change-hook semantic-before-toplevel-cache-flush-hook semantic-dump-parse - + semantic-type-relation-separator-character + semantic-command-separation-character ))) (dolist (V vars) (semantic-describe-buffer-var-helper V buff))) @@ -344,34 +308,6 @@ If TAG is not specified, use the tag at point." ))) ) -(defun semantic-current-tag-interactive (p) - "Display the current token. -Argument P is the point to search from in the current buffer." - (interactive "d") - (require 'semantic/find) - (let ((tok (semantic-brute-find-innermost-tag-by-position - p (current-buffer)))) - (message (mapconcat 'semantic-abbreviate-nonterminal tok ",")) - (car tok)) - ) - -(defun semantic-hack-search () - "Display info about something under the cursor using generic methods." - (interactive) - (require 'semantic/find) - (let ((strm (cdr (semantic-fetch-tags))) - (res nil)) - (setq res (semantic-brute-find-tag-by-position (point) strm)) - (if res - (progn - (pop-to-buffer "*SEMANTIC HACK RESULTS*") - (require 'pp) - (erase-buffer) - (insert (pp-to-string res) "\n") - (goto-char (point-min)) - (shrink-window-if-larger-than-buffer)) - (message "nil")))) - (defun semantic-assert-valid-token (tok) "Assert that TOK is a valid token." (if (semantic-tag-p tok) @@ -415,7 +351,8 @@ NOTFIRST indicates that this was not the first call in the recursive use." 'unmatched))) (setq o (cons (car over) o))) (setq over (cdr over))) - (message "Remaining overlays: %S" o))) + (when (called-interactively-p 'any) + (message "Remaining overlays: %S" o)))) over) ;;; Interactive commands (from Senator). diff --git a/lisp/cedet/semantic/wisent/python-wy.el b/lisp/cedet/semantic/wisent/python-wy.el index 29b0626ffa6..264ebe9bb7b 100644 --- a/lisp/cedet/semantic/wisent/python-wy.el +++ b/lisp/cedet/semantic/wisent/python-wy.el @@ -35,6 +35,7 @@ (defconst wisent-python-wy--keyword-table (semantic-lex-make-keyword-table '(("and" . AND) + ("as" . AS) ("assert" . ASSERT) ("break" . BREAK) ("class" . CLASS) @@ -72,6 +73,7 @@ ("pass" summary "Statement that does nothing") ("or" summary "Binary logical 'or' operator") ("not" summary "Unary boolean negation operator") + ("lambda" summary "Create anonymous function") ("is" summary "Binary operator that tests for object equality") ("in" summary "Part of 'for' statement ") ("import" summary "Load specified modules") @@ -86,10 +88,11 @@ ("elif" summary "Shorthand for 'else if' following an 'if' statement") ("del" summary "Delete specified objects, i.e., undo what assignment did") ("def" summary "Define a new function") - ("continue" summary "Skip to the next interation of enclosing 'for' or 'while' loop") + ("continue" summary "Skip to the next iteration of enclosing 'for' or 'while' loop") ("class" summary "Define a new class") ("break" summary "Terminate 'for' or 'while' loop") ("assert" summary "Raise AssertionError exception if is false") + ("as" summary "EXPR as NAME makes value of EXPR available as variable NAME") ("and" summary "Logical AND binary operator ... "))) "Table of language keywords.") @@ -172,7 +175,7 @@ (eval-when-compile (require 'semantic/wisent/comp)) (wisent-compile-grammar - '((BACKSLASH NEWLINE INDENT DEDENT INDENT_BLOCK PAREN_BLOCK BRACE_BLOCK BRACK_BLOCK LPAREN RPAREN LBRACE RBRACE LBRACK RBRACK LTLTEQ GTGTEQ EXPEQ DIVDIVEQ DIVDIV LTLT GTGT EXPONENT EQ GE LE PLUSEQ MINUSEQ MULTEQ DIVEQ MODEQ AMPEQ OREQ HATEQ LTGT NE HAT LT GT AMP MULT DIV MOD PLUS MINUS PERIOD TILDE BAR COLON SEMICOLON COMMA ASSIGN BACKQUOTE STRING_LITERAL NUMBER_LITERAL NAME AND ASSERT BREAK CLASS CONTINUE DEF DEL ELIF ELSE EXCEPT EXEC FINALLY FOR FROM GLOBAL IF IMPORT IN IS LAMBDA NOT OR PASS PRINT RAISE RETURN TRY WHILE YIELD) + '((BACKSLASH NEWLINE INDENT DEDENT INDENT_BLOCK PAREN_BLOCK BRACE_BLOCK BRACK_BLOCK LPAREN RPAREN LBRACE RBRACE LBRACK RBRACK LTLTEQ GTGTEQ EXPEQ DIVDIVEQ DIVDIV LTLT GTGT EXPONENT EQ GE LE PLUSEQ MINUSEQ MULTEQ DIVEQ MODEQ AMPEQ OREQ HATEQ LTGT NE HAT LT GT AMP MULT DIV MOD PLUS MINUS PERIOD TILDE BAR COLON SEMICOLON COMMA ASSIGN BACKQUOTE STRING_LITERAL NUMBER_LITERAL NAME AND AS ASSERT BREAK CLASS CONTINUE DEF DEL ELIF ELSE EXCEPT EXEC FINALLY FOR FROM GLOBAL IF IMPORT IN IS LAMBDA NOT OR PASS PRINT RAISE RETURN TRY WHILE YIELD) nil (goal ((NEWLINE)) @@ -280,6 +283,9 @@ ((testlist) nil)) (yield_stmt + ((YIELD) + (wisent-raw-tag + (semantic-tag-new-code $1 nil))) ((YIELD testlist) (wisent-raw-tag (semantic-tag-new-code $1 nil)))) @@ -320,14 +326,14 @@ ((import_as_name_list COMMA import_as_name) nil)) (import_as_name - ((NAME name_name_opt) + ((NAME as_name_opt) nil)) (dotted_as_name - ((dotted_name name_name_opt))) - (name_name_opt + ((dotted_name as_name_opt))) + (as_name_opt (nil) - ((NAME NAME) - nil)) + ((AS NAME) + (identity $2))) (dotted_name ((NAME)) ((dotted_name PERIOD NAME) diff --git a/lisp/cedet/srecode.el b/lisp/cedet/srecode.el index d6c218f2b5a..f27a2028b92 100644 --- a/lisp/cedet/srecode.el +++ b/lisp/cedet/srecode.el @@ -41,7 +41,7 @@ (require 'mode-local) (load "srecode/loaddefs" nil 'nomessage) -(defvar srecode-version "1.0pre7" +(defvar srecode-version "1.0" "Current version of the Semantic Recoder.") ;;; Code: diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index 3caab23e31f..de9b6f56de3 100644 --- a/lisp/cedet/srecode/compile.el +++ b/lisp/cedet/srecode/compile.el @@ -35,19 +35,17 @@ (require 'semantic) (require 'eieio) (require 'eieio-base) -(require 'srecode) (require 'srecode/table) +(require 'srecode/dictionary) (declare-function srecode-template-inserter-newline-child-p "srecode/insert" t t) -(declare-function srecode-create-section-dictionary "srecode/dictionary") -(declare-function srecode-dictionary-compound-variable "srecode/dictionary") ;;; Code: ;;; Template Class ;; -;; Templatets describe a patter of text that can be inserted into a +;; Templates describe a pattern of text that can be inserted into a ;; buffer. ;; (defclass srecode-template (eieio-named) @@ -213,6 +211,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." (mode nil) (application nil) (priority nil) + (project nil) (vars nil) ) @@ -256,6 +255,8 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." (setq application (read firstvalue))) ((string= name "priority") (setq priority (read firstvalue))) + ((string= name "project") + (setq project firstvalue)) (t ;; Assign this into some table of variables. (setq vars (cons (cons name firstvalue) vars)) @@ -297,12 +298,19 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." ;; Calculate priority ;; (if (not priority) - (let ((d (file-name-directory (buffer-file-name))) - (sd (file-name-directory (locate-library "srecode"))) - (defaultdelta (if (eq mode 'default) 20 0))) - (if (string= d sd) - (setq priority (+ 80 defaultdelta)) - (setq priority (+ 30 defaultdelta))) + (let ((d (expand-file-name (file-name-directory (buffer-file-name)))) + (sd (expand-file-name (file-name-directory (locate-library "srecode")))) + (defaultdelta (if (eq mode 'default) 0 10))) + ;; @TODO : WHEN INTEGRATING INTO EMACS + ;; The location of Emacs default templates needs to be specified + ;; here to also have a lower priority. + (if (string-match (concat "^" sd) d) + (setq priority (+ 30 defaultdelta)) + ;; If the user created template is for a project, then + ;; don't add as much as if it is unique to just some user. + (if (stringp project) + (setq priority (+ 50 defaultdelta)) + (setq priority (+ 80 defaultdelta)))) (message "Templates %s has estimated priority of %d" (file-name-nondirectory (buffer-file-name)) priority)) @@ -311,56 +319,56 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." priority)) ;; Save it up! - (srecode-compile-template-table table mode priority application vars) + (srecode-compile-template-table table mode priority application project vars) ) ) -(defun srecode-compile-one-template-tag (tag STATE) - "Compile a template tag TAG into an srecode template class. -STATE is the current compile state as an object `srecode-compile-state'." - (require 'srecode/dictionary) - (let* ((context (oref STATE context)) - (codeout (srecode-compile-split-code - tag (semantic-tag-get-attribute tag :code) - STATE)) - (code (cdr codeout)) - (args (semantic-tag-function-arguments tag)) - (binding (semantic-tag-get-attribute tag :binding)) - (rawdicts (semantic-tag-get-attribute tag :dictionaries)) - (sdicts (srecode-create-section-dictionary rawdicts STATE)) - (addargs nil) - ) -; (message "Compiled %s to %d codes with %d args and %d prompts." -; (semantic-tag-name tag) -; (length code) -; (length args) -; (length prompts)) - (while args - (setq addargs (cons (intern (car args)) addargs)) - (when (eq (car addargs) :blank) - ;; If we have a wrap, then put wrap inserters on both - ;; ends of the code. - (setq code (append - (list (srecode-compile-inserter "BLANK" - "\r" - STATE - :secondname nil - :where 'begin)) - code - (list (srecode-compile-inserter "BLANK" - "\r" - STATE - :secondname nil - :where 'end)) - ))) - (setq args (cdr args))) +(defun srecode-compile-one-template-tag (tag state) + "Compile a template tag TAG into a srecode template object. +STATE is the current compile state as an object of class +`srecode-compile-state'." + (let* ((context (oref state context)) + (code (cdr (srecode-compile-split-code + tag (semantic-tag-get-attribute tag :code) + state))) + (args (semantic-tag-function-arguments tag)) + (binding (semantic-tag-get-attribute tag :binding)) + (dict-tags (semantic-tag-get-attribute tag :dictionaries)) + (root-dict (when dict-tags + (srecode-create-dictionaries-from-tags + dict-tags state))) + (addargs)) + ;; Examine arguments. + (dolist (arg args) + (let ((symbol (intern arg))) + (push symbol addargs) + + ;; If we have a wrap, then put wrap inserters on both ends of + ;; the code. + (when (eq symbol :blank) + (setq code (append + (list (srecode-compile-inserter + "BLANK" + "\r" + state + :secondname nil + :where 'begin)) + code + (list (srecode-compile-inserter + "BLANK" + "\r" + state + :secondname nil + :where 'end))))))) + + ;; Construct and return the template object. (srecode-template (semantic-tag-name tag) - :context context - :args (nreverse addargs) - :dictionary sdicts - :binding binding - :code code) - )) + :context context + :args (nreverse addargs) + :dictionary root-dict + :binding binding + :code code)) + ) (defun srecode-compile-do-hard-newline-p (comp) "Examine COMP to decide if the upcoming newline should be hard. @@ -514,12 +522,13 @@ to the inserter constructor." (if (not new) (error "SRECODE: Unknown macro code %S" key)) new))) -(defun srecode-compile-template-table (templates mode priority application vars) +(defun srecode-compile-template-table (templates mode priority application project vars) "Compile a list of TEMPLATES into an semantic recode table. The table being compiled is for MODE, or the string \"default\". PRIORITY is a numerical value that indicates this tables location in an ordered search. APPLICATION is the name of the application these templates belong to. +PROJECT is a directory name which these templates scope to. A list of defined variables VARS provides a variable table." (let ((namehash (make-hash-table :test 'equal :size (length templates))) @@ -549,6 +558,9 @@ A list of defined variables VARS provides a variable table." (setq lp (cdr lp)))) + (when (stringp project) + (setq project (expand-file-name project))) + (let* ((table (srecode-mode-table-new mode (buffer-file-name) :templates (nreverse templates) :namehash namehash @@ -556,7 +568,8 @@ A list of defined variables VARS provides a variable table." :variables vars :major-mode mode :priority priority - :application application)) + :application application + :project project)) (tmpl (oref table templates))) ;; Loop over all the templates, and xref. (while tmpl diff --git a/lisp/cedet/srecode/cpp.el b/lisp/cedet/srecode/cpp.el index ceaa6fba3aa..7fe2bdaa410 100644 --- a/lisp/cedet/srecode/cpp.el +++ b/lisp/cedet/srecode/cpp.el @@ -26,6 +26,27 @@ ;;; Code: +(require 'srecode) +(require 'srecode/dictionary) +(require 'srecode/semantic) +(require 'semantic/tag) + +;;; Customization +;; + +(defgroup srecode-cpp nil + "C++-specific Semantic Recoder settings." + :group 'srecode) + +(defcustom srecode-cpp-namespaces + '("std" "boost") + "List expansion candidates for the :using-namespaces argument. +A dictionary entry of the named PREFIX_NAMESPACE with the value +NAMESPACE:: is created for each namespace unless the current +buffer contains a using NAMESPACE; statement " + :group 'srecode-cpp + :type '(repeat string)) + ;;; :cpp ARGUMENT HANDLING ;; ;; When a :cpp argument is required, fill the dictionary with @@ -33,10 +54,6 @@ ;; ;; Error if not in a C++ mode. -(require 'srecode) -(require 'srecode/dictionary) -(require 'srecode/semantic) - ;;;###autoload (defun srecode-semantic-handle-:cpp (dict) "Add macros into the dictionary DICT based on the current c++ file. @@ -59,6 +76,23 @@ HEADER - Shown section if in a header file." ) ) +(defun srecode-semantic-handle-:using-namespaces (dict) + "Add macros into the dictionary DICT based on used namespaces. +Adds the following: +PREFIX_NAMESPACE - for each NAMESPACE in `srecode-cpp-namespaces'." + (let ((tags (semantic-find-tags-by-class + 'using (semantic-fetch-tags)))) + (dolist (name srecode-cpp-namespaces) + (let ((variable (format "PREFIX_%s" (upcase name))) + (prefix (format "%s::" name))) + (srecode-dictionary-set-value dict variable prefix) + (dolist (tag tags) + (when (and (eq (semantic-tag-get-attribute tag :kind) + 'namespace) + (string= (semantic-tag-name tag) name)) + (srecode-dictionary-set-value dict variable "")))))) + ) + (define-mode-local-override srecode-semantic-apply-tag-to-dict c++-mode (tag-wrapper dict) "Apply C++ specific features from TAG-WRAPPER into DICT. @@ -97,6 +131,7 @@ special behavior for tag of classes include, using and function." (srecode-semantic-tag (semantic-tag-name value-tag) :prime value-tag) value-dict)) + ;; Discriminate using statements referring to namespaces and ;; types. (when (eq (semantic-tag-get-attribute tag :kind) 'namespace) @@ -111,7 +146,8 @@ special behavior for tag of classes include, using and function." ;; when they make sense. My best bet would be ;; (semantic-tag-function-parent tag), but it is not there, when ;; the function is defined in the scope of a class. - (let ((member 't) + (let ((member t) + (templates (semantic-tag-get-attribute tag :template)) (modifiers (semantic-tag-modifiers tag))) ;; Add modifiers into the dictionary @@ -120,6 +156,9 @@ special behavior for tag of classes include, using and function." dict "MODIFIERS"))) (srecode-dictionary-set-value modifier-dict "NAME" modifier))) + ;; Add templates into child dictionaries. + (srecode-cpp-apply-templates dict templates) + ;; When the function is a member function, it can have ;; additional modifiers. (when member @@ -133,11 +172,40 @@ special behavior for tag of classes include, using and function." ;; entry. (when (semantic-tag-get-attribute tag :pure-virtual-flag) (srecode-dictionary-show-section dict "PURE")) - ) - )) + ))) + + ;; + ;; CLASS + ;; + ((eq class 'type) + ;; For classes, add template parameters. + (when (or (semantic-tag-of-type-p tag "class") + (semantic-tag-of-type-p tag "struct")) + + ;; Add templates into child dictionaries. + (let ((templates (semantic-tag-get-attribute tag :template))) + (srecode-cpp-apply-templates dict templates)))) )) ) + +;;; Helper functions +;; + +(defun srecode-cpp-apply-templates (dict templates) + "Add section dictionaries for TEMPLATES to DICT." + (when templates + (let ((templates-dict (srecode-dictionary-add-section-dictionary + dict "TEMPLATES"))) + (dolist (template templates) + (let ((template-dict (srecode-dictionary-add-section-dictionary + templates-dict "ARGS"))) + (srecode-semantic-apply-tag-to-dict + (srecode-semantic-tag (semantic-tag-name template) + :prime template) + template-dict))))) + ) + (provide 'srecode/cpp) ;; Local variables: diff --git a/lisp/cedet/srecode/dictionary.el b/lisp/cedet/srecode/dictionary.el index 8d168a7f339..cd97c880595 100644 --- a/lisp/cedet/srecode/dictionary.el +++ b/lisp/cedet/srecode/dictionary.el @@ -37,6 +37,7 @@ (declare-function srecode-compile-parse-inserter "srecode/compile") (declare-function srecode-dump-code-list "srecode/compile") (declare-function srecode-load-tables-for-mode "srecode/find") +(declare-function srecode-template-table-in-project-p "srecode/find") (declare-function srecode-insert-code-stream "srecode/insert") (declare-function data-debug-new-buffer "data-debug") (declare-function data-debug-insert-object-slots "eieio-datadebug") @@ -157,40 +158,49 @@ buffer's table. If BUFFER-OR-PARENT is t, then this dictionary should not be associated with a buffer or parent." (save-excursion + ;; Handle the parent (let ((parent nil) (buffer nil) (origin nil) (initfrombuff nil)) - (cond ((bufferp buffer-or-parent) - (set-buffer buffer-or-parent) - (setq buffer buffer-or-parent - origin (buffer-name buffer-or-parent) - initfrombuff t)) - ((srecode-dictionary-child-p buffer-or-parent) - (setq parent buffer-or-parent - buffer (oref buffer-or-parent buffer) - origin (concat (object-name buffer-or-parent) " in " - (if buffer (buffer-name buffer) - "no buffer"))) - (when buffer - (set-buffer buffer))) - ((eq buffer-or-parent t) - (setq buffer nil - origin "Unspecified Origin")) - (t - (setq buffer (current-buffer) - origin (concat "Unspecified. Assume " - (buffer-name buffer)) - initfrombuff t) - ) - ) + (cond + ;; Parent is a buffer + ((bufferp buffer-or-parent) + (set-buffer buffer-or-parent) + (setq buffer buffer-or-parent + origin (buffer-name buffer-or-parent) + initfrombuff t)) + + ;; Parent is another dictionary + ((srecode-dictionary-child-p buffer-or-parent) + (setq parent buffer-or-parent + buffer (oref buffer-or-parent buffer) + origin (concat (object-name buffer-or-parent) " in " + (if buffer (buffer-name buffer) + "no buffer"))) + (when buffer + (set-buffer buffer))) + + ;; No parent + ((eq buffer-or-parent t) + (setq buffer nil + origin "Unspecified Origin")) + + ;; Default to unspecified parent + (t + (setq buffer (current-buffer) + origin (concat "Unspecified. Assume " + (buffer-name buffer)) + initfrombuff t))) + + ;; Create the new dictionary object. (let ((dict (srecode-dictionary major-mode - :buffer buffer - :parent parent - :namehash (make-hash-table :test 'equal - :size 20) - :origin origin))) + :buffer buffer + :parent parent + :namehash (make-hash-table :test 'equal + :size 20) + :origin origin))) ;; Only set up the default variables if we are being built ;; directroy for a particular buffer. (when initfrombuff @@ -211,34 +221,37 @@ associated with a buffer or parent." TPL is an object representing a compiled template file." (when tpl (let ((tabs (oref tpl :tables))) + (require 'srecode/find) ; For srecode-template-table-in-project-p (while tabs - (let ((vars (oref (car tabs) variables))) - (while vars - (srecode-dictionary-set-value - dict (car (car vars)) (cdr (car vars))) - (setq vars (cdr vars)))) - (setq tabs (cdr tabs)))))) + (when (srecode-template-table-in-project-p (car tabs)) + (let ((vars (oref (car tabs) variables))) + (while vars + (srecode-dictionary-set-value + dict (car (car vars)) (cdr (car vars))) + (setq vars (cdr vars))))) + (setq tabs (cdr tabs)))))) (defmethod srecode-dictionary-set-value ((dict srecode-dictionary) name value) "In dictionary DICT, set NAME to have VALUE." ;; Validate inputs - (if (not (stringp name)) - (signal 'wrong-type-argument (list name 'stringp))) + (unless (stringp name) + (signal 'wrong-type-argument (list name 'stringp))) + ;; Add the value. (with-slots (namehash) dict (puthash name value namehash)) ) (defmethod srecode-dictionary-add-section-dictionary ((dict srecode-dictionary) - name &optional show-only) + name &optional show-only force) "In dictionary DICT, add a section dictionary for section macro NAME. Return the new dictionary. -You can add several dictionaries to the same section macro. -For each dictionary added to a macro, the block of codes in the -template will be repeated. +You can add several dictionaries to the same section entry. +For each dictionary added to a variable, the block of codes in +the template will be repeated. If optional argument SHOW-ONLY is non-nil, then don't add a new dictionary if there is already one in place. Also, don't add FIRST/LAST entries. @@ -255,10 +268,11 @@ which will enable SECTIONS to be enabled. Adding a new dictionary will alter these values in previously inserted dictionaries." ;; Validate inputs - (if (not (stringp name)) - (signal 'wrong-type-argument (list name 'stringp))) + (unless (stringp name) + (signal 'wrong-type-argument (list name 'stringp))) + (let ((new (srecode-create-dictionary dict)) - (ov (srecode-dictionary-lookup-name dict name))) + (ov (srecode-dictionary-lookup-name dict name t))) (when (not show-only) ;; Setup the FIRST/NOTFIRST and LAST/NOTLAST entries. @@ -275,7 +289,9 @@ inserted dictionaries." (srecode-dictionary-show-section new "LAST")) ) - (when (or (not show-only) (null ov)) + (when (or force + (not show-only) + (null ov)) (srecode-dictionary-set-value dict name (append ov (list new)))) ;; Return the new sub-dictionary. new)) @@ -283,8 +299,9 @@ inserted dictionaries." (defmethod srecode-dictionary-show-section ((dict srecode-dictionary) name) "In dictionary DICT, indicate that the section NAME should be exposed." ;; Validate inputs - (if (not (stringp name)) - (signal 'wrong-type-argument (list name 'stringp))) + (unless (stringp name) + (signal 'wrong-type-argument (list name 'stringp))) + ;; Showing a section is just like making a section dictionary, but ;; with no dictionary values to add. (srecode-dictionary-add-section-dictionary dict name t) @@ -294,51 +311,120 @@ inserted dictionaries." "In dictionary DICT, indicate that the section NAME should be hidden." ;; We need to find the has value, and then delete it. ;; Validate inputs - (if (not (stringp name)) - (signal 'wrong-type-argument (list name 'stringp))) + (unless (stringp name) + (signal 'wrong-type-argument (list name 'stringp))) + ;; Add the value. (with-slots (namehash) dict (remhash name namehash)) nil) -(defmethod srecode-dictionary-merge ((dict srecode-dictionary) otherdict) - "Merge into DICT the dictionary entries from OTHERDICT." +(defmethod srecode-dictionary-add-entries ((dict srecode-dictionary) + entries &optional state) + "Add ENTRIES to DICT. + +ENTRIES is a list of even length of dictionary entries to +add. ENTRIES looks like this: + + (NAME_1 VALUE_1 NAME_2 VALUE_2 ...) + +The following rules apply: + * NAME_N is a string +and for values + * If VALUE_N is t, the section NAME_N is shown. + * If VALUE_N is a string, an ordinary value is inserted. + * If VALUE_N is a dictionary, it is inserted as entry NAME_N. + * Otherwise, a compound variable is created for VALUE_N. + +The optional argument STATE has to non-nil when compound values +are inserted. An error is signaled if ENTRIES contains compound +values but STATE is nil." + (while entries + (let ((name (nth 0 entries)) + (value (nth 1 entries))) + (cond + ;; Value is t; show a section. + ((eq value t) + (srecode-dictionary-show-section dict name)) + + ;; Value is a simple string; create an ordinary dictionary + ;; entry + ((stringp value) + (srecode-dictionary-set-value dict name value)) + + ;; Value is a dictionary; insert as child dictionary. + ((srecode-dictionary-child-p value) + (srecode-dictionary-merge + (srecode-dictionary-add-section-dictionary dict name) + value t)) + + ;; Value is some other object; create a compound value. + (t + (unless state + (error "Cannot insert compound values without state.")) + + (srecode-dictionary-set-value + dict name + (srecode-dictionary-compound-variable + name :value value :state state))))) + (setq entries (nthcdr 2 entries))) + dict) + +(defmethod srecode-dictionary-merge ((dict srecode-dictionary) otherdict + &optional force) + "Merge into DICT the dictionary entries from OTHERDICT. +Unless the optional argument FORCE is non-nil, values in DICT are +not modified, even if there are values of the same names in +OTHERDICT." (when otherdict (maphash (lambda (key entry) - ;; Only merge in the new values if there was no old value. + ;; The new values is only merged in if there was no old value + ;; or FORCE is non-nil. + ;; ;; This protects applications from being whacked, and basically ;; makes these new section dictionary entries act like ;; "defaults" instead of overrides. - (when (not (srecode-dictionary-lookup-name dict key)) - (cond ((and (listp entry) (srecode-dictionary-p (car entry))) - ;; A list of section dictionaries. - ;; We need to merge them in. - (while entry - (let ((new-sub-dict - (srecode-dictionary-add-section-dictionary - dict key))) - (srecode-dictionary-merge new-sub-dict (car entry))) - (setq entry (cdr entry))) - ) + (when (or force + (not (srecode-dictionary-lookup-name dict key t))) + (cond + ;; A list of section dictionaries. We need to merge them in. + ((and (listp entry) + (srecode-dictionary-p (car entry))) + (dolist (sub-dict entry) + (srecode-dictionary-merge + (srecode-dictionary-add-section-dictionary + dict key t t) + sub-dict force))) - (t - (srecode-dictionary-set-value dict key entry))) - )) + ;; Other values can be set directly. + (t + (srecode-dictionary-set-value dict key entry))))) (oref otherdict namehash)))) (defmethod srecode-dictionary-lookup-name ((dict srecode-dictionary) - name) - "Return information about the current DICT's value for NAME." + name &optional non-recursive) + "Return information about DICT's value for NAME. +DICT is a dictionary, and NAME is a string that is treated as the +name of an entry in the dictionary. If such an entry exists, its +value is returned. Otherwise, nil is returned. Normally, the +lookup is recursive in the sense that the parent of DICT is +searched for NAME if it is not found in DICT. This recursive +lookup can be disabled by the optional argument NON-RECURSIVE. + +This function derives values for some special NAMEs, such as +'FIRST' and 'LAST'." (if (not (slot-boundp dict 'namehash)) nil - ;; Get the value of this name from the dictionary - (or (with-slots (namehash) dict - (gethash name namehash)) - (and (not (member name '("FIRST" "LAST" "NOTFIRST" "NOTLAST"))) - (oref dict parent) - (srecode-dictionary-lookup-name (oref dict parent) name)) - ))) + ;; Get the value of this name from the dictionary or its parent + ;; unless the lookup should be non-recursive. + (with-slots (namehash parent) dict + (or (gethash name namehash) + (and (not non-recursive) + (not (member name '("FIRST" "LAST" "NOTFIRST" "NOTLAST"))) + parent + (srecode-dictionary-lookup-name parent name))))) + ) (defmethod srecode-root-dictionary ((dict srecode-dictionary)) "For dictionary DICT, return the root dictionary. @@ -431,10 +517,22 @@ inserted with a new editable field.") (start (point)) (name (oref sti :object-name))) - (if (or (not dv) (string= dv "")) - (insert name) - (insert dv)) + (cond + ;; No default value. + ((not dv) (insert name)) + ;; A compound value as the default? Recurse. + ((srecode-dictionary-compound-value-child-p dv) + (srecode-compound-toString dv function dictionary)) + ;; A string that is empty? Use the name. + ((and (stringp dv) (string= dv "")) + (insert name)) + ;; Insert strings + ((stringp dv) (insert dv)) + ;; Some other issue + (t + (error "Unknown default value for value %S" name))) + ;; Create a field from the inserter. (srecode-field name :name name :start start :end (point) @@ -482,6 +580,53 @@ STATE is the current compiler state." (setq sectiondicts (cdr sectiondicts))) new))) +(defun srecode-create-dictionaries-from-tags (tags state) + "Create a dictionary with entries according to TAGS. + +TAGS should be in the format produced by the template file +grammar. That is + +TAGS = (ENTRY_1 ENTRY_2 ...) + +where + +ENTRY_N = (NAME ENTRY_N_1 ENTRY_N_2 ...) | TAG + +where TAG is a semantic tag of class 'variable. The (NAME ... ) +form creates a child dictionary which is stored under the name +NAME. The TAG form creates a value entry or section dictionary +entry whose name is the name of the tag. + +STATE is the current compiler state." + (let ((dict (srecode-create-dictionary t)) + (entries (apply #'append + (mapcar + (lambda (entry) + (cond + ;; Entry is a tag + ((semantic-tag-p entry) + (let ((name (semantic-tag-name entry)) + (value (semantic-tag-variable-default entry))) + (list name + (if (and (listp value) + (= (length value) 1) + (stringp (car value))) + (car value) + value)))) + + ;; Entry is a nested dictionary + (t + (let ((name (car entry)) + (entries (cdr entry))) + (list name + (srecode-create-dictionaries-from-tags + entries state)))))) + tags)))) + (srecode-dictionary-add-entries + dict entries state) + dict) + ) + ;;; DUMP DICTIONARY ;; ;; Make a dictionary, and dump it's contents. diff --git a/lisp/cedet/srecode/fields.el b/lisp/cedet/srecode/fields.el index 347538aa871..ceb5f77f87f 100644 --- a/lisp/cedet/srecode/fields.el +++ b/lisp/cedet/srecode/fields.el @@ -35,6 +35,8 @@ ;; Each field has 2 overlays. The second overlay allows control in ;; the character just after the field, but does not highlight it. +;; @TODO - Cancel an old field array if a new one is about to be created! + ;; Keep this library independent of SRecode proper. (require 'eieio) @@ -43,6 +45,10 @@ "While inserting a set of fields, collect in this variable. Once an insertion set is done, these fields will be activated.") + +;;; Customization +;; + (defface srecode-field-face '((((class color) (background dark)) (:underline "green")) @@ -51,6 +57,11 @@ Once an insertion set is done, these fields will be activated.") "*Face used to specify editable fields from a template." :group 'semantic-faces) +(defcustom srecode-fields-exit-confirmation nil + "Ask for confirmation before leaving field editing mode." + :group 'srecode + :type 'boolean) + ;;; BASECLASS ;; ;; Fields and the template region share some basic overlay features. @@ -187,7 +198,7 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO." (oset ir fields srecode-field-archive) (setq srecode-field-archive nil) - ;; Initailize myself first. + ;; Initialize myself first. (call-next-method) ) @@ -237,7 +248,7 @@ If SET-TO is a string, then replace the text of OLAID wit SET-TO." (remove-hook 'post-command-hook 'srecode-field-post-command t) (if (srecode-point-in-region-p ar) nil ;; Keep going - ;; We moved out of the temlate. Cancel the edits. + ;; We moved out of the template. Cancel the edits. (srecode-delete ar))) )) @@ -429,7 +440,8 @@ PRE-LEN is used in the after mode for the length of the changed text." (defun srecode-field-exit-ask () "Ask if the user wants to exit field-editing mini-mode." (interactive) - (when (y-or-n-p "Exit field-editing mode? ") + (when (or (not srecode-fields-exit-confirmation) + (y-or-n-p "Exit field-editing mode? ")) (srecode-delete (srecode-active-template-region)))) diff --git a/lisp/cedet/srecode/find.el b/lisp/cedet/srecode/find.el index 1a3057fda0e..9c5a897fc4f 100644 --- a/lisp/cedet/srecode/find.el +++ b/lisp/cedet/srecode/find.el @@ -92,6 +92,23 @@ all template files for that application will be loaded." )) )) +;;; PROJECT +;; +;; Find if a template table has a project set, and if so, is the +;; current buffer in that project. +(defmethod srecode-template-table-in-project-p ((tab srecode-template-table)) + "Return non-nil if the table TAB can be used in the current project. +If TAB has a :project set, check that the directories match. +If TAB is nil, then always return t." + (let ((proj (oref tab :project))) + ;; Return t if the project wasn't set. + (if (not proj) t + ;; If the project directory was set, lets check it. + (let ((dd (expand-file-name default-directory)) + (projexp (regexp-quote (directory-file-name proj)))) + (if (string-match (concat "^" projexp) dd) + t nil))))) + ;;; SEARCH ;; ;; Find a given template based on name, and features of the current @@ -103,13 +120,14 @@ all template files for that application will be loaded." Optional argument CONTEXT specifies that the template should part of a particular context. The APPLICATION argument is unused." - (if context - ;; If a context is specified, then look it up there. - (let ((ctxth (gethash context (oref tab contexthash)))) - (when ctxth - (gethash template-name ctxth))) - ;; No context, perhaps a merged name? - (gethash template-name (oref tab namehash)))) + (when (srecode-template-table-in-project-p tab) + (if context + ;; If a context is specified, then look it up there. + (let ((ctxth (gethash context (oref tab contexthash)))) + (when ctxth + (gethash template-name ctxth))) + ;; No context, perhaps a merged name? + (gethash template-name (oref tab namehash))))) (defmethod srecode-template-get-table ((tab srecode-mode-table) template-name &optional @@ -144,32 +162,33 @@ tables that do not belong to an application will be searched." "Find in the template name in table TAB, the template with BINDING. Optional argument CONTEXT specifies that the template should part of a particular context." - (let* ((keyout nil) - (hashfcn (lambda (key value) - (when (and (slot-boundp value 'binding) - (oref value binding) - (= (aref (oref value binding) 0) binding)) - (setq keyout key)))) - (contextstr (cond ((listp context) - (car-safe context)) - ((stringp context) - context) - (t nil))) - ) - (if context - (let ((ctxth (gethash contextstr (oref tab contexthash)))) - (when ctxth - ;; If a context is specified, then look it up there. - (maphash hashfcn ctxth) - ;; Context hashes EXCLUDE the context prefix which - ;; we need to include, so concat it here - (when keyout - (setq keyout (concat contextstr ":" keyout))) - ))) - (when (not keyout) - ;; No context, or binding in context. Try full hash. - (maphash hashfcn (oref tab namehash))) - keyout)) + (when (srecode-template-table-in-project-p tab) + (let* ((keyout nil) + (hashfcn (lambda (key value) + (when (and (slot-boundp value 'binding) + (oref value binding) + (= (aref (oref value binding) 0) binding)) + (setq keyout key)))) + (contextstr (cond ((listp context) + (car-safe context)) + ((stringp context) + context) + (t nil))) + ) + (if context + (let ((ctxth (gethash contextstr (oref tab contexthash)))) + (when ctxth + ;; If a context is specified, then look it up there. + (maphash hashfcn ctxth) + ;; Context hashes EXCLUDE the context prefix which + ;; we need to include, so concat it here + (when keyout + (setq keyout (concat contextstr ":" keyout))) + ))) + (when (not keyout) + ;; No context, or binding in context. Try full hash. + (maphash hashfcn (oref tab namehash))) + keyout))) (defmethod srecode-template-get-table-for-binding ((tab srecode-mode-table) binding &optional context application) @@ -220,7 +239,8 @@ Optional argument HASH is the hash table to fill in." ) (while tabs ;; Exclude templates for a perticular application. - (when (not (oref (car tabs) :application)) + (when (and (not (oref (car tabs) :application)) + (srecode-template-table-in-project-p (car tabs))) (maphash (lambda (key temp) (puthash key temp mhash) ) diff --git a/lisp/cedet/srecode/getset.el b/lisp/cedet/srecode/getset.el index 87266bf2475..a90f3a6d67a 100644 --- a/lisp/cedet/srecode/getset.el +++ b/lisp/cedet/srecode/getset.el @@ -55,8 +55,9 @@ will be derived." (error "No templates for inserting get/set")) ;; Step 1: Try to derive the tag for the class we will use + (semantic-fetch-tags) (let* ((class (or class-in (srecode-auto-choose-class (point)))) - (tagstart (semantic-tag-start class)) + (tagstart (when class (semantic-tag-start class))) (inclass (eq (semantic-current-tag-of-class 'type) class)) (field nil) ) diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index 4ee6d467009..843b577e1eb 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el @@ -26,6 +26,9 @@ ;; Manage the insertion process for a template. ;; +(eval-when-compile + (require 'cl)) ;; for `lexical-let' + (require 'srecode/compile) (require 'srecode/find) (require 'srecode/dictionary) @@ -49,7 +52,7 @@ Possible values are: NOTE: The field feature does not yet work with XEmacs." :group 'srecode :type '(choice (const :tag "Ask" ask) - (cons :tag "Field" field))) + (const :tag "Field" field))) (defvar srecode-insert-with-fields-in-progress nil "Non-nil means that we are actively inserting a template with fields.") @@ -86,7 +89,6 @@ DICT-ENTRIES are additional dictionary values to add." (car dict-entries) (car (cdr dict-entries))) (setq dict-entries (cdr (cdr dict-entries)))) - ;;(srecode-resolve-arguments temp newdict) (srecode-insert-fcn temp newdict) ;; Don't put code here. We need to return the end-mark ;; for this insertion step. @@ -100,6 +102,10 @@ has set everything up already." ;; Perform the insertion. (let ((standard-output (or stream (current-buffer))) (end-mark nil)) + ;; Merge any template entries into the input dictionary. + (when (slot-boundp template 'dictionary) + (srecode-dictionary-merge dictionary (oref template dictionary))) + (unless skipresolver ;; Make sure the semantic tags are up to date. (semantic-fetch-tags) @@ -110,7 +116,7 @@ has set everything up already." ;; If there is a buffer, turn off various hooks. This will cause ;; the mod hooks to be buffered up during the insert, but ;; prevent tools like font-lock from fontifying mid-template. - ;; Especialy important during insertion of complex comments that + ;; Especially important during insertion of complex comments that ;; cause the new font-lock to comment-color stuff after the inserted ;; comment. ;; @@ -239,6 +245,9 @@ ST can be a class, or an object." (defmethod srecode-insert-method ((st srecode-template) dictionary) "Insert the srecoder template ST." ;; Merge any template entries into the input dictionary. + ;; This may happen twice since some templates arguments need + ;; these dictionary values earlier, but these values always + ;; need merging for template inserting in other templates. (when (slot-boundp st 'dictionary) (srecode-dictionary-merge dictionary (oref st dictionary))) ;; Do an insertion. @@ -264,7 +273,7 @@ Use DICTIONARY to resolve any macros." ;; Specific srecode inserters. ;; The base class is from srecode-compile. ;; -;; Each inserter handles various macro codes from the temlate. +;; Each inserter handles various macro codes from the template. ;; The `code' slot specifies a character used to identify which ;; inserter is to be created. ;; @@ -471,7 +480,7 @@ If SECONDNAME is nil, return VALUE." ;; (setq val (format "%S" val)))) )) ;; Output the dumb thing unless the type of thing specifically - ;; did the inserting forus. + ;; did the inserting for us. (when do-princ (princ val)))) @@ -498,7 +507,8 @@ If there is no entry, prompt the user for the value to use. The prompt text used is derived from the previous PROMPT command in the template file.") -(defmethod srecode-inserter-apply-state ((ins srecode-template-inserter-ask) STATE) +(defmethod srecode-inserter-apply-state + ((ins srecode-template-inserter-ask) STATE) "For the template inserter INS, apply information from STATE. Loop over the prompts to see if we have a match." (let ((prompts (oref STATE prompts)) @@ -669,7 +679,13 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." ) (defvar srecode-template-inserter-point-override nil - "When non-nil, the point inserter will do this function instead.") + "Point-positioning method for the SRecode template inserter. +When nil, perform normal point-positioning behavior. +When the value is a cons cell (DEPTH . FUNCTION), call FUNCTION +instead, unless the template nesting depth, measured +by (length (oref srecode-template active)), is greater than +DEPTH.") + (defclass srecode-template-inserter-point (srecode-template-inserter) ((key :initform ?^ @@ -702,15 +718,20 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." dictionary) "Insert the STI inserter. Save point in the class allocated 'point' slot. -If `srecode-template-inserter-point-override' then this generalized -marker will do something else. See `srecode-template-inserter-include-wrap' -as an example." - (if srecode-template-inserter-point-override +If `srecode-template-inserter-point-override' non-nil then this +generalized marker will do something else. See +`srecode-template-inserter-include-wrap' as an example." + ;; If `srecode-template-inserter-point-override' is non-nil, its car + ;; is the maximum template nesting depth for which the override is + ;; valid. Compare this to the actual template nesting depth and + ;; maybe use the override function which is stored in the cdr. + (if (and srecode-template-inserter-point-override + (<= (length (oref srecode-template active)) + (car srecode-template-inserter-point-override))) ;; Disable the old override while we do this. - (let ((over srecode-template-inserter-point-override) + (let ((over (cdr srecode-template-inserter-point-override)) (srecode-template-inserter-point-override nil)) - (funcall over dictionary) - ) + (funcall over dictionary)) (oset sti point (point-marker)) )) @@ -751,9 +772,15 @@ Loops over the embedded CODE which was saved here during compilation. The template to insert is stored in SLOT." (let ((dicts (srecode-dictionary-lookup-name dictionary (oref sti :object-name)))) + (when (not (listp dicts)) + (error "Cannot insert section %S from non-section variable." + (oref sti :object-name))) ;; If there is no section dictionary, then don't output anything ;; from this section. (while dicts + (when (not (srecode-dictionary-p (car dicts))) + (error "Cannot insert section %S from non-section variable." + (oref sti :object-name))) (srecode-insert-subtemplate sti (car dicts) slot) (setq dicts (cdr dicts))))) @@ -853,39 +880,44 @@ this template instance." ;; If there was no template name, throw an error (if (not templatenamepart) (error "Include macro %s needs a template name" (oref sti :object-name))) - ;; Find the template by name, and save it. - (if (or (not (slot-boundp sti 'includedtemplate)) - (not (oref sti includedtemplate))) - (let ((tmpl (srecode-template-get-table (srecode-table) - templatenamepart)) - (active (oref srecode-template active)) - ctxt) + + ;; NOTE: We used to cache the template and not look it up a second time, + ;; but changes in the template tables can change which template is + ;; eventually discovered, so now we always lookup that template. + + ;; Calculate and store the discovered template + (let ((tmpl (srecode-template-get-table (srecode-table) + templatenamepart)) + (active (oref srecode-template active)) + ctxt) + (when (not tmpl) + ;; If it isn't just available, scan back through + ;; the active template stack, searching for a matching + ;; context. + (while (and (not tmpl) active) + (setq ctxt (oref (car active) context)) + (setq tmpl (srecode-template-get-table (srecode-table) + templatenamepart + ctxt)) (when (not tmpl) - ;; If it isn't just available, scan back through - ;; the active template stack, searching for a matching - ;; context. - (while (and (not tmpl) active) - (setq ctxt (oref (car active) context)) - (setq tmpl (srecode-template-get-table (srecode-table) - templatenamepart - ctxt)) - (when (not tmpl) - (when (slot-boundp (car active) 'table) - (let ((app (oref (oref (car active) table) application))) - (when app - (setq tmpl (srecode-template-get-table - (srecode-table) - templatenamepart - ctxt app))) - ))) - (setq active (cdr active))) - (when (not tmpl) - ;; If it wasn't in this context, look to see if it - ;; defines its own context - (setq tmpl (srecode-template-get-table (srecode-table) - templatenamepart))) - ) - (oset sti :includedtemplate tmpl))) + (when (slot-boundp (car active) 'table) + (let ((app (oref (oref (car active) table) application))) + (when app + (setq tmpl (srecode-template-get-table + (srecode-table) + templatenamepart + ctxt app))) + ))) + (setq active (cdr active))) + (when (not tmpl) + ;; If it wasn't in this context, look to see if it + ;; defines it's own context + (setq tmpl (srecode-template-get-table (srecode-table) + templatenamepart))) + ) + + ;; Store the found template into this object for later use. + (oset sti :includedtemplate tmpl)) (if (not (oref sti includedtemplate)) ;; @todo - Call into a debugger to help find the template in question. @@ -955,23 +987,31 @@ insert the section it wraps into the location in the included template where a ^ inserter occurs." ;; Step 1: Look up the included inserter (srecode-insert-include-lookup sti dictionary) - ;; Step 2: Temporarilly override the point inserter. - (let* ((vaguely-unique-name sti) - (srecode-template-inserter-point-override - (lambda (dict2) - (if (srecode-dictionary-lookup-name - dict2 (oref vaguely-unique-name :object-name)) - ;; Insert our sectional part with looping. - (srecode-insert-method-helper - vaguely-unique-name dict2 'template) - ;; Insert our sectional part just once. - (srecode-insert-subtemplate vaguely-unique-name - dict2 'template)) - ))) + ;; Step 2: Temporarily override the point inserter. + ;; We bind `srecode-template-inserter-point-override' to a cons cell + ;; (DEPTH . FUNCTION) that has the maximum template nesting depth, + ;; for which the override is valid, in DEPTH and a lambda function + ;; which implements the wrap insertion behavior in FUNCTION. The + ;; maximum valid nesting depth is just the current depth + 1. + (let ((srecode-template-inserter-point-override + (lexical-let ((inserter1 sti)) + (cons + ;; DEPTH + (+ (length (oref srecode-template active)) 1) + ;; FUNCTION + (lambda (dict) + (let ((srecode-template-inserter-point-override nil)) + (if (srecode-dictionary-lookup-name + dict (oref inserter1 :object-name)) + ;; Insert our sectional part with looping. + (srecode-insert-method-helper + inserter1 dict 'template) + ;; Insert our sectional part just once. + (srecode-insert-subtemplate + inserter1 dict 'template)))))))) ;; Do a regular insertion for an include, but with our override in ;; place. - (call-next-method) - )) + (call-next-method))) (provide 'srecode/insert) diff --git a/lisp/cedet/srecode/map.el b/lisp/cedet/srecode/map.el index af96037944b..3a833ca8bb3 100644 --- a/lisp/cedet/srecode/map.el +++ b/lisp/cedet/srecode/map.el @@ -295,8 +295,14 @@ if that file is NEW, otherwise assume the mode has not changed." ;; 2) Do we not have a current map? If so load. (when (not srecode-current-map) - (setq srecode-current-map - (eieio-persistent-read srecode-map-save-file)) + (condition-case nil + (setq srecode-current-map + (eieio-persistent-read srecode-map-save-file)) + (error + ;; There was an error loading the old map. Create a new one. + (setq srecode-current-map + (srecode-map "SRecode Map" + :file srecode-map-save-file)))) ) ) diff --git a/lisp/cedet/srecode/mode.el b/lisp/cedet/srecode/mode.el index f1590ed5ec0..32bf665d06c 100644 --- a/lisp/cedet/srecode/mode.el +++ b/lisp/cedet/srecode/mode.el @@ -112,7 +112,13 @@ ["Dump Dictionary" srecode-dictionary-dump :active t - :help "Calculate a dump a dictionary for point." + :help "Calculate and dump a dictionary for point." + ]) + (semantic-menu-item + ["Show Macro Help" + srecode-macro-help + :active t + :help "Display the different types of macros available." ]) ) ) @@ -196,43 +202,44 @@ MENU-DEF is the menu to bind this into." (setq context (car-safe (srecode-calculate-context))) (while subtab - (setq ltab (oref (car subtab) templates)) - (while ltab - (setq temp (car ltab)) + (when (srecode-template-table-in-project-p (car subtab)) + (setq ltab (oref (car subtab) templates)) + (while ltab + (setq temp (car ltab)) - ;; Do something with this template. + ;; Do something with this template. - (let* ((ctxt (oref temp context)) - (ctxtcons (assoc ctxt alltabs)) - (bind (if (slot-boundp temp 'binding) - (oref temp binding))) - (name (object-name-string temp))) + (let* ((ctxt (oref temp context)) + (ctxtcons (assoc ctxt alltabs)) + (bind (if (slot-boundp temp 'binding) + (oref temp binding))) + (name (object-name-string temp))) - (when (not ctxtcons) - (if (string= context ctxt) - ;; If this context is not in the current list of contexts - ;; is equal to the current context, then manage the - ;; active list instead - (setq active - (setq ctxtcons (or active (cons ctxt nil)))) - ;; This is not an active context, add it to alltabs. - (setq ctxtcons (cons ctxt nil)) - (setq alltabs (cons ctxtcons alltabs)))) + (when (not ctxtcons) + (if (string= context ctxt) + ;; If this context is not in the current list of contexts + ;; is equal to the current context, then manage the + ;; active list instead + (setq active + (setq ctxtcons (or active (cons ctxt nil)))) + ;; This is not an active context, add it to alltabs. + (setq ctxtcons (cons ctxt nil)) + (setq alltabs (cons ctxtcons alltabs)))) - (let ((new (vector - (if bind - (concat name " (" bind ")") - name) - `(lambda () (interactive) - (srecode-insert (concat ,ctxt ":" ,name))) - t))) + (let ((new (vector + (if bind + (concat name " (" bind ")") + name) + `(lambda () (interactive) + (srecode-insert (concat ,ctxt ":" ,name))) + t))) - (setcdr ctxtcons (cons - new - (cdr ctxtcons))))) + (setcdr ctxtcons (cons + new + (cdr ctxtcons))))) - (setq ltab (cdr ltab))) - (setq subtab (cdr subtab))) + (setq ltab (cdr ltab)))) + (setq subtab (cdr subtab))) ;; Now create the menu (easy-menu-filter-return @@ -273,6 +280,7 @@ MENU-DEF is the menu to bind this into." This command will insert whichever srecode template has a binding to the current key." (interactive) + (srecode-load-tables-for-mode major-mode) (let* ((k last-command-event) (ctxt (srecode-calculate-context)) ;; Find the template with the binding K diff --git a/lisp/cedet/srecode/semantic.el b/lisp/cedet/srecode/semantic.el index ae96b86a9bc..fd8419add67 100644 --- a/lisp/cedet/srecode/semantic.el +++ b/lisp/cedet/srecode/semantic.el @@ -91,7 +91,7 @@ The hook is called with two arguments, the TAG and DICT to be augmented.") (define-overload srecode-semantic-apply-tag-to-dict (tagobj dict) - "Insert fewatures of TAGOBJ into the dictionary DICT. + "Insert features of TAGOBJ into the dictionary DICT. TAGOBJ is an object of class `srecode-semantic-tag'. This class is a compound inserter value. DICT is a dictionary object. @@ -195,7 +195,7 @@ variable default values, and other things." ;;; :tag ARGUMENT HANDLING ;; ;; When a :tag argument is required, identify the current :tag, -;; and apply it's parts into the dictionary. +;; and apply its parts into the dictionary. (defun srecode-semantic-handle-:tag (dict) "Add macros into the dictionary DICT based on the current :tag." ;; We have a tag, start adding "stuff" into the dictionary. @@ -305,8 +305,8 @@ or `code'. For various conditions, this function looks for a template with the name CLASS-tag, where CLASS is the tag class. If it cannot -find that, it will look for that template in the -`declaration'context (if the current context was not `declaration'). +find that, it will look for that template in the `declaration' +context (if the current context was not `declaration'). If PROTOTYPE is specified, it will first look for templates with the name CLASS-tag-prototype, or CLASS-prototype as above. @@ -382,7 +382,7 @@ as `function' will leave point where code might be inserted." (error "Cannot find template %s in %s for inserting tag %S" errtype top (semantic-format-tag-summarize tag))) - ;; Resolve Arguments + ;; Resolve arguments (let ((srecode-semantic-selected-tag tag)) (srecode-resolve-arguments temp dict)) diff --git a/lisp/cedet/srecode/table.el b/lisp/cedet/srecode/table.el index 3d22922d551..2c95d4f6412 100644 --- a/lisp/cedet/srecode/table.el +++ b/lisp/cedet/srecode/table.el @@ -31,6 +31,7 @@ (require 'srecode) (declare-function srecode-load-tables-for-mode "srecode/find") +(declare-function srecode-template-table-in-project-p "srecode/find") ;;; Code: @@ -74,6 +75,12 @@ Emacs Lisp code to fill in the dictionary.") When there are multiple template files with similar names, templates with the highest priority are scanned last, allowing them to override values in previous template files.") + (project :initarg :project + :type (or null string) + :documentation + "Scope some project files to a specific project. +The value is a directory which forms the root of a particular project, +or a subset of a particular project.") ;; ;; Parsed Data from the template file ;; @@ -224,6 +231,12 @@ Use PREDICATE is the same as for the `sort' function." (when (oref tab :application) (princ "\nApplication: ") (princ (oref tab :application))) + (when (oref tab :project) + (require 'srecode/find) ; For srecode-template-table-in-project-p + (princ "\nProject Directory: ") + (princ (oref tab :project)) + (when (not (srecode-template-table-in-project-p tab)) + (princ "\n ** Not Usable in this file. **"))) (princ "\n\nVariables:\n") (let ((vars (oref tab variables))) (while vars diff --git a/lisp/cedet/srecode/texi.el b/lisp/cedet/srecode/texi.el index 2c8d1a7204c..30ba91cadf9 100644 --- a/lisp/cedet/srecode/texi.el +++ b/lisp/cedet/srecode/texi.el @@ -175,10 +175,17 @@ Adds the following: (define-mode-local-override semantic-insert-foreign-tag texinfo-mode (foreign-tag) - "Insert TAG from a foreign buffer in TAGFILE. + "Insert FOREIGN-TAG from a foreign buffer in TAGFILE. Assume TAGFILE is a source buffer, and create a documentation thingy from it using the `document' tool." - (let ((srecode-semantic-selected-tag foreign-tag)) + (srecode-texi-insert-tag-as-doc foreign-tag)) + +(defun srecode-texi-insert-tag-as-doc (tag) + "Insert TAG into the current buffer with SRecode." + (when (not (eq major-mode 'texinfo-mode)) + (error "Can only insert tags into texinfo in texinfo mode")) + (let ((srecode-semantic-selected-tag tag)) + (srecode-load-tables-for-mode major-mode) ;; @todo - choose of the many types of tags to insert, ;; or put all that logic into srecode. (srecode-insert "declaration:function"))) diff --git a/lisp/comint.el b/lisp/comint.el index 641be4f4d22..282e9eef49c 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1,8 +1,8 @@ ;;; comint.el --- general command interpreter in a window stuff -;; Copyright (C) 1988, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; Copyright (C) 1988, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, +;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, +;; 2010 Free Software Foundation, Inc. ;; Author: Olin Shivers ;; Simon Marshall @@ -415,6 +415,9 @@ See `comint-send-input'." :type 'boolean :group 'comint) +(define-obsolete-variable-alias 'comint-use-prompt-regexp-instead-of-fields + 'comint-use-prompt-regexp "22.1") + ;; Note: If it is decided to purge comint-prompt-regexp from the source ;; entirely, searching for uses of this variable will help to identify ;; places that need attention. @@ -427,11 +430,6 @@ respect field boundaries in a natural way)." :type 'boolean :group 'comint) -;; Autoload is necessary for Custom to recognize old alias. -;;;###autoload -(define-obsolete-variable-alias 'comint-use-prompt-regexp-instead-of-fields - 'comint-use-prompt-regexp "22.1") - (defcustom comint-mode-hook nil "Hook run upon entry to `comint-mode'. This is run before the process is cranked up." diff --git a/lisp/dframe.el b/lisp/dframe.el index bfa672cdec5..2e550d8dd78 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -430,7 +430,8 @@ a cons cell indicating a position of the form (LEFT . TOP)." (unless (or (not window-system) (eq window-system 'pc)) (let* ((pfx (dframe-frame-parameter parent-frame 'left)) (pfy (dframe-frame-parameter parent-frame 'top)) - (pfw (frame-pixel-width parent-frame)) + (pfw (+ (tool-bar-pixel-width parent-frame) + (frame-pixel-width parent-frame))) (pfh (frame-pixel-height parent-frame)) (nfw (frame-pixel-width new-frame)) (nfh (frame-pixel-height new-frame)) @@ -459,7 +460,7 @@ a cons cell indicating a position of the form (LEFT . TOP)." (- (x-display-pixel-height) (car (cdr pfy)) pfh) (car (cdr pfy))))) (cond ((eq location 'right) - (setq newleft (+ pfx pfw 5) + (setq newleft (+ pfx pfw 10) newtop pfy)) ((eq location 'left) (setq newleft (- pfx 10 nfw) @@ -471,7 +472,7 @@ a cons cell indicating a position of the form (LEFT . TOP)." ;; extra 10 is just dressings for window ;; decorations. (let* ((left-guess (- pfx 10 nfw)) - (right-guess (+ pfx pfw 5)) + (right-guess (+ pfx pfw 10)) (left-margin left-guess) (right-margin (- (x-display-pixel-width) right-guess 5 nfw))) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 9ce3c2eb323..ac008c98cd9 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -383,9 +383,11 @@ form)) ((or (byte-code-function-p fn) (eq 'lambda (car-safe fn))) - (byte-optimize-form-code-walker - (byte-compile-unfold-lambda form) - for-effect)) + (let ((newform (byte-compile-unfold-lambda form))) + (if (eq newform form) + ;; Some error occured, avoid infinite recursion + form + (byte-optimize-form-code-walker newform for-effect)))) ((memq fn '(let let*)) ;; recursively enter the optimizer for the bindings and body ;; of a let or let*. This for depth-firstness: forms that diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 6ce141eb8e6..0388435dbc2 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -108,10 +108,11 @@ The return value of this function is not used." (defvar advertised-signature-table (make-hash-table :test 'eq :weakness 'key)) -(defun set-advertised-calling-convention (function signature) +(defun set-advertised-calling-convention (function signature when) "Set the advertised SIGNATURE of FUNCTION. This will allow the byte-compiler to warn the programmer when she uses -an obsolete calling convention." +an obsolete calling convention. WHEN specifies since when the calling +convention was modified." (puthash (indirect-function function) signature advertised-signature-table)) @@ -132,7 +133,7 @@ was first made obsolete, for example a date or a release number." obsolete-name) (set-advertised-calling-convention ;; New code should always provide the `when' argument. - 'make-obsolete '(obsolete-name current-name when)) + 'make-obsolete '(obsolete-name current-name when) "23.1") (defmacro define-obsolete-function-alias (obsolete-name current-name &optional when docstring) @@ -153,7 +154,7 @@ See the docstrings of `defalias' and `make-obsolete' for more details." (set-advertised-calling-convention ;; New code should always provide the `when' argument. 'define-obsolete-function-alias - '(obsolete-name current-name when &optional docstring)) + '(obsolete-name current-name when &optional docstring) "23.1") (defun make-obsolete-variable (obsolete-name current-name &optional when) "Make the byte-compiler warn that OBSOLETE-NAME is obsolete. @@ -175,7 +176,7 @@ was first made obsolete, for example a date or a release number." obsolete-name) (set-advertised-calling-convention ;; New code should always provide the `when' argument. - 'make-obsolete-variable '(obsolete-name current-name when)) + 'make-obsolete-variable '(obsolete-name current-name when) "23.1") (defmacro define-obsolete-variable-alias (obsolete-name current-name &optional when docstring) @@ -210,7 +211,7 @@ CURRENT-NAME, if it does not already have them: (set-advertised-calling-convention ;; New code should always provide the `when' argument. 'define-obsolete-variable-alias - '(obsolete-name current-name when &optional docstring)) + '(obsolete-name current-name when &optional docstring) "23.1") ;; FIXME This is only defined in this file because the variable- and ;; function- versions are too. Unlike those two, this one is not used diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e1b5b402b28..bad33395e22 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -308,7 +308,7 @@ If it is 'byte, then only byte-level optimizations will be logged." (defconst byte-compile-warning-types '(redefine callargs free-vars unresolved obsolete noruntime cl-functions interactive-only - make-local mapcar constants suspicious) + make-local mapcar constants suspicious lexical) "The list of warning types used when `byte-compile-warnings' is t.") (defcustom byte-compile-warnings t "List of warnings that the byte-compiler should issue (t for all). @@ -1461,7 +1461,7 @@ extra args." (not (and (eq (get func 'byte-compile) 'cl-byte-compile-compiler-macro) (string-match "\\`c[ad]+r\\'" (symbol-name func))))) - (byte-compile-warn "Function `%s' from cl package called at runtime" + (byte-compile-warn "function `%s' from cl package called at runtime" func))) form) @@ -2268,6 +2268,11 @@ list that represents a doc string reference. ;; Since there is no doc string, we can compile this as a normal form, ;; and not do a file-boundary. (byte-compile-keep-pending form) + (when (and (symbolp (nth 1 form)) + (not (string-match "[-*/:$]" (symbol-name (nth 1 form)))) + (byte-compile-warning-enabled-p 'lexical)) + (byte-compile-warn "global/dynamic var `%s' lacks a prefix" + (nth 1 form))) (push (nth 1 form) byte-compile-bound-variables) (if (eq (car form) 'defconst) (push (nth 1 form) byte-compile-const-variables)) @@ -4162,6 +4167,11 @@ if LFORMINFO is nil (meaning all bindings are dynamic)." (defun byte-compile-defvar (form) ;; This is not used for file-level defvar/consts with doc strings. + (when (and (symbolp (nth 1 form)) + (not (string-match "[-*/:$]" (symbol-name (nth 1 form)))) + (byte-compile-warning-enabled-p 'lexical)) + (byte-compile-warn "global/dynamic var `%s' lacks a prefix" + (nth 1 form))) (let ((fun (nth 0 form)) (var (nth 1 form)) (value (nth 2 form)) diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 34fb5b9c9fc..048093b858d 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -5,7 +5,7 @@ ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam -;; Version: 0.2 +;; Version: 1.3 ;; Keywords: OO, lisp ;; This file is part of GNU Emacs. @@ -31,6 +31,11 @@ ;; Emacs running environment. ;; ;; See eieio.texi for complete documentation on using this package. +;; +;; Note: the implementation of the c3 algorithm is based on: +;; Kim Barrett et al.: A Monotonic Superclass Linearization for Dylan +;; Retrieved from: +;; http://192.220.96.201/dylan/linearization-oopsla96.html ;; There is funny stuff going on with typep and deftype. This ;; is the only way I seem to be able to make this stuff load properly. @@ -44,7 +49,7 @@ (require 'cl) (require 'eieio-comp)) -(defvar eieio-version "1.2" +(defvar eieio-version "1.3" "Current version of EIEIO.") (defun eieio-version () @@ -79,7 +84,7 @@ "*This hook is executed, then cleared each time `defclass' is called.") (defvar eieio-error-unsupported-class-tags nil - "*Non-nil to throw an error if an encountered tag us unsupported. + "Non-nil to throw an error if an encountered tag is unsupported. This may prevent classes from CLOS applications from being used with EIEIO since EIEIO does not support all CLOS tags.") @@ -170,6 +175,13 @@ Stored outright without modifications or stripping.") (defconst method-generic-after 6 "Index into generic :after tag on a method.") (defconst method-num-slots 7 "Number of indexes into a method's vector.") +(defsubst eieio-specialized-key-to-generic-key (key) + "Convert a specialized KEY into a generic method key." + (cond ((eq key method-static) 0) ;; don't convert + ((< key method-num-lists) (+ key 3)) ;; The conversion + (t key) ;; already generic.. maybe. + )) + ;; How to specialty compile stuff. (autoload 'byte-compile-file-form-defmethod "eieio-comp" "This function is used to byte compile methods in a nice way.") @@ -243,8 +255,7 @@ Methods with only primary implementations are executed in an optimized way." )) (defmacro class-option-assoc (list option) - "Return from LIST the found OPTION. -Return nil if it doesn't exist." + "Return from LIST the found OPTION, or nil if it doesn't exist." `(car-safe (cdr (memq ,option ,list)))) (defmacro class-option (class option) @@ -518,7 +529,7 @@ See `defclass' for more information." ;; Make sure the method invocation order is a valid value. (let ((io (class-option-assoc options :method-invocation-order))) - (when (and io (not (member io '(:depth-first :breadth-first)))) + (when (and io (not (member io '(:depth-first :breadth-first :c3)))) (error "Method invocation order %s is not allowed" io) )) @@ -800,11 +811,11 @@ See `defclass' for more information." (defun eieio-perform-slot-validation-for-default (slot spec value skipnil) "For SLOT, signal if SPEC does not match VALUE. If SKIPNIL is non-nil, then if VALUE is nil return t instead." - (let ((val (eieio-default-eval-maybe value))) - (if (and (not eieio-skip-typecheck) - (not (and skipnil (null val))) - (not (eieio-perform-slot-validation spec val))) - (signal 'invalid-slot-type (list slot spec val))))) + (if (and (not (eieio-eval-default-p value)) + (not eieio-skip-typecheck) + (not (and skipnil (null value))) + (not (eieio-perform-slot-validation spec value))) + (signal 'invalid-slot-type (list slot spec value)))) (defun eieio-add-new-slot (newc a d doc type cust label custg print prot init alloc &optional defaultoverride skipnil) @@ -1340,7 +1351,7 @@ Summary: (if (= key -1) (signal 'wrong-type-argument (list :static 'non-class-arg))) ;; generics are higher - (setq key (+ key 3))) + (setq key (eieio-specialized-key-to-generic-key key))) ;; Put this lambda into the symbol so we can find it (if (byte-code-function-p (car-safe body)) (eieiomt-add method (car-safe body) key argclass) @@ -1516,13 +1527,21 @@ Fills in OBJ's SLOT with its default value." (eieio-default-eval-maybe val)) obj cl 'oref-default)))) +(defsubst eieio-eval-default-p (val) + "Whether the default value VAL should be evaluated for use." + (and (consp val) (symbolp (car val)) (fboundp (car val)))) + (defun eieio-default-eval-maybe (val) "Check VAL, and return what `oref-default' would provide." - ;; check for quoted things, and unquote them - (if (and (listp val) (eq (car val) 'quote)) - (car (cdr val)) - ;; return it verbatim - val)) + (cond + ;; Is it a function call? If so, evaluate it. + ((eieio-eval-default-p val) + (eval val)) + ;;;; check for quoted things, and unquote them + ;;((and (consp val) (eq (car val) 'quote)) + ;; (car (cdr val))) + ;; return it verbatim + (t val))) ;;; Object Set macros ;; @@ -1677,6 +1696,116 @@ The CLOS function `class-direct-subclasses' is aliased to this function." (if (not (class-p class)) (signal 'wrong-type-argument (list 'class-p class))) (class-children-fast class)) +(defun eieio-c3-candidate (class remaining-inputs) + "Returns CLASS if it can go in the result now, otherwise nil" + ;; Ensure CLASS is not in any position but the first in any of the + ;; element lists of REMAINING-INPUTS. + (and (not (let ((found nil)) + (while (and remaining-inputs (not found)) + (setq found (member class (cdr (car remaining-inputs))) + remaining-inputs (cdr remaining-inputs))) + found)) + class)) + +(defun eieio-c3-merge-lists (reversed-partial-result remaining-inputs) + "Merge REVERSED-PARTIAL-RESULT REMAINING-INPUTS in a consistent order, if possible. +If a consistent order does not exist, signal an error." + (if (let ((tail remaining-inputs) + (found nil)) + (while (and tail (not found)) + (setq found (car tail) tail (cdr tail))) + (not found)) + ;; If all remaining inputs are empty lists, we are done. + (nreverse reversed-partial-result) + ;; Otherwise, we try to find the next element of the result. This + ;; is achieved by considering the first element of each + ;; (non-empty) input list and accepting a candidate if it is + ;; consistent with the rests of the input lists. + (let* ((found nil) + (tail remaining-inputs) + (next (progn + (while (and tail (not found)) + (setq found (and (car tail) + (eieio-c3-candidate (caar tail) + remaining-inputs)) + tail (cdr tail))) + found))) + (if next + ;; The graph is consistent so far, add NEXT to result and + ;; merge input lists, dropping NEXT from their heads where + ;; applicable. + (eieio-c3-merge-lists + (cons next reversed-partial-result) + (mapcar (lambda (l) (if (eq (first l) next) (rest l) l)) + remaining-inputs)) + ;; The graph is inconsistent, give up + (signal 'inconsistent-class-hierarchy (list remaining-inputs)))))) + +(defun eieio-class-precedence-dfs (class) + "Return all parents of CLASS in depth-first order." + (let* ((parents (class-parents-fast class)) + (classes (copy-sequence + (apply #'append + (list class) + (or + (mapcar + (lambda (parent) + (cons parent + (eieio-class-precedence-dfs parent))) + parents) + '((eieio-default-superclass)))))) + (tail classes)) + ;; Remove duplicates. + (while tail + (setcdr tail (delq (car tail) (cdr tail))) + (setq tail (cdr tail))) + classes)) + +(defun eieio-class-precedence-bfs (class) + "Return all parents of CLASS in breadth-first order." + (let ((result) + (queue (or (class-parents-fast class) + '(eieio-default-superclass)))) + (while queue + (let ((head (pop queue))) + (unless (member head result) + (push head result) + (unless (eq head 'eieio-default-superclass) + (setq queue (append queue (or (class-parents-fast head) + '(eieio-default-superclass)))))))) + (cons class (nreverse result))) + ) + +(defun eieio-class-precedence-c3 (class) + "Return all parents of CLASS in c3 order." + (let ((parents (class-parents-fast class))) + (eieio-c3-merge-lists + (list class) + (append + (or + (mapcar + (lambda (x) + (eieio-class-precedence-c3 x)) + parents) + '((eieio-default-superclass))) + (list parents)))) + ) + +(defun class-precedence-list (class) + "Return (transitively closed) list of parents of CLASS. +The order, in which the parents are returned depends on the +method invocation orders of the involved classes." + (if (or (null class) (eq class 'eieio-default-superclass)) + nil + (case (class-method-invocation-order class) + (:depth-first + (eieio-class-precedence-dfs class)) + (:breadth-first + (eieio-class-precedence-bfs class)) + (:c3 + (eieio-class-precedence-c3 class)))) + ) + ;; Official CLOS functions. (defalias 'class-direct-superclasses 'class-parents) (defalias 'class-direct-subclasses 'class-children) @@ -1714,7 +1843,8 @@ The CLOS function `class-direct-subclasses' is aliased to this function." p (cdr p))) (if child t))) -(defun object-slots (obj) "Return list of slots available in OBJ." +(defun object-slots (obj) + "Return list of slots available in OBJ." (if (not (eieio-object-p obj)) (signal 'wrong-type-argument (list 'eieio-object-p obj))) (aref (class-v (object-class-fast obj)) class-public-a)) @@ -2008,14 +2138,26 @@ This should only be called from a generic function." keys (append (make-list (length tlambdas) method-before) keys)) ) - ;; If there were no methods found, then there could be :static methods. - (when (not lambdas) + (if mclass + ;; For the case of a class, + ;; if there were no methods found, then there could be :static methods. + (when (not lambdas) + (setq tlambdas + (eieio-generic-form method method-static mclass)) + (setq lambdas (cons tlambdas lambdas) + keys (cons method-static keys) + primarymethodlist ;; Re-use even with bad name here + (eieiomt-method-list method method-static mclass))) + ;; For the case of no class (ie - mclass == nil) then there may + ;; be a primary method. (setq tlambdas - (eieio-generic-form method method-static mclass)) - (setq lambdas (cons tlambdas lambdas) - keys (cons method-static keys) - primarymethodlist ;; Re-use even with bad name here - (eieiomt-method-list method method-static mclass))) + (eieio-generic-form method method-primary nil)) + (when tlambdas + (setq lambdas (cons tlambdas lambdas) + keys (cons method-primary keys) + primarymethodlist + (eieiomt-method-list method method-primary nil))) + ) (run-hook-with-args 'eieio-pre-method-execution-hooks primarymethodlist) @@ -2142,37 +2284,23 @@ CLASS is the starting class to search from in the method tree. If CLASS is nil, then an empty list of methods should be returned." ;; Note: eieiomt - the MT means MethodTree. See more comments below ;; for the rest of the eieiomt methods. - (let ((lambdas nil) - (mclass (list class))) - (while mclass - ;; Note: a nil can show up in the class list once we start - ;; searching through the method tree. - (when (car mclass) - ;; lookup the form to use for the PRIMARY object for the next level - (let ((tmpl (eieio-generic-form method key (car mclass)))) - (when (or (not lambdas) - ;; This prevents duplicates coming out of the - ;; class method optimizer. Perhaps we should - ;; just not optimize before/afters? - (not (eq (car tmpl) (car (car lambdas))))) - (setq lambdas (cons tmpl lambdas)) - (if (null (car lambdas)) - (setq lambdas (cdr lambdas)))))) - ;; Add new classes to mclass. Since our input might not be a class - ;; protect against that. - (if (car mclass) - ;; If there is a class, append any methods it may provide - ;; to the remainder of the class list. - (let ((io (class-method-invocation-order (car mclass)))) - (if (eq io :depth-first) - ;; Depth first. - (setq mclass (append (eieiomt-next (car mclass)) (cdr mclass))) - ;; Breadth first. - (setq mclass (append (cdr mclass) (eieiomt-next (car mclass))))) - ) - ;; Advance to next entry in mclass if it is nil. - (setq mclass (cdr mclass))) - ) + + ;; Collect lambda expressions stored for the class and its parent + ;; classes. + (let (lambdas) + (dolist (ancestor (class-precedence-list class)) + ;; Lookup the form to use for the PRIMARY object for the next level + (let ((tmpl (eieio-generic-form method key ancestor))) + (when (and tmpl + (or (not lambdas) + ;; This prevents duplicates coming out of the + ;; class method optimizer. Perhaps we should + ;; just not optimize before/afters? + (not (member tmpl lambdas)))) + (push tmpl lambdas)))) + + ;; Return collected lambda. For :after methods, return in current + ;; order (most general class last); Otherwise, reverse order. (if (eq key method-after) lambdas (nreverse lambdas)))) @@ -2206,6 +2334,7 @@ Use `next-method-p' to find out if there is a next method to call." (apply 'no-next-method (car newargs) (cdr newargs)) (let* ((eieio-generic-call-next-method-list (cdr eieio-generic-call-next-method-list)) + (eieio-generic-call-arglst newargs) (scoped-class (cdr next)) (fcn (car next)) ) @@ -2298,32 +2427,18 @@ nil for superclasses. This function performs no type checking!" (defun eieiomt-sym-optimize (s) "Find the next class above S which has a function body for the optimizer." - ;; (message "Optimizing %S" s) - (let* ((es (intern-soft (symbol-name s))) ;external symbol of class - (io (class-method-invocation-order es)) - (ov nil) - (cont t)) - ;; This converts ES from a single symbol to a list of parent classes. - (setq es (eieiomt-next es)) - ;; Loop over ES, then its children individually. - ;; We can have multiple hits only at one level of the parent tree. - (while (and es cont) - (setq ov (intern-soft (symbol-name (car es)) eieiomt-optimizing-obarray)) - (if (fboundp ov) - (progn - (set s ov) ;store ov as our next symbol - (setq cont nil)) - (if (eq io :depth-first) - ;; Pre-pend the subclasses of (car es) so we get - ;; DEPTH FIRST optimization. - (setq es (append (eieiomt-next (car es)) (cdr es))) - ;; Else, we are breadth first. - ;; (message "Class %s is breadth first" es) - (setq es (append (cdr es) (eieiomt-next (car es)))) - ))) - ;; If there is no nearest call, then set our value to nil - (if (not es) (set s nil)) - )) + ;; Set the value to nil in case there is no nearest cell. + (set s nil) + ;; Find the nearest cell that has a function body. If we find one, + ;; we replace the nil from above. + (let ((external-symbol (intern-soft (symbol-name s)))) + (catch 'done + (dolist (ancestor (rest (class-precedence-list external-symbol))) + (let ((ov (intern-soft (symbol-name ancestor) + eieiomt-optimizing-obarray))) + (when (fboundp ov) + (set s ov) ;; store ov as our next symbol + (throw 'done ancestor))))))) (defun eieio-generic-form (method key class) "Return the lambda form belonging to METHOD using KEY based upon CLASS. @@ -2332,7 +2447,7 @@ no form, but has a parent class, then trace to that parent class. The first time a form is requested from a symbol, an optimized path is memorized for faster future use." (let ((emto (aref (get method 'eieio-method-obarray) - (if class key (+ key 3))))) + (if class key (eieio-specialized-key-to-generic-key key))))) (if (class-p class) ;; 1) find our symbol (let ((cs (intern-soft (symbol-name class) emto))) @@ -2365,7 +2480,7 @@ is memorized for faster future use." nil))) ;; for a generic call, what is a list, is the function body we want. (let ((emtl (aref (get method 'eieio-method-tree) - (if class key (+ key 3))))) + (if class key (eieio-specialized-key-to-generic-key key))))) (if emtl ;; The car of EMTL is supposed to be a class, which in this ;; case is nil, so skip it. @@ -2430,6 +2545,11 @@ This is usually a symbol that starts with `:'." (put 'unbound-slot 'error-conditions '(unbound-slot error nil)) (put 'unbound-slot 'error-message "Unbound slot") +(intern "inconsistent-class-hierarchy") +(put 'inconsistent-class-hierarchy 'error-conditions + '(inconsistent-class-hierarchy error nil)) +(put 'inconsistent-class-hierarchy 'error-message "Inconsistent class hierarchy") + ;;; Here are some CLOS items that need the CL package ;; @@ -2525,6 +2645,17 @@ dynamically set from SLOTS." (slot (aref scoped-class class-public-a)) (defaults (aref scoped-class class-public-d))) (while slot + ;; For each slot, see if we need to evaluate it. + ;; + ;; Paul Landes said in an email: + ;; > CL evaluates it if it can, and otherwise, leaves it as + ;; > the quoted thing as you already have. This is by the + ;; > Sonya E. Keene book and other things I've look at on the + ;; > web. + (let ((dflt (eieio-default-eval-maybe (car defaults)))) + (when (not (eq dflt (car defaults))) + (eieio-oset this (car slot) dflt) )) + ;; Next. (setq slot (cdr slot) defaults (cdr defaults)))) ;; Shared initialize will parse our slots for us. diff --git a/lisp/emacs-lisp/float-sup.el b/lisp/emacs-lisp/float-sup.el index 6bdc9073ddf..f213d2dba9d 100644 --- a/lisp/emacs-lisp/float-sup.el +++ b/lisp/emacs-lisp/float-sup.el @@ -35,25 +35,24 @@ ;; provide an easy hook to tell if we are running with floats or not. ;; define pi and e via math-lib calls. (much less prone to killer typos.) -(defconst pi (* 4 (atan 1)) "The value of Pi (3.1415926...).") +(defconst float-pi (* 4 (atan 1)) "The value of Pi (3.1415926...).") +(defconst pi float-pi "Obsolete since Emacs-23.3. Use `float-pi' instead.") -;; It's too inconvenient to make `e' a constant because it's used as -;; a temporary variable all the time. -(defvar e (exp 1) "The value of e (2.7182818...).") +(defconst float-e (exp 1) "The value of e (2.7182818...).") -(defconst degrees-to-radians (/ pi 180.0) +(defconst degrees-to-radians (/ float-pi 180.0) "Degrees to radian conversion constant.") -(defconst radians-to-degrees (/ 180.0 pi) +(defconst radians-to-degrees (/ 180.0 float-pi) "Radian to degree conversion constant.") ;; these expand to a single multiply by a float when byte compiled (defmacro degrees-to-radians (x) - "Convert ARG from degrees to radians." - (list '* (/ pi 180.0) x)) + "Convert X from degrees to radians." + (list '* degrees-to-radians x)) (defmacro radians-to-degrees (x) - "Convert ARG from radians to degrees." - (list '* (/ 180.0 pi) x)) + "Convert X from radians to degrees." + (list '* radians-to-degrees x)) (provide 'lisp-float-type) diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index e799dcd77c1..cfb56eb3232 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -141,15 +141,19 @@ A negative argument means move backward but still to a less deep spot. This command assumes point is not in a string or comment." (interactive "^p") (or arg (setq arg 1)) - (let ((inc (if (> arg 0) 1 -1))) + (let ((inc (if (> arg 0) 1 -1)) + pos) (while (/= arg 0) - (if forward-sexp-function + (if (null forward-sexp-function) + (goto-char (or (scan-lists (point) inc 1) (buffer-end arg))) (condition-case err - (while (let ((pos (point))) + (while (progn (setq pos (point)) (forward-sexp inc) (/= (point) pos))) (scan-error (goto-char (nth 2 err)))) - (goto-char (or (scan-lists (point) inc 1) (buffer-end arg)))) + (if (= (point) pos) + (signal 'scan-error + (list "Unbalanced parentheses" (point) (point))))) (setq arg (- arg inc))))) (defun kill-sexp (&optional arg) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 54c6a09dd9d..61a2985226d 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1273,7 +1273,7 @@ Letters do not insert themselves; instead, they are commands. (setq mode-name "Package Menu") (setq truncate-lines t) (setq buffer-read-only t) - (setq revert-buffer-function 'package-menu-revert) + (set (make-local-variable 'revert-buffer-function) 'package-menu-revert) (setq header-line-format (mapconcat (lambda (pair) diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el index b2b27a0e0d6..b922e0b0233 100644 --- a/lisp/emacs-lisp/pcase.el +++ b/lisp/emacs-lisp/pcase.el @@ -76,8 +76,8 @@ BODY should be an expression, and BINDINGS should be a list of bindings of the form (UPAT EXP)." (if (null bindings) body `(pcase ,(cadr (car bindings)) - (,(caar bindings) (plet* ,(cdr bindings) ,body)) - (t (error "Pattern match failure in `plet'"))))) + (,(caar bindings) (pcase-let* ,(cdr bindings) ,body)) + (t (error "Pattern match failure in `pcase-let'"))))) ;;;###autoload (defmacro pcase-let (bindings body) @@ -85,13 +85,14 @@ of the form (UPAT EXP)." BODY should be an expression, and BINDINGS should be a list of bindings of the form (UPAT EXP)." (if (null (cdr bindings)) - `(plet* ,bindings ,body) + `(pcase-let* ,bindings ,body) (setq bindings (mapcar (lambda (x) (cons (make-symbol "x") x)) bindings)) `(let ,(mapcar (lambda (binding) (list (nth 0 binding) (nth 2 binding))) bindings) - (plet* ,(mapcar (lambda (binding) (list (nth 1 binding) (nth 0 binding))) - bindings) - ,body)))) + (pcase-let* + ,(mapcar (lambda (binding) (list (nth 1 binding) (nth 0 binding))) + bindings) + ,body)))) (defun pcase-expand (exp cases) (let* ((defs (if (symbolp exp) '() diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index c6df851b0e5..55516d276da 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -159,7 +159,8 @@ one of those elements share the same precedence level and associativity." (last-nts ()) (first-nts ())) (dolist (rhs (cdr rules)) - (assert (consp rhs)) + (unless (consp rhs) + (signal 'wrong-type-argument `(consp ,rhs))) (if (not (member (car rhs) nts)) (pushnew (car rhs) first-ops) (pushnew (car rhs) first-nts) @@ -307,6 +308,40 @@ from the table, e.g. the table will not include things like (\"if\" . \"else\"). (nreverse alist))) +(defun smie-debug--prec2-cycle (csts) + "Return a cycle in CSTS, assuming there's one. +CSTS is a list of pairs representing arcs in a graph." + ;; A PATH is of the form (START . REST) where REST is a reverse + ;; list of nodes through which the path goes. + (let ((paths (mapcar (lambda (pair) (list (car pair) (cdr pair))) csts)) + (cycle nil)) + (while (null cycle) + (dolist (path (prog1 paths (setq paths nil))) + (dolist (cst csts) + (when (eq (car cst) (nth 1 path)) + (if (eq (cdr cst) (car path)) + (setq cycle path) + (push (cons (car path) (cons (cdr cst) (cdr path))) + paths)))))) + (cons (car cycle) (nreverse (cdr cycle))))) + +(defun smie-debug--describe-cycle (table cycle) + (let ((names + (mapcar (lambda (val) + (let ((res nil)) + (dolist (elem table) + (if (eq (cdr elem) val) + (push (concat "." (car elem)) res)) + (if (eq (cddr elem) val) + (push (concat (car elem) ".") res))) + (assert res) + res)) + cycle))) + (mapconcat + (lambda (elems) (mapconcat 'identity elems "=")) + (append names (list (car names))) + " < "))) + (defun smie-prec2-levels (prec2) ;; FIXME: Rather than only return an alist of precedence levels, we should ;; also extract other useful data from it: @@ -387,7 +422,9 @@ PREC2 is a table as returned by `smie-precs-precedence-table' or (incf i)) (setq csts (delq cst csts)))) (unless progress - (error "Can't resolve the precedence table to precedence levels"))) + (error "Can't resolve the precedence cycle: %s" + (smie-debug--describe-cycle + table (smie-debug--prec2-cycle csts))))) (incf i 10)) ;; Propagate equalities back to their source. (dolist (eq (nreverse eqs)) @@ -450,7 +487,7 @@ it should move backward to the beginning of the previous token.") (skip-syntax-forward "w_'")) (point)))) -(defun smie-associative-p (toklevels) +(defun smie--associative-p (toklevels) ;; in "a + b + c" we want to stop at each +, but in ;; "if a then b elsif c then d else c" we don't want to stop at each keyword. ;; To distinguish the two cases, we made smie-prec2-levels choose @@ -535,13 +572,13 @@ Possible return values: ;; If the new operator is not the last in the BNF rule, ;; ans is not associative, it's one of the inner operators ;; (like the "in" in "let .. in .. end"), so keep looking. - ((not (smie-associative-p toklevels)) + ((not (smie--associative-p toklevels)) (push toklevels levels)) ;; The new operator is associative. Two cases: ;; - it's really just an associative operator (like + or ;) ;; in which case we should have stopped right before. ((and lastlevels - (smie-associative-p (car lastlevels))) + (smie--associative-p (car lastlevels))) (throw 'return (prog1 (list (or (car toklevels) t) (point) token) (goto-char pos)))) @@ -720,6 +757,7 @@ If non-nil, it will blink not only for \"begin..end\" but also for \"if...else\" ;; This not is one of the begin..end we know how to check. (blink-matching-check-mismatch start end)) ((not start) t) + ((eq t (car (rassoc ender smie-closer-alist))) nil) (t (goto-char start) (let ((starter (funcall smie-forward-token-function))) @@ -732,45 +770,42 @@ This uses SMIE's tables and is expected to be placed on `post-self-insert-hook'. smie-closer-alist ; Optimization. (eq (char-before) last-command-event) ; Sanity check. (memq last-command-event smie-blink-matching-triggers) - (save-excursion - ;; FIXME: Here we assume that closers all end - ;; with a word-syntax char. - (unless (eq ?\w (char-syntax last-command-event)) - (forward-char -1)) - (and (looking-at "\\>") - (not (nth 8 (syntax-ppss)))))) + (not (nth 8 (syntax-ppss)))) (save-excursion (let ((pos (point)) (token (funcall smie-backward-token-function))) - (if (= 1 (length token)) - ;; The trigger char is itself a token but is not - ;; one of the closers (e.g. ?\; in Octave mode), - ;; so go back to the previous token - (setq token (save-excursion - (funcall smie-backward-token-function))) - (goto-char pos)) - ;; Here we assume that smie-backward-token-function - ;; returns a token that is a string and whose content - ;; match the buffer's representation of this token. - (when (and (> (length token) 1) (stringp token) - (memq (aref token (1- (length token))) - smie-blink-matching-triggers) - (not (eq (aref token (1- (length token))) - last-command-event))) - ;; Token ends with a trigger char, so don't blink for - ;; anything else than this trigger char, lest we'd blink - ;; both when inserting the trigger char and when inserting a - ;; subsequent SPC. - (setq token nil)) - (when (and (rassoc token smie-closer-alist) - (or smie-blink-matching-inners - (null (nth 2 (assoc token smie-op-levels))))) - ;; The major mode might set blink-matching-check-function - ;; buffer-locally so that interactive calls to - ;; blink-matching-open work right, but let's not presume - ;; that's the case. - (let ((blink-matching-check-function #'smie-blink-matching-check)) - (blink-matching-open))))))) + (when (and (eq (point) (1- pos)) + (= 1 (length token)) + (not (rassoc token smie-closer-alist))) + ;; The trigger char is itself a token but is not one of the + ;; closers (e.g. ?\; in Octave mode), so go back to the + ;; previous token. + (setq pos (point)) + (setq token (save-excursion + (funcall smie-backward-token-function)))) + (when (rassoc token smie-closer-alist) + ;; We're after a close token. Let's still make sure we + ;; didn't skip a comment to find that token. + (funcall smie-forward-token-function) + (when (and (save-excursion + ;; Trigger can be SPC, or reindent. + (skip-chars-forward " \n\t") + (>= (point) pos)) + ;; If token ends with a trigger char, so don't blink for + ;; anything else than this trigger char, lest we'd blink + ;; both when inserting the trigger char and when + ;; inserting a subsequent trigger char like SPC. + (or (eq (point) pos) + (not (memq (char-before) + smie-blink-matching-triggers))) + (or smie-blink-matching-inners + (null (nth 2 (assoc token smie-op-levels))))) + ;; The major mode might set blink-matching-check-function + ;; buffer-locally so that interactive calls to + ;; blink-matching-open work right, but let's not presume + ;; that's the case. + (let ((blink-matching-check-function #'smie-blink-matching-check)) + (blink-matching-open)))))))) ;;; The indentation engine. @@ -821,7 +856,7 @@ position of its parent, or the position right after its parent. A nil offset for indentation after an opening token defaults to `smie-indent-basic'.") -(defun smie-indent-hanging-p () +(defun smie-indent--hanging-p () ;; A hanging keyword is one that's at the end of a line except it's not at ;; the beginning of a line. (and (save-excursion @@ -830,19 +865,19 @@ to `smie-indent-basic'.") (forward-char 1)) (skip-chars-forward " \t") (eolp)) - (not (smie-bolp)))) + (not (smie-indent--bolp)))) -(defun smie-bolp () +(defun smie-indent--bolp () (save-excursion (skip-chars-backward " \t") (bolp))) -(defun smie-indent-offset (elem) +(defun smie-indent--offset (elem) (or (cdr (assq elem smie-indent-rules)) (cdr (assq t smie-indent-rules)) smie-indent-basic)) (defvar smie-indent-debug-log) -(defun smie-indent-offset-rule (tokinfo &optional after parent) +(defun smie-indent--offset-rule (tokinfo &optional after parent) "Apply the OFFSET-RULES in TOKINFO. Point is expected to be right in front of the token corresponding to TOKINFO. If computing the indentation after the token, then AFTER is the position @@ -857,10 +892,10 @@ PARENT if non-nil should be the parent info returned by `smie-backward-sexp'." ((not (consp rule)) (setq offset rule)) ((eq (car rule) '+) (setq offset rule)) ((eq (car rule) :hanging) - (when (smie-indent-hanging-p) + (when (smie-indent--hanging-p) (setq rules (cdr rule)))) ((eq (car rule) :bolp) - (when (smie-bolp) + (when (smie-indent--bolp) (setq rules (cdr rule)))) ((eq (car rule) :eolp) (unless after @@ -900,13 +935,13 @@ PARENT if non-nil should be the parent info returned by `smie-backward-sexp'." (push (list (point) offset tokinfo) smie-indent-debug-log)) offset)) -(defun smie-indent-column (offset &optional base parent virtual-point) +(defun smie-indent--column (offset &optional base parent virtual-point) "Compute the actual column to use for a given OFFSET. BASE is the base position to use, and PARENT is the parent info, if any. If VIRTUAL-POINT is non-nil, then `point' is virtual." (cond ((eq (car-safe offset) '+) - (apply '+ (mapcar (lambda (offset) (smie-indent-column offset nil parent)) + (apply '+ (mapcar (lambda (offset) (smie-indent--column offset nil parent)) (cdr offset)))) ((integerp offset) (+ offset @@ -941,7 +976,7 @@ If VIRTUAL-POINT is non-nil, then `point' is virtual." (smie-indent-virtual)) ((eq offset nil) nil) ((and (symbolp offset) (boundp 'offset)) - (smie-indent-column (symbol-value offset) base parent virtual-point)) + (smie-indent--column (symbol-value offset) base parent virtual-point)) (t (error "Unknown indentation offset %s" offset)))) (defun smie-indent-forward-token () @@ -974,11 +1009,11 @@ This is used when we're not trying to indent point but just need to compute the column at which point should be indented in order to figure out the indentation of some other (further down) point." ;; Trust pre-existing indentation on other lines. - (if (smie-bolp) (current-column) (smie-indent-calculate))) + (if (smie-indent--bolp) (current-column) (smie-indent-calculate))) (defun smie-indent-fixindent () ;; Obey the `fixindent' special comment. - (and (smie-bolp) + (and (smie-indent--bolp) (save-excursion (comment-normalize-vars) (re-search-forward (concat comment-start-skip @@ -1018,14 +1053,14 @@ in order to figure out the indentation of some other (further down) point." (save-excursion (goto-char pos) ;; Different cases: - ;; - smie-bolp: "indent according to others". + ;; - smie-indent--bolp: "indent according to others". ;; - common hanging: "indent according to others". ;; - SML-let hanging: "indent like parent". ;; - if-after-else: "indent-like parent". ;; - middle-of-line: "trust current position". (cond ((null (cdr toklevels)) nil) ;Not a keyword. - ((smie-bolp) + ((smie-indent--bolp) ;; For an open-paren-like thingy at BOL, always indent only ;; based on other rules (typically smie-indent-after-keyword). nil) @@ -1037,8 +1072,8 @@ in order to figure out the indentation of some other (further down) point." ;; By default use point unless we're hanging. `((:before . ,token) (:hanging nil) point))) ;; (after (prog1 (point) (goto-char pos))) - (offset (smie-indent-offset-rule tokinfo))) - (smie-indent-column offset))))) + (offset (smie-indent--offset-rule tokinfo))) + (smie-indent--column offset))))) ;; FIXME: This still looks too much like black magic!! ;; FIXME: Rather than a bunch of rules like (PARENT . TOKEN), we @@ -1054,7 +1089,7 @@ in order to figure out the indentation of some other (further down) point." point))) (offset (save-excursion (goto-char pos) - (smie-indent-offset-rule tokinfo nil parent)))) + (smie-indent--offset-rule tokinfo nil parent)))) ;; Different behaviors: ;; - align with parent. ;; - parent + offset. @@ -1079,10 +1114,10 @@ in order to figure out the indentation of some other (further down) point." nil) ((eq (car parent) (car toklevels)) ;; We bumped into a same-level operator. align with it. - (if (and (smie-bolp) (/= (point) pos) + (if (and (smie-indent--bolp) (/= (point) pos) (save-excursion (goto-char (goto-char (cadr parent))) - (not (smie-bolp))) + (not (smie-indent--bolp))) ;; Check the offset of `token' rather then its parent ;; because its parent may have used a special rule. E.g. ;; function foo; @@ -1119,7 +1154,7 @@ in order to figure out the indentation of some other (further down) point." ;; So as to align with the earliest appropriate place. (smie-indent-virtual))) (tokinfo - (if (and (= (point) pos) (smie-bolp) + (if (and (= (point) pos) (smie-indent--bolp) (or (eq offset 'point) (and (consp offset) (memq 'point offset)))) ;; Since we started at BOL, we're not computing a virtual @@ -1127,7 +1162,7 @@ in order to figure out the indentation of some other (further down) point." ;; we can't use `current-column' which would cause ;; indentation to depend on itself. nil - (smie-indent-column offset 'parent parent + (smie-indent--column offset 'parent parent ;; If we're still at pos, indent-virtual ;; will inf-loop. (unless (= (point) pos) 'virtual)))))))))) @@ -1137,8 +1172,12 @@ in order to figure out the indentation of some other (further down) point." ;; Don't do it for virtual indentations. We should normally never be "in ;; front of a comment" when doing virtual-indentation anyway. And if we are ;; (as can happen in octave-mode), moving forward can lead to inf-loops. - (and (smie-bolp) - (looking-at comment-start-skip) + (and (smie-indent--bolp) + (let ((pos (point))) + (save-excursion + (beginning-of-line) + (and (re-search-forward comment-start-skip (line-end-position) t) + (eq pos (or (match-end 1) (match-beginning 0)))))) (save-excursion (forward-comment (point-max)) (skip-chars-forward " \t\r\n") @@ -1159,6 +1198,20 @@ in order to figure out the indentation of some other (further down) point." (if (looking-at (regexp-quote continue)) (current-column)))))))) +(defun smie-indent-comment-close () + (and (boundp 'comment-end-skip) + comment-end-skip + (not (looking-at " \t*$")) ;Not just a \n comment-closer. + (looking-at comment-end-skip) + (nth 4 (syntax-ppss)) + (save-excursion + (goto-char (nth 8 (syntax-ppss))) + (current-column)))) + +(defun smie-indent-comment-inside () + (and (nth 4 (syntax-ppss)) + 'noindent)) + (defun smie-indent-after-keyword () ;; Indentation right after a special keyword. (save-excursion @@ -1178,13 +1231,13 @@ in order to figure out the indentation of some other (further down) point." ;; Using the BNF syntax, we could come up with better ;; defaults, but we only have the precedence levels here. (setq tokinfo (list tok 'default-rule - (if (cadr toklevel) 0 (smie-indent-offset t))))) + (if (cadr toklevel) 0 (smie-indent--offset t))))) (let ((offset - (or (smie-indent-offset-rule tokinfo pos) - (smie-indent-offset t)))) + (or (smie-indent--offset-rule tokinfo pos) + (smie-indent--offset t)))) (let ((before (point))) (goto-char pos) - (smie-indent-column offset before))))))) + (smie-indent--column offset before))))))) (defun smie-indent-exps () ;; Indentation of sequences of simple expressions without @@ -1207,7 +1260,7 @@ in order to figure out the indentation of some other (further down) point." arg) (while (and (null (car (smie-backward-sexp))) (push (point) positions) - (not (smie-bolp)))) + (not (smie-indent--bolp)))) (save-excursion ;; Figure out if the atom we just skipped is an argument rather ;; than a function. @@ -1232,17 +1285,18 @@ in order to figure out the indentation of some other (further down) point." (positions ;; We're the first arg. (goto-char (car positions)) - ;; FIXME: Use smie-indent-column. - (+ (smie-indent-offset 'args) + ;; FIXME: Use smie-indent--column. + (+ (smie-indent--offset 'args) ;; We used to use (smie-indent-virtual), but that ;; doesn't seem right since it might then indent args less than ;; the function itself. (current-column))))))) (defvar smie-indent-functions - '(smie-indent-fixindent smie-indent-bob smie-indent-close smie-indent-comment - smie-indent-comment-continue smie-indent-keyword smie-indent-after-keyword - smie-indent-exps) + '(smie-indent-fixindent smie-indent-bob smie-indent-close + smie-indent-comment smie-indent-comment-continue smie-indent-comment-close + smie-indent-comment-inside smie-indent-keyword smie-indent-after-keyword + smie-indent-exps) "Functions to compute the indentation. Each function is called with no argument, shouldn't move point, and should return either nil if it has no opinion, or an integer representing the column diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index ad0166e7af0..b85399263d0 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -57,7 +57,11 @@ ;; syntax-ppss-flush-cache since that would not only flush the cache but also ;; reset syntax-propertize--done which should not be done in this case). "Mode-specific function to apply the syntax-table properties. -Called with 2 arguments: START and END.") +Called with 2 arguments: START and END. +This function can call `syntax-ppss' on any position before END, but it +should not call `syntax-ppss-flush-cache', which means that it should not +call `syntax-ppss' on some position and later modify the buffer on some +earlier position.") (defvar syntax-propertize-chunk-size 500) @@ -109,15 +113,35 @@ Put first the functions more likely to cause a change and cheaper to compute.") t t s 1)) re t t)) +(defmacro syntax-propertize-precompile-rules (&rest rules) + "Return a precompiled form of RULES to pass to `syntax-propertize-rules'. +The arg RULES can be of the same form as in `syntax-propertize-rules'. +The return value is an object that can be passed as a rule to +`syntax-propertize-rules'. +I.e. this is useful only when you want to share rules among several +syntax-propertize-functions." + (declare (debug syntax-propertize-rules)) + ;; Precompile? Yeah, right! + ;; Seriously, tho, this is a macro for 2 reasons: + ;; - we could indeed do some pre-compilation at some point in the future, + ;; e.g. fi/when we switch to a DFA-based implementation of + ;; syntax-propertize-rules. + ;; - this lets Edebug properly annotate the expressions inside RULES. + `',rules) + (defmacro syntax-propertize-rules (&rest rules) "Make a function that applies RULES for use in `syntax-propertize-function'. The function will scan the buffer, applying the rules where they match. The buffer is scanned a single time, like \"lex\" would, rather than once per rule. -Each rule has the form (REGEXP HIGHLIGHT1 ... HIGHLIGHTn), where REGEXP -is an expression (evaluated at time of macro-expansion) that returns a regexp, -and where HIGHLIGHTs have the form (NUMBER SYNTAX) which means to +Each RULE can be a symbol, in which case that symbol's value should be, +at macro-expansion time, a precompiled set of rules, as returned +by `syntax-propertize-precompile-rules'. + +Otherwise, RULE should have the form (REGEXP HIGHLIGHT1 ... HIGHLIGHTn), where +REGEXP is an expression (evaluated at time of macro-expansion) that returns +a regexp, and where HIGHLIGHTs have the form (NUMBER SYNTAX) which means to apply the property SYNTAX to the chars matched by the subgroup NUMBER of the regular expression, if NUMBER did match. SYNTAX is an expression that returns a value to apply as `syntax-table' @@ -132,11 +156,18 @@ Also SYNTAX is free to move point, in which case RULES may not be applied to some parts of the text or may be applied several times to other parts. Note: back-references in REGEXPs do not work." - (declare (debug (&rest (form &rest + (declare (debug (&rest &or symbolp ;FIXME: edebug this eval step. + (form &rest (numberp - [&or stringp + [&or stringp ;FIXME: Use &wrap ("prog1" [&or stringp def-form] def-body) def-form]))))) + (let ((newrules nil)) + (while rules + (if (symbolp (car rules)) + (setq rules (append (symbol-value (pop rules)) rules)) + (push (pop rules) newrules))) + (setq rules (nreverse newrules))) (let* ((offset 0) (branches '()) ;; We'd like to use a real DFA-based lexer, usually, but since Emacs @@ -145,7 +176,8 @@ Note: back-references in REGEXPs do not work." (re (mapconcat (lambda (rule) - (let ((re (eval (car rule)))) + (let* ((orig-re (eval (car rule))) + (re orig-re)) (when (and (assq 0 rule) (cdr rules)) ;; If there's more than 1 rule, and the rule want to apply ;; highlight to match 0, create an extra group to be able to @@ -229,7 +261,7 @@ Note: back-references in REGEXPs do not work." code)))) (push (cons condition (nreverse code)) branches)) - (incf offset (regexp-opt-depth re)) + (incf offset (regexp-opt-depth orig-re)) re)) rules "\\|"))) diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index 4adb93a852d..ba8c8ffc831 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -119,9 +119,9 @@ See also `warning-suppress-log-types'." :type '(repeat (repeat symbol)) :version "22.1") -;;; The autoload cookie is so that programs can bind this variable -;;; safely, testing the existing value, before they call one of the -;;; warnings functions. +;; The autoload cookie is so that programs can bind this variable +;; safely, testing the existing value, before they call one of the +;; warnings functions. ;;;###autoload (defvar warning-prefix-function nil "Function to generate warning prefixes. @@ -132,9 +132,9 @@ The warnings buffer is current when this function is called and the function can insert text in it. This text becomes the beginning of the warning.") -;;; The autoload cookie is so that programs can bind this variable -;;; safely, testing the existing value, before they call one of the -;;; warnings functions. +;; The autoload cookie is so that programs can bind this variable +;; safely, testing the existing value, before they call one of the +;; warnings functions. ;;;###autoload (defvar warning-series nil "Non-nil means treat multiple `display-warning' calls as a series. @@ -146,16 +146,16 @@ A symbol with a function definition is like t, except also call that function before the next warning.") (put 'warning-series 'risky-local-variable t) -;;; The autoload cookie is so that programs can bind this variable -;;; safely, testing the existing value, before they call one of the -;;; warnings functions. +;; The autoload cookie is so that programs can bind this variable +;; safely, testing the existing value, before they call one of the +;; warnings functions. ;;;###autoload (defvar warning-fill-prefix nil "Non-nil means fill each warning text using this string as `fill-prefix'.") -;;; The autoload cookie is so that programs can bind this variable -;;; safely, testing the existing value, before they call one of the -;;; warnings functions. +;; The autoload cookie is so that programs can bind this variable +;; safely, testing the existing value, before they call one of the +;; warnings functions. ;;;###autoload (defvar warning-type-format (purecopy " (%s)") "Format for displaying the warning type in the warning message. @@ -241,6 +241,8 @@ See also `warning-series', `warning-prefix-function' and (with-current-buffer buffer ;; If we created the buffer, disable undo. (unless old + (special-mode) + (setq buffer-read-only t) (setq buffer-undo-list t)) (goto-char (point-max)) (when (and warning-series (symbolp warning-series)) @@ -248,6 +250,7 @@ See also `warning-series', `warning-prefix-function' and (prog1 (point-marker) (unless (eq warning-series t) (funcall warning-series))))) + (let ((inhibit-read-only t)) (unless (bolp) (newline)) (setq start (point)) @@ -262,7 +265,7 @@ See also `warning-series', `warning-prefix-function' and (let ((fill-prefix warning-fill-prefix) (fill-column 78)) (fill-region start (point)))) - (setq end (point)) + (setq end (point))) (when (and (markerp warning-series) (eq (marker-buffer warning-series) buffer)) (goto-char warning-series))) diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el index fd59ba760d8..9be200168ea 100644 --- a/lisp/emulation/crisp.el +++ b/lisp/emulation/crisp.el @@ -1,7 +1,7 @@ ;;; crisp.el --- CRiSP/Brief Emacs emulator -;; Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, +;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: Gary D. Foster ;; Keywords: emulations brief crisp @@ -175,7 +175,7 @@ All the bindings are done here instead of globally to try and be nice to the world.") (defcustom crisp-mode-modeline-string " *CRiSP*" - "*String to display in the modeline when CRiSP emulation mode is enabled." + "String to display in the modeline when CRiSP emulation mode is enabled." :type 'string :group 'crisp) @@ -195,7 +195,7 @@ use either M-x customize or the function `crisp-mode'." :group 'crisp) (defcustom crisp-override-meta-x t - "*Controls overriding the normal Emacs M-x key binding in the CRiSP emulator. + "Controls overriding the normal Emacs M-x key binding in the CRiSP emulator. Normally the CRiSP emulator rebinds M-x to `save-buffers-exit-emacs', and provides the usual M-x functionality on the F10 key. If this variable is non-nil, M-x will exit Emacs." diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index f6749cd9e97..f088706afb0 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -270,7 +270,7 @@ :link '(emacs-library-link :tag "Lisp File" "cua-base.el")) (defcustom cua-enable-cua-keys t - "*Enable using C-z, C-x, C-c, and C-v for undo, cut, copy, and paste. + "Enable using C-z, C-x, C-c, and C-v for undo, cut, copy, and paste. If the value is t, these mappings are always enabled. If the value is `shift', these keys are only enabled if the last region was marked with a shifted movement key. If the value is nil, these keys are never @@ -281,18 +281,18 @@ enabled." :group 'cua) (defcustom cua-remap-control-v t - "*If non-nil, C-v binding is used for paste (yank). + "If non-nil, C-v binding is used for paste (yank). Also, M-v is mapped to `cua-repeat-replace-region'." :type 'boolean :group 'cua) (defcustom cua-remap-control-z t - "*If non-nil, C-z binding is used for undo." + "If non-nil, C-z binding is used for undo." :type 'boolean :group 'cua) (defcustom cua-highlight-region-shift-only nil - "*If non-nil, only highlight region if marked with S-. + "If non-nil, only highlight region if marked with S-. When this is non-nil, CUA toggles `transient-mark-mode' on when the region is marked using shifted movement keys, and off when the mark is cleared. But when the mark was set using \\[cua-set-mark], Transient Mark mode @@ -302,7 +302,7 @@ is not turned on." (defcustom cua-prefix-override-inhibit-delay (if (featurep 'lisp-float-type) (/ (float 1) (float 5)) nil) - "*If non-nil, time in seconds to delay before overriding prefix key. + "If non-nil, time in seconds to delay before overriding prefix key. If there is additional input within this time, the prefix key is used as a normal prefix key. So typing a key sequence quickly will inhibit overriding the prefix key. @@ -315,7 +315,7 @@ If the value is nil, use a shifted prefix key to inhibit the override." :group 'cua) (defcustom cua-delete-selection t - "*If non-nil, typed text replaces text in the active selection." + "If non-nil, typed text replaces text in the active selection." :type '(choice (const :tag "Disabled" nil) (other :tag "Enabled" t)) :group 'cua) @@ -326,13 +326,13 @@ If the value is nil, use a shifted prefix key to inhibit the override." :group 'cua) (defcustom cua-toggle-set-mark t - "*If non-nil, the `cua-set-mark' command toggles the mark." + "If non-nil, the `cua-set-mark' command toggles the mark." :type '(choice (const :tag "Disabled" nil) (other :tag "Enabled" t)) :group 'cua) (defcustom cua-auto-mark-last-change nil - "*If non-nil, set implicit mark at position of last buffer change. + "If non-nil, set implicit mark at position of last buffer change. This means that \\[universal-argument] \\[cua-set-mark] will jump to the position of the last buffer change before jumping to the explicit marks on the mark ring. See `cua-set-mark' for details." @@ -340,7 +340,7 @@ See `cua-set-mark' for details." :group 'cua) (defcustom cua-enable-register-prefix 'not-ctrl-u - "*If non-nil, registers are supported via numeric prefix arg. + "If non-nil, registers are supported via numeric prefix arg. If the value is t, any numeric prefix arg in the range 0 to 9 will be interpreted as a register number. If the value is `not-ctrl-u', using C-u to enter a numeric prefix is not @@ -354,29 +354,29 @@ interpreted as a register number." :group 'cua) (defcustom cua-delete-copy-to-register-0 t - "*If non-nil, save last deleted region or rectangle to register 0." + "If non-nil, save last deleted region or rectangle to register 0." :type 'boolean :group 'cua) (defcustom cua-enable-region-auto-help nil - "*If non-nil, automatically show help for active region." + "If non-nil, automatically show help for active region." :type 'boolean :group 'cua) (defcustom cua-enable-modeline-indications nil - "*If non-nil, use minor-mode hook to show status in mode line." + "If non-nil, use minor-mode hook to show status in mode line." :type 'boolean :group 'cua) (defcustom cua-check-pending-input t - "*If non-nil, don't override prefix key if input pending. + "If non-nil, don't override prefix key if input pending. It is rumoured that `input-pending-p' is unreliable under some window managers, so try setting this to nil, if prefix override doesn't work." :type 'boolean :group 'cua) (defcustom cua-paste-pop-rotate-temporarily nil - "*If non-nil, \\[cua-paste-pop] only rotates the kill-ring temporarily. + "If non-nil, \\[cua-paste-pop] only rotates the kill-ring temporarily. This means that both \\[yank] and the first \\[yank-pop] in a sequence always insert the most recently killed text. Each immediately following \\[cua-paste-pop] replaces the previous text with the next older element on the `kill-ring'. @@ -388,7 +388,7 @@ recent \\[yank-pop] (or \\[yank]) command." ;;; Rectangle Customization (defcustom cua-virtual-rectangle-edges t - "*If non-nil, rectangles have virtual straight edges. + "If non-nil, rectangles have virtual straight edges. Note that although rectangles are always DISPLAYED with straight edges, the buffer is NOT modified, until you execute a command that actually modifies it. M-p toggles this feature when a rectangle is active." @@ -396,7 +396,7 @@ M-p toggles this feature when a rectangle is active." :group 'cua) (defcustom cua-auto-tabify-rectangles 1000 - "*If non-nil, automatically tabify after rectangle commands. + "If non-nil, automatically tabify after rectangle commands. This basically means that `tabify' is applied to all lines that are modified by inserting or deleting a rectangle. If value is an integer, CUA will look for existing tabs in a region around @@ -428,7 +428,7 @@ and after the region marked by the rectangle to search." :group 'cua) (defcustom cua-rectangle-modifier-key 'meta - "*Modifier key used for rectangle commands bindings. + "Modifier key used for rectangle commands bindings. On non-window systems, always use the meta modifier. Must be set prior to enabling CUA." :type '(choice (const :tag "Meta key" meta) @@ -438,27 +438,27 @@ Must be set prior to enabling CUA." :group 'cua) (defcustom cua-enable-rectangle-auto-help t - "*If non-nil, automatically show help for region, rectangle and global mark." + "If non-nil, automatically show help for region, rectangle and global mark." :type 'boolean :group 'cua) (defface cua-rectangle '((default :inherit region) (((class color)) :foreground "white" :background "maroon")) - "*Font used by CUA for highlighting the rectangle." + "Font used by CUA for highlighting the rectangle." :group 'cua) (defface cua-rectangle-noselect '((default :inherit region) (((class color)) :foreground "white" :background "dimgray")) - "*Font used by CUA for highlighting the non-selected rectangle lines." + "Font used by CUA for highlighting the non-selected rectangle lines." :group 'cua) ;;; Global Mark Customization (defcustom cua-global-mark-keep-visible t - "*If non-nil, always keep global mark visible in other window." + "If non-nil, always keep global mark visible in other window." :type 'boolean :group 'cua) @@ -466,11 +466,11 @@ Must be set prior to enabling CUA." '((((min-colors 88)(class color)) :foreground "black" :background "yellow1") (((class color)) :foreground "black" :background "yellow") (t :bold t)) - "*Font used by CUA for highlighting the global mark." + "Font used by CUA for highlighting the global mark." :group 'cua) (defcustom cua-global-mark-blink-cursor-interval 0.20 - "*Blink cursor at this interval when global mark is active." + "Blink cursor at this interval when global mark is active." :type '(choice (number :tag "Blink interval") (const :tag "No blink" nil)) :group 'cua) @@ -479,7 +479,7 @@ Must be set prior to enabling CUA." ;;; Cursor Indication Customization (defcustom cua-enable-cursor-indications nil - "*If non-nil, use different cursor colors for indications." + "If non-nil, use different cursor colors for indications." :type 'boolean :group 'cua) @@ -517,7 +517,7 @@ a cons (TYPE . COLOR), then both properties are affected." :group 'cua) (defcustom cua-read-only-cursor-color "darkgreen" - "*Cursor color used in read-only buffers, if non-nil. + "Cursor color used in read-only buffers, if non-nil. Only used when `cua-enable-cursor-indications' is non-nil. If the value is a COLOR name, then only the `cursor-color' attribute will be @@ -541,7 +541,7 @@ a cons (TYPE . COLOR), then both properties are affected." :group 'cua) (defcustom cua-overwrite-cursor-color "yellow" - "*Cursor color used when overwrite mode is set, if non-nil. + "Cursor color used when overwrite mode is set, if non-nil. Only used when `cua-enable-cursor-indications' is non-nil. If the value is a COLOR name, then only the `cursor-color' attribute will be @@ -565,7 +565,7 @@ a cons (TYPE . COLOR), then both properties are affected." :group 'cua) (defcustom cua-global-mark-cursor-color "cyan" - "*Indication for active global mark. + "Indication for active global mark. Will change cursor color to specified color if string. Only used when `cua-enable-cursor-indications' is non-nil. diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index 88b74afe86b..1e017075d84 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -194,7 +194,7 @@ ;;; (defcustom edt-keep-current-page-delimiter nil - "*Emacs MUST be restarted for a change in value to take effect! + "Emacs MUST be restarted for a change in value to take effect! Non-nil leaves Emacs value of `page-delimiter' unchanged within EDT Emulation. If set to nil (the default), the `page-delimiter' variable is set to \"\\f\" when edt-emulation-on is first invoked. This @@ -204,7 +204,7 @@ is restored when edt-emulation-off is called." :group 'edt) (defcustom edt-use-EDT-control-key-bindings nil - "*Emacs MUST be restarted for a change in value to take effect! + "Emacs MUST be restarted for a change in value to take effect! Non-nil causes the control key bindings to be replaced with EDT bindings. If set to nil (the default), EDT control key bindings are not used and the current Emacs control key bindings are retained for @@ -213,7 +213,7 @@ use within the EDT emulation." :group 'edt) (defcustom edt-word-entities '(?\t) - "*Specifies the list of EDT word entity characters. + "Specifies the list of EDT word entity characters. The default list, (\?\\t), contains just the TAB character, which emulates EDT. Characters are specified in the list using their decimal ASCII values. A question mark, followed by the actual @@ -238,14 +238,14 @@ will be treated as if it were a separate word." :group 'edt) (defcustom edt-top-scroll-margin 10 - "*Scroll margin at the top of the screen. + "Scroll margin at the top of the screen. Interpreted as a percent of the current window size with a default setting of 10%. If set to 0, top scroll margin is disabled." :type 'integer :group 'edt) (defcustom edt-bottom-scroll-margin 15 - "*Scroll margin at the bottom of the screen. + "Scroll margin at the bottom of the screen. Interpreted as a percent of the current window size with a default setting of 15%. If set to 0, bottom scroll margin is disabled." :type 'integer diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index fcff6a7eb60..8dcdb991ab2 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el @@ -85,7 +85,7 @@ :group 'emulations) (defcustom pc-select-override-scroll-error t - "*Non-nil means don't generate error on scrolling past edge of buffer. + "Non-nil means don't generate error on scrolling past edge of buffer. This variable applies in PC Selection mode only. The scroll commands normally generate an error if you try to scroll past the top or bottom of the buffer. This is annoying when selecting @@ -98,14 +98,14 @@ errors are suppressed." "24.1") (defcustom pc-select-selection-keys-only nil - "*Non-nil means only bind the basic selection keys when started. + "Non-nil means only bind the basic selection keys when started. Other keys that emulate pc-behavior will be untouched. This gives mostly Emacs-like behavior with only the selection keys enabled." :type 'boolean :group 'pc-select) (defcustom pc-select-meta-moves-sexps nil - "*Non-nil means move sexp-wise with Meta key, otherwise move word-wise." + "Non-nil means move sexp-wise with Meta key, otherwise move word-wise." :type 'boolean :group 'pc-select) diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el index 4839e07bc1c..0474ba7c679 100644 --- a/lisp/emulation/vip.el +++ b/lisp/emulation/vip.el @@ -91,12 +91,12 @@ "How to reexecute last destructive command. Value is list (M-COM VAL COM).") (defcustom vip-shift-width 8 - "*The number of columns shifted by > and < command." + "The number of columns shifted by > and < command." :type 'integer :group 'vip) (defcustom vip-re-replace nil - "*If t then do regexp replace, if nil then do string replace." + "If t then do regexp replace, if nil then do string replace." :type 'boolean :group 'vip) @@ -116,12 +116,12 @@ "For use by \";\" command.") (defcustom vip-search-wrap-around t - "*If t, search wraps around." + "If t, search wraps around." :type 'boolean :group 'vip) (defcustom vip-re-search nil - "*If t, search is reg-exp search, otherwise vanilla search." + "If t, search is reg-exp search, otherwise vanilla search." :type 'boolean :group 'vip) @@ -132,22 +132,22 @@ "If t, search is forward.") (defcustom vip-case-fold-search nil - "*If t, search ignores cases." + "If t, search ignores cases." :type 'boolean :group 'vip) (defcustom vip-re-query-replace nil - "*If t then do regexp replace, if nil then do string replace." + "If t then do regexp replace, if nil then do string replace." :type 'boolean :group 'vip) (defcustom vip-open-with-indent nil - "*If t, indent when open a new line." + "If t, indent when open a new line." :type 'boolean :group 'vip) (defcustom vip-help-in-insert-mode nil - "*If t then C-h is bound to help-command in insert mode. + "If t then C-h is bound to help-command in insert mode. If nil then it is bound to `delete-backward-char'." :type 'boolean :group 'vip) diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index 6dcdadf0a5d..6b24c269b30 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el @@ -103,7 +103,7 @@ :group 'eshell-module) (defcustom eshell-aliases-file (expand-file-name "alias" eshell-directory-name) - "*The file in which aliases are kept. + "The file in which aliases are kept. Whenever an alias is defined by the user, using the `alias' command, it will be written to this file. Thus, alias definitions (and deletions) are always permanent. This approach was chosen for the @@ -113,13 +113,13 @@ gained by using this module." :group 'eshell-alias) (defcustom eshell-bad-command-tolerance 3 - "*The number of failed commands to ignore before creating an alias." + "The number of failed commands to ignore before creating an alias." :type 'integer ;; :link '(custom-manual "(eshell)Auto-correction of bad commands") :group 'eshell-alias) (defcustom eshell-alias-load-hook '(eshell-alias-initialize) - "*A hook that gets run when `eshell-alias' is loaded." + "A hook that gets run when `eshell-alias' is loaded." :type 'hook :group 'eshell-alias) diff --git a/lisp/eshell/em-banner.el b/lisp/eshell/em-banner.el index c13df836651..9087cae369c 100644 --- a/lisp/eshell/em-banner.el +++ b/lisp/eshell/em-banner.el @@ -58,7 +58,7 @@ modules may have a simple template to begin with." ;;; User Variables: (defcustom eshell-banner-message "Welcome to the Emacs shell\n\n" - "*The banner message to be displayed when Eshell is loaded. + "The banner message to be displayed when Eshell is loaded. This can be any sexp, and should end with at least two newlines." :type 'sexp :group 'eshell-banner) @@ -66,7 +66,7 @@ This can be any sexp, and should end with at least two newlines." (put 'eshell-banner-message 'risky-local-variable t) (defcustom eshell-banner-load-hook '(eshell-banner-initialize) - "*A list of functions to run when `eshell-banner' is loaded." + "A list of functions to run when `eshell-banner' is loaded." :type 'hook :group 'eshell-banner) diff --git a/lisp/eshell/em-basic.el b/lisp/eshell/em-basic.el index a4074011f58..ce72f752d42 100644 --- a/lisp/eshell/em-basic.el +++ b/lisp/eshell/em-basic.el @@ -77,7 +77,7 @@ same thing." :group 'eshell-module) (defcustom eshell-plain-echo-behavior nil - "*If non-nil, `echo' tries to behave like an ordinary shell echo. + "If non-nil, `echo' tries to behave like an ordinary shell echo. This comes at some detriment to Lisp functionality. However, the Lisp equivalent of `echo' can always be achieved by using `identity'." :type 'boolean diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index b0aad0f1499..554e010a1b3 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -86,26 +86,26 @@ variable names, arguments, etc." ;;; User Variables: (defcustom eshell-cmpl-load-hook '(eshell-cmpl-initialize) - "*A list of functions to run when `eshell-cmpl' is loaded." + "A list of functions to run when `eshell-cmpl' is loaded." :type 'hook :group 'eshell-cmpl) (defcustom eshell-show-lisp-completions nil - "*If non-nil, include Lisp functions in the command completion list. + "If non-nil, include Lisp functions in the command completion list. If this variable is nil, Lisp completion can still be done in command position by using M-TAB instead of TAB." :type 'boolean :group 'eshell-cmpl) (defcustom eshell-show-lisp-alternatives t - "*If non-nil, and no other completions found, show Lisp functions. + "If non-nil, and no other completions found, show Lisp functions. Setting this variable means nothing if `eshell-show-lisp-completions' is non-nil." :type 'boolean :group 'eshell-cmpl) (defcustom eshell-no-completion-during-jobs t - "*If non-nil, don't allow completion while a process is running." + "If non-nil, don't allow completion while a process is running." :type 'boolean :group 'eshell-cmpl) @@ -126,7 +126,7 @@ is non-nil." ("dbx" . "\\`\\([^.]*\\|a\\.out\\)\\'") ("sdb" . "\\`\\([^.]*\\|a\\.out\\)\\'") ("adb" . "\\`\\([^.]*\\|a\\.out\\)\\'")) - "*An alist that defines simple argument type correlations. + "An alist that defines simple argument type correlations. This is provided for common commands, as a simplistic alternative to writing a completion function." :type '(repeat (cons string regexp)) diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 43bc3ffaa6f..f4b2575def2 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -60,14 +60,14 @@ they lack somewhat in feel from the typical shell equivalents." ;;; User Variables: (defcustom eshell-dirs-load-hook '(eshell-dirs-initialize) - "*A hook that gets run when `eshell-dirs' is loaded." + "A hook that gets run when `eshell-dirs' is loaded." :type 'hook :group 'eshell-dirs) (defcustom eshell-pwd-convert-function (if (eshell-under-windows-p) 'expand-file-name 'identity) - "*The function used to normalize the value of Eshell's `pwd'. + "The function used to normalize the value of Eshell's `pwd'. The value returned by `pwd' is also used when recording the last-visited directory in the last-dir-ring, so it will affect the form of the list used by 'cd ='." @@ -78,7 +78,7 @@ form of the list used by 'cd ='." :group 'eshell-dirs) (defcustom eshell-ask-to-save-last-dir 'always - "*Determine if the last-dir-ring should be automatically saved. + "Determine if the last-dir-ring should be automatically saved. The last-dir-ring is always preserved when exiting an Eshell buffer. However, when Emacs is being shut down, this variable determines whether to prompt the user, or just save the ring. @@ -91,22 +91,22 @@ If set to `always', the list-dir-ring will always be saved, silently." :group 'eshell-dirs) (defcustom eshell-cd-shows-directory nil - "*If non-nil, using `cd' will report the directory it changes to." + "If non-nil, using `cd' will report the directory it changes to." :type 'boolean :group 'eshell-dirs) (defcustom eshell-cd-on-directory t - "*If non-nil, do a cd if a directory is in command position." + "If non-nil, do a cd if a directory is in command position." :type 'boolean :group 'eshell-dirs) (defcustom eshell-directory-change-hook nil - "*A hook to run when the current directory changes." + "A hook to run when the current directory changes." :type 'hook :group 'eshell-dirs) (defcustom eshell-list-files-after-cd nil - "*If non-nil, call \"ls\" with any remaining args after doing a cd. + "If non-nil, call \"ls\" with any remaining args after doing a cd. This is provided for convenience, since the same effect is easily achieved by adding a function to `eshell-directory-change-hook' that calls \"ls\" and references `eshell-last-arguments'." @@ -114,39 +114,39 @@ calls \"ls\" and references `eshell-last-arguments'." :group 'eshell-dirs) (defcustom eshell-pushd-tohome nil - "*If non-nil, make pushd with no arg behave as 'pushd ~' (like `cd'). + "If non-nil, make pushd with no arg behave as 'pushd ~' (like `cd'). This mirrors the optional behavior of tcsh." :type 'boolean :group 'eshell-dirs) (defcustom eshell-pushd-dextract nil - "*If non-nil, make \"pushd +n\" pop the nth dir to the stack top. + "If non-nil, make \"pushd +n\" pop the nth dir to the stack top. This mirrors the optional behavior of tcsh." :type 'boolean :group 'eshell-dirs) (defcustom eshell-pushd-dunique nil - "*If non-nil, make pushd only add unique directories to the stack. + "If non-nil, make pushd only add unique directories to the stack. This mirrors the optional behavior of tcsh." :type 'boolean :group 'eshell-dirs) (defcustom eshell-dirtrack-verbose t - "*If non-nil, show the directory stack following directory change. + "If non-nil, show the directory stack following directory change. This is effective only if directory tracking is enabled." :type 'boolean :group 'eshell-dirs) (defcustom eshell-last-dir-ring-file-name (expand-file-name "lastdir" eshell-directory-name) - "*If non-nil, name of the file to read/write the last-dir-ring. + "If non-nil, name of the file to read/write the last-dir-ring. See also `eshell-read-last-dir-ring' and `eshell-write-last-dir-ring'. If it is nil, the last-dir-ring will not be written to disk." :type 'file :group 'eshell-dirs) (defcustom eshell-last-dir-ring-size 32 - "*If non-nil, the size of the directory history ring. + "If non-nil, the size of the directory history ring. This ring is added to every time `cd' or `pushd' is used. It simply stores the most recent directory locations Eshell has been in. To return to the most recent entry, use 'cd -' (equivalent to 'cd -0'). @@ -167,7 +167,7 @@ thing again." :group 'eshell-dirs) (defcustom eshell-last-dir-unique t - "*If non-nil, `eshell-last-dir-ring' contains only unique entries." + "If non-nil, `eshell-last-dir-ring' contains only unique entries." :type 'boolean :group 'eshell-dirs) diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index d4ad3009f86..2f29f3d0aee 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el @@ -63,39 +63,39 @@ by zsh for filename generation." ;;; User Variables: (defcustom eshell-glob-load-hook '(eshell-glob-initialize) - "*A list of functions to run when `eshell-glob' is loaded." + "A list of functions to run when `eshell-glob' is loaded." :type 'hook :group 'eshell-glob) (defcustom eshell-glob-include-dot-files nil - "*If non-nil, glob patterns will match files beginning with a dot." + "If non-nil, glob patterns will match files beginning with a dot." :type 'boolean :group 'eshell-glob) (defcustom eshell-glob-include-dot-dot t - "*If non-nil, glob patterns that match dots will match . and .." + "If non-nil, glob patterns that match dots will match . and .." :type 'boolean :group 'eshell-glob) (defcustom eshell-glob-case-insensitive (eshell-under-windows-p) - "*If non-nil, glob pattern matching will ignore case." + "If non-nil, glob pattern matching will ignore case." :type 'boolean :group 'eshell-glob) (defcustom eshell-glob-show-progress nil - "*If non-nil, display progress messages during a recursive glob. + "If non-nil, display progress messages during a recursive glob. This option slows down recursive glob processing by quite a bit." :type 'boolean :group 'eshell-glob) (defcustom eshell-error-if-no-glob nil - "*If non-nil, it is an error for a glob pattern not to match. + "If non-nil, it is an error for a glob pattern not to match. This mimcs the behavior of zsh if non-nil, but bash if nil." :type 'boolean :group 'eshell-glob) (defcustom eshell-glob-chars-list '(?\] ?\[ ?* ?? ?~ ?\( ?\) ?| ?# ?^) - "*List of additional characters used in extended globbing." + "List of additional characters used in extended globbing." :type '(repeat character) :group 'eshell-glob) @@ -117,7 +117,7 @@ This option slows down recursive glob processing by quite a bit." (if (eq (aref str (1+ pos)) ?*) "*" "+")) (+ pos 2)) (cons "*" (1+ pos)))))) - "*An alist for translation of extended globbing characters." + "An alist for translation of extended globbing characters." :type '(repeat (cons character (choice regexp function))) :group 'eshell-glob) diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 37a926f888a..1f644261337 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -72,7 +72,7 @@ ;;; User Variables: (defcustom eshell-hist-load-hook '(eshell-hist-initialize) - "*A list of functions to call when loading `eshell-hist'." + "A list of functions to call when loading `eshell-hist'." :type 'hook :group 'eshell-hist) @@ -81,31 +81,31 @@ (function (lambda () (remove-hook 'kill-emacs-hook 'eshell-save-some-history)))) - "*A hook that gets run when `eshell-hist' is unloaded." + "A hook that gets run when `eshell-hist' is unloaded." :type 'hook :group 'eshell-hist) (defcustom eshell-history-file-name (expand-file-name "history" eshell-directory-name) - "*If non-nil, name of the file to read/write input history. + "If non-nil, name of the file to read/write input history. See also `eshell-read-history' and `eshell-write-history'. If it is nil, Eshell will use the value of HISTFILE." :type 'file :group 'eshell-hist) (defcustom eshell-history-size 128 - "*Size of the input history ring. If nil, use envvar HISTSIZE." + "Size of the input history ring. If nil, use envvar HISTSIZE." :type 'integer :group 'eshell-hist) (defcustom eshell-hist-ignoredups nil - "*If non-nil, don't add input matching the last on the input ring. + "If non-nil, don't add input matching the last on the input ring. This mirrors the optional behavior of bash." :type 'boolean :group 'eshell-hist) (defcustom eshell-save-history-on-exit t - "*Determine if history should be automatically saved. + "Determine if history should be automatically saved. History is always preserved after sanely exiting an Eshell buffer. However, when Emacs is being shut down, this variable determines whether to prompt the user. @@ -121,7 +121,7 @@ If set to t, history will always be saved, silently." (function (lambda (str) (not (string-match "\\`\\s-*\\'" str)))) - "*Predicate for filtering additions to input history. + "Predicate for filtering additions to input history. Takes one argument, the input. If non-nil, the input may be saved on the input history list. Default is to save anything that isn't all whitespace." @@ -131,7 +131,7 @@ whitespace." (put 'eshell-input-filter 'risky-local-variable t) (defcustom eshell-hist-match-partial t - "*If non-nil, movement through history is constrained by current input. + "If non-nil, movement through history is constrained by current input. Otherwise, typing and will always go to the next history element, regardless of any text on the command line. In that case, and still offer that functionality." @@ -139,25 +139,25 @@ element, regardless of any text on the command line. In that case, :group 'eshell-hist) (defcustom eshell-hist-move-to-end t - "*If non-nil, move to the end of the buffer before cycling history." + "If non-nil, move to the end of the buffer before cycling history." :type 'boolean :group 'eshell-hist) (defcustom eshell-hist-event-designator "^!\\(!\\|-?[0-9]+\\|\\??[^:^$%*?]+\\??\\|#\\)" - "*The regexp used to identifier history event designators." + "The regexp used to identifier history event designators." :type 'regexp :group 'eshell-hist) (defcustom eshell-hist-word-designator "^:?\\([0-9]+\\|[$^%*]\\)?\\(\\*\\|-[0-9]*\\|[$^%*]\\)?" - "*The regexp used to identify history word designators." + "The regexp used to identify history word designators." :type 'regexp :group 'eshell-hist) (defcustom eshell-hist-modifier "^\\(:\\([hretpqx&g]\\|s/\\([^/]*\\)/\\([^/]*\\)/\\)\\)*" - "*The regexp used to identity history modifiers." + "The regexp used to identity history modifiers." :type 'regexp :group 'eshell-hist) @@ -174,7 +174,7 @@ element, regardless of any text on the command line. In that case, ([(meta ?n)] . eshell-next-matching-input-from-input) ([up] . eshell-previous-matching-input-from-input) ([down] . eshell-next-matching-input-from-input)) - "*History keys to bind differently if point is in input text." + "History keys to bind differently if point is in input text." :type '(repeat (cons (vector :tag "Keys to bind" (repeat :inline t sexp)) (function :tag "Command"))) diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 860ad5c77d8..db2a21cd319 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -54,24 +54,24 @@ properties to colorize its output based on the setting of (function (lambda () (fset 'insert-directory eshell-ls-orig-insert-directory)))) - "*When unloading `eshell-ls', restore the definition of `insert-directory'." + "When unloading `eshell-ls', restore the definition of `insert-directory'." :type 'hook :group 'eshell-ls) (defcustom eshell-ls-initial-args nil - "*If non-nil, this list of args is included before any call to `ls'. + "If non-nil, this list of args is included before any call to `ls'. This is useful for enabling human-readable format (-h), for example." :type '(repeat :tag "Arguments" string) :group 'eshell-ls) (defcustom eshell-ls-dired-initial-args nil - "*If non-nil, args is included before any call to `ls' in Dired. + "If non-nil, args is included before any call to `ls' in Dired. This is useful for enabling human-readable format (-h), for example." :type '(repeat :tag "Arguments" string) :group 'eshell-ls) (defcustom eshell-ls-use-in-dired nil - "*If non-nil, use `eshell-ls' to read directories in Dired." + "If non-nil, use `eshell-ls' to read directories in Dired." :set (lambda (symbol value) (if value (unless (and (boundp 'eshell-ls-use-in-dired) @@ -86,24 +86,24 @@ This is useful for enabling human-readable format (-h), for example." :group 'eshell-ls) (defcustom eshell-ls-default-blocksize 1024 - "*The default blocksize to use when display file sizes with -s." + "The default blocksize to use when display file sizes with -s." :type 'integer :group 'eshell-ls) (defcustom eshell-ls-exclude-regexp nil - "*Unless -a is specified, files matching this regexp will not be shown." + "Unless -a is specified, files matching this regexp will not be shown." :type '(choice regexp (const nil)) :group 'eshell-ls) (defcustom eshell-ls-exclude-hidden t - "*Unless -a is specified, files beginning with . will not be shown. + "Unless -a is specified, files beginning with . will not be shown. Using this boolean, instead of `eshell-ls-exclude-regexp', is both faster and conserves more memory." :type 'boolean :group 'eshell-ls) (defcustom eshell-ls-use-colors t - "*If non-nil, use colors in file listings." + "If non-nil, use colors in file listings." :type 'boolean :group 'eshell-ls) @@ -111,7 +111,7 @@ faster and conserves more memory." '((((class color) (background light)) (:foreground "Blue" :weight bold)) (((class color) (background dark)) (:foreground "SkyBlue" :weight bold)) (t (:weight bold))) - "*The face used for highlight directories." + "The face used for highlight directories." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-directory-face 'eshell-ls-directory "22.1") @@ -119,14 +119,14 @@ faster and conserves more memory." (defface eshell-ls-symlink '((((class color) (background light)) (:foreground "Dark Cyan" :weight bold)) (((class color) (background dark)) (:foreground "Cyan" :weight bold))) - "*The face used for highlight symbolic links." + "The face used for highlight symbolic links." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-symlink-face 'eshell-ls-symlink "22.1") (defface eshell-ls-executable '((((class color) (background light)) (:foreground "ForestGreen" :weight bold)) (((class color) (background dark)) (:foreground "Green" :weight bold))) - "*The face used for highlighting executables (not directories, though)." + "The face used for highlighting executables (not directories, though)." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-executable-face 'eshell-ls-executable "22.1") @@ -134,14 +134,14 @@ faster and conserves more memory." (defface eshell-ls-readonly '((((class color) (background light)) (:foreground "Brown")) (((class color) (background dark)) (:foreground "Pink"))) - "*The face used for highlighting read-only files." + "The face used for highlighting read-only files." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-readonly-face 'eshell-ls-readonly "22.1") (defface eshell-ls-unreadable '((((class color) (background light)) (:foreground "Grey30")) (((class color) (background dark)) (:foreground "DarkGrey"))) - "*The face used for highlighting unreadable files." + "The face used for highlighting unreadable files." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-unreadable-face 'eshell-ls-unreadable "22.1") @@ -149,49 +149,50 @@ faster and conserves more memory." (defface eshell-ls-special '((((class color) (background light)) (:foreground "Magenta" :weight bold)) (((class color) (background dark)) (:foreground "Magenta" :weight bold))) - "*The face used for highlighting non-regular files." + "The face used for highlighting non-regular files." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-special-face 'eshell-ls-special "22.1") (defface eshell-ls-missing '((((class color) (background light)) (:foreground "Red" :weight bold)) (((class color) (background dark)) (:foreground "Red" :weight bold))) - "*The face used for highlighting non-existent file names." + "The face used for highlighting non-existent file names." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-missing-face 'eshell-ls-missing "22.1") (defcustom eshell-ls-archive-regexp (concat "\\.\\(t\\(a[rz]\\|gz\\)\\|arj\\|lzh\\|" - "zip\\|[zZ]\\|gz\\|bz2\\|deb\\|rpm\\)\\'") - "*A regular expression that matches names of file archives. + "zip\\|[zZ]\\|gz\\|bz2\\|xz\\|deb\\|rpm\\)\\'") + "A regular expression that matches names of file archives. This typically includes both traditional archives and compressed files." + :version "24.1" ; added xz :type 'regexp :group 'eshell-ls) (defface eshell-ls-archive '((((class color) (background light)) (:foreground "Orchid" :weight bold)) (((class color) (background dark)) (:foreground "Orchid" :weight bold))) - "*The face used for highlighting archived and compressed file names." + "The face used for highlighting archived and compressed file names." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-archive-face 'eshell-ls-archive "22.1") (defcustom eshell-ls-backup-regexp "\\(\\`\\.?#\\|\\(\\.bak\\|~\\)\\'\\)" - "*A regular expression that matches names of backup files." + "A regular expression that matches names of backup files." :type 'regexp :group 'eshell-ls) (defface eshell-ls-backup '((((class color) (background light)) (:foreground "OrangeRed")) (((class color) (background dark)) (:foreground "LightSalmon"))) - "*The face used for highlighting backup file names." + "The face used for highlighting backup file names." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-backup-face 'eshell-ls-backup "22.1") (defcustom eshell-ls-product-regexp "\\.\\(elc\\|o\\(bj\\)?\\|a\\|lib\\|res\\)\\'" - "*A regular expression that matches names of product files. + "A regular expression that matches names of product files. Products are files that get generated from a source file, and hence ought to be recreatable if they are deleted." :type 'regexp @@ -200,13 +201,13 @@ ought to be recreatable if they are deleted." (defface eshell-ls-product '((((class color) (background light)) (:foreground "OrangeRed")) (((class color) (background dark)) (:foreground "LightSalmon"))) - "*The face used for highlighting files that are build products." + "The face used for highlighting files that are build products." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-product-face 'eshell-ls-product "22.1") (defcustom eshell-ls-clutter-regexp "\\(^texput\\.log\\|^core\\)\\'" - "*A regular expression that matches names of junk files. + "A regular expression that matches names of junk files. These are mainly files that get created for various reasons, but don't really need to stick around for very long." :type 'regexp @@ -215,7 +216,7 @@ really need to stick around for very long." (defface eshell-ls-clutter '((((class color) (background light)) (:foreground "OrangeRed" :weight bold)) (((class color) (background dark)) (:foreground "OrangeRed" :weight bold))) - "*The face used for highlighting junk file names." + "The face used for highlighting junk file names." :group 'eshell-ls) (define-obsolete-face-alias 'eshell-ls-clutter-face 'eshell-ls-clutter "22.1") @@ -249,7 +250,7 @@ calling FUNC with FILE as an argument." (,(eval func) ,file))))) (defcustom eshell-ls-highlight-alist nil - "*This alist correlates test functions to color. + "This alist correlates test functions to color. The format of the members of this alist is (TEST-SEXP . FACE) diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index aee1b5437de..15a3deea30c 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -61,7 +61,7 @@ ordinary strings." ;;; User Variables: (defcustom eshell-pred-load-hook '(eshell-pred-initialize) - "*A list of functions to run when `eshell-pred' is loaded." + "A list of functions to run when `eshell-pred' is loaded." :type 'hook :group 'eshell-pred) @@ -101,7 +101,7 @@ ordinary strings." (?m . (eshell-pred-file-time ?m "modification" 5)) (?c . (eshell-pred-file-time ?c "change" 6)) (?L . (eshell-pred-file-size))) - "*A list of predicates than can be applied to a globbing pattern. + "A list of predicates than can be applied to a globbing pattern. The format of each entry is (CHAR . PREDICATE-FUNC-SEXP)" @@ -150,7 +150,7 @@ The format of each entry is (eshell-pred-substitute t) (error "`g' modifier cannot be used alone")))) (?s . (eshell-pred-substitute))) - "*A list of modifiers than can be applied to an argument expansion. + "A list of modifiers than can be applied to an argument expansion. The format of each entry is (CHAR ENTRYWISE-P MODIFIER-FUNC-SEXP)" diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index 6e8abd660d1..29e1ace26b1 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el @@ -39,7 +39,7 @@ as is common with most shells." ;;; User Variables: (defcustom eshell-prompt-load-hook '(eshell-prompt-initialize) - "*A list of functions to call when loading `eshell-prompt'." + "A list of functions to call when loading `eshell-prompt'." :type 'hook :group 'eshell-prompt) @@ -55,7 +55,7 @@ prompt." :group 'eshell-prompt) (defcustom eshell-prompt-regexp "^[^#$\n]* [#$] " - "*A regexp which fully matches your eshell prompt. + "A regexp which fully matches your eshell prompt. This setting is important, since it affects how eshell will interpret the lines that are passed to it. If this variable is changed, all Eshell buffers must be exited and @@ -64,7 +64,7 @@ re-entered for it to take effect." :group 'eshell-prompt) (defcustom eshell-highlight-prompt t - "*If non-nil, Eshell should highlight the prompt." + "If non-nil, Eshell should highlight the prompt." :type 'boolean :group 'eshell-prompt) @@ -72,20 +72,20 @@ re-entered for it to take effect." '((((class color) (background light)) (:foreground "Red" :bold t)) (((class color) (background dark)) (:foreground "Pink" :bold t)) (t (:bold t))) - "*The face used to highlight prompt strings. + "The face used to highlight prompt strings. For highlighting other kinds of strings -- similar to shell mode's behavior -- simply use an output filer which changes text properties." :group 'eshell-prompt) (define-obsolete-face-alias 'eshell-prompt-face 'eshell-prompt "22.1") (defcustom eshell-before-prompt-hook nil - "*A list of functions to call before outputting the prompt." + "A list of functions to call before outputting the prompt." :type 'hook :options '(eshell-begin-on-new-line) :group 'eshell-prompt) (defcustom eshell-after-prompt-hook nil - "*A list of functions to call after outputting the prompt. + "A list of functions to call after outputting the prompt. Note that if `eshell-scroll-show-maximum-output' is non-nil, then setting `eshell-show-maximum-output' here won't do much. It depends on whether the user wants the resizing to happen while output is diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el index ef60cf793a0..9b208d64803 100644 --- a/lisp/eshell/em-rebind.el +++ b/lisp/eshell/em-rebind.el @@ -43,7 +43,7 @@ the behavior of normal shells while the user editing new input text." ;;; User Variables: (defcustom eshell-rebind-load-hook '(eshell-rebind-initialize) - "*A list of functions to call when loading `eshell-rebind'." + "A list of functions to call when loading `eshell-rebind'." :type 'hook :group 'eshell-rebind) @@ -55,14 +55,14 @@ the behavior of normal shells while the user editing new input text." ([delete] . eshell-delete-backward-char) ([(control ?w)] . backward-kill-word) ([(control ?u)] . eshell-kill-input)) - "*Bind some keys differently if point is in input text." + "Bind some keys differently if point is in input text." :type '(repeat (cons (vector :tag "Keys to bind" (repeat :inline t sexp)) (function :tag "Command"))) :group 'eshell-rebind) (defcustom eshell-confine-point-to-input t - "*If non-nil, do not allow the point to leave the current input. + "If non-nil, do not allow the point to leave the current input. This is more difficult to do nicely in Emacs than one might think. Basically, the `point-left' attribute is added to the input text, and a function is placed on that hook to take the point back to @@ -77,13 +77,13 @@ people will left the point alone in the Eshell buffer. Sigh." :group 'eshell-rebind) (defcustom eshell-error-if-move-away t - "*If non-nil, consider it an error to try to move outside current input. + "If non-nil, consider it an error to try to move outside current input. This is default behavior of shells like bash." :type 'boolean :group 'eshell-rebind) (defcustom eshell-remap-previous-input t - "*If non-nil, remap input keybindings on previous prompts as well." + "If non-nil, remap input keybindings on previous prompts as well." :type 'boolean :group 'eshell-rebind) @@ -132,7 +132,7 @@ This is default behavior of shells like bash." forward-visible-line forward-comment forward-thing) - "*A list of commands that cannot leave the input area." + "A list of commands that cannot leave the input area." :type '(repeat function) :group 'eshell-rebind) diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el index 0371ee86b6d..183faa1dd77 100644 --- a/lisp/eshell/em-script.el +++ b/lisp/eshell/em-script.el @@ -36,19 +36,19 @@ commands, as a script file." ;;; User Variables: (defcustom eshell-script-load-hook '(eshell-script-initialize) - "*A list of functions to call when loading `eshell-script'." + "A list of functions to call when loading `eshell-script'." :type 'hook :group 'eshell-script) (defcustom eshell-login-script (expand-file-name "login" eshell-directory-name) - "*If non-nil, a file to invoke when starting up Eshell interactively. + "If non-nil, a file to invoke when starting up Eshell interactively. This file should be a file containing Eshell commands, where comment lines begin with '#'." :type 'file :group 'eshell-script) (defcustom eshell-rc-script (expand-file-name "profile" eshell-directory-name) - "*If non-nil, a file to invoke whenever Eshell is started. + "If non-nil, a file to invoke whenever Eshell is started. This includes when running `eshell-command'." :type 'file :group 'eshell-script) diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el index c9be839e12b..afe3cf826b1 100644 --- a/lisp/eshell/em-smart.el +++ b/lisp/eshell/em-smart.el @@ -86,7 +86,7 @@ it to get a real sense of how it works." ;;; User Variables: (defcustom eshell-smart-load-hook '(eshell-smart-initialize) - "*A list of functions to call when loading `eshell-smart'." + "A list of functions to call when loading `eshell-smart'." :type 'hook :group 'eshell-smart) @@ -96,12 +96,12 @@ it to get a real sense of how it works." (lambda () (remove-hook 'window-configuration-change-hook 'eshell-refresh-windows)))) - "*A hook that gets run when `eshell-smart' is unloaded." + "A hook that gets run when `eshell-smart' is unloaded." :type 'hook :group 'eshell-smart) (defcustom eshell-review-quick-commands nil - "*If t, always review commands. + "If t, always review commands. Reviewing means keeping point on the text of the command that was just invoked, to allow corrections to be made easily. @@ -124,12 +124,12 @@ only if that output can be presented in its entirely in the Eshell window." yank-pop yank-rectangle yank) - "*A list of commands which cause Eshell to jump to the end of buffer." + "A list of commands which cause Eshell to jump to the end of buffer." :type '(repeat function) :group 'eshell-smart) (defcustom eshell-smart-space-goes-to-end t - "*If non-nil, space will go to end of buffer when point-max is visible. + "If non-nil, space will go to end of buffer when point-max is visible. That is, if a command is running and the user presses SPACE at a time when the end of the buffer is visible, point will go to the end of the buffer and smart-display will be turned off (that is, subsequently @@ -148,7 +148,7 @@ buffer using \\[end-of-buffer]." :group 'eshell-smart) (defcustom eshell-where-to-jump 'begin - "*This variable indicates where point should jump to after a command. + "This variable indicates where point should jump to after a command. The options are `begin', `after' or `end'." :type '(radio (const :tag "Beginning of command" begin) (const :tag "After command word" after) diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el index 826e7ec0d05..bd27d9f262e 100644 --- a/lisp/eshell/em-term.el +++ b/lisp/eshell/em-term.el @@ -48,7 +48,7 @@ which commands are considered visual in nature." ;;; User Variables: (defcustom eshell-term-load-hook '(eshell-term-initialize) - "*A list of functions to call when loading `eshell-term'." + "A list of functions to call when loading `eshell-term'." :type 'hook :group 'eshell-term) @@ -58,19 +58,19 @@ which commands are considered visual in nature." "less" "more" ; M-x view-file "lynx" "ncftp" ; w3.el, ange-ftp "pine" "tin" "trn" "elm") ; GNUS!! - "*A list of commands that present their output in a visual fashion." + "A list of commands that present their output in a visual fashion." :type '(repeat string) :group 'eshell-term) (defcustom eshell-term-name "eterm" - "*Name to use for the TERM variable when running visual commands. + "Name to use for the TERM variable when running visual commands. See `term-term-name' in term.el for more information on how this is used." :type 'string :group 'eshell-term) (defcustom eshell-escape-control-x t - "*If non-nil, allow to be handled by Emacs key in visual buffers. + "If non-nil, allow to be handled by Emacs key in visual buffers. See the variable `eshell-visual-commands'. If this variable is set to nil, will send that control character to the invoked process." :type 'boolean diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 6ceb591e131..7d0ff22ceb6 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -55,84 +55,84 @@ by name)." :group 'eshell-module) (defcustom eshell-unix-load-hook '(eshell-unix-initialize) - "*A list of functions to run when `eshell-unix' is loaded." + "A list of functions to run when `eshell-unix' is loaded." :type 'hook :group 'eshell-unix) (defcustom eshell-plain-grep-behavior nil - "*If non-nil, standalone \"grep\" commands will behave normally. + "If non-nil, standalone \"grep\" commands will behave normally. Standalone in this context means not redirected, and not on the receiving side of a command pipeline." :type 'boolean :group 'eshell-unix) (defcustom eshell-no-grep-available (not (eshell-search-path "grep")) - "*If non-nil, no grep is available on the current machine." + "If non-nil, no grep is available on the current machine." :type 'boolean :group 'eshell-unix) (defcustom eshell-plain-diff-behavior nil - "*If non-nil, standalone \"diff\" commands will behave normally. + "If non-nil, standalone \"diff\" commands will behave normally. Standalone in this context means not redirected, and not on the receiving side of a command pipeline." :type 'boolean :group 'eshell-unix) (defcustom eshell-plain-locate-behavior (featurep 'xemacs) - "*If non-nil, standalone \"locate\" commands will behave normally. + "If non-nil, standalone \"locate\" commands will behave normally. Standalone in this context means not redirected, and not on the receiving side of a command pipeline." :type 'boolean :group 'eshell-unix) (defcustom eshell-rm-removes-directories nil - "*If non-nil, `rm' will remove directory entries. + "If non-nil, `rm' will remove directory entries. Otherwise, `rmdir' is required." :type 'boolean :group 'eshell-unix) (defcustom eshell-rm-interactive-query (= (user-uid) 0) - "*If non-nil, `rm' will query before removing anything." + "If non-nil, `rm' will query before removing anything." :type 'boolean :group 'eshell-unix) (defcustom eshell-mv-interactive-query (= (user-uid) 0) - "*If non-nil, `mv' will query before overwriting anything." + "If non-nil, `mv' will query before overwriting anything." :type 'boolean :group 'eshell-unix) (defcustom eshell-mv-overwrite-files t - "*If non-nil, `mv' will overwrite files without warning." + "If non-nil, `mv' will overwrite files without warning." :type 'boolean :group 'eshell-unix) (defcustom eshell-cp-interactive-query (= (user-uid) 0) - "*If non-nil, `cp' will query before overwriting anything." + "If non-nil, `cp' will query before overwriting anything." :type 'boolean :group 'eshell-unix) (defcustom eshell-cp-overwrite-files t - "*If non-nil, `cp' will overwrite files without warning." + "If non-nil, `cp' will overwrite files without warning." :type 'boolean :group 'eshell-unix) (defcustom eshell-ln-interactive-query (= (user-uid) 0) - "*If non-nil, `ln' will query before overwriting anything." + "If non-nil, `ln' will query before overwriting anything." :type 'boolean :group 'eshell-unix) (defcustom eshell-ln-overwrite-files nil - "*If non-nil, `ln' will overwrite files without warning." + "If non-nil, `ln' will overwrite files without warning." :type 'boolean :group 'eshell-unix) (defcustom eshell-default-target-is-dot nil - "*If non-nil, the default destination for cp, mv or ln is `.'." + "If non-nil, the default destination for cp, mv or ln is `.'." :type 'boolean :group 'eshell-unix) (defcustom eshell-du-prefer-over-ange nil - "*Use Eshell's du in ange-ftp remote directories. + "Use Eshell's du in ange-ftp remote directories. Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine." :type 'boolean :group 'eshell-unix) diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index ed335ab5fd4..0dc1cb26fa9 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -122,28 +122,28 @@ however." :group 'eshell) (defcustom eshell-prefer-lisp-functions nil - "*If non-nil, prefer Lisp functions to external commands." + "If non-nil, prefer Lisp functions to external commands." :type 'boolean :group 'eshell-cmd) (defcustom eshell-lisp-regexp "\\([(`]\\|#'\\)" - "*A regexp which, if matched at beginning of an argument, means Lisp. + "A regexp which, if matched at beginning of an argument, means Lisp. Such arguments will be passed to `read', and then evaluated." :type 'regexp :group 'eshell-cmd) (defcustom eshell-pre-command-hook nil - "*A hook run before each interactive command is invoked." + "A hook run before each interactive command is invoked." :type 'hook :group 'eshell-cmd) (defcustom eshell-post-command-hook nil - "*A hook run after each interactive command is invoked." + "A hook run after each interactive command is invoked." :type 'hook :group 'eshell-cmd) (defcustom eshell-prepare-command-hook nil - "*A set of functions called to prepare a named command. + "A set of functions called to prepare a named command. The command name and its argument are in `eshell-last-command-name' and `eshell-last-arguments'. The functions on this hook can change the value of these symbols if necessary. @@ -154,7 +154,7 @@ To prevent a command from executing at all, set :group 'eshell-cmd) (defcustom eshell-named-command-hook nil - "*A set of functions called before a named command is invoked. + "A set of functions called before a named command is invoked. Each function will be passed the command name and arguments that were passed to `eshell-named-command'. @@ -180,7 +180,7 @@ call to `cd' using the arguments that were passed to the function." (defcustom eshell-pre-rewrite-command-hook '(eshell-no-command-conversion eshell-subcommand-arg-values) - "*A hook run before command rewriting begins. + "A hook run before command rewriting begins. The terms of the command to be rewritten is passed as arguments, and may be modified in place. Any return value is ignored." :type 'hook @@ -193,7 +193,7 @@ may be modified in place. Any return value is ignored." eshell-rewrite-sexp-command eshell-rewrite-initial-subcommand eshell-rewrite-named-command) - "*A set of functions used to rewrite the command argument. + "A set of functions used to rewrite the command argument. Once parsing of a command line is completed, the next step is to rewrite the initial argument into something runnable. @@ -207,14 +207,14 @@ forms or strings)." :group 'eshell-cmd) (defcustom eshell-post-rewrite-command-hook nil - "*A hook run after command rewriting is finished. + "A hook run after command rewriting is finished. Each function is passed the symbol containing the rewritten command, which may be modified directly. Any return value is ignored." :type 'hook :group 'eshell-cmd) (defcustom eshell-complex-commands '("ls") - "*A list of commands names or functions, that determine complexity. + "A list of commands names or functions, that determine complexity. That is, if a command is defined by a function named eshell/NAME, and NAME is part of this list, it is invoked as a complex command. Complex commands are always correct, but run much slower. If a @@ -231,12 +231,12 @@ return non-nil if the command is complex." ;;; User Variables: (defcustom eshell-cmd-load-hook '(eshell-cmd-initialize) - "*A hook that gets run when `eshell-cmd' is loaded." + "A hook that gets run when `eshell-cmd' is loaded." :type 'hook :group 'eshell-cmd) (defcustom eshell-debug-command nil - "*If non-nil, enable debugging code. SSLLOOWW. + "If non-nil, enable debugging code. SSLLOOWW. This option is only useful for reporting bugs. If you enable it, you will have to visit the file 'eshell-cmd.el' and run the command \\[eval-buffer]." @@ -247,7 +247,7 @@ will have to visit the file 'eshell-cmd.el' and run the command '(eshell-named-command eshell-lisp-command eshell-process-identity) - "*A list of functions which might return an ansychronous process. + "A list of functions which might return an ansychronous process. If they return a process object, execution of the calling Eshell command will wait for completion (in the background) before finishing the command." @@ -258,7 +258,7 @@ the command." '((eshell-in-subcommand-p t) (default-directory default-directory) (process-environment (eshell-copy-environment))) - "*A list of `let' bindings for subcommand environments." + "A list of `let' bindings for subcommand environments." :type 'sexp :group 'eshell-cmd) diff --git a/lisp/eshell/esh-ext.el b/lisp/eshell/esh-ext.el index dba8665d9ae..8a3f86a3997 100644 --- a/lisp/eshell/esh-ext.el +++ b/lisp/eshell/esh-ext.el @@ -1,7 +1,7 @@ ;;; esh-ext.el --- commands external to Eshell -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: John Wiegley @@ -48,17 +48,17 @@ loaded into memory, thus beginning a new process." ;;; User Variables: (defcustom eshell-ext-load-hook '(eshell-ext-initialize) - "*A hook that gets run when `eshell-ext' is loaded." + "A hook that gets run when `eshell-ext' is loaded." :type 'hook :group 'eshell-ext) (defcustom eshell-binary-suffixes exec-suffixes - "*A list of suffixes used when searching for executable files." + "A list of suffixes used when searching for executable files." :type '(repeat string) :group 'eshell-ext) (defcustom eshell-force-execution nil - "*If non-nil, try to execute binary files regardless of permissions. + "If non-nil, try to execute binary files regardless of permissions. This can be useful on systems like Windows, where the operating system doesn't happen to honor the permission bits in certain cases; or in cases where you want to associate an interpreter with a particular @@ -96,7 +96,7 @@ since nothing else but Eshell will be able to understand (or (eshell-search-path "cmd.exe") (eshell-search-path "command.com")) shell-file-name)) - "*The name of the shell command to use for DOS/Windows batch files. + "The name of the shell command to use for DOS/Windows batch files. This defaults to nil on non-Windows systems, where this variable is wholly ignored." :type '(choice file (const nil)) @@ -113,7 +113,7 @@ wholly ignored." (defcustom eshell-interpreter-alist (if (eshell-under-windows-p) '(("\\.\\(bat\\|cmd\\)\\'" . eshell-invoke-batch-file))) - "*An alist defining interpreter substitutions. + "An alist defining interpreter substitutions. Each member is a cons cell of the form: (MATCH . INTERPRETER) @@ -134,7 +134,7 @@ possible return values of `eshell-external-command', which see." :group 'eshell-ext) (defcustom eshell-alternate-command-hook nil - "*A hook run whenever external command lookup fails. + "A hook run whenever external command lookup fails. If a functions wishes to provide an alternate command, they must throw it using the tag `eshell-replace-command'. This is done because the substituted command need not be external at all, and therefore must be @@ -147,12 +147,12 @@ by the user on the command line." :group 'eshell-ext) (defcustom eshell-command-interpreter-max-length 256 - "*The maximum length of any command interpreter string, plus args." + "The maximum length of any command interpreter string, plus args." :type 'integer :group 'eshell-ext) (defcustom eshell-explicit-command-char ?* - "*If this char occurs before a command name, call it externally. + "If this char occurs before a command name, call it externally. That is, although `vi' may be an alias, `\vi' will always call the external version." :type 'character diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index 3aa785c7c1b..53b6fd2163e 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -73,12 +73,12 @@ though they were files." ;;; User Variables: (defcustom eshell-io-load-hook '(eshell-io-initialize) - "*A hook that gets run when `eshell-io' is loaded." + "A hook that gets run when `eshell-io' is loaded." :type 'hook :group 'eshell-io) (defcustom eshell-number-of-handles 3 - "*The number of file handles that eshell supports. + "The number of file handles that eshell supports. Currently this is standard input, output and error. But even all of these Emacs does not currently support with asynchronous processes \(which is what eshell uses so that you can continue doing work in @@ -87,17 +87,17 @@ other buffers) ." :group 'eshell-io) (defcustom eshell-output-handle 1 - "*The index of the standard output handle." + "The index of the standard output handle." :type 'integer :group 'eshell-io) (defcustom eshell-error-handle 2 - "*The index of the standard error handle." + "The index of the standard error handle." :type 'integer :group 'eshell-io) (defcustom eshell-buffer-shorthand nil - "*If non-nil, a symbol name can be used for a buffer in redirection. + "If non-nil, a symbol name can be used for a buffer in redirection. If nil, redirecting to a buffer requires buffer name syntax. If this variable is set, redirection directly to Lisp symbols will be impossible. @@ -110,7 +110,7 @@ Example: :group 'eshell-io) (defcustom eshell-print-queue-size 5 - "*The size of the print queue, for doing buffered printing. + "The size of the print queue, for doing buffered printing. This is basically a speed enhancement, to avoid blocking the Lisp code from executing while Emacs is redisplaying." :type 'integer @@ -127,7 +127,7 @@ from executing while Emacs is redisplaying." (let ((x-select-enable-clipboard t)) (kill-new ""))) 'eshell-clipboard-append) t)) - "*Map virtual devices name to Emacs Lisp functions. + "Map virtual devices name to Emacs Lisp functions. If the user specifies any of the filenames above as a redirection target, the function in the second element will be called. diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index cc7f0df92ca..4477f138478 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -75,54 +75,54 @@ ;;; User Variables: (defcustom eshell-mode-unload-hook nil - "*A hook that gets run when `eshell-mode' is unloaded." + "A hook that gets run when `eshell-mode' is unloaded." :type 'hook :group 'eshell-mode) (defcustom eshell-mode-hook nil - "*A hook that gets run when `eshell-mode' is entered." + "A hook that gets run when `eshell-mode' is entered." :type 'hook :group 'eshell-mode) (defcustom eshell-first-time-mode-hook nil - "*A hook that gets run the first time `eshell-mode' is entered. + "A hook that gets run the first time `eshell-mode' is entered. That is to say, the first time during an Emacs session." :type 'hook :group 'eshell-mode) (defcustom eshell-exit-hook '(eshell-query-kill-processes) - "*A hook that is run whenever `eshell' is exited. + "A hook that is run whenever `eshell' is exited. This hook is only run if exiting actually kills the buffer." :type 'hook :group 'eshell-mode) (defcustom eshell-kill-on-exit t - "*If non-nil, kill the Eshell buffer on the `exit' command. + "If non-nil, kill the Eshell buffer on the `exit' command. Otherwise, the buffer will simply be buried." :type 'boolean :group 'eshell-mode) (defcustom eshell-input-filter-functions nil - "*Functions to call before input is processed. + "Functions to call before input is processed. The input is contained in the region from `eshell-last-input-start' to `eshell-last-input-end'." :type 'hook :group 'eshell-mode) (defcustom eshell-send-direct-to-subprocesses nil - "*If t, send any input immediately to a subprocess." + "If t, send any input immediately to a subprocess." :type 'boolean :group 'eshell-mode) (defcustom eshell-expand-input-functions nil - "*Functions to call before input is parsed. + "Functions to call before input is parsed. Each function is passed two arguments, which bounds the region of the current input text." :type 'hook :group 'eshell-mode) (defcustom eshell-scroll-to-bottom-on-input nil - "*Controls whether input to interpreter causes window to scroll. + "Controls whether input to interpreter causes window to scroll. If nil, then do not scroll. If t or `all', scroll all windows showing buffer. If `this', scroll only the selected window. @@ -133,7 +133,7 @@ See `eshell-preinput-scroll-to-bottom'." :group 'eshell-mode) (defcustom eshell-scroll-to-bottom-on-output nil - "*Controls whether interpreter output causes window to scroll. + "Controls whether interpreter output causes window to scroll. If nil, then do not scroll. If t or `all', scroll all windows showing buffer. If `this', scroll only the selected window. If `others', scroll only those that are not the selected window. @@ -147,7 +147,7 @@ See variable `eshell-scroll-show-maximum-output' and function :group 'eshell-mode) (defcustom eshell-scroll-show-maximum-output t - "*Controls how interpreter output causes window to scroll. + "Controls how interpreter output causes window to scroll. If non-nil, then show the maximum output when the window is scrolled. See variable `eshell-scroll-to-bottom-on-output' and function @@ -156,7 +156,7 @@ See variable `eshell-scroll-to-bottom-on-output' and function :group 'eshell-mode) (defcustom eshell-buffer-maximum-lines 1024 - "*The maximum size in lines for eshell buffers. + "The maximum size in lines for eshell buffers. Eshell buffers are truncated from the top to be no greater than this number, if the function `eshell-truncate-buffer' is on `eshell-output-filter-functions'." @@ -168,14 +168,14 @@ number, if the function `eshell-truncate-buffer' is on eshell-handle-control-codes eshell-handle-ansi-color eshell-watch-for-password-prompt) - "*Functions to call before output is displayed. + "Functions to call before output is displayed. These functions are only called for output that is displayed interactively, and not for output which is redirected." :type 'hook :group 'eshell-mode) (defcustom eshell-preoutput-filter-functions nil - "*Functions to call before output is inserted into the buffer. + "Functions to call before output is inserted into the buffer. These functions get one argument, a string containing the text to be inserted. They return the string as it should be inserted." :type 'hook @@ -183,18 +183,18 @@ inserted. They return the string as it should be inserted." (defcustom eshell-password-prompt-regexp "[Pp]ass\\(word\\|phrase\\).*:\\s *\\'" - "*Regexp matching prompts for passwords in the inferior process. + "Regexp matching prompts for passwords in the inferior process. This is used by `eshell-watch-for-password-prompt'." :type 'regexp :group 'eshell-mode) (defcustom eshell-skip-prompt-function nil - "*A function called from beginning of line to skip the prompt." + "A function called from beginning of line to skip the prompt." :type '(choice (const nil) function) :group 'eshell-mode) (defcustom eshell-status-in-modeline t - "*If non-nil, let the user know a command is running in the modeline." + "If non-nil, let the user know a command is running in the modeline." :type 'boolean :group 'eshell-mode) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 4fef82b46d5..ccc36ed9949 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -1,7 +1,7 @@ ;;; esh-proc.el --- process management -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: John Wiegley @@ -40,27 +40,27 @@ finish." ;;; User Variables: (defcustom eshell-proc-load-hook '(eshell-proc-initialize) - "*A hook that gets run when `eshell-proc' is loaded." + "A hook that gets run when `eshell-proc' is loaded." :type 'hook :group 'eshell-proc) (defcustom eshell-process-wait-seconds 0 - "*The number of seconds to delay waiting for a synchronous process." + "The number of seconds to delay waiting for a synchronous process." :type 'integer :group 'eshell-proc) (defcustom eshell-process-wait-milliseconds 50 - "*The number of milliseconds to delay waiting for a synchronous process." + "The number of milliseconds to delay waiting for a synchronous process." :type 'integer :group 'eshell-proc) (defcustom eshell-done-messages-in-minibuffer t - "*If non-nil, subjob \"Done\" messages will display in minibuffer." + "If non-nil, subjob \"Done\" messages will display in minibuffer." :type 'boolean :group 'eshell-proc) (defcustom eshell-delete-exited-processes t - "*If nil, process entries will stick around until `jobs' is run. + "If nil, process entries will stick around until `jobs' is run. This variable sets the buffer-local value of `delete-exited-processes' in Eshell buffers. @@ -81,12 +81,12 @@ variable's value to take effect." (defcustom eshell-reset-signals "^\\(interrupt\\|killed\\|quit\\|stopped\\)" - "*If a termination signal matches this regexp, the terminal will be reset." + "If a termination signal matches this regexp, the terminal will be reset." :type 'regexp :group 'eshell-proc) (defcustom eshell-exec-hook nil - "*Called each time a process is exec'd by `eshell-gather-process-output'. + "Called each time a process is exec'd by `eshell-gather-process-output'. It is passed one argument, which is the process that was just started. It is useful for things that must be done each time a process is executed in a eshell mode buffer (e.g., `process-kill-without-query'). @@ -96,7 +96,7 @@ is created." :group 'eshell-proc) (defcustom eshell-kill-hook '(eshell-reset-after-proc) - "*Called when a process run by `eshell-gather-process-output' has ended. + "Called when a process run by `eshell-gather-process-output' has ended. It is passed two arguments: the process that was just ended, and the termination status (as a string). Note that the first argument may be nil, in which case the user attempted to send a signal, but there was @@ -418,12 +418,12 @@ If QUERY is non-nil, query the user with QUERY before calling FUNC." result)) (defcustom eshell-kill-process-wait-time 5 - "*Seconds to wait between sending termination signals to a subprocess." + "Seconds to wait between sending termination signals to a subprocess." :type 'integer :group 'eshell-proc) (defcustom eshell-kill-process-signals '(SIGINT SIGQUIT SIGKILL) - "*Signals used to kill processes when an Eshell buffer exits. + "Signals used to kill processes when an Eshell buffer exits. Eshell calls each of these signals in order when an Eshell buffer is killed; if the process is still alive afterwards, Eshell waits a number of seconds defined by `eshell-kill-process-wait-time', and @@ -432,7 +432,7 @@ tries the next signal in the list." :group 'eshell-proc) (defcustom eshell-kill-processes-on-exit nil - "*If non-nil, kill active processes when exiting an Eshell buffer. + "If non-nil, kill active processes when exiting an Eshell buffer. Emacs will only kill processes owned by that Eshell buffer. If nil, ownership of background and foreground processes reverts to diff --git a/lisp/eshell/esh-test.el b/lisp/eshell/esh-test.el index 5bce6072f0a..971d0cd63e6 100644 --- a/lisp/eshell/esh-test.el +++ b/lisp/eshell/esh-test.el @@ -43,7 +43,7 @@ (defface eshell-test-ok '((((class color) (background light)) (:foreground "Green" :bold t)) (((class color) (background dark)) (:foreground "Green" :bold t))) - "*The face used to highlight OK result strings." + "The face used to highlight OK result strings." :group 'eshell-test) (define-obsolete-face-alias 'eshell-test-ok-face 'eshell-test-ok "22.1") @@ -51,12 +51,12 @@ '((((class color) (background light)) (:foreground "OrangeRed" :bold t)) (((class color) (background dark)) (:foreground "OrangeRed" :bold t)) (t (:bold t))) - "*The face used to highlight FAILED result strings." + "The face used to highlight FAILED result strings." :group 'eshell-test) (define-obsolete-face-alias 'eshell-test-failed-face 'eshell-test-failed "22.1") (defcustom eshell-show-usage-metrics nil - "*If non-nil, display different usage metrics for each Eshell command." + "If non-nil, display different usage metrics for each Eshell command." :set (lambda (symbol value) (if value (add-hook 'eshell-mode-hook 'eshell-show-usage-metrics) diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 1a4c5e1021b..377fd6b08e4 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -32,7 +32,7 @@ ;;; User Variables: (defcustom eshell-stringify-t t - "*If non-nil, the string representation of t is 't'. + "If non-nil, the string representation of t is 't'. If nil, t will be represented only in the exit code of the function, and not printed as a string. This causes Lisp functions to behave similarly to external commands, as far as successful result output." @@ -40,44 +40,45 @@ similarly to external commands, as far as successful result output." :group 'eshell-util) (defcustom eshell-group-file "/etc/group" - "*If non-nil, the name of the group file on your system." + "If non-nil, the name of the group file on your system." :type '(choice (const :tag "No group file" nil) file) :group 'eshell-util) (defcustom eshell-passwd-file "/etc/passwd" - "*If non-nil, the name of the passwd file on your system." + "If non-nil, the name of the passwd file on your system." :type '(choice (const :tag "No passwd file" nil) file) :group 'eshell-util) (defcustom eshell-hosts-file "/etc/hosts" - "*The name of the /etc/hosts file." + "The name of the /etc/hosts file." :type '(choice (const :tag "No hosts file" nil) file) :group 'eshell-util) (defcustom eshell-handle-errors t - "*If non-nil, Eshell will handle errors itself. + "If non-nil, Eshell will handle errors itself. Setting this to nil is offered as an aid to debugging only." :type 'boolean :group 'eshell-util) (defcustom eshell-private-file-modes 384 ; umask 177 - "*The file-modes value to use for creating \"private\" files." + "The file-modes value to use for creating \"private\" files." :type 'integer :group 'eshell-util) (defcustom eshell-private-directory-modes 448 ; umask 077 - "*The file-modes value to use for creating \"private\" directories." + "The file-modes value to use for creating \"private\" directories." :type 'integer :group 'eshell-util) (defcustom eshell-tar-regexp - "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" - "*Regular expression used to match tar file names." + "\\.t\\(ar\\(\\.\\(gz\\|bz2\\|xz\\|Z\\)\\)?\\|gz\\|a[zZ]\\|z2\\)\\'" + "Regular expression used to match tar file names." + :version "24.1" ; added xz :type 'regexp :group 'eshell-util) (defcustom eshell-convert-numeric-arguments t - "*If non-nil, converting arguments of numeric form to Lisp numbers. + "If non-nil, converting arguments of numeric form to Lisp numbers. Numeric form is tested using the regular expression `eshell-number-regexp'. @@ -95,7 +96,7 @@ argument matches `eshell-number-regexp'." :group 'eshell-util) (defcustom eshell-number-regexp "-?\\([0-9]*\\.\\)?[0-9]+\\(e[-0-9.]+\\)?" - "*Regular expression used to match numeric arguments. + "Regular expression used to match numeric arguments. If `eshell-convert-numeric-arguments' is non-nil, and an argument matches this regexp, it will be converted to a Lisp number, using the function `string-to-number'." @@ -103,7 +104,7 @@ function `string-to-number'." :group 'eshell-util) (defcustom eshell-ange-ls-uids nil - "*List of user/host/id strings, used to determine remote ownership." + "List of user/host/id strings, used to determine remote ownership." :type '(repeat (cons :tag "Host for User/UID map" (string :tag "Hostname") (repeat (cons :tag "User/UID List" diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index 1610c53d428..f76d1de3c8d 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -1,7 +1,7 @@ ;;; esh-var.el --- handling of variables -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008, 2009, 2010 Free Software Foundation, Inc. ;; Author: John Wiegley @@ -128,27 +128,27 @@ variable value, a subcommand, or even the result of a Lisp form." ;;; User Variables: (defcustom eshell-var-load-hook '(eshell-var-initialize) - "*A list of functions to call when loading `eshell-var'." + "A list of functions to call when loading `eshell-var'." :type 'hook :group 'eshell-var) (defcustom eshell-prefer-lisp-variables nil - "*If non-nil, prefer Lisp variables to environment variables." + "If non-nil, prefer Lisp variables to environment variables." :type 'boolean :group 'eshell-var) (defcustom eshell-complete-export-definition t - "*If non-nil, completing names for `export' shows current definition." + "If non-nil, completing names for `export' shows current definition." :type 'boolean :group 'eshell-var) (defcustom eshell-modify-global-environment nil - "*If non-nil, using `export' changes Emacs's global environment." + "If non-nil, using `export' changes Emacs's global environment." :type 'boolean :group 'eshell-var) (defcustom eshell-variable-name-regexp "[A-Za-z0-9_-]+" - "*A regexp identifying what constitutes a variable name reference. + "A regexp identifying what constitutes a variable name reference. Note that this only applies for '$NAME'. If the syntax '$' is used, then NAME can contain any character, including angle brackets, if they are quoted with a backslash." @@ -183,7 +183,7 @@ if they are quoted with a backslash." eshell-command-arguments (eshell-apply-indices eshell-command-arguments indices))))) - "*This list provides aliasing for variable references. + "This list provides aliasing for variable references. It is very similar in concept to what `eshell-user-aliases-list' does for commands. Each member of this defines defines the name of a command, and the Lisp value to return for that variable if it is diff --git a/lisp/files.el b/lisp/files.el index ef74b54ca60..40627f690f8 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1,18 +1,3 @@ -;; (defun auto-save-mode (arg) -;; "Toggle auto-saving of contents of current buffer. -;; With prefix argument ARG, turn auto-saving on if positive, else off." -;; (interactive) -;; (if (> arg 0) auto-save (null auto-save))) - - -;; (defun auto-fill-mode (arg) -;; "Toggle Auto Fill mode. -;; With ARG, turn Auto Fill mode on if and only if ARG is positive. -;; In Auto Fill mode, inserting a space at a column beyond `current-fill-column' -;; automatically breaks the line at a previous space." -;; (interactive) -;; (if (> arg 0) auto-fill (null auto-fill))) - ;;; files.el --- file input and output commands for Emacs ;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994, 1995, 1996, @@ -2226,6 +2211,15 @@ since only a single case-insensitive search through the alist is made." (cons (purecopy (car elt)) (cdr elt))) `(;; do this first, so that .html.pl is Polish html, not Perl ("\\.s?html?\\(\\.[a-zA-Z_]+\\)?\\'" . html-mode) + ("\\.svgz?\\'" . image-mode) + ("\\.svgz?\\'" . xml-mode) + ("\\.x[bp]m\\'" . image-mode) + ("\\.x[bp]m\\'" . c-mode) + ("\\.p[bpgn]m\\'" . image-mode) + ("\\.tiff?\\'" . image-mode) + ("\\.gif\\'" . image-mode) + ("\\.png\\'" . image-mode) + ("\\.jpe?g\\'" . image-mode) ("\\.te?xt\\'" . text-mode) ("\\.[tT]e[xX]\\'" . tex-mode) ("\\.ins\\'" . tex-mode) ;Installation files for TeX packages. @@ -2261,6 +2255,14 @@ since only a single case-insensitive search through the alist is made." ("\\.te?xi\\'" . texinfo-mode) ("\\.[sS]\\'" . asm-mode) ("\\.asm\\'" . asm-mode) + ("\\.css\\'" . css-mode) + ("\\.mixal\\'" . mixal-mode) + ("\\.gcov\\'" . compilation-mode) + ;; Besides .gdbinit, gdb documents other names to be usable for init + ;; files, cross-debuggers can use something like + ;; .PROCESSORNAME-gdbinit so that the host and target gdbinit files + ;; don't interfere with each other. + ("/\\.[a-z0-9-]*gdbinit" . gdb-script-mode) ("[cC]hange\\.?[lL]og?\\'" . change-log-mode) ("[cC]hange[lL]og[-.][0-9]+\\'" . change-log-mode) ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) @@ -2277,6 +2279,7 @@ since only a single case-insensitive search through the alist is made." ("\\.cl[so]\\'" . latex-mode) ;LaTeX 2e class option ("\\.bbl\\'" . latex-mode) ("\\.bib\\'" . bibtex-mode) + ("\\.bst\\'" . bibtex-style-mode) ("\\.sql\\'" . sql-mode) ("\\.m[4c]\\'" . m4-mode) ("\\.mf\\'" . metafont-mode) @@ -2325,6 +2328,20 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode) ("[:/]_emacs\\'" . emacs-lisp-mode) ("/crontab\\.X*[0-9]+\\'" . shell-script-mode) ("\\.ml\\'" . lisp-mode) + ;; Linux-2.6.9 uses some different suffix for linker scripts: + ;; "ld", "lds", "lds.S", "lds.in", "ld.script", and "ld.script.balo". + ;; eCos uses "ld" and "ldi". Netbsd uses "ldscript.*". + ("\\.ld[si]?\\'" . ld-script-mode) + ("ld\\.?script\\'" . ld-script-mode) + ;; .xs is also used for ld scripts, but seems to be more commonly + ;; associated with Perl .xs files (C with Perl bindings). (Bug#7071) + ("\\.xs\\'" . c-mode) + ;; Explained in binutils ld/genscripts.sh. Eg: + ;; A .x script file is the default script. + ;; A .xr script is for linking without relocation (-r flag). Etc. + ("\\.x[abdsru]?[cnw]?\\'" . ld-script-mode) + ("\\.zone\\'" . dns-mode) + ("\\.soa\\'" . dns-mode) ;; Common Lisp ASDF package system. ("\\.asd\\'" . lisp-mode) ("\\.\\(asn\\|mib\\|smi\\)\\'" . snmp-mode) @@ -5605,22 +5622,17 @@ returns nil." directory-free-space-args dir) 0))) - ;; Usual format is as follows: - ;; Filesystem ... Used Available Capacity ... - ;; /dev/sda6 ...48106535 35481255 10669850 ... + ;; Assume that the "available" column is before the + ;; "capacity" column. Find the "%" and scan backward. (goto-char (point-min)) - (when (re-search-forward " +Avail[^ \n]*" - (line-end-position) t) - (let ((beg (match-beginning 0)) - (end (match-end 0)) - str) - (forward-line 1) - (setq str - (buffer-substring-no-properties - (+ beg (point) (- (point-min))) - (+ end (point) (- (point-min))))) - (when (string-match "\\` *\\([^ ]+\\)" str) - (match-string 1 str)))))))))) + (forward-line 1) + (when (re-search-forward + "[[:space:]]+[^[:space:]]+%[^%]*$" + (line-end-position) t) + (goto-char (match-beginning 0)) + (let ((endpt (point))) + (skip-chars-backward "^[:space:]") + (buffer-substring-no-properties (point) endpt))))))))) ;; The following expression replaces `dired-move-to-filename-regexp'. (defvar directory-listing-before-filename-regexp diff --git a/lisp/filesets.el b/lisp/filesets.el index b7e37a8ca33..d530269bae3 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -348,7 +348,7 @@ See `add-submenu' for documentation." :group 'filesets) ;;(defcustom filesets-menu-cnvfp-flag nil -;; "*Non-nil means show \"Convert :pattern to :files\" entry for :pattern menus." +;; "Non-nil means show \"Convert :pattern to :files\" entry for :pattern menus." ;; :set (function filesets-set-default!) ;; :type 'boolean ;; :group 'filesets) diff --git a/lisp/finder.el b/lisp/finder.el index 0c12a08d104..8471edd57ff 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -278,7 +278,7 @@ from; the default is `load-path'." help-echo finder-help-echo)))) (defun finder-unknown-keywords () - "Return an alist of unknown keywords and number of their occurences. + "Return an alist of unknown keywords and number of their occurrences. Unknown keywords are those present in `finder-keywords-hash' but not `finder-known-keywords'." (let (alist) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 92c62010848..6c316f5f958 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -564,6 +564,8 @@ outside of any comment, string, or sexp. This variable is semi-obsolete; we recommend setting `syntax-begin-function' instead. This is normally set via `font-lock-defaults'.") +(make-obsolete-variable 'font-lock-beginning-of-syntax-function + 'syntax-begin-function "23.3") (defvar font-lock-mark-block-function nil "*Non-nil means use this function to mark a block of text. diff --git a/lisp/frame.el b/lisp/frame.el index 7a12c9fc2e0..44ac5c0e81d 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -907,15 +907,16 @@ Calls `suspend-emacs' if invoked from the controlling tty device, (t (suspend-emacs))))) (defun make-frame-names-alist () + ;; Only consider the frames on the same display. (let* ((current-frame (selected-frame)) (falist (cons (cons (frame-parameter current-frame 'name) current-frame) nil)) - (frame (next-frame nil t))) + (frame (next-frame nil 0))) (while (not (eq frame current-frame)) (progn - (setq falist (cons (cons (frame-parameter frame 'name) frame) falist)) - (setq frame (next-frame frame t)))) + (push (cons (frame-parameter frame 'name) frame) falist) + (setq frame (next-frame frame 0)))) falist)) (defvar frame-name-history nil) diff --git a/lisp/fringe.el b/lisp/fringe.el index 600ef7ca1e1..6f5f496e907 100644 --- a/lisp/fringe.el +++ b/lisp/fringe.el @@ -136,6 +136,14 @@ See `fringe-mode' for possible values and their effect." ;; Otherwise impose the user-specified value of fringe-mode. (custom-initialize-reset symbol value)))) +(defconst fringe-styles + '(("default" . nil) + ("no-fringes" . 0) + ("right-only" . (0 . nil)) + ("left-only" . (nil . 0)) + ("half-width" . (4 . 4)) + ("minimal" . (1 . 1)))) + (defcustom fringe-mode nil "Specify appearance of fringes on all frames. This variable can be nil (the default) meaning the fringes should have @@ -144,21 +152,27 @@ the width of both left and right fringe (where 0 means no fringe), or a cons cell where car indicates width of left fringe and cdr indicates width of right fringe (where again 0 can be used to indicate no fringe). +Note that the actual width may be rounded up to ensure that the sum of +the width of the left and right fringes is a multiple of the frame's +character width. However, a fringe width of 0 is never rounded. To set this variable in a Lisp program, use `set-fringe-mode' to make it take real effect. Setting the variable with a customization buffer also takes effect. If you only want to modify the appearance of the fringe in one frame, you can use the interactive function `set-fringe-style'." - :type '(choice (const :tag "Default width" nil) - (const :tag "No fringes" 0) - (const :tag "Only right" (0 . nil)) - (const :tag "Only left" (nil . 0)) - (const :tag "Half width" (5 . 5)) - (const :tag "Minimal" (1 . 1)) - (integer :tag "Specific width") - (cons :tag "Different left/right sizes" - (integer :tag "Left width") - (integer :tag "Right width"))) + :type `(choice + ,@ (mapcar (lambda (style) + (let ((name + (replace-regexp-in-string "-" " " (car style)))) + `(const :tag + ,(concat (capitalize (substring name 0 1)) + (substring name 1)) + ,(cdr style)))) + fringe-styles) + (integer :tag "Specific width") + (cons :tag "Different left/right sizes" + (integer :tag "Left width") + (integer :tag "Right width"))) :group 'fringe :require 'fringe :initialize 'fringe-mode-initialize @@ -175,27 +189,20 @@ If ALL-FRAMES, the negation of the fringe values in `default-frame-alist' is used when user enters the empty string. Otherwise the negation of the fringe value in the currently selected frame parameter is used." - (let ((mode (intern (completing-read - (concat - "Select fringe mode for " - (if all-frames "all frames" "selected frame") - " (type ? for list): ") - '(("none") ("default") ("left-only") - ("right-only") ("half") ("minimal")) - nil t)))) - (cond ((eq mode 'none) 0) - ((eq mode 'default) nil) - ((eq mode 'left-only) '(nil . 0)) - ((eq mode 'right-only) '(0 . nil)) - ((eq mode 'half) '(5 . 5)) - ((eq mode 'minimal) '(1 . 1)) - ((eq mode (intern "")) - (if (eq 0 (cdr (assq 'left-fringe - (if all-frames - default-frame-alist - (frame-parameters (selected-frame)))))) - nil - 0))))) + (let* ((mode (completing-read + (concat + "Select fringe mode for " + (if all-frames "all frames" "selected frame") + " (type ? for list): ") + fringe-styles nil t)) + (style (assoc (downcase mode) fringe-styles))) + (if style (cdr style) + (if (eq 0 (cdr (assq 'left-fringe + (if all-frames + default-frame-alist + (frame-parameters (selected-frame)))))) + nil + 0)))) (defun fringe-mode (&optional mode) "Set the default appearance of fringes on all frames. diff --git a/lisp/gnus/.dir-locals.el b/lisp/gnus/.dir-locals.el index 45abc391e62..fb968e13a36 100644 --- a/lisp/gnus/.dir-locals.el +++ b/lisp/gnus/.dir-locals.el @@ -1 +1,4 @@ ((emacs-lisp-mode . ((show-trailing-whitespace . t)))) +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7dca7730828..fc93281f00b 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,1167 @@ +2010-09-29 Stefan Monnier + + * nnmail.el (group, group-art-list, group-art): + Remove unneeded directives. + +2010-09-29 Katsumi Yamaoka + + * mm-util.el (mm-codepage-iso-8859-list, mm-charset-eval-alist) + (mm-mime-charset) + * rfc2047.el (rfc2047-syntax-table) + * utf7.el (utf7-utf-16-coding-system): Comment fix. + + * nnrss.el (nnrss-read-server-data, nnrss-read-group-data): Use `load' + rather than `insert-file-contents' and `eval-region'. + +2010-09-28 Katsumi Yamaoka + + * mail-source.el (mail-source-report-new-mail) + * message.el (message-default-mail-headers) + * mm-decode.el (mm-valid-image-format-p): Comment fix. + + * mml2015.el (mml2015-use): Don't bind recursive-load-depth-limit. + +2010-09-28 Julien Danjou + + * gnus-gravatar.el (gnus-gravatar-insert): Fix search in case + mail-address contains the same string as real-name. + + * gnus-ems.el (gnus-put-image): Revert Lars, change and insert + non-blank in header, otherwise it'll get stripped. + + * gnus-gravatar.el (gnus-gravatar-insert): Search backward for + real-name, and then for mail address rather than doing : or , search. + +2010-09-28 Katsumi Yamaoka + + * nnimap.el (auth-source-forget-user-or-password) + (auth-source-user-or-password): Autoload. + + * message.el (message-from-style, message-interactive) + (message-signature): Remove comment. + (message-cite-prefix-regexp): Default to mail-citation-prefix-regexp + always. + (message-sendmail-envelope-from): Comment fix. + (message-yank-prefix): Default to mail-yank-prefix always. + (message-indentation-spaces): Default to mail-indentation-spaces always. + (message-signature-file): Default to mail-signature-file always. + +2010-09-27 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-read-group-1): Set gnus-newsgroup-highest. + (gnus-summary-insert-new-articles): Use gnus-newsgroup-highest to get + new articles. + + * nnimap.el (nnimap-request-article): Don't partial-fetch single-part + parts. + (nnimap-request-article): Work with the t setting, too. + + * gnus-sum.el (gnus-summary-exit): Kill the article buffer later, so + that you don't get flashes of other buffers. + (gnus-summary-show-complete-article): Intern before setting. + +2010-09-27 David Engster + + * nnmairix.el: (nnmairix-replace-group-and-numbers): Deal with NOV as + well as HEADERS. + (nnmairix-retrieve-headers): Provide new argument for the above. + +2010-09-27 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-move-article): Don't alter + gnus-newsgroup-active. This makes `/ N' work after copying to the same + group. + + * nnimap.el (nnimap-update-info): Don't destructively alter active. + + * message.el (message-cite-prefix-regexp): Revert my last edit. + + * gnus-sum.el (gnus-summary-show-complete-article): Bind the server + variable instead of the Gnus variable. + + * nnimap.el (nnimap-find-wanted-parts-1): Use it. + + * gnus-art.el (gnus-fetch-partial-articles): Moved back to nnimap + again. + + * nnimap.el (nnimap-request-accept-article): Remove the "." at the end, + since some servers don't like it. + (nnimap-open-connection): Forget credentials if the server says the + password was wrong. + (nnimap-parse-line): Protect against invalid data. + + * gnus-sum.el (gnus-summary-move-article): Add comment. + (gnus-summary-insert-new-articles): Copy the old-high watermark so that + nothing alters it while scanning for new messages. + + * nnimap.el (nnimap-request-accept-article): Send a "." at the end, + which may or may not help. + (nnimap-open-connection): If we're doing a stream connection, and then + discover we're on a STARTTLS-capable server, then open a STARTTLS + connection instead. + +2010-09-27 Florian Ragwitz (tiny change) + + * sieve-manage.el (sieve-manage-default-stream): Make default stream + customizable. + +2010-09-27 Lars Magne Ingebrigtsen + + * nnimap.el (utf7): Required. + + * message.el (message-cite-prefix-regexp): Remove "}" from citation + prefix. + +2010-09-27 Juanma Barranquero + + * nnmail.el (nnmail-fancy-expiry-targets): Fix typo in docstring. + +2010-09-27 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-request-accept-article): Message the error on + error. + +2010-09-27 Katsumi Yamaoka + + * gnus-art.el (gnus-mime-delete-part): Fix Lisp type of byte(s). + +2010-09-26 Florian Ragwitz (tiny change) + + * gnus-html.el (gnus-html-wash-tags): Decode URL entities to avoid + handing broken links to browse-url. + +2010-09-26 Lars Magne Ingebrigtsen + + * nndoc.el (nndoc-request-list): Return success always. + + * gnus-agent.el (gnus-agent-retrieve-headers): Don't propagate + `fetch-old' -- we only want to fetch the articles we've requested. The + rest are in the agent, probably. + (gnus-agent-read-servers-validate): Change the level for the "Ignoring + disappeared server" to something low. It's not important. + + * nnimap.el (nnimap-get-whole-article): Remove the data that may have + arrived before the FETCH data. + + * nnmh.el (nnmh-request-expire-articles): Don't try to fetch the expiry + target here, because we don't know the Gnus name of the group. + + * nndraft.el (nndraft-request-expire-articles): Fetch the expiry target + for the correct group. + + * gnus-ems.el (gnus-create-image): Ignore all image-creation errors. + + * gnus.el (gnus): Give a final warning after startup. + + * gnus-util.el (gnus-action-message-log): New variable. + (gnus-message): Use it. + (gnus-final-warning): New function. + + * nnimap.el (nnimap-open-connection): Record the greeting. + (nnimap): Add greeting. + +2010-09-26 Julien Danjou + + * gnus-html.el (gnus-html-show-images): Fix gnus-html-display-image + arguments. + (gnus-html-wash-images): Fix spec computing to include start/end. + + * gnus-art.el (gnus-article-treat-body-boundary): Fix length computing. + +2010-09-26 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-request-expire-articles): Compress ranges before + deletion. + (nnimap-retrieve-headers): Don't select the group, because that's + already done by nnimap-possibly-change-group. + + * gnus-picon.el (gnus-picon-inhibit-top-level-domains): New variable. + (gnus-picon-transform-address): Use it. + + * mail-source.el (mail-source-value): Revert previous patch. + + * nnimap.el (nnimap-credentials): Allow inhibiting the password query + on failure. + (nnimap-open-connection): Look up both virtual and physical server name + credentials. + + * gnus-win.el: Revert previous patch, since it made Gnus backtrace. + +2009-02-08 Dave Love + + * gnus-win.el (gnus-window-to-buffer-helper, + gnus-all-windows-visible-p): Function needn't be a symbol. + + * mail-source.el (mail-source-value): Function needn't be a symbol. + +2010-09-26 Lars Magne Ingebrigtsen + + * message.el (message-cite-prefix-regexp): Remove } from the cite + prefix. + + * gnus-art.el (gnus-treatment-function-alist): Do picons before + highlight again, so that the highlight is correct. + + * gnus-picon.el (gnus-picon): Remove again. + (gnus-picon-create-glyph): Set the background XPM colour explicitly. + + * gnus-art.el (gnus-treatment-function-alist): Insert picons after + doing the header highlightling, so that the background colour of the + picon is correct. + + * gnus-picon.el (gnus-picon-xbm): Removed obsolete face. + (gnus-picon): Ditto. + (gnus-picon): Reinstate. The background colour for picons is white. + (gnus-picon-insert-glyph): Make the background white. + + * nnml.el (nnml-open-nov): Don't return dead buffers. + + * auth-source.el (auth-source-create): Query the user for whether to + store the credentials. + + * auth-source.el (auth-source-user-or-password): Use the existing auth + sources, if any, for creation. + + * gnus.el (gnus-group-fast-parameter): Return the last matching + parameter instead of the first matching parameter. + +2010-09-26 Julien Danjou + + * gnus-sum.el (gnus-auto-center-group): Transform into a defcustom. + +2010-09-26 Lars Magne Ingebrigtsen + + * mml2015.el (mml2015-use): Remove gpg support. + + * mml1991.el (mml1991-function-alist): Remove gpg function. + (mml1991-gpg-sign): Removed. + +2010-09-26 Andreas Seltenreich + + * gnus-srvr.el (gnus-browse-subscribe-newsgroup-method): New variable. + (gnus-browse-unsubscribe-current-group): Document it. + (gnus-browse-unsubscribe-group): Use it. + +2010-09-26 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-read-ephemeral-bug-group): Add the bug email + address to the To list for easier response. + + * gnus.el (gnus-play-startup-jingle): Removed. + (gnus-splash): Don't play jingle. + (gnus): Silence gnus-load message. + + * gnus-art.el (gnus-treat-play-sounds): Removed. + + * gnus.el (gnus-play-jingle): Remove audio support. + + * gnus-cus.el (gnus-score-customize): Remove audio reference. + + * earcon.el: Removed -- no users. + + * gnus-audio.el: Removed -- no users of this package. + + * gnus-sum.el (gnus-summary-limit-children): Remove nocem support. + + * gnus-start.el (gnus-setup-news): Remove nocem support. + + * gnus-group.el (gnus-group-get-new-news): Removed nocem call. + + * gnus.el (gnus-use-nocem): Removed. + + * gnus-demon.el (gnus-demon-add-nocem, gnus-demon-scan-nocem): + Removed. + + * gnus-nocem.el (gnus-nocem-issuers): Removed file. Apparently nobody + uses NoCeM any more. + + * gnus-art.el (gnus-ctan-url): Seems not very useful -- removed. + (gnus-button-ctan-handler): Ditto. + (gnus-button-handle-ctan-bogus-regexp): Ditto. + (gnus-button-ctan-directory-regexp): Ditto. + (gnus-button-handle-ctan): Ditto. + (gnus-button-tex-level): Ditto. + (gnus-button-alist): Removed CTAN stuff. + +2010-09-25 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-wait-for-response): Reversed logic in the + nnimap-streaming test. + + * gnus-start.el (gnus-get-unread-articles): Don't try to open failed + servers twice. + + * nnimap.el (nnimap-open-connection): Add more error reporting when + nnimap fails early. + + * nnheader.el (nnheader-get-report-string): New function. + (nnheader-get-report): Use it. + + * gnus-int.el (gnus-check-server): Say what the error was when opening + failed. + + * nnimap.el (nnimap-wait-for-response): Search further when we're not + using streaming. + +2010-09-25 Julien Danjou + + * gnus-html.el (gnus-html-rescale-image): Use our defalias + gnus-window-inside-pixel-edges. + +2010-09-25 Lars Magne Ingebrigtsen + + * gnus-srvr.el (gnus-server-copy-server): Add documentation. + + * mm-decode.el (mm-save-part): Allow saving to other directories the + normal Emacs way. + + * nndoc.el (nndoc-type-alist): Move mime-parts after mbox. Suggested + by Jay Berkenbilt. + + * gnus-art.el (gnus-mime-delete-part): Fix plural for "byte" when + there isn't a single byte. + + * gnus-int.el (gnus-open-server): Don't query whether to go offline -- + just do it. It doesn't really seem to matter what the user responds + here, I think, so it's just a confusing question. + + * nnimap.el (nnimap-retrieve-group-data-early): Fix typo in the + non-streaming case. + + * gnus-art.el (gnus-flush-original-article-buffer): Separated out. + (gnus-article-encrypt-body): Use it. + + * gnus-sum.el (gnus-summary-show-complete-article): New command and + keystroke. + + * nnimap.el (nnimap-find-wanted-parts-1): Use + gnus-fetch-partial-articles. + + * gnus-art.el (gnus-fetch-partial-articles): New variable. + + * nnimap.el (nnimap-insert-partial-structure): New function. + (nnimap-get-partial-article): New function. + (nnimap-request-article): Use it. + (nnimap-wait-for-response): Return whether the wait was successful. + (nnimap-finish-retrieve-group-infos): Don't do anything if the + retrieval wasn't successful. + (nnimap-retrieve-group-data-early): Allow throttling servers. + (nnimap-streaming): New variable. + (nnimap-fetch-partial-articles): Removed. + + * mm-decode.el (mm-with-part): Protect against killed buffers. + + * nndraft.el (nndraft-retrieve-headers): Insert Lines and Chars headers + for prettier summary display. + +2010-09-25 Andrew Cohen (tiny change) + + * nnir.el (nnir-run-imap): Allow sending IMAP search patterns + directly. + +2010-09-25 Lars Magne Ingebrigtsen + + * gnus.el (gnus-local-domain): Put gnus-local-domain back again, since + apparently third-party libraries depend on it. + + * nnimap.el (nnimap-open-connection): Wait for the response to STARTTLS + before starting negotiation. + + * gnus-art.el (gnus-treat-from-gravatar): Change default to nil for + privacy reasons. + (gnus-treat-mail-gravatar): Ditto. + + * gnus-ems.el (gnus-put-image): Don't put any non-blank text into the + buffer when inserting images. Inserting text into the headers, for + instance, can make them invalid. + +2010-09-25 Julien Danjou + + * rfc1843.el: Remove useless rfc1843-old-gnus-decode-header-function + variables. + + * nnheader.el: Remove useless variables news-reply-yank-from and + news-reply-yank-message-id. + + * mml2015.el: Remove useless mc-default-scheme and mc-schemes + variables. + + * mml1991.el: Remove useless mml1991-verbose. + + * gnus.el: Remove useless variable gnus-use-generic-from. + Remove obsolete variable gnus-topic-indentation. + + * gnus-uu.el: Remove useless gnus-uu-shar-file-name. + + * gnus-sum.el: Remove useless gnus-newsgroup-none-id. + + * gnus-picon.el: Remove useless gnus-picon-setup-p variable. + + * gnus-group.el: Remove useless gnus-group-icon-cache. + Remove useless gnus-ephemeral-group-server. + + * gnus-bookmark.el: Remove useless gnus-bookmark-after-jump-hook. + + * mml2015.el: Remove useless mml2015-verbose. + + * mml-smime.el: Remove useless mml-smime-verbose. + + * gnus.el: Remove useless gnus-local-domain. + + * gnus-gravatar.el (gnus-gravatar-transform-address): Use + gnus-gravatar-size. + + * gnus-art.el: Remove useless gnus-treat-translate. + +2010-09-24 Julien Danjou + + * gnus-sum.el: Add support for Gravatars. + + * gnus-art.el: Add support for Gravatars. + + * gnus-gravatar.el: Add this file. + + * gravatar.el: Add this file. + +2010-09-24 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-summary-fetch-faq): Removed. + + * gnus-group.el (gnus-group-fetch-faq): Removed. + + * gnus.el (gnus-group-faq-directory): Removed. + + * gnus-group.el (gnus-group-fetch-charter): Removed. + + * gnus.el (gnus-group-charter-alist): Removed. + + * gnus-group.el (gnus-group-archive-directory): Removed. + (gnus-group-recent-archive-directory): Ditto. + (gnus-group-make-archive-group): Removed. + + * nnimap.el (nnimap-update-info): Protect against nil uidnexts. + + * gnus-cache.el (gnus-cache-braid-heads): When braiding heads, don't + use the same article number for all the cached articles. + + * nnimap.el (nnimap-command): Register the last command time so + that we can use it for idling NOOPs. + (nnimap-open-connection): Start the keeplive timer. + (nnimap-make-process-buffer): Store all the process buffers. + (nnimap-keepalive): New function. + + * starttls.el: (starttls-open-stream): Add autoload cookie. + +2010-09-24 Michael Welsh Duggan (tiny change) + + * nnimap.el (nnimap-split-incoming-mail): Fix paren typo in the 'junk + handling. + +2010-09-24 Lars Magne Ingebrigtsen + + * nnrss.el (nnrss-retrieve-groups): Change to the group before checking + its data structures. + + * gnus.el (gnus-sloppily-equal-method-parameters): Use copy-sequence + instead of the cl.el copy-list. + (gnus-sloppily-equal-method-parameters): Use equal instead of the cl + equalp. + +2010-09-24 Katsumi Yamaoka + + * gmm-utils.el (gmm-tool-bar-from-list): Always use tool-bar-local-item + and tool-bar-local-item-from-menu. + + * gnus-agent.el (gnus-agent-make-mode-line-string): Always use + mode-line-highlight face for Emacs. + + * gnus-art.el (toplevel): Don't bind recursive-load-depth-limit while + loading gnus-sum.elc; fix comment for canlock-verify. + (gnus-article-jump-to-part): Use read-number. + (gnus-insert-mime-button, gnus-insert-mime-security-button): Remove + Emacs pre-21 compatible code for help-echo. + (gnus-article-next-page-1): No need to adjust the number of lines. + (gnus-article-describe-bindings): Always use help-buffer. + + * gnus-audio.el (gnus-audio-inline-sound) + * gnus-cus.el (gnus-custom-mode) + * gnus-group.el (gnus-group-update-tool-bar): Comment fix. + + * gnus-sum.el (gnus-remove-overlays): Doc fix. + + * gnus-util.el (gnus-select-frame-set-input-focus): Remove Emacs 21 + compatible code. + +2010-09-24 Glenn Morris + + * message.el (message-output): Use gnus-output-to-rmail if a buffer is + visiting the fcc file in rmail-mode. + +2010-09-24 Katsumi Yamaoka + + * nnir.el: Silence the byte compiler. + + * gnus-html.el (gnus-html-encode-url-chars): New function, that's an + alias to browse-url-url-encode-chars if any. + (gnus-html-encode-url): Use it. + +2010-09-23 Lars Magne Ingebrigtsen + + * gnus-start.el (gnus-use-backend-marks): New variable. + (gnus-get-unread-articles-in-group): Use it. + + * gnus-sum.el (gnus-summary-local-variables): Prepare for list/range + makeover. + +2010-09-23 Andrew Cohen + + * nnimap.el (nnimap-retrieve-headers): Return 'headers. + +2010-09-23 Lars Magne Ingebrigtsen + + * gnus-start.el (gnus-fixup-nnimap-unread-after-getting-new-news): + Removed. + (gnus-setup-news-hook): Removed + gnus-fixup-nnimap-unread-after-getting-new-news. + + * gnus-int.el (gnus-request-update-info): Protect against backends not + having the function. + + * nnimap.el (nnimap-stream): Mention starttls. + (nnimap-open-connection): Add starttls support. + +2010-09-23 Andrew Cohen + + * nnir.el (nnir-run-imap): Fix up nnir to work with the new nnimap. + +2010-09-23 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-transform-headers): Don't bug out on invalid + BODYSTRUCTUREs. + (nnimap-transform-headers): Unfold quoted {42} headers. + + * gnus-start.el (gnus-get-unread-articles): Allow backends to update + the info. + (gnus-get-unread-articles): Only call updatep on backends that support + it. + + * nnweb.el (nnweb-request-update-info): NOOP. + + * nnmaildir.el (nnmaildir-request-marks): Renamed from -update-info. + + * nnfolder.el (nnfolder-request-marks): Renamed from -update-info, + since it only deals with marks. + + * gnus-int.el (gnus-request-marks): Renamed gnus-request-update-info to + gnus-request-marks, and make a new gnus-request-update-info. + + * nnimap.el (nnimap-update-info): When UIDNEXT is present, use that for + the active instead of the high number, which is usually too low. + +2010-09-23 Teodor Zlatanov + + * encrypt.el: Removed. + +2010-09-23 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-update-info): Sync non-standard flags from the + server in symbolic form. + + * gnus-html.el (gnus-max-image-proportion): Increase proportion to + 0.9. + +2010-09-22 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-parse-flags): Parse the data in any order. + (nnimap-update-info): Fix up code slightly. + + * gnus-int.el (gnus-open-server): Add tracing for performance + debugging. + + * gnus-group.el (gnus-group-highlight-line): Typo fix: beg, not start. + (gnus-group-insert-group-line): Pass the real group name so that it + gets the right data. + + * gnus-start.el (gnus-get-unread-articles): Don't have + `gnus-get-unread-articles-in-group' update info, since that can be + really slow and doesn't seem to be needed? + +2010-09-22 Julien Danjou + + * gnus-group.el (gnus-group-insert-group-line): Call + gnus-group-highlight-line. + (gnus-group-update-hook): Remove gnus-group-highlight-line from the + default hook list. + (gnus-group-update-eval-form): Add new function. + (gnus-group-highlight-line): Use gnus-group-update-eval-form. + (gnus-group-get-icon): Use gnus-group-update-eval-form. + +2010-09-22 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-request-expire-articles): If nnmail-expiry-wait is + immediate, then expire all articles. + (nnimap-update-info): Fix off-by-one errors. + (nnimap-flags-to-marks): Would return no marks lists for group with no + flags. Instead return the other data. + +2010-09-22 Julien Danjou + + * gnus-group.el (gnus-group-get-icon): Renamed gnus-group-add-icon that + Only return an icon. + (gnus-group-insert-group-line): Compute icon to return. + + * gnus-html.el (gnus-html-image-automatic-caching): Add custom + variable. + (gnus-html-image-fetched): Only cache if + gnus-html-image-automatic-caching is set. + (gnus-html-image-fetched): Check for errors. + +2010-09-22 Lars Magne Ingebrigtsen + + * gnus-start.el (gnus-read-active-for-groups): Only run -request-scan + once per method on `g'. This ensures that backends like nnfolder don't + open all their folders. + + * nnimap.el (nnimap-split-incoming-mail): Delete 'junk. + (nnimap-request-list): Nix out group in the correct buffer. + (nnimap-parse-flags): Implement by using `read' instead of + hand-parsing. + (nnimap-flags-to-marks): Pass on permanent-flags. + (nnimap-make-process-buffer): Record the server name. + (nnimap-parse-flags): Fix typo. + (nnimap-request-scan): Run split on the server in general, not just a + single group. + + * nnmail.el (nnmail-split-incoming): Take an optional junk-func + parameter, and propagate this downwards. + + * nnimap.el (nnimap-request-list): Set the current nnimap group to nil, + since EXAMINE changes it on the server. + + * gnus-int.el (gnus-request-expire-articles): Inhibit the daemon, since + this command might take a while. + +2010-09-22 Julien Danjou + + * gnus-html.el (gnus-html-put-image): Stop using markers. They are + harmful if you have 2 images side-by-side, they can't be properly + update on text deletion. Using text-property is safer here. + (gnus-html-image-fetched): Search also for \r\n\r\n to get the start of + data. + +2010-09-22 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-expunge-inbox): Removed. + (nnimap-mark-and-expunge-incoming): Use nnimap-expunge instead. + (nnimap-expunge): Flip default to t. + + * gnus.el (gnus-method-to-server): Don't push things to the cache + unless it's unique. + (gnus-server-to-method): Ditto. + +2010-09-22 Teodor Zlatanov + + * nnimap.el (nnimap-delete-article): Tell user if expunge won't happen. + +2010-09-22 Julien Danjou + + * gnus-html.el (gnus-html-get-image-data): Search also for \r\n\r\n to + get the start of data. + (gnus-html-encode-url): Add this function to encode special chars in + URL. + (gnus-html-wash-images): Use gnus-html-encode-url to encode URL. + (gnus-html-prefetch-images): Use gnus-html-encode-url to encode URL. + + * gnus-group.el (gnus-group-update-hook): Call gnus-group-add-icon by + default. + (gnus-group-add-icon): Move to gnus-group.el, and rewrite so it works. + + * gnus-html.el (gnus-html-wash-images): Use xml-substitute-special on + images alt-text. + (gnus-html-put-image): Put alt-text as help-echo. + +2010-09-22 Katsumi Yamaoka + + * mailcap.el (mailcap-parse-mailcap, mailcap-parse-mimetypes) + * mm-util.el (mm-decompress-buffer) + * nnir.el (nnir-run-find-grep) + * pop3.el (pop3-list): Use 3rd arg of split-string. + +2010-09-21 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-update-marks): Add sanity check to not delete marks + outside the active range. Suggested by Dan Christensen. + + * gnus-start.el (gnus-get-unread-articles): Get the extended method + slightly later to avoid double-getting it. + + * nnml.el (nnml-generate-nov-file): Fix variable name clobbering from + previous patch. + + * gnus-sum.el (gnus-adjust-marked-articles): Fix another typo. + +2010-09-21 Adam Sjøgren + + * gnus-sum.el (gnus-adjust-marked-articles): Fix typo. + +2010-09-21 Lars Magne Ingebrigtsen + + * gnus-int.el (gnus-open-server): Give a better error message in the + "go offline" case. + + * gnus-sum.el (gnus-adjust-marked-articles): Hack to avoid adjusting + marks for nnimap, which is seldom the right thing to do. + + * gnus.el (gnus-sloppily-equal-method-parameters): Refactor out. + (gnus-same-method-different-name): New function. + + * nnimap.el (parse-time): Require. + + * gnus-start.el (gnus-get-unread-articles): Fix the prefixed select + method in the presence of many similar methods. + + * nnmail.el (nnmail-expired-article-p): Fix typo: time-subtract. + + * nnimap.el (nnimap-find-expired-articles): Don't refer to + nnml-inhibit-expiry. + + * gnus-sum.el (gnus-summary-move-article): Use gnus-server-equal to + find out whether methods are equal. + + * nnimap.el (nnimap-find-expired-articles): New function. + (nnimap-process-expiry-targets): New function. + (nnimap-request-move-article): Request the article before looking at + what the Message-ID is. Fix found by Andrew Cohen. + (nnimap-mark-and-expunge-incoming): Wait for the last sequence. + + * nnmail.el (nnmail-expired-article-p): Allow returning the cutoff time + for oldness in addition to being a predicate. + + * nnimap.el (nnimap-request-group): When we have zero articles, return + the right data to Gnus. + (nnimap-request-expire-articles): Only delete articles immediately if + the target is 'delete. + + * gnus-sum.el (gnus-summary-move-article): When respooling to the same + method, this would bug out. + + * gnus-group.el (gnus-group-expunge-group): Renamed from + gnus-group-nnimap-expunge, and implemented as a normal interface + function. + + * gnus-int.el (gnus-request-expunge-group): New function. + + * nnimap.el (nnimap-request-create-group): Implement. + (nnimap-request-expunge-group): New function. + +2010-09-21 Julien Danjou + + * gnus-html.el (gnus-html-image-cache-ttl): Add new variable. + (gnus-html-cache-expired): Add new function. + (gnus-html-wash-images): Use `gnus-html-cache-expired' to check + wethever we should display image for fetch it. + Compute alt-text earlier to pass it to the fetching function too. + (gnus-html-schedule-image-fetching): Change function argument to only + get one image at a time, not a list. + (gnus-html-image-fetched): Use `url-store-in-cache' to store image in + cache. + (gnus-html-get-image-data): New function to retrieve image data from + cache. + (gnus-html-put-image): Change buffer argument to use image data rather + than file, and place image above region rather than inserting a new + one. Do not take alt-text as argument, since it's useless now: we place + the image above alt-text. + (gnus-html-prune-cache): Remove. + (gnus-html-show-images): Start to fetch image when we find one, do not + push into a temporary list. + (gnus-html-prefetch-images): Only fetch image if they have expired. + (gnus-html-browse-image): Fix, use 'gnus-image-url. + (gnus-html-image-map): Add "v" to browse-url on undisplayed image. + +2010-09-20 Katsumi Yamaoka + + * rfc2047.el (rfc2047-encode-parameter): Doc fix. + +2010-09-20 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-group-line-format-alist): Have the ?U (unseen) + spec inser "*" if the group isn't active instead of 0. + + * nnimap.el (nnimap-request-group): Don't select the imap buffer before + opening the server. + (nnimap-request-delete-group): Implement group deletion. + (nnimap-transform-headers): Return the size of the entire message in + the Bytes header, not just the size of the first part. + (nnimap-request-move-article): When moving an article from nnimap, + request the article first so the accepting form has an article to + accept. Reported by Dan Christensen. + (nnimap-command): Make sure that the error message doesn't error out. + +2010-09-20 David Edmondson (tiny change) + + * nnimap.el (nnimap-request-set-mark): Don't wait for a response when + we haven't requested anything. + +2010-09-20 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-fetch-inbox): Use "[]" as the parameter instead of + "". Fix found by Andrew Cohen. + + * mail-parse.el (mail-header-encode-parameter): Use -encode-parameter + instead of -encode-string. + +2010-09-20 Katsumi Yamaoka + + * gnus-html.el (gnus-html-image-fetched): Pass arg to kill-buffer. + + * gnus-sum.el (gnus-summary-update-mark): Replace subst-char-in-string + by mm-subst-char-in-string. + +2010-09-19 Lars Magne Ingebrigtsen + + * nnimap.el (nnimap-wait-for-connection): Avoid a race condition while + waiting for the connection string. + + * gnus-html.el (gnus-html-image-fetched): Protect against the data not + arriving. + + * gnus-start.el (gnus-ignored-newsgroups): Remove [] from the list of + bogus characters. This allows selecting certain Gmail groups. + + * nnimap.el (nnimap-find-wanted-parts-1): New function. + (nnimap-fetch-partial-articles): New variable. + (nnimap-open-connection): When looking for credentials, also use the + nnimap-server-port. + (nnimap-request-article): Return the group/article number, so that Gnus + `^' works as expected. + (nnimap-find-wanted-parts-1): Return the MIME parts as IMAP wants + them. + + * gnus.el (gnus-similar-server-opened): Refactor a bit and add + comments. + (gnus-methods-sloppily-equal): New function. + (gnus): When using the development version of Gnus, load the gnus-load + file. + + * gnus-start.el (gnus-get-unread-articles): Make sure that we call + `gnus-open-server' on each method before trying to scan them etc. This + ensures that all the backend parameters are set correctly. + + * nnimap.el (nnimap-authenticator): New variable. + (nnimap-open-connection): Allow anonymous login. + (nnimap-transform-headers): The chars header is called Chars not + Bytes. + (nnimap-wait-for-response): Don't infloop if the IMAP connection + drops. + + * gnus-art.el (gnus-article-describe-briefly): Fix up typo in last + patch, found by Knut Anders Hatlen. + +2010-09-19 Andreas Schwab + + * gnus-agent.el (gnus-agent-batch-confirmation) + (gnus-agent-expire-group, gnus-agent-expire): Pass proper format string + to gnus-message. + * gnus-art.el (gnus-article-describe-briefly): Likewise. + * gnus-group.el (gnus-group-list-groups, gnus-group-describe-group) + (gnus-group-edit-global-kill, gnus-group-describe-briefly): Likewise. + * gnus-int.el (gnus-open-server): Likewise. + * gnus-score.el (gnus-score-edit-current-scores, gnus-score-edit-file) + (gnus-score-check-syntax): Likewise. + * gnus-srvr.el (gnus-browse-describe-briefly): Likewise. + * gnus-start.el (gnus-read-active-file-1, gnus-read-active-file-1): + Likewise. + * gnus-sum.el (gnus-summary-describe-briefly): Likewise. + +2010-09-19 Lars Magne Ingebrigtsen + + * gnus-html.el (gnus-html-prefetch-images): Fix up the url-retrieve + calling conventions so that prefetch doesn't bug out. + +2010-09-19 Julien Danjou + + * gnus-sum.el (gnus-summary-update-mark): Use `subst-char-in-string' + rather than `subst-char-in-region' in order to be able to replace ASCII + char by UTF-8 ones. + + * gnus-html.el (gnus-html-prefetch-images): Use `url-retrieve' rather + than curl. + (gnus-html-image-fetched): Fix `gnus-html-put-image' call not setting + the right URL and ALT text on images. + (gnus-html-wash-tags): Fix tag case. + Add support for `s' and `ins' tags. Use gnus-emphasis-* faces. + (gnus-article-html): Add -o display_ins_del=2 option. + (gnus-html-wash-tags): Add better support for