diff options
134 files changed, 7874 insertions, 1443 deletions
| @@ -1,3 +1,18 @@ | |||
| 1 | 2004-10-08 Steven Tamm <steventamm@mac.com> | ||
| 2 | |||
| 3 | * configure.in (HAVE_MALLOC_MALLOC_H): Test for malloc/malloc.h | ||
| 4 | * configure: Rebuild | ||
| 5 | |||
| 6 | 2004-10-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 7 | |||
| 8 | * configure.in (HAVE_RANDOM_HEAPSTART): Change AC_MSG_ERROR to | ||
| 9 | AC_MSG_WARN. Move output of warning message to end of configure run. | ||
| 10 | |||
| 11 | 2004-10-05 Jan Dj,Ad(Brv. <jan.h.d@swipnet.se> | ||
| 12 | |||
| 13 | * configure.in (HAVE_RANDOM_HEAPSTART): Renamed HAVE_EXECSHIELD. | ||
| 14 | Run test to see if heap start address is random. | ||
| 15 | |||
| 1 | 2004-09-29 Miles Bader <miles@gnu.org> | 16 | 2004-09-29 Miles Bader <miles@gnu.org> |
| 2 | 17 | ||
| 3 | * configure.in (HAVE_EXECSHIELD): Test correct env variable to see | 18 | * configure.in (HAVE_EXECSHIELD): Test correct env variable to see |
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 19f06efa4a7..1898cf4dea4 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -28,8 +28,6 @@ isearch faces. | |||
| 28 | 28 | ||
| 29 | ** Finish updating the Emacs Lisp manual. | 29 | ** Finish updating the Emacs Lisp manual. |
| 30 | 30 | ||
| 31 | *** New display properties (KFS to provide input). | ||
| 32 | |||
| 33 | ** Update the Emacs manual. | 31 | ** Update the Emacs manual. |
| 34 | 32 | ||
| 35 | *** Update man/info.texi. | 33 | *** Update man/info.texi. |
| @@ -88,7 +86,7 @@ man/rmail.texi | |||
| 88 | man/screen.texi "Luc Teirlinck" | 86 | man/screen.texi "Luc Teirlinck" |
| 89 | man/search.texi "Luc Teirlinck" | 87 | man/search.texi "Luc Teirlinck" |
| 90 | man/sending.texi | 88 | man/sending.texi |
| 91 | man/text.texi | 89 | man/text.texi "Luc Teirlinck" |
| 92 | man/trouble.texi | 90 | man/trouble.texi |
| 93 | man/windows.texi "Luc Teirlinck" | 91 | man/windows.texi "Luc Teirlinck" |
| 94 | man/xresources.texi | 92 | man/xresources.texi |
| @@ -310,7 +310,7 @@ ac_includes_default="\ | |||
| 310 | # include <unistd.h> | 310 | # include <unistd.h> |
| 311 | #endif" | 311 | #endif" |
| 312 | 312 | ||
| 313 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP SETARCH LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS' | 313 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SETARCH SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS' |
| 314 | ac_subst_files='' | 314 | ac_subst_files='' |
| 315 | 315 | ||
| 316 | # Initialize some variables set by options. | 316 | # Initialize some variables set by options. |
| @@ -984,7 +984,7 @@ esac | |||
| 984 | else | 984 | else |
| 985 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | 985 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
| 986 | fi | 986 | fi |
| 987 | cd "$ac_popdir" | 987 | cd $ac_popdir |
| 988 | done | 988 | done |
| 989 | fi | 989 | fi |
| 990 | 990 | ||
| @@ -3250,7 +3250,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3250 | cat conftest.err >&5 | 3250 | cat conftest.err >&5 |
| 3251 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3251 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3252 | (exit $ac_status); } && | 3252 | (exit $ac_status); } && |
| 3253 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 3253 | { ac_try='test -z "$ac_c_werror_flag" |
| 3254 | || test ! -s conftest.err' | ||
| 3254 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3255 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3255 | (eval $ac_try) 2>&5 | 3256 | (eval $ac_try) 2>&5 |
| 3256 | ac_status=$? | 3257 | ac_status=$? |
| @@ -3308,7 +3309,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3308 | cat conftest.err >&5 | 3309 | cat conftest.err >&5 |
| 3309 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3310 | (exit $ac_status); } && | 3311 | (exit $ac_status); } && |
| 3311 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 3312 | { ac_try='test -z "$ac_c_werror_flag" |
| 3313 | || test ! -s conftest.err' | ||
| 3312 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3313 | (eval $ac_try) 2>&5 | 3315 | (eval $ac_try) 2>&5 |
| 3314 | ac_status=$? | 3316 | ac_status=$? |
| @@ -3424,7 +3426,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3424 | cat conftest.err >&5 | 3426 | cat conftest.err >&5 |
| 3425 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3427 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3426 | (exit $ac_status); } && | 3428 | (exit $ac_status); } && |
| 3427 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 3429 | { ac_try='test -z "$ac_c_werror_flag" |
| 3430 | || test ! -s conftest.err' | ||
| 3428 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3431 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3429 | (eval $ac_try) 2>&5 | 3432 | (eval $ac_try) 2>&5 |
| 3430 | ac_status=$? | 3433 | ac_status=$? |
| @@ -3478,7 +3481,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3478 | cat conftest.err >&5 | 3481 | cat conftest.err >&5 |
| 3479 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3482 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3480 | (exit $ac_status); } && | 3483 | (exit $ac_status); } && |
| 3481 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 3484 | { ac_try='test -z "$ac_c_werror_flag" |
| 3485 | || test ! -s conftest.err' | ||
| 3482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3486 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3483 | (eval $ac_try) 2>&5 | 3487 | (eval $ac_try) 2>&5 |
| 3484 | ac_status=$? | 3488 | ac_status=$? |
| @@ -3523,7 +3527,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3523 | cat conftest.err >&5 | 3527 | cat conftest.err >&5 |
| 3524 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3528 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3525 | (exit $ac_status); } && | 3529 | (exit $ac_status); } && |
| 3526 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 3530 | { ac_try='test -z "$ac_c_werror_flag" |
| 3531 | || test ! -s conftest.err' | ||
| 3527 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3532 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3528 | (eval $ac_try) 2>&5 | 3533 | (eval $ac_try) 2>&5 |
| 3529 | ac_status=$? | 3534 | ac_status=$? |
| @@ -3567,7 +3572,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3567 | cat conftest.err >&5 | 3572 | cat conftest.err >&5 |
| 3568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3573 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3569 | (exit $ac_status); } && | 3574 | (exit $ac_status); } && |
| 3570 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 3575 | { ac_try='test -z "$ac_c_werror_flag" |
| 3576 | || test ! -s conftest.err' | ||
| 3571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3577 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3572 | (eval $ac_try) 2>&5 | 3578 | (eval $ac_try) 2>&5 |
| 3573 | ac_status=$? | 3579 | ac_status=$? |
| @@ -4200,7 +4206,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 4200 | cat conftest.err >&5 | 4206 | cat conftest.err >&5 |
| 4201 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4207 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4202 | (exit $ac_status); } && | 4208 | (exit $ac_status); } && |
| 4203 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 4209 | { ac_try='test -z "$ac_c_werror_flag" |
| 4210 | || test ! -s conftest.err' | ||
| 4204 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4211 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4205 | (eval $ac_try) 2>&5 | 4212 | (eval $ac_try) 2>&5 |
| 4206 | ac_status=$? | 4213 | ac_status=$? |
| @@ -4271,91 +4278,6 @@ rm -f conftest* | |||
| 4271 | 4278 | ||
| 4272 | 4279 | ||
| 4273 | 4280 | ||
| 4274 | echo "$as_me:$LINENO: checking for /proc/sys/kernel/exec-shield" >&5 | ||
| 4275 | echo $ECHO_N "checking for /proc/sys/kernel/exec-shield... $ECHO_C" >&6 | ||
| 4276 | if test "${ac_cv_file__proc_sys_kernel_exec_shield+set}" = set; then | ||
| 4277 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
| 4278 | else | ||
| 4279 | test "$cross_compiling" = yes && | ||
| 4280 | { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 | ||
| 4281 | echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} | ||
| 4282 | { (exit 1); exit 1; }; } | ||
| 4283 | if test -r "/proc/sys/kernel/exec-shield"; then | ||
| 4284 | ac_cv_file__proc_sys_kernel_exec_shield=yes | ||
| 4285 | else | ||
| 4286 | ac_cv_file__proc_sys_kernel_exec_shield=no | ||
| 4287 | fi | ||
| 4288 | fi | ||
| 4289 | echo "$as_me:$LINENO: result: $ac_cv_file__proc_sys_kernel_exec_shield" >&5 | ||
| 4290 | echo "${ECHO_T}$ac_cv_file__proc_sys_kernel_exec_shield" >&6 | ||
| 4291 | if test $ac_cv_file__proc_sys_kernel_exec_shield = yes; then | ||
| 4292 | emacs_cv_execshield=1 | ||
| 4293 | else | ||
| 4294 | emacs_cv_execshield=0 | ||
| 4295 | fi | ||
| 4296 | |||
| 4297 | if test "$emacs_cv_execshield" = 1; then | ||
| 4298 | # Extract the first word of "setarch", so it can be a program name with args. | ||
| 4299 | set dummy setarch; ac_word=$2 | ||
| 4300 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
| 4301 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
| 4302 | if test "${ac_cv_path_SETARCH+set}" = set; then | ||
| 4303 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
| 4304 | else | ||
| 4305 | case $SETARCH in | ||
| 4306 | [\\/]* | ?:[\\/]*) | ||
| 4307 | ac_cv_path_SETARCH="$SETARCH" # Let the user override the test with a path. | ||
| 4308 | ;; | ||
| 4309 | *) | ||
| 4310 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
| 4311 | for as_dir in $PATH | ||
| 4312 | do | ||
| 4313 | IFS=$as_save_IFS | ||
| 4314 | test -z "$as_dir" && as_dir=. | ||
| 4315 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
| 4316 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
| 4317 | ac_cv_path_SETARCH="$as_dir/$ac_word$ac_exec_ext" | ||
| 4318 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
| 4319 | break 2 | ||
| 4320 | fi | ||
| 4321 | done | ||
| 4322 | done | ||
| 4323 | |||
| 4324 | test -z "$ac_cv_path_SETARCH" && ac_cv_path_SETARCH="no" | ||
| 4325 | ;; | ||
| 4326 | esac | ||
| 4327 | fi | ||
| 4328 | SETARCH=$ac_cv_path_SETARCH | ||
| 4329 | |||
| 4330 | if test -n "$SETARCH"; then | ||
| 4331 | echo "$as_me:$LINENO: result: $SETARCH" >&5 | ||
| 4332 | echo "${ECHO_T}$SETARCH" >&6 | ||
| 4333 | else | ||
| 4334 | echo "$as_me:$LINENO: result: no" >&5 | ||
| 4335 | echo "${ECHO_T}no" >&6 | ||
| 4336 | fi | ||
| 4337 | |||
| 4338 | |||
| 4339 | if test "$SETARCH" != no && test "$machine" = "intel386"; then | ||
| 4340 | |||
| 4341 | cat >>confdefs.h <<\_ACEOF | ||
| 4342 | #define HAVE_EXECSHIELD 1 | ||
| 4343 | _ACEOF | ||
| 4344 | |||
| 4345 | else | ||
| 4346 | case "`cat /proc/sys/kernel/exec-shield`" in | ||
| 4347 | 0) ;; | ||
| 4348 | *) | ||
| 4349 | { { echo "$as_me:$LINENO: error: Exec-shield is turned on. | ||
| 4350 | Emacs can not dump itself if exec-shield is turned on. | ||
| 4351 | See \`etc/PROBLEMS' for further information." >&5 | ||
| 4352 | echo "$as_me: error: Exec-shield is turned on. | ||
| 4353 | Emacs can not dump itself if exec-shield is turned on. | ||
| 4354 | See \`etc/PROBLEMS' for further information." >&2;} | ||
| 4355 | { (exit 1); exit 1; }; } | ||
| 4356 | esac | ||
| 4357 | fi | ||
| 4358 | fi | ||
| 4359 | 4281 | ||
| 4360 | #### Extract some information from the operating system and machine files. | 4282 | #### Extract some information from the operating system and machine files. |
| 4361 | 4283 | ||
| @@ -4561,7 +4483,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4561 | cat conftest.err >&5 | 4483 | cat conftest.err >&5 |
| 4562 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4484 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4563 | (exit $ac_status); } && | 4485 | (exit $ac_status); } && |
| 4564 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 4486 | { ac_try='test -z "$ac_c_werror_flag" |
| 4487 | || test ! -s conftest.err' | ||
| 4565 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4566 | (eval $ac_try) 2>&5 | 4489 | (eval $ac_try) 2>&5 |
| 4567 | ac_status=$? | 4490 | ac_status=$? |
| @@ -4590,7 +4513,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4590 | cat conftest.err >&5 | 4513 | cat conftest.err >&5 |
| 4591 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4514 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4592 | (exit $ac_status); } && | 4515 | (exit $ac_status); } && |
| 4593 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 4516 | { ac_try='test -z "$ac_c_werror_flag" |
| 4517 | || test ! -s conftest.err' | ||
| 4594 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4518 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4595 | (eval $ac_try) 2>&5 | 4519 | (eval $ac_try) 2>&5 |
| 4596 | ac_status=$? | 4520 | ac_status=$? |
| @@ -4660,7 +4584,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4660 | cat conftest.err >&5 | 4584 | cat conftest.err >&5 |
| 4661 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4585 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4662 | (exit $ac_status); } && | 4586 | (exit $ac_status); } && |
| 4663 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 4587 | { ac_try='test -z "$ac_c_werror_flag" |
| 4588 | || test ! -s conftest.err' | ||
| 4664 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4589 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4665 | (eval $ac_try) 2>&5 | 4590 | (eval $ac_try) 2>&5 |
| 4666 | ac_status=$? | 4591 | ac_status=$? |
| @@ -4712,7 +4637,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4712 | cat conftest.err >&5 | 4637 | cat conftest.err >&5 |
| 4713 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4638 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4714 | (exit $ac_status); } && | 4639 | (exit $ac_status); } && |
| 4715 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 4640 | { ac_try='test -z "$ac_c_werror_flag" |
| 4641 | || test ! -s conftest.err' | ||
| 4716 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4642 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4717 | (eval $ac_try) 2>&5 | 4643 | (eval $ac_try) 2>&5 |
| 4718 | ac_status=$? | 4644 | ac_status=$? |
| @@ -4783,7 +4709,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4783 | cat conftest.err >&5 | 4709 | cat conftest.err >&5 |
| 4784 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4710 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4785 | (exit $ac_status); } && | 4711 | (exit $ac_status); } && |
| 4786 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 4712 | { ac_try='test -z "$ac_c_werror_flag" |
| 4713 | || test ! -s conftest.err' | ||
| 4787 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4714 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4788 | (eval $ac_try) 2>&5 | 4715 | (eval $ac_try) 2>&5 |
| 4789 | ac_status=$? | 4716 | ac_status=$? |
| @@ -4835,7 +4762,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4835 | cat conftest.err >&5 | 4762 | cat conftest.err >&5 |
| 4836 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4763 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4837 | (exit $ac_status); } && | 4764 | (exit $ac_status); } && |
| 4838 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 4765 | { ac_try='test -z "$ac_c_werror_flag" |
| 4766 | || test ! -s conftest.err' | ||
| 4839 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4767 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4840 | (eval $ac_try) 2>&5 | 4768 | (eval $ac_try) 2>&5 |
| 4841 | ac_status=$? | 4769 | ac_status=$? |
| @@ -4905,7 +4833,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4905 | cat conftest.err >&5 | 4833 | cat conftest.err >&5 |
| 4906 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4907 | (exit $ac_status); } && | 4835 | (exit $ac_status); } && |
| 4908 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 4836 | { ac_try='test -z "$ac_c_werror_flag" |
| 4837 | || test ! -s conftest.err' | ||
| 4909 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4838 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4910 | (eval $ac_try) 2>&5 | 4839 | (eval $ac_try) 2>&5 |
| 4911 | ac_status=$? | 4840 | ac_status=$? |
| @@ -5075,7 +5004,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5075 | cat conftest.err >&5 | 5004 | cat conftest.err >&5 |
| 5076 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5077 | (exit $ac_status); } && | 5006 | (exit $ac_status); } && |
| 5078 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 5007 | { ac_try='test -z "$ac_c_werror_flag" |
| 5008 | || test ! -s conftest.err' | ||
| 5079 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5009 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5080 | (eval $ac_try) 2>&5 | 5010 | (eval $ac_try) 2>&5 |
| 5081 | ac_status=$? | 5011 | ac_status=$? |
| @@ -5144,7 +5074,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5144 | cat conftest.err >&5 | 5074 | cat conftest.err >&5 |
| 5145 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5075 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5146 | (exit $ac_status); } && | 5076 | (exit $ac_status); } && |
| 5147 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 5077 | { ac_try='test -z "$ac_c_werror_flag" |
| 5078 | || test ! -s conftest.err' | ||
| 5148 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5079 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5149 | (eval $ac_try) 2>&5 | 5080 | (eval $ac_try) 2>&5 |
| 5150 | ac_status=$? | 5081 | ac_status=$? |
| @@ -5298,7 +5229,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 5298 | cat conftest.err >&5 | 5229 | cat conftest.err >&5 |
| 5299 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5230 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5300 | (exit $ac_status); } && | 5231 | (exit $ac_status); } && |
| 5301 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 5232 | { ac_try='test -z "$ac_c_werror_flag" |
| 5233 | || test ! -s conftest.err' | ||
| 5302 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5234 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5303 | (eval $ac_try) 2>&5 | 5235 | (eval $ac_try) 2>&5 |
| 5304 | ac_status=$? | 5236 | ac_status=$? |
| @@ -5391,7 +5323,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5391 | cat conftest.err >&5 | 5323 | cat conftest.err >&5 |
| 5392 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5324 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5393 | (exit $ac_status); } && | 5325 | (exit $ac_status); } && |
| 5394 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 5326 | { ac_try='test -z "$ac_c_werror_flag" |
| 5327 | || test ! -s conftest.err' | ||
| 5395 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5328 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5396 | (eval $ac_try) 2>&5 | 5329 | (eval $ac_try) 2>&5 |
| 5397 | ac_status=$? | 5330 | ac_status=$? |
| @@ -5594,7 +5527,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5594 | cat conftest.err >&5 | 5527 | cat conftest.err >&5 |
| 5595 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5528 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5596 | (exit $ac_status); } && | 5529 | (exit $ac_status); } && |
| 5597 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 5530 | { ac_try='test -z "$ac_c_werror_flag" |
| 5531 | || test ! -s conftest.err' | ||
| 5598 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5532 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5599 | (eval $ac_try) 2>&5 | 5533 | (eval $ac_try) 2>&5 |
| 5600 | ac_status=$? | 5534 | ac_status=$? |
| @@ -5759,7 +5693,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5759 | cat conftest.err >&5 | 5693 | cat conftest.err >&5 |
| 5760 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5694 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5761 | (exit $ac_status); } && | 5695 | (exit $ac_status); } && |
| 5762 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 5696 | { ac_try='test -z "$ac_c_werror_flag" |
| 5697 | || test ! -s conftest.err' | ||
| 5763 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5698 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5764 | (eval $ac_try) 2>&5 | 5699 | (eval $ac_try) 2>&5 |
| 5765 | ac_status=$? | 5700 | ac_status=$? |
| @@ -5822,7 +5757,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5822 | cat conftest.err >&5 | 5757 | cat conftest.err >&5 |
| 5823 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5758 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5824 | (exit $ac_status); } && | 5759 | (exit $ac_status); } && |
| 5825 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 5760 | { ac_try='test -z "$ac_c_werror_flag" |
| 5761 | || test ! -s conftest.err' | ||
| 5826 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5762 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5827 | (eval $ac_try) 2>&5 | 5763 | (eval $ac_try) 2>&5 |
| 5828 | ac_status=$? | 5764 | ac_status=$? |
| @@ -5895,7 +5831,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5895 | cat conftest.err >&5 | 5831 | cat conftest.err >&5 |
| 5896 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5832 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5897 | (exit $ac_status); } && | 5833 | (exit $ac_status); } && |
| 5898 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 5834 | { ac_try='test -z "$ac_c_werror_flag" |
| 5835 | || test ! -s conftest.err' | ||
| 5899 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5836 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5900 | (eval $ac_try) 2>&5 | 5837 | (eval $ac_try) 2>&5 |
| 5901 | ac_status=$? | 5838 | ac_status=$? |
| @@ -5981,7 +5918,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5981 | cat conftest.err >&5 | 5918 | cat conftest.err >&5 |
| 5982 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5919 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5983 | (exit $ac_status); } && | 5920 | (exit $ac_status); } && |
| 5984 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 5921 | { ac_try='test -z "$ac_c_werror_flag" |
| 5922 | || test ! -s conftest.err' | ||
| 5985 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5923 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5986 | (eval $ac_try) 2>&5 | 5924 | (eval $ac_try) 2>&5 |
| 5987 | ac_status=$? | 5925 | ac_status=$? |
| @@ -6054,7 +5992,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6054 | cat conftest.err >&5 | 5992 | cat conftest.err >&5 |
| 6055 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5993 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6056 | (exit $ac_status); } && | 5994 | (exit $ac_status); } && |
| 6057 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 5995 | { ac_try='test -z "$ac_c_werror_flag" |
| 5996 | || test ! -s conftest.err' | ||
| 6058 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5997 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6059 | (eval $ac_try) 2>&5 | 5998 | (eval $ac_try) 2>&5 |
| 6060 | ac_status=$? | 5999 | ac_status=$? |
| @@ -6124,7 +6063,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6124 | cat conftest.err >&5 | 6063 | cat conftest.err >&5 |
| 6125 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6064 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6126 | (exit $ac_status); } && | 6065 | (exit $ac_status); } && |
| 6127 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6066 | { ac_try='test -z "$ac_c_werror_flag" |
| 6067 | || test ! -s conftest.err' | ||
| 6128 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6068 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6129 | (eval $ac_try) 2>&5 | 6069 | (eval $ac_try) 2>&5 |
| 6130 | ac_status=$? | 6070 | ac_status=$? |
| @@ -6183,7 +6123,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6183 | cat conftest.err >&5 | 6123 | cat conftest.err >&5 |
| 6184 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6124 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6185 | (exit $ac_status); } && | 6125 | (exit $ac_status); } && |
| 6186 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6126 | { ac_try='test -z "$ac_c_werror_flag" |
| 6127 | || test ! -s conftest.err' | ||
| 6187 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6128 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6188 | (eval $ac_try) 2>&5 | 6129 | (eval $ac_try) 2>&5 |
| 6189 | ac_status=$? | 6130 | ac_status=$? |
| @@ -6252,7 +6193,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6252 | cat conftest.err >&5 | 6193 | cat conftest.err >&5 |
| 6253 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6194 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6254 | (exit $ac_status); } && | 6195 | (exit $ac_status); } && |
| 6255 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6196 | { ac_try='test -z "$ac_c_werror_flag" |
| 6197 | || test ! -s conftest.err' | ||
| 6256 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6198 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6257 | (eval $ac_try) 2>&5 | 6199 | (eval $ac_try) 2>&5 |
| 6258 | ac_status=$? | 6200 | ac_status=$? |
| @@ -6313,7 +6255,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6313 | cat conftest.err >&5 | 6255 | cat conftest.err >&5 |
| 6314 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6256 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6315 | (exit $ac_status); } && | 6257 | (exit $ac_status); } && |
| 6316 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6258 | { ac_try='test -z "$ac_c_werror_flag" |
| 6259 | || test ! -s conftest.err' | ||
| 6317 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6260 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6318 | (eval $ac_try) 2>&5 | 6261 | (eval $ac_try) 2>&5 |
| 6319 | ac_status=$? | 6262 | ac_status=$? |
| @@ -6379,7 +6322,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6379 | cat conftest.err >&5 | 6322 | cat conftest.err >&5 |
| 6380 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6323 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6381 | (exit $ac_status); } && | 6324 | (exit $ac_status); } && |
| 6382 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6325 | { ac_try='test -z "$ac_c_werror_flag" |
| 6326 | || test ! -s conftest.err' | ||
| 6383 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6327 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6384 | (eval $ac_try) 2>&5 | 6328 | (eval $ac_try) 2>&5 |
| 6385 | ac_status=$? | 6329 | ac_status=$? |
| @@ -6525,7 +6469,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6525 | cat conftest.err >&5 | 6469 | cat conftest.err >&5 |
| 6526 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6470 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6527 | (exit $ac_status); } && | 6471 | (exit $ac_status); } && |
| 6528 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6472 | { ac_try='test -z "$ac_c_werror_flag" |
| 6473 | || test ! -s conftest.err' | ||
| 6529 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6474 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6530 | (eval $ac_try) 2>&5 | 6475 | (eval $ac_try) 2>&5 |
| 6531 | ac_status=$? | 6476 | ac_status=$? |
| @@ -6589,7 +6534,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6589 | cat conftest.err >&5 | 6534 | cat conftest.err >&5 |
| 6590 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6535 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6591 | (exit $ac_status); } && | 6536 | (exit $ac_status); } && |
| 6592 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6537 | { ac_try='test -z "$ac_c_werror_flag" |
| 6538 | || test ! -s conftest.err' | ||
| 6593 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6539 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6594 | (eval $ac_try) 2>&5 | 6540 | (eval $ac_try) 2>&5 |
| 6595 | ac_status=$? | 6541 | ac_status=$? |
| @@ -6654,7 +6600,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6654 | cat conftest.err >&5 | 6600 | cat conftest.err >&5 |
| 6655 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6601 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6656 | (exit $ac_status); } && | 6602 | (exit $ac_status); } && |
| 6657 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6603 | { ac_try='test -z "$ac_c_werror_flag" |
| 6604 | || test ! -s conftest.err' | ||
| 6658 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6605 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6659 | (eval $ac_try) 2>&5 | 6606 | (eval $ac_try) 2>&5 |
| 6660 | ac_status=$? | 6607 | ac_status=$? |
| @@ -6700,7 +6647,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6700 | cat conftest.err >&5 | 6647 | cat conftest.err >&5 |
| 6701 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6648 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6702 | (exit $ac_status); } && | 6649 | (exit $ac_status); } && |
| 6703 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6650 | { ac_try='test -z "$ac_c_werror_flag" |
| 6651 | || test ! -s conftest.err' | ||
| 6704 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6652 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6705 | (eval $ac_try) 2>&5 | 6653 | (eval $ac_try) 2>&5 |
| 6706 | ac_status=$? | 6654 | ac_status=$? |
| @@ -6774,7 +6722,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 6774 | cat conftest.err >&5 | 6722 | cat conftest.err >&5 |
| 6775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6723 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6776 | (exit $ac_status); } && | 6724 | (exit $ac_status); } && |
| 6777 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6725 | { ac_try='test -z "$ac_c_werror_flag" |
| 6726 | || test ! -s conftest.err' | ||
| 6778 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6727 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6779 | (eval $ac_try) 2>&5 | 6728 | (eval $ac_try) 2>&5 |
| 6780 | ac_status=$? | 6729 | ac_status=$? |
| @@ -6839,7 +6788,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6839 | cat conftest.err >&5 | 6788 | cat conftest.err >&5 |
| 6840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6841 | (exit $ac_status); } && | 6790 | (exit $ac_status); } && |
| 6842 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6791 | { ac_try='test -z "$ac_c_werror_flag" |
| 6792 | || test ! -s conftest.err' | ||
| 6843 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6793 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6844 | (eval $ac_try) 2>&5 | 6794 | (eval $ac_try) 2>&5 |
| 6845 | ac_status=$? | 6795 | ac_status=$? |
| @@ -6883,7 +6833,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6883 | cat conftest.err >&5 | 6833 | cat conftest.err >&5 |
| 6884 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6885 | (exit $ac_status); } && | 6835 | (exit $ac_status); } && |
| 6886 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6836 | { ac_try='test -z "$ac_c_werror_flag" |
| 6837 | || test ! -s conftest.err' | ||
| 6887 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6838 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6888 | (eval $ac_try) 2>&5 | 6839 | (eval $ac_try) 2>&5 |
| 6889 | ac_status=$? | 6840 | ac_status=$? |
| @@ -6954,7 +6905,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6954 | cat conftest.err >&5 | 6905 | cat conftest.err >&5 |
| 6955 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6906 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6956 | (exit $ac_status); } && | 6907 | (exit $ac_status); } && |
| 6957 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6908 | { ac_try='test -z "$ac_c_werror_flag" |
| 6909 | || test ! -s conftest.err' | ||
| 6958 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6910 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6959 | (eval $ac_try) 2>&5 | 6911 | (eval $ac_try) 2>&5 |
| 6960 | ac_status=$? | 6912 | ac_status=$? |
| @@ -7004,7 +6956,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7004 | cat conftest.err >&5 | 6956 | cat conftest.err >&5 |
| 7005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7006 | (exit $ac_status); } && | 6958 | (exit $ac_status); } && |
| 7007 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 6959 | { ac_try='test -z "$ac_c_werror_flag" |
| 6960 | || test ! -s conftest.err' | ||
| 7008 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6961 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7009 | (eval $ac_try) 2>&5 | 6962 | (eval $ac_try) 2>&5 |
| 7010 | ac_status=$? | 6963 | ac_status=$? |
| @@ -7075,7 +7028,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7075 | cat conftest.err >&5 | 7028 | cat conftest.err >&5 |
| 7076 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7029 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7077 | (exit $ac_status); } && | 7030 | (exit $ac_status); } && |
| 7078 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7031 | { ac_try='test -z "$ac_c_werror_flag" |
| 7032 | || test ! -s conftest.err' | ||
| 7079 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7033 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7080 | (eval $ac_try) 2>&5 | 7034 | (eval $ac_try) 2>&5 |
| 7081 | ac_status=$? | 7035 | ac_status=$? |
| @@ -7125,7 +7079,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7125 | cat conftest.err >&5 | 7079 | cat conftest.err >&5 |
| 7126 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7080 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7127 | (exit $ac_status); } && | 7081 | (exit $ac_status); } && |
| 7128 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7082 | { ac_try='test -z "$ac_c_werror_flag" |
| 7083 | || test ! -s conftest.err' | ||
| 7129 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7084 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7130 | (eval $ac_try) 2>&5 | 7085 | (eval $ac_try) 2>&5 |
| 7131 | ac_status=$? | 7086 | ac_status=$? |
| @@ -7196,7 +7151,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7196 | cat conftest.err >&5 | 7151 | cat conftest.err >&5 |
| 7197 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7198 | (exit $ac_status); } && | 7153 | (exit $ac_status); } && |
| 7199 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7154 | { ac_try='test -z "$ac_c_werror_flag" |
| 7155 | || test ! -s conftest.err' | ||
| 7200 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7156 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7201 | (eval $ac_try) 2>&5 | 7157 | (eval $ac_try) 2>&5 |
| 7202 | ac_status=$? | 7158 | ac_status=$? |
| @@ -7246,7 +7202,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7246 | cat conftest.err >&5 | 7202 | cat conftest.err >&5 |
| 7247 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7203 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7248 | (exit $ac_status); } && | 7204 | (exit $ac_status); } && |
| 7249 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7205 | { ac_try='test -z "$ac_c_werror_flag" |
| 7206 | || test ! -s conftest.err' | ||
| 7250 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7207 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7251 | (eval $ac_try) 2>&5 | 7208 | (eval $ac_try) 2>&5 |
| 7252 | ac_status=$? | 7209 | ac_status=$? |
| @@ -7317,7 +7274,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7317 | cat conftest.err >&5 | 7274 | cat conftest.err >&5 |
| 7318 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7275 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7319 | (exit $ac_status); } && | 7276 | (exit $ac_status); } && |
| 7320 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7277 | { ac_try='test -z "$ac_c_werror_flag" |
| 7278 | || test ! -s conftest.err' | ||
| 7321 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7279 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7322 | (eval $ac_try) 2>&5 | 7280 | (eval $ac_try) 2>&5 |
| 7323 | ac_status=$? | 7281 | ac_status=$? |
| @@ -7367,7 +7325,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7367 | cat conftest.err >&5 | 7325 | cat conftest.err >&5 |
| 7368 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7326 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7369 | (exit $ac_status); } && | 7327 | (exit $ac_status); } && |
| 7370 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7328 | { ac_try='test -z "$ac_c_werror_flag" |
| 7329 | || test ! -s conftest.err' | ||
| 7371 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7330 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7372 | (eval $ac_try) 2>&5 | 7331 | (eval $ac_try) 2>&5 |
| 7373 | ac_status=$? | 7332 | ac_status=$? |
| @@ -7438,7 +7397,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7438 | cat conftest.err >&5 | 7397 | cat conftest.err >&5 |
| 7439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7440 | (exit $ac_status); } && | 7399 | (exit $ac_status); } && |
| 7441 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7400 | { ac_try='test -z "$ac_c_werror_flag" |
| 7401 | || test ! -s conftest.err' | ||
| 7442 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7402 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7443 | (eval $ac_try) 2>&5 | 7403 | (eval $ac_try) 2>&5 |
| 7444 | ac_status=$? | 7404 | ac_status=$? |
| @@ -7488,7 +7448,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7488 | cat conftest.err >&5 | 7448 | cat conftest.err >&5 |
| 7489 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7449 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7490 | (exit $ac_status); } && | 7450 | (exit $ac_status); } && |
| 7491 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7451 | { ac_try='test -z "$ac_c_werror_flag" |
| 7452 | || test ! -s conftest.err' | ||
| 7492 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7453 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7493 | (eval $ac_try) 2>&5 | 7454 | (eval $ac_try) 2>&5 |
| 7494 | ac_status=$? | 7455 | ac_status=$? |
| @@ -7575,7 +7536,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7575 | cat conftest.err >&5 | 7536 | cat conftest.err >&5 |
| 7576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7537 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7577 | (exit $ac_status); } && | 7538 | (exit $ac_status); } && |
| 7578 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7539 | { ac_try='test -z "$ac_c_werror_flag" |
| 7540 | || test ! -s conftest.err' | ||
| 7579 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7541 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7580 | (eval $ac_try) 2>&5 | 7542 | (eval $ac_try) 2>&5 |
| 7581 | ac_status=$? | 7543 | ac_status=$? |
| @@ -7681,7 +7643,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7681 | cat conftest.err >&5 | 7643 | cat conftest.err >&5 |
| 7682 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7644 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7683 | (exit $ac_status); } && | 7645 | (exit $ac_status); } && |
| 7684 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7646 | { ac_try='test -z "$ac_c_werror_flag" |
| 7647 | || test ! -s conftest.err' | ||
| 7685 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7648 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7686 | (eval $ac_try) 2>&5 | 7649 | (eval $ac_try) 2>&5 |
| 7687 | ac_status=$? | 7650 | ac_status=$? |
| @@ -7741,7 +7704,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7741 | cat conftest.err >&5 | 7704 | cat conftest.err >&5 |
| 7742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7705 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7743 | (exit $ac_status); } && | 7706 | (exit $ac_status); } && |
| 7744 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 7707 | { ac_try='test -z "$ac_c_werror_flag" |
| 7708 | || test ! -s conftest.err' | ||
| 7745 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7709 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7746 | (eval $ac_try) 2>&5 | 7710 | (eval $ac_try) 2>&5 |
| 7747 | ac_status=$? | 7711 | ac_status=$? |
| @@ -7777,6 +7741,124 @@ _ACEOF | |||
| 7777 | fi | 7741 | fi |
| 7778 | 7742 | ||
| 7779 | 7743 | ||
| 7744 | echo "$as_me:$LINENO: checking whether heap start address is randomized" >&5 | ||
| 7745 | echo $ECHO_N "checking whether heap start address is randomized... $ECHO_C" >&6 | ||
| 7746 | if test x"$ac_cv_header_unistd_h" != x && test x"$ac_cv_header_stdlib_h" != x | ||
| 7747 | then | ||
| 7748 | if test "$cross_compiling" = yes; then | ||
| 7749 | emacs_cv_randomheap='assuming no' | ||
| 7750 | else | ||
| 7751 | cat >conftest.$ac_ext <<_ACEOF | ||
| 7752 | /* confdefs.h. */ | ||
| 7753 | _ACEOF | ||
| 7754 | cat confdefs.h >>conftest.$ac_ext | ||
| 7755 | cat >>conftest.$ac_ext <<_ACEOF | ||
| 7756 | /* end confdefs.h. */ | ||
| 7757 | #include <stdio.h> | ||
| 7758 | #include <unistd.h> | ||
| 7759 | #include <stdlib.h> | ||
| 7760 | int main (int argc, char *argv[]) | ||
| 7761 | { | ||
| 7762 | unsigned long old_sbrk = 0; | ||
| 7763 | unsigned long this_sbrk = (unsigned long) sbrk(0); | ||
| 7764 | int nr = 1; | ||
| 7765 | if (argc != 1) { | ||
| 7766 | old_sbrk = strtoul (argv[1], 0, 0); | ||
| 7767 | nr = atoi (argv[2])+1; | ||
| 7768 | } | ||
| 7769 | if (argc == 1 || (old_sbrk == this_sbrk && nr < 3)) | ||
| 7770 | { | ||
| 7771 | char buf1[32], buf2[32]; | ||
| 7772 | sprintf (buf1, "%lu", this_sbrk); | ||
| 7773 | sprintf (buf2, "%d", nr); | ||
| 7774 | execl (argv[0], argv[0], buf1, buf2, 0); | ||
| 7775 | exit (-1); | ||
| 7776 | } | ||
| 7777 | exit (this_sbrk == old_sbrk); | ||
| 7778 | } | ||
| 7779 | _ACEOF | ||
| 7780 | rm -f conftest$ac_exeext | ||
| 7781 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
| 7782 | (eval $ac_link) 2>&5 | ||
| 7783 | ac_status=$? | ||
| 7784 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 7785 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | ||
| 7786 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
| 7787 | (eval $ac_try) 2>&5 | ||
| 7788 | ac_status=$? | ||
| 7789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 7790 | (exit $ac_status); }; }; then | ||
| 7791 | emacs_cv_randomheap=yes | ||
| 7792 | else | ||
| 7793 | echo "$as_me: program exited with status $ac_status" >&5 | ||
| 7794 | echo "$as_me: failed program was:" >&5 | ||
| 7795 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
| 7796 | |||
| 7797 | ( exit $ac_status ) | ||
| 7798 | emacs_cv_randomheap=no | ||
| 7799 | fi | ||
| 7800 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | ||
| 7801 | fi | ||
| 7802 | else | ||
| 7803 | emacs_cv_randomheap='assuming no' | ||
| 7804 | fi | ||
| 7805 | echo "$as_me:$LINENO: result: $emacs_cv_randomheap" >&5 | ||
| 7806 | echo "${ECHO_T}$emacs_cv_randomheap" >&6 | ||
| 7807 | |||
| 7808 | if test "$emacs_cv_randomheap" = yes; then | ||
| 7809 | # Extract the first word of "setarch", so it can be a program name with args. | ||
| 7810 | set dummy setarch; ac_word=$2 | ||
| 7811 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
| 7812 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
| 7813 | if test "${ac_cv_path_SETARCH+set}" = set; then | ||
| 7814 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
| 7815 | else | ||
| 7816 | case $SETARCH in | ||
| 7817 | [\\/]* | ?:[\\/]*) | ||
| 7818 | ac_cv_path_SETARCH="$SETARCH" # Let the user override the test with a path. | ||
| 7819 | ;; | ||
| 7820 | *) | ||
| 7821 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
| 7822 | for as_dir in $PATH | ||
| 7823 | do | ||
| 7824 | IFS=$as_save_IFS | ||
| 7825 | test -z "$as_dir" && as_dir=. | ||
| 7826 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
| 7827 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
| 7828 | ac_cv_path_SETARCH="$as_dir/$ac_word$ac_exec_ext" | ||
| 7829 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
| 7830 | break 2 | ||
| 7831 | fi | ||
| 7832 | done | ||
| 7833 | done | ||
| 7834 | |||
| 7835 | test -z "$ac_cv_path_SETARCH" && ac_cv_path_SETARCH="no" | ||
| 7836 | ;; | ||
| 7837 | esac | ||
| 7838 | fi | ||
| 7839 | SETARCH=$ac_cv_path_SETARCH | ||
| 7840 | |||
| 7841 | if test -n "$SETARCH"; then | ||
| 7842 | echo "$as_me:$LINENO: result: $SETARCH" >&5 | ||
| 7843 | echo "${ECHO_T}$SETARCH" >&6 | ||
| 7844 | else | ||
| 7845 | echo "$as_me:$LINENO: result: no" >&5 | ||
| 7846 | echo "${ECHO_T}no" >&6 | ||
| 7847 | fi | ||
| 7848 | |||
| 7849 | |||
| 7850 | if test "$SETARCH" != no && test "$machine" = "intel386"; then | ||
| 7851 | |||
| 7852 | cat >>confdefs.h <<\_ACEOF | ||
| 7853 | #define HAVE_RANDOM_HEAPSTART 1 | ||
| 7854 | _ACEOF | ||
| 7855 | |||
| 7856 | else | ||
| 7857 | emacs_cv_randomheap=warn | ||
| 7858 | fi | ||
| 7859 | fi | ||
| 7860 | |||
| 7861 | |||
| 7780 | 7862 | ||
| 7781 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | 7863 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 |
| 7782 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | 7864 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 |
| @@ -7863,7 +7945,6 @@ fi | |||
| 7863 | echo "$as_me:$LINENO: checking for X" >&5 | 7945 | echo "$as_me:$LINENO: checking for X" >&5 |
| 7864 | echo $ECHO_N "checking for X... $ECHO_C" >&6 | 7946 | echo $ECHO_N "checking for X... $ECHO_C" >&6 |
| 7865 | 7947 | ||
| 7866 | ac_path_x_has_been_run=yes | ||
| 7867 | 7948 | ||
| 7868 | # Check whether --with-x or --without-x was given. | 7949 | # Check whether --with-x or --without-x was given. |
| 7869 | if test "${with_x+set}" = set; then | 7950 | if test "${with_x+set}" = set; then |
| @@ -7956,7 +8037,7 @@ ac_x_header_dirs=' | |||
| 7956 | /usr/openwin/share/include' | 8037 | /usr/openwin/share/include' |
| 7957 | 8038 | ||
| 7958 | if test "$ac_x_includes" = no; then | 8039 | if test "$ac_x_includes" = no; then |
| 7959 | # Guess where to find include files, by looking for a specified header file. | 8040 | # Guess where to find include files, by looking for Intrinsic.h. |
| 7960 | # First, try using that file with no special directory specified. | 8041 | # First, try using that file with no special directory specified. |
| 7961 | cat >conftest.$ac_ext <<_ACEOF | 8042 | cat >conftest.$ac_ext <<_ACEOF |
| 7962 | /* confdefs.h. */ | 8043 | /* confdefs.h. */ |
| @@ -8030,7 +8111,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8030 | cat conftest.err >&5 | 8111 | cat conftest.err >&5 |
| 8031 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8112 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8032 | (exit $ac_status); } && | 8113 | (exit $ac_status); } && |
| 8033 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 8114 | { ac_try='test -z "$ac_c_werror_flag" |
| 8115 | || test ! -s conftest.err' | ||
| 8034 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8116 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8035 | (eval $ac_try) 2>&5 | 8117 | (eval $ac_try) 2>&5 |
| 8036 | ac_status=$? | 8118 | ac_status=$? |
| @@ -8090,12 +8172,8 @@ else | |||
| 8090 | # Update the cache value to reflect the command line values. | 8172 | # Update the cache value to reflect the command line values. |
| 8091 | ac_cv_have_x="have_x=yes \ | 8173 | ac_cv_have_x="have_x=yes \ |
| 8092 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | 8174 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" |
| 8093 | # It might be that x_includes is empty (headers are found in the | 8175 | echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 |
| 8094 | # standard search path. Then output the corresponding message | 8176 | echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 |
| 8095 | ac_out_x_includes=$x_includes | ||
| 8096 | test "x$x_includes" = x && ac_out_x_includes="in standard search path" | ||
| 8097 | echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5 | ||
| 8098 | echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6 | ||
| 8099 | fi | 8177 | fi |
| 8100 | 8178 | ||
| 8101 | if test "$no_x" = yes; then | 8179 | if test "$no_x" = yes; then |
| @@ -8259,7 +8337,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8259 | cat conftest.err >&5 | 8337 | cat conftest.err >&5 |
| 8260 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8338 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8261 | (exit $ac_status); } && | 8339 | (exit $ac_status); } && |
| 8262 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 8340 | { ac_try='test -z "$ac_c_werror_flag" |
| 8341 | || test ! -s conftest.err' | ||
| 8263 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8342 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8264 | (eval $ac_try) 2>&5 | 8343 | (eval $ac_try) 2>&5 |
| 8265 | ac_status=$? | 8344 | ac_status=$? |
| @@ -8354,7 +8433,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8354 | cat conftest.err >&5 | 8433 | cat conftest.err >&5 |
| 8355 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8434 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8356 | (exit $ac_status); } && | 8435 | (exit $ac_status); } && |
| 8357 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 8436 | { ac_try='test -z "$ac_c_werror_flag" |
| 8437 | || test ! -s conftest.err' | ||
| 8358 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8438 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8359 | (eval $ac_try) 2>&5 | 8439 | (eval $ac_try) 2>&5 |
| 8360 | ac_status=$? | 8440 | ac_status=$? |
| @@ -8413,7 +8493,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8413 | cat conftest.err >&5 | 8493 | cat conftest.err >&5 |
| 8414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8494 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8415 | (exit $ac_status); } && | 8495 | (exit $ac_status); } && |
| 8416 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 8496 | { ac_try='test -z "$ac_c_werror_flag" |
| 8497 | || test ! -s conftest.err' | ||
| 8417 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8498 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8418 | (eval $ac_try) 2>&5 | 8499 | (eval $ac_try) 2>&5 |
| 8419 | ac_status=$? | 8500 | ac_status=$? |
| @@ -8497,7 +8578,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 8497 | cat conftest.err >&5 | 8578 | cat conftest.err >&5 |
| 8498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8579 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8499 | (exit $ac_status); } && | 8580 | (exit $ac_status); } && |
| 8500 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 8581 | { ac_try='test -z "$ac_c_werror_flag" |
| 8582 | || test ! -s conftest.err' | ||
| 8501 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8583 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8502 | (eval $ac_try) 2>&5 | 8584 | (eval $ac_try) 2>&5 |
| 8503 | ac_status=$? | 8585 | ac_status=$? |
| @@ -8681,7 +8763,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8681 | cat conftest.err >&5 | 8763 | cat conftest.err >&5 |
| 8682 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8764 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8683 | (exit $ac_status); } && | 8765 | (exit $ac_status); } && |
| 8684 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 8766 | { ac_try='test -z "$ac_c_werror_flag" |
| 8767 | || test ! -s conftest.err' | ||
| 8685 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8768 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8686 | (eval $ac_try) 2>&5 | 8769 | (eval $ac_try) 2>&5 |
| 8687 | ac_status=$? | 8770 | ac_status=$? |
| @@ -8933,7 +9016,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8933 | cat conftest.err >&5 | 9016 | cat conftest.err >&5 |
| 8934 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9017 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8935 | (exit $ac_status); } && | 9018 | (exit $ac_status); } && |
| 8936 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9019 | { ac_try='test -z "$ac_c_werror_flag" |
| 9020 | || test ! -s conftest.err' | ||
| 8937 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9021 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8938 | (eval $ac_try) 2>&5 | 9022 | (eval $ac_try) 2>&5 |
| 8939 | ac_status=$? | 9023 | ac_status=$? |
| @@ -9000,7 +9084,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9000 | cat conftest.err >&5 | 9084 | cat conftest.err >&5 |
| 9001 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9085 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9002 | (exit $ac_status); } && | 9086 | (exit $ac_status); } && |
| 9003 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9087 | { ac_try='test -z "$ac_c_werror_flag" |
| 9088 | || test ! -s conftest.err' | ||
| 9004 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9089 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9005 | (eval $ac_try) 2>&5 | 9090 | (eval $ac_try) 2>&5 |
| 9006 | ac_status=$? | 9091 | ac_status=$? |
| @@ -9069,7 +9154,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9069 | cat conftest.err >&5 | 9154 | cat conftest.err >&5 |
| 9070 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9155 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9071 | (exit $ac_status); } && | 9156 | (exit $ac_status); } && |
| 9072 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9157 | { ac_try='test -z "$ac_c_werror_flag" |
| 9158 | || test ! -s conftest.err' | ||
| 9073 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9159 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9074 | (eval $ac_try) 2>&5 | 9160 | (eval $ac_try) 2>&5 |
| 9075 | ac_status=$? | 9161 | ac_status=$? |
| @@ -9154,7 +9240,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9154 | cat conftest.err >&5 | 9240 | cat conftest.err >&5 |
| 9155 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9241 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9156 | (exit $ac_status); } && | 9242 | (exit $ac_status); } && |
| 9157 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9243 | { ac_try='test -z "$ac_c_werror_flag" |
| 9244 | || test ! -s conftest.err' | ||
| 9158 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9245 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9159 | (eval $ac_try) 2>&5 | 9246 | (eval $ac_try) 2>&5 |
| 9160 | ac_status=$? | 9247 | ac_status=$? |
| @@ -9231,7 +9318,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9231 | cat conftest.err >&5 | 9318 | cat conftest.err >&5 |
| 9232 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9319 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9233 | (exit $ac_status); } && | 9320 | (exit $ac_status); } && |
| 9234 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9321 | { ac_try='test -z "$ac_c_werror_flag" |
| 9322 | || test ! -s conftest.err' | ||
| 9235 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9323 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9236 | (eval $ac_try) 2>&5 | 9324 | (eval $ac_try) 2>&5 |
| 9237 | ac_status=$? | 9325 | ac_status=$? |
| @@ -9285,7 +9373,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9285 | cat conftest.err >&5 | 9373 | cat conftest.err >&5 |
| 9286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9374 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9287 | (exit $ac_status); } && | 9375 | (exit $ac_status); } && |
| 9288 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9376 | { ac_try='test -z "$ac_c_werror_flag" |
| 9377 | || test ! -s conftest.err' | ||
| 9289 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9378 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9290 | (eval $ac_try) 2>&5 | 9379 | (eval $ac_try) 2>&5 |
| 9291 | ac_status=$? | 9380 | ac_status=$? |
| @@ -9354,7 +9443,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9354 | cat conftest.err >&5 | 9443 | cat conftest.err >&5 |
| 9355 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9356 | (exit $ac_status); } && | 9445 | (exit $ac_status); } && |
| 9357 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9446 | { ac_try='test -z "$ac_c_werror_flag" |
| 9447 | || test ! -s conftest.err' | ||
| 9358 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9448 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9359 | (eval $ac_try) 2>&5 | 9449 | (eval $ac_try) 2>&5 |
| 9360 | ac_status=$? | 9450 | ac_status=$? |
| @@ -9458,7 +9548,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9458 | cat conftest.err >&5 | 9548 | cat conftest.err >&5 |
| 9459 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9549 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9460 | (exit $ac_status); } && | 9550 | (exit $ac_status); } && |
| 9461 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9551 | { ac_try='test -z "$ac_c_werror_flag" |
| 9552 | || test ! -s conftest.err' | ||
| 9462 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9553 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9463 | (eval $ac_try) 2>&5 | 9554 | (eval $ac_try) 2>&5 |
| 9464 | ac_status=$? | 9555 | ac_status=$? |
| @@ -9525,7 +9616,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9525 | cat conftest.err >&5 | 9616 | cat conftest.err >&5 |
| 9526 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9617 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9527 | (exit $ac_status); } && | 9618 | (exit $ac_status); } && |
| 9528 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9619 | { ac_try='test -z "$ac_c_werror_flag" |
| 9620 | || test ! -s conftest.err' | ||
| 9529 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9621 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9530 | (eval $ac_try) 2>&5 | 9622 | (eval $ac_try) 2>&5 |
| 9531 | ac_status=$? | 9623 | ac_status=$? |
| @@ -9595,7 +9687,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9595 | cat conftest.err >&5 | 9687 | cat conftest.err >&5 |
| 9596 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9688 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9597 | (exit $ac_status); } && | 9689 | (exit $ac_status); } && |
| 9598 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9690 | { ac_try='test -z "$ac_c_werror_flag" |
| 9691 | || test ! -s conftest.err' | ||
| 9599 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9692 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9600 | (eval $ac_try) 2>&5 | 9693 | (eval $ac_try) 2>&5 |
| 9601 | ac_status=$? | 9694 | ac_status=$? |
| @@ -9833,7 +9926,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9833 | cat conftest.err >&5 | 9926 | cat conftest.err >&5 |
| 9834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9927 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9835 | (exit $ac_status); } && | 9928 | (exit $ac_status); } && |
| 9836 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 9929 | { ac_try='test -z "$ac_c_werror_flag" |
| 9930 | || test ! -s conftest.err' | ||
| 9837 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9931 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9838 | (eval $ac_try) 2>&5 | 9932 | (eval $ac_try) 2>&5 |
| 9839 | ac_status=$? | 9933 | ac_status=$? |
| @@ -9907,7 +10001,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9907 | cat conftest.err >&5 | 10001 | cat conftest.err >&5 |
| 9908 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10002 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9909 | (exit $ac_status); } && | 10003 | (exit $ac_status); } && |
| 9910 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10004 | { ac_try='test -z "$ac_c_werror_flag" |
| 10005 | || test ! -s conftest.err' | ||
| 9911 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10006 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9912 | (eval $ac_try) 2>&5 | 10007 | (eval $ac_try) 2>&5 |
| 9913 | ac_status=$? | 10008 | ac_status=$? |
| @@ -9979,7 +10074,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9979 | cat conftest.err >&5 | 10074 | cat conftest.err >&5 |
| 9980 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10075 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9981 | (exit $ac_status); } && | 10076 | (exit $ac_status); } && |
| 9982 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10077 | { ac_try='test -z "$ac_c_werror_flag" |
| 10078 | || test ! -s conftest.err' | ||
| 9983 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10079 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9984 | (eval $ac_try) 2>&5 | 10080 | (eval $ac_try) 2>&5 |
| 9985 | ac_status=$? | 10081 | ac_status=$? |
| @@ -10061,7 +10157,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10061 | cat conftest.err >&5 | 10157 | cat conftest.err >&5 |
| 10062 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10158 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10063 | (exit $ac_status); } && | 10159 | (exit $ac_status); } && |
| 10064 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10160 | { ac_try='test -z "$ac_c_werror_flag" |
| 10161 | || test ! -s conftest.err' | ||
| 10065 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10162 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10066 | (eval $ac_try) 2>&5 | 10163 | (eval $ac_try) 2>&5 |
| 10067 | ac_status=$? | 10164 | ac_status=$? |
| @@ -10140,7 +10237,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10140 | cat conftest.err >&5 | 10237 | cat conftest.err >&5 |
| 10141 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10238 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10142 | (exit $ac_status); } && | 10239 | (exit $ac_status); } && |
| 10143 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10240 | { ac_try='test -z "$ac_c_werror_flag" |
| 10241 | || test ! -s conftest.err' | ||
| 10144 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10242 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10145 | (eval $ac_try) 2>&5 | 10243 | (eval $ac_try) 2>&5 |
| 10146 | ac_status=$? | 10244 | ac_status=$? |
| @@ -10214,7 +10312,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 10214 | cat conftest.err >&5 | 10312 | cat conftest.err >&5 |
| 10215 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10313 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10216 | (exit $ac_status); } && | 10314 | (exit $ac_status); } && |
| 10217 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10315 | { ac_try='test -z "$ac_c_werror_flag" |
| 10316 | || test ! -s conftest.err' | ||
| 10218 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10317 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10219 | (eval $ac_try) 2>&5 | 10318 | (eval $ac_try) 2>&5 |
| 10220 | ac_status=$? | 10319 | ac_status=$? |
| @@ -10282,7 +10381,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 10282 | cat conftest.err >&5 | 10381 | cat conftest.err >&5 |
| 10283 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10284 | (exit $ac_status); } && | 10383 | (exit $ac_status); } && |
| 10285 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10384 | { ac_try='test -z "$ac_c_werror_flag" |
| 10385 | || test ! -s conftest.err' | ||
| 10286 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10386 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10287 | (eval $ac_try) 2>&5 | 10387 | (eval $ac_try) 2>&5 |
| 10288 | ac_status=$? | 10388 | ac_status=$? |
| @@ -10351,7 +10451,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10351 | cat conftest.err >&5 | 10451 | cat conftest.err >&5 |
| 10352 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10452 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10353 | (exit $ac_status); } && | 10453 | (exit $ac_status); } && |
| 10354 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10454 | { ac_try='test -z "$ac_c_werror_flag" |
| 10455 | || test ! -s conftest.err' | ||
| 10355 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10456 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10356 | (eval $ac_try) 2>&5 | 10457 | (eval $ac_try) 2>&5 |
| 10357 | ac_status=$? | 10458 | ac_status=$? |
| @@ -10475,7 +10576,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10475 | cat conftest.err >&5 | 10576 | cat conftest.err >&5 |
| 10476 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10577 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10477 | (exit $ac_status); } && | 10578 | (exit $ac_status); } && |
| 10478 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10579 | { ac_try='test -z "$ac_c_werror_flag" |
| 10580 | || test ! -s conftest.err' | ||
| 10479 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10581 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10480 | (eval $ac_try) 2>&5 | 10582 | (eval $ac_try) 2>&5 |
| 10481 | ac_status=$? | 10583 | ac_status=$? |
| @@ -10571,7 +10673,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 10571 | cat conftest.err >&5 | 10673 | cat conftest.err >&5 |
| 10572 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10674 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10573 | (exit $ac_status); } && | 10675 | (exit $ac_status); } && |
| 10574 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10676 | { ac_try='test -z "$ac_c_werror_flag" |
| 10677 | || test ! -s conftest.err' | ||
| 10575 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10678 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10576 | (eval $ac_try) 2>&5 | 10679 | (eval $ac_try) 2>&5 |
| 10577 | ac_status=$? | 10680 | ac_status=$? |
| @@ -10651,7 +10754,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 10651 | cat conftest.err >&5 | 10754 | cat conftest.err >&5 |
| 10652 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10755 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10653 | (exit $ac_status); } && | 10756 | (exit $ac_status); } && |
| 10654 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10757 | { ac_try='test -z "$ac_c_werror_flag" |
| 10758 | || test ! -s conftest.err' | ||
| 10655 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10759 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10656 | (eval $ac_try) 2>&5 | 10760 | (eval $ac_try) 2>&5 |
| 10657 | ac_status=$? | 10761 | ac_status=$? |
| @@ -10719,7 +10823,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 10719 | cat conftest.err >&5 | 10823 | cat conftest.err >&5 |
| 10720 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10824 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10721 | (exit $ac_status); } && | 10825 | (exit $ac_status); } && |
| 10722 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10826 | { ac_try='test -z "$ac_c_werror_flag" |
| 10827 | || test ! -s conftest.err' | ||
| 10723 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10828 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10724 | (eval $ac_try) 2>&5 | 10829 | (eval $ac_try) 2>&5 |
| 10725 | ac_status=$? | 10830 | ac_status=$? |
| @@ -10864,7 +10969,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10864 | cat conftest.err >&5 | 10969 | cat conftest.err >&5 |
| 10865 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10866 | (exit $ac_status); } && | 10971 | (exit $ac_status); } && |
| 10867 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 10972 | { ac_try='test -z "$ac_c_werror_flag" |
| 10973 | || test ! -s conftest.err' | ||
| 10868 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10974 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10869 | (eval $ac_try) 2>&5 | 10975 | (eval $ac_try) 2>&5 |
| 10870 | ac_status=$? | 10976 | ac_status=$? |
| @@ -10973,7 +11079,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 10973 | cat conftest.err >&5 | 11079 | cat conftest.err >&5 |
| 10974 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11080 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10975 | (exit $ac_status); } && | 11081 | (exit $ac_status); } && |
| 10976 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 11082 | { ac_try='test -z "$ac_c_werror_flag" |
| 11083 | || test ! -s conftest.err' | ||
| 10977 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11084 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10978 | (eval $ac_try) 2>&5 | 11085 | (eval $ac_try) 2>&5 |
| 10979 | ac_status=$? | 11086 | ac_status=$? |
| @@ -11118,7 +11225,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 11118 | cat conftest.err >&5 | 11225 | cat conftest.err >&5 |
| 11119 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11226 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11120 | (exit $ac_status); } && | 11227 | (exit $ac_status); } && |
| 11121 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 11228 | { ac_try='test -z "$ac_c_werror_flag" |
| 11229 | || test ! -s conftest.err' | ||
| 11122 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11230 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11123 | (eval $ac_try) 2>&5 | 11231 | (eval $ac_try) 2>&5 |
| 11124 | ac_status=$? | 11232 | ac_status=$? |
| @@ -11225,7 +11333,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 11225 | cat conftest.err >&5 | 11333 | cat conftest.err >&5 |
| 11226 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11334 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11227 | (exit $ac_status); } && | 11335 | (exit $ac_status); } && |
| 11228 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 11336 | { ac_try='test -z "$ac_c_werror_flag" |
| 11337 | || test ! -s conftest.err' | ||
| 11229 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11338 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11230 | (eval $ac_try) 2>&5 | 11339 | (eval $ac_try) 2>&5 |
| 11231 | ac_status=$? | 11340 | ac_status=$? |
| @@ -11379,7 +11488,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 11379 | cat conftest.err >&5 | 11488 | cat conftest.err >&5 |
| 11380 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11489 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11381 | (exit $ac_status); } && | 11490 | (exit $ac_status); } && |
| 11382 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 11491 | { ac_try='test -z "$ac_c_werror_flag" |
| 11492 | || test ! -s conftest.err' | ||
| 11383 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11493 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11384 | (eval $ac_try) 2>&5 | 11494 | (eval $ac_try) 2>&5 |
| 11385 | ac_status=$? | 11495 | ac_status=$? |
| @@ -11454,7 +11564,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 11454 | cat conftest.err >&5 | 11564 | cat conftest.err >&5 |
| 11455 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11565 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11456 | (exit $ac_status); } && | 11566 | (exit $ac_status); } && |
| 11457 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 11567 | { ac_try='test -z "$ac_c_werror_flag" |
| 11568 | || test ! -s conftest.err' | ||
| 11458 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11569 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11459 | (eval $ac_try) 2>&5 | 11570 | (eval $ac_try) 2>&5 |
| 11460 | ac_status=$? | 11571 | ac_status=$? |
| @@ -11602,7 +11713,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 11602 | cat conftest.err >&5 | 11713 | cat conftest.err >&5 |
| 11603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11714 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11604 | (exit $ac_status); } && | 11715 | (exit $ac_status); } && |
| 11605 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 11716 | { ac_try='test -z "$ac_c_werror_flag" |
| 11717 | || test ! -s conftest.err' | ||
| 11606 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11718 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11607 | (eval $ac_try) 2>&5 | 11719 | (eval $ac_try) 2>&5 |
| 11608 | ac_status=$? | 11720 | ac_status=$? |
| @@ -11679,7 +11791,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 11679 | cat conftest.err >&5 | 11791 | cat conftest.err >&5 |
| 11680 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11792 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11681 | (exit $ac_status); } && | 11793 | (exit $ac_status); } && |
| 11682 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 11794 | { ac_try='test -z "$ac_c_werror_flag" |
| 11795 | || test ! -s conftest.err' | ||
| 11683 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11796 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11684 | (eval $ac_try) 2>&5 | 11797 | (eval $ac_try) 2>&5 |
| 11685 | ac_status=$? | 11798 | ac_status=$? |
| @@ -11826,7 +11939,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 11826 | cat conftest.err >&5 | 11939 | cat conftest.err >&5 |
| 11827 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11940 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11828 | (exit $ac_status); } && | 11941 | (exit $ac_status); } && |
| 11829 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 11942 | { ac_try='test -z "$ac_c_werror_flag" |
| 11943 | || test ! -s conftest.err' | ||
| 11830 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11944 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11831 | (eval $ac_try) 2>&5 | 11945 | (eval $ac_try) 2>&5 |
| 11832 | ac_status=$? | 11946 | ac_status=$? |
| @@ -11902,7 +12016,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 11902 | cat conftest.err >&5 | 12016 | cat conftest.err >&5 |
| 11903 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12017 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11904 | (exit $ac_status); } && | 12018 | (exit $ac_status); } && |
| 11905 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 12019 | { ac_try='test -z "$ac_c_werror_flag" |
| 12020 | || test ! -s conftest.err' | ||
| 11906 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12021 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11907 | (eval $ac_try) 2>&5 | 12022 | (eval $ac_try) 2>&5 |
| 11908 | ac_status=$? | 12023 | ac_status=$? |
| @@ -12015,6 +12130,153 @@ fi | |||
| 12015 | 12130 | ||
| 12016 | fi | 12131 | fi |
| 12017 | 12132 | ||
| 12133 | if test "${ac_cv_header_malloc_malloc_h+set}" = set; then | ||
| 12134 | echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5 | ||
| 12135 | echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6 | ||
| 12136 | if test "${ac_cv_header_malloc_malloc_h+set}" = set; then | ||
| 12137 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
| 12138 | fi | ||
| 12139 | echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5 | ||
| 12140 | echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6 | ||
| 12141 | else | ||
| 12142 | # Is the header compilable? | ||
| 12143 | echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5 | ||
| 12144 | echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6 | ||
| 12145 | cat >conftest.$ac_ext <<_ACEOF | ||
| 12146 | /* confdefs.h. */ | ||
| 12147 | _ACEOF | ||
| 12148 | cat confdefs.h >>conftest.$ac_ext | ||
| 12149 | cat >>conftest.$ac_ext <<_ACEOF | ||
| 12150 | /* end confdefs.h. */ | ||
| 12151 | $ac_includes_default | ||
| 12152 | #include <malloc/malloc.h> | ||
| 12153 | _ACEOF | ||
| 12154 | rm -f conftest.$ac_objext | ||
| 12155 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
| 12156 | (eval $ac_compile) 2>conftest.er1 | ||
| 12157 | ac_status=$? | ||
| 12158 | grep -v '^ *+' conftest.er1 >conftest.err | ||
| 12159 | rm -f conftest.er1 | ||
| 12160 | cat conftest.err >&5 | ||
| 12161 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 12162 | (exit $ac_status); } && | ||
| 12163 | { ac_try='test -z "$ac_c_werror_flag" | ||
| 12164 | || test ! -s conftest.err' | ||
| 12165 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
| 12166 | (eval $ac_try) 2>&5 | ||
| 12167 | ac_status=$? | ||
| 12168 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 12169 | (exit $ac_status); }; } && | ||
| 12170 | { ac_try='test -s conftest.$ac_objext' | ||
| 12171 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
| 12172 | (eval $ac_try) 2>&5 | ||
| 12173 | ac_status=$? | ||
| 12174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 12175 | (exit $ac_status); }; }; then | ||
| 12176 | ac_header_compiler=yes | ||
| 12177 | else | ||
| 12178 | echo "$as_me: failed program was:" >&5 | ||
| 12179 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
| 12180 | |||
| 12181 | ac_header_compiler=no | ||
| 12182 | fi | ||
| 12183 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 12184 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | ||
| 12185 | echo "${ECHO_T}$ac_header_compiler" >&6 | ||
| 12186 | |||
| 12187 | # Is the header present? | ||
| 12188 | echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5 | ||
| 12189 | echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6 | ||
| 12190 | cat >conftest.$ac_ext <<_ACEOF | ||
| 12191 | /* confdefs.h. */ | ||
| 12192 | _ACEOF | ||
| 12193 | cat confdefs.h >>conftest.$ac_ext | ||
| 12194 | cat >>conftest.$ac_ext <<_ACEOF | ||
| 12195 | /* end confdefs.h. */ | ||
| 12196 | #include <malloc/malloc.h> | ||
| 12197 | _ACEOF | ||
| 12198 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
| 12199 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
| 12200 | ac_status=$? | ||
| 12201 | grep -v '^ *+' conftest.er1 >conftest.err | ||
| 12202 | rm -f conftest.er1 | ||
| 12203 | cat conftest.err >&5 | ||
| 12204 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 12205 | (exit $ac_status); } >/dev/null; then | ||
| 12206 | if test -s conftest.err; then | ||
| 12207 | ac_cpp_err=$ac_c_preproc_warn_flag | ||
| 12208 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | ||
| 12209 | else | ||
| 12210 | ac_cpp_err= | ||
| 12211 | fi | ||
| 12212 | else | ||
| 12213 | ac_cpp_err=yes | ||
| 12214 | fi | ||
| 12215 | if test -z "$ac_cpp_err"; then | ||
| 12216 | ac_header_preproc=yes | ||
| 12217 | else | ||
| 12218 | echo "$as_me: failed program was:" >&5 | ||
| 12219 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
| 12220 | |||
| 12221 | ac_header_preproc=no | ||
| 12222 | fi | ||
| 12223 | rm -f conftest.err conftest.$ac_ext | ||
| 12224 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | ||
| 12225 | echo "${ECHO_T}$ac_header_preproc" >&6 | ||
| 12226 | |||
| 12227 | # So? What about this header? | ||
| 12228 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | ||
| 12229 | yes:no: ) | ||
| 12230 | { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 | ||
| 12231 | echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} | ||
| 12232 | { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5 | ||
| 12233 | echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;} | ||
| 12234 | ac_header_preproc=yes | ||
| 12235 | ;; | ||
| 12236 | no:yes:* ) | ||
| 12237 | { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5 | ||
| 12238 | echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;} | ||
| 12239 | { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5 | ||
| 12240 | echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;} | ||
| 12241 | { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5 | ||
| 12242 | echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;} | ||
| 12243 | { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5 | ||
| 12244 | echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} | ||
| 12245 | { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5 | ||
| 12246 | echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;} | ||
| 12247 | { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5 | ||
| 12248 | echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;} | ||
| 12249 | ( | ||
| 12250 | cat <<\_ASBOX | ||
| 12251 | ## ------------------------------------------ ## | ||
| 12252 | ## Report this to the AC_PACKAGE_NAME lists. ## | ||
| 12253 | ## ------------------------------------------ ## | ||
| 12254 | _ASBOX | ||
| 12255 | ) | | ||
| 12256 | sed "s/^/$as_me: WARNING: /" >&2 | ||
| 12257 | ;; | ||
| 12258 | esac | ||
| 12259 | echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5 | ||
| 12260 | echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6 | ||
| 12261 | if test "${ac_cv_header_malloc_malloc_h+set}" = set; then | ||
| 12262 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
| 12263 | else | ||
| 12264 | ac_cv_header_malloc_malloc_h=$ac_header_preproc | ||
| 12265 | fi | ||
| 12266 | echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5 | ||
| 12267 | echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6 | ||
| 12268 | |||
| 12269 | fi | ||
| 12270 | if test $ac_cv_header_malloc_malloc_h = yes; then | ||
| 12271 | |||
| 12272 | cat >>confdefs.h <<\_ACEOF | ||
| 12273 | #define HAVE_MALLOC_MALLOC_H 1 | ||
| 12274 | _ACEOF | ||
| 12275 | |||
| 12276 | fi | ||
| 12277 | |||
| 12278 | |||
| 12279 | |||
| 12018 | if test "${HAVE_CARBON}" = "yes"; then | 12280 | if test "${HAVE_CARBON}" = "yes"; then |
| 12019 | 12281 | ||
| 12020 | cat >>confdefs.h <<\_ACEOF | 12282 | cat >>confdefs.h <<\_ACEOF |
| @@ -12067,7 +12329,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 12067 | cat conftest.err >&5 | 12329 | cat conftest.err >&5 |
| 12068 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12330 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12069 | (exit $ac_status); } && | 12331 | (exit $ac_status); } && |
| 12070 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 12332 | { ac_try='test -z "$ac_c_werror_flag" |
| 12333 | || test ! -s conftest.err' | ||
| 12071 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12334 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12072 | (eval $ac_try) 2>&5 | 12335 | (eval $ac_try) 2>&5 |
| 12073 | ac_status=$? | 12336 | ac_status=$? |
| @@ -12212,7 +12475,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12212 | cat conftest.err >&5 | 12475 | cat conftest.err >&5 |
| 12213 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12476 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12214 | (exit $ac_status); } && | 12477 | (exit $ac_status); } && |
| 12215 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 12478 | { ac_try='test -z "$ac_c_werror_flag" |
| 12479 | || test ! -s conftest.err' | ||
| 12216 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12480 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12217 | (eval $ac_try) 2>&5 | 12481 | (eval $ac_try) 2>&5 |
| 12218 | ac_status=$? | 12482 | ac_status=$? |
| @@ -12288,7 +12552,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12288 | cat conftest.err >&5 | 12552 | cat conftest.err >&5 |
| 12289 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12553 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12290 | (exit $ac_status); } && | 12554 | (exit $ac_status); } && |
| 12291 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 12555 | { ac_try='test -z "$ac_c_werror_flag" |
| 12556 | || test ! -s conftest.err' | ||
| 12292 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12557 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12293 | (eval $ac_try) 2>&5 | 12558 | (eval $ac_try) 2>&5 |
| 12294 | ac_status=$? | 12559 | ac_status=$? |
| @@ -12351,7 +12616,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12351 | cat conftest.err >&5 | 12616 | cat conftest.err >&5 |
| 12352 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12617 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12353 | (exit $ac_status); } && | 12618 | (exit $ac_status); } && |
| 12354 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 12619 | { ac_try='test -z "$ac_c_werror_flag" |
| 12620 | || test ! -s conftest.err' | ||
| 12355 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12621 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12356 | (eval $ac_try) 2>&5 | 12622 | (eval $ac_try) 2>&5 |
| 12357 | ac_status=$? | 12623 | ac_status=$? |
| @@ -12432,7 +12698,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12432 | cat conftest.err >&5 | 12698 | cat conftest.err >&5 |
| 12433 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12699 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12434 | (exit $ac_status); } && | 12700 | (exit $ac_status); } && |
| 12435 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 12701 | { ac_try='test -z "$ac_c_werror_flag" |
| 12702 | || test ! -s conftest.err' | ||
| 12436 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12703 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12437 | (eval $ac_try) 2>&5 | 12704 | (eval $ac_try) 2>&5 |
| 12438 | ac_status=$? | 12705 | ac_status=$? |
| @@ -12573,7 +12840,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12573 | cat conftest.err >&5 | 12840 | cat conftest.err >&5 |
| 12574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12841 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12575 | (exit $ac_status); } && | 12842 | (exit $ac_status); } && |
| 12576 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 12843 | { ac_try='test -z "$ac_c_werror_flag" |
| 12844 | || test ! -s conftest.err' | ||
| 12577 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12845 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12578 | (eval $ac_try) 2>&5 | 12846 | (eval $ac_try) 2>&5 |
| 12579 | ac_status=$? | 12847 | ac_status=$? |
| @@ -12718,7 +12986,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12718 | cat conftest.err >&5 | 12986 | cat conftest.err >&5 |
| 12719 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12987 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12720 | (exit $ac_status); } && | 12988 | (exit $ac_status); } && |
| 12721 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 12989 | { ac_try='test -z "$ac_c_werror_flag" |
| 12990 | || test ! -s conftest.err' | ||
| 12722 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12991 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12723 | (eval $ac_try) 2>&5 | 12992 | (eval $ac_try) 2>&5 |
| 12724 | ac_status=$? | 12993 | ac_status=$? |
| @@ -12794,7 +13063,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12794 | cat conftest.err >&5 | 13063 | cat conftest.err >&5 |
| 12795 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13064 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12796 | (exit $ac_status); } && | 13065 | (exit $ac_status); } && |
| 12797 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 13066 | { ac_try='test -z "$ac_c_werror_flag" |
| 13067 | || test ! -s conftest.err' | ||
| 12798 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13068 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12799 | (eval $ac_try) 2>&5 | 13069 | (eval $ac_try) 2>&5 |
| 12800 | ac_status=$? | 13070 | ac_status=$? |
| @@ -12867,7 +13137,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12867 | cat conftest.err >&5 | 13137 | cat conftest.err >&5 |
| 12868 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13138 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12869 | (exit $ac_status); } && | 13139 | (exit $ac_status); } && |
| 12870 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 13140 | { ac_try='test -z "$ac_c_werror_flag" |
| 13141 | || test ! -s conftest.err' | ||
| 12871 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13142 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12872 | (eval $ac_try) 2>&5 | 13143 | (eval $ac_try) 2>&5 |
| 12873 | ac_status=$? | 13144 | ac_status=$? |
| @@ -13022,7 +13293,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 13022 | cat conftest.err >&5 | 13293 | cat conftest.err >&5 |
| 13023 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13294 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13024 | (exit $ac_status); } && | 13295 | (exit $ac_status); } && |
| 13025 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 13296 | { ac_try='test -z "$ac_c_werror_flag" |
| 13297 | || test ! -s conftest.err' | ||
| 13026 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13298 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13027 | (eval $ac_try) 2>&5 | 13299 | (eval $ac_try) 2>&5 |
| 13028 | ac_status=$? | 13300 | ac_status=$? |
| @@ -13088,7 +13360,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 13088 | cat conftest.err >&5 | 13360 | cat conftest.err >&5 |
| 13089 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13361 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13090 | (exit $ac_status); } && | 13362 | (exit $ac_status); } && |
| 13091 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 13363 | { ac_try='test -z "$ac_c_werror_flag" |
| 13364 | || test ! -s conftest.err' | ||
| 13092 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13365 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13093 | (eval $ac_try) 2>&5 | 13366 | (eval $ac_try) 2>&5 |
| 13094 | ac_status=$? | 13367 | ac_status=$? |
| @@ -13346,7 +13619,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 13346 | cat conftest.err >&5 | 13619 | cat conftest.err >&5 |
| 13347 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13620 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13348 | (exit $ac_status); } && | 13621 | (exit $ac_status); } && |
| 13349 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 13622 | { ac_try='test -z "$ac_c_werror_flag" |
| 13623 | || test ! -s conftest.err' | ||
| 13350 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13624 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13351 | (eval $ac_try) 2>&5 | 13625 | (eval $ac_try) 2>&5 |
| 13352 | ac_status=$? | 13626 | ac_status=$? |
| @@ -13413,7 +13687,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 13413 | cat conftest.err >&5 | 13687 | cat conftest.err >&5 |
| 13414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13688 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13415 | (exit $ac_status); } && | 13689 | (exit $ac_status); } && |
| 13416 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 13690 | { ac_try='test -z "$ac_c_werror_flag" |
| 13691 | || test ! -s conftest.err' | ||
| 13417 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13692 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13418 | (eval $ac_try) 2>&5 | 13693 | (eval $ac_try) 2>&5 |
| 13419 | ac_status=$? | 13694 | ac_status=$? |
| @@ -13565,7 +13840,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 13565 | cat conftest.err >&5 | 13840 | cat conftest.err >&5 |
| 13566 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13841 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13567 | (exit $ac_status); } && | 13842 | (exit $ac_status); } && |
| 13568 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 13843 | { ac_try='test -z "$ac_c_werror_flag" |
| 13844 | || test ! -s conftest.err' | ||
| 13569 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13845 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13570 | (eval $ac_try) 2>&5 | 13846 | (eval $ac_try) 2>&5 |
| 13571 | ac_status=$? | 13847 | ac_status=$? |
| @@ -13749,7 +14025,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 13749 | cat conftest.err >&5 | 14025 | cat conftest.err >&5 |
| 13750 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14026 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13751 | (exit $ac_status); } && | 14027 | (exit $ac_status); } && |
| 13752 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 14028 | { ac_try='test -z "$ac_c_werror_flag" |
| 14029 | || test ! -s conftest.err' | ||
| 13753 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14030 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13754 | (eval $ac_try) 2>&5 | 14031 | (eval $ac_try) 2>&5 |
| 13755 | ac_status=$? | 14032 | ac_status=$? |
| @@ -14076,7 +14353,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14076 | cat conftest.err >&5 | 14353 | cat conftest.err >&5 |
| 14077 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14354 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14078 | (exit $ac_status); } && | 14355 | (exit $ac_status); } && |
| 14079 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 14356 | { ac_try='test -z "$ac_c_werror_flag" |
| 14357 | || test ! -s conftest.err' | ||
| 14080 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14358 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14081 | (eval $ac_try) 2>&5 | 14359 | (eval $ac_try) 2>&5 |
| 14082 | ac_status=$? | 14360 | ac_status=$? |
| @@ -14177,7 +14455,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14177 | cat conftest.err >&5 | 14455 | cat conftest.err >&5 |
| 14178 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14456 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14179 | (exit $ac_status); } && | 14457 | (exit $ac_status); } && |
| 14180 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 14458 | { ac_try='test -z "$ac_c_werror_flag" |
| 14459 | || test ! -s conftest.err' | ||
| 14181 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14460 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14182 | (eval $ac_try) 2>&5 | 14461 | (eval $ac_try) 2>&5 |
| 14183 | ac_status=$? | 14462 | ac_status=$? |
| @@ -14250,7 +14529,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14250 | cat conftest.err >&5 | 14529 | cat conftest.err >&5 |
| 14251 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14530 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14252 | (exit $ac_status); } && | 14531 | (exit $ac_status); } && |
| 14253 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 14532 | { ac_try='test -z "$ac_c_werror_flag" |
| 14533 | || test ! -s conftest.err' | ||
| 14254 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14534 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14255 | (eval $ac_try) 2>&5 | 14535 | (eval $ac_try) 2>&5 |
| 14256 | ac_status=$? | 14536 | ac_status=$? |
| @@ -14329,7 +14609,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14329 | cat conftest.err >&5 | 14609 | cat conftest.err >&5 |
| 14330 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14610 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14331 | (exit $ac_status); } && | 14611 | (exit $ac_status); } && |
| 14332 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 14612 | { ac_try='test -z "$ac_c_werror_flag" |
| 14613 | || test ! -s conftest.err' | ||
| 14333 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14614 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14334 | (eval $ac_try) 2>&5 | 14615 | (eval $ac_try) 2>&5 |
| 14335 | ac_status=$? | 14616 | ac_status=$? |
| @@ -14398,7 +14679,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14398 | cat conftest.err >&5 | 14679 | cat conftest.err >&5 |
| 14399 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14680 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14400 | (exit $ac_status); } && | 14681 | (exit $ac_status); } && |
| 14401 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 14682 | { ac_try='test -z "$ac_c_werror_flag" |
| 14683 | || test ! -s conftest.err' | ||
| 14402 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14684 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14403 | (eval $ac_try) 2>&5 | 14685 | (eval $ac_try) 2>&5 |
| 14404 | ac_status=$? | 14686 | ac_status=$? |
| @@ -14466,7 +14748,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14466 | cat conftest.err >&5 | 14748 | cat conftest.err >&5 |
| 14467 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14749 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14468 | (exit $ac_status); } && | 14750 | (exit $ac_status); } && |
| 14469 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 14751 | { ac_try='test -z "$ac_c_werror_flag" |
| 14752 | || test ! -s conftest.err' | ||
| 14470 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14753 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14471 | (eval $ac_try) 2>&5 | 14754 | (eval $ac_try) 2>&5 |
| 14472 | ac_status=$? | 14755 | ac_status=$? |
| @@ -14540,7 +14823,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14540 | cat conftest.err >&5 | 14823 | cat conftest.err >&5 |
| 14541 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14824 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14542 | (exit $ac_status); } && | 14825 | (exit $ac_status); } && |
| 14543 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 14826 | { ac_try='test -z "$ac_c_werror_flag" |
| 14827 | || test ! -s conftest.err' | ||
| 14544 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14828 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14545 | (eval $ac_try) 2>&5 | 14829 | (eval $ac_try) 2>&5 |
| 14546 | ac_status=$? | 14830 | ac_status=$? |
| @@ -14644,7 +14928,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14644 | cat conftest.err >&5 | 14928 | cat conftest.err >&5 |
| 14645 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14929 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14646 | (exit $ac_status); } && | 14930 | (exit $ac_status); } && |
| 14647 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 14931 | { ac_try='test -z "$ac_c_werror_flag" |
| 14932 | || test ! -s conftest.err' | ||
| 14648 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14933 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14649 | (eval $ac_try) 2>&5 | 14934 | (eval $ac_try) 2>&5 |
| 14650 | ac_status=$? | 14935 | ac_status=$? |
| @@ -14719,7 +15004,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 14719 | cat conftest.err >&5 | 15004 | cat conftest.err >&5 |
| 14720 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14721 | (exit $ac_status); } && | 15006 | (exit $ac_status); } && |
| 14722 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 15007 | { ac_try='test -z "$ac_c_werror_flag" |
| 15008 | || test ! -s conftest.err' | ||
| 14723 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15009 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14724 | (eval $ac_try) 2>&5 | 15010 | (eval $ac_try) 2>&5 |
| 14725 | ac_status=$? | 15011 | ac_status=$? |
| @@ -14871,7 +15157,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14871 | cat conftest.err >&5 | 15157 | cat conftest.err >&5 |
| 14872 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15158 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14873 | (exit $ac_status); } && | 15159 | (exit $ac_status); } && |
| 14874 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 15160 | { ac_try='test -z "$ac_c_werror_flag" |
| 15161 | || test ! -s conftest.err' | ||
| 14875 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15162 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14876 | (eval $ac_try) 2>&5 | 15163 | (eval $ac_try) 2>&5 |
| 14877 | ac_status=$? | 15164 | ac_status=$? |
| @@ -14939,7 +15226,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 14939 | cat conftest.err >&5 | 15226 | cat conftest.err >&5 |
| 14940 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15227 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14941 | (exit $ac_status); } && | 15228 | (exit $ac_status); } && |
| 14942 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 15229 | { ac_try='test -z "$ac_c_werror_flag" |
| 15230 | || test ! -s conftest.err' | ||
| 14943 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15231 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14944 | (eval $ac_try) 2>&5 | 15232 | (eval $ac_try) 2>&5 |
| 14945 | ac_status=$? | 15233 | ac_status=$? |
| @@ -15116,7 +15404,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 15116 | cat conftest.err >&5 | 15404 | cat conftest.err >&5 |
| 15117 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15405 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15118 | (exit $ac_status); } && | 15406 | (exit $ac_status); } && |
| 15119 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 15407 | { ac_try='test -z "$ac_c_werror_flag" |
| 15408 | || test ! -s conftest.err' | ||
| 15120 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15409 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15121 | (eval $ac_try) 2>&5 | 15410 | (eval $ac_try) 2>&5 |
| 15122 | ac_status=$? | 15411 | ac_status=$? |
| @@ -15192,7 +15481,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 15192 | cat conftest.err >&5 | 15481 | cat conftest.err >&5 |
| 15193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15482 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15194 | (exit $ac_status); } && | 15483 | (exit $ac_status); } && |
| 15195 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 15484 | { ac_try='test -z "$ac_c_werror_flag" |
| 15485 | || test ! -s conftest.err' | ||
| 15196 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15486 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15197 | (eval $ac_try) 2>&5 | 15487 | (eval $ac_try) 2>&5 |
| 15198 | ac_status=$? | 15488 | ac_status=$? |
| @@ -15346,7 +15636,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 15346 | cat conftest.err >&5 | 15636 | cat conftest.err >&5 |
| 15347 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15637 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15348 | (exit $ac_status); } && | 15638 | (exit $ac_status); } && |
| 15349 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 15639 | { ac_try='test -z "$ac_c_werror_flag" |
| 15640 | || test ! -s conftest.err' | ||
| 15350 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15641 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15351 | (eval $ac_try) 2>&5 | 15642 | (eval $ac_try) 2>&5 |
| 15352 | ac_status=$? | 15643 | ac_status=$? |
| @@ -15497,7 +15788,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 15497 | cat conftest.err >&5 | 15788 | cat conftest.err >&5 |
| 15498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15499 | (exit $ac_status); } && | 15790 | (exit $ac_status); } && |
| 15500 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 15791 | { ac_try='test -z "$ac_c_werror_flag" |
| 15792 | || test ! -s conftest.err' | ||
| 15501 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15793 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15502 | (eval $ac_try) 2>&5 | 15794 | (eval $ac_try) 2>&5 |
| 15503 | ac_status=$? | 15795 | ac_status=$? |
| @@ -15648,7 +15940,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 15648 | cat conftest.err >&5 | 15940 | cat conftest.err >&5 |
| 15649 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15941 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15650 | (exit $ac_status); } && | 15942 | (exit $ac_status); } && |
| 15651 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 15943 | { ac_try='test -z "$ac_c_werror_flag" |
| 15944 | || test ! -s conftest.err' | ||
| 15652 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15945 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15653 | (eval $ac_try) 2>&5 | 15946 | (eval $ac_try) 2>&5 |
| 15654 | ac_status=$? | 15947 | ac_status=$? |
| @@ -15790,7 +16083,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 15790 | cat conftest.err >&5 | 16083 | cat conftest.err >&5 |
| 15791 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16084 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15792 | (exit $ac_status); } && | 16085 | (exit $ac_status); } && |
| 15793 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16086 | { ac_try='test -z "$ac_c_werror_flag" |
| 16087 | || test ! -s conftest.err' | ||
| 15794 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16088 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15795 | (eval $ac_try) 2>&5 | 16089 | (eval $ac_try) 2>&5 |
| 15796 | ac_status=$? | 16090 | ac_status=$? |
| @@ -15834,7 +16128,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 15834 | cat conftest.err >&5 | 16128 | cat conftest.err >&5 |
| 15835 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16129 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15836 | (exit $ac_status); } && | 16130 | (exit $ac_status); } && |
| 15837 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16131 | { ac_try='test -z "$ac_c_werror_flag" |
| 16132 | || test ! -s conftest.err' | ||
| 15838 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16133 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15839 | (eval $ac_try) 2>&5 | 16134 | (eval $ac_try) 2>&5 |
| 15840 | ac_status=$? | 16135 | ac_status=$? |
| @@ -15980,7 +16275,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 15980 | cat conftest.err >&5 | 16275 | cat conftest.err >&5 |
| 15981 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15982 | (exit $ac_status); } && | 16277 | (exit $ac_status); } && |
| 15983 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16278 | { ac_try='test -z "$ac_c_werror_flag" |
| 16279 | || test ! -s conftest.err' | ||
| 15984 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16280 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15985 | (eval $ac_try) 2>&5 | 16281 | (eval $ac_try) 2>&5 |
| 15986 | ac_status=$? | 16282 | ac_status=$? |
| @@ -16024,7 +16320,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 16024 | cat conftest.err >&5 | 16320 | cat conftest.err >&5 |
| 16025 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16321 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16026 | (exit $ac_status); } && | 16322 | (exit $ac_status); } && |
| 16027 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16323 | { ac_try='test -z "$ac_c_werror_flag" |
| 16324 | || test ! -s conftest.err' | ||
| 16028 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16325 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16029 | (eval $ac_try) 2>&5 | 16326 | (eval $ac_try) 2>&5 |
| 16030 | ac_status=$? | 16327 | ac_status=$? |
| @@ -16089,7 +16386,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16089 | cat conftest.err >&5 | 16386 | cat conftest.err >&5 |
| 16090 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16387 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16091 | (exit $ac_status); } && | 16388 | (exit $ac_status); } && |
| 16092 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16389 | { ac_try='test -z "$ac_c_werror_flag" |
| 16390 | || test ! -s conftest.err' | ||
| 16093 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16391 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16094 | (eval $ac_try) 2>&5 | 16392 | (eval $ac_try) 2>&5 |
| 16095 | ac_status=$? | 16393 | ac_status=$? |
| @@ -16152,7 +16450,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 16152 | cat conftest.err >&5 | 16450 | cat conftest.err >&5 |
| 16153 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16451 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16154 | (exit $ac_status); } && | 16452 | (exit $ac_status); } && |
| 16155 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16453 | { ac_try='test -z "$ac_c_werror_flag" |
| 16454 | || test ! -s conftest.err' | ||
| 16156 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16455 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16157 | (eval $ac_try) 2>&5 | 16456 | (eval $ac_try) 2>&5 |
| 16158 | ac_status=$? | 16457 | ac_status=$? |
| @@ -16254,7 +16553,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16254 | cat conftest.err >&5 | 16553 | cat conftest.err >&5 |
| 16255 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16554 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16256 | (exit $ac_status); } && | 16555 | (exit $ac_status); } && |
| 16257 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16556 | { ac_try='test -z "$ac_c_werror_flag" |
| 16557 | || test ! -s conftest.err' | ||
| 16258 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16558 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16259 | (eval $ac_try) 2>&5 | 16559 | (eval $ac_try) 2>&5 |
| 16260 | ac_status=$? | 16560 | ac_status=$? |
| @@ -16323,7 +16623,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16323 | cat conftest.err >&5 | 16623 | cat conftest.err >&5 |
| 16324 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16624 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16325 | (exit $ac_status); } && | 16625 | (exit $ac_status); } && |
| 16326 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16626 | { ac_try='test -z "$ac_c_werror_flag" |
| 16627 | || test ! -s conftest.err' | ||
| 16327 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16628 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16328 | (eval $ac_try) 2>&5 | 16629 | (eval $ac_try) 2>&5 |
| 16329 | ac_status=$? | 16630 | ac_status=$? |
| @@ -16430,7 +16731,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16430 | cat conftest.err >&5 | 16731 | cat conftest.err >&5 |
| 16431 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16732 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16432 | (exit $ac_status); } && | 16733 | (exit $ac_status); } && |
| 16433 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16734 | { ac_try='test -z "$ac_c_werror_flag" |
| 16735 | || test ! -s conftest.err' | ||
| 16434 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16736 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16435 | (eval $ac_try) 2>&5 | 16737 | (eval $ac_try) 2>&5 |
| 16436 | ac_status=$? | 16738 | ac_status=$? |
| @@ -16533,7 +16835,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16533 | cat conftest.err >&5 | 16835 | cat conftest.err >&5 |
| 16534 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16836 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16535 | (exit $ac_status); } && | 16837 | (exit $ac_status); } && |
| 16536 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16838 | { ac_try='test -z "$ac_c_werror_flag" |
| 16839 | || test ! -s conftest.err' | ||
| 16537 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16840 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16538 | (eval $ac_try) 2>&5 | 16841 | (eval $ac_try) 2>&5 |
| 16539 | ac_status=$? | 16842 | ac_status=$? |
| @@ -16609,7 +16912,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16609 | cat conftest.err >&5 | 16912 | cat conftest.err >&5 |
| 16610 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16913 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16611 | (exit $ac_status); } && | 16914 | (exit $ac_status); } && |
| 16612 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 16915 | { ac_try='test -z "$ac_c_werror_flag" |
| 16916 | || test ! -s conftest.err' | ||
| 16613 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16917 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16614 | (eval $ac_try) 2>&5 | 16918 | (eval $ac_try) 2>&5 |
| 16615 | ac_status=$? | 16919 | ac_status=$? |
| @@ -16713,7 +17017,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16713 | cat conftest.err >&5 | 17017 | cat conftest.err >&5 |
| 16714 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17018 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16715 | (exit $ac_status); } && | 17019 | (exit $ac_status); } && |
| 16716 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17020 | { ac_try='test -z "$ac_c_werror_flag" |
| 17021 | || test ! -s conftest.err' | ||
| 16717 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17022 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16718 | (eval $ac_try) 2>&5 | 17023 | (eval $ac_try) 2>&5 |
| 16719 | ac_status=$? | 17024 | ac_status=$? |
| @@ -16805,7 +17110,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16805 | cat conftest.err >&5 | 17110 | cat conftest.err >&5 |
| 16806 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17111 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16807 | (exit $ac_status); } && | 17112 | (exit $ac_status); } && |
| 16808 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17113 | { ac_try='test -z "$ac_c_werror_flag" |
| 17114 | || test ! -s conftest.err' | ||
| 16809 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17115 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16810 | (eval $ac_try) 2>&5 | 17116 | (eval $ac_try) 2>&5 |
| 16811 | ac_status=$? | 17117 | ac_status=$? |
| @@ -16870,7 +17176,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16870 | cat conftest.err >&5 | 17176 | cat conftest.err >&5 |
| 16871 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17177 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16872 | (exit $ac_status); } && | 17178 | (exit $ac_status); } && |
| 16873 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17179 | { ac_try='test -z "$ac_c_werror_flag" |
| 17180 | || test ! -s conftest.err' | ||
| 16874 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17181 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16875 | (eval $ac_try) 2>&5 | 17182 | (eval $ac_try) 2>&5 |
| 16876 | ac_status=$? | 17183 | ac_status=$? |
| @@ -16936,7 +17243,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16936 | cat conftest.err >&5 | 17243 | cat conftest.err >&5 |
| 16937 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17244 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16938 | (exit $ac_status); } && | 17245 | (exit $ac_status); } && |
| 16939 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17246 | { ac_try='test -z "$ac_c_werror_flag" |
| 17247 | || test ! -s conftest.err' | ||
| 16940 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17248 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16941 | (eval $ac_try) 2>&5 | 17249 | (eval $ac_try) 2>&5 |
| 16942 | ac_status=$? | 17250 | ac_status=$? |
| @@ -17046,7 +17354,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17046 | cat conftest.err >&5 | 17354 | cat conftest.err >&5 |
| 17047 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17355 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17048 | (exit $ac_status); } && | 17356 | (exit $ac_status); } && |
| 17049 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17357 | { ac_try='test -z "$ac_c_werror_flag" |
| 17358 | || test ! -s conftest.err' | ||
| 17050 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17359 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17051 | (eval $ac_try) 2>&5 | 17360 | (eval $ac_try) 2>&5 |
| 17052 | ac_status=$? | 17361 | ac_status=$? |
| @@ -17111,7 +17420,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17111 | cat conftest.err >&5 | 17420 | cat conftest.err >&5 |
| 17112 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17421 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17113 | (exit $ac_status); } && | 17422 | (exit $ac_status); } && |
| 17114 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17423 | { ac_try='test -z "$ac_c_werror_flag" |
| 17424 | || test ! -s conftest.err' | ||
| 17115 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17425 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17116 | (eval $ac_try) 2>&5 | 17426 | (eval $ac_try) 2>&5 |
| 17117 | ac_status=$? | 17427 | ac_status=$? |
| @@ -17191,7 +17501,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17191 | cat conftest.err >&5 | 17501 | cat conftest.err >&5 |
| 17192 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17502 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17193 | (exit $ac_status); } && | 17503 | (exit $ac_status); } && |
| 17194 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17504 | { ac_try='test -z "$ac_c_werror_flag" |
| 17505 | || test ! -s conftest.err' | ||
| 17195 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17506 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17196 | (eval $ac_try) 2>&5 | 17507 | (eval $ac_try) 2>&5 |
| 17197 | ac_status=$? | 17508 | ac_status=$? |
| @@ -17264,7 +17575,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17264 | cat conftest.err >&5 | 17575 | cat conftest.err >&5 |
| 17265 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17266 | (exit $ac_status); } && | 17577 | (exit $ac_status); } && |
| 17267 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17578 | { ac_try='test -z "$ac_c_werror_flag" |
| 17579 | || test ! -s conftest.err' | ||
| 17268 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17580 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17269 | (eval $ac_try) 2>&5 | 17581 | (eval $ac_try) 2>&5 |
| 17270 | ac_status=$? | 17582 | ac_status=$? |
| @@ -17337,7 +17649,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17337 | cat conftest.err >&5 | 17649 | cat conftest.err >&5 |
| 17338 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17650 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17339 | (exit $ac_status); } && | 17651 | (exit $ac_status); } && |
| 17340 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17652 | { ac_try='test -z "$ac_c_werror_flag" |
| 17653 | || test ! -s conftest.err' | ||
| 17341 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17654 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17342 | (eval $ac_try) 2>&5 | 17655 | (eval $ac_try) 2>&5 |
| 17343 | ac_status=$? | 17656 | ac_status=$? |
| @@ -17410,7 +17723,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17410 | cat conftest.err >&5 | 17723 | cat conftest.err >&5 |
| 17411 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17724 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17412 | (exit $ac_status); } && | 17725 | (exit $ac_status); } && |
| 17413 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17726 | { ac_try='test -z "$ac_c_werror_flag" |
| 17727 | || test ! -s conftest.err' | ||
| 17414 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17728 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17415 | (eval $ac_try) 2>&5 | 17729 | (eval $ac_try) 2>&5 |
| 17416 | ac_status=$? | 17730 | ac_status=$? |
| @@ -17484,7 +17798,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17484 | cat conftest.err >&5 | 17798 | cat conftest.err >&5 |
| 17485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17799 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17486 | (exit $ac_status); } && | 17800 | (exit $ac_status); } && |
| 17487 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17801 | { ac_try='test -z "$ac_c_werror_flag" |
| 17802 | || test ! -s conftest.err' | ||
| 17488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17803 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17489 | (eval $ac_try) 2>&5 | 17804 | (eval $ac_try) 2>&5 |
| 17490 | ac_status=$? | 17805 | ac_status=$? |
| @@ -17556,7 +17871,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17556 | cat conftest.err >&5 | 17871 | cat conftest.err >&5 |
| 17557 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17872 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17558 | (exit $ac_status); } && | 17873 | (exit $ac_status); } && |
| 17559 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17874 | { ac_try='test -z "$ac_c_werror_flag" |
| 17875 | || test ! -s conftest.err' | ||
| 17560 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17876 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17561 | (eval $ac_try) 2>&5 | 17877 | (eval $ac_try) 2>&5 |
| 17562 | ac_status=$? | 17878 | ac_status=$? |
| @@ -17631,7 +17947,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17631 | cat conftest.err >&5 | 17947 | cat conftest.err >&5 |
| 17632 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17948 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17633 | (exit $ac_status); } && | 17949 | (exit $ac_status); } && |
| 17634 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 17950 | { ac_try='test -z "$ac_c_werror_flag" |
| 17951 | || test ! -s conftest.err' | ||
| 17635 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17952 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17636 | (eval $ac_try) 2>&5 | 17953 | (eval $ac_try) 2>&5 |
| 17637 | ac_status=$? | 17954 | ac_status=$? |
| @@ -17703,7 +18020,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17703 | cat conftest.err >&5 | 18020 | cat conftest.err >&5 |
| 17704 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18021 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17705 | (exit $ac_status); } && | 18022 | (exit $ac_status); } && |
| 17706 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 18023 | { ac_try='test -z "$ac_c_werror_flag" |
| 18024 | || test ! -s conftest.err' | ||
| 17707 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18025 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17708 | (eval $ac_try) 2>&5 | 18026 | (eval $ac_try) 2>&5 |
| 17709 | ac_status=$? | 18027 | ac_status=$? |
| @@ -17776,7 +18094,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 17776 | cat conftest.err >&5 | 18094 | cat conftest.err >&5 |
| 17777 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18095 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17778 | (exit $ac_status); } && | 18096 | (exit $ac_status); } && |
| 17779 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 18097 | { ac_try='test -z "$ac_c_werror_flag" |
| 18098 | || test ! -s conftest.err' | ||
| 17780 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18099 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17781 | (eval $ac_try) 2>&5 | 18100 | (eval $ac_try) 2>&5 |
| 17782 | ac_status=$? | 18101 | ac_status=$? |
| @@ -17926,7 +18245,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 17926 | cat conftest.err >&5 | 18245 | cat conftest.err >&5 |
| 17927 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17928 | (exit $ac_status); } && | 18247 | (exit $ac_status); } && |
| 17929 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 18248 | { ac_try='test -z "$ac_c_werror_flag" |
| 18249 | || test ! -s conftest.err' | ||
| 17930 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18250 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17931 | (eval $ac_try) 2>&5 | 18251 | (eval $ac_try) 2>&5 |
| 17932 | ac_status=$? | 18252 | ac_status=$? |
| @@ -18072,7 +18392,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 18072 | cat conftest.err >&5 | 18392 | cat conftest.err >&5 |
| 18073 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18393 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18074 | (exit $ac_status); } && | 18394 | (exit $ac_status); } && |
| 18075 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 18395 | { ac_try='test -z "$ac_c_werror_flag" |
| 18396 | || test ! -s conftest.err' | ||
| 18076 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18397 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18077 | (eval $ac_try) 2>&5 | 18398 | (eval $ac_try) 2>&5 |
| 18078 | ac_status=$? | 18399 | ac_status=$? |
| @@ -18218,7 +18539,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 18218 | cat conftest.err >&5 | 18539 | cat conftest.err >&5 |
| 18219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18540 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18220 | (exit $ac_status); } && | 18541 | (exit $ac_status); } && |
| 18221 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 18542 | { ac_try='test -z "$ac_c_werror_flag" |
| 18543 | || test ! -s conftest.err' | ||
| 18222 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18544 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18223 | (eval $ac_try) 2>&5 | 18545 | (eval $ac_try) 2>&5 |
| 18224 | ac_status=$? | 18546 | ac_status=$? |
| @@ -18375,7 +18697,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 18375 | cat conftest.err >&5 | 18697 | cat conftest.err >&5 |
| 18376 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18698 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18377 | (exit $ac_status); } && | 18699 | (exit $ac_status); } && |
| 18378 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 18700 | { ac_try='test -z "$ac_c_werror_flag" |
| 18701 | || test ! -s conftest.err' | ||
| 18379 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18702 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18380 | (eval $ac_try) 2>&5 | 18703 | (eval $ac_try) 2>&5 |
| 18381 | ac_status=$? | 18704 | ac_status=$? |
| @@ -18521,7 +18844,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 18521 | cat conftest.err >&5 | 18844 | cat conftest.err >&5 |
| 18522 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18523 | (exit $ac_status); } && | 18846 | (exit $ac_status); } && |
| 18524 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 18847 | { ac_try='test -z "$ac_c_werror_flag" |
| 18848 | || test ! -s conftest.err' | ||
| 18525 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18849 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18526 | (eval $ac_try) 2>&5 | 18850 | (eval $ac_try) 2>&5 |
| 18527 | ac_status=$? | 18851 | ac_status=$? |
| @@ -18667,7 +18991,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 18667 | cat conftest.err >&5 | 18991 | cat conftest.err >&5 |
| 18668 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18992 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18669 | (exit $ac_status); } && | 18993 | (exit $ac_status); } && |
| 18670 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 18994 | { ac_try='test -z "$ac_c_werror_flag" |
| 18995 | || test ! -s conftest.err' | ||
| 18671 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18996 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18672 | (eval $ac_try) 2>&5 | 18997 | (eval $ac_try) 2>&5 |
| 18673 | ac_status=$? | 18998 | ac_status=$? |
| @@ -18825,7 +19150,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 18825 | cat conftest.err >&5 | 19150 | cat conftest.err >&5 |
| 18826 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19151 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18827 | (exit $ac_status); } && | 19152 | (exit $ac_status); } && |
| 18828 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 19153 | { ac_try='test -z "$ac_c_werror_flag" |
| 19154 | || test ! -s conftest.err' | ||
| 18829 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19155 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18830 | (eval $ac_try) 2>&5 | 19156 | (eval $ac_try) 2>&5 |
| 18831 | ac_status=$? | 19157 | ac_status=$? |
| @@ -18983,7 +19309,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 18983 | cat conftest.err >&5 | 19309 | cat conftest.err >&5 |
| 18984 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18985 | (exit $ac_status); } && | 19311 | (exit $ac_status); } && |
| 18986 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 19312 | { ac_try='test -z "$ac_c_werror_flag" |
| 19313 | || test ! -s conftest.err' | ||
| 18987 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18988 | (eval $ac_try) 2>&5 | 19315 | (eval $ac_try) 2>&5 |
| 18989 | ac_status=$? | 19316 | ac_status=$? |
| @@ -19172,7 +19499,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 19172 | cat conftest.err >&5 | 19499 | cat conftest.err >&5 |
| 19173 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19500 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19174 | (exit $ac_status); } && | 19501 | (exit $ac_status); } && |
| 19175 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 19502 | { ac_try='test -z "$ac_c_werror_flag" |
| 19503 | || test ! -s conftest.err' | ||
| 19176 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19504 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19177 | (eval $ac_try) 2>&5 | 19505 | (eval $ac_try) 2>&5 |
| 19178 | ac_status=$? | 19506 | ac_status=$? |
| @@ -19245,7 +19573,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19245 | cat conftest.err >&5 | 19573 | cat conftest.err >&5 |
| 19246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19247 | (exit $ac_status); } && | 19575 | (exit $ac_status); } && |
| 19248 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 19576 | { ac_try='test -z "$ac_c_werror_flag" |
| 19577 | || test ! -s conftest.err' | ||
| 19249 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19578 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19250 | (eval $ac_try) 2>&5 | 19579 | (eval $ac_try) 2>&5 |
| 19251 | ac_status=$? | 19580 | ac_status=$? |
| @@ -19313,7 +19642,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19313 | cat conftest.err >&5 | 19642 | cat conftest.err >&5 |
| 19314 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19643 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19315 | (exit $ac_status); } && | 19644 | (exit $ac_status); } && |
| 19316 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 19645 | { ac_try='test -z "$ac_c_werror_flag" |
| 19646 | || test ! -s conftest.err' | ||
| 19317 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19647 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19318 | (eval $ac_try) 2>&5 | 19648 | (eval $ac_try) 2>&5 |
| 19319 | ac_status=$? | 19649 | ac_status=$? |
| @@ -19359,7 +19689,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19359 | cat conftest.err >&5 | 19689 | cat conftest.err >&5 |
| 19360 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19690 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19361 | (exit $ac_status); } && | 19691 | (exit $ac_status); } && |
| 19362 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 19692 | { ac_try='test -z "$ac_c_werror_flag" |
| 19693 | || test ! -s conftest.err' | ||
| 19363 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19694 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19364 | (eval $ac_try) 2>&5 | 19695 | (eval $ac_try) 2>&5 |
| 19365 | ac_status=$? | 19696 | ac_status=$? |
| @@ -19433,7 +19764,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 19433 | cat conftest.err >&5 | 19764 | cat conftest.err >&5 |
| 19434 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19765 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19435 | (exit $ac_status); } && | 19766 | (exit $ac_status); } && |
| 19436 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 19767 | { ac_try='test -z "$ac_c_werror_flag" |
| 19768 | || test ! -s conftest.err' | ||
| 19437 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19769 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19438 | (eval $ac_try) 2>&5 | 19770 | (eval $ac_try) 2>&5 |
| 19439 | ac_status=$? | 19771 | ac_status=$? |
| @@ -19497,7 +19829,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19497 | cat conftest.err >&5 | 19829 | cat conftest.err >&5 |
| 19498 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19830 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19499 | (exit $ac_status); } && | 19831 | (exit $ac_status); } && |
| 19500 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 19832 | { ac_try='test -z "$ac_c_werror_flag" |
| 19833 | || test ! -s conftest.err' | ||
| 19501 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19834 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19502 | (eval $ac_try) 2>&5 | 19835 | (eval $ac_try) 2>&5 |
| 19503 | ac_status=$? | 19836 | ac_status=$? |
| @@ -19635,7 +19968,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 19635 | cat conftest.err >&5 | 19968 | cat conftest.err >&5 |
| 19636 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19637 | (exit $ac_status); } && | 19970 | (exit $ac_status); } && |
| 19638 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 19971 | { ac_try='test -z "$ac_c_werror_flag" |
| 19972 | || test ! -s conftest.err' | ||
| 19639 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19973 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19640 | (eval $ac_try) 2>&5 | 19974 | (eval $ac_try) 2>&5 |
| 19641 | ac_status=$? | 19975 | ac_status=$? |
| @@ -19696,7 +20030,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19696 | cat conftest.err >&5 | 20030 | cat conftest.err >&5 |
| 19697 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20031 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19698 | (exit $ac_status); } && | 20032 | (exit $ac_status); } && |
| 19699 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 20033 | { ac_try='test -z "$ac_c_werror_flag" |
| 20034 | || test ! -s conftest.err' | ||
| 19700 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20035 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19701 | (eval $ac_try) 2>&5 | 20036 | (eval $ac_try) 2>&5 |
| 19702 | ac_status=$? | 20037 | ac_status=$? |
| @@ -19841,7 +20176,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19841 | cat conftest.err >&5 | 20176 | cat conftest.err >&5 |
| 19842 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20177 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19843 | (exit $ac_status); } && | 20178 | (exit $ac_status); } && |
| 19844 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 20179 | { ac_try='test -z "$ac_c_werror_flag" |
| 20180 | || test ! -s conftest.err' | ||
| 19845 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20181 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19846 | (eval $ac_try) 2>&5 | 20182 | (eval $ac_try) 2>&5 |
| 19847 | ac_status=$? | 20183 | ac_status=$? |
| @@ -19997,7 +20333,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19997 | cat conftest.err >&5 | 20333 | cat conftest.err >&5 |
| 19998 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20334 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19999 | (exit $ac_status); } && | 20335 | (exit $ac_status); } && |
| 20000 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 20336 | { ac_try='test -z "$ac_c_werror_flag" |
| 20337 | || test ! -s conftest.err' | ||
| 20001 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20338 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20002 | (eval $ac_try) 2>&5 | 20339 | (eval $ac_try) 2>&5 |
| 20003 | ac_status=$? | 20340 | ac_status=$? |
| @@ -20168,7 +20505,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20168 | cat conftest.err >&5 | 20505 | cat conftest.err >&5 |
| 20169 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20506 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20170 | (exit $ac_status); } && | 20507 | (exit $ac_status); } && |
| 20171 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 20508 | { ac_try='test -z "$ac_c_werror_flag" |
| 20509 | || test ! -s conftest.err' | ||
| 20172 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20510 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20173 | (eval $ac_try) 2>&5 | 20511 | (eval $ac_try) 2>&5 |
| 20174 | ac_status=$? | 20512 | ac_status=$? |
| @@ -20236,7 +20574,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20236 | cat conftest.err >&5 | 20574 | cat conftest.err >&5 |
| 20237 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20575 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20238 | (exit $ac_status); } && | 20576 | (exit $ac_status); } && |
| 20239 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 20577 | { ac_try='test -z "$ac_c_werror_flag" |
| 20578 | || test ! -s conftest.err' | ||
| 20240 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20579 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20241 | (eval $ac_try) 2>&5 | 20580 | (eval $ac_try) 2>&5 |
| 20242 | ac_status=$? | 20581 | ac_status=$? |
| @@ -20421,7 +20760,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 20421 | cat conftest.err >&5 | 20760 | cat conftest.err >&5 |
| 20422 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20761 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20423 | (exit $ac_status); } && | 20762 | (exit $ac_status); } && |
| 20424 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 20763 | { ac_try='test -z "$ac_c_werror_flag" |
| 20764 | || test ! -s conftest.err' | ||
| 20425 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20765 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20426 | (eval $ac_try) 2>&5 | 20766 | (eval $ac_try) 2>&5 |
| 20427 | ac_status=$? | 20767 | ac_status=$? |
| @@ -20714,7 +21054,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 20714 | cat conftest.err >&5 | 21054 | cat conftest.err >&5 |
| 20715 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21055 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20716 | (exit $ac_status); } && | 21056 | (exit $ac_status); } && |
| 20717 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 21057 | { ac_try='test -z "$ac_c_werror_flag" |
| 21058 | || test ! -s conftest.err' | ||
| 20718 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21059 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20719 | (eval $ac_try) 2>&5 | 21060 | (eval $ac_try) 2>&5 |
| 20720 | ac_status=$? | 21061 | ac_status=$? |
| @@ -20779,7 +21120,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20779 | cat conftest.err >&5 | 21120 | cat conftest.err >&5 |
| 20780 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21121 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20781 | (exit $ac_status); } && | 21122 | (exit $ac_status); } && |
| 20782 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 21123 | { ac_try='test -z "$ac_c_werror_flag" |
| 21124 | || test ! -s conftest.err' | ||
| 20783 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21125 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20784 | (eval $ac_try) 2>&5 | 21126 | (eval $ac_try) 2>&5 |
| 20785 | ac_status=$? | 21127 | ac_status=$? |
| @@ -20842,7 +21184,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20842 | cat conftest.err >&5 | 21184 | cat conftest.err >&5 |
| 20843 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21185 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20844 | (exit $ac_status); } && | 21186 | (exit $ac_status); } && |
| 20845 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 21187 | { ac_try='test -z "$ac_c_werror_flag" |
| 21188 | || test ! -s conftest.err' | ||
| 20846 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21189 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20847 | (eval $ac_try) 2>&5 | 21190 | (eval $ac_try) 2>&5 |
| 20848 | ac_status=$? | 21191 | ac_status=$? |
| @@ -20908,7 +21251,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20908 | cat conftest.err >&5 | 21251 | cat conftest.err >&5 |
| 20909 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20910 | (exit $ac_status); } && | 21253 | (exit $ac_status); } && |
| 20911 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 21254 | { ac_try='test -z "$ac_c_werror_flag" |
| 21255 | || test ! -s conftest.err' | ||
| 20912 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21256 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20913 | (eval $ac_try) 2>&5 | 21257 | (eval $ac_try) 2>&5 |
| 20914 | ac_status=$? | 21258 | ac_status=$? |
| @@ -20949,7 +21293,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20949 | cat conftest.err >&5 | 21293 | cat conftest.err >&5 |
| 20950 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21294 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20951 | (exit $ac_status); } && | 21295 | (exit $ac_status); } && |
| 20952 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 21296 | { ac_try='test -z "$ac_c_werror_flag" |
| 21297 | || test ! -s conftest.err' | ||
| 20953 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21298 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20954 | (eval $ac_try) 2>&5 | 21299 | (eval $ac_try) 2>&5 |
| 20955 | ac_status=$? | 21300 | ac_status=$? |
| @@ -21016,7 +21361,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 21016 | cat conftest.err >&5 | 21361 | cat conftest.err >&5 |
| 21017 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21362 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 21018 | (exit $ac_status); } && | 21363 | (exit $ac_status); } && |
| 21019 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | 21364 | { ac_try='test -z "$ac_c_werror_flag" |
| 21365 | || test ! -s conftest.err' | ||
| 21020 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21366 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 21021 | (eval $ac_try) 2>&5 | 21367 | (eval $ac_try) 2>&5 |
| 21022 | ac_status=$? | 21368 | ac_status=$? |
| @@ -21234,6 +21580,29 @@ echo " Does Emacs use -lpng? ${HAVE_PNG}" | |||
| 21234 | echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | 21580 | echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" |
| 21235 | echo | 21581 | echo |
| 21236 | 21582 | ||
| 21583 | if test "$emacs_cv_randomheap" = warn; then | ||
| 21584 | { echo "$as_me:$LINENO: WARNING: | ||
| 21585 | ********************************************************************** | ||
| 21586 | |||
| 21587 | Heap start address is randomized and no workaround is known. | ||
| 21588 | Emacs will probably dump core when temacs is run in the build phase. | ||
| 21589 | Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS' | ||
| 21590 | for further information. | ||
| 21591 | |||
| 21592 | ********************************************************************** | ||
| 21593 | " >&5 | ||
| 21594 | echo "$as_me: WARNING: | ||
| 21595 | ********************************************************************** | ||
| 21596 | |||
| 21597 | Heap start address is randomized and no workaround is known. | ||
| 21598 | Emacs will probably dump core when temacs is run in the build phase. | ||
| 21599 | Maybe exec-shield is turned on. Read about exec-shield in \`etc/PROBLEMS' | ||
| 21600 | for further information. | ||
| 21601 | |||
| 21602 | ********************************************************************** | ||
| 21603 | " >&2;} | ||
| 21604 | fi | ||
| 21605 | |||
| 21237 | # Remove any trailing slashes in these variables. | 21606 | # Remove any trailing slashes in these variables. |
| 21238 | test "${prefix}" != NONE && | 21607 | test "${prefix}" != NONE && |
| 21239 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | 21608 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` |
| @@ -21921,8 +22290,8 @@ s,@RANLIB@,$RANLIB,;t t | |||
| 21921 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | 22290 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t |
| 21922 | s,@INSTALL_INFO@,$INSTALL_INFO,;t t | 22291 | s,@INSTALL_INFO@,$INSTALL_INFO,;t t |
| 21923 | s,@EGREP@,$EGREP,;t t | 22292 | s,@EGREP@,$EGREP,;t t |
| 21924 | s,@SETARCH@,$SETARCH,;t t | ||
| 21925 | s,@LIBSOUND@,$LIBSOUND,;t t | 22293 | s,@LIBSOUND@,$LIBSOUND,;t t |
| 22294 | s,@SETARCH@,$SETARCH,;t t | ||
| 21926 | s,@SET_MAKE@,$SET_MAKE,;t t | 22295 | s,@SET_MAKE@,$SET_MAKE,;t t |
| 21927 | s,@PKG_CONFIG@,$PKG_CONFIG,;t t | 22296 | s,@PKG_CONFIG@,$PKG_CONFIG,;t t |
| 21928 | s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t | 22297 | s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t |
| @@ -22123,6 +22492,11 @@ esac | |||
| 22123 | *) ac_INSTALL=$ac_top_builddir$INSTALL ;; | 22492 | *) ac_INSTALL=$ac_top_builddir$INSTALL ;; |
| 22124 | esac | 22493 | esac |
| 22125 | 22494 | ||
| 22495 | if test x"$ac_file" != x-; then | ||
| 22496 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | ||
| 22497 | echo "$as_me: creating $ac_file" >&6;} | ||
| 22498 | rm -f "$ac_file" | ||
| 22499 | fi | ||
| 22126 | # Let's still pretend it is `configure' which instantiates (i.e., don't | 22500 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
| 22127 | # use $as_me), people would be surprised to read: | 22501 | # use $as_me), people would be surprised to read: |
| 22128 | # /* config.h. Generated by config.status. */ | 22502 | # /* config.h. Generated by config.status. */ |
| @@ -22161,12 +22535,6 @@ echo "$as_me: error: cannot find input file: $f" >&2;} | |||
| 22161 | fi;; | 22535 | fi;; |
| 22162 | esac | 22536 | esac |
| 22163 | done` || { (exit 1); exit 1; } | 22537 | done` || { (exit 1); exit 1; } |
| 22164 | |||
| 22165 | if test x"$ac_file" != x-; then | ||
| 22166 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | ||
| 22167 | echo "$as_me: creating $ac_file" >&6;} | ||
| 22168 | rm -f "$ac_file" | ||
| 22169 | fi | ||
| 22170 | _ACEOF | 22538 | _ACEOF |
| 22171 | cat >>$CONFIG_STATUS <<_ACEOF | 22539 | cat >>$CONFIG_STATUS <<_ACEOF |
| 22172 | sed "$ac_vpsub | 22540 | sed "$ac_vpsub |
diff --git a/configure.in b/configure.in index 1f899a0808c..519f826f270 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -1286,25 +1286,6 @@ AC_LINK_IFELSE([main(){return 0;}], | |||
| 1286 | dnl checks for Unix variants | 1286 | dnl checks for Unix variants |
| 1287 | AC_AIX | 1287 | AC_AIX |
| 1288 | 1288 | ||
| 1289 | dnl check if exec-shield is present. | ||
| 1290 | AC_CHECK_FILE(/proc/sys/kernel/exec-shield, emacs_cv_execshield=1, | ||
| 1291 | emacs_cv_execshield=0) | ||
| 1292 | if test "$emacs_cv_execshield" = 1; then | ||
| 1293 | AC_PATH_PROG(SETARCH, setarch, no) | ||
| 1294 | AC_SUBST(SETARCH) | ||
| 1295 | if test "$SETARCH" != no && test "$machine" = "intel386"; then | ||
| 1296 | AC_DEFINE(HAVE_EXECSHIELD, 1, | ||
| 1297 | [Define to 1 if this OS has exec shield and we can handle it.]) | ||
| 1298 | else | ||
| 1299 | case "`cat /proc/sys/kernel/exec-shield`" in | ||
| 1300 | 0) ;; | ||
| 1301 | *) | ||
| 1302 | AC_MSG_ERROR([Exec-shield is turned on. | ||
| 1303 | Emacs can not dump itself if exec-shield is turned on. | ||
| 1304 | See `etc/PROBLEMS' for further information.]) | ||
| 1305 | esac | ||
| 1306 | fi | ||
| 1307 | fi | ||
| 1308 | 1289 | ||
| 1309 | #### Extract some information from the operating system and machine files. | 1290 | #### Extract some information from the operating system and machine files. |
| 1310 | 1291 | ||
| @@ -1591,6 +1572,53 @@ AH_TEMPLATE(POINTER_TYPE, | |||
| 1591 | [Define as `void' if your compiler accepts `void *'; otherwise | 1572 | [Define as `void' if your compiler accepts `void *'; otherwise |
| 1592 | define as `char'.])dnl | 1573 | define as `char'.])dnl |
| 1593 | 1574 | ||
| 1575 | dnl Test if heap start address is randomized (exec-shield does this). | ||
| 1576 | dnl The test program requires unistd.h and stdlib.h. They are present | ||
| 1577 | dnl on the systems that currently have exec-shield. | ||
| 1578 | AC_MSG_CHECKING(whether heap start address is randomized) | ||
| 1579 | if test x"$ac_cv_header_unistd_h" != x && test x"$ac_cv_header_stdlib_h" != x | ||
| 1580 | then | ||
| 1581 | AC_TRY_RUN([#include <stdio.h> | ||
| 1582 | #include <unistd.h> | ||
| 1583 | #include <stdlib.h> | ||
| 1584 | int main (int argc, char *argv[]) | ||
| 1585 | { | ||
| 1586 | unsigned long old_sbrk = 0; | ||
| 1587 | unsigned long this_sbrk = (unsigned long) sbrk(0); | ||
| 1588 | int nr = 1; | ||
| 1589 | if (argc != 1) { | ||
| 1590 | old_sbrk = strtoul (argv[1], 0, 0); | ||
| 1591 | nr = atoi (argv[2])+1; | ||
| 1592 | } | ||
| 1593 | if (argc == 1 || (old_sbrk == this_sbrk && nr < 3)) | ||
| 1594 | { | ||
| 1595 | char buf1[32], buf2[32]; | ||
| 1596 | sprintf (buf1, "%lu", this_sbrk); | ||
| 1597 | sprintf (buf2, "%d", nr); | ||
| 1598 | execl (argv[0], argv[0], buf1, buf2, 0); | ||
| 1599 | exit (-1); | ||
| 1600 | } | ||
| 1601 | exit (this_sbrk == old_sbrk); | ||
| 1602 | }], emacs_cv_randomheap=yes, emacs_cv_randomheap=no, | ||
| 1603 | emacs_cv_randomheap='assuming no') | ||
| 1604 | else | ||
| 1605 | emacs_cv_randomheap='assuming no' | ||
| 1606 | fi | ||
| 1607 | AC_MSG_RESULT($emacs_cv_randomheap) | ||
| 1608 | |||
| 1609 | if test "$emacs_cv_randomheap" = yes; then | ||
| 1610 | AC_PATH_PROG(SETARCH, setarch, no) | ||
| 1611 | AC_SUBST(SETARCH) | ||
| 1612 | if test "$SETARCH" != no && test "$machine" = "intel386"; then | ||
| 1613 | AC_DEFINE(HAVE_RANDOM_HEAPSTART, 1, | ||
| 1614 | [Define to 1 if this OS randomizes the start address of the heap.]) | ||
| 1615 | else | ||
| 1616 | dnl We do the warning at the end of the configure run so it is seen. | ||
| 1617 | emacs_cv_randomheap=warn | ||
| 1618 | fi | ||
| 1619 | fi | ||
| 1620 | |||
| 1621 | |||
| 1594 | dnl This could be used for targets which can have both byte sexes. | 1622 | dnl This could be used for targets which can have both byte sexes. |
| 1595 | dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally. | 1623 | dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally. |
| 1596 | dnl AC_C_BIGENDIAN | 1624 | dnl AC_C_BIGENDIAN |
| @@ -2285,6 +2313,9 @@ if test "${with_carbon}" != "no"; then | |||
| 2285 | AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes) | 2313 | AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes) |
| 2286 | fi | 2314 | fi |
| 2287 | 2315 | ||
| 2316 | dnl Check for malloc/malloc.h on darwin | ||
| 2317 | AC_CHECK_HEADER(malloc/malloc.h, AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.])) | ||
| 2318 | |||
| 2288 | if test "${HAVE_CARBON}" = "yes"; then | 2319 | if test "${HAVE_CARBON}" = "yes"; then |
| 2289 | AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.]) | 2320 | AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.]) |
| 2290 | window_system=mac | 2321 | window_system=mac |
| @@ -3058,6 +3089,19 @@ echo " Does Emacs use -lpng? ${HAVE_PNG}" | |||
| 3058 | echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" | 3089 | echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" |
| 3059 | echo | 3090 | echo |
| 3060 | 3091 | ||
| 3092 | if test "$emacs_cv_randomheap" = warn; then | ||
| 3093 | AC_MSG_WARN([ | ||
| 3094 | ********************************************************************** | ||
| 3095 | |||
| 3096 | Heap start address is randomized and no workaround is known. | ||
| 3097 | Emacs will probably dump core when temacs is run in the build phase. | ||
| 3098 | Maybe exec-shield is turned on. Read about exec-shield in `etc/PROBLEMS' | ||
| 3099 | for further information. | ||
| 3100 | |||
| 3101 | ********************************************************************** | ||
| 3102 | ]) | ||
| 3103 | fi | ||
| 3104 | |||
| 3061 | # Remove any trailing slashes in these variables. | 3105 | # Remove any trailing slashes in these variables. |
| 3062 | [test "${prefix}" != NONE && | 3106 | [test "${prefix}" != NONE && |
| 3063 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` | 3107 | prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` |
diff --git a/etc/CENSORSHIP b/etc/CENSORSHIP index 24bca114790..ca949aa6b6e 100644 --- a/etc/CENSORSHIP +++ b/etc/CENSORSHIP | |||
| @@ -54,7 +54,7 @@ rules. | |||
| 54 | 54 | ||
| 55 | Of course, I'm making an assumption about just what "indecent" means. | 55 | Of course, I'm making an assumption about just what "indecent" means. |
| 56 | I have to do this, because nobody knows for sure. The most obvious | 56 | I have to do this, because nobody knows for sure. The most obvious |
| 57 | possibile meaning is the meaning it has for television, so I'm using | 57 | possible meaning is the meaning it has for television, so I'm using |
| 58 | that as a tentative assumption. However, there is a good chance that | 58 | that as a tentative assumption. However, there is a good chance that |
| 59 | our courts will reject that interpretation of the law as | 59 | our courts will reject that interpretation of the law as |
| 60 | unconstitutional. | 60 | unconstitutional. |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 981fd88ba3a..08e72c60c2f 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2004-10-08 Fr,Ai(Bd,Ai(Bric Bothamy <frederic.bothamy@free.fr> (tiny change) | ||
| 2 | |||
| 3 | * TUTORIAL.fr: Minor wording fix. | ||
| 4 | |||
| 5 | 2004-10-04 Luc Teirlinck <teirllm@auburn.edu> | ||
| 6 | |||
| 7 | * enriched.doc: Update for new bindings of `set-left-margin' and | ||
| 8 | `set-right-margin'. | ||
| 9 | |||
| 10 | 2004-10-04 Kim F. Storm <storm@cua.dk> | ||
| 11 | |||
| 12 | * DEBUG: Mention pp and ff commands. | ||
| 13 | |||
| 1 | 2004-09-26 Luc Teirlinck <teirllm@auburn.edu> | 14 | 2004-09-26 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 15 | ||
| 3 | * enriched.doc: `enriched-annotation-alist' is now called | 16 | * enriched.doc: `enriched-annotation-alist' is now called |
| @@ -69,9 +69,11 @@ fatal error, you can use the GDB command `pr'. First print the value | |||
| 69 | in the ordinary way, with the `p' command. Then type `pr' with no | 69 | in the ordinary way, with the `p' command. Then type `pr' with no |
| 70 | arguments. This calls a subroutine which uses the Lisp printer. | 70 | arguments. This calls a subroutine which uses the Lisp printer. |
| 71 | 71 | ||
| 72 | Note: It is not a good idea to try `pr' if you know that Emacs is in | 72 | You can also use `pp value' to print the emacs value directly. |
| 73 | deep trouble: its stack smashed (e.g., if it encountered SIGSEGV due | 73 | |
| 74 | to stack overflow), or crucial data structures, such as `obarray', | 74 | Note: It is not a good idea to try `pr' or `pp' if you know that Emacs |
| 75 | is in deep trouble: its stack smashed (e.g., if it encountered SIGSEGV | ||
| 76 | due to stack overflow), or crucial data structures, such as `obarray', | ||
| 75 | corrupted, etc. In such cases, the Emacs subroutine called by `pr' | 77 | corrupted, etc. In such cases, the Emacs subroutine called by `pr' |
| 76 | might make more damage, like overwrite some data that is important for | 78 | might make more damage, like overwrite some data that is important for |
| 77 | debugging the original problem. | 79 | debugging the original problem. |
| @@ -442,6 +444,9 @@ Several more functions for debugging display code are available in | |||
| 442 | Emacs compiled with GLYPH_DEBUG defined; type "C-h f dump- TAB" and | 444 | Emacs compiled with GLYPH_DEBUG defined; type "C-h f dump- TAB" and |
| 443 | "C-h f trace- TAB" to see the full list. | 445 | "C-h f trace- TAB" to see the full list. |
| 444 | 446 | ||
| 447 | When you debug display problems running emacs under X, you can use | ||
| 448 | the `ff' command to flush all pending display updates to the screen. | ||
| 449 | |||
| 445 | 450 | ||
| 446 | ** Debugging LessTif | 451 | ** Debugging LessTif |
| 447 | 452 | ||
| @@ -174,6 +174,21 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. | |||
| 174 | * Changes in Emacs 21.4 | 174 | * Changes in Emacs 21.4 |
| 175 | 175 | ||
| 176 | +++ | 176 | +++ |
| 177 | ** New function `looking-back' checks whether a regular expression matches | ||
| 178 | the text before point. Specifying the LIMIT argument bounds how far | ||
| 179 | back the match can start; this is a way to keep it from taking too long. | ||
| 180 | |||
| 181 | +++ | ||
| 182 | ** New functions `make-progress-reporter', `progress-reporter-update', | ||
| 183 | `progress-reporter-force-update' and `progress-reporter-done' provide | ||
| 184 | a simple and efficient way of printing progress messages to the user. | ||
| 185 | |||
| 186 | +++ | ||
| 187 | ** In Enriched mode, `set-left-margin' and `set-right-margin' are now | ||
| 188 | by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l' | ||
| 189 | and `C-c C-r'. | ||
| 190 | |||
| 191 | +++ | ||
| 177 | ** In processing a local variables list, Emacs strips the prefix and | 192 | ** In processing a local variables list, Emacs strips the prefix and |
| 178 | suffix are from every line before processing all the lines. | 193 | suffix are from every line before processing all the lines. |
| 179 | 194 | ||
| @@ -1237,12 +1252,23 @@ to new-kill-line, these commands now report: | |||
| 1237 | new-kill-line is on C-k | 1252 | new-kill-line is on C-k |
| 1238 | 1253 | ||
| 1239 | +++ | 1254 | +++ |
| 1255 | ** Vertical scrolling is now possible within incremental search. | ||
| 1256 | To enable this feature, customize the new user option | ||
| 1257 | `isearch-allow-scroll'. User written commands which satisfy stringent | ||
| 1258 | constraints can be marked as "scrolling commands". See the Emacs manual | ||
| 1259 | for details. | ||
| 1260 | |||
| 1261 | +++ | ||
| 1240 | ** C-w in incremental search now grabs either a character or a word, | 1262 | ** C-w in incremental search now grabs either a character or a word, |
| 1241 | making the decision in a heuristic way. This new job is done by the | 1263 | making the decision in a heuristic way. This new job is done by the |
| 1242 | command `isearch-yank-word-or-char'. To restore the old behavior, | 1264 | command `isearch-yank-word-or-char'. To restore the old behavior, |
| 1243 | bind C-w to `isearch-yank-word' in `isearch-mode-map'. | 1265 | bind C-w to `isearch-yank-word' in `isearch-mode-map'. |
| 1244 | 1266 | ||
| 1245 | +++ | 1267 | +++ |
| 1268 | ** C-y in incremental search now grabs the next line if point is already | ||
| 1269 | at the end of a line. | ||
| 1270 | |||
| 1271 | +++ | ||
| 1246 | ** C-M-w deletes and C-M-y grabs a character in isearch mode. | 1272 | ** C-M-w deletes and C-M-y grabs a character in isearch mode. |
| 1247 | Another method to grab a character is to enter the minibuffer by `M-e' | 1273 | Another method to grab a character is to enter the minibuffer by `M-e' |
| 1248 | and to type `C-f' at the end of the search string in the minibuffer. | 1274 | and to type `C-f' at the end of the search string in the minibuffer. |
| @@ -1466,6 +1492,10 @@ controls whether or not the function `make-auto-save-file-name' will | |||
| 1466 | attempt to construct a unique auto-save name (e.g. for remote files). | 1492 | attempt to construct a unique auto-save name (e.g. for remote files). |
| 1467 | 1493 | ||
| 1468 | +++ | 1494 | +++ |
| 1495 | ** There is a new calendar package, icalendar.el, that can be used to | ||
| 1496 | convert Emacs diary entries to/from the iCalendar format. | ||
| 1497 | |||
| 1498 | +++ | ||
| 1469 | ** Diary sexp entries can have custom marking in the calendar. | 1499 | ** Diary sexp entries can have custom marking in the calendar. |
| 1470 | Diary sexp functions which only apply to certain days (such as | 1500 | Diary sexp functions which only apply to certain days (such as |
| 1471 | `diary-block' or `diary-cyclic') now take an optional parameter MARK, | 1501 | `diary-block' or `diary-cyclic') now take an optional parameter MARK, |
| @@ -1481,6 +1511,11 @@ appointments, paydays or anything else using a sexp. | |||
| 1481 | year and day number, and moves to that date. Negative day numbers | 1511 | year and day number, and moves to that date. Negative day numbers |
| 1482 | count backward from the end of the year. | 1512 | count backward from the end of the year. |
| 1483 | 1513 | ||
| 1514 | +++ | ||
| 1515 | ** The new Calendar function `calendar-goto-iso-week' (g w) | ||
| 1516 | prompts for a year and a week number, and moves to the first | ||
| 1517 | day of that ISO week. | ||
| 1518 | |||
| 1484 | --- | 1519 | --- |
| 1485 | ** The functions `holiday-easter-etc' and `holiday-advent' now take | 1520 | ** The functions `holiday-easter-etc' and `holiday-advent' now take |
| 1486 | arguments, and only report on the specified holiday rather than all. | 1521 | arguments, and only report on the specified holiday rather than all. |
| @@ -2558,9 +2593,8 @@ symbol identifying a fringe bitmap, either built-in or defined with | |||
| 2558 | `define-fringe-bitmap', and FACE is an optional face name to be used | 2593 | `define-fringe-bitmap', and FACE is an optional face name to be used |
| 2559 | for displaying the bitmap. | 2594 | for displaying the bitmap. |
| 2560 | 2595 | ||
| 2561 | *** New function `fringe-bitmaps-at-pos' returns a cons (LEFT . RIGHT) | 2596 | *** New function `fringe-bitmaps-at-pos' returns the current fringe |
| 2562 | identifying the current fringe bitmaps in the display line at a given | 2597 | bitmaps in the display line at a given buffer position. |
| 2563 | buffer position. A nil value means no bitmap. | ||
| 2564 | 2598 | ||
| 2565 | ** Multiple overlay arrows can now be defined and managed via the new | 2599 | ** Multiple overlay arrows can now be defined and managed via the new |
| 2566 | variable `overlay-arrow-variable-list'. It contains a list of | 2600 | variable `overlay-arrow-variable-list'. It contains a list of |
| @@ -2579,10 +2613,12 @@ If either property is not set, the default `overlay-arrow-string' or | |||
| 2579 | line in current buffer, or if optional buffer position is given, line | 2613 | line in current buffer, or if optional buffer position is given, line |
| 2580 | number of corresponding line in current buffer. | 2614 | number of corresponding line in current buffer. |
| 2581 | 2615 | ||
| 2616 | +++ | ||
| 2582 | ** The default value of `sentence-end' is now defined using the new | 2617 | ** The default value of `sentence-end' is now defined using the new |
| 2583 | variable `sentence-end-without-space' which contains such characters | 2618 | variable `sentence-end-without-space' which contains such characters |
| 2584 | that end a sentence without following spaces. | 2619 | that end a sentence without following spaces. |
| 2585 | 2620 | ||
| 2621 | +++ | ||
| 2586 | ** The function `sentence-end' should be used to obtain the value of | 2622 | ** The function `sentence-end' should be used to obtain the value of |
| 2587 | the variable `sentence-end'. If the variable `sentence-end' is nil, | 2623 | the variable `sentence-end'. If the variable `sentence-end' is nil, |
| 2588 | then this function returns the regexp constructed from the variables | 2624 | then this function returns the regexp constructed from the variables |
| @@ -34,6 +34,9 @@ to the FSF. | |||
| 34 | ** Implement a smoother vertical scroll facility, one that allows | 34 | ** Implement a smoother vertical scroll facility, one that allows |
| 35 | C-v to scroll through a tall image. | 35 | C-v to scroll through a tall image. |
| 36 | 36 | ||
| 37 | ** Implement intelligent search/replace, going beyond query-replace | ||
| 38 | (see http://graphics.csail.mit.edu/~rcm/chi04.pdf). | ||
| 39 | |||
| 37 | ** Implement other text formatting properties. | 40 | ** Implement other text formatting properties. |
| 38 | *** Footnotes that can appear either in place or at the end of the page. | 41 | *** Footnotes that can appear either in place or at the end of the page. |
| 39 | *** text property that says "don't break line in middle of this". | 42 | *** text property that says "don't break line in middle of this". |
diff --git a/etc/TUTORIAL.fr b/etc/TUTORIAL.fr index ae88ff4a242..38853c608b9 100644 --- a/etc/TUTORIAL.fr +++ b/etc/TUTORIAL.fr | |||
| @@ -17,7 +17,7 @@ Tapez C-x C-c (deux caractères) pour terminer une session Emacs. | |||
| 17 | Dans ce didacticiel, les caractères ">>" en marge gauche indiquent les | 17 | Dans ce didacticiel, les caractères ">>" en marge gauche indiquent les |
| 18 | directions à suivre pour essayer une commande. Ainsi : | 18 | directions à suivre pour essayer une commande. Ainsi : |
| 19 | <<Lignes blanches insérées après cette ligne par help-with-tutorial>> | 19 | <<Lignes blanches insérées après cette ligne par help-with-tutorial>> |
| 20 | [Centre de page deliberéement vide. Le texte continue ci-dessous.] | 20 | [Centre de page delibérément vide. Le texte continue ci-dessous.] |
| 21 | >> Tapez C-v (Voir l'écran suivant) pour passer à l'écran suivant | 21 | >> Tapez C-v (Voir l'écran suivant) pour passer à l'écran suivant |
| 22 | (faites-le, pressez la touche CTRL tout en pressant la touche v). | 22 | (faites-le, pressez la touche CTRL tout en pressant la touche v). |
| 23 | À partir de maintenant, vous devrez le faire à chaque fois que | 23 | À partir de maintenant, vous devrez le faire à chaque fois que |
| @@ -36,7 +36,7 @@ touche META, EDIT ou ALT). | |||
| 36 | >> Faites M-v, puis C-v plusieurs fois. | 36 | >> Faites M-v, puis C-v plusieurs fois. |
| 37 | 37 | ||
| 38 | Si votre terminal en dispose, vous pouvez également utiliser les | 38 | Si votre terminal en dispose, vous pouvez également utiliser les |
| 39 | touches PgUp et PgDn pour monter ou descendre d'un écran, bien les | 39 | touches PgUp et PgDn pour monter ou descendre d'un écran, bien que les |
| 40 | combinaisons C-v et M-v soient plus efficaces. | 40 | combinaisons C-v et M-v soient plus efficaces. |
| 41 | 41 | ||
| 42 | * RÉSUMÉ | 42 | * RÉSUMÉ |
| @@ -347,7 +347,7 @@ avant la position courante du curseur. | |||
| 347 | Lorsqu'une ligne de texte devient trop longue pour tenir sur une seule | 347 | Lorsqu'une ligne de texte devient trop longue pour tenir sur une seule |
| 348 | ligne de l'écran, elle se « continue » sur une deuxième ligne | 348 | ligne de l'écran, elle se « continue » sur une deuxième ligne |
| 349 | d'écran. Une barre de fraction inverse (« \ ») ou, si vous utilisez un | 349 | d'écran. Une barre de fraction inverse (« \ ») ou, si vous utilisez un |
| 350 | environnement grapgique, une petite flèche recourbée, sur la marge | 350 | environnement graphique, une petite flèche recourbée, sur la marge |
| 351 | droite indique une ligne qui se poursuit sur la ligne suivante. | 351 | droite indique une ligne qui se poursuit sur la ligne suivante. |
| 352 | 352 | ||
| 353 | >> Insérez du texte jusqu'à atteindre la marge droite et continuez | 353 | >> Insérez du texte jusqu'à atteindre la marge droite et continuez |
| @@ -423,7 +423,7 @@ espaces, les effacent (vous ne pouvez donc pas récupérer ce texte). | |||
| 423 | Notez qu'un simple C-k supprime le contenu de la ligne et qu'un second | 423 | Notez qu'un simple C-k supprime le contenu de la ligne et qu'un second |
| 424 | détruit la ligne elle-même, ce qui fait remonter toutes les lignes | 424 | détruit la ligne elle-même, ce qui fait remonter toutes les lignes |
| 425 | suivantes. C-k traite son paramètre numérique d'une façon spéciale : | 425 | suivantes. C-k traite son paramètre numérique d'une façon spéciale : |
| 426 | il détruit ce nombre de lignes ET leurs contenus. Ce n'est pas une | 426 | il détruit ce nombre de lignes ET leur contenu. Ce n'est pas une |
| 427 | simple répétition : C-u 2 C-k détruit deux lignes et leurs Newlines | 427 | simple répétition : C-u 2 C-k détruit deux lignes et leurs Newlines |
| 428 | alors que taper deux fois C-k n'aurait pas le même effet. | 428 | alors que taper deux fois C-k n'aurait pas le même effet. |
| 429 | 429 | ||
| @@ -523,7 +523,7 @@ sauvegardez, Emacs garde le fichier original sous un nom modifié au | |||
| 523 | cas où vous décideriez ensuite d'annuler vos modifications. | 523 | cas où vous décideriez ensuite d'annuler vos modifications. |
| 524 | 524 | ||
| 525 | Si vous examinez le bas de l'écran, vous verrez une ligne qui commence | 525 | Si vous examinez le bas de l'écran, vous verrez une ligne qui commence |
| 526 | et finit par des tirets et débute par « --:-- TUTORIAL.fr » ou quelque | 526 | et finit par des tirets et débute par « -1:-- TUTORIAL.fr » ou quelque |
| 527 | chose comme ça. Cette partie de l'écran montre normalement le nom du | 527 | chose comme ça. Cette partie de l'écran montre normalement le nom du |
| 528 | fichier que vous êtes en train de visiter. Pour l'instant, vous | 528 | fichier que vous êtes en train de visiter. Pour l'instant, vous |
| 529 | visitez un fichier appelé « TUTORIAL.fr », qui est votre copie | 529 | visitez un fichier appelé « TUTORIAL.fr », qui est votre copie |
| @@ -584,7 +584,7 @@ l'éditer. Vous pouvez également trouver un fichier qui n'existe pas | |||
| 584 | encore. C'est ainsi que l'on crée un fichier avec Emacs : on trouve le | 584 | encore. C'est ainsi que l'on crée un fichier avec Emacs : on trouve le |
| 585 | fichier, qui démarre vide, puis on insère du texte. Lorsque l'on | 585 | fichier, qui démarre vide, puis on insère du texte. Lorsque l'on |
| 586 | demande à « sauvegarder » le fichier, Emacs crée alors vraiment le | 586 | demande à « sauvegarder » le fichier, Emacs crée alors vraiment le |
| 587 | fichier avec le texte que l'on a inséré. À partir de ce moment là, | 587 | fichier avec le texte que l'on a inséré. À partir de ce moment-là, |
| 588 | vous pouvez considérer que vous éditez un fichier déjà existant. | 588 | vous pouvez considérer que vous éditez un fichier déjà existant. |
| 589 | 589 | ||
| 590 | 590 | ||
| @@ -666,10 +666,10 @@ non. | |||
| 666 | * EXTENSION DU JEU DE COMMANDES | 666 | * EXTENSION DU JEU DE COMMANDES |
| 667 | ------------------------------- | 667 | ------------------------------- |
| 668 | 668 | ||
| 669 | Il y bien plus de commandes Emacs qu'il ne serait possible d'en créer | 669 | Il y a bien plus de commandes Emacs qu'il ne serait possible d'en |
| 670 | avec tous les caractères de contrôle et les caractères Meta. Emacs | 670 | créer avec tous les caractères de contrôle et Meta. Emacs contourne ce |
| 671 | contourne ce problème à l'aide de la commande X (eXtension). Celle-ci | 671 | problème à l'aide de la commande X (eXtension). Celle-ci se présente |
| 672 | se présente sous deux déclinaisons : | 672 | sous deux déclinaisons : |
| 673 | 673 | ||
| 674 | C-x eXtension caractère, suivie d'un seul caractère. | 674 | C-x eXtension caractère, suivie d'un seul caractère. |
| 675 | M-x eXtension d'une commande nommée, suivie d'un nom long. | 675 | M-x eXtension d'une commande nommée, suivie d'un nom long. |
| @@ -742,7 +742,7 @@ paramètre par <Entrée>. | |||
| 742 | 742 | ||
| 743 | Lorsque vous avez modifié un fichier, mais que vous ne l'avez pas | 743 | Lorsque vous avez modifié un fichier, mais que vous ne l'avez pas |
| 744 | encore sauvegardé, ces modifications pourraient être perdues si votre | 744 | encore sauvegardé, ces modifications pourraient être perdues si votre |
| 745 | système se plantait. Pour vous protéger ce de problème, Emacs écrit | 745 | système se plantait. Pour vous protéger de ce problème, Emacs écrit |
| 746 | périodiquement un fichier de « sauvegarde automatique » pour chaque | 746 | périodiquement un fichier de « sauvegarde automatique » pour chaque |
| 747 | fichier en cours d'édition. Le nom de ce fichier commence et se | 747 | fichier en cours d'édition. Le nom de ce fichier commence et se |
| 748 | termine par un # : si, par exemple, votre fichier s'appelle | 748 | termine par un # : si, par exemple, votre fichier s'appelle |
| @@ -772,14 +772,14 @@ zone d'écho ». La zone d'écho contient la dernière ligne de l'écran. | |||
| 772 | La ligne placée immédiatement au dessus de la zone d'écho s'appelle la | 772 | La ligne placée immédiatement au dessus de la zone d'écho s'appelle la |
| 773 | « ligne de mode ». Elle affiche quelque chose comme ça : | 773 | « ligne de mode ». Elle affiche quelque chose comme ça : |
| 774 | 774 | ||
| 775 | --:** TUTORIAL.fr (Fundamental)--L752--67%---------------- | 775 | -1:** TUTORIAL.fr (Fundamental)--L752--67%---------------- |
| 776 | 776 | ||
| 777 | Cette ligne donne des informations sur l'état d'Emacs et sur le texte | 777 | Cette ligne donne des informations sur l'état d'Emacs et sur le texte |
| 778 | que vous êtes en train d'éditer. | 778 | que vous êtes en train d'éditer. |
| 779 | 779 | ||
| 780 | Vous savez déjà ce que signifie le nom de fichier -- c'est celui que | 780 | Vous savez déjà ce que signifie le nom de fichier -- c'est celui que |
| 781 | vous avez chargé. -NN%-- indique votre position actuelle dans le | 781 | vous avez chargé. -NN%-- indique votre position actuelle dans le |
| 782 | texte ; cela signifie que NN pourcent du texte se trouve au dessus du | 782 | texte ; cela signifie que NN pour cent du texte se trouve au dessus du |
| 783 | sommet de l'écran. Si le début du fichier est sur l'écran, il | 783 | sommet de l'écran. Si le début du fichier est sur l'écran, il |
| 784 | s'affichera --Top-- et non --00%--. Si le bas du texte est sur | 784 | s'affichera --Top-- et non --00%--. Si le bas du texte est sur |
| 785 | l'écran, il s'affichera --Bot--. Si tout le texte tient dans l'écran, | 785 | l'écran, il s'affichera --Bot--. Si tout le texte tient dans l'écran, |
| @@ -802,7 +802,7 @@ Emacs possède de nombreux modes majeurs différents. Certains sont | |||
| 802 | prévus pour éditer différents langages et/ou types de texte (mode | 802 | prévus pour éditer différents langages et/ou types de texte (mode |
| 803 | Lisp, mode Text, etc). À tout instant, il n'y a qu'un seul mode majeur | 803 | Lisp, mode Text, etc). À tout instant, il n'y a qu'un seul mode majeur |
| 804 | actif et son nom se trouve toujours dans la ligne de mode, à l'endroit | 804 | actif et son nom se trouve toujours dans la ligne de mode, à l'endroit |
| 805 | ou « Fundamental » se trouve actuellement. | 805 | où « Fundamental » se trouve actuellement. |
| 806 | 806 | ||
| 807 | Chaque mode majeur modifie le comportement de quelques commandes. Il | 807 | Chaque mode majeur modifie le comportement de quelques commandes. Il |
| 808 | existe, par exemple, des commandes pour créer des commentaires dans un | 808 | existe, par exemple, des commandes pour créer des commentaires dans un |
| @@ -940,7 +940,7 @@ haut dans le texte, faites plutôt C-r. Tout ce que nous avons dit sur | |||
| 940 | C-s s'applique également à C-r, sauf que la direction de la recherche | 940 | C-s s'applique également à C-r, sauf que la direction de la recherche |
| 941 | est inversée. | 941 | est inversée. |
| 942 | 942 | ||
| 943 | * FENETRES MULTIPLES | 943 | * FENÊTRES MULTIPLES |
| 944 | -------------------- | 944 | -------------------- |
| 945 | 945 | ||
| 946 | L'une des caractéristiques les plus agréables d'Emacs est que vous | 946 | L'une des caractéristiques les plus agréables d'Emacs est que vous |
diff --git a/etc/enriched.doc b/etc/enriched.doc index 55e11004f05..122652f005a 100644 --- a/etc/enriched.doc +++ b/etc/enriched.doc | |||
| @@ -98,8 +98,8 @@ direct request, such as using the return key or the <fixed>C-o | |||
| 98 | <indent>The fill functions also understand margins, which can be set for | 98 | <indent>The fill functions also understand margins, which can be set for |
| 99 | any region of a document. In addition to the menu items, which | 99 | any region of a document. In addition to the menu items, which |
| 100 | increase or decrease the margins, there are two commands for | 100 | increase or decrease the margins, there are two commands for |
| 101 | setting the margins absolutely: <fixed>C-c C-l (set-left-margin)</fixed> and <fixed>C-c | 101 | setting the margins absolutely: <fixed>C-c [ (set-left-margin)</fixed> and <fixed>C-c |
| 102 | C-r (set-right-margin)</fixed>. | 102 | ] (set-right-margin)</fixed>. |
| 103 | 103 | ||
| 104 | 104 | ||
| 105 | You <indent>can change indentation at any point in a paragraph, which | 105 | You <indent>can change indentation at any point in a paragraph, which |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 29abaaf21b8..41606eb7e93 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,4 +1,233 @@ | |||
| 1 | 2004-10-03 Stefan <monnier@iro.umontreal.ca> | 1 | 2004-10-13 Daniel Pfeiffer <occitan@esperanto.org> |
| 2 | |||
| 3 | * button.el (button-activate): Allow a marker to display as an | ||
| 4 | action. | ||
| 5 | |||
| 6 | * help-fns.el (describe-variable): Use it to make "below" a | ||
| 7 | hyperlink. | ||
| 8 | |||
| 9 | * help.el (describe-mode): Use it to make minor mode list into | ||
| 10 | hyperlinks. | ||
| 11 | |||
| 12 | 2004-10-14 Masatake YAMATO <jet@gyve.org> | ||
| 13 | |||
| 14 | * progmodes/gud.el (gdb-script-beginning-of-defun): New function. | ||
| 15 | (gdb-script-end-of-defun): New function. | ||
| 16 | (gdb-script-mode): Use `gdb-script-beginning-of-defun' and | ||
| 17 | `gdb-script-end-of-defun' as *-of-defun-function. | ||
| 18 | |||
| 19 | 2004-10-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 20 | |||
| 21 | * vc.el (vc-annotate-display-select): Fix typo. | ||
| 22 | |||
| 23 | * subr.el (substitute-key-definition-key): New function. | ||
| 24 | (substitute-key-definition): Use it with map-keymap. | ||
| 25 | (event-modifiers): Use push. | ||
| 26 | (mouse-movement-p, with-temp-buffer): Simplify. | ||
| 27 | |||
| 28 | 2004-10-12 Michael Albinus <michael.albinus@gmx.de> | ||
| 29 | |||
| 30 | Sync with Tramp 2.0.45. | ||
| 31 | |||
| 32 | * net/tramp.el (top): Apply `def-edebug-spec' only if function is | ||
| 33 | defined. This is not the case for XEmacs without package "edebug". | ||
| 34 | (tramp-set-auto-save-file-modes): Set permissions of autosaved | ||
| 35 | remote files to the permissions of the original file. This is not | ||
| 36 | the case for Emacs < 21.3.50 and XEmacs < 21.5. Add function to | ||
| 37 | `auto-save-hook'. Reported by Thomas Prokosch <thomas@nadev.net>. | ||
| 38 | (tramp-perl-decode): Fix an error in Perl implementation. | ||
| 39 | $pending must be cleared every loop. Reported by Benjamin Place | ||
| 40 | <benjaminplace@sprintmail.com> | ||
| 41 | |||
| 42 | * net/tramp-smb.el (tramp-smb-advice-PC-do-completion): | ||
| 43 | Don't activate advice during definition. This is done later on, | ||
| 44 | depending on test result of `substitute-in-file-name'. | ||
| 45 | Suggested by Stefan Monnier <monnier@iro.umontreal.ca>. | ||
| 46 | |||
| 47 | 2004-10-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 48 | |||
| 49 | * pcvs-parse.el (cvs-parse-commit): Fix parsing for new commit message. | ||
| 50 | |||
| 51 | * emacs-lisp/lisp.el (mark-sexp): Preserve direction when repeating. | ||
| 52 | |||
| 53 | 2004-10-12 David Ponce <david@dponce.com> | ||
| 54 | |||
| 55 | * recentf.el (recentf-edit-list): Update the menu when the recentf | ||
| 56 | list has been modified. | ||
| 57 | |||
| 58 | 2004-10-12 Simon Josefsson <jas@extundo.com> | ||
| 59 | |||
| 60 | * net/tls.el (tls-certtool-program): New variable. | ||
| 61 | (tls-certificate-information): New function, based on | ||
| 62 | ssl-certificate-information. | ||
| 63 | |||
| 64 | 2004-10-12 Kenichi Handa <handa@m17n.org> | ||
| 65 | |||
| 66 | * international/mule.el (coding-system-equal): Move from mule-util.el. | ||
| 67 | |||
| 68 | * international/mule-util.el (coding-system-equal): Move to mule.el. | ||
| 69 | |||
| 70 | 2004-10-12 Kim F. Storm <storm@cua.dk> | ||
| 71 | |||
| 72 | * kmacro.el (kmacro-insert-counter, kmacro-add-counter): Use and | ||
| 73 | reset kmacro-initial-counter-value if set. | ||
| 74 | (kmacro-set-counter): Only set kmacro-counter if defining or executing | ||
| 75 | macro. Set kmacro-initial-counter-value otherwise. Never set both. | ||
| 76 | (kmacro-display): Show macro counter if non-zero. | ||
| 77 | |||
| 78 | * subr.el (substitute-key-definition): Mention command remapping | ||
| 79 | in doc string. | ||
| 80 | |||
| 81 | 2004-10-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 82 | |||
| 83 | * pcvs-defs.el (pcl-cvs-load-hook): Remove unused var. | ||
| 84 | |||
| 85 | * font-lock.el (font-lock-apply-highlight): Fix last change. | ||
| 86 | |||
| 87 | 2004-10-11 Simon Josefsson <jas@extundo.com> | ||
| 88 | |||
| 89 | * mail/smtpmail.el (smtpmail-open-stream): Look for | ||
| 90 | starttls-gnutls-program instead of starttls-program iff | ||
| 91 | starttls-use-gnutls is non-nil. | ||
| 92 | (smtpmail-open-stream): Don't overwrite user settings of | ||
| 93 | starttls-extra-arguments and starttls-extra-args. | ||
| 94 | |||
| 95 | 2004-10-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 96 | |||
| 97 | * comint.el (comint-mouse-insert-input): Remove. | ||
| 98 | (comint-insert-input): Make it work for mouse bindings. | ||
| 99 | (comint-mode-map): Move defs into the declaration. | ||
| 100 | (comint-output-filter): Typo. | ||
| 101 | |||
| 102 | * diff-mode.el (diff-current-defun): Fix 2004-06-13's change. | ||
| 103 | |||
| 104 | 2004-10-10 Kai Grossjohann <kai.grossjohann@gmx.net> | ||
| 105 | |||
| 106 | * net/ange-ftp.el (ange-ftp-remote-shell): Remove variable. | ||
| 107 | (ange-ftp-call-chmod): Reference remote-shell-program instead of | ||
| 108 | ange-ftp-remote-shell. | ||
| 109 | |||
| 110 | 2004-10-10 Andreas Schwab <schwab@suse.de> | ||
| 111 | |||
| 112 | * emacs-lisp/byte-opt.el (byte-optimize-backward-word): Optimize | ||
| 113 | `(backward-word)' to `(forward-word -1)', not `(forward-char -1)'. | ||
| 114 | Reported by <sri@asu.edu>. | ||
| 115 | |||
| 116 | 2004-10-10 Benjamin Rutt <brutt@bloomington.in.us> | ||
| 117 | |||
| 118 | * vc.el (vc-annotate-mode): Remove variable. | ||
| 119 | (vc-annotate-display-select): Only call vc-annotate-mode | ||
| 120 | if we're not in that mode already. | ||
| 121 | |||
| 122 | 2004-10-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 123 | |||
| 124 | * imenu.el (imenu--completion-buffer): Don't return t for rescan. | ||
| 125 | (imenu-choose-buffer-index): Check here for rescan instead. | ||
| 126 | |||
| 127 | * font-lock.el (font-lock-apply-highlight): Explicitly check the case | ||
| 128 | where the face expression evals to nil. | ||
| 129 | |||
| 130 | * textmodes/tex-mode.el (tex-font-lock-append-prop): New fun. | ||
| 131 | (tex-font-lock-keywords-2): Use it. | ||
| 132 | (tex-font-lock-syntactic-keywords): Fix the `verbatim' treatment. | ||
| 133 | |||
| 134 | * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Fix backslashes. | ||
| 135 | |||
| 136 | 2004-10-09 Kim F. Storm <storm@cua.dk> | ||
| 137 | |||
| 138 | * subr.el (progress-reporter-update): Define before first usage. | ||
| 139 | (make-progress-reporter): Doc fix. | ||
| 140 | |||
| 141 | 2004-10-09 Luc Teirlinck <teirllm@auburn.edu> | ||
| 142 | |||
| 143 | * textmodes/paragraphs.el (sentence-end-double-space) | ||
| 144 | (sentence-end-without-period, sentence-end-without-space) | ||
| 145 | (sentence-end): Doc fixes. | ||
| 146 | |||
| 147 | 2004-10-08 Peter Seibel <peter@javamonkey.com> (tiny change) | ||
| 148 | |||
| 149 | * emacs-lisp/lisp-mode.el (lisp-fill-paragraph): | ||
| 150 | Change paragraph-start regexp so we don't fill code starting with #'(. | ||
| 151 | |||
| 152 | 2004-10-08 Sebastien Kirche <seki@seki.fr> (tiny change) | ||
| 153 | |||
| 154 | * mail/mail-extr.el (mail-extr-ignore-realname-equals-mailbox-name): | ||
| 155 | New defcustom. | ||
| 156 | (extract-address-components): Use it. | ||
| 157 | |||
| 158 | 2004-10-08 Paul Pogonyshev <pogonyshev@gmx.net> | ||
| 159 | |||
| 160 | * subr.el (make-progress-reporter, progress-reporter-update) | ||
| 161 | (progress-reporter-force-update, progress-reporter-do-update) | ||
| 162 | (progress-reporter-done): New functions. | ||
| 163 | |||
| 164 | * tar-mode.el (tar-summarize-buffer): Use progress reporter. | ||
| 165 | |||
| 166 | * progmodes/etags.el (etags-tags-completion-table): Use progress | ||
| 167 | reporter. | ||
| 168 | (etags-tags-apropos): Likewise. | ||
| 169 | |||
| 170 | 2004-10-08 Alan Mackenzie <acm@muc.de> | ||
| 171 | |||
| 172 | * isearch.el (isearch-yank-line): C-y yanks to next EOL, not end | ||
| 173 | of current line. | ||
| 174 | |||
| 175 | 2004-10-08 Masatake YAMATO <jet@gyve.org> | ||
| 176 | |||
| 177 | * server.el (server-process-filter): Wrap `process-send-region' | ||
| 178 | by `condition-case' to guard the case when the pipe to PROC is closed. | ||
| 179 | |||
| 180 | 2004-10-07 Mark A. Hershberger <mah@everybody.org> | ||
| 181 | |||
| 182 | * xml.el (xml-substitute-special): Limit handling of external entities. | ||
| 183 | |||
| 184 | 2004-10-06 Nick Roberts <nickrob@snap.net.nz> | ||
| 185 | |||
| 186 | * progmodes/gdb-ui.el (gdb-ann3): (Re-)initialise gdb-input-queue. | ||
| 187 | |||
| 188 | 2004-10-06 John Paul Wallington <jpw@gnu.org> | ||
| 189 | |||
| 190 | * xml.el (xml-parse-dtd): Fix `error' call. | ||
| 191 | |||
| 192 | 2004-10-05 Mark A. Hershberger <mah@everybody.org> | ||
| 193 | |||
| 194 | * xml.el (xml-substitute-special): Return a single string instead | ||
| 195 | of a list of strings if an entity substitution is made. | ||
| 196 | |||
| 197 | 2004-10-05 Ulf Jasper <ulf.jasper@web.de> | ||
| 198 | |||
| 199 | * calendar/icalendar.el: New file. | ||
| 200 | |||
| 201 | 2004-10-05 Juri Linkov <juri@jurta.org> | ||
| 202 | |||
| 203 | * isearch.el (isearch-done): Set mark after running hook. | ||
| 204 | Suggested by Drew Adams <drew.adams@oracle.com>. | ||
| 205 | |||
| 206 | * info.el (Info-history, Info-toc): Fix Info headers. | ||
| 207 | (Info-toc): Narrow buffer before Info-fontify-node. | ||
| 208 | (Info-build-toc): Don't check for special Info file names. | ||
| 209 | Set main-file to nil if Info-find-file returns a symbol. | ||
| 210 | |||
| 211 | 2004-10-05 Emilio C. Lopes <eclig@gmx.net>: | ||
| 212 | |||
| 213 | * calendar/calendar.el (calendar-goto-iso-week): Add autoload. | ||
| 214 | (calendar-mode-map): Add binding for `calendar-goto-iso-week'. | ||
| 215 | * calendar/cal-menu.el (calendar-mode-map): Ditto. | ||
| 216 | |||
| 217 | 2004-10-05 Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 218 | |||
| 219 | * calendar/cal-iso.el (calendar-iso-read-args): New function, | ||
| 220 | for old interactive spec from calendar-goto-iso-date. | ||
| 221 | (calendar-goto-iso-date): Use it. | ||
| 222 | (calendar-goto-iso-week): New function. Suggested by Emilio | ||
| 223 | C. Lopes <eclig@gmx.net>. | ||
| 224 | |||
| 225 | 2004-10-04 Luc Teirlinck <teirllm@auburn.edu> | ||
| 226 | |||
| 227 | * textmodes/enriched.el (enriched-mode-map): Give `set-left-margin' and | ||
| 228 | `set-right-margin' bindings that follow the minor mode conventions. | ||
| 229 | |||
| 230 | 2004-10-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | 231 | ||
| 3 | * textmodes/tex-mode.el (tex-dvi-view-command): Use `yap' on w32. | 232 | * textmodes/tex-mode.el (tex-dvi-view-command): Use `yap' on w32. |
| 4 | (tex-font-lock-keywords-1): Add url and nolinkurl for args with `_'. | 233 | (tex-font-lock-keywords-1): Add url and nolinkurl for args with `_'. |
| @@ -62,7 +291,7 @@ | |||
| 62 | * diff-mode.el (diff-file-header-re): Tighten up regexp a tiny bit. | 291 | * diff-mode.el (diff-file-header-re): Tighten up regexp a tiny bit. |
| 63 | (diff-fixup-modifs): Catch unified-diff file-headers. | 292 | (diff-fixup-modifs): Catch unified-diff file-headers. |
| 64 | 293 | ||
| 65 | 2004-09-28 Stefan <monnier@iro.umontreal.ca> | 294 | 2004-09-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 66 | 295 | ||
| 67 | * dired.el (dired-view-command-alist): Use more efficient regexps. | 296 | * dired.el (dired-view-command-alist): Use more efficient regexps. |
| 68 | Remove dubious arguments. | 297 | Remove dubious arguments. |
| @@ -102,7 +331,7 @@ | |||
| 102 | (pr-delete-file): Check if file exists before deleting it. | 331 | (pr-delete-file): Check if file exists before deleting it. |
| 103 | Reported by Lennart Borgman <lennart.borgman.073@student.lu.se>. | 332 | Reported by Lennart Borgman <lennart.borgman.073@student.lu.se>. |
| 104 | 333 | ||
| 105 | 2004-09-26 Stefan <monnier@iro.umontreal.ca> | 334 | 2004-09-26 Stefan Monnier <monnier@iro.umontreal.ca> |
| 106 | 335 | ||
| 107 | * term.el (term-display-table): New variable. | 336 | * term.el (term-display-table): New variable. |
| 108 | (term-mode): Use it. | 337 | (term-mode): Use it. |
| @@ -126,7 +355,7 @@ | |||
| 126 | (term-stop-output-log): Rename from `term-stop-photo'. | 355 | (term-stop-output-log): Rename from `term-stop-photo'. |
| 127 | (term-switch-to-alternate-sub-buffer): Comment out, unused. | 356 | (term-switch-to-alternate-sub-buffer): Comment out, unused. |
| 128 | 357 | ||
| 129 | 2004-09-25 Stefan <monnier@iro.umontreal.ca> | 358 | 2004-09-25 Stefan Monnier <monnier@iro.umontreal.ca> |
| 130 | 359 | ||
| 131 | * dired.el (dired-move-to-filename): Don't output a message if | 360 | * dired.el (dired-move-to-filename): Don't output a message if |
| 132 | raise-error is non-nil. Fix return position and value. | 361 | raise-error is non-nil. Fix return position and value. |
| @@ -270,7 +499,7 @@ | |||
| 270 | * progmodes/sh-script.el (sh-mode-default-syntax-table): Set syntax | 499 | * progmodes/sh-script.el (sh-mode-default-syntax-table): Set syntax |
| 271 | of = to "." (punctuation). | 500 | of = to "." (punctuation). |
| 272 | 501 | ||
| 273 | 2004-09-19 Stefan <monnier@iro.umontreal.ca> | 502 | 2004-09-19 Stefan Monnier <monnier@iro.umontreal.ca> |
| 274 | 503 | ||
| 275 | * subr.el (event-basic-type): Fix mask (extend to 22bits). | 504 | * subr.el (event-basic-type): Fix mask (extend to 22bits). |
| 276 | 505 | ||
diff --git a/lisp/button.el b/lisp/button.el index 35905b9e1e4..dcd26846d10 100644 --- a/lisp/button.el +++ b/lisp/button.el | |||
| @@ -78,6 +78,7 @@ Mode-specific keymaps may want to use this as their parent keymap.") | |||
| 78 | (put 'default-button 'mouse-face 'highlight) | 78 | (put 'default-button 'mouse-face 'highlight) |
| 79 | (put 'default-button 'keymap button-map) | 79 | (put 'default-button 'keymap button-map) |
| 80 | (put 'default-button 'type 'button) | 80 | (put 'default-button 'type 'button) |
| 81 | ;; action may be either a function to call, or a marker to go to | ||
| 81 | (put 'default-button 'action 'ignore) | 82 | (put 'default-button 'action 'ignore) |
| 82 | (put 'default-button 'help-echo "mouse-2, RET: Push this button") | 83 | (put 'default-button 'help-echo "mouse-2, RET: Push this button") |
| 83 | ;; Make overlay buttons go away if their underlying text is deleted. | 84 | ;; Make overlay buttons go away if their underlying text is deleted. |
| @@ -217,9 +218,14 @@ changes to a supertype are not reflected in its subtypes)." | |||
| 217 | If USE-MOUSE-ACTION is non-nil, invoke the button's mouse-action | 218 | If USE-MOUSE-ACTION is non-nil, invoke the button's mouse-action |
| 218 | instead of its normal action; if the button has no mouse-action, | 219 | instead of its normal action; if the button has no mouse-action, |
| 219 | the normal action is used instead." | 220 | the normal action is used instead." |
| 220 | (funcall (or (and use-mouse-action (button-get button 'mouse-action)) | 221 | (let ((action (or (and use-mouse-action (button-get button 'mouse-action)) |
| 221 | (button-get button 'action)) | 222 | (button-get button 'action)))) |
| 222 | button)) | 223 | (if (markerp action) |
| 224 | (save-selected-window | ||
| 225 | (select-window (display-buffer (marker-buffer action))) | ||
| 226 | (goto-char action) | ||
| 227 | (recenter 0)) | ||
| 228 | (funcall action button)))) | ||
| 223 | 229 | ||
| 224 | (defun button-label (button) | 230 | (defun button-label (button) |
| 225 | "Return BUTTON's text label." | 231 | "Return BUTTON's text label." |
| @@ -373,10 +379,11 @@ instead of starting at the next button." | |||
| 373 | 379 | ||
| 374 | (defun push-button (&optional pos use-mouse-action) | 380 | (defun push-button (&optional pos use-mouse-action) |
| 375 | "Perform the action specified by a button at location POS. | 381 | "Perform the action specified by a button at location POS. |
| 376 | POS may be either a buffer position or a mouse-event. | 382 | POS may be either a buffer position or a mouse-event. If |
| 377 | If USE-MOUSE-ACTION is non-nil, invoke the button's mouse-action | 383 | USE-MOUSE-ACTION is non-nil, invoke the button's mouse-action |
| 378 | instead of its normal action; if the button has no mouse-action, | 384 | instead of its normal action; if the button has no mouse-action, |
| 379 | the normal action is used instead. | 385 | the normal action is used instead. The action may be either a |
| 386 | function to call or a marker to display. | ||
| 380 | POS defaults to point, except when `push-button' is invoked | 387 | POS defaults to point, except when `push-button' is invoked |
| 381 | interactively as the result of a mouse-event, in which case, the | 388 | interactively as the result of a mouse-event, in which case, the |
| 382 | mouse event is used. | 389 | mouse event is used. |
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index e66f50bd40c..c24a13b91d7 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el | |||
| @@ -93,18 +93,15 @@ C-w Describe how there is no warranty for Calc." | |||
| 93 | 93 | ||
| 94 | (defun calc-describe-copying () | 94 | (defun calc-describe-copying () |
| 95 | (interactive) | 95 | (interactive) |
| 96 | (calc-info) | 96 | (calc-info-goto-node "Copying")) |
| 97 | (Info-goto-node "Copying")) | ||
| 98 | 97 | ||
| 99 | (defun calc-describe-distribution () | 98 | (defun calc-describe-distribution () |
| 100 | (interactive) | 99 | (interactive) |
| 101 | (calc-info) | 100 | (calc-info-goto-node "Reporting Bugs")) |
| 102 | (Info-goto-node "Reporting Bugs")) | ||
| 103 | 101 | ||
| 104 | (defun calc-describe-no-warranty () | 102 | (defun calc-describe-no-warranty () |
| 105 | (interactive) | 103 | (interactive) |
| 106 | (calc-info) | 104 | (calc-info-goto-node "Copying") |
| 107 | (Info-goto-node "Copying") | ||
| 108 | (let ((case-fold-search nil)) | 105 | (let ((case-fold-search nil)) |
| 109 | (search-forward " NO WARRANTY")) | 106 | (search-forward " NO WARRANTY")) |
| 110 | (beginning-of-line) | 107 | (beginning-of-line) |
| @@ -190,13 +187,13 @@ C-w Describe how there is no warranty for Calc." | |||
| 190 | (message "Reading Calc summary from manual...") | 187 | (message "Reading Calc summary from manual...") |
| 191 | (save-window-excursion | 188 | (save-window-excursion |
| 192 | (save-excursion | 189 | (save-excursion |
| 193 | (calc-info) | 190 | (calc-info-goto-node "Summary") |
| 194 | (Info-goto-node "Summary") | ||
| 195 | (goto-char (point-min)) | 191 | (goto-char (point-min)) |
| 196 | (forward-line 1) | 192 | (forward-line 1) |
| 197 | (copy-to-buffer "*Calc Summary*" | 193 | (copy-to-buffer "*Calc Summary*" |
| 198 | (point) (point-max)) | 194 | (point) (point-max)) |
| 199 | (Info-last))) | 195 | (if Info-history |
| 196 | (Info-last)))) | ||
| 200 | (setq case-fold-search nil) | 197 | (setq case-fold-search nil) |
| 201 | (re-search-forward "^\\(.*\\)\\[\\.\\. a b") | 198 | (re-search-forward "^\\(.*\\)\\[\\.\\. a b") |
| 202 | (setq calc-summary-indentation | 199 | (setq calc-summary-indentation |
| @@ -299,35 +296,62 @@ C-w Describe how there is no warranty for Calc." | |||
| 299 | (calc-describe-thing desc "Key Index" nil | 296 | (calc-describe-thing desc "Key Index" nil |
| 300 | (string-match "[A-Z][A-Z][A-Z]" desc)))))) | 297 | (string-match "[A-Z][A-Z][A-Z]" desc)))))) |
| 301 | 298 | ||
| 299 | (defvar calc-help-function-list nil | ||
| 300 | "List of functions provided by Calc.") | ||
| 301 | |||
| 302 | (defvar calc-help-variable-list nil | ||
| 303 | "List of variables provided by Calc.") | ||
| 304 | |||
| 305 | (defun calc-help-index-entries (&rest indices) | ||
| 306 | "Create a list of entries from the INDICES in the Calc info manual." | ||
| 307 | (let ((entrylist '()) | ||
| 308 | entry) | ||
| 309 | (require 'info nil t) | ||
| 310 | (while indices | ||
| 311 | (condition-case nil | ||
| 312 | (with-temp-buffer | ||
| 313 | (Info-mode) | ||
| 314 | (Info-goto-node (concat "(Calc)" (car indices) " Index")) | ||
| 315 | (goto-char (point-min)) | ||
| 316 | (while (re-search-forward "\n\\* \\(.*\\): " nil t) | ||
| 317 | (setq entry (match-string 1)) | ||
| 318 | (if (and (not (string-match "<[1-9]+>" entry)) | ||
| 319 | (not (string-match "(.*)" entry)) | ||
| 320 | (not (string= entry "Menu"))) | ||
| 321 | (unless (assoc entry entrylist) | ||
| 322 | (setq entrylist (cons entry entrylist)))))) | ||
| 323 | (error nil)) | ||
| 324 | (setq indices (cdr indices))) | ||
| 325 | entrylist)) | ||
| 326 | |||
| 302 | (defun calc-describe-function (&optional func) | 327 | (defun calc-describe-function (&optional func) |
| 303 | (interactive) | 328 | (interactive) |
| 329 | (unless calc-help-function-list | ||
| 330 | (setq calc-help-function-list | ||
| 331 | (calc-help-index-entries "Function" "Command"))) | ||
| 304 | (or func | 332 | (or func |
| 305 | (setq func (intern (completing-read "Describe function: " | 333 | (setq func (completing-read "Describe function: " |
| 306 | obarray nil t "calcFunc-")))) | 334 | calc-help-function-list |
| 307 | (setq func (symbol-name func)) | 335 | nil t))) |
| 308 | (if (string-match "\\`calc-." func) | 336 | (if (string-match "\\`calc-." func) |
| 309 | (calc-describe-thing func "Command Index") | 337 | (calc-describe-thing func "Command Index") |
| 310 | (calc-describe-thing (if (string-match "\\`calcFunc-." func) | 338 | (calc-describe-thing func "Function Index"))) |
| 311 | (substring func 9) | ||
| 312 | func) | ||
| 313 | "Function Index"))) | ||
| 314 | 339 | ||
| 315 | (defun calc-describe-variable (&optional var) | 340 | (defun calc-describe-variable (&optional var) |
| 316 | (interactive) | 341 | (interactive) |
| 342 | (unless calc-help-variable-list | ||
| 343 | (setq calc-help-variable-list | ||
| 344 | (calc-help-index-entries "Variable"))) | ||
| 317 | (or var | 345 | (or var |
| 318 | (setq var (intern (completing-read "Describe variable: " | 346 | (setq var (completing-read "Describe variable: " |
| 319 | obarray nil t "var-")))) | 347 | calc-help-variable-list |
| 320 | (setq var (symbol-name var)) | 348 | nil t))) |
| 321 | (calc-describe-thing var "Variable Index" | 349 | (calc-describe-thing var "Variable Index")) |
| 322 | (if (string-match "\\`var-." var) | ||
| 323 | (substring var 4) | ||
| 324 | var))) | ||
| 325 | 350 | ||
| 326 | (defun calc-describe-thing (thing where &optional target not-quoted) | 351 | (defun calc-describe-thing (thing where &optional target not-quoted) |
| 327 | (message "Looking for `%s' in %s..." thing where) | 352 | (message "Looking for `%s' in %s..." thing where) |
| 328 | (let ((savewin (current-window-configuration))) | 353 | (let ((savewin (current-window-configuration))) |
| 329 | (calc-info) | 354 | (calc-info-goto-node where) |
| 330 | (Info-goto-node where) | ||
| 331 | (or (let ((case-fold-search nil)) | 355 | (or (let ((case-fold-search nil)) |
| 332 | (re-search-forward (format "\n\\* +%s: \\(.*\\)\\." | 356 | (re-search-forward (format "\n\\* +%s: \\(.*\\)\\." |
| 333 | (regexp-quote thing)) | 357 | (regexp-quote thing)) |
| @@ -338,7 +362,8 @@ C-w Describe how there is no warranty for Calc." | |||
| 338 | nil t) | 362 | nil t) |
| 339 | (setq thing (format "%s9" (substring thing 0 -1)))) | 363 | (setq thing (format "%s9" (substring thing 0 -1)))) |
| 340 | (progn | 364 | (progn |
| 341 | (Info-last) | 365 | (if Info-history |
| 366 | (Info-last)) | ||
| 342 | (set-window-configuration savewin) | 367 | (set-window-configuration savewin) |
| 343 | (error "Can't find `%s' in %s" thing where))) | 368 | (error "Can't find `%s' in %s" thing where))) |
| 344 | (let (Info-history) | 369 | (let (Info-history) |
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index 772b39ffed4..c01d37e6848 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el | |||
| @@ -160,21 +160,25 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)." | |||
| 160 | (select-window (get-largest-window)) | 160 | (select-window (get-largest-window)) |
| 161 | (info "Calc")) | 161 | (info "Calc")) |
| 162 | 162 | ||
| 163 | (defun calc-info-goto-node (node) | ||
| 164 | "Go to a node in the Calculator info documentation." | ||
| 165 | (interactive) | ||
| 166 | (select-window (get-largest-window)) | ||
| 167 | (Info-goto-node (concat "(Calc)" node))) | ||
| 168 | |||
| 163 | (defun calc-tutorial () | 169 | (defun calc-tutorial () |
| 164 | "Run the Emacs Info system on the Calculator Tutorial." | 170 | "Run the Emacs Info system on the Calculator Tutorial." |
| 165 | (interactive) | 171 | (interactive) |
| 166 | (if (get-buffer-window "*Calculator*") | 172 | (if (get-buffer-window "*Calculator*") |
| 167 | (calc-quit)) | 173 | (calc-quit)) |
| 168 | (calc-info) | 174 | (calc-info-goto-node "Interactive Tutorial") |
| 169 | (Info-goto-node "Interactive Tutorial") | ||
| 170 | (calc-other-window) | 175 | (calc-other-window) |
| 171 | (message "Welcome to the Calc Tutorial!")) | 176 | (message "Welcome to the Calc Tutorial!")) |
| 172 | 177 | ||
| 173 | (defun calc-info-summary () | 178 | (defun calc-info-summary () |
| 174 | "Run the Emacs Info system on the Calculator Summary." | 179 | "Run the Emacs Info system on the Calculator Summary." |
| 175 | (interactive) | 180 | (interactive) |
| 176 | (calc-info) | 181 | (calc-info-goto-node "Summary")) |
| 177 | (Info-goto-node "Summary")) | ||
| 178 | 182 | ||
| 179 | (defun calc-help () | 183 | (defun calc-help () |
| 180 | (interactive) | 184 | (interactive) |
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 5c7e24ed646..c17449a8450 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -942,7 +942,8 @@ If nil, selections displayed but ignored.") | |||
| 942 | calcDigit-algebraic calcDigit-edit) | 942 | calcDigit-algebraic calcDigit-edit) |
| 943 | 943 | ||
| 944 | ("calc-misc" another-calc calc-big-or-small calc-dispatch-help | 944 | ("calc-misc" another-calc calc-big-or-small calc-dispatch-help |
| 945 | calc-help calc-info calc-info-summary calc-inv calc-last-args-stub | 945 | calc-help calc-info calc-info-goto-node calc-info-summary calc-inv |
| 946 | calc-last-args-stub | ||
| 946 | calc-missing-key calc-mod calc-other-window calc-over calc-percent | 947 | calc-missing-key calc-mod calc-other-window calc-over calc-percent |
| 947 | calc-pop-above calc-power calc-roll-down calc-roll-up | 948 | calc-pop-above calc-power calc-roll-down calc-roll-up |
| 948 | calc-shift-Y-prefix-help calc-tutorial calcDigit-letter | 949 | calc-shift-Y-prefix-help calc-tutorial calcDigit-letter |
diff --git a/lisp/calendar/cal-iso.el b/lisp/calendar/cal-iso.el index 0d9ad45c7d6..058bdf071d7 100644 --- a/lisp/calendar/cal-iso.el +++ b/lisp/calendar/cal-iso.el | |||
| @@ -1,8 +1,9 @@ | |||
| 1 | ;;; cal-iso.el --- calendar functions for the ISO calendar | 1 | ;;; cal-iso.el --- calendar functions for the ISO calendar |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995, 1997 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995, 1997, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | 5 | ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> |
| 6 | ;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 6 | ;; Keywords: calendar | 7 | ;; Keywords: calendar |
| 7 | ;; Human-Keywords: ISO calendar, calendar, diary | 8 | ;; Human-Keywords: ISO calendar, calendar, diary |
| 8 | 9 | ||
| @@ -96,27 +97,39 @@ Defaults to today's date if DATE is not given." | |||
| 96 | (message "ISO date: %s" | 97 | (message "ISO date: %s" |
| 97 | (calendar-iso-date-string (calendar-cursor-to-date t)))) | 98 | (calendar-iso-date-string (calendar-cursor-to-date t)))) |
| 98 | 99 | ||
| 100 | (defun calendar-iso-read-args (&optional dayflag) | ||
| 101 | "Interactively read the arguments for an iso date command." | ||
| 102 | (let* ((today (calendar-current-date)) | ||
| 103 | (year (calendar-read | ||
| 104 | "ISO calendar year (>0): " | ||
| 105 | '(lambda (x) (> x 0)) | ||
| 106 | (int-to-string (extract-calendar-year today)))) | ||
| 107 | (no-weeks (extract-calendar-month | ||
| 108 | (calendar-iso-from-absolute | ||
| 109 | (1- | ||
| 110 | (calendar-dayname-on-or-before | ||
| 111 | 1 (calendar-absolute-from-gregorian | ||
| 112 | (list 1 4 (1+ year)))))))) | ||
| 113 | (week (calendar-read | ||
| 114 | (format "ISO calendar week (1-%d): " no-weeks) | ||
| 115 | '(lambda (x) (and (> x 0) (<= x no-weeks))))) | ||
| 116 | (day (if dayflag (calendar-read | ||
| 117 | "ISO day (1-7): " | ||
| 118 | '(lambda (x) (and (<= 1 x) (<= x 7)))) | ||
| 119 | 1))) | ||
| 120 | (list (list week day year)))) | ||
| 121 | |||
| 99 | (defun calendar-goto-iso-date (date &optional noecho) | 122 | (defun calendar-goto-iso-date (date &optional noecho) |
| 100 | "Move cursor to ISO DATE; echo ISO date unless NOECHO is t." | 123 | "Move cursor to ISO DATE; echo ISO date unless NOECHO is t." |
| 101 | (interactive | 124 | (interactive (calendar-iso-read-args t)) |
| 102 | (let* ((today (calendar-current-date)) | 125 | (calendar-goto-date (calendar-gregorian-from-absolute |
| 103 | (year (calendar-read | 126 | (calendar-absolute-from-iso date))) |
| 104 | "ISO calendar year (>0): " | 127 | (or noecho (calendar-print-iso-date))) |
| 105 | '(lambda (x) (> x 0)) | 128 | |
| 106 | (int-to-string (extract-calendar-year today)))) | 129 | (defun calendar-goto-iso-week (date &optional noecho) |
| 107 | (no-weeks (extract-calendar-month | 130 | "Move cursor to ISO DATE; echo ISO date unless NOECHO is t. |
| 108 | (calendar-iso-from-absolute | 131 | Interactively, goes to the first day of the specified week." |
| 109 | (1- | 132 | (interactive (calendar-iso-read-args)) |
| 110 | (calendar-dayname-on-or-before | ||
| 111 | 1 (calendar-absolute-from-gregorian | ||
| 112 | (list 1 4 (1+ year)))))))) | ||
| 113 | (week (calendar-read | ||
| 114 | (format "ISO calendar week (1-%d): " no-weeks) | ||
| 115 | '(lambda (x) (and (> x 0) (<= x no-weeks))))) | ||
| 116 | (day (calendar-read | ||
| 117 | "ISO day (1-7): " | ||
| 118 | '(lambda (x) (and (<= 1 x) (<= x 7)))))) | ||
| 119 | (list (list week day year)))) | ||
| 120 | (calendar-goto-date (calendar-gregorian-from-absolute | 133 | (calendar-goto-date (calendar-gregorian-from-absolute |
| 121 | (calendar-absolute-from-iso date))) | 134 | (calendar-absolute-from-iso date))) |
| 122 | (or noecho (calendar-print-iso-date))) | 135 | (or noecho (calendar-print-iso-date))) |
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index a652e7ca768..ceb4c56f7fd 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | ;;; cal-menu.el --- calendar functions for menu bar and popup menu support | 1 | ;;; cal-menu.el --- calendar functions for menu bar and popup menu support |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1994, 1995, 2001, 2003 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1994, 1995, 2001, 2003, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | 5 | ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> |
| 6 | ;; Lara Rios <lrios@coewl.cen.uiuc.edu> | 6 | ;; Lara Rios <lrios@coewl.cen.uiuc.edu> |
| 7 | ;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 7 | ;; Keywords: calendar | 8 | ;; Keywords: calendar |
| 8 | ;; Human-Keywords: calendar, popup menus, menu bar | 9 | ;; Human-Keywords: calendar, popup menus, menu bar |
| 9 | 10 | ||
| @@ -121,6 +122,8 @@ | |||
| 121 | '("Astronomical Date" . calendar-goto-astro-day-number)) | 122 | '("Astronomical Date" . calendar-goto-astro-day-number)) |
| 122 | (define-key calendar-mode-map [menu-bar goto iso] | 123 | (define-key calendar-mode-map [menu-bar goto iso] |
| 123 | '("ISO Date" . calendar-goto-iso-date)) | 124 | '("ISO Date" . calendar-goto-iso-date)) |
| 125 | (define-key calendar-mode-map [menu-bar goto iso-week] | ||
| 126 | '("ISO Week" . calendar-goto-iso-week)) | ||
| 124 | (define-key calendar-mode-map [menu-bar goto day-of-year] | 127 | (define-key calendar-mode-map [menu-bar goto day-of-year] |
| 125 | '("Day of Year" . calendar-goto-day-of-year)) | 128 | '("Day of Year" . calendar-goto-day-of-year)) |
| 126 | (define-key calendar-mode-map [menu-bar goto gregorian] | 129 | (define-key calendar-mode-map [menu-bar goto gregorian] |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 9d38cde21ce..aa0b3005fad 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -1769,6 +1769,10 @@ Driven by the variable `calendar-date-display-form'.") | |||
| 1769 | "Move cursor to ISO date." | 1769 | "Move cursor to ISO date." |
| 1770 | t) | 1770 | t) |
| 1771 | 1771 | ||
| 1772 | (autoload 'calendar-goto-iso-week "cal-iso" | ||
| 1773 | "Move cursor to start of ISO week." | ||
| 1774 | t) | ||
| 1775 | |||
| 1772 | (autoload 'calendar-print-iso-date "cal-iso" | 1776 | (autoload 'calendar-print-iso-date "cal-iso" |
| 1773 | "Show the ISO date equivalents of date." | 1777 | "Show the ISO date equivalents of date." |
| 1774 | t) | 1778 | t) |
| @@ -2204,6 +2208,7 @@ the inserted text. Value is always t." | |||
| 2204 | (define-key calendar-mode-map "ge" 'calendar-goto-ethiopic-date) | 2208 | (define-key calendar-mode-map "ge" 'calendar-goto-ethiopic-date) |
| 2205 | (define-key calendar-mode-map "gp" 'calendar-goto-persian-date) | 2209 | (define-key calendar-mode-map "gp" 'calendar-goto-persian-date) |
| 2206 | (define-key calendar-mode-map "gc" 'calendar-goto-iso-date) | 2210 | (define-key calendar-mode-map "gc" 'calendar-goto-iso-date) |
| 2211 | (define-key calendar-mode-map "gw" 'calendar-goto-iso-week) | ||
| 2207 | (define-key calendar-mode-map "gf" 'calendar-goto-french-date) | 2212 | (define-key calendar-mode-map "gf" 'calendar-goto-french-date) |
| 2208 | (define-key calendar-mode-map "gml" 'calendar-goto-mayan-long-count-date) | 2213 | (define-key calendar-mode-map "gml" 'calendar-goto-mayan-long-count-date) |
| 2209 | (define-key calendar-mode-map "gmpc" 'calendar-previous-calendar-round-date) | 2214 | (define-key calendar-mode-map "gmpc" 'calendar-previous-calendar-round-date) |
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el new file mode 100644 index 00000000000..e83e8e980b6 --- /dev/null +++ b/lisp/calendar/icalendar.el | |||
| @@ -0,0 +1,1299 @@ | |||
| 1 | ;;; icalendar.el --- iCalendar implementation | ||
| 2 | |||
| 3 | ;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Ulf Jasper <ulf.jasper@web.de> | ||
| 6 | ;; Created: August 2002 | ||
| 7 | ;; Keywords: calendar | ||
| 8 | ;; Human-Keywords: calendar, diary, iCalendar, vCalendar | ||
| 9 | |||
| 10 | ;; This file is part of GNU Emacs. | ||
| 11 | |||
| 12 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 13 | ;; it under the terms of the GNU General Public License as published by | ||
| 14 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 15 | ;; any later version. | ||
| 16 | |||
| 17 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | ;; GNU General Public License for more details. | ||
| 21 | |||
| 22 | ;; You should have received a copy of the GNU General Public License | ||
| 23 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 24 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 25 | ;; Boston, MA 02111-1307, USA. | ||
| 26 | |||
| 27 | ;;; Commentary: | ||
| 28 | |||
| 29 | ;; This package is documented in the Emacs Manual. | ||
| 30 | |||
| 31 | |||
| 32 | ;;; History: | ||
| 33 | |||
| 34 | ;; 0.06 Bugfixes regarding icalendar-import-format-*. | ||
| 35 | ;; Fix in icalendar-convert-diary-to-ical -- thanks to Philipp Grau. | ||
| 36 | |||
| 37 | ;; 0.05: New import format scheme: Replaced icalendar-import-prefix-*, | ||
| 38 | ;; icalendar-import-ignored-properties, and | ||
| 39 | ;; icalendar-import-separator with icalendar-import-format(-*). | ||
| 40 | ;; icalendar-import-file and icalendar-convert-diary-to-ical | ||
| 41 | ;; have an extra parameter which should prevent them from | ||
| 42 | ;; erasing their target files (untested!). | ||
| 43 | ;; Tested with Emacs 21.3.2 | ||
| 44 | |||
| 45 | ;; 0.04: Bugfix: import: double quoted param values did not work | ||
| 46 | ;; Read DURATION property when importing. | ||
| 47 | ;; Added parameter icalendar-duration-correction. | ||
| 48 | |||
| 49 | ;; 0.03: Export takes care of european-calendar-style. | ||
| 50 | ;; Tested with Emacs 21.3.2 and XEmacs 21.4.12 | ||
| 51 | |||
| 52 | ;; 0.02: Should work in XEmacs now. Thanks to Len Trigg for the | ||
| 53 | ;; XEmacs patches! | ||
| 54 | ;; Added exporting from Emacs diary to ical. | ||
| 55 | ;; Some bugfixes, after testing with calendars from | ||
| 56 | ;; http://icalshare.com. | ||
| 57 | ;; Tested with Emacs 21.3.2 and XEmacs 21.4.12 | ||
| 58 | |||
| 59 | ;; 0.01: First published version. Trial version. Alpha version. | ||
| 60 | |||
| 61 | ;; ====================================================================== | ||
| 62 | ;; To Do: | ||
| 63 | |||
| 64 | ;; * Import from ical: | ||
| 65 | ;; + Need more properties for icalendar-import-format | ||
| 66 | ;; + check vcalendar version | ||
| 67 | ;; + check (unknown) elements | ||
| 68 | ;; + recurring events! | ||
| 69 | ;; + works for european style calendars only! Does it? | ||
| 70 | ;; + alarm | ||
| 71 | ;; + exceptions in recurring events | ||
| 72 | ;; + the parser is too soft | ||
| 73 | ;; + error log is incomplete | ||
| 74 | ;; + nice to have: #include "webcal://foo.com/some-calendar.ics" | ||
| 75 | |||
| 76 | ;; * Export into ical | ||
| 77 | ;; + diary-date, diary-float, and self-made sexp entries are not | ||
| 78 | ;; understood | ||
| 79 | ;; + timezones, currently all times are local! | ||
| 80 | |||
| 81 | ;; * Other things | ||
| 82 | ;; + defcustom icalendar-import-ignored-properties does not work with | ||
| 83 | ;; XEmacs. | ||
| 84 | ;; + clean up all those date/time parsing functions | ||
| 85 | ;; + Handle todo items? | ||
| 86 | ;; + Check iso 8601 for datetime and period | ||
| 87 | ;; + Which chars to (un)escape? | ||
| 88 | ;; + Time to find out how the profiler works? | ||
| 89 | |||
| 90 | |||
| 91 | ;;; Code: | ||
| 92 | |||
| 93 | (defconst icalendar-version 0.06 | ||
| 94 | "Version number of icalendar.el.") | ||
| 95 | |||
| 96 | ;; ====================================================================== | ||
| 97 | ;; Customizables | ||
| 98 | ;; ====================================================================== | ||
| 99 | (defgroup icalendar nil | ||
| 100 | "Icalendar support." | ||
| 101 | :prefix "icalendar-" | ||
| 102 | :group 'calendar) | ||
| 103 | |||
| 104 | (defcustom icalendar-import-format | ||
| 105 | "%s%d%l%o" | ||
| 106 | "Format string for importing events from iCalendar into Emacs diary. | ||
| 107 | This string defines how iCalendar events are inserted into diary | ||
| 108 | file. Meaning of the specifiers: | ||
| 109 | %d Description, see `icalendar-import-format-description' | ||
| 110 | %l Location, see `icalendar-import-format-location' | ||
| 111 | %o Organizer, see `icalendar-import-format-organizer' | ||
| 112 | %s Subject, see `icalendar-import-format-subject'" | ||
| 113 | :type 'string | ||
| 114 | :group 'icalendar) | ||
| 115 | |||
| 116 | (defcustom icalendar-import-format-subject | ||
| 117 | "%s" | ||
| 118 | "Format string defining how the subject element is formatted. | ||
| 119 | This applies only if the subject is not empty! `%s' is replaced | ||
| 120 | by the subject." | ||
| 121 | :type 'string | ||
| 122 | :group 'icalendar) | ||
| 123 | |||
| 124 | (defcustom icalendar-import-format-description | ||
| 125 | "\n Desc: %s" | ||
| 126 | "Format string defining how the description element is formatted. | ||
| 127 | This applies only if the description is not empty! `%s' is | ||
| 128 | replaced by the description." | ||
| 129 | :type 'string | ||
| 130 | :group 'icalendar) | ||
| 131 | |||
| 132 | (defcustom icalendar-import-format-location | ||
| 133 | "\n Location: %s" | ||
| 134 | "Format string defining how the location element is formatted. | ||
| 135 | This applies only if the location is not empty! `%s' is replaced | ||
| 136 | by the location." | ||
| 137 | :type 'string | ||
| 138 | :group 'icalendar) | ||
| 139 | |||
| 140 | (defcustom icalendar-import-format-organizer | ||
| 141 | "\n Organizer: %s" | ||
| 142 | "Format string defining how the organizer element is formatted. | ||
| 143 | This applies only if the organizer is not empty! `%s' is | ||
| 144 | replaced by the organizer." | ||
| 145 | :type 'string | ||
| 146 | :group 'icalendar) | ||
| 147 | |||
| 148 | (defcustom icalendar-duration-correction | ||
| 149 | t | ||
| 150 | "Workaround for all-day events. | ||
| 151 | If non-nil the length=duration of iCalendar appointments that | ||
| 152 | have a length of exactly n days is decreased by one day. This | ||
| 153 | fixes problems with all-day events, which appear to be one day | ||
| 154 | longer than they are." | ||
| 155 | :type 'boolean | ||
| 156 | :group 'icalendar) | ||
| 157 | |||
| 158 | |||
| 159 | ;; ====================================================================== | ||
| 160 | ;; NO USER SERVICABLE PARTS BELOW THIS LINE | ||
| 161 | ;; ====================================================================== | ||
| 162 | |||
| 163 | (defconst icalendar-weekdayabbrev-table | ||
| 164 | '(("mon\\(day\\)?" . "MO") | ||
| 165 | ("tue\\(sday\\)?" . "TU") | ||
| 166 | ("wed\\(nesday\\)?" . "WE") | ||
| 167 | ("thu\\(rsday\\)?" . "TH") | ||
| 168 | ("fri\\(day\\)?" . "FR") | ||
| 169 | ("sat\\(urday\\)?" . "SA") | ||
| 170 | ("sun\\(day\\)?" . "SU")) | ||
| 171 | "Translation table for weekdays.") | ||
| 172 | |||
| 173 | (defconst icalendar-monthnumber-table | ||
| 174 | '(("^jan\\(uar\\)?y?$" . 1) | ||
| 175 | ("^feb\\(ruar\\)?y?$" . 2) | ||
| 176 | ("^mar\\(ch\\)?\\|märz?$" . 3) | ||
| 177 | ("^apr\\(il\\)?$" . 4) | ||
| 178 | ("^ma[iy]$" . 5) | ||
| 179 | ("^jun[ie]?$" . 6) | ||
| 180 | ("^jul[iy]?$" . 7) | ||
| 181 | ("^aug\\(ust\\)?$" . 8) | ||
| 182 | ("^sep\\(tember\\)?$" . 9) | ||
| 183 | ("^o[ck]t\\(ober\\)?$" . 10) | ||
| 184 | ("^nov\\(ember\\)?$" . 11) | ||
| 185 | ("^de[cz]\\(ember\\)?$" . 12)) | ||
| 186 | "Regular expressions for month names. | ||
| 187 | Currently this matches only German and English.") | ||
| 188 | |||
| 189 | (defvar icalendar-debug nil ".") | ||
| 190 | |||
| 191 | ;; ====================================================================== | ||
| 192 | ;; all the other libs we need | ||
| 193 | ;; ====================================================================== | ||
| 194 | (require 'calendar) | ||
| 195 | (require 'appt) | ||
| 196 | |||
| 197 | ;; ====================================================================== | ||
| 198 | ;; Core functionality | ||
| 199 | ;; Functions for parsing icalendars, importing and so on | ||
| 200 | ;; ====================================================================== | ||
| 201 | |||
| 202 | (defun icalendar-get-unfolded-buffer (folded-ical-buffer) | ||
| 203 | "Return a new buffer containing the unfolded contents of a buffer. | ||
| 204 | Folding is the iCalendar way of wrapping long lines. In the | ||
| 205 | created buffer all occurrences of CR LF BLANK are replaced by the | ||
| 206 | empty string. Argument FOLDED-ICAL-BUFFER is the unfolded input | ||
| 207 | buffer." | ||
| 208 | (let ((unfolded-buffer (get-buffer-create " *icalendar-work*"))) | ||
| 209 | (save-current-buffer | ||
| 210 | (set-buffer unfolded-buffer) | ||
| 211 | (erase-buffer) | ||
| 212 | (insert-buffer folded-ical-buffer) | ||
| 213 | (while (re-search-forward "\r?\n[ \t]" nil t) | ||
| 214 | (replace-match "" nil nil)) | ||
| 215 | ) | ||
| 216 | unfolded-buffer)) | ||
| 217 | |||
| 218 | ;; Replace regexp RE with RP in string ST and return the new string. | ||
| 219 | ;; This is here for compatibility with XEmacs. | ||
| 220 | (defsubst icalendar-rris (re rp st) | ||
| 221 | ;; XEmacs: | ||
| 222 | (if (fboundp 'replace-in-string) | ||
| 223 | (save-match-data ;; apparently XEmacs needs save-match-data | ||
| 224 | (replace-in-string st re rp)) | ||
| 225 | ;; Emacs: | ||
| 226 | (replace-regexp-in-string re rp st))) | ||
| 227 | |||
| 228 | (defun icalendar-read-element (invalue inparams) | ||
| 229 | "Recursively read the next iCalendar element in the current buffer. | ||
| 230 | INVALUE gives the current iCalendar element we are reading. | ||
| 231 | INPARAMS gives the current parameters..... | ||
| 232 | This function calls itself recursively for each nested calendar element | ||
| 233 | it finds" | ||
| 234 | (let (element children line name params param param-name param-value | ||
| 235 | value | ||
| 236 | (continue t)) | ||
| 237 | (setq children '()) | ||
| 238 | (while (and continue | ||
| 239 | (re-search-forward "^\\([A-Za-z0-9-]+\\)[;:]" nil t)) | ||
| 240 | (setq name (intern (match-string 1))) | ||
| 241 | (backward-char 1) | ||
| 242 | (setq params '()) | ||
| 243 | (setq line '()) | ||
| 244 | (while (looking-at ";") | ||
| 245 | (re-search-forward ";\\([A-Za-z0-9-]+\\)=" nil nil) | ||
| 246 | (setq param-name (intern (match-string 1))) | ||
| 247 | (re-search-forward "\\(\\([^;,:\"]+\\)\\|\"\\([^\"]+\\)\"\\)[;:]" | ||
| 248 | nil t) | ||
| 249 | (backward-char 1) | ||
| 250 | (setq param-value (or (match-string 2) (match-string 3))) | ||
| 251 | (setq param (list param-name param-value)) | ||
| 252 | (while (looking-at ",") | ||
| 253 | (re-search-forward "\\(\\([^;,:]+\\)\\|\"\\([^\"]+\\)\"\\)" | ||
| 254 | nil t) | ||
| 255 | (if (match-string 2) | ||
| 256 | (setq param-value (match-string 2)) | ||
| 257 | (setq param-value (match-string 3))) | ||
| 258 | (setq param (append param param-value))) | ||
| 259 | (setq params (append params param))) | ||
| 260 | (unless (looking-at ":") | ||
| 261 | (error "Oops")) | ||
| 262 | (forward-char 1) | ||
| 263 | (re-search-forward "\\(.*\\)\\(\r?\n[ \t].*\\)*" nil t) | ||
| 264 | (setq value (icalendar-rris "\r?\n[ \t]" "" (match-string 0))) | ||
| 265 | (setq line (list name params value)) | ||
| 266 | (cond ((eq name 'BEGIN) | ||
| 267 | (setq children | ||
| 268 | (append children | ||
| 269 | (list (icalendar-read-element (intern value) | ||
| 270 | params))))) | ||
| 271 | ((eq name 'END) | ||
| 272 | (setq continue nil)) | ||
| 273 | (t | ||
| 274 | (setq element (append element (list line)))))) | ||
| 275 | (if invalue | ||
| 276 | (list invalue inparams element children) | ||
| 277 | children))) | ||
| 278 | |||
| 279 | ;; ====================================================================== | ||
| 280 | ;; helper functions for examining events | ||
| 281 | ;; ====================================================================== | ||
| 282 | |||
| 283 | (defsubst icalendar-get-all-event-properties (event) | ||
| 284 | "Return the list of properties in this EVENT." | ||
| 285 | (car (cddr event))) | ||
| 286 | |||
| 287 | (defun icalendar-get-event-property (event prop) | ||
| 288 | "For the given EVENT return the value of the property PROP." | ||
| 289 | (catch 'found | ||
| 290 | (let ((props (car (cddr event))) pp) | ||
| 291 | (while props | ||
| 292 | (setq pp (car props)) | ||
| 293 | (if (eq (car pp) prop) | ||
| 294 | (throw 'found (car (cddr pp)))) | ||
| 295 | (setq props (cdr props)))) | ||
| 296 | nil)) | ||
| 297 | |||
| 298 | (defun icalendar-set-event-property (event prop new-value) | ||
| 299 | "For the given EVENT set the property PROP to the value NEW-VALUE." | ||
| 300 | (catch 'found | ||
| 301 | (let ((props (car (cddr event))) pp) | ||
| 302 | (while props | ||
| 303 | (setq pp (car props)) | ||
| 304 | (when (eq (car pp) prop) | ||
| 305 | (setcdr (cdr pp) new-value) | ||
| 306 | (throw 'found (car (cddr pp)))) | ||
| 307 | (setq props (cdr props))) | ||
| 308 | (setq props (car (cddr event))) | ||
| 309 | (setcar (cddr event) | ||
| 310 | (append props (list (list prop nil new-value))))))) | ||
| 311 | |||
| 312 | (defun icalendar-get-children (node name) | ||
| 313 | "Return all children of the given NODE which have a name NAME. | ||
| 314 | For instance the VCALENDAR node can have VEVENT children as well as VTODO | ||
| 315 | children." | ||
| 316 | (let ((result nil) | ||
| 317 | (children (cadr (cddr node)))) | ||
| 318 | (when (eq (car node) name) | ||
| 319 | (setq result node)) | ||
| 320 | ;;(message "%s" node) | ||
| 321 | (when children | ||
| 322 | (let ((subresult | ||
| 323 | (delq nil | ||
| 324 | (mapcar (lambda (n) | ||
| 325 | (icalendar-get-children n name)) | ||
| 326 | children)))) | ||
| 327 | (if subresult | ||
| 328 | (if result | ||
| 329 | (setq result (append result subresult)) | ||
| 330 | (setq result subresult))))) | ||
| 331 | result)) | ||
| 332 | |||
| 333 | ; private | ||
| 334 | (defun icalendar-all-events (icalendar) | ||
| 335 | "Return the list of all existing events in the given ICALENDAR." | ||
| 336 | (interactive "") | ||
| 337 | (icalendar-get-children (car icalendar) 'VEVENT)) | ||
| 338 | |||
| 339 | (defun icalendar-split-value (value-string) | ||
| 340 | "Splits VALUE-STRING at ';='." | ||
| 341 | (let ((result '()) | ||
| 342 | param-name param-value) | ||
| 343 | (when value-string | ||
| 344 | (save-current-buffer | ||
| 345 | (set-buffer (get-buffer-create " *ical-temp*")) | ||
| 346 | (set-buffer-modified-p nil) | ||
| 347 | (erase-buffer) | ||
| 348 | (insert value-string) | ||
| 349 | (goto-char (point-min)) | ||
| 350 | (while | ||
| 351 | (re-search-forward | ||
| 352 | "\\([A-Za-z0-9-]+\\)=\\(\\([^;,:]+\\)\\|\"\\([^\"]+\\)\"\\);?" | ||
| 353 | nil t) | ||
| 354 | (setq param-name (intern (match-string 1))) | ||
| 355 | (setq param-value (match-string 2)) | ||
| 356 | (setq result | ||
| 357 | (append result (list (list param-name param-value))))))) | ||
| 358 | result)) | ||
| 359 | |||
| 360 | (defun icalendar-decode-isodatetime (isodatetimestring) | ||
| 361 | "Return ISODATETIMESTRING in format like `decode-time'. | ||
| 362 | Converts from ISO-8601 to Emacs representation. If ISODATETIMESTRING | ||
| 363 | specifies UTC time (trailing letter Z) the decoded time is given in | ||
| 364 | the local time zone! FIXME: TZID-attributes are ignored....! FIXME: | ||
| 365 | multiple comma-separated values should be allowed!" | ||
| 366 | (icalendar-dmsg isodatetimestring) | ||
| 367 | (if isodatetimestring | ||
| 368 | ;; day/month/year must be present | ||
| 369 | (let ((year (read (substring isodatetimestring 0 4))) | ||
| 370 | (month (read (substring isodatetimestring 4 6))) | ||
| 371 | (day (read (substring isodatetimestring 6 8))) | ||
| 372 | (hour 0) | ||
| 373 | (minute 0) | ||
| 374 | (second 0)) | ||
| 375 | (when (> (length isodatetimestring) 12) | ||
| 376 | ;; hour/minute present | ||
| 377 | (setq hour (read (substring isodatetimestring 9 11))) | ||
| 378 | (setq minute (read (substring isodatetimestring 11 13)))) | ||
| 379 | (when (> (length isodatetimestring) 14) | ||
| 380 | ;; seconds present | ||
| 381 | (setq second (read (substring isodatetimestring 13 15)))) | ||
| 382 | (when (and (> (length isodatetimestring) 15) | ||
| 383 | ;; UTC specifier present | ||
| 384 | (char-equal ?Z (aref isodatetimestring 15))) | ||
| 385 | ;; if not UTC add current-time-zone offset | ||
| 386 | (setq second (+ (car (current-time-zone)) second))) | ||
| 387 | ;; create the decoded date-time | ||
| 388 | ;; FIXME!?! | ||
| 389 | (condition-case nil | ||
| 390 | (decode-time (encode-time second minute hour day month year)) | ||
| 391 | (error | ||
| 392 | (message "Cannot decode \"%s\"" isodatetimestring) | ||
| 393 | ;; hope for the best... | ||
| 394 | (list second minute hour day month year 0 nil 0)))) | ||
| 395 | ;; isodatetimestring == nil | ||
| 396 | nil)) | ||
| 397 | |||
| 398 | (defun icalendar-decode-isoduration (isodurationstring) | ||
| 399 | "Return ISODURATIONSTRING in format like `decode-time'. | ||
| 400 | Converts from ISO-8601 to Emacs representation. If ISODURATIONSTRING | ||
| 401 | specifies UTC time (trailing letter Z) the decoded time is given in | ||
| 402 | the local time zone! FIXME: TZID-attributes are ignored....! FIXME: | ||
| 403 | multiple comma-separated values should be allowed!" | ||
| 404 | (if isodurationstring | ||
| 405 | (save-match-data | ||
| 406 | (string-match | ||
| 407 | (concat | ||
| 408 | "^P[+-]?\\(" | ||
| 409 | "\\(\\([0-9]+\\)D\\)" ; days only | ||
| 410 | "\\|" | ||
| 411 | "\\(\\(\\([0-9]+\\)D\\)?T\\(\\([0-9]+\\)H\\)?" ; opt days | ||
| 412 | "\\(\\([0-9]+\\)M\\)?\\(\\([0-9]+\\)S\\)?\\)" ; mand. time | ||
| 413 | "\\|" | ||
| 414 | "\\(\\([0-9]+\\)W\\)" ; weeks only | ||
| 415 | "\\)$") isodurationstring) | ||
| 416 | (let ((seconds 0) | ||
| 417 | (minutes 0) | ||
| 418 | (hours 0) | ||
| 419 | (days 0) | ||
| 420 | (months 0) | ||
| 421 | (years 0)) | ||
| 422 | (cond | ||
| 423 | ((match-beginning 2) ;days only | ||
| 424 | (setq days (read (substring isodurationstring | ||
| 425 | (match-beginning 3) | ||
| 426 | (match-end 3)))) | ||
| 427 | (when icalendar-duration-correction | ||
| 428 | (setq days (1- days)))) | ||
| 429 | ((match-beginning 4) ;days and time | ||
| 430 | (if (match-beginning 5) | ||
| 431 | (setq days (* 7 (read (substring isodurationstring | ||
| 432 | (match-beginning 6) | ||
| 433 | (match-end 6)))))) | ||
| 434 | (if (match-beginning 7) | ||
| 435 | (setq hours (read (substring isodurationstring | ||
| 436 | (match-beginning 8) | ||
| 437 | (match-end 8))))) | ||
| 438 | (if (match-beginning 9) | ||
| 439 | (setq minutes (read (substring isodurationstring | ||
| 440 | (match-beginning 10) | ||
| 441 | (match-end 10))))) | ||
| 442 | (if (match-beginning 11) | ||
| 443 | (setq seconds (read (substring isodurationstring | ||
| 444 | (match-beginning 12) | ||
| 445 | (match-end 12))))) | ||
| 446 | ) | ||
| 447 | ((match-beginning 13) ;weeks only | ||
| 448 | (setq days (* 7 (read (substring isodurationstring | ||
| 449 | (match-beginning 14) | ||
| 450 | (match-end 14)))))) | ||
| 451 | ) | ||
| 452 | (list seconds minutes hours days months years))) | ||
| 453 | ;; isodatetimestring == nil | ||
| 454 | nil)) | ||
| 455 | |||
| 456 | (defun icalendar-add-decoded-times (time1 time2) | ||
| 457 | "Add TIME1 to TIME2. | ||
| 458 | Both times must be given in decoded form. One of these times must be | ||
| 459 | valid (year > 1900 or something)." | ||
| 460 | ;; FIXME: does this function exist already? | ||
| 461 | (decode-time (encode-time | ||
| 462 | (+ (nth 0 time1) (nth 0 time2)) | ||
| 463 | (+ (nth 1 time1) (nth 1 time2)) | ||
| 464 | (+ (nth 2 time1) (nth 2 time2)) | ||
| 465 | (+ (nth 3 time1) (nth 3 time2)) | ||
| 466 | (+ (nth 4 time1) (nth 4 time2)) | ||
| 467 | (+ (nth 5 time1) (nth 5 time2)) | ||
| 468 | nil | ||
| 469 | nil | ||
| 470 | ;;(or (nth 6 time1) (nth 6 time2)) ;; FIXME? | ||
| 471 | ))) | ||
| 472 | |||
| 473 | (defun icalendar-datetime-to-noneuropean-date (datetime) | ||
| 474 | "Convert the decoded DATETIME to non-european-style format. | ||
| 475 | Non-European format: (month day year)." | ||
| 476 | (if datetime | ||
| 477 | (list (nth 4 datetime) ;month | ||
| 478 | (nth 3 datetime) ;day | ||
| 479 | (nth 5 datetime));year | ||
| 480 | ;; datetime == nil | ||
| 481 | nil)) | ||
| 482 | |||
| 483 | (defun icalendar-datetime-to-european-date (datetime) | ||
| 484 | "Convert the decoded DATETIME to European format. | ||
| 485 | European format: (day month year). | ||
| 486 | FIXME" | ||
| 487 | (if datetime | ||
| 488 | (format "%d %d %d" (nth 3 datetime); day | ||
| 489 | (nth 4 datetime) ;month | ||
| 490 | (nth 5 datetime));year | ||
| 491 | ;; datetime == nil | ||
| 492 | nil)) | ||
| 493 | |||
| 494 | (defun icalendar-datetime-to-colontime (datetime) | ||
| 495 | "Extract the time part of a decoded DATETIME into 24-hour format. | ||
| 496 | Note that this silently ignores seconds." | ||
| 497 | (format "%02d:%02d" (nth 2 datetime) (nth 1 datetime))) | ||
| 498 | |||
| 499 | (defun icalendar-get-month-number (monthname) | ||
| 500 | "Return the month number for the given MONTHNAME." | ||
| 501 | (save-match-data | ||
| 502 | (let ((case-fold-search t)) | ||
| 503 | (assoc-default monthname icalendar-monthnumber-table | ||
| 504 | 'string-match)))) | ||
| 505 | |||
| 506 | (defun icalendar-get-weekday-abbrev (weekday) | ||
| 507 | "Return the abbreviated WEEKDAY." | ||
| 508 | ;;FIXME: ISO-like(?). | ||
| 509 | (save-match-data | ||
| 510 | (let ((case-fold-search t)) | ||
| 511 | (assoc-default weekday icalendar-weekdayabbrev-table | ||
| 512 | 'string-match)))) | ||
| 513 | |||
| 514 | (defun icalendar-datestring-to-isodate (datestring &optional day-shift) | ||
| 515 | "Convert diary-style DATESTRING to iso-style date. | ||
| 516 | If DAY-SHIFT is non-nil, the result is shifted by DAY-SHIFT days | ||
| 517 | -- DAY-SHIFT must be either nil or an integer. This function | ||
| 518 | takes care of european-style." | ||
| 519 | (let ((day -1) month year) | ||
| 520 | (save-match-data | ||
| 521 | (cond (;; numeric date | ||
| 522 | (string-match (concat "\\s-*" | ||
| 523 | "0?\\([1-9][0-9]?\\)[ \t/]\\s-*" | ||
| 524 | "0?\\([1-9][0-9]?\\),?[ \t/]\\s-*" | ||
| 525 | "\\([0-9]\\{4\\}\\)") | ||
| 526 | datestring) | ||
| 527 | (setq day (read (substring datestring (match-beginning 1) | ||
| 528 | (match-end 1)))) | ||
| 529 | (setq month (read (substring datestring (match-beginning 2) | ||
| 530 | (match-end 2)))) | ||
| 531 | (setq year (read (substring datestring (match-beginning 3) | ||
| 532 | (match-end 3)))) | ||
| 533 | (unless european-calendar-style | ||
| 534 | (let ((x month)) | ||
| 535 | (setq month day) | ||
| 536 | (setq day x)))) | ||
| 537 | (;; date contains month names -- european-style | ||
| 538 | (and european-calendar-style | ||
| 539 | (string-match (concat "\\s-*" | ||
| 540 | "0?\\([123]?[0-9]\\)[ \t/]\\s-*" | ||
| 541 | "\\([A-Za-z][^ ]+\\)[ \t/]\\s-*" | ||
| 542 | "\\([0-9]\\{4\\}\\)") | ||
| 543 | datestring)) | ||
| 544 | (setq day (read (substring datestring (match-beginning 1) | ||
| 545 | (match-end 1)))) | ||
| 546 | (setq month (icalendar-get-month-number | ||
| 547 | (substring datestring (match-beginning 2) | ||
| 548 | (match-end 2)))) | ||
| 549 | (setq year (read (substring datestring (match-beginning 3) | ||
| 550 | (match-end 3))))) | ||
| 551 | (;; date contains month names -- non-european-style | ||
| 552 | (and (not european-calendar-style) | ||
| 553 | (string-match (concat "\\s-*" | ||
| 554 | "\\([A-Za-z][^ ]+\\)[ \t/]\\s-*" | ||
| 555 | "0?\\([123]?[0-9]\\),?[ \t/]\\s-*" | ||
| 556 | "\\([0-9]\\{4\\}\\)") | ||
| 557 | datestring)) | ||
| 558 | (setq day (read (substring datestring (match-beginning 2) | ||
| 559 | (match-end 2)))) | ||
| 560 | (setq month (icalendar-get-month-number | ||
| 561 | (substring datestring (match-beginning 1) | ||
| 562 | (match-end 1)))) | ||
| 563 | (setq year (read (substring datestring (match-beginning 3) | ||
| 564 | (match-end 3))))) | ||
| 565 | (t | ||
| 566 | nil))) | ||
| 567 | (if (> day 0) | ||
| 568 | (let ((mdy (calendar-gregorian-from-absolute | ||
| 569 | (+ (calendar-absolute-from-gregorian (list month day year)) | ||
| 570 | (or day-shift 0))))) | ||
| 571 | (format "%04d%02d%02d" (nth 2 mdy) (nth 0 mdy) (nth 1 mdy))) | ||
| 572 | nil))) | ||
| 573 | |||
| 574 | (defun icalendar-dmsg (&rest args) | ||
| 575 | "Print message ARGS if `icalendar-debug' is non-nil." | ||
| 576 | (if icalendar-debug | ||
| 577 | (apply 'message args))) | ||
| 578 | |||
| 579 | (defun icalendar-diarytime-to-isotime (timestring ampmstring) | ||
| 580 | "Convert a a time like 9:30pm to an iso-conform string like T213000. | ||
| 581 | In this example the TIMESTRING would be \"9:30\" and the AMPMSTRING | ||
| 582 | would be \"pm\"." | ||
| 583 | (if timestring | ||
| 584 | (let ((starttimenum (read (icalendar-rris ":" "" timestring)))) | ||
| 585 | ;; take care of am/pm style | ||
| 586 | (if (and ampmstring (string= "pm" ampmstring)) | ||
| 587 | (setq starttimenum (+ starttimenum 1200))) | ||
| 588 | (format "T%04d00" starttimenum)) | ||
| 589 | nil)) | ||
| 590 | |||
| 591 | (defun icalendar-convert-string-for-export (s) | ||
| 592 | "Escape comma and other critical characters in string S." | ||
| 593 | (icalendar-rris "," "\\\\," s)) | ||
| 594 | |||
| 595 | (defun icalendar-convert-for-import (string) | ||
| 596 | "Remove escape chars for comma, semicolon etc. from STRING." | ||
| 597 | (icalendar-rris | ||
| 598 | "\\\\n" "\n " (icalendar-rris | ||
| 599 | "\\\\\"" "\"" (icalendar-rris | ||
| 600 | "\\\\;" ";" (icalendar-rris | ||
| 601 | "\\\\," "," string))))) | ||
| 602 | |||
| 603 | ;; ====================================================================== | ||
| 604 | ;; export -- convert emacs-diary to icalendar | ||
| 605 | ;; ====================================================================== | ||
| 606 | |||
| 607 | (defun icalendar-convert-diary-to-ical (diary-filename ical-filename | ||
| 608 | &optional do-not-clear-diary-file) | ||
| 609 | "Export diary file to iCalendar format -- erases ical-filename!!!. | ||
| 610 | Argument DIARY-FILENAME is the input `diary-file'. | ||
| 611 | Argument ICAL-FILENAME is the output iCalendar file. | ||
| 612 | If DO-NOT-CLEAR-DIARY-FILE is not nil the target iCalendar file | ||
| 613 | is not erased." | ||
| 614 | (interactive "FExport diary data from file: | ||
| 615 | Finto iCalendar file: ") | ||
| 616 | (let ((result "") | ||
| 617 | (start 0) | ||
| 618 | (entry-main "") | ||
| 619 | (entry-rest "") | ||
| 620 | (header "") | ||
| 621 | (contents) | ||
| 622 | (oops nil) | ||
| 623 | (nonmarker (concat "^" (regexp-quote diary-nonmarking-symbol) | ||
| 624 | "?"))) | ||
| 625 | (save-current-buffer | ||
| 626 | (set-buffer (find-file diary-filename)) | ||
| 627 | (goto-char (point-min)) | ||
| 628 | (while (re-search-forward | ||
| 629 | "^\\([^ \t\n].*\\)\\(\n[ \t].*\\)*" nil t) | ||
| 630 | (setq entry-main (match-string 1)) | ||
| 631 | (if (match-beginning 2) | ||
| 632 | (setq entry-rest (match-string 2)) | ||
| 633 | (setq entry-rest "")) | ||
| 634 | (setq header (format "\nBEGIN:VEVENT\nUID:emacs%d%d%d" | ||
| 635 | (car (current-time)) | ||
| 636 | (cadr (current-time)) | ||
| 637 | (car (cddr (current-time))))) | ||
| 638 | (setq oops nil) | ||
| 639 | (cond | ||
| 640 | ;; anniversaries | ||
| 641 | ((string-match | ||
| 642 | (concat nonmarker | ||
| 643 | "%%(diary-anniversary \\([^)]+\\))\\s-*\\(.*\\)") | ||
| 644 | entry-main) | ||
| 645 | (icalendar-dmsg "diary-anniversary %s" entry-main) | ||
| 646 | (let* ((datetime (substring entry-main (match-beginning 1) | ||
| 647 | (match-end 1))) | ||
| 648 | (summary (icalendar-convert-string-for-export | ||
| 649 | (substring entry-main (match-beginning 2) | ||
| 650 | (match-end 2)))) | ||
| 651 | (startisostring (icalendar-datestring-to-isodate | ||
| 652 | datetime)) | ||
| 653 | (endisostring (icalendar-datestring-to-isodate | ||
| 654 | datetime 1))) | ||
| 655 | (setq contents | ||
| 656 | (concat "\nDTSTART;VALUE=DATE:" startisostring | ||
| 657 | "\nDTEND;VALUE=DATE:" endisostring | ||
| 658 | "\nSUMMARY:" summary | ||
| 659 | "\nRRULE:FREQ=YEARLY;INTERVAL=1" | ||
| 660 | ;; the following is redundant, | ||
| 661 | ;; but korganizer seems to expect this... ;( | ||
| 662 | ;; and evolution doesn't understand it... :( | ||
| 663 | ;; so... who is wrong?! | ||
| 664 | ";BYMONTH=" (substring startisostring 4 6) | ||
| 665 | ";BYMONTHDAY=" (substring startisostring 6 8) | ||
| 666 | ))) | ||
| 667 | (unless (string= entry-rest "") | ||
| 668 | (setq contents (concat contents "\nDESCRIPTION:" | ||
| 669 | (icalendar-convert-string-for-export | ||
| 670 | entry-rest))))) | ||
| 671 | ;; cyclic events | ||
| 672 | ;; %%(diary-cyclic ) | ||
| 673 | ((string-match | ||
| 674 | (concat nonmarker | ||
| 675 | "%%(diary-cyclic \\([^ ]+\\) +" | ||
| 676 | "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*\\(.*\\)") | ||
| 677 | entry-main) | ||
| 678 | (icalendar-dmsg "diary-cyclic %s" entry-main) | ||
| 679 | (let* ((frequency (substring entry-main (match-beginning 1) | ||
| 680 | (match-end 1))) | ||
| 681 | (datetime (substring entry-main (match-beginning 2) | ||
| 682 | (match-end 2))) | ||
| 683 | (summary (icalendar-convert-string-for-export | ||
| 684 | (substring entry-main (match-beginning 3) | ||
| 685 | (match-end 3)))) | ||
| 686 | (startisostring (icalendar-datestring-to-isodate | ||
| 687 | datetime)) | ||
| 688 | (endisostring (icalendar-datestring-to-isodate | ||
| 689 | datetime 1))) | ||
| 690 | (setq contents | ||
| 691 | (concat "\nDTSTART;VALUE=DATE:" startisostring | ||
| 692 | "\nDTEND;VALUE=DATE:" endisostring | ||
| 693 | "\nSUMMARY:" summary | ||
| 694 | "\nRRULE:FREQ=DAILY;INTERVAL=" frequency | ||
| 695 | ;; strange: korganizer does not expect | ||
| 696 | ;; BYSOMETHING here... | ||
| 697 | ))) | ||
| 698 | (unless (string= entry-rest "") | ||
| 699 | (setq contents (concat contents "\nDESCRIPTION:" | ||
| 700 | (icalendar-convert-string-for-export | ||
| 701 | entry-rest))))) | ||
| 702 | ;; diary-date -- FIXME | ||
| 703 | ((string-match | ||
| 704 | (concat nonmarker | ||
| 705 | "%%(diary-date \\([^)]+\\))\\s-*\\(.*\\)") | ||
| 706 | entry-main) | ||
| 707 | (icalendar-dmsg "diary-date %s" entry-main) | ||
| 708 | (setq oops t)) | ||
| 709 | ;; float events -- FIXME | ||
| 710 | ((string-match | ||
| 711 | (concat nonmarker | ||
| 712 | "%%(diary-float \\([^)]+\\))\\s-*\\(.*\\)") | ||
| 713 | entry-main) | ||
| 714 | (icalendar-dmsg "diary-float %s" entry-main) | ||
| 715 | (setq oops t)) | ||
| 716 | ;; block events | ||
| 717 | ((string-match | ||
| 718 | (concat nonmarker | ||
| 719 | "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\) +" | ||
| 720 | "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*\\(.*\\)") | ||
| 721 | entry-main) | ||
| 722 | (icalendar-dmsg "diary-block %s" entry-main) | ||
| 723 | (let* ((startstring (substring entry-main (match-beginning 1) | ||
| 724 | (match-end 1))) | ||
| 725 | (endstring (substring entry-main (match-beginning 2) | ||
| 726 | (match-end 2))) | ||
| 727 | (summary (icalendar-convert-string-for-export | ||
| 728 | (substring entry-main (match-beginning 3) | ||
| 729 | (match-end 3)))) | ||
| 730 | (startisostring (icalendar-datestring-to-isodate | ||
| 731 | startstring)) | ||
| 732 | (endisostring (icalendar-datestring-to-isodate | ||
| 733 | endstring 1))) | ||
| 734 | (setq contents | ||
| 735 | (concat "\nDTSTART;VALUE=DATE:" startisostring | ||
| 736 | "\nDTEND;VALUE=DATE:" endisostring | ||
| 737 | "\nSUMMARY:" summary | ||
| 738 | )) | ||
| 739 | (unless (string= entry-rest "") | ||
| 740 | (setq contents (concat contents "\nDESCRIPTION:" | ||
| 741 | (icalendar-convert-string-for-export | ||
| 742 | entry-rest)))))) | ||
| 743 | ;; other sexp diary entries -- FIXME | ||
| 744 | ((string-match | ||
| 745 | (concat nonmarker | ||
| 746 | "%%(\\([^)]+\\))\\s-*\\(.*\\)") | ||
| 747 | entry-main) | ||
| 748 | (icalendar-dmsg "diary-sexp %s" entry-main) | ||
| 749 | (setq oops t)) | ||
| 750 | ;; weekly by day | ||
| 751 | ;; Monday 8:30 Team meeting | ||
| 752 | ((and (string-match | ||
| 753 | (concat nonmarker | ||
| 754 | "\\([a-z]+\\)\\s-+" | ||
| 755 | "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" | ||
| 756 | "\\(-0?" | ||
| 757 | "\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" | ||
| 758 | "\\)?" | ||
| 759 | "\\s-*\\(.*\\)$") | ||
| 760 | entry-main) | ||
| 761 | (icalendar-get-weekday-abbrev | ||
| 762 | (substring entry-main (match-beginning 1) (match-end 1)))) | ||
| 763 | (icalendar-dmsg "weekly %s" entry-main) | ||
| 764 | (let* ((day (icalendar-get-weekday-abbrev | ||
| 765 | (substring entry-main (match-beginning 1) | ||
| 766 | (match-end 1)))) | ||
| 767 | (starttimestring (icalendar-diarytime-to-isotime | ||
| 768 | (if (match-beginning 3) | ||
| 769 | (substring entry-main | ||
| 770 | (match-beginning 3) | ||
| 771 | (match-end 3)) | ||
| 772 | nil) | ||
| 773 | (if (match-beginning 4) | ||
| 774 | (substring entry-main | ||
| 775 | (match-beginning 4) | ||
| 776 | (match-end 4)) | ||
| 777 | nil))) | ||
| 778 | (endtimestring (icalendar-diarytime-to-isotime | ||
| 779 | (if (match-beginning 6) | ||
| 780 | (substring entry-main | ||
| 781 | (match-beginning 6) | ||
| 782 | (match-end 6)) | ||
| 783 | nil) | ||
| 784 | (if (match-beginning 7) | ||
| 785 | (substring entry-main | ||
| 786 | (match-beginning 7) | ||
| 787 | (match-end 7)) | ||
| 788 | nil))) | ||
| 789 | (summary (icalendar-convert-string-for-export | ||
| 790 | (substring entry-main (match-beginning 8) | ||
| 791 | (match-end 8))))) | ||
| 792 | (when starttimestring | ||
| 793 | (unless endtimestring | ||
| 794 | (let ((time (read (icalendar-rris "^T0?" "" | ||
| 795 | starttimestring)))) | ||
| 796 | (setq endtimestring (format "T%06d" (+ 10000 time)))))) | ||
| 797 | (setq contents | ||
| 798 | (concat "\nDTSTART" | ||
| 799 | (if starttimestring "" ";VALUE=DATE") | ||
| 800 | ":19000101" ;; FIXME? Probability that this | ||
| 801 | ;; is the right day is 1/7 | ||
| 802 | (or starttimestring "") | ||
| 803 | "\nDTEND" | ||
| 804 | (if endtimestring "" ";VALUE=DATE") | ||
| 805 | ":19000101" ;; FIXME? | ||
| 806 | (or endtimestring "") | ||
| 807 | "\nSUMMARY:" summary | ||
| 808 | "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=" day | ||
| 809 | ))) | ||
| 810 | (unless (string= entry-rest "") | ||
| 811 | (setq contents (concat contents "\nDESCRIPTION:" | ||
| 812 | (icalendar-convert-string-for-export | ||
| 813 | entry-rest))))) | ||
| 814 | ;; yearly by day | ||
| 815 | ;; 1 May Tag der Arbeit | ||
| 816 | ((string-match | ||
| 817 | (concat nonmarker | ||
| 818 | (if european-calendar-style | ||
| 819 | "0?\\([1-9]+[0-9]?\\)\\s-+\\([a-z]+\\)\\s-+" | ||
| 820 | "\\([a-z]+\\)\\s-+0?\\([1-9]+[0-9]?\\)\\s-+") | ||
| 821 | "\\*?\\s-*" | ||
| 822 | "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" | ||
| 823 | "\\(" | ||
| 824 | "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" | ||
| 825 | "\\)?" | ||
| 826 | "\\s-*\\([^0-9]+.*\\)$"; must not match years | ||
| 827 | ) | ||
| 828 | entry-main) | ||
| 829 | (icalendar-dmsg "yearly %s" entry-main) | ||
| 830 | (let* ((daypos (if european-calendar-style 1 2)) | ||
| 831 | (monpos (if european-calendar-style 2 1)) | ||
| 832 | (day (read (substring entry-main (match-beginning daypos) | ||
| 833 | (match-end daypos)))) | ||
| 834 | (month (icalendar-get-month-number | ||
| 835 | (substring entry-main (match-beginning monpos) | ||
| 836 | (match-end monpos)))) | ||
| 837 | (starttimestring (icalendar-diarytime-to-isotime | ||
| 838 | (if (match-beginning 4) | ||
| 839 | (substring entry-main | ||
| 840 | (match-beginning 4) | ||
| 841 | (match-end 4)) | ||
| 842 | nil) | ||
| 843 | (if (match-beginning 5) | ||
| 844 | (substring entry-main | ||
| 845 | (match-beginning 5) | ||
| 846 | (match-end 5)) | ||
| 847 | nil))) | ||
| 848 | (endtimestring (icalendar-diarytime-to-isotime | ||
| 849 | (if (match-beginning 7) | ||
| 850 | (substring entry-main | ||
| 851 | (match-beginning 7) | ||
| 852 | (match-end 7)) | ||
| 853 | nil) | ||
| 854 | (if (match-beginning 8) | ||
| 855 | (substring entry-main | ||
| 856 | (match-beginning 8) | ||
| 857 | (match-end 8)) | ||
| 858 | nil))) | ||
| 859 | (summary (icalendar-convert-string-for-export | ||
| 860 | (substring entry-main (match-beginning 9) | ||
| 861 | (match-end 9))))) | ||
| 862 | (when starttimestring | ||
| 863 | (unless endtimestring | ||
| 864 | (let ((time (read (icalendar-rris "^T0?" "" | ||
| 865 | starttimestring)))) | ||
| 866 | (setq endtimestring (format "T%06d" (+ 10000 time)))))) | ||
| 867 | (setq contents | ||
| 868 | (concat "\nDTSTART" | ||
| 869 | (if starttimestring "" ";VALUE=DATE") | ||
| 870 | (format ":1900%02d%02d" month day) | ||
| 871 | (or starttimestring "") | ||
| 872 | "\nDTEND" | ||
| 873 | (if endtimestring "" ";VALUE=DATE") | ||
| 874 | (format ":1900%02d%02d" month day) | ||
| 875 | (or endtimestring "") | ||
| 876 | "\nSUMMARY:" summary | ||
| 877 | "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=" | ||
| 878 | (format "%2d" month) | ||
| 879 | ";BYMONTHDAY=" | ||
| 880 | (format "%2d" day) | ||
| 881 | ))) | ||
| 882 | (unless (string= entry-rest "") | ||
| 883 | (setq contents (concat contents "\nDESCRIPTION:" | ||
| 884 | (icalendar-convert-string-for-export | ||
| 885 | entry-rest))))) | ||
| 886 | ;; "ordinary" events, start and end time given | ||
| 887 | ;; 1 Feb 2003 Hs Hochzeitsfeier, Dreieich | ||
| 888 | ((string-match | ||
| 889 | (concat nonmarker | ||
| 890 | "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)\\s-+" | ||
| 891 | "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" | ||
| 892 | "\\(" | ||
| 893 | "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" | ||
| 894 | "\\)?" | ||
| 895 | "\\s-*\\(.*\\)") | ||
| 896 | entry-main) | ||
| 897 | (icalendar-dmsg "ordinary %s" entry-main) | ||
| 898 | (let* ((datestring (icalendar-datestring-to-isodate | ||
| 899 | (substring entry-main (match-beginning 1) | ||
| 900 | (match-end 1)))) | ||
| 901 | (starttimestring (icalendar-diarytime-to-isotime | ||
| 902 | (if (match-beginning 3) | ||
| 903 | (substring entry-main | ||
| 904 | (match-beginning 3) | ||
| 905 | (match-end 3)) | ||
| 906 | nil) | ||
| 907 | (if (match-beginning 4) | ||
| 908 | (substring entry-main | ||
| 909 | (match-beginning 4) | ||
| 910 | (match-end 4)) | ||
| 911 | nil))) | ||
| 912 | (endtimestring (icalendar-diarytime-to-isotime | ||
| 913 | (if (match-beginning 6) | ||
| 914 | (substring entry-main | ||
| 915 | (match-beginning 6) | ||
| 916 | (match-end 6)) | ||
| 917 | nil) | ||
| 918 | (if (match-beginning 7) | ||
| 919 | (substring entry-main | ||
| 920 | (match-beginning 7) | ||
| 921 | (match-end 7)) | ||
| 922 | nil))) | ||
| 923 | (summary (icalendar-convert-string-for-export | ||
| 924 | (substring entry-main (match-beginning 8) | ||
| 925 | (match-end 8))))) | ||
| 926 | (when starttimestring | ||
| 927 | (unless endtimestring | ||
| 928 | (let ((time (read (icalendar-rris "^T0?" "" | ||
| 929 | starttimestring)))) | ||
| 930 | (setq endtimestring (format "T%06d" (+ 10000 time)))))) | ||
| 931 | (setq contents (format | ||
| 932 | "\nDTSTART%s:%s%s\nDTEND%s:%s%s\nSUMMARY:%s" | ||
| 933 | (if starttimestring "" ";VALUE=DATE") | ||
| 934 | datestring | ||
| 935 | (or starttimestring "") | ||
| 936 | (if endtimestring "" | ||
| 937 | ";VALUE=DATE") | ||
| 938 | datestring | ||
| 939 | (or endtimestring "") | ||
| 940 | summary)) | ||
| 941 | (unless (string= entry-rest "") | ||
| 942 | (setq contents (concat contents "\nDESCRIPTION:" | ||
| 943 | (icalendar-convert-string-for-export | ||
| 944 | entry-rest)))))) | ||
| 945 | ;; everything else | ||
| 946 | (t | ||
| 947 | ;; Oops! what's that? | ||
| 948 | (setq oops t))) | ||
| 949 | (if oops | ||
| 950 | (message "Cannot export entry on line %d" | ||
| 951 | (count-lines (point-min) (point))) | ||
| 952 | (setq result (concat result header contents "\nEND:VEVENT")))) | ||
| 953 | ;; we're done, insert everything into the file | ||
| 954 | (let ((coding-system-for-write 'utf8)) | ||
| 955 | (set-buffer (find-file ical-filename)) | ||
| 956 | (unless do-not-clear-diary-file | ||
| 957 | (erase-buffer)) | ||
| 958 | (insert | ||
| 959 | "BEGIN:VCALENDAR\nPRODID:-//Emacs//NONSGML icalendar.el//EN") | ||
| 960 | (insert "\nVERSION:2.0") | ||
| 961 | (insert result) | ||
| 962 | (insert "\nEND:VCALENDAR\n"))))) | ||
| 963 | |||
| 964 | |||
| 965 | ;; ====================================================================== | ||
| 966 | ;; import -- convert icalendar to emacs-diary | ||
| 967 | ;; ====================================================================== | ||
| 968 | |||
| 969 | ;; user function | ||
| 970 | (defun icalendar-import-file (ical-filename diary-filename | ||
| 971 | &optional non-marking | ||
| 972 | do-not-clear-diary-file) | ||
| 973 | "Import a iCalendar file and save to a diary file -- erases diary-file! | ||
| 974 | Argument ICAL-FILENAME output iCalendar file. | ||
| 975 | Argument DIARY-FILENAME input `diary-file'. | ||
| 976 | Optional argument NON-MARKING determines whether events are created as | ||
| 977 | non-marking or not. | ||
| 978 | If DO-NOT-CLEAR-DIARY-FILE is not nil the target diary file is | ||
| 979 | not erased." | ||
| 980 | (interactive "fImport iCalendar data from file: | ||
| 981 | Finto diary file (will be erased!): | ||
| 982 | p") | ||
| 983 | ;; clean up the diary file | ||
| 984 | (save-current-buffer | ||
| 985 | (unless do-not-clear-diary-file | ||
| 986 | ;; clear the target diary file | ||
| 987 | (set-buffer (find-file diary-filename)) | ||
| 988 | (erase-buffer)) | ||
| 989 | ;; now load and convert from the ical file | ||
| 990 | (set-buffer (find-file ical-filename)) | ||
| 991 | (icalendar-extract-ical-from-buffer diary-filename t non-marking))) | ||
| 992 | |||
| 993 | ; user function | ||
| 994 | (defun icalendar-extract-ical-from-buffer (&optional | ||
| 995 | diary-file do-not-ask | ||
| 996 | non-marking) | ||
| 997 | "Extract iCalendar events from current buffer. | ||
| 998 | |||
| 999 | This function searches the current buffer for the first iCalendar | ||
| 1000 | object, reads it and adds all VEVENT elements to the diary | ||
| 1001 | DIARY-FILE. | ||
| 1002 | |||
| 1003 | It will ask for each appointment whether to add it to the diary | ||
| 1004 | when DO-NOT-ASK is non-nil. When called interactively, | ||
| 1005 | DO-NOT-ASK is set to t, so that you are asked fore each event. | ||
| 1006 | |||
| 1007 | NON-MARKING determines whether diary events are created as | ||
| 1008 | non-marking. | ||
| 1009 | |||
| 1010 | This function attempts to notify about problems that occur when | ||
| 1011 | reading, parsing, or converting iCalendar data!" | ||
| 1012 | (interactive) | ||
| 1013 | (save-current-buffer | ||
| 1014 | ;; prepare ical | ||
| 1015 | (message "Preparing icalendar...") | ||
| 1016 | (set-buffer (icalendar-get-unfolded-buffer (current-buffer))) | ||
| 1017 | (goto-char (point-min)) | ||
| 1018 | (message "Preparing icalendar...done") | ||
| 1019 | (if (re-search-forward "^BEGIN:VCALENDAR\\s-*$" nil t) | ||
| 1020 | (let (ical-contents ical-errors) | ||
| 1021 | ;; read ical | ||
| 1022 | (message "Reading icalendar...") | ||
| 1023 | (beginning-of-line) | ||
| 1024 | (setq ical-contents (icalendar-read-element nil nil)) | ||
| 1025 | (message "Reading icalendar...done") | ||
| 1026 | ;; convert ical | ||
| 1027 | (message "Converting icalendar...") | ||
| 1028 | (setq ical-errors (icalendar-convert-ical-to-diary | ||
| 1029 | ical-contents | ||
| 1030 | diary-file do-not-ask non-marking)) | ||
| 1031 | (when diary-file | ||
| 1032 | ;; save the diary file | ||
| 1033 | (save-current-buffer | ||
| 1034 | (set-buffer (find-buffer-visiting diary-file)) | ||
| 1035 | (save-buffer))) | ||
| 1036 | (message "Converting icalendar...done") | ||
| 1037 | (if (and ical-errors (y-or-n-p | ||
| 1038 | (concat "Something went wrong -- " | ||
| 1039 | "do you want to see the " | ||
| 1040 | "error log? "))) | ||
| 1041 | (switch-to-buffer " *icalendar-errors*"))) | ||
| 1042 | (message | ||
| 1043 | "Current buffer does not contain icalendar contents!")))) | ||
| 1044 | |||
| 1045 | ;; ---------------------------------------------------------------------- | ||
| 1046 | ;; private area | ||
| 1047 | ;; ---------------------------------------------------------------------- | ||
| 1048 | (defun icalendar-format-ical-event (event) | ||
| 1049 | "Create a string representation of an iCalendar EVENT." | ||
| 1050 | (let ((string icalendar-import-format) | ||
| 1051 | (conversion-list | ||
| 1052 | '(("%d" DESCRIPTION icalendar-import-format-description) | ||
| 1053 | ("%s" SUMMARY icalendar-import-format-subject) | ||
| 1054 | ("%l" LOCATION icalendar-import-format-location) | ||
| 1055 | ("%o" ORGANIZER icalendar-import-format-organizer)))) | ||
| 1056 | ;; convert the specifiers in the format string | ||
| 1057 | (mapcar (lambda (i) | ||
| 1058 | (let* ((spec (car i)) | ||
| 1059 | (prop (cadr i)) | ||
| 1060 | (format (car (cddr i))) | ||
| 1061 | (contents (icalendar-get-event-property event prop)) | ||
| 1062 | (formatted-contents "")) | ||
| 1063 | ;;(message "%s" event) | ||
| 1064 | ;;(message "contents%s = %s" prop contents) | ||
| 1065 | (when (and contents (> (length contents) 0)) | ||
| 1066 | (setq formatted-contents | ||
| 1067 | (icalendar-rris "%s" | ||
| 1068 | (icalendar-convert-for-import | ||
| 1069 | contents) | ||
| 1070 | (symbol-value format)))) | ||
| 1071 | (setq string (icalendar-rris spec | ||
| 1072 | formatted-contents | ||
| 1073 | string)))) | ||
| 1074 | conversion-list) | ||
| 1075 | string)) | ||
| 1076 | |||
| 1077 | (defun icalendar-convert-ical-to-diary (ical-list diary-file | ||
| 1078 | &optional do-not-ask | ||
| 1079 | non-marking) | ||
| 1080 | "Convert an iCalendar file to an Emacs diary file. | ||
| 1081 | Import VEVENTS from the iCalendar object ICAL-LIST and saves them to a | ||
| 1082 | DIARY-FILE. If DO-NOT-ASK is nil the user is asked for each event | ||
| 1083 | whether to actually import it. NON-MARKING determines whether diary | ||
| 1084 | events are created as non-marking. | ||
| 1085 | This function attempts to return t if something goes wrong. In this | ||
| 1086 | case an error string which describes all the errors and problems is | ||
| 1087 | written into the buffer ` *icalendar-errors*'." | ||
| 1088 | (let* ((ev (icalendar-all-events ical-list)) | ||
| 1089 | (error-string "") | ||
| 1090 | (event-ok t) | ||
| 1091 | (found-error nil) | ||
| 1092 | e diary-string) | ||
| 1093 | ;; step through all events/appointments | ||
| 1094 | (while ev | ||
| 1095 | (setq e (car ev)) | ||
| 1096 | (setq ev (cdr ev)) | ||
| 1097 | (setq event-ok nil) | ||
| 1098 | (condition-case error-val | ||
| 1099 | (let* ((dtstart (icalendar-decode-isodatetime | ||
| 1100 | (icalendar-get-event-property e 'DTSTART))) | ||
| 1101 | (start-d (calendar-date-string | ||
| 1102 | (icalendar-datetime-to-noneuropean-date | ||
| 1103 | dtstart) | ||
| 1104 | t t)) | ||
| 1105 | (start-t (icalendar-datetime-to-colontime dtstart)) | ||
| 1106 | (dtend (icalendar-decode-isodatetime | ||
| 1107 | (icalendar-get-event-property e 'DTEND))) | ||
| 1108 | end-d | ||
| 1109 | end-t | ||
| 1110 | (subject (icalendar-convert-for-import | ||
| 1111 | (or (icalendar-get-event-property e 'SUMMARY) | ||
| 1112 | "No Subject"))) | ||
| 1113 | (rrule (icalendar-get-event-property e 'RRULE)) | ||
| 1114 | (rdate (icalendar-get-event-property e 'RDATE)) | ||
| 1115 | (duration (icalendar-get-event-property e 'DURATION))) | ||
| 1116 | (icalendar-dmsg "%s: %s" start-d subject) | ||
| 1117 | (when duration | ||
| 1118 | (let ((dtend2 (icalendar-add-decoded-times | ||
| 1119 | dtstart | ||
| 1120 | (icalendar-decode-isoduration duration)))) | ||
| 1121 | (if (and dtend (not (eq dtend dtend2))) | ||
| 1122 | (message "Inconsistent endtime and duration for %s" | ||
| 1123 | subject)) | ||
| 1124 | (setq dtend dtend2))) | ||
| 1125 | (setq end-d (if dtend | ||
| 1126 | (calendar-date-string | ||
| 1127 | (icalendar-datetime-to-noneuropean-date | ||
| 1128 | dtend) | ||
| 1129 | t t) | ||
| 1130 | start-d)) | ||
| 1131 | (setq end-t (if dtend | ||
| 1132 | (icalendar-datetime-to-colontime dtend) | ||
| 1133 | start-t)) | ||
| 1134 | (icalendar-dmsg "start-d: %s, end-d: %s" start-d end-d) | ||
| 1135 | (cond | ||
| 1136 | ;; recurring event | ||
| 1137 | (rrule | ||
| 1138 | (icalendar-dmsg "recurring event") | ||
| 1139 | (let* ((rrule-props (icalendar-split-value rrule)) | ||
| 1140 | (frequency (car (cdr (assoc 'FREQ rrule-props)))) | ||
| 1141 | (until (car (cdr (assoc 'UNTIL rrule-props)))) | ||
| 1142 | (interval (read (car (cdr (assoc 'INTERVAL | ||
| 1143 | rrule-props)))))) | ||
| 1144 | (cond ((string-equal frequency "WEEKLY") | ||
| 1145 | (if (not start-t) | ||
| 1146 | (progn | ||
| 1147 | ;; weekly and all-day | ||
| 1148 | (icalendar-dmsg "weekly all-day") | ||
| 1149 | (setq diary-string | ||
| 1150 | (format | ||
| 1151 | "%%%%(diary-cyclic %d %s)" | ||
| 1152 | (* interval 7) | ||
| 1153 | (icalendar-datetime-to-european-date | ||
| 1154 | dtstart)))) | ||
| 1155 | ;; weekly and not all-day | ||
| 1156 | (let* ((byday (cadr (assoc 'BYDAY rrule-props))) | ||
| 1157 | (weekday | ||
| 1158 | (cdr (rassoc | ||
| 1159 | byday | ||
| 1160 | icalendar-weekdayabbrev-table)))) | ||
| 1161 | (icalendar-dmsg "weekly not-all-day") | ||
| 1162 | (if weekday | ||
| 1163 | (setq diary-string | ||
| 1164 | (format "%s %s%s%s" weekday | ||
| 1165 | start-t (if end-t "-" "") | ||
| 1166 | (or end-t ""))) | ||
| 1167 | ;; FIXME!!!! | ||
| 1168 | ;; DTSTART;VALUE=DATE-TIME:20030919T090000 | ||
| 1169 | ;; DTEND;VALUE=DATE-TIME:20030919T113000 | ||
| 1170 | (setq diary-string | ||
| 1171 | (format | ||
| 1172 | "%%%%(diary-cyclic %s %s) %s%s%s" | ||
| 1173 | (* interval 7) | ||
| 1174 | (icalendar-datetime-to-european-date | ||
| 1175 | dtstart) | ||
| 1176 | start-t (if end-t "-" "") (or end-t "")))) | ||
| 1177 | (setq event-ok t)))) | ||
| 1178 | ;; yearly | ||
| 1179 | ((string-equal frequency "YEARLY") | ||
| 1180 | (icalendar-dmsg "yearly") | ||
| 1181 | (setq diary-string | ||
| 1182 | (format | ||
| 1183 | "%%%%(diary-anniversary %s)" | ||
| 1184 | (icalendar-datetime-to-european-date dtstart))) | ||
| 1185 | (setq event-ok t)) | ||
| 1186 | ;; FIXME: war auskommentiert: | ||
| 1187 | ((and (string-equal frequency "DAILY") | ||
| 1188 | ;;(not (string= start-d end-d)) | ||
| 1189 | ;;(not start-t) | ||
| 1190 | ;;(not end-t) | ||
| 1191 | ) | ||
| 1192 | (let ((ds (icalendar-datetime-to-noneuropean-date | ||
| 1193 | (icalendar-decode-isodatetime | ||
| 1194 | (icalendar-get-event-property e | ||
| 1195 | 'DTSTART)))) | ||
| 1196 | (de (icalendar-datetime-to-noneuropean-date | ||
| 1197 | (icalendar-decode-isodatetime | ||
| 1198 | until)))) | ||
| 1199 | (setq diary-string | ||
| 1200 | (format | ||
| 1201 | "%%%%(diary-block %d %d %d %d %d %d)" | ||
| 1202 | (nth 1 ds) (nth 0 ds) (nth 2 ds) | ||
| 1203 | (nth 1 de) (nth 0 de) (nth 2 de)))) | ||
| 1204 | (setq event-ok t))) | ||
| 1205 | )) | ||
| 1206 | (rdate | ||
| 1207 | (icalendar-dmsg "rdate event") | ||
| 1208 | (setq diary-string "") | ||
| 1209 | (mapcar (lambda (datestring) | ||
| 1210 | (setq diary-string | ||
| 1211 | (concat diary-string | ||
| 1212 | (format "......")))) | ||
| 1213 | (icalendar-split-value rdate))) | ||
| 1214 | ;; non-recurring event | ||
| 1215 | ;; long event | ||
| 1216 | ((not (string= start-d end-d)) | ||
| 1217 | (icalendar-dmsg "non-recurring event") | ||
| 1218 | (let ((ds (icalendar-datetime-to-noneuropean-date dtstart)) | ||
| 1219 | (de (icalendar-datetime-to-noneuropean-date dtend))) | ||
| 1220 | (setq diary-string | ||
| 1221 | (format "%%%%(diary-block %d %d %d %d %d %d)" | ||
| 1222 | (nth 1 ds) (nth 0 ds) (nth 2 ds) | ||
| 1223 | (nth 1 de) (nth 0 de) (nth 2 de)))) | ||
| 1224 | (setq event-ok t)) | ||
| 1225 | ;; not all-day | ||
| 1226 | ((and start-t (or (not end-t) | ||
| 1227 | (not (string= start-t end-t)))) | ||
| 1228 | (icalendar-dmsg "not all day event") | ||
| 1229 | (cond (end-t | ||
| 1230 | (setq diary-string (format "%s %s-%s" start-d | ||
| 1231 | start-t end-t))) | ||
| 1232 | (t | ||
| 1233 | (setq diary-string (format "%s %s" start-d | ||
| 1234 | start-t)))) | ||
| 1235 | (setq event-ok t)) | ||
| 1236 | ;; all-day event | ||
| 1237 | (t | ||
| 1238 | (icalendar-dmsg "all day event") | ||
| 1239 | (setq diary-string start-d) | ||
| 1240 | (setq event-ok t))) | ||
| 1241 | ;; add all other elements unless the user doesn't want to have | ||
| 1242 | ;; them | ||
| 1243 | (if event-ok | ||
| 1244 | (progn | ||
| 1245 | (setq diary-string | ||
| 1246 | (concat diary-string " " | ||
| 1247 | (icalendar-format-ical-event e))) | ||
| 1248 | (if do-not-ask (setq subject nil)) | ||
| 1249 | (icalendar-add-diary-entry diary-string diary-file | ||
| 1250 | non-marking subject)) | ||
| 1251 | ;; event was not ok | ||
| 1252 | (setq found-error t) | ||
| 1253 | (setq error-string | ||
| 1254 | (format "%s\nCannot handle this event:%s" | ||
| 1255 | error-string e)))) | ||
| 1256 | ;; handle errors | ||
| 1257 | (error | ||
| 1258 | (message "Ignoring event \"%s\"" e) | ||
| 1259 | (setq found-error t) | ||
| 1260 | (setq error-string (format "%s\nCannot handle this event: %s" | ||
| 1261 | error-string e))))) | ||
| 1262 | (if found-error | ||
| 1263 | (save-current-buffer | ||
| 1264 | (set-buffer (get-buffer-create " *icalendar-errors*")) | ||
| 1265 | (erase-buffer) | ||
| 1266 | (insert error-string))) | ||
| 1267 | (message "Converting icalendar...done") | ||
| 1268 | found-error)) | ||
| 1269 | |||
| 1270 | (defun icalendar-add-diary-entry (string diary-file non-marking | ||
| 1271 | &optional subject) | ||
| 1272 | "Add STRING to the diary file DIARY-FILE. | ||
| 1273 | STRING must be a properly formatted valid diary entry. NON-MARKING | ||
| 1274 | determines whether diary events are created as non-marking. If | ||
| 1275 | SUBJECT is not nil it must be a string that gives the subject of the | ||
| 1276 | entry. In this case the user will be asked whether he wants to insert | ||
| 1277 | the entry." | ||
| 1278 | (when (or (not subject) ; | ||
| 1279 | (y-or-n-p (format "Add appointment for `%s' to diary? " | ||
| 1280 | subject))) | ||
| 1281 | (when subject | ||
| 1282 | (setq non-marking | ||
| 1283 | (y-or-n-p (format "Make appointment non-marking? ")))) | ||
| 1284 | (save-window-excursion | ||
| 1285 | (unless diary-file | ||
| 1286 | (setq diary-file | ||
| 1287 | (read-file-name "Add appointment to this diary file: "))) | ||
| 1288 | (make-diary-entry string non-marking diary-file)))) | ||
| 1289 | |||
| 1290 | ;; ====================================================================== | ||
| 1291 | ;; (add-hook 'list-diary-entries-hook 'include-icalendar-files) | ||
| 1292 | ;; ====================================================================== | ||
| 1293 | (defun include-icalendar-files () | ||
| 1294 | "Not yet implemented.") | ||
| 1295 | |||
| 1296 | (provide 'icalendar) | ||
| 1297 | |||
| 1298 | ;; arch-tag: 74fdbe8e-0451-4e38-bb61-4416e822f4fc | ||
| 1299 | ;;; icalendar.el ends here | ||
diff --git a/lisp/comint.el b/lisp/comint.el index 8b5a107c7d7..8b2c779ecd3 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; comint.el --- general command interpreter in a window stuff | 1 | ;;; comint.el --- general command interpreter in a window stuff |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988,90,92,93,94,95,96,97,98,99,2000,01,02,03,2004 | 3 | ;; Copyright (C) 1988, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> | 6 | ;; Author: Olin Shivers <shivers@cs.cmu.edu> |
| 7 | ;; Simon Marshall <simon@gnu.org> | 7 | ;; Simon Marshall <simon@gnu.org> |
| @@ -185,10 +185,10 @@ the remaining prompts will be accidentally messed up. You may | |||
| 185 | wish to put something like the following in your `.emacs' file: | 185 | wish to put something like the following in your `.emacs' file: |
| 186 | 186 | ||
| 187 | \(add-hook 'comint-mode-hook | 187 | \(add-hook 'comint-mode-hook |
| 188 | '(lambda () | 188 | (lambda () |
| 189 | (define-key comint-mode-map \"\C-w\" 'comint-kill-region) | 189 | (define-key comint-mode-map \"\C-w\" 'comint-kill-region) |
| 190 | (define-key comint-mode-map [C-S-backspace] | 190 | (define-key comint-mode-map [C-S-backspace] |
| 191 | 'comint-kill-whole-line))) | 191 | 'comint-kill-whole-line))) |
| 192 | 192 | ||
| 193 | If you sometimes use comint-mode on text-only terminals or with `emacs-nw', | 193 | If you sometimes use comint-mode on text-only terminals or with `emacs-nw', |
| 194 | you might wish to use another binding for `comint-kill-whole-line'." | 194 | you might wish to use another binding for `comint-kill-whole-line'." |
| @@ -369,11 +369,8 @@ Takes one argument, the input. If non-nil, the input may be saved on the input | |||
| 369 | history list. Default is to save anything that isn't all whitespace.") | 369 | history list. Default is to save anything that isn't all whitespace.") |
| 370 | 370 | ||
| 371 | (defvar comint-input-filter-functions '() | 371 | (defvar comint-input-filter-functions '() |
| 372 | "Functions to call before input is sent to the process. | 372 | "Special hook run before input is sent to the process. |
| 373 | These functions get one argument, a string containing the text to send. | 373 | These functions get one argument, a string containing the text to send.") |
| 374 | |||
| 375 | You can use `add-hook' to add functions to this list | ||
| 376 | either globally or locally.") | ||
| 377 | 374 | ||
| 378 | (defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom) | 375 | (defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom) |
| 379 | "Functions to call after output is inserted into the buffer. | 376 | "Functions to call after output is inserted into the buffer. |
| @@ -411,7 +408,7 @@ See `comint-send-input'." | |||
| 411 | (defcustom comint-use-prompt-regexp-instead-of-fields nil | 408 | (defcustom comint-use-prompt-regexp-instead-of-fields nil |
| 412 | "*If non-nil, use `comint-prompt-regexp' to distinguish prompts from user-input. | 409 | "*If non-nil, use `comint-prompt-regexp' to distinguish prompts from user-input. |
| 413 | If nil, then program output and user-input are given different `field' | 410 | If nil, then program output and user-input are given different `field' |
| 414 | properties, which emacs commands can use to distinguish them (in | 411 | properties, which Emacs commands can use to distinguish them (in |
| 415 | particular, common movement commands such as begining-of-line respect | 412 | particular, common movement commands such as begining-of-line respect |
| 416 | field boundaries in a natural way)." | 413 | field boundaries in a natural way)." |
| 417 | :type 'boolean | 414 | :type 'boolean |
| @@ -432,7 +429,106 @@ executed once when the buffer is created." | |||
| 432 | :type 'hook | 429 | :type 'hook |
| 433 | :group 'comint) | 430 | :group 'comint) |
| 434 | 431 | ||
| 435 | (defvar comint-mode-map nil) | 432 | (defvar comint-mode-map |
| 433 | (let ((map (make-sparse-keymap))) | ||
| 434 | ;; Keys: | ||
| 435 | (define-key map "\ep" 'comint-previous-input) | ||
| 436 | (define-key map "\en" 'comint-next-input) | ||
| 437 | (define-key map [C-up] 'comint-previous-input) | ||
| 438 | (define-key map [C-down] 'comint-next-input) | ||
| 439 | (define-key map "\er" 'comint-previous-matching-input) | ||
| 440 | (define-key map "\es" 'comint-next-matching-input) | ||
| 441 | (define-key map [?\C-c ?\M-r] 'comint-previous-matching-input-from-input) | ||
| 442 | (define-key map [?\C-c ?\M-s] 'comint-next-matching-input-from-input) | ||
| 443 | (define-key map "\e\C-l" 'comint-show-output) | ||
| 444 | (define-key map "\C-m" 'comint-send-input) | ||
| 445 | (define-key map "\C-d" 'comint-delchar-or-maybe-eof) | ||
| 446 | (define-key map "\C-c " 'comint-accumulate) | ||
| 447 | (define-key map "\C-c\C-x" 'comint-get-next-from-history) | ||
| 448 | (define-key map "\C-c\C-a" 'comint-bol-or-process-mark) | ||
| 449 | (define-key map "\C-c\C-u" 'comint-kill-input) | ||
| 450 | (define-key map "\C-c\C-w" 'backward-kill-word) | ||
| 451 | (define-key map "\C-c\C-c" 'comint-interrupt-subjob) | ||
| 452 | (define-key map "\C-c\C-z" 'comint-stop-subjob) | ||
| 453 | (define-key map "\C-c\C-\\" 'comint-quit-subjob) | ||
| 454 | (define-key map "\C-c\C-m" 'comint-insert-input) | ||
| 455 | (define-key map "\C-c\C-o" 'comint-delete-output) | ||
| 456 | (define-key map "\C-c\C-r" 'comint-show-output) | ||
| 457 | (define-key map "\C-c\C-e" 'comint-show-maximum-output) | ||
| 458 | (define-key map "\C-c\C-l" 'comint-dynamic-list-input-ring) | ||
| 459 | (define-key map "\C-c\C-n" 'comint-next-prompt) | ||
| 460 | (define-key map "\C-c\C-p" 'comint-previous-prompt) | ||
| 461 | (define-key map "\C-c\C-d" 'comint-send-eof) | ||
| 462 | (define-key map "\C-c\C-s" 'comint-write-output) | ||
| 463 | (define-key map "\C-c." 'comint-insert-previous-argument) | ||
| 464 | ;; Mouse Buttons: | ||
| 465 | (define-key map [mouse-2] 'comint-insert-input) | ||
| 466 | ;; Menu bars: | ||
| 467 | ;; completion: | ||
| 468 | (define-key map [menu-bar completion] | ||
| 469 | (cons "Complete" (make-sparse-keymap "Complete"))) | ||
| 470 | (define-key map [menu-bar completion complete-expand] | ||
| 471 | '("Expand File Name" . comint-replace-by-expanded-filename)) | ||
| 472 | (define-key map [menu-bar completion complete-listing] | ||
| 473 | '("File Completion Listing" . comint-dynamic-list-filename-completions)) | ||
| 474 | (define-key map [menu-bar completion complete-file] | ||
| 475 | '("Complete File Name" . comint-dynamic-complete-filename)) | ||
| 476 | (define-key map [menu-bar completion complete] | ||
| 477 | '("Complete Before Point" . comint-dynamic-complete)) | ||
| 478 | ;; Input history: | ||
| 479 | (define-key map [menu-bar inout] | ||
| 480 | (cons "In/Out" (make-sparse-keymap "In/Out"))) | ||
| 481 | (define-key map [menu-bar inout delete-output] | ||
| 482 | '("Delete Current Output Group" . comint-delete-output)) | ||
| 483 | (define-key map [menu-bar inout append-output-to-file] | ||
| 484 | '("Append Current Output Group to File" . comint-append-output-to-file)) | ||
| 485 | (define-key map [menu-bar inout write-output] | ||
| 486 | '("Write Current Output Group to File" . comint-write-output)) | ||
| 487 | (define-key map [menu-bar inout next-prompt] | ||
| 488 | '("Forward Output Group" . comint-next-prompt)) | ||
| 489 | (define-key map [menu-bar inout previous-prompt] | ||
| 490 | '("Backward Output Group" . comint-previous-prompt)) | ||
| 491 | (define-key map [menu-bar inout show-maximum-output] | ||
| 492 | '("Show Maximum Output" . comint-show-maximum-output)) | ||
| 493 | (define-key map [menu-bar inout show-output] | ||
| 494 | '("Show Current Output Group" . comint-show-output)) | ||
| 495 | (define-key map [menu-bar inout kill-input] | ||
| 496 | '("Kill Current Input" . comint-kill-input)) | ||
| 497 | (define-key map [menu-bar inout copy-input] | ||
| 498 | '("Copy Old Input" . comint-insert-input)) | ||
| 499 | (define-key map [menu-bar inout forward-matching-history] | ||
| 500 | '("Forward Matching Input..." . comint-forward-matching-input)) | ||
| 501 | (define-key map [menu-bar inout backward-matching-history] | ||
| 502 | '("Backward Matching Input..." . comint-backward-matching-input)) | ||
| 503 | (define-key map [menu-bar inout next-matching-history] | ||
| 504 | '("Next Matching Input..." . comint-next-matching-input)) | ||
| 505 | (define-key map [menu-bar inout previous-matching-history] | ||
| 506 | '("Previous Matching Input..." . comint-previous-matching-input)) | ||
| 507 | (define-key map [menu-bar inout next-matching-history-from-input] | ||
| 508 | '("Next Matching Current Input" . comint-next-matching-input-from-input)) | ||
| 509 | (define-key map [menu-bar inout previous-matching-history-from-input] | ||
| 510 | '("Previous Matching Current Input" . comint-previous-matching-input-from-input)) | ||
| 511 | (define-key map [menu-bar inout next-history] | ||
| 512 | '("Next Input" . comint-next-input)) | ||
| 513 | (define-key map [menu-bar inout previous-history] | ||
| 514 | '("Previous Input" . comint-previous-input)) | ||
| 515 | (define-key map [menu-bar inout list-history] | ||
| 516 | '("List Input History" . comint-dynamic-list-input-ring)) | ||
| 517 | (define-key map [menu-bar inout expand-history] | ||
| 518 | '("Expand History Before Point" . comint-replace-by-expanded-history)) | ||
| 519 | ;; Signals | ||
| 520 | (let ((signals-map (make-sparse-keymap "Signals"))) | ||
| 521 | (define-key map [menu-bar signals] (cons "Signals" signals-map)) | ||
| 522 | (define-key signals-map [eof] '("EOF" . comint-send-eof)) | ||
| 523 | (define-key signals-map [kill] '("KILL" . comint-kill-subjob)) | ||
| 524 | (define-key signals-map [quit] '("QUIT" . comint-quit-subjob)) | ||
| 525 | (define-key signals-map [cont] '("CONT" . comint-continue-subjob)) | ||
| 526 | (define-key signals-map [stop] '("STOP" . comint-stop-subjob)) | ||
| 527 | (define-key signals-map [break] '("BREAK" . comint-interrupt-subjob))) | ||
| 528 | ;; Put them in the menu bar: | ||
| 529 | (setq menu-bar-final-items (append '(completion inout signals) | ||
| 530 | menu-bar-final-items)) | ||
| 531 | map)) | ||
| 436 | 532 | ||
| 437 | ;; Fixme: Is this still relevant? | 533 | ;; Fixme: Is this still relevant? |
| 438 | (defvar comint-ptyp t | 534 | (defvar comint-ptyp t |
| @@ -548,114 +644,6 @@ Entry to this mode runs the hooks on `comint-mode-hook'." | |||
| 548 | ;; This behavior is not useful in comint buffers, and is annoying | 644 | ;; This behavior is not useful in comint buffers, and is annoying |
| 549 | (set (make-local-variable 'next-line-add-newlines) nil)) | 645 | (set (make-local-variable 'next-line-add-newlines) nil)) |
| 550 | 646 | ||
| 551 | (if comint-mode-map | ||
| 552 | nil | ||
| 553 | ;; Keys: | ||
| 554 | (setq comint-mode-map (make-sparse-keymap)) | ||
| 555 | (define-key comint-mode-map "\ep" 'comint-previous-input) | ||
| 556 | (define-key comint-mode-map "\en" 'comint-next-input) | ||
| 557 | (define-key comint-mode-map [C-up] 'comint-previous-input) | ||
| 558 | (define-key comint-mode-map [C-down] 'comint-next-input) | ||
| 559 | (define-key comint-mode-map "\er" 'comint-previous-matching-input) | ||
| 560 | (define-key comint-mode-map "\es" 'comint-next-matching-input) | ||
| 561 | (define-key comint-mode-map [?\C-c ?\M-r] 'comint-previous-matching-input-from-input) | ||
| 562 | (define-key comint-mode-map [?\C-c ?\M-s] 'comint-next-matching-input-from-input) | ||
| 563 | (define-key comint-mode-map "\e\C-l" 'comint-show-output) | ||
| 564 | (define-key comint-mode-map "\C-m" 'comint-send-input) | ||
| 565 | (define-key comint-mode-map "\C-d" 'comint-delchar-or-maybe-eof) | ||
| 566 | (define-key comint-mode-map "\C-c " 'comint-accumulate) | ||
| 567 | (define-key comint-mode-map "\C-c\C-x" 'comint-get-next-from-history) | ||
| 568 | (define-key comint-mode-map "\C-c\C-a" 'comint-bol-or-process-mark) | ||
| 569 | (define-key comint-mode-map "\C-c\C-u" 'comint-kill-input) | ||
| 570 | (define-key comint-mode-map "\C-c\C-w" 'backward-kill-word) | ||
| 571 | (define-key comint-mode-map "\C-c\C-c" 'comint-interrupt-subjob) | ||
| 572 | (define-key comint-mode-map "\C-c\C-z" 'comint-stop-subjob) | ||
| 573 | (define-key comint-mode-map "\C-c\C-\\" 'comint-quit-subjob) | ||
| 574 | (define-key comint-mode-map "\C-c\C-m" 'comint-insert-input) | ||
| 575 | (define-key comint-mode-map "\C-c\C-o" 'comint-delete-output) | ||
| 576 | (define-key comint-mode-map "\C-c\C-r" 'comint-show-output) | ||
| 577 | (define-key comint-mode-map "\C-c\C-e" 'comint-show-maximum-output) | ||
| 578 | (define-key comint-mode-map "\C-c\C-l" 'comint-dynamic-list-input-ring) | ||
| 579 | (define-key comint-mode-map "\C-c\C-n" 'comint-next-prompt) | ||
| 580 | (define-key comint-mode-map "\C-c\C-p" 'comint-previous-prompt) | ||
| 581 | (define-key comint-mode-map "\C-c\C-d" 'comint-send-eof) | ||
| 582 | (define-key comint-mode-map "\C-c\C-s" 'comint-write-output) | ||
| 583 | (define-key comint-mode-map "\C-c." 'comint-insert-previous-argument) | ||
| 584 | ;; Mouse Buttons: | ||
| 585 | (define-key comint-mode-map [mouse-2] 'comint-mouse-insert-input) | ||
| 586 | ;; Menu bars: | ||
| 587 | ;; completion: | ||
| 588 | (define-key comint-mode-map [menu-bar completion] | ||
| 589 | (cons "Complete" (make-sparse-keymap "Complete"))) | ||
| 590 | (define-key comint-mode-map [menu-bar completion complete-expand] | ||
| 591 | '("Expand File Name" . comint-replace-by-expanded-filename)) | ||
| 592 | (define-key comint-mode-map [menu-bar completion complete-listing] | ||
| 593 | '("File Completion Listing" . comint-dynamic-list-filename-completions)) | ||
| 594 | (define-key comint-mode-map [menu-bar completion complete-file] | ||
| 595 | '("Complete File Name" . comint-dynamic-complete-filename)) | ||
| 596 | (define-key comint-mode-map [menu-bar completion complete] | ||
| 597 | '("Complete Before Point" . comint-dynamic-complete)) | ||
| 598 | ;; Input history: | ||
| 599 | (define-key comint-mode-map [menu-bar inout] | ||
| 600 | (cons "In/Out" (make-sparse-keymap "In/Out"))) | ||
| 601 | (define-key comint-mode-map [menu-bar inout delete-output] | ||
| 602 | '("Delete Current Output Group" . comint-delete-output)) | ||
| 603 | (define-key comint-mode-map [menu-bar inout append-output-to-file] | ||
| 604 | '("Append Current Output Group to File" . comint-append-output-to-file)) | ||
| 605 | (define-key comint-mode-map [menu-bar inout write-output] | ||
| 606 | '("Write Current Output Group to File" . comint-write-output)) | ||
| 607 | (define-key comint-mode-map [menu-bar inout next-prompt] | ||
| 608 | '("Forward Output Group" . comint-next-prompt)) | ||
| 609 | (define-key comint-mode-map [menu-bar inout previous-prompt] | ||
| 610 | '("Backward Output Group" . comint-previous-prompt)) | ||
| 611 | (define-key comint-mode-map [menu-bar inout show-maximum-output] | ||
| 612 | '("Show Maximum Output" . comint-show-maximum-output)) | ||
| 613 | (define-key comint-mode-map [menu-bar inout show-output] | ||
| 614 | '("Show Current Output Group" . comint-show-output)) | ||
| 615 | (define-key comint-mode-map [menu-bar inout kill-input] | ||
| 616 | '("Kill Current Input" . comint-kill-input)) | ||
| 617 | (define-key comint-mode-map [menu-bar inout copy-input] | ||
| 618 | '("Copy Old Input" . comint-insert-input)) | ||
| 619 | (define-key comint-mode-map [menu-bar inout forward-matching-history] | ||
| 620 | '("Forward Matching Input..." . comint-forward-matching-input)) | ||
| 621 | (define-key comint-mode-map [menu-bar inout backward-matching-history] | ||
| 622 | '("Backward Matching Input..." . comint-backward-matching-input)) | ||
| 623 | (define-key comint-mode-map [menu-bar inout next-matching-history] | ||
| 624 | '("Next Matching Input..." . comint-next-matching-input)) | ||
| 625 | (define-key comint-mode-map [menu-bar inout previous-matching-history] | ||
| 626 | '("Previous Matching Input..." . comint-previous-matching-input)) | ||
| 627 | (define-key comint-mode-map [menu-bar inout next-matching-history-from-input] | ||
| 628 | '("Next Matching Current Input" . comint-next-matching-input-from-input)) | ||
| 629 | (define-key comint-mode-map [menu-bar inout previous-matching-history-from-input] | ||
| 630 | '("Previous Matching Current Input" . comint-previous-matching-input-from-input)) | ||
| 631 | (define-key comint-mode-map [menu-bar inout next-history] | ||
| 632 | '("Next Input" . comint-next-input)) | ||
| 633 | (define-key comint-mode-map [menu-bar inout previous-history] | ||
| 634 | '("Previous Input" . comint-previous-input)) | ||
| 635 | (define-key comint-mode-map [menu-bar inout list-history] | ||
| 636 | '("List Input History" . comint-dynamic-list-input-ring)) | ||
| 637 | (define-key comint-mode-map [menu-bar inout expand-history] | ||
| 638 | '("Expand History Before Point" . comint-replace-by-expanded-history)) | ||
| 639 | ;; Signals | ||
| 640 | (define-key comint-mode-map [menu-bar signals] | ||
| 641 | (cons "Signals" (make-sparse-keymap "Signals"))) | ||
| 642 | (define-key comint-mode-map [menu-bar signals eof] | ||
| 643 | '("EOF" . comint-send-eof)) | ||
| 644 | (define-key comint-mode-map [menu-bar signals kill] | ||
| 645 | '("KILL" . comint-kill-subjob)) | ||
| 646 | (define-key comint-mode-map [menu-bar signals quit] | ||
| 647 | '("QUIT" . comint-quit-subjob)) | ||
| 648 | (define-key comint-mode-map [menu-bar signals cont] | ||
| 649 | '("CONT" . comint-continue-subjob)) | ||
| 650 | (define-key comint-mode-map [menu-bar signals stop] | ||
| 651 | '("STOP" . comint-stop-subjob)) | ||
| 652 | (define-key comint-mode-map [menu-bar signals break] | ||
| 653 | '("BREAK" . comint-interrupt-subjob)) | ||
| 654 | ;; Put them in the menu bar: | ||
| 655 | (setq menu-bar-final-items (append '(completion inout signals) | ||
| 656 | menu-bar-final-items)) | ||
| 657 | ) | ||
| 658 | |||
| 659 | (defun comint-check-proc (buffer) | 647 | (defun comint-check-proc (buffer) |
| 660 | "Return t if there is a living process associated w/buffer BUFFER. | 648 | "Return t if there is a living process associated w/buffer BUFFER. |
| 661 | Living means the status is `open', `run', or `stop'. | 649 | Living means the status is `open', `run', or `stop'. |
| @@ -798,9 +786,10 @@ buffer. The hook `comint-exec-hook' is run after each exec." | |||
| 798 | (set-process-coding-system proc decoding encoding)) | 786 | (set-process-coding-system proc decoding encoding)) |
| 799 | proc)) | 787 | proc)) |
| 800 | 788 | ||
| 801 | (defun comint-insert-input () | 789 | (defun comint-insert-input (&optional event) |
| 802 | "In a Comint buffer, set the current input to the previous input at point." | 790 | "In a Comint buffer, set the current input to the previous input at point." |
| 803 | (interactive) | 791 | (interactive (list last-input-event)) |
| 792 | (if event (mouse-set-point event)) | ||
| 804 | (let ((pos (point))) | 793 | (let ((pos (point))) |
| 805 | (if (not (eq (get-char-property pos 'field) 'input)) | 794 | (if (not (eq (get-char-property pos 'field) 'input)) |
| 806 | ;; No input at POS, fall back to the global definition. | 795 | ;; No input at POS, fall back to the global definition. |
| @@ -818,13 +807,7 @@ buffer. The hook `comint-exec-hook' is run after each exec." | |||
| 818 | ;; Insert the input at point | 807 | ;; Insert the input at point |
| 819 | (insert (buffer-substring-no-properties | 808 | (insert (buffer-substring-no-properties |
| 820 | (previous-single-char-property-change (1+ pos) 'field) | 809 | (previous-single-char-property-change (1+ pos) 'field) |
| 821 | (next-single-char-property-change pos 'field)))))) | 810 | (next-single-char-property-change pos 'field)))))) |
| 822 | |||
| 823 | (defun comint-mouse-insert-input (event) | ||
| 824 | "In a Comint buffer, set the current input to the previous input you click on." | ||
| 825 | (interactive "e") | ||
| 826 | (mouse-set-point event) | ||
| 827 | (comint-insert-input)) | ||
| 828 | 811 | ||
| 829 | 812 | ||
| 830 | ;; Input history processing in a buffer | 813 | ;; Input history processing in a buffer |
| @@ -1734,7 +1717,7 @@ Make backspaces delete the previous character." | |||
| 1734 | (1- prompt-start) prompt-start 'read-only 'fence)) | 1717 | (1- prompt-start) prompt-start 'read-only 'fence)) |
| 1735 | (add-text-properties | 1718 | (add-text-properties |
| 1736 | prompt-start (point) | 1719 | prompt-start (point) |
| 1737 | '(read-only t rear-non-sticky t front-sticky (read-only)))) | 1720 | '(read-only t rear-nonsticky t front-sticky (read-only)))) |
| 1738 | (unless (and (bolp) (null comint-last-prompt-overlay)) | 1721 | (unless (and (bolp) (null comint-last-prompt-overlay)) |
| 1739 | ;; Need to create or move the prompt overlay (in the case | 1722 | ;; Need to create or move the prompt overlay (in the case |
| 1740 | ;; where there is no prompt ((bolp) == t), we still do | 1723 | ;; where there is no prompt ((bolp) == t), we still do |
| @@ -2136,8 +2119,8 @@ This command also kills the pending input | |||
| 2136 | between the process mark and point. | 2119 | between the process mark and point. |
| 2137 | 2120 | ||
| 2138 | WARNING: if there is no current subjob, you can end up suspending | 2121 | WARNING: if there is no current subjob, you can end up suspending |
| 2139 | the top-level process running in the buffer. If you accidentally do | 2122 | the top-level process running in the buffer. If you accidentally do |
| 2140 | this, use \\[comint-continue-subjob] to resume the process. (This | 2123 | this, use \\[comint-continue-subjob] to resume the process. (This |
| 2141 | is not a problem with most shells, since they ignore this signal.)" | 2124 | is not a problem with most shells, since they ignore this signal.)" |
| 2142 | (interactive) | 2125 | (interactive) |
| 2143 | (comint-skip-input) | 2126 | (comint-skip-input) |
| @@ -2357,9 +2340,9 @@ preceding newline is removed." | |||
| 2357 | 2340 | ||
| 2358 | (defun comint-kill-whole-line (&optional arg) | 2341 | (defun comint-kill-whole-line (&optional arg) |
| 2359 | "Kill current line, ignoring read-only and field properties. | 2342 | "Kill current line, ignoring read-only and field properties. |
| 2360 | With prefix arg, kill that many lines starting from the current line. | 2343 | With prefix ARG, kill that many lines starting from the current line. |
| 2361 | If arg is negative, kill backward. Also kill the preceding newline, | 2344 | If arg is negative, kill backward. Also kill the preceding newline, |
| 2362 | instead of the trailing one. \(This is meant to make C-x z work well | 2345 | instead of the trailing one. \(This is meant to make \\[repeat] work well |
| 2363 | with negative arguments.) | 2346 | with negative arguments.) |
| 2364 | If arg is zero, kill current line but exclude the trailing newline. | 2347 | If arg is zero, kill current line but exclude the trailing newline. |
| 2365 | The read-only status of newlines is updated with `comint-update-fence', | 2348 | The read-only status of newlines is updated with `comint-update-fence', |
| @@ -2505,7 +2488,7 @@ Provides a default, if there is one, and returns the result filename. | |||
| 2505 | 2488 | ||
| 2506 | See `comint-source-default' for more on determining defaults. | 2489 | See `comint-source-default' for more on determining defaults. |
| 2507 | 2490 | ||
| 2508 | PROMPT is the prompt string. PREV-DIR/FILE is the (directory . file) pair | 2491 | PROMPT is the prompt string. PREV-DIR/FILE is the (directory . file) pair |
| 2509 | from the last source processing command. SOURCE-MODES is a list of major | 2492 | from the last source processing command. SOURCE-MODES is a list of major |
| 2510 | modes used to determine what file buffers contain source files. (These | 2493 | modes used to determine what file buffers contain source files. (These |
| 2511 | two arguments are used for determining defaults). If MUSTMATCH-P is true, | 2494 | two arguments are used for determining defaults). If MUSTMATCH-P is true, |
| @@ -3503,5 +3486,5 @@ REGEXP-GROUP is the regular expression group in REGEXP to use." | |||
| 3503 | 3486 | ||
| 3504 | (provide 'comint) | 3487 | (provide 'comint) |
| 3505 | 3488 | ||
| 3506 | ;;; arch-tag: 1793314c-09db-40be-9549-9aeae3e75164 | 3489 | ;; arch-tag: 1793314c-09db-40be-9549-9aeae3e75164 |
| 3507 | ;;; comint.el ends here | 3490 | ;;; comint.el ends here |
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 0a7f1a1950a..c945a6a7221 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; diff-mode.el --- a mode for viewing/editing context diffs | 1 | ;;; diff-mode.el --- a mode for viewing/editing context diffs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1998,1999,2000,01,02,03,2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
| 6 | ;; Keywords: convenience patch diff | 7 | ;; Keywords: convenience patch diff |
| @@ -171,75 +172,73 @@ when editing big diffs)." | |||
| 171 | 172 | ||
| 172 | (defface diff-header-face | 173 | (defface diff-header-face |
| 173 | '((((class color) (min-colors 88) (background light)) | 174 | '((((class color) (min-colors 88) (background light)) |
| 174 | (:background "grey85")) | 175 | :background "grey85") |
| 175 | (((class color) (min-colors 88) (background dark)) | 176 | (((class color) (min-colors 88) (background dark)) |
| 176 | (:background "grey45")) | 177 | :background "grey45") |
| 177 | (((class color) (background light)) | 178 | (((class color) (background light)) |
| 178 | (:foreground "blue1" :weight bold)) | 179 | :foreground "blue1" :weight bold) |
| 179 | (((class color) (background dark)) | 180 | (((class color) (background dark)) |
| 180 | (:foreground "green" :weight bold)) | 181 | :foreground "green" :weight bold) |
| 181 | (t (:weight bold))) | 182 | (t :weight bold)) |
| 182 | "`diff-mode' face inherited by hunk and index header faces.") | 183 | "`diff-mode' face inherited by hunk and index header faces.") |
| 183 | (defvar diff-header-face 'diff-header-face) | 184 | (defvar diff-header-face 'diff-header-face) |
| 184 | 185 | ||
| 185 | (defface diff-file-header-face | 186 | (defface diff-file-header-face |
| 186 | '((((class color) (min-colors 88) (background light)) | 187 | '((((class color) (min-colors 88) (background light)) |
| 187 | (:background "grey70" :weight bold)) | 188 | :background "grey70" :weight bold) |
| 188 | (((class color) (min-colors 88) (background dark)) | 189 | (((class color) (min-colors 88) (background dark)) |
| 189 | (:background "grey60" :weight bold)) | 190 | :background "grey60" :weight bold) |
| 190 | (((class color) (background light)) | 191 | (((class color) (background light)) |
| 191 | (:foreground "yellow" :weight bold)) | 192 | :foreground "yellow" :weight bold) |
| 192 | (((class color) (background dark)) | 193 | (((class color) (background dark)) |
| 193 | (:foreground "cyan" :weight bold)) | 194 | :foreground "cyan" :weight bold) |
| 194 | (t (:weight bold))) ; :height 1.3 | 195 | (t :weight bold)) ; :height 1.3 |
| 195 | "`diff-mode' face used to highlight file header lines.") | 196 | "`diff-mode' face used to highlight file header lines.") |
| 196 | (defvar diff-file-header-face 'diff-file-header-face) | 197 | (defvar diff-file-header-face 'diff-file-header-face) |
| 197 | 198 | ||
| 198 | (defface diff-index-face | 199 | (defface diff-index-face |
| 199 | '((t (:inherit diff-file-header-face))) | 200 | '((t :inherit diff-file-header-face)) |
| 200 | "`diff-mode' face used to highlight index header lines.") | 201 | "`diff-mode' face used to highlight index header lines.") |
| 201 | (defvar diff-index-face 'diff-index-face) | 202 | (defvar diff-index-face 'diff-index-face) |
| 202 | 203 | ||
| 203 | (defface diff-hunk-header-face | 204 | (defface diff-hunk-header-face |
| 204 | '((t (:inherit diff-header-face))) | 205 | '((t :inherit diff-header-face)) |
| 205 | "`diff-mode' face used to highlight hunk header lines.") | 206 | "`diff-mode' face used to highlight hunk header lines.") |
| 206 | (defvar diff-hunk-header-face 'diff-hunk-header-face) | 207 | (defvar diff-hunk-header-face 'diff-hunk-header-face) |
| 207 | 208 | ||
| 208 | (defface diff-removed-face | 209 | (defface diff-removed-face |
| 209 | '((t (:inherit diff-changed-face))) | 210 | '((t :inherit diff-changed-face)) |
| 210 | "`diff-mode' face used to highlight removed lines.") | 211 | "`diff-mode' face used to highlight removed lines.") |
| 211 | (defvar diff-removed-face 'diff-removed-face) | 212 | (defvar diff-removed-face 'diff-removed-face) |
| 212 | 213 | ||
| 213 | (defface diff-added-face | 214 | (defface diff-added-face |
| 214 | '((t (:inherit diff-changed-face))) | 215 | '((t :inherit diff-changed-face)) |
| 215 | "`diff-mode' face used to highlight added lines.") | 216 | "`diff-mode' face used to highlight added lines.") |
| 216 | (defvar diff-added-face 'diff-added-face) | 217 | (defvar diff-added-face 'diff-added-face) |
| 217 | 218 | ||
| 218 | (defface diff-changed-face | 219 | (defface diff-changed-face |
| 219 | '((((type tty pc) (class color) (background light)) | 220 | '((((type tty pc) (class color) (background light)) |
| 220 | (:foreground "magenta" :weight bold :slant italic)) | 221 | :foreground "magenta" :weight bold :slant italic) |
| 221 | (((type tty pc) (class color) (background dark)) | 222 | (((type tty pc) (class color) (background dark)) |
| 222 | (:foreground "yellow" :weight bold :slant italic)) | 223 | :foreground "yellow" :weight bold :slant italic)) |
| 223 | (t ())) | ||
| 224 | "`diff-mode' face used to highlight changed lines.") | 224 | "`diff-mode' face used to highlight changed lines.") |
| 225 | (defvar diff-changed-face 'diff-changed-face) | 225 | (defvar diff-changed-face 'diff-changed-face) |
| 226 | 226 | ||
| 227 | (defface diff-function-face | 227 | (defface diff-function-face |
| 228 | '((t (:inherit diff-context-face))) | 228 | '((t :inherit diff-context-face)) |
| 229 | "`diff-mode' face used to highlight function names produced by \"diff -p\".") | 229 | "`diff-mode' face used to highlight function names produced by \"diff -p\".") |
| 230 | (defvar diff-function-face 'diff-function-face) | 230 | (defvar diff-function-face 'diff-function-face) |
| 231 | 231 | ||
| 232 | (defface diff-context-face | 232 | (defface diff-context-face |
| 233 | '((((class color) (background light)) | 233 | '((((class color) (background light)) |
| 234 | (:foreground "grey50")) | 234 | :foreground "grey50") |
| 235 | (((class color) (background dark)) | 235 | (((class color) (background dark)) |
| 236 | (:foreground "grey70")) | 236 | :foreground "grey70")) |
| 237 | (t )) | ||
| 238 | "`diff-mode' face used to highlight context and other side-information.") | 237 | "`diff-mode' face used to highlight context and other side-information.") |
| 239 | (defvar diff-context-face 'diff-context-face) | 238 | (defvar diff-context-face 'diff-context-face) |
| 240 | 239 | ||
| 241 | (defface diff-nonexistent-face | 240 | (defface diff-nonexistent-face |
| 242 | '((t (:inherit diff-file-header-face))) | 241 | '((t :inherit diff-file-header-face)) |
| 243 | "`diff-mode' face used to highlight nonexistent files in recursive diffs.") | 242 | "`diff-mode' face used to highlight nonexistent files in recursive diffs.") |
| 244 | (defvar diff-nonexistent-face 'diff-nonexistent-face) | 243 | (defvar diff-nonexistent-face 'diff-nonexistent-face) |
| 245 | 244 | ||
| @@ -1255,7 +1254,7 @@ For use in `add-log-current-defun-function'." | |||
| 1255 | (save-excursion | 1254 | (save-excursion |
| 1256 | (when (looking-at diff-hunk-header-re) | 1255 | (when (looking-at diff-hunk-header-re) |
| 1257 | (forward-line 1) | 1256 | (forward-line 1) |
| 1258 | (while (and (looking-at " ") (not (zerop (forward-line 1)))))) | 1257 | (re-search-forward "^[^ ]" nil t)) |
| 1259 | (destructuring-bind (buf line-offset pos src dst &optional switched) | 1258 | (destructuring-bind (buf line-offset pos src dst &optional switched) |
| 1260 | (diff-find-source-location) | 1259 | (diff-find-source-location) |
| 1261 | (beginning-of-line) | 1260 | (beginning-of-line) |
| @@ -1355,5 +1354,5 @@ For use in `add-log-current-defun-function'." | |||
| 1355 | ;; use `combine-after-change-calls' to minimize the slowdown of font-lock. | 1354 | ;; use `combine-after-change-calls' to minimize the slowdown of font-lock. |
| 1356 | ;; | 1355 | ;; |
| 1357 | 1356 | ||
| 1358 | ;;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66 | 1357 | ;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66 |
| 1359 | ;;; diff-mode.el ends here | 1358 | ;;; diff-mode.el ends here |
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 825df2526c0..18913893642 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el | |||
| @@ -1152,7 +1152,7 @@ of FORM by signalling the error at compile-time." | |||
| 1152 | (numberp (nth 1 form))) | 1152 | (numberp (nth 1 form))) |
| 1153 | (list 'forward-word (eval (- (nth 1 form))))) | 1153 | (list 'forward-word (eval (- (nth 1 form))))) |
| 1154 | ((= 1 (safe-length form)) | 1154 | ((= 1 (safe-length form)) |
| 1155 | '(forward-char -1)) | 1155 | '(forward-word -1)) |
| 1156 | (t form))) | 1156 | (t form))) |
| 1157 | 1157 | ||
| 1158 | (put 'char-before 'byte-optimizer 'byte-optimize-char-before) | 1158 | (put 'char-before 'byte-optimizer 'byte-optimize-char-before) |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 700fc5f80a8..f4364c38e8d 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands | 1 | ;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985,86,1999,2000,01,03,2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1985, 1986, 1999, 2000, 2001, 2003, 2004 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| 6 | ;; Keywords: lisp, languages | 7 | ;; Keywords: lisp, languages |
| @@ -1153,7 +1154,8 @@ paragraph of it that point is in, preserving the comment's indentation | |||
| 1153 | and initial semicolons." | 1154 | and initial semicolons." |
| 1154 | (interactive "P") | 1155 | (interactive "P") |
| 1155 | (or (fill-comment-paragraph justify) | 1156 | (or (fill-comment-paragraph justify) |
| 1156 | ;; Point is on a program line (a line no comment); we are interested | 1157 | ;; Since fill-comment-paragraph returned nil, that means we're not in |
| 1158 | ;; a comment: Point is on a program line; we are interested | ||
| 1157 | ;; particularly in docstring lines. | 1159 | ;; particularly in docstring lines. |
| 1158 | ;; | 1160 | ;; |
| 1159 | ;; We bind `paragraph-start' and `paragraph-separate' temporarily. They | 1161 | ;; We bind `paragraph-start' and `paragraph-separate' temporarily. They |
| @@ -1182,7 +1184,7 @@ and initial semicolons." | |||
| 1182 | ;; The `fill-column' is temporarily bound to | 1184 | ;; The `fill-column' is temporarily bound to |
| 1183 | ;; `emacs-lisp-docstring-fill-column' if that value is an integer. | 1185 | ;; `emacs-lisp-docstring-fill-column' if that value is an integer. |
| 1184 | (let ((paragraph-start (concat paragraph-start | 1186 | (let ((paragraph-start (concat paragraph-start |
| 1185 | "\\|\\s-*\\([\(;:\"]\\|`\(\\)")) | 1187 | "\\|\\s-*\\([(;:\"]\\|`(\\|#'(\\)")) |
| 1186 | (paragraph-separate | 1188 | (paragraph-separate |
| 1187 | (concat paragraph-separate "\\|\\s-*\".*[,\\.]$")) | 1189 | (concat paragraph-separate "\\|\\s-*\".*[,\\.]$")) |
| 1188 | (fill-column (if (integerp emacs-lisp-docstring-fill-column) | 1190 | (fill-column (if (integerp emacs-lisp-docstring-fill-column) |
| @@ -1227,5 +1229,5 @@ means don't indent that line." | |||
| 1227 | 1229 | ||
| 1228 | (provide 'lisp-mode) | 1230 | (provide 'lisp-mode) |
| 1229 | 1231 | ||
| 1230 | ;;; arch-tag: 414c7f93-c245-4b77-8ed5-ed05ef7ff1bf | 1232 | ;; arch-tag: 414c7f93-c245-4b77-8ed5-ed05ef7ff1bf |
| 1231 | ;;; lisp-mode.el ends here | 1233 | ;;; lisp-mode.el ends here |
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 63d9f759ceb..87b3fcff96c 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -75,17 +75,19 @@ The place mark goes is the same place \\[forward-sexp] would | |||
| 75 | move to with the same argument. | 75 | move to with the same argument. |
| 76 | If this command is repeated, it marks the next ARG sexps after the ones | 76 | If this command is repeated, it marks the next ARG sexps after the ones |
| 77 | already marked." | 77 | already marked." |
| 78 | (interactive "p") | 78 | (interactive "P") |
| 79 | (cond ((and (eq last-command this-command) (mark t)) | 79 | (cond ((and (eq last-command this-command) (mark t)) |
| 80 | (setq arg (if arg (prefix-numeric-value arg) | ||
| 81 | (if (> (mark) (point)) 1 -1))) | ||
| 80 | (set-mark | 82 | (set-mark |
| 81 | (save-excursion | 83 | (save-excursion |
| 82 | (goto-char (mark)) | 84 | (goto-char (mark)) |
| 83 | (forward-sexp (or arg 1)) | 85 | (forward-sexp arg) |
| 84 | (point)))) | 86 | (point)))) |
| 85 | (t | 87 | (t |
| 86 | (push-mark | 88 | (push-mark |
| 87 | (save-excursion | 89 | (save-excursion |
| 88 | (forward-sexp (or arg 1)) | 90 | (forward-sexp (prefix-numeric-value arg)) |
| 89 | (point)) | 91 | (point)) |
| 90 | nil t)))) | 92 | nil t)))) |
| 91 | 93 | ||
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index f5b68a3c243..2a2777d102b 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1324,6 +1324,12 @@ HIGHLIGHT should be of the form MATCH-HIGHLIGHT, see `font-lock-keywords'." | |||
| 1324 | (add-text-properties start end (cddr val)) | 1324 | (add-text-properties start end (cddr val)) |
| 1325 | (setq val (cadr val))) | 1325 | (setq val (cadr val))) |
| 1326 | (cond | 1326 | (cond |
| 1327 | ((not (or val (eq override t))) | ||
| 1328 | ;; If `val' is nil, don't do anything. It is important to do it | ||
| 1329 | ;; explicitly, because when adding nil via things like | ||
| 1330 | ;; font-lock-append-text-property, the property is actually | ||
| 1331 | ;; changed from <face> to (<face>) which is undesirable. --Stef | ||
| 1332 | nil) | ||
| 1327 | ((not override) | 1333 | ((not override) |
| 1328 | ;; Cannot override existing fontification. | 1334 | ;; Cannot override existing fontification. |
| 1329 | (or (text-property-not-all start end 'face nil) | 1335 | (or (text-property-not-all start end 'face nil) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 907ad5f3411..292d36ce9e1 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,55 @@ | |||
| 1 | 2004-10-13 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 2 | |||
| 3 | * message.el (message-tokenize-header): Fix 2004-09-06 change | ||
| 4 | which used point-min in the wrong place. | ||
| 5 | |||
| 6 | 2004-10-12 Simon Josefsson <jas@extundo.com> | ||
| 7 | |||
| 8 | * net/tls.el (tls-certtool-program): New variable. | ||
| 9 | (tls-certificate-information): New function, based on | ||
| 10 | ssl-certificate-information. | ||
| 11 | |||
| 12 | 2004-10-10 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 13 | |||
| 14 | * gnus-sum.el: Mention that multibyte characters don't work as marks. | ||
| 15 | |||
| 16 | * gnus.el (message-y-or-n-p): Autoload. | ||
| 17 | |||
| 18 | * pop3.el (pop3-maildrop, pop3-mailhost, pop3-port) | ||
| 19 | (pop3-password-required, pop3-authentication-scheme) | ||
| 20 | (pop3-leave-mail-on-server): Made customizable. | ||
| 21 | (pop3): New custom group. | ||
| 22 | (pop3-retr): Remove `sleep-for' statements. | ||
| 23 | Suggested by Dave Love <fx@gnu.org>. | ||
| 24 | |||
| 25 | * nnheader.el (nnheader-read-timeout): Explain 1.0 timeout for | ||
| 26 | Windows/DOS. | ||
| 27 | |||
| 28 | * imap.el (imap-parse-flag-list, imap-parse-body-extension) | ||
| 29 | (imap-parse-body): Fix incorrect use of `assert'. Suggested by | ||
| 30 | Dave Love <fx@gnu.org>. | ||
| 31 | |||
| 32 | * mml.el (mml-minibuffer-read-disposition): Require match. | ||
| 33 | Suggested by Dave Love <fx@gnu.org>. | ||
| 34 | |||
| 35 | 2004-10-06 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 36 | |||
| 37 | * gnus-group.el (gnus-update-group-mark-positions): | ||
| 38 | * gnus-sum.el (gnus-update-summary-mark-positions): | ||
| 39 | * message.el (message-check-news-body-syntax): | ||
| 40 | * gnus-msg.el (gnus-debug): Use mm-string-as-multibyte instead | ||
| 41 | of string-as-multibyte. | ||
| 42 | |||
| 43 | * gnus-sum.el (gnus-summary-insert-subject): Remove redundant setq. | ||
| 44 | |||
| 45 | 2004-10-05 Juri Linkov <juri@jurta.org> | ||
| 46 | |||
| 47 | * gnus-group.el (gnus-update-group-mark-positions): | ||
| 48 | * gnus-sum.el (gnus-update-summary-mark-positions): | ||
| 49 | * message.el (message-check-news-body-syntax): | ||
| 50 | * gnus-msg.el (gnus-debug): Use `string-as-multibyte' to convert | ||
| 51 | 8-bit unibyte values to a multibyte string for search functions. | ||
| 52 | |||
| 1 | 2004-10-01 Katsumi Yamaoka <yamaoka@jpl.org> | 53 | 2004-10-01 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 54 | ||
| 3 | * gnus-sum.el (gnus-summary-toggle-header): Make it work even if | 55 | * gnus-sum.el (gnus-summary-toggle-header): Make it work even if |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 9f7b259e066..435acb1d6c2 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -1046,7 +1046,8 @@ The following commands are available: | |||
| 1046 | (gnus-group-insert-group-line "dummy.group" 0 nil 0 nil) | 1046 | (gnus-group-insert-group-line "dummy.group" 0 nil 0 nil) |
| 1047 | (goto-char (point-min)) | 1047 | (goto-char (point-min)) |
| 1048 | (setq gnus-group-mark-positions | 1048 | (setq gnus-group-mark-positions |
| 1049 | (list (cons 'process (and (search-forward "\200" nil t) | 1049 | (list (cons 'process (and (search-forward |
| 1050 | (mm-string-as-multibyte "\200") nil t) | ||
| 1050 | (- (point) 2)))))))) | 1051 | (- (point) 2)))))))) |
| 1051 | 1052 | ||
| 1052 | (defun gnus-mouse-pick-group (e) | 1053 | (defun gnus-mouse-pick-group (e) |
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 33531e7f8a4..7dcef4b813b 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el | |||
| @@ -1534,7 +1534,8 @@ The source file has to be in the Emacs load path." | |||
| 1534 | ;; Remove any control chars - they seem to cause trouble for some | 1534 | ;; Remove any control chars - they seem to cause trouble for some |
| 1535 | ;; mailers. (Byte-compiled output from the stuff above.) | 1535 | ;; mailers. (Byte-compiled output from the stuff above.) |
| 1536 | (goto-char point) | 1536 | (goto-char point) |
| 1537 | (while (re-search-forward "[\000-\010\013-\037\200-\237]" nil t) | 1537 | (while (re-search-forward (mm-string-as-multibyte |
| 1538 | "[\000-\010\013-\037\200-\237]") nil t) | ||
| 1538 | (replace-match (format "\\%03o" (string-to-char (match-string 0))) | 1539 | (replace-match (format "\\%03o" (string-to-char (match-string 0))) |
| 1539 | t t)))) | 1540 | t t)))) |
| 1540 | 1541 | ||
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 40278da4716..42c699ef552 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -428,6 +428,9 @@ this variable specifies group names." | |||
| 428 | (cons :value ("" "") regexp (repeat string)) | 428 | (cons :value ("" "") regexp (repeat string)) |
| 429 | (sexp :value nil)))) | 429 | (sexp :value nil)))) |
| 430 | 430 | ||
| 431 | ;; FIXME: Although the custom type is `character' for the following variables, | ||
| 432 | ;; using multibyte characters (Latin-1, UTF-8) doesn't work. -- rs | ||
| 433 | |||
| 431 | (defcustom gnus-unread-mark ? ;Whitespace | 434 | (defcustom gnus-unread-mark ? ;Whitespace |
| 432 | "*Mark used for unread articles." | 435 | "*Mark used for unread articles." |
| 433 | :group 'gnus-summary-marks | 436 | :group 'gnus-summary-marks |
| @@ -3231,20 +3234,24 @@ buffer that was in action when the last article was fetched." | |||
| 3231 | [0 "" "" "05 Apr 2001 23:33:09 +0400" "" "" 0 0 "" nil] | 3234 | [0 "" "" "05 Apr 2001 23:33:09 +0400" "" "" 0 0 "" nil] |
| 3232 | 0 nil t 128 t nil "" nil 1) | 3235 | 0 nil t 128 t nil "" nil 1) |
| 3233 | (goto-char (point-min)) | 3236 | (goto-char (point-min)) |
| 3234 | (setq pos (list (cons 'unread (and (search-forward "\200" nil t) | 3237 | (setq pos (list (cons 'unread |
| 3235 | (- (point) (point-min) 1))))) | 3238 | (and (search-forward |
| 3239 | (mm-string-as-multibyte "\200") nil t) | ||
| 3240 | (- (point) (point-min) 1))))) | ||
| 3236 | (goto-char (point-min)) | 3241 | (goto-char (point-min)) |
| 3237 | (push (cons 'replied (and (search-forward "\201" nil t) | 3242 | (push (cons 'replied (and (search-forward |
| 3243 | (mm-string-as-multibyte "\201") nil t) | ||
| 3238 | (- (point) (point-min) 1))) | 3244 | (- (point) (point-min) 1))) |
| 3239 | pos) | 3245 | pos) |
| 3240 | (goto-char (point-min)) | 3246 | (goto-char (point-min)) |
| 3241 | (push (cons 'score (and (search-forward "\202" nil t) | 3247 | (push (cons 'score (and (search-forward |
| 3248 | (mm-string-as-multibyte "\202") nil t) | ||
| 3242 | (- (point) (point-min) 1))) | 3249 | (- (point) (point-min) 1))) |
| 3243 | pos) | 3250 | pos) |
| 3244 | (goto-char (point-min)) | 3251 | (goto-char (point-min)) |
| 3245 | (push (cons 'download | 3252 | (push (cons 'download (and (search-forward |
| 3246 | (and (search-forward "\203" nil t) | 3253 | (mm-string-as-multibyte "\203") nil t) |
| 3247 | (- (point) (point-min) 1))) | 3254 | (- (point) (point-min) 1))) |
| 3248 | pos))) | 3255 | pos))) |
| 3249 | (setq gnus-summary-mark-positions pos)))) | 3256 | (setq gnus-summary-mark-positions pos)))) |
| 3250 | 3257 | ||
| @@ -6009,8 +6016,7 @@ the subject line on." | |||
| 6009 | ;; Remove list identifiers from subject. | 6016 | ;; Remove list identifiers from subject. |
| 6010 | (when gnus-list-identifiers | 6017 | (when gnus-list-identifiers |
| 6011 | (let ((gnus-newsgroup-headers (list header))) | 6018 | (let ((gnus-newsgroup-headers (list header))) |
| 6012 | (gnus-summary-remove-list-identifiers) | 6019 | (gnus-summary-remove-list-identifiers))) |
| 6013 | (setq header (car gnus-newsgroup-headers)))) | ||
| 6014 | (when old-header | 6020 | (when old-header |
| 6015 | (mail-header-set-number header (mail-header-number old-header))) | 6021 | (mail-header-set-number header (mail-header-number old-header))) |
| 6016 | (setq gnus-newsgroup-sparse | 6022 | (setq gnus-newsgroup-sparse |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 979ee2a7c24..bff1c3bba2f 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | (require 'wid-edit) | 34 | (require 'wid-edit) |
| 35 | (require 'mm-util) | 35 | (require 'mm-util) |
| 36 | (require 'nnheader) | 36 | (require 'nnheader) |
| 37 | (autoload 'message-y-or-n-p "message" nil nil 'macro) | ||
| 37 | 38 | ||
| 38 | (defgroup gnus nil | 39 | (defgroup gnus nil |
| 39 | "The coffee-brewing, all singing, all dancing, kitchen sink newsreader." | 40 | "The coffee-brewing, all singing, all dancing, kitchen sink newsreader." |
diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el index 754473fa8ec..326c998c5d9 100644 --- a/lisp/gnus/imap.el +++ b/lisp/gnus/imap.el | |||
| @@ -2421,7 +2421,7 @@ Return nil if no complete line has arrived." | |||
| 2421 | 2421 | ||
| 2422 | (defun imap-parse-flag-list () | 2422 | (defun imap-parse-flag-list () |
| 2423 | (let (flag-list start) | 2423 | (let (flag-list start) |
| 2424 | (assert (eq (char-after) ?\() t "In imap-parse-flag-list") | 2424 | (assert (eq (char-after) ?\() nil "In imap-parse-flag-list") |
| 2425 | (while (and (not (eq (char-after) ?\))) | 2425 | (while (and (not (eq (char-after) ?\))) |
| 2426 | (setq start (progn | 2426 | (setq start (progn |
| 2427 | (imap-forward) | 2427 | (imap-forward) |
| @@ -2430,7 +2430,7 @@ Return nil if no complete line has arrived." | |||
| 2430 | (point))) | 2430 | (point))) |
| 2431 | (> (skip-chars-forward "^ )" (imap-point-at-eol)) 0)) | 2431 | (> (skip-chars-forward "^ )" (imap-point-at-eol)) 0)) |
| 2432 | (push (buffer-substring start (point)) flag-list)) | 2432 | (push (buffer-substring start (point)) flag-list)) |
| 2433 | (assert (eq (char-after) ?\)) t "In imap-parse-flag-list") | 2433 | (assert (eq (char-after) ?\)) nil "In imap-parse-flag-list") |
| 2434 | (imap-forward) | 2434 | (imap-forward) |
| 2435 | (nreverse flag-list))) | 2435 | (nreverse flag-list))) |
| 2436 | 2436 | ||
| @@ -2515,7 +2515,7 @@ Return nil if no complete line has arrived." | |||
| 2515 | (while (eq (char-after) ?\ ) | 2515 | (while (eq (char-after) ?\ ) |
| 2516 | (imap-forward) | 2516 | (imap-forward) |
| 2517 | (push (imap-parse-body-extension) b-e)) | 2517 | (push (imap-parse-body-extension) b-e)) |
| 2518 | (assert (eq (char-after) ?\)) t "In imap-parse-body-extension") | 2518 | (assert (eq (char-after) ?\)) nil "In imap-parse-body-extension") |
| 2519 | (imap-forward) | 2519 | (imap-forward) |
| 2520 | (nreverse b-e)) | 2520 | (nreverse b-e)) |
| 2521 | (or (imap-parse-number) | 2521 | (or (imap-parse-number) |
| @@ -2641,7 +2641,7 @@ Return nil if no complete line has arrived." | |||
| 2641 | (push (and (imap-parse-nil) nil) body)) | 2641 | (push (and (imap-parse-nil) nil) body)) |
| 2642 | (setq body | 2642 | (setq body |
| 2643 | (append (imap-parse-body-ext) body))) ;; body-ext-... | 2643 | (append (imap-parse-body-ext) body))) ;; body-ext-... |
| 2644 | (assert (eq (char-after) ?\)) t "In imap-parse-body") | 2644 | (assert (eq (char-after) ?\)) nil "In imap-parse-body") |
| 2645 | (imap-forward) | 2645 | (imap-forward) |
| 2646 | (nreverse body)) | 2646 | (nreverse body)) |
| 2647 | 2647 | ||
| @@ -2701,7 +2701,7 @@ Return nil if no complete line has arrived." | |||
| 2701 | (push (imap-parse-nstring) body) ;; body-fld-md5 | 2701 | (push (imap-parse-nstring) body) ;; body-fld-md5 |
| 2702 | (setq body (append (imap-parse-body-ext) body))) ;; body-ext-1part.. | 2702 | (setq body (append (imap-parse-body-ext) body))) ;; body-ext-1part.. |
| 2703 | 2703 | ||
| 2704 | (assert (eq (char-after) ?\)) t "In imap-parse-body 2") | 2704 | (assert (eq (char-after) ?\)) nil "In imap-parse-body 2") |
| 2705 | (imap-forward) | 2705 | (imap-forward) |
| 2706 | (nreverse body))))) | 2706 | (nreverse body))))) |
| 2707 | 2707 | ||
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 8e5edbc048a..c9d05d1a0fe 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -1615,11 +1615,11 @@ is used by default." | |||
| 1615 | (if (not header) | 1615 | (if (not header) |
| 1616 | nil | 1616 | nil |
| 1617 | (let ((regexp (format "[%s]+" (or separator ","))) | 1617 | (let ((regexp (format "[%s]+" (or separator ","))) |
| 1618 | (beg (point-min)) | ||
| 1619 | (first t) | 1618 | (first t) |
| 1620 | quoted elems paren) | 1619 | beg quoted elems paren) |
| 1621 | (with-temp-buffer | 1620 | (with-temp-buffer |
| 1622 | (mm-enable-multibyte) | 1621 | (mm-enable-multibyte) |
| 1622 | (setq beg (point-min)) | ||
| 1623 | (insert header) | 1623 | (insert header) |
| 1624 | (goto-char (point-min)) | 1624 | (goto-char (point-min)) |
| 1625 | (while (not (eobp)) | 1625 | (while (not (eobp)) |
| @@ -4399,7 +4399,9 @@ Otherwise, generate and save a value for `canlock-password' first." | |||
| 4399 | nil)))) | 4399 | nil)))) |
| 4400 | ;; Check for control characters. | 4400 | ;; Check for control characters. |
| 4401 | (message-check 'control-chars | 4401 | (message-check 'control-chars |
| 4402 | (if (re-search-forward "[\000-\007\013\015-\032\034-\037\200-\237]" nil t) | 4402 | (if (re-search-forward |
| 4403 | (mm-string-as-multibyte "[\000-\007\013\015-\032\034-\037\200-\237]") | ||
| 4404 | nil t) | ||
| 4403 | (y-or-n-p | 4405 | (y-or-n-p |
| 4404 | "The article contains control characters. Really post? ") | 4406 | "The article contains control characters. Really post? ") |
| 4405 | t)) | 4407 | t)) |
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 1843cf2068d..221e1712611 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el | |||
| @@ -945,8 +945,7 @@ See Info node `(emacs-mime)Composing'. | |||
| 945 | "attachment"))) | 945 | "attachment"))) |
| 946 | (disposition (completing-read "Disposition: " | 946 | (disposition (completing-read "Disposition: " |
| 947 | '(("attachment") ("inline") ("")) | 947 | '(("attachment") ("inline") ("")) |
| 948 | nil | 948 | nil t))) |
| 949 | nil))) | ||
| 950 | (if (not (equal disposition "")) | 949 | (if (not (equal disposition "")) |
| 951 | disposition | 950 | disposition |
| 952 | default))) | 951 | default))) |
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 1b6ec636734..7df5ecae205 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el | |||
| @@ -74,7 +74,15 @@ Integer values will in effect be rounded up to the nearest multiple of | |||
| 74 | (defvar nnheader-read-timeout | 74 | (defvar nnheader-read-timeout |
| 75 | (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin" | 75 | (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin" |
| 76 | (symbol-name system-type)) | 76 | (symbol-name system-type)) |
| 77 | 1.0 ; why? | 77 | ;; http://thread.gmane.org/v9655t3pjo.fsf@marauder.physik.uni-ulm.de |
| 78 | ;; | ||
| 79 | ;; IIRC, values lower than 1.0 didn't/don't work on Windows/DOS. | ||
| 80 | ;; | ||
| 81 | ;; There should probably be a runtime test to determine the timing | ||
| 82 | ;; resolution, or a primitive to report it. I don't know off-hand | ||
| 83 | ;; what's possible. Perhaps better, maybe the Windows/DOS primitive | ||
| 84 | ;; could round up non-zero timeouts to a minimum of 1.0? | ||
| 85 | 1.0 | ||
| 78 | 0.1) | 86 | 0.1) |
| 79 | "How long nntp should wait between checking for the end of output. | 87 | "How long nntp should wait between checking for the end of output. |
| 80 | Shorter values mean quicker response, but are more CPU intensive.") | 88 | Shorter values mean quicker response, but are more CPU intensive.") |
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index 567ab24e004..e288f6cace2 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el | |||
| @@ -37,25 +37,56 @@ | |||
| 37 | 37 | ||
| 38 | (require 'mail-utils) | 38 | (require 'mail-utils) |
| 39 | 39 | ||
| 40 | (defvar pop3-maildrop (or (user-login-name) (getenv "LOGNAME") (getenv "USER") nil) | 40 | (defgroup pop3 nil |
| 41 | "*POP3 maildrop.") | 41 | "Post Office Protocol" |
| 42 | (defvar pop3-mailhost (or (getenv "MAILHOST") nil) | 42 | :group 'mail |
| 43 | "*POP3 mailhost.") | 43 | :group 'mail-source) |
| 44 | (defvar pop3-port 110 | 44 | |
| 45 | "*POP3 port.") | 45 | (defcustom pop3-maildrop (or (user-login-name) |
| 46 | 46 | (getenv "LOGNAME") | |
| 47 | (defvar pop3-password-required t | 47 | (getenv "USER")) |
| 48 | "*Non-nil if a password is required when connecting to POP server.") | 48 | "*POP3 maildrop." |
| 49 | :version "21.4" ;; Oort Gnus | ||
| 50 | :type 'string | ||
| 51 | :group 'pop3) | ||
| 52 | |||
| 53 | (defcustom pop3-mailhost (or (getenv "MAILHOST") ;; nil -> mismatch | ||
| 54 | "pop3") | ||
| 55 | "*POP3 mailhost." | ||
| 56 | :version "21.4" ;; Oort Gnus | ||
| 57 | :type 'string | ||
| 58 | :group 'pop3) | ||
| 59 | |||
| 60 | (defcustom pop3-port 110 | ||
| 61 | "*POP3 port." | ||
| 62 | :version "21.4" ;; Oort Gnus | ||
| 63 | :type 'number | ||
| 64 | :group 'pop3) | ||
| 65 | |||
| 66 | (defcustom pop3-password-required t | ||
| 67 | "*Non-nil if a password is required when connecting to POP server." | ||
| 68 | :version "21.4" ;; Oort Gnus | ||
| 69 | :type 'boolean | ||
| 70 | :group 'pop3) | ||
| 71 | |||
| 72 | ;; Should this be customizable? | ||
| 49 | (defvar pop3-password nil | 73 | (defvar pop3-password nil |
| 50 | "*Password to use when connecting to POP server.") | 74 | "*Password to use when connecting to POP server.") |
| 51 | 75 | ||
| 52 | (defvar pop3-authentication-scheme 'pass | 76 | (defcustom pop3-authentication-scheme 'pass |
| 53 | "*POP3 authentication scheme. | 77 | "*POP3 authentication scheme. |
| 54 | Defaults to 'pass, for the standard USER/PASS authentication. Other valid | 78 | Defaults to 'pass, for the standard USER/PASS authentication. Other valid |
| 55 | values are 'apop.") | 79 | values are 'apop." |
| 56 | 80 | :version "21.4" ;; Oort Gnus | |
| 57 | (defvar pop3-leave-mail-on-server nil | 81 | :type '(choice (const :tag "USER/PASS" pass) |
| 58 | "*Non-nil if the mail is to be left on the POP server after fetching.") | 82 | (const :tag "APOP" apop)) |
| 83 | :group 'pop3) | ||
| 84 | |||
| 85 | (defcustom pop3-leave-mail-on-server nil | ||
| 86 | "*Non-nil if the mail is to be left on the POP server after fetching." | ||
| 87 | :version "21.4" ;; Oort Gnus | ||
| 88 | :type 'boolean | ||
| 89 | :group 'pop3) | ||
| 59 | 90 | ||
| 60 | (defvar pop3-timestamp nil | 91 | (defvar pop3-timestamp nil |
| 61 | "Timestamp returned when initially connected to the POP server. | 92 | "Timestamp returned when initially connected to the POP server. |
| @@ -71,8 +102,7 @@ Used for APOP authentication.") | |||
| 71 | (crashbuf (get-buffer-create " *pop3-retr*")) | 102 | (crashbuf (get-buffer-create " *pop3-retr*")) |
| 72 | (n 1) | 103 | (n 1) |
| 73 | message-count | 104 | message-count |
| 74 | (pop3-password pop3-password) | 105 | (pop3-password pop3-password)) |
| 75 | ) | ||
| 76 | ;; for debugging only | 106 | ;; for debugging only |
| 77 | (if pop3-debug (switch-to-buffer (process-buffer process))) | 107 | (if pop3-debug (switch-to-buffer (process-buffer process))) |
| 78 | ;; query for password | 108 | ;; query for password |
| @@ -114,8 +144,7 @@ Used for APOP authentication.") | |||
| 114 | "Return the number of messages in the maildrop." | 144 | "Return the number of messages in the maildrop." |
| 115 | (let* ((process (pop3-open-server pop3-mailhost pop3-port)) | 145 | (let* ((process (pop3-open-server pop3-mailhost pop3-port)) |
| 116 | message-count | 146 | message-count |
| 117 | (pop3-password pop3-password) | 147 | (pop3-password pop3-password)) |
| 118 | ) | ||
| 119 | ;; for debugging only | 148 | ;; for debugging only |
| 120 | (if pop3-debug (switch-to-buffer (process-buffer process))) | 149 | (if pop3-debug (switch-to-buffer (process-buffer process))) |
| 121 | ;; query for password | 150 | ;; query for password |
| @@ -159,15 +188,14 @@ Returns the process associated with the connection." | |||
| 159 | (insert output))) | 188 | (insert output))) |
| 160 | 189 | ||
| 161 | (defun pop3-send-command (process command) | 190 | (defun pop3-send-command (process command) |
| 162 | (set-buffer (process-buffer process)) | 191 | (set-buffer (process-buffer process)) |
| 163 | (goto-char (point-max)) | 192 | (goto-char (point-max)) |
| 164 | ;; (if (= (aref command 0) ?P) | 193 | ;; (if (= (aref command 0) ?P) |
| 165 | ;; (insert "PASS <omitted>\r\n") | 194 | ;; (insert "PASS <omitted>\r\n") |
| 166 | ;; (insert command "\r\n")) | 195 | ;; (insert command "\r\n")) |
| 167 | (setq pop3-read-point (point)) | 196 | (setq pop3-read-point (point)) |
| 168 | (goto-char (point-max)) | 197 | (goto-char (point-max)) |
| 169 | (process-send-string process (concat command "\r\n")) | 198 | (process-send-string process (concat command "\r\n"))) |
| 170 | ) | ||
| 171 | 199 | ||
| 172 | (defun pop3-read-response (process &optional return) | 200 | (defun pop3-read-response (process &optional return) |
| 173 | "Read the response from the server. | 201 | "Read the response from the server. |
| @@ -355,27 +383,15 @@ This function currently does nothing.") | |||
| 355 | (while (not (re-search-forward "^\\.\r\n" nil t)) | 383 | (while (not (re-search-forward "^\\.\r\n" nil t)) |
| 356 | ;; Fixme: Shouldn't depend on nnheader. | 384 | ;; Fixme: Shouldn't depend on nnheader. |
| 357 | (nnheader-accept-process-output process) | 385 | (nnheader-accept-process-output process) |
| 358 | ;; bill@att.com ... to save wear and tear on the heap | ||
| 359 | ;; uncommented because the condensed version below is a problem for | ||
| 360 | ;; some. | ||
| 361 | (if (> (buffer-size) 20000) (sleep-for 1)) | ||
| 362 | (if (> (buffer-size) 50000) (sleep-for 1)) | ||
| 363 | (if (> (buffer-size) 100000) (sleep-for 1)) | ||
| 364 | (if (> (buffer-size) 200000) (sleep-for 1)) | ||
| 365 | (if (> (buffer-size) 500000) (sleep-for 1)) | ||
| 366 | ;; bill@att.com | ||
| 367 | ;; condensed into: | ||
| 368 | ;; (sometimes causes problems for really large messages.) | ||
| 369 | ; (if (> (buffer-size) 20000) (sleep-for (/ (buffer-size) 20000))) | ||
| 370 | (goto-char start)) | 386 | (goto-char start)) |
| 371 | (setq pop3-read-point (point-marker)) | 387 | (setq pop3-read-point (point-marker)) |
| 372 | ;; this code does not seem to work for some POP servers... | 388 | ;; this code does not seem to work for some POP servers... |
| 373 | ;; and I cannot figure out why not. | 389 | ;; and I cannot figure out why not. |
| 374 | ; (goto-char (match-beginning 0)) | 390 | ;; (goto-char (match-beginning 0)) |
| 375 | ; (backward-char 2) | 391 | ;; (backward-char 2) |
| 376 | ; (if (not (looking-at "\r\n")) | 392 | ;; (if (not (looking-at "\r\n")) |
| 377 | ; (insert "\r\n")) | 393 | ;; (insert "\r\n")) |
| 378 | ; (re-search-forward "\\.\r\n") | 394 | ;; (re-search-forward "\\.\r\n") |
| 379 | (goto-char (match-beginning 0)) | 395 | (goto-char (match-beginning 0)) |
| 380 | (setq end (point-marker)) | 396 | (setq end (point-marker)) |
| 381 | (pop3-clean-region start end) | 397 | (pop3-clean-region start end) |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index d193ad344f5..57b0b39767e 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -552,9 +552,15 @@ it is displayed along with the global value." | |||
| 552 | (forward-line 1) | 552 | (forward-line 1) |
| 553 | (forward-sexp 1) | 553 | (forward-sexp 1) |
| 554 | (delete-region (point) (progn (end-of-line) (point))) | 554 | (delete-region (point) (progn (end-of-line) (point))) |
| 555 | (insert " value is shown below.\n\n") | ||
| 556 | (save-excursion | 555 | (save-excursion |
| 557 | (insert "\n\nValue:")))) | 556 | (insert "\n\nValue:") |
| 557 | (set (make-local-variable 'help-button-cache) | ||
| 558 | (point-marker))) | ||
| 559 | (insert " value is shown ") | ||
| 560 | (insert-button "below" | ||
| 561 | 'action help-button-cache | ||
| 562 | 'help-echo "mouse-2, RET: show value") | ||
| 563 | (insert ".\n\n"))) | ||
| 558 | ;; Add a note for variables that have been make-var-buffer-local. | 564 | ;; Add a note for variables that have been make-var-buffer-local. |
| 559 | (when (and (local-variable-if-set-p variable) | 565 | (when (and (local-variable-if-set-p variable) |
| 560 | (or (not (local-variable-p variable)) | 566 | (or (not (local-variable-p variable)) |
diff --git a/lisp/help.el b/lisp/help.el index bf0df4358a7..5a2867bdc18 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -111,6 +111,9 @@ | |||
| 111 | 111 | ||
| 112 | (define-key help-map "q" 'help-quit) | 112 | (define-key help-map "q" 'help-quit) |
| 113 | 113 | ||
| 114 | ;; insert-button makes the action nil if it is not store somewhere | ||
| 115 | (defvar help-button-cache nil) | ||
| 116 | |||
| 114 | 117 | ||
| 115 | (defun help-quit () | 118 | (defun help-quit () |
| 116 | "Just exit from the Help command's command loop." | 119 | "Just exit from the Help command's command loop." |
| @@ -655,32 +658,42 @@ whose documentation describes the minor mode." | |||
| 655 | (lambda (a b) (string-lessp (car a) (car b))))) | 658 | (lambda (a b) (string-lessp (car a) (car b))))) |
| 656 | (when minor-modes | 659 | (when minor-modes |
| 657 | (princ "Summary of minor modes:\n") | 660 | (princ "Summary of minor modes:\n") |
| 658 | (dolist (mode minor-modes) | 661 | (make-local-variable 'help-button-cache) |
| 659 | (let ((pretty-minor-mode (nth 0 mode)) | 662 | (with-current-buffer standard-output |
| 660 | (indicator (nth 2 mode))) | 663 | (dolist (mode minor-modes) |
| 661 | (princ (format " %s minor mode (%s):\n" | 664 | (let ((pretty-minor-mode (nth 0 mode)) |
| 662 | pretty-minor-mode | 665 | (mode-function (nth 1 mode)) |
| 663 | (if indicator | 666 | (indicator (nth 2 mode))) |
| 664 | (format "indicator%s" indicator) | 667 | (add-text-properties 0 (length pretty-minor-mode) |
| 665 | "no indicator"))))) | 668 | '(face bold) pretty-minor-mode) |
| 669 | (save-excursion | ||
| 670 | (goto-char (point-max)) | ||
| 671 | (princ "\n\f\n") | ||
| 672 | (push (point-marker) help-button-cache) | ||
| 673 | ;; Document the minor modes fully. | ||
| 674 | (insert pretty-minor-mode) | ||
| 675 | (princ (format " minor mode (%s):\n" | ||
| 676 | (if indicator | ||
| 677 | (format "indicator%s" indicator) | ||
| 678 | "no indicator"))) | ||
| 679 | (princ (documentation mode-function))) | ||
| 680 | (princ " ") | ||
| 681 | (insert-button pretty-minor-mode | ||
| 682 | 'action (car help-button-cache) | ||
| 683 | 'help-echo "mouse-2, RET: show full information") | ||
| 684 | (princ (format " minor mode (%s):\n" | ||
| 685 | (if indicator | ||
| 686 | (format "indicator%s" indicator) | ||
| 687 | "no indicator")))))) | ||
| 666 | (princ "\n(Full information about these minor modes | 688 | (princ "\n(Full information about these minor modes |
| 667 | follows the description of the major mode.)\n\n")) | 689 | follows the description of the major mode.)\n\n")) |
| 668 | ;; Document the major mode. | 690 | ;; Document the major mode. |
| 669 | (princ mode-name) | 691 | (let ((mode mode-name)) |
| 692 | (with-current-buffer standard-output | ||
| 693 | (insert mode) | ||
| 694 | (add-text-properties (- (point) (length mode)) (point) '(face bold)))) | ||
| 670 | (princ " mode:\n") | 695 | (princ " mode:\n") |
| 671 | (princ (documentation major-mode)) | 696 | (princ (documentation major-mode))) |
| 672 | ;; Document the minor modes fully. | ||
| 673 | (dolist (mode minor-modes) | ||
| 674 | (let ((pretty-minor-mode (nth 0 mode)) | ||
| 675 | (mode-function (nth 1 mode)) | ||
| 676 | (indicator (nth 2 mode))) | ||
| 677 | (princ "\n\f\n") | ||
| 678 | (princ (format "%s minor mode (%s):\n" | ||
| 679 | pretty-minor-mode | ||
| 680 | (if indicator | ||
| 681 | (format "indicator%s" indicator) | ||
| 682 | "no indicator"))) | ||
| 683 | (princ (documentation mode-function))))) | ||
| 684 | (print-help-return-message)))) | 697 | (print-help-return-message)))) |
| 685 | 698 | ||
| 686 | 699 | ||
diff --git a/lisp/imenu.el b/lisp/imenu.el index 1c82fcacf34..6859c0c74c7 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el | |||
| @@ -317,9 +317,12 @@ The function in this variable is called when selecting a normal index-item.") | |||
| 317 | ;;;; | 317 | ;;;; |
| 318 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 318 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 319 | 319 | ||
| 320 | ;; Return the current/previous sexp and the location of the sexp (its | 320 | ;; FIXME: This is the only imenu-example-* definition that's actually used, |
| 321 | ;; beginning) without moving the point. | 321 | ;; and it seems to only be used by cperl-mode.el. We should just move it to |
| 322 | ;; cperl-mode.el and remove the rest. | ||
| 322 | (defun imenu-example--name-and-position () | 323 | (defun imenu-example--name-and-position () |
| 324 | "Return the current/previous sexp and its (beginning) location. | ||
| 325 | Don't move point." | ||
| 323 | (save-excursion | 326 | (save-excursion |
| 324 | (forward-sexp -1) | 327 | (forward-sexp -1) |
| 325 | ;; [ydi] modified for imenu-use-markers | 328 | ;; [ydi] modified for imenu-use-markers |
| @@ -549,12 +552,10 @@ A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).") | |||
| 549 | (cond | 552 | (cond |
| 550 | ((consp (cdr item)) | 553 | ((consp (cdr item)) |
| 551 | (imenu--truncate-items (cdr item))) | 554 | (imenu--truncate-items (cdr item))) |
| 552 | (t | 555 | ;; truncate if necessary |
| 553 | ;; truncate if necessary | 556 | ((and (numberp imenu-max-item-length) |
| 554 | (if (and (numberp imenu-max-item-length) | 557 | (> (length (car item)) imenu-max-item-length)) |
| 555 | (> (length (car item)) imenu-max-item-length)) | 558 | (setcar item (substring (car item) 0 imenu-max-item-length)))))) |
| 556 | (setcar item (substring (car item) 0 | ||
| 557 | imenu-max-item-length))))))) | ||
| 558 | menulist)) | 559 | menulist)) |
| 559 | 560 | ||
| 560 | 561 | ||
| @@ -854,7 +855,7 @@ depending on PATTERNS." | |||
| 854 | (defun imenu--completion-buffer (index-alist &optional prompt) | 855 | (defun imenu--completion-buffer (index-alist &optional prompt) |
| 855 | "Let the user select from INDEX-ALIST in a completion buffer with PROMPT. | 856 | "Let the user select from INDEX-ALIST in a completion buffer with PROMPT. |
| 856 | 857 | ||
| 857 | Returns t for rescan and otherwise a position number." | 858 | Return one of the entries in index-alist or nil." |
| 858 | ;; Create a list for this buffer only when needed. | 859 | ;; Create a list for this buffer only when needed. |
| 859 | (let ((name (thing-at-point 'symbol)) | 860 | (let ((name (thing-at-point 'symbol)) |
| 860 | choice | 861 | choice |
| @@ -880,13 +881,11 @@ Returns t for rescan and otherwise a position number." | |||
| 880 | prepared-index-alist | 881 | prepared-index-alist |
| 881 | nil t nil 'imenu--history-list name))) | 882 | nil t nil 'imenu--history-list name))) |
| 882 | 883 | ||
| 883 | (cond ((not (stringp name)) nil) | 884 | (when (stringp name) |
| 884 | ((string= name (car imenu--rescan-item)) t) | 885 | (setq choice (assoc name prepared-index-alist)) |
| 885 | (t | 886 | (if (imenu--subalist-p choice) |
| 886 | (setq choice (assoc name prepared-index-alist)) | 887 | (imenu--completion-buffer (cdr choice) prompt) |
| 887 | (if (imenu--subalist-p choice) | 888 | choice)))) |
| 888 | (imenu--completion-buffer (cdr choice) prompt) | ||
| 889 | choice))))) | ||
| 890 | 889 | ||
| 891 | (defun imenu--mouse-menu (index-alist event &optional title) | 890 | (defun imenu--mouse-menu (index-alist event &optional title) |
| 892 | "Let the user select from a buffer index from a mouse menu. | 891 | "Let the user select from a buffer index from a mouse menu. |
| @@ -937,9 +936,9 @@ The returned value is of the form (INDEX-NAME . INDEX-POSITION)." | |||
| 937 | (or (eq imenu-use-popup-menu t) mouse-triggered)) | 936 | (or (eq imenu-use-popup-menu t) mouse-triggered)) |
| 938 | (imenu--mouse-menu index-alist last-nonmenu-event) | 937 | (imenu--mouse-menu index-alist last-nonmenu-event) |
| 939 | (imenu--completion-buffer index-alist prompt))) | 938 | (imenu--completion-buffer index-alist prompt))) |
| 940 | (and (eq result t) | 939 | (and (equal result imenu--rescan-item) |
| 941 | (imenu--cleanup) | 940 | (imenu--cleanup) |
| 942 | (setq imenu--index-alist nil))) | 941 | (setq result t imenu--index-alist nil))) |
| 943 | result)) | 942 | result)) |
| 944 | 943 | ||
| 945 | ;;;###autoload | 944 | ;;;###autoload |
| @@ -1014,7 +1013,7 @@ A trivial interface to `imenu-add-to-menubar' suitable for use in a hook." | |||
| 1014 | nil)) | 1013 | nil)) |
| 1015 | 1014 | ||
| 1016 | (defun imenu-default-goto-function (name position &optional rest) | 1015 | (defun imenu-default-goto-function (name position &optional rest) |
| 1017 | "Move the point to the given position. | 1016 | "Move to the given position. |
| 1018 | 1017 | ||
| 1019 | NAME is ignored. POSITION is where to move. REST is also ignored. | 1018 | NAME is ignored. POSITION is where to move. REST is also ignored. |
| 1020 | The ignored args just make this function have the same interface as a | 1019 | The ignored args just make this function have the same interface as a |
| @@ -1054,5 +1053,5 @@ for more information." | |||
| 1054 | 1053 | ||
| 1055 | (provide 'imenu) | 1054 | (provide 'imenu) |
| 1056 | 1055 | ||
| 1057 | ;;; arch-tag: 98a2f5f5-4b91-4704-b18c-3aacf77d77a7 | 1056 | ;; arch-tag: 98a2f5f5-4b91-4704-b18c-3aacf77d77a7 |
| 1058 | ;;; imenu.el ends here | 1057 | ;;; imenu.el ends here |
diff --git a/lisp/info-look.el b/lisp/info-look.el index 644ee3d6c20..3f3ea7c2fd4 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el | |||
| @@ -245,6 +245,7 @@ system." | |||
| 245 | (interactive) | 245 | (interactive) |
| 246 | (setq info-lookup-cache nil)) | 246 | (setq info-lookup-cache nil)) |
| 247 | 247 | ||
| 248 | ;;;###autoload (put 'info-lookup-symbol 'info-file "emacs") | ||
| 248 | ;;;###autoload | 249 | ;;;###autoload |
| 249 | (defun info-lookup-symbol (symbol &optional mode) | 250 | (defun info-lookup-symbol (symbol &optional mode) |
| 250 | "Display the definition of SYMBOL, as found in the relevant manual. | 251 | "Display the definition of SYMBOL, as found in the relevant manual. |
| @@ -258,6 +259,7 @@ With prefix arg a query for the symbol help mode is offered." | |||
| 258 | (info-lookup-interactive-arguments 'symbol current-prefix-arg)) | 259 | (info-lookup-interactive-arguments 'symbol current-prefix-arg)) |
| 259 | (info-lookup 'symbol symbol mode)) | 260 | (info-lookup 'symbol symbol mode)) |
| 260 | 261 | ||
| 262 | ;;;###autoload (put 'info-lookup-file 'info-file "emacs") | ||
| 261 | ;;;###autoload | 263 | ;;;###autoload |
| 262 | (defun info-lookup-file (file &optional mode) | 264 | (defun info-lookup-file (file &optional mode) |
| 263 | "Display the documentation of a file. | 265 | "Display the documentation of a file. |
diff --git a/lisp/info.el b/lisp/info.el index b779bb41ca6..386f5b612ec 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -79,8 +79,8 @@ The Lisp code is executed when the node is selected.") | |||
| 79 | :group 'info) | 79 | :group 'info) |
| 80 | 80 | ||
| 81 | (defface info-xref | 81 | (defface info-xref |
| 82 | '((((class color) (background light)) :foreground "blue") | 82 | '((((class color) (background light)) :foreground "blue" :underline t) |
| 83 | (((class color) (background dark)) :foreground "cyan") | 83 | (((class color) (background dark)) :foreground "cyan" :underline t) |
| 84 | (t :underline t)) | 84 | (t :underline t)) |
| 85 | "Face for Info cross-references." | 85 | "Face for Info cross-references." |
| 86 | :group 'info) | 86 | :group 'info) |
| @@ -455,6 +455,7 @@ Do the right thing if the file has been compressed or zipped." | |||
| 455 | 455 | ||
| 456 | ;;;###autoload (add-hook 'same-window-regexps "\\*info\\*\\(\\|<[0-9]+>\\)") | 456 | ;;;###autoload (add-hook 'same-window-regexps "\\*info\\*\\(\\|<[0-9]+>\\)") |
| 457 | 457 | ||
| 458 | ;;;###autoload (put 'info 'info-file "emacs") | ||
| 458 | ;;;###autoload | 459 | ;;;###autoload |
| 459 | (defun info (&optional file buffer) | 460 | (defun info (&optional file buffer) |
| 460 | "Enter Info, the documentation browser. | 461 | "Enter Info, the documentation browser. |
| @@ -1729,7 +1730,7 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 1729 | (let ((inhibit-read-only t)) | 1730 | (let ((inhibit-read-only t)) |
| 1730 | (erase-buffer) | 1731 | (erase-buffer) |
| 1731 | (goto-char (point-min)) | 1732 | (goto-char (point-min)) |
| 1732 | (insert "\n\^_\nFile: history Node: Top, Up: (dir)\n\n") | 1733 | (insert "\n\^_\nFile: history, Node: Top, Up: (dir)\n\n") |
| 1733 | (insert "Recently Visited Nodes\n**********************\n\n") | 1734 | (insert "Recently Visited Nodes\n**********************\n\n") |
| 1734 | (insert "* Menu:\n\n") | 1735 | (insert "* Menu:\n\n") |
| 1735 | (let ((hl (delete '("history" "Top") Info-history-list))) | 1736 | (let ((hl (delete '("history" "Top") Info-history-list))) |
| @@ -1749,26 +1750,31 @@ If SAME-FILE is non-nil, do not move to a different Info file." | |||
| 1749 | "Go to a node with table of contents of the current Info file. | 1750 | "Go to a node with table of contents of the current Info file. |
| 1750 | Table of contents is created from the tree structure of menus." | 1751 | Table of contents is created from the tree structure of menus." |
| 1751 | (interactive) | 1752 | (interactive) |
| 1752 | (let ((curr-file Info-current-file) | 1753 | (let ((curr-file (substring-no-properties Info-current-file)) |
| 1753 | (curr-node Info-current-node) | 1754 | (curr-node (substring-no-properties Info-current-node)) |
| 1754 | p) | 1755 | p) |
| 1755 | (with-current-buffer (get-buffer-create " *info-toc*") | 1756 | (with-current-buffer (get-buffer-create " *info-toc*") |
| 1756 | (let ((inhibit-read-only t) | 1757 | (let ((inhibit-read-only t) |
| 1757 | (node-list (Info-build-toc curr-file))) | 1758 | (node-list (Info-build-toc curr-file))) |
| 1758 | (erase-buffer) | 1759 | (erase-buffer) |
| 1759 | (goto-char (point-min)) | 1760 | (goto-char (point-min)) |
| 1760 | (insert "\n\^_\nFile: toc Node: Top, Up: (dir)\n\n") | 1761 | (insert "\n\^_\nFile: toc, Node: Top, Up: (dir)\n\n") |
| 1761 | (insert "Table of Contents\n*****************\n\n") | 1762 | (insert "Table of Contents\n*****************\n\n") |
| 1762 | (insert "*Note Top::\n") | 1763 | (insert "*Note Top: (" curr-file ")Top.\n") |
| 1763 | (Info-insert-toc | 1764 | (Info-insert-toc |
| 1764 | (nth 2 (assoc "Top" node-list)) ; get Top nodes | 1765 | (nth 2 (assoc "Top" node-list)) ; get Top nodes |
| 1765 | node-list 0 (substring-no-properties curr-file))) | 1766 | node-list 0 curr-file)) |
| 1766 | (if (not (bobp)) | 1767 | (if (not (bobp)) |
| 1767 | (let ((Info-hide-note-references 'hide) | 1768 | (let ((Info-hide-note-references 'hide) |
| 1768 | (Info-fontify-visited-nodes nil)) | 1769 | (Info-fontify-visited-nodes nil)) |
| 1769 | (Info-mode) | 1770 | (Info-mode) |
| 1770 | (setq Info-current-file "toc" Info-current-node "Top") | 1771 | (setq Info-current-file "toc" Info-current-node "Top") |
| 1771 | (Info-fontify-node))) | 1772 | (goto-char (point-min)) |
| 1773 | (narrow-to-region (or (re-search-forward "\n[\^_\f]\n" nil t) | ||
| 1774 | (point-min)) | ||
| 1775 | (point-max)) | ||
| 1776 | (Info-fontify-node) | ||
| 1777 | (widen))) | ||
| 1772 | (goto-char (point-min)) | 1778 | (goto-char (point-min)) |
| 1773 | (if (setq p (search-forward (concat "*Note " curr-node ":") nil t)) | 1779 | (if (setq p (search-forward (concat "*Note " curr-node ":") nil t)) |
| 1774 | (setq p (- p (length curr-node) 2)))) | 1780 | (setq p (- p (length curr-node) 2)))) |
| @@ -1789,14 +1795,12 @@ Table of contents is created from the tree structure of menus." | |||
| 1789 | 1795 | ||
| 1790 | (defun Info-build-toc (file) | 1796 | (defun Info-build-toc (file) |
| 1791 | "Build table of contents from menus of Info FILE and its subfiles." | 1797 | "Build table of contents from menus of Info FILE and its subfiles." |
| 1792 | (if (equal file "dir") | ||
| 1793 | (error "Table of contents for Info directory is not supported yet")) | ||
| 1794 | (with-temp-buffer | 1798 | (with-temp-buffer |
| 1795 | (let* ((default-directory (or (and (stringp file) | 1799 | (let* ((file (and (stringp file) (Info-find-file file))) |
| 1796 | (file-name-directory | 1800 | (default-directory (or (and (stringp file) |
| 1797 | (setq file (Info-find-file file)))) | 1801 | (file-name-directory file)) |
| 1798 | default-directory)) | 1802 | default-directory)) |
| 1799 | (main-file file) | 1803 | (main-file (and (stringp file) file)) |
| 1800 | (sections '(("Top" "Top"))) | 1804 | (sections '(("Top" "Top"))) |
| 1801 | nodes subfiles) | 1805 | nodes subfiles) |
| 1802 | (while (or main-file subfiles) | 1806 | (while (or main-file subfiles) |
| @@ -3258,6 +3262,7 @@ The locations are of the format used in `Info-history', i.e. | |||
| 3258 | (car elt) | 3262 | (car elt) |
| 3259 | elt)) | 3263 | elt)) |
| 3260 | (file (if (consp elt) (cdr elt) elt)) | 3264 | (file (if (consp elt) (cdr elt) elt)) |
| 3265 | (case-fold-search nil) | ||
| 3261 | (regexp (concat "\\`" (regexp-quote name) | 3266 | (regexp (concat "\\`" (regexp-quote name) |
| 3262 | "\\(\\'\\|-\\)"))) | 3267 | "\\(\\'\\|-\\)"))) |
| 3263 | (if (string-match regexp (symbol-name command)) | 3268 | (if (string-match regexp (symbol-name command)) |
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 6fc3477fd34..2199420fd3c 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -870,6 +870,18 @@ like `mime-charset' as well as the current style like `:mime-charset'." | |||
| 870 | (and (not (> (downcase c1) (downcase c2))) | 870 | (and (not (> (downcase c1) (downcase c2))) |
| 871 | (< c1 c2))))))) | 871 | (< c1 c2))))))) |
| 872 | 872 | ||
| 873 | (defun coding-system-equal (coding-system-1 coding-system-2) | ||
| 874 | "Return t if and only if CODING-SYSTEM-1 and CODING-SYSTEM-2 are identical. | ||
| 875 | Two coding systems are identical if two symbols are equal | ||
| 876 | or one is an alias of the other." | ||
| 877 | (or (eq coding-system-1 coding-system-2) | ||
| 878 | (and (equal (coding-system-spec coding-system-1) | ||
| 879 | (coding-system-spec coding-system-2)) | ||
| 880 | (let ((eol-type-1 (coding-system-eol-type coding-system-1)) | ||
| 881 | (eol-type-2 (coding-system-eol-type coding-system-2))) | ||
| 882 | (or (eq eol-type-1 eol-type-2) | ||
| 883 | (and (vectorp eol-type-1) (vectorp eol-type-2))))))) | ||
| 884 | |||
| 873 | (defun add-to-coding-system-list (coding-system) | 885 | (defun add-to-coding-system-list (coding-system) |
| 874 | "Add CODING-SYSTEM to `coding-system-list' while keeping it sorted." | 886 | "Add CODING-SYSTEM to `coding-system-list' while keeping it sorted." |
| 875 | (if (or (null coding-system-list) | 887 | (if (or (null coding-system-list) |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 1e8e0f6586e..0d1d7e32cde 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -676,16 +676,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." | |||
| 676 | (if isearch-small-window | 676 | (if isearch-small-window |
| 677 | (goto-char found-point) | 677 | (goto-char found-point) |
| 678 | ;; Exiting the save-window-excursion clobbers window-start; restore it. | 678 | ;; Exiting the save-window-excursion clobbers window-start; restore it. |
| 679 | (set-window-start (selected-window) found-start t)) | 679 | (set-window-start (selected-window) found-start t))) |
| 680 | |||
| 681 | ;; If there was movement, mark the starting position. | ||
| 682 | ;; Maybe should test difference between and set mark iff > threshold. | ||
| 683 | (if (/= (point) isearch-opoint) | ||
| 684 | (or (and transient-mark-mode mark-active) | ||
| 685 | (progn | ||
| 686 | (push-mark isearch-opoint t) | ||
| 687 | (or executing-kbd-macro (> (minibuffer-depth) 0) | ||
| 688 | (message "Mark saved where search started")))))) | ||
| 689 | 680 | ||
| 690 | (setq isearch-mode nil) | 681 | (setq isearch-mode nil) |
| 691 | (if isearch-input-method-local-p | 682 | (if isearch-input-method-local-p |
| @@ -710,6 +701,16 @@ is treated as a regexp. See \\[isearch-forward] for more info." | |||
| 710 | (isearch-update-ring isearch-string isearch-regexp)) | 701 | (isearch-update-ring isearch-string isearch-regexp)) |
| 711 | 702 | ||
| 712 | (run-hooks 'isearch-mode-end-hook) | 703 | (run-hooks 'isearch-mode-end-hook) |
| 704 | |||
| 705 | ;; If there was movement, mark the starting position. | ||
| 706 | ;; Maybe should test difference between and set mark iff > threshold. | ||
| 707 | (if (/= (point) isearch-opoint) | ||
| 708 | (or (and transient-mark-mode mark-active) | ||
| 709 | (progn | ||
| 710 | (push-mark isearch-opoint t) | ||
| 711 | (or executing-kbd-macro (> (minibuffer-depth) 0) | ||
| 712 | (message "Mark saved where search started"))))) | ||
| 713 | |||
| 713 | (and (not edit) isearch-recursive-edit (exit-recursive-edit))) | 714 | (and (not edit) isearch-recursive-edit (exit-recursive-edit))) |
| 714 | 715 | ||
| 715 | (defun isearch-update-ring (string &optional regexp) | 716 | (defun isearch-update-ring (string &optional regexp) |
| @@ -1249,8 +1250,8 @@ might return the position of the end of the line." | |||
| 1249 | (defun isearch-yank-line () | 1250 | (defun isearch-yank-line () |
| 1250 | "Pull rest of line from buffer into search string." | 1251 | "Pull rest of line from buffer into search string." |
| 1251 | (interactive) | 1252 | (interactive) |
| 1252 | (isearch-yank-internal 'line-end-position)) | 1253 | (isearch-yank-internal |
| 1253 | 1254 | (lambda () (line-end-position (if (eolp) 2 1))))) | |
| 1254 | 1255 | ||
| 1255 | (defun isearch-search-and-update () | 1256 | (defun isearch-search-and-update () |
| 1256 | ;; Do the search and update the display. | 1257 | ;; Do the search and update the display. |
diff --git a/lisp/kmacro.el b/lisp/kmacro.el index b2226d4a895..2b4cbcaf323 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el | |||
| @@ -248,7 +248,9 @@ macro to be executed before appending to it." | |||
| 248 | "Insert macro counter and increment with ARG or 1 if missing. | 248 | "Insert macro counter and increment with ARG or 1 if missing. |
| 249 | With \\[universal-argument], insert previous kmacro-counter (but do not modify counter)." | 249 | With \\[universal-argument], insert previous kmacro-counter (but do not modify counter)." |
| 250 | (interactive "P") | 250 | (interactive "P") |
| 251 | (setq kmacro-initial-counter-value nil) | 251 | (if kmacro-initial-counter-value |
| 252 | (setq kmacro-counter kmacro-initial-counter-value | ||
| 253 | kmacro-initial-counter-value nil)) | ||
| 252 | (if (and arg (listp arg)) | 254 | (if (and arg (listp arg)) |
| 253 | (insert (format kmacro-counter-format kmacro-last-counter)) | 255 | (insert (format kmacro-counter-format kmacro-last-counter)) |
| 254 | (insert (format kmacro-counter-format kmacro-counter)) | 256 | (insert (format kmacro-counter-format kmacro-counter)) |
| @@ -275,23 +277,23 @@ With \\[universal-argument], insert previous kmacro-counter (but do not modify c | |||
| 275 | "Set kmacro-counter to ARG or prompt if missing. | 277 | "Set kmacro-counter to ARG or prompt if missing. |
| 276 | With \\[universal-argument] prefix, reset counter to its value prior to this iteration of the macro." | 278 | With \\[universal-argument] prefix, reset counter to its value prior to this iteration of the macro." |
| 277 | (interactive "NMacro counter value: ") | 279 | (interactive "NMacro counter value: ") |
| 278 | (setq kmacro-last-counter kmacro-counter | 280 | (if (not (or defining-kbd-macro executing-kbd-macro)) |
| 279 | kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) | 281 | (kmacro-display-counter (setq kmacro-initial-counter-value arg)) |
| 280 | kmacro-counter-value-start | 282 | (setq kmacro-last-counter kmacro-counter |
| 281 | arg)) | 283 | kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) |
| 282 | ;; setup initial macro counter value if we are not executing a macro. | 284 | kmacro-counter-value-start |
| 283 | (setq kmacro-initial-counter-value | 285 | arg)) |
| 284 | (and (not (or defining-kbd-macro executing-kbd-macro)) | 286 | (unless executing-kbd-macro |
| 285 | kmacro-counter)) | 287 | (kmacro-display-counter)))) |
| 286 | (unless executing-kbd-macro | ||
| 287 | (kmacro-display-counter))) | ||
| 288 | 288 | ||
| 289 | 289 | ||
| 290 | (defun kmacro-add-counter (arg) | 290 | (defun kmacro-add-counter (arg) |
| 291 | "Add numeric prefix arg (prompt if missing) to macro counter. | 291 | "Add numeric prefix arg (prompt if missing) to macro counter. |
| 292 | With \\[universal-argument], restore previous counter value." | 292 | With \\[universal-argument], restore previous counter value." |
| 293 | (interactive "NAdd to macro counter: ") | 293 | (interactive "NAdd to macro counter: ") |
| 294 | (setq kmacro-initial-counter-value nil) | 294 | (if kmacro-initial-counter-value |
| 295 | (setq kmacro-counter kmacro-initial-counter-value | ||
| 296 | kmacro-initial-counter-value nil)) | ||
| 295 | (let ((last kmacro-last-counter)) | 297 | (let ((last kmacro-last-counter)) |
| 296 | (setq kmacro-last-counter kmacro-counter | 298 | (setq kmacro-last-counter kmacro-counter |
| 297 | kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) | 299 | kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) |
| @@ -394,7 +396,10 @@ Optional arg EMPTY is message to print if no macros are defined." | |||
| 394 | (m (format-kbd-macro macro)) | 396 | (m (format-kbd-macro macro)) |
| 395 | (l (length m)) | 397 | (l (length m)) |
| 396 | (z (and nil trunc (> l x)))) | 398 | (z (and nil trunc (> l x)))) |
| 397 | (message (format "%s: %s%s" (or descr "Macro") | 399 | (message (format "%s%s: %s%s" (or descr "Macro") |
| 400 | (if (= kmacro-counter 0) "" | ||
| 401 | (format " [%s]" | ||
| 402 | (format kmacro-counter-format-start kmacro-counter))) | ||
| 398 | (if z (substring m 0 (1- x)) m) (if z "..." "")))) | 403 | (if z (substring m 0 (1- x)) m) (if z "..." "")))) |
| 399 | (message (or empty "No keyboard macros defined")))) | 404 | (message (or empty "No keyboard macros defined")))) |
| 400 | 405 | ||
diff --git a/lisp/mail/mail-extr.el b/lisp/mail/mail-extr.el index 675444d7ba4..b7521ad8e91 100644 --- a/lisp/mail/mail-extr.el +++ b/lisp/mail/mail-extr.el | |||
| @@ -234,6 +234,13 @@ we will act as though we couldn't find a full name in the address." | |||
| 234 | :version "21.4" | 234 | :version "21.4" |
| 235 | :group 'mail-extr) | 235 | :group 'mail-extr) |
| 236 | 236 | ||
| 237 | (defcustom mail-extr-ignore-realname-equals-mailbox-name t | ||
| 238 | "*Whether to ignore a name that is equal to the mailbox name. | ||
| 239 | If true, then when the address is like \"Single <single@address.com>\" | ||
| 240 | we will act as though we couldn't find a full name in the address." | ||
| 241 | :type 'boolean | ||
| 242 | :group 'mail-extr) | ||
| 243 | |||
| 237 | ;; Matches a leading title that is not part of the name (does not | 244 | ;; Matches a leading title that is not part of the name (does not |
| 238 | ;; contribute to uniquely identifying the person). | 245 | ;; contribute to uniquely identifying the person). |
| 239 | (defcustom mail-extr-full-name-prefixes | 246 | (defcustom mail-extr-full-name-prefixes |
| @@ -694,7 +701,7 @@ Unless NO-REPLACE is true, at each of the positions in LIST-SYMBOL | |||
| 694 | "Given an RFC-822 address ADDRESS, extract full name and canonical address. | 701 | "Given an RFC-822 address ADDRESS, extract full name and canonical address. |
| 695 | Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). | 702 | Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). |
| 696 | If no name can be extracted, FULL-NAME will be nil. Also see | 703 | If no name can be extracted, FULL-NAME will be nil. Also see |
| 697 | `mail-extr-ignore-single-names'. | 704 | `mail-extr-ignore-single-names' and `mail-extr-ignore-realname-equals-mailbox-name'. |
| 698 | 705 | ||
| 699 | If the optional argument ALL is non-nil, then ADDRESS can contain zero | 706 | If the optional argument ALL is non-nil, then ADDRESS can contain zero |
| 700 | or more recipients, separated by commas, and we return a list of | 707 | or more recipients, separated by commas, and we return a list of |
| @@ -1404,8 +1411,9 @@ consing a string.)" | |||
| 1404 | (setq names-match-flag nil)) | 1411 | (setq names-match-flag nil)) |
| 1405 | (setq i (1+ i))) | 1412 | (setq i (1+ i))) |
| 1406 | (delete-region (+ (point-min) buffer-length) (point-max)) | 1413 | (delete-region (+ (point-min) buffer-length) (point-max)) |
| 1407 | (if names-match-flag | 1414 | (and names-match-flag |
| 1408 | (narrow-to-region (point) (point))))) | 1415 | mail-extr-ignore-realname-equals-mailbox-name |
| 1416 | (narrow-to-region (point) (point))))) | ||
| 1409 | 1417 | ||
| 1410 | ;; Nuke name if it's just one word. | 1418 | ;; Nuke name if it's just one word. |
| 1411 | (goto-char (point-min)) | 1419 | (goto-char (point-min)) |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 84a61350145..d356979ea26 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -471,26 +471,32 @@ This is relative to `smtpmail-queue-dir'.") | |||
| 471 | (if (null (and cred (condition-case () | 471 | (if (null (and cred (condition-case () |
| 472 | (progn | 472 | (progn |
| 473 | (require 'starttls) | 473 | (require 'starttls) |
| 474 | (call-process starttls-program)) | 474 | (call-process (if starttls-use-gnutls |
| 475 | starttls-gnutls-program | ||
| 476 | starttls-program))) | ||
| 475 | (error nil)))) | 477 | (error nil)))) |
| 476 | ;; The normal case. | 478 | ;; The normal case. |
| 477 | (open-network-stream "SMTP" process-buffer host port) | 479 | (open-network-stream "SMTP" process-buffer host port) |
| 478 | (let* ((cred-key (smtpmail-cred-key cred)) | 480 | (let* ((cred-key (smtpmail-cred-key cred)) |
| 479 | (cred-cert (smtpmail-cred-cert cred)) | 481 | (cred-cert (smtpmail-cred-cert cred)) |
| 480 | (starttls-extra-args | 482 | (starttls-extra-args |
| 481 | (when (and (stringp cred-key) (stringp cred-cert) | 483 | (append |
| 482 | (file-regular-p | 484 | starttls-extra-args |
| 483 | (setq cred-key (expand-file-name cred-key))) | 485 | (when (and (stringp cred-key) (stringp cred-cert) |
| 484 | (file-regular-p | 486 | (file-regular-p |
| 485 | (setq cred-cert (expand-file-name cred-cert)))) | 487 | (setq cred-key (expand-file-name cred-key))) |
| 486 | (list "--key-file" cred-key "--cert-file" cred-cert))) | 488 | (file-regular-p |
| 489 | (setq cred-cert (expand-file-name cred-cert)))) | ||
| 490 | (list "--key-file" cred-key "--cert-file" cred-cert)))) | ||
| 487 | (starttls-extra-arguments | 491 | (starttls-extra-arguments |
| 488 | (when (and (stringp cred-key) (stringp cred-cert) | 492 | (append |
| 489 | (file-regular-p | 493 | starttls-extra-arguments |
| 490 | (setq cred-key (expand-file-name cred-key))) | 494 | (when (and (stringp cred-key) (stringp cred-cert) |
| 491 | (file-regular-p | 495 | (file-regular-p |
| 492 | (setq cred-cert (expand-file-name cred-cert)))) | 496 | (setq cred-key (expand-file-name cred-key))) |
| 493 | (list "--x509keyfile" cred-key "--x509certfile" cred-cert)))) | 497 | (file-regular-p |
| 498 | (setq cred-cert (expand-file-name cred-cert)))) | ||
| 499 | (list "--x509keyfile" cred-key "--x509certfile" cred-cert))))) | ||
| 494 | (starttls-open-stream "SMTP" process-buffer host port))))) | 500 | (starttls-open-stream "SMTP" process-buffer host port))))) |
| 495 | 501 | ||
| 496 | (defun smtpmail-try-auth-methods (process supported-extensions host port) | 502 | (defun smtpmail-try-auth-methods (process supported-extensions host port) |
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index c1f3c0a8d52..16a4826b8ae 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -4514,9 +4514,6 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 4514 | 1)) | 4514 | 1)) |
| 4515 | (apply 'call-process program nil (not discard) nil arguments))) | 4515 | (apply 'call-process program nil (not discard) nil arguments))) |
| 4516 | 4516 | ||
| 4517 | (defvar ange-ftp-remote-shell "rsh" | ||
| 4518 | "Remote shell to use for chmod, if FTP server rejects the `chmod' command.") | ||
| 4519 | |||
| 4520 | ;; Handle an attempt to run chmod on a remote file | 4517 | ;; Handle an attempt to run chmod on a remote file |
| 4521 | ;; by using the ftp chmod command. | 4518 | ;; by using the ftp chmod command. |
| 4522 | (defun ange-ftp-call-chmod (args) | 4519 | (defun ange-ftp-call-chmod (args) |
| @@ -4541,7 +4538,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 4541 | abbr)))) | 4538 | abbr)))) |
| 4542 | (or (car result) | 4539 | (or (car result) |
| 4543 | (call-process | 4540 | (call-process |
| 4544 | ange-ftp-remote-shell | 4541 | remote-shell-program |
| 4545 | nil t nil host dired-chmod-program mode name)))))) | 4542 | nil t nil host dired-chmod-program mode name)))))) |
| 4546 | rest)) | 4543 | rest)) |
| 4547 | (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired. | 4544 | (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired. |
diff --git a/lisp/net/tls.el b/lisp/net/tls.el index d7c8a47a2c0..5f57c084f9b 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; tls.el --- TLS/SSL support via wrapper around GnuTLS | 1 | ;;; tls.el --- TLS/SSL support via wrapper around GnuTLS |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1996-1999, 2003, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Simon Josefsson <simon@josefsson.org> | 5 | ;; Author: Simon Josefsson <simon@josefsson.org> |
| 6 | ;; Keywords: comm, tls, gnutls, ssl | 6 | ;; Keywords: comm, tls, gnutls, ssl |
| @@ -76,6 +76,35 @@ The default is what GNUTLS's \"gnutls-cli\" outputs." | |||
| 76 | :type 'regexp | 76 | :type 'regexp |
| 77 | :group 'tls) | 77 | :group 'tls) |
| 78 | 78 | ||
| 79 | (defcustom tls-certtool-program (executable-find "certtool") | ||
| 80 | "Name of GnuTLS certtool. | ||
| 81 | Used by `tls-certificate-information'." | ||
| 82 | :type '(repeat string) | ||
| 83 | :group 'tls) | ||
| 84 | |||
| 85 | (defun tls-certificate-information (der) | ||
| 86 | "Parse X.509 certificate in DER format into an assoc list." | ||
| 87 | (let ((certificate (concat "-----BEGIN CERTIFICATE-----\n" | ||
| 88 | (base64-encode-string der) | ||
| 89 | "\n-----END CERTIFICATE-----\n")) | ||
| 90 | (exit-code 0)) | ||
| 91 | (with-current-buffer (get-buffer-create " *certtool*") | ||
| 92 | (erase-buffer) | ||
| 93 | (insert certificate) | ||
| 94 | (setq exit-code (condition-case () | ||
| 95 | (call-process-region (point-min) (point-max) | ||
| 96 | tls-certtool-program | ||
| 97 | t (list (current-buffer) nil) t | ||
| 98 | "--certificate-info") | ||
| 99 | (error -1))) | ||
| 100 | (if (/= exit-code 0) | ||
| 101 | nil | ||
| 102 | (let ((vals nil)) | ||
| 103 | (goto-char (point-min)) | ||
| 104 | (while (re-search-forward "^\\([^:]+\\): \\(.*\\)" nil t) | ||
| 105 | (push (cons (match-string 1) (match-string 2)) vals)) | ||
| 106 | (nreverse vals)))))) | ||
| 107 | |||
| 79 | (defun open-tls-stream (name buffer host service) | 108 | (defun open-tls-stream (name buffer host service) |
| 80 | "Open a TLS connection for a service to a host. | 109 | "Open a TLS connection for a service to a host. |
| 81 | Returns a subprocess-object to represent the connection. | 110 | Returns a subprocess-object to represent the connection. |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 6a888d9d75d..4628af88178 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -1087,7 +1087,7 @@ Return the difference in the format of a time value." | |||
| 1087 | ;; `PC-do-completion' touches the returning "$$" by `substitute-in-file-name'. | 1087 | ;; `PC-do-completion' touches the returning "$$" by `substitute-in-file-name'. |
| 1088 | ;; Must be corrected. | 1088 | ;; Must be corrected. |
| 1089 | 1089 | ||
| 1090 | (defadvice PC-do-completion (around tramp-smb-advice-PC-do-completion activate) | 1090 | (defadvice PC-do-completion (around tramp-smb-advice-PC-do-completion) |
| 1091 | "Changes \"$\" back to \"$$\" in minibuffer." | 1091 | "Changes \"$\" back to \"$$\" in minibuffer." |
| 1092 | (if (funcall PC-completion-as-file-name-predicate) | 1092 | (if (funcall PC-completion-as-file-name-predicate) |
| 1093 | 1093 | ||
| @@ -1123,6 +1123,13 @@ Return the difference in the format of a time value." | |||
| 1123 | ;; No file names. Behave unchanged. | 1123 | ;; No file names. Behave unchanged. |
| 1124 | ad-do-it)) | 1124 | ad-do-it)) |
| 1125 | 1125 | ||
| 1126 | ;; Activate advice. Recent Emacsen don't need that. | ||
| 1127 | (when (functionp 'PC-do-completion) | ||
| 1128 | (condition-case nil | ||
| 1129 | (substitute-in-file-name "C$/") | ||
| 1130 | (error | ||
| 1131 | (ad-activate 'PC-do-completion)))) | ||
| 1132 | |||
| 1126 | (provide 'tramp-smb) | 1133 | (provide 'tramp-smb) |
| 1127 | 1134 | ||
| 1128 | ;;; TODO: | 1135 | ;;; TODO: |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index cda0d41fd8d..a30280dbd4f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1668,6 +1668,7 @@ while (my $data = <STDIN>) { | |||
| 1668 | 1668 | ||
| 1669 | my $len = length($pending); | 1669 | my $len = length($pending); |
| 1670 | my $chunk = substr($pending, 0, $len & ~3); | 1670 | my $chunk = substr($pending, 0, $len & ~3); |
| 1671 | $pending = substr($pending, $len & ~3 + 1); | ||
| 1671 | 1672 | ||
| 1672 | # Easy method: translate from chars to (pregenerated) six-bit packets, join, | 1673 | # Easy method: translate from chars to (pregenerated) six-bit packets, join, |
| 1673 | # split in 8-bit chunks and convert back to char. | 1674 | # split in 8-bit chunks and convert back to char. |
| @@ -1883,7 +1884,11 @@ If VAR is nil, then we bind `v' to the structure and `multi-method', | |||
| 1883 | 1884 | ||
| 1884 | (put 'with-parsed-tramp-file-name 'lisp-indent-function 2) | 1885 | (put 'with-parsed-tramp-file-name 'lisp-indent-function 2) |
| 1885 | ;; To be activated for debugging containing this macro | 1886 | ;; To be activated for debugging containing this macro |
| 1886 | (def-edebug-spec with-parsed-tramp-file-name t) | 1887 | ;; It works only when VAR is nil. Otherwise, it can be deactivated by |
| 1888 | ;; (def-edebug-spec with-parsed-tramp-file-name 0) | ||
| 1889 | ;; I'm too stupid to write a precise SPEC for it. | ||
| 1890 | (if (functionp 'def-edebug-spec) | ||
| 1891 | (def-edebug-spec with-parsed-tramp-file-name t)) | ||
| 1887 | 1892 | ||
| 1888 | (defmacro tramp-let-maybe (variable value &rest body) | 1893 | (defmacro tramp-let-maybe (variable value &rest body) |
| 1889 | "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete. | 1894 | "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete. |
| @@ -6731,6 +6736,31 @@ as default." | |||
| 6731 | (tramp-make-auto-save-file-name (buffer-file-name))) | 6736 | (tramp-make-auto-save-file-name (buffer-file-name))) |
| 6732 | ad-do-it)) | 6737 | ad-do-it)) |
| 6733 | 6738 | ||
| 6739 | ;; In Emacs < 21.4 and XEmacs < 21.5 autosaved remote files have | ||
| 6740 | ;; permission 666 minus umask. This is a security threat. | ||
| 6741 | |||
| 6742 | (defun tramp-set-auto-save-file-modes () | ||
| 6743 | "Set permissions of autosaved remote files to the original permissions." | ||
| 6744 | (let ((bfn (buffer-file-name))) | ||
| 6745 | (when (and (stringp bfn) | ||
| 6746 | (tramp-tramp-file-p bfn) | ||
| 6747 | (stringp buffer-auto-save-file-name) | ||
| 6748 | (not (equal bfn buffer-auto-save-file-name)) | ||
| 6749 | (not (file-exists-p buffer-auto-save-file-name))) | ||
| 6750 | (write-region "" nil buffer-auto-save-file-name) | ||
| 6751 | (set-file-modes buffer-auto-save-file-name (file-modes bfn))))) | ||
| 6752 | |||
| 6753 | (unless (or (> emacs-major-version 21) | ||
| 6754 | (and (featurep 'xemacs) | ||
| 6755 | (= emacs-major-version 21) | ||
| 6756 | (> emacs-minor-version 4)) | ||
| 6757 | (and (not (featurep 'xemacs)) | ||
| 6758 | (= emacs-major-version 21) | ||
| 6759 | (or (> emacs-minor-version 3) | ||
| 6760 | (and (string-match "^21\\.3\\.\\([0-9]+\\)" emacs-version) | ||
| 6761 | (>= (string-to-int (match-string 1 emacs-version)) 50))))) | ||
| 6762 | (add-hook 'auto-save-hook 'tramp-set-auto-save-file-modes)) | ||
| 6763 | |||
| 6734 | (defun tramp-subst-strs-in-string (alist string) | 6764 | (defun tramp-subst-strs-in-string (alist string) |
| 6735 | "Replace all occurrences of the string FROM with TO in STRING. | 6765 | "Replace all occurrences of the string FROM with TO in STRING. |
| 6736 | ALIST is of the form ((FROM . TO) ...)." | 6766 | ALIST is of the form ((FROM . TO) ...)." |
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 46b33b2d50f..7456bc1660f 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | ;; are auto-frobbed from configure.ac, so you should edit that file and run | 30 | ;; are auto-frobbed from configure.ac, so you should edit that file and run |
| 31 | ;; "autoconf && ./configure" to change them. | 31 | ;; "autoconf && ./configure" to change them. |
| 32 | 32 | ||
| 33 | (defconst tramp-version "2.0.44" | 33 | (defconst tramp-version "2.0.45" |
| 34 | "This version of Tramp.") | 34 | "This version of Tramp.") |
| 35 | 35 | ||
| 36 | (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" | 36 | (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" |
diff --git a/lisp/pcvs-defs.el b/lisp/pcvs-defs.el index 16e2ff82553..cd379afab77 100644 --- a/lisp/pcvs-defs.el +++ b/lisp/pcvs-defs.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; pcvs-defs.el --- variable definitions for PCL-CVS | 1 | ;;; pcvs-defs.el --- variable definitions for PCL-CVS |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 03, 2004 | 3 | ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; 2000, 2003, 2004 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Author: Stefan Monnier <monnier@cs.yale.edu> |
| 7 | ;; Keywords: pcl-cvs | 7 | ;; Keywords: pcl-cvs |
| @@ -249,9 +249,6 @@ Output from cvs is placed here for asynchronous commands.") | |||
| 249 | :type '(choice (const :tag "Ediff" (cvs-ediff-diff . cvs-ediff-merge)) | 249 | :type '(choice (const :tag "Ediff" (cvs-ediff-diff . cvs-ediff-merge)) |
| 250 | (const :tag "Emerge" (cvs-emerge-diff . cvs-emerge-merge)))) | 250 | (const :tag "Emerge" (cvs-emerge-diff . cvs-emerge-merge)))) |
| 251 | 251 | ||
| 252 | (defvar pcl-cvs-load-hook nil | ||
| 253 | "Run after loading pcl-cvs.") | ||
| 254 | |||
| 255 | (defvar cvs-mode-hook nil | 252 | (defvar cvs-mode-hook nil |
| 256 | "Run after `cvs-mode' was setup.") | 253 | "Run after `cvs-mode' was setup.") |
| 257 | 254 | ||
| @@ -510,5 +507,5 @@ message and replace it with a message tell you to change this variable.") | |||
| 510 | ;; | 507 | ;; |
| 511 | (provide 'pcvs-defs) | 508 | (provide 'pcvs-defs) |
| 512 | 509 | ||
| 513 | ;;; arch-tag: c7c701d0-d1d4-4aa9-a302-007bb03aca5e | 510 | ;; arch-tag: c7c701d0-d1d4-4aa9-a302-007bb03aca5e |
| 514 | ;;; pcvs-defs.el ends here | 511 | ;;; pcvs-defs.el ends here |
diff --git a/lisp/pcvs-parse.el b/lisp/pcvs-parse.el index 84dbf218581..7ab6c53b4a0 100644 --- a/lisp/pcvs-parse.el +++ b/lisp/pcvs-parse.el | |||
| @@ -511,15 +511,19 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'." | |||
| 511 | (cvs-match "new revision: \\([0-9.]*\\); previous revision: .*$" | 511 | (cvs-match "new revision: \\([0-9.]*\\); previous revision: .*$" |
| 512 | (subtype 'COMMITTED) (base-rev 1))) | 512 | (subtype 'COMMITTED) (base-rev 1))) |
| 513 | (cvs-or (cvs-match "done$") t) | 513 | (cvs-or (cvs-match "done$") t) |
| 514 | ;; In cvs-1.12.9 commit messages have been changed and became | ||
| 515 | ;; ambiguous. More specifically, the `path' above is not given. | ||
| 516 | ;; We assume here that in future releases the corresponding info will | ||
| 517 | ;; be put into `file'. | ||
| 514 | (progn | 518 | (progn |
| 515 | ;; Try to remove the temp files used by VC. | 519 | ;; Try to remove the temp files used by VC. |
| 516 | (vc-delete-automatic-version-backups (expand-file-name path)) | 520 | (vc-delete-automatic-version-backups (expand-file-name (or path file))) |
| 517 | ;; it's important here not to rely on the default directory management | 521 | ;; it's important here not to rely on the default directory management |
| 518 | ;; because `cvs commit' might begin by a series of Examining messages | 522 | ;; because `cvs commit' might begin by a series of Examining messages |
| 519 | ;; so the processing of the actual checkin messages might begin with | 523 | ;; so the processing of the actual checkin messages might begin with |
| 520 | ;; a `current-dir' set to something different from "" | 524 | ;; a `current-dir' set to something different from "" |
| 521 | (cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype) | 525 | (cvs-parsed-fileinfo (cons 'UP-TO-DATE subtype) |
| 522 | (or path file) (if path 'trust) | 526 | (or path file) 'trust |
| 523 | :base-rev base-rev))) | 527 | :base-rev base-rev))) |
| 524 | 528 | ||
| 525 | ;; useless message added before the actual addition: ignored | 529 | ;; useless message added before the actual addition: ignored |
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index ddbd2ce6f35..0569d26db61 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el | |||
| @@ -1229,10 +1229,10 @@ where they were found." | |||
| 1229 | 1229 | ||
| 1230 | (defun etags-tags-completion-table () | 1230 | (defun etags-tags-completion-table () |
| 1231 | (let ((table (make-vector 511 0)) | 1231 | (let ((table (make-vector 511 0)) |
| 1232 | (point-max (/ (float (point-max)) 100.0)) | 1232 | (progress-reporter |
| 1233 | (msg-fmt (format | 1233 | (make-progress-reporter |
| 1234 | "Making tags completion table for %s...%%d%%%%" | 1234 | (format "Making tags completion table for %s..." buffer-file-name) |
| 1235 | buffer-file-name))) | 1235 | (point-min) (point-max)))) |
| 1236 | (save-excursion | 1236 | (save-excursion |
| 1237 | (goto-char (point-min)) | 1237 | (goto-char (point-min)) |
| 1238 | ;; This monster regexp matches an etags tag line. | 1238 | ;; This monster regexp matches an etags tag line. |
| @@ -1253,7 +1253,7 @@ where they were found." | |||
| 1253 | (buffer-substring (match-beginning 5) (match-end 5)) | 1253 | (buffer-substring (match-beginning 5) (match-end 5)) |
| 1254 | ;; No explicit tag name. Best guess. | 1254 | ;; No explicit tag name. Best guess. |
| 1255 | (buffer-substring (match-beginning 3) (match-end 3))) | 1255 | (buffer-substring (match-beginning 3) (match-end 3))) |
| 1256 | (message msg-fmt (/ (point) point-max))) | 1256 | (progress-reporter-update progress-reporter (point))) |
| 1257 | table))) | 1257 | table))) |
| 1258 | table)) | 1258 | table)) |
| 1259 | 1259 | ||
| @@ -1433,11 +1433,12 @@ where they were found." | |||
| 1433 | (tags-with-face 'highlight (princ buffer-file-name)) | 1433 | (tags-with-face 'highlight (princ buffer-file-name)) |
| 1434 | (princ "':\n\n")) | 1434 | (princ "':\n\n")) |
| 1435 | (goto-char (point-min)) | 1435 | (goto-char (point-min)) |
| 1436 | (let ((point-max (/ (float (point-max)) 100.0))) | 1436 | (let ((progress-reporter (make-progress-reporter |
| 1437 | (format "Making tags apropos buffer for `%s'..." | ||
| 1438 | string) | ||
| 1439 | (point-min) (point-max)))) | ||
| 1437 | (while (re-search-forward string nil t) | 1440 | (while (re-search-forward string nil t) |
| 1438 | (message "Making tags apropos buffer for `%s'...%d%%" | 1441 | (progress-reporter-update progress-reporter (point)) |
| 1439 | string | ||
| 1440 | (/ (point) point-max)) | ||
| 1441 | (beginning-of-line) | 1442 | (beginning-of-line) |
| 1442 | 1443 | ||
| 1443 | (let* ( ;; Get the local value in the tags table | 1444 | (let* ( ;; Get the local value in the tags table |
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el index 612a2034e00..d8f2cf34867 100644 --- a/lisp/progmodes/gdb-ui.el +++ b/lisp/progmodes/gdb-ui.el | |||
| @@ -188,6 +188,7 @@ detailed description of this mode. | |||
| 188 | (setq gdb-var-changed nil) | 188 | (setq gdb-var-changed nil) |
| 189 | (setq gdb-first-prompt nil) | 189 | (setq gdb-first-prompt nil) |
| 190 | (setq gdb-prompting nil) | 190 | (setq gdb-prompting nil) |
| 191 | (setq gdb-input-queue nil) | ||
| 191 | (setq gdb-current-item nil) | 192 | (setq gdb-current-item nil) |
| 192 | (setq gdb-pending-triggers nil) | 193 | (setq gdb-pending-triggers nil) |
| 193 | (setq gdb-output-sink 'user) | 194 | (setq gdb-output-sink 'user) |
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 4ea4fcb6ea2..37fe13ce585 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -3027,6 +3027,27 @@ class of the file (using s to separate nested class ids)." | |||
| 3027 | (save-excursion (indent-line-to indent)) | 3027 | (save-excursion (indent-line-to indent)) |
| 3028 | (indent-line-to indent))))) | 3028 | (indent-line-to indent))))) |
| 3029 | 3029 | ||
| 3030 | ;; Derived from cfengine.el. | ||
| 3031 | (defun gdb-script-beginning-of-defun () | ||
| 3032 | "`beginning-of-defun' function for Gdb script mode. | ||
| 3033 | Treats actions as defuns." | ||
| 3034 | (unless (<= (current-column) (current-indentation)) | ||
| 3035 | (end-of-line)) | ||
| 3036 | (if (re-search-backward "^define \\|^document " nil t) | ||
| 3037 | (beginning-of-line) | ||
| 3038 | (goto-char (point-min))) | ||
| 3039 | t) | ||
| 3040 | |||
| 3041 | ;; Derived from cfengine.el. | ||
| 3042 | (defun gdb-script-end-of-defun () | ||
| 3043 | "`end-of-defun' function for Gdb script mode. | ||
| 3044 | Treats actions as defuns." | ||
| 3045 | (end-of-line) | ||
| 3046 | (if (re-search-forward "^end" nil t) | ||
| 3047 | (beginning-of-line) | ||
| 3048 | (goto-char (point-max))) | ||
| 3049 | t) | ||
| 3050 | |||
| 3030 | ;;;###autoload | 3051 | ;;;###autoload |
| 3031 | (add-to-list 'auto-mode-alist '("/\\.gdbinit" . gdb-script-mode)) | 3052 | (add-to-list 'auto-mode-alist '("/\\.gdbinit" . gdb-script-mode)) |
| 3032 | 3053 | ||
| @@ -3039,6 +3060,10 @@ class of the file (using s to separate nested class ids)." | |||
| 3039 | (set (make-local-variable 'imenu-generic-expression) | 3060 | (set (make-local-variable 'imenu-generic-expression) |
| 3040 | '((nil "^define[ \t]+\\(\\w+\\)" 1))) | 3061 | '((nil "^define[ \t]+\\(\\w+\\)" 1))) |
| 3041 | (set (make-local-variable 'indent-line-function) 'gdb-script-indent-line) | 3062 | (set (make-local-variable 'indent-line-function) 'gdb-script-indent-line) |
| 3063 | (set (make-local-variable 'beginning-of-defun-function) | ||
| 3064 | #'gdb-script-beginning-of-defun) | ||
| 3065 | (set (make-local-variable 'end-of-defun-function) | ||
| 3066 | #'gdb-script-end-of-defun) | ||
| 3042 | (set (make-local-variable 'font-lock-defaults) | 3067 | (set (make-local-variable 'font-lock-defaults) |
| 3043 | '(gdb-script-font-lock-keywords nil nil ((?_ . "w")) nil | 3068 | '(gdb-script-font-lock-keywords nil nil ((?_ . "w")) nil |
| 3044 | (font-lock-syntactic-keywords | 3069 | (font-lock-syntactic-keywords |
diff --git a/lisp/recentf.el b/lisp/recentf.el index efe4ebc63a4..4ef55d4e1bf 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el | |||
| @@ -1032,7 +1032,8 @@ Click on Cancel or type \"q\" to quit.\n") | |||
| 1032 | (dolist (e recentf-edit-selected-items) | 1032 | (dolist (e recentf-edit-selected-items) |
| 1033 | (setq recentf-list (delq e recentf-list) | 1033 | (setq recentf-list (delq e recentf-list) |
| 1034 | i (1+ i))) | 1034 | i (1+ i))) |
| 1035 | (message "%S file(s) removed from the list" i)) | 1035 | (message "%S file(s) removed from the list" i) |
| 1036 | (recentf-clear-data)) | ||
| 1036 | (message "No file selected"))) | 1037 | (message "No file selected"))) |
| 1037 | "Ok") | 1038 | "Ok") |
| 1038 | (widget-insert " ") | 1039 | (widget-insert " ") |
diff --git a/lisp/server.el b/lisp/server.el index fe2fc0f59f4..3a330f07a3c 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -343,7 +343,11 @@ PROC is the server process. Format of STRING is \"PATH PATH PATH... \\n\"." | |||
| 343 | (with-temp-buffer | 343 | (with-temp-buffer |
| 344 | (let ((standard-output (current-buffer))) | 344 | (let ((standard-output (current-buffer))) |
| 345 | (pp v) | 345 | (pp v) |
| 346 | (process-send-region proc (point-min) (point-max)))))) | 346 | ;; Suppress the error rose when the pipe to PROC is closed. |
| 347 | (condition-case err | ||
| 348 | (process-send-region proc (point-min) (point-max)) | ||
| 349 | (file-error nil)) | ||
| 350 | )))) | ||
| 347 | ;; ARG is a file name. | 351 | ;; ARG is a file name. |
| 348 | ;; Collapse multiple slashes to single slashes. | 352 | ;; Collapse multiple slashes to single slashes. |
| 349 | (setq arg (command-line-normalize-file-name arg)) | 353 | (setq arg (command-line-normalize-file-name arg)) |
diff --git a/lisp/subr.el b/lisp/subr.el index e5a967310d5..eb4577b1a8d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -367,15 +367,6 @@ but optional second arg NODIGITS non-nil treats them like other chars." | |||
| 367 | (define-key map (char-to-string loop) 'digit-argument) | 367 | (define-key map (char-to-string loop) 'digit-argument) |
| 368 | (setq loop (1+ loop)))))) | 368 | (setq loop (1+ loop)))))) |
| 369 | 369 | ||
| 370 | ;Moved to keymap.c | ||
| 371 | ;(defun copy-keymap (keymap) | ||
| 372 | ; "Return a copy of KEYMAP" | ||
| 373 | ; (while (not (keymapp keymap)) | ||
| 374 | ; (setq keymap (signal 'wrong-type-argument (list 'keymapp keymap)))) | ||
| 375 | ; (if (vectorp keymap) | ||
| 376 | ; (copy-sequence keymap) | ||
| 377 | ; (copy-alist keymap))) | ||
| 378 | |||
| 379 | (defvar key-substitution-in-progress nil | 370 | (defvar key-substitution-in-progress nil |
| 380 | "Used internally by substitute-key-definition.") | 371 | "Used internally by substitute-key-definition.") |
| 381 | 372 | ||
| @@ -383,7 +374,10 @@ but optional second arg NODIGITS non-nil treats them like other chars." | |||
| 383 | "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. | 374 | "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. |
| 384 | In other words, OLDDEF is replaced with NEWDEF where ever it appears. | 375 | In other words, OLDDEF is replaced with NEWDEF where ever it appears. |
| 385 | Alternatively, if optional fourth argument OLDMAP is specified, we redefine | 376 | Alternatively, if optional fourth argument OLDMAP is specified, we redefine |
| 386 | in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP." | 377 | in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP. |
| 378 | |||
| 379 | For most uses, it is simpler and safer to use command remappping like this: | ||
| 380 | \(define-key KEYMAP [remap OLDDEF] NEWDEF)" | ||
| 387 | ;; Don't document PREFIX in the doc string because we don't want to | 381 | ;; Don't document PREFIX in the doc string because we don't want to |
| 388 | ;; advertise it. It's meant for recursive calls only. Here's its | 382 | ;; advertise it. It's meant for recursive calls only. Here's its |
| 389 | ;; meaning | 383 | ;; meaning |
| @@ -393,126 +387,54 @@ in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP." | |||
| 393 | ;; original key, with PREFIX added at the front. | 387 | ;; original key, with PREFIX added at the front. |
| 394 | (or prefix (setq prefix "")) | 388 | (or prefix (setq prefix "")) |
| 395 | (let* ((scan (or oldmap keymap)) | 389 | (let* ((scan (or oldmap keymap)) |
| 396 | (vec1 (vector nil)) | 390 | (prefix1 (vconcat prefix [nil])) |
| 397 | (prefix1 (vconcat prefix vec1)) | ||
| 398 | (key-substitution-in-progress | 391 | (key-substitution-in-progress |
| 399 | (cons scan key-substitution-in-progress))) | 392 | (cons scan key-substitution-in-progress))) |
| 400 | ;; Scan OLDMAP, finding each char or event-symbol that | 393 | ;; Scan OLDMAP, finding each char or event-symbol that |
| 401 | ;; has any definition, and act on it with hack-key. | 394 | ;; has any definition, and act on it with hack-key. |
| 402 | (while (consp scan) | 395 | (map-keymap |
| 403 | (if (consp (car scan)) | 396 | (lambda (char defn) |
| 404 | (let ((char (car (car scan))) | 397 | (aset prefix1 (length prefix) char) |
| 405 | (defn (cdr (car scan)))) | 398 | (substitute-key-definition-key defn olddef newdef prefix1 keymap)) |
| 406 | ;; The inside of this let duplicates exactly | 399 | scan))) |
| 407 | ;; the inside of the following let that handles array elements. | 400 | |
| 408 | (aset vec1 0 char) | 401 | (defun substitute-key-definition-key (defn olddef newdef prefix keymap) |
| 409 | (aset prefix1 (length prefix) char) | 402 | (let (inner-def skipped menu-item) |
| 410 | (let (inner-def skipped) | 403 | ;; Find the actual command name within the binding. |
| 411 | ;; Skip past menu-prompt. | 404 | (if (eq (car-safe defn) 'menu-item) |
| 412 | (while (stringp (car-safe defn)) | 405 | (setq menu-item defn defn (nth 2 defn)) |
| 413 | (setq skipped (cons (car defn) skipped)) | 406 | ;; Skip past menu-prompt. |
| 414 | (setq defn (cdr defn))) | 407 | (while (stringp (car-safe defn)) |
| 415 | ;; Skip past cached key-equivalence data for menu items. | 408 | (push (pop defn) skipped)) |
| 416 | (and (consp defn) (consp (car defn)) | 409 | ;; Skip past cached key-equivalence data for menu items. |
| 417 | (setq defn (cdr defn))) | 410 | (if (consp (car-safe defn)) |
| 418 | (setq inner-def defn) | 411 | (setq defn (cdr defn)))) |
| 419 | ;; Look past a symbol that names a keymap. | 412 | (if (or (eq defn olddef) |
| 420 | (while (and (symbolp inner-def) | 413 | ;; Compare with equal if definition is a key sequence. |
| 421 | (fboundp inner-def)) | 414 | ;; That is useful for operating on function-key-map. |
| 422 | (setq inner-def (symbol-function inner-def))) | 415 | (and (or (stringp defn) (vectorp defn)) |
| 423 | (if (or (eq defn olddef) | 416 | (equal defn olddef))) |
| 424 | ;; Compare with equal if definition is a key sequence. | 417 | (define-key keymap prefix |
| 425 | ;; That is useful for operating on function-key-map. | 418 | (if menu-item |
| 426 | (and (or (stringp defn) (vectorp defn)) | 419 | (let ((copy (copy-sequence menu-item))) |
| 427 | (equal defn olddef))) | 420 | (setcar (nthcdr 2 copy) newdef) |
| 428 | (define-key keymap prefix1 (nconc (nreverse skipped) newdef)) | 421 | copy) |
| 429 | (if (and (keymapp defn) | 422 | (nconc (nreverse skipped) newdef))) |
| 430 | ;; Avoid recursively scanning | 423 | ;; Look past a symbol that names a keymap. |
| 431 | ;; where KEYMAP does not have a submap. | 424 | (setq inner-def |
| 432 | (let ((elt (lookup-key keymap prefix1))) | 425 | (condition-case nil (indirect-function defn) (error defn))) |
| 433 | (or (null elt) | 426 | ;; For nested keymaps, we use `inner-def' rather than `defn' so as to |
| 434 | (keymapp elt))) | 427 | ;; avoid autoloading a keymap. This is mostly done to preserve the |
| 435 | ;; Avoid recursively rescanning keymap being scanned. | 428 | ;; original non-autoloading behavior of pre-map-keymap times. |
| 436 | (not (memq inner-def | 429 | (if (and (keymapp inner-def) |
| 437 | key-substitution-in-progress))) | 430 | ;; Avoid recursively scanning |
| 438 | ;; If this one isn't being scanned already, | 431 | ;; where KEYMAP does not have a submap. |
| 439 | ;; scan it now. | 432 | (let ((elt (lookup-key keymap prefix))) |
| 440 | (substitute-key-definition olddef newdef keymap | 433 | (or (null elt) (natnump elt) (keymapp elt))) |
| 441 | inner-def | 434 | ;; Avoid recursively rescanning keymap being scanned. |
| 442 | prefix1))))) | 435 | (not (memq inner-def key-substitution-in-progress))) |
| 443 | (if (vectorp (car scan)) | 436 | ;; If this one isn't being scanned already, scan it now. |
| 444 | (let* ((array (car scan)) | 437 | (substitute-key-definition olddef newdef keymap inner-def prefix))))) |
| 445 | (len (length array)) | ||
| 446 | (i 0)) | ||
| 447 | (while (< i len) | ||
| 448 | (let ((char i) (defn (aref array i))) | ||
| 449 | ;; The inside of this let duplicates exactly | ||
| 450 | ;; the inside of the previous let. | ||
| 451 | (aset vec1 0 char) | ||
| 452 | (aset prefix1 (length prefix) char) | ||
| 453 | (let (inner-def skipped) | ||
| 454 | ;; Skip past menu-prompt. | ||
| 455 | (while (stringp (car-safe defn)) | ||
| 456 | (setq skipped (cons (car defn) skipped)) | ||
| 457 | (setq defn (cdr defn))) | ||
| 458 | (and (consp defn) (consp (car defn)) | ||
| 459 | (setq defn (cdr defn))) | ||
| 460 | (setq inner-def defn) | ||
| 461 | (while (and (symbolp inner-def) | ||
| 462 | (fboundp inner-def)) | ||
| 463 | (setq inner-def (symbol-function inner-def))) | ||
| 464 | (if (or (eq defn olddef) | ||
| 465 | (and (or (stringp defn) (vectorp defn)) | ||
| 466 | (equal defn olddef))) | ||
| 467 | (define-key keymap prefix1 | ||
| 468 | (nconc (nreverse skipped) newdef)) | ||
| 469 | (if (and (keymapp defn) | ||
| 470 | (let ((elt (lookup-key keymap prefix1))) | ||
| 471 | (or (null elt) | ||
| 472 | (keymapp elt))) | ||
| 473 | (not (memq inner-def | ||
| 474 | key-substitution-in-progress))) | ||
| 475 | (substitute-key-definition olddef newdef keymap | ||
| 476 | inner-def | ||
| 477 | prefix1))))) | ||
| 478 | (setq i (1+ i)))) | ||
| 479 | (if (char-table-p (car scan)) | ||
| 480 | (map-char-table | ||
| 481 | (function (lambda (char defn) | ||
| 482 | (let () | ||
| 483 | ;; The inside of this let duplicates exactly | ||
| 484 | ;; the inside of the previous let, | ||
| 485 | ;; except that it uses set-char-table-range | ||
| 486 | ;; instead of define-key. | ||
| 487 | (aset vec1 0 char) | ||
| 488 | (aset prefix1 (length prefix) char) | ||
| 489 | (let (inner-def skipped) | ||
| 490 | ;; Skip past menu-prompt. | ||
| 491 | (while (stringp (car-safe defn)) | ||
| 492 | (setq skipped (cons (car defn) skipped)) | ||
| 493 | (setq defn (cdr defn))) | ||
| 494 | (and (consp defn) (consp (car defn)) | ||
| 495 | (setq defn (cdr defn))) | ||
| 496 | (setq inner-def defn) | ||
| 497 | (while (and (symbolp inner-def) | ||
| 498 | (fboundp inner-def)) | ||
| 499 | (setq inner-def (symbol-function inner-def))) | ||
| 500 | (if (or (eq defn olddef) | ||
| 501 | (and (or (stringp defn) (vectorp defn)) | ||
| 502 | (equal defn olddef))) | ||
| 503 | (define-key keymap prefix1 | ||
| 504 | (nconc (nreverse skipped) newdef)) | ||
| 505 | (if (and (keymapp defn) | ||
| 506 | (let ((elt (lookup-key keymap prefix1))) | ||
| 507 | (or (null elt) | ||
| 508 | (keymapp elt))) | ||
| 509 | (not (memq inner-def | ||
| 510 | key-substitution-in-progress))) | ||
| 511 | (substitute-key-definition olddef newdef keymap | ||
| 512 | inner-def | ||
| 513 | prefix1))))))) | ||
| 514 | (car scan))))) | ||
| 515 | (setq scan (cdr scan))))) | ||
| 516 | 438 | ||
| 517 | (defun define-key-after (keymap key definition &optional after) | 439 | (defun define-key-after (keymap key definition &optional after) |
| 518 | "Add binding in KEYMAP for KEY => DEFINITION, right after AFTER's binding. | 440 | "Add binding in KEYMAP for KEY => DEFINITION, right after AFTER's binding. |
| @@ -658,19 +580,19 @@ even when EVENT actually has modifiers." | |||
| 658 | (char (logand type (lognot (logior ?\M-\^@ ?\C-\^@ ?\S-\^@ | 580 | (char (logand type (lognot (logior ?\M-\^@ ?\C-\^@ ?\S-\^@ |
| 659 | ?\H-\^@ ?\s-\^@ ?\A-\^@))))) | 581 | ?\H-\^@ ?\s-\^@ ?\A-\^@))))) |
| 660 | (if (not (zerop (logand type ?\M-\^@))) | 582 | (if (not (zerop (logand type ?\M-\^@))) |
| 661 | (setq list (cons 'meta list))) | 583 | (push 'meta list)) |
| 662 | (if (or (not (zerop (logand type ?\C-\^@))) | 584 | (if (or (not (zerop (logand type ?\C-\^@))) |
| 663 | (< char 32)) | 585 | (< char 32)) |
| 664 | (setq list (cons 'control list))) | 586 | (push 'control list)) |
| 665 | (if (or (not (zerop (logand type ?\S-\^@))) | 587 | (if (or (not (zerop (logand type ?\S-\^@))) |
| 666 | (/= char (downcase char))) | 588 | (/= char (downcase char))) |
| 667 | (setq list (cons 'shift list))) | 589 | (push 'shift list)) |
| 668 | (or (zerop (logand type ?\H-\^@)) | 590 | (or (zerop (logand type ?\H-\^@)) |
| 669 | (setq list (cons 'hyper list))) | 591 | (push 'hyper list)) |
| 670 | (or (zerop (logand type ?\s-\^@)) | 592 | (or (zerop (logand type ?\s-\^@)) |
| 671 | (setq list (cons 'super list))) | 593 | (push 'super list)) |
| 672 | (or (zerop (logand type ?\A-\^@)) | 594 | (or (zerop (logand type ?\A-\^@)) |
| 673 | (setq list (cons 'alt list))) | 595 | (push 'alt list)) |
| 674 | list)))) | 596 | list)))) |
| 675 | 597 | ||
| 676 | (defun event-basic-type (event) | 598 | (defun event-basic-type (event) |
| @@ -688,8 +610,7 @@ in the current Emacs session, then this function may return nil." | |||
| 688 | 610 | ||
| 689 | (defsubst mouse-movement-p (object) | 611 | (defsubst mouse-movement-p (object) |
| 690 | "Return non-nil if OBJECT is a mouse movement event." | 612 | "Return non-nil if OBJECT is a mouse movement event." |
| 691 | (and (consp object) | 613 | (eq (car-safe object) 'mouse-movement)) |
| 692 | (eq (car object) 'mouse-movement))) | ||
| 693 | 614 | ||
| 694 | (defsubst event-start (event) | 615 | (defsubst event-start (event) |
| 695 | "Return the starting position of EVENT. | 616 | "Return the starting position of EVENT. |
| @@ -1880,8 +1801,7 @@ Use a MESSAGE of \"\" to temporarily clear the echo area." | |||
| 1880 | See also `with-temp-file' and `with-output-to-string'." | 1801 | See also `with-temp-file' and `with-output-to-string'." |
| 1881 | (declare (indent 0) (debug t)) | 1802 | (declare (indent 0) (debug t)) |
| 1882 | (let ((temp-buffer (make-symbol "temp-buffer"))) | 1803 | (let ((temp-buffer (make-symbol "temp-buffer"))) |
| 1883 | `(let ((,temp-buffer | 1804 | `(let ((,temp-buffer (generate-new-buffer " *temp*"))) |
| 1884 | (get-buffer-create (generate-new-buffer-name " *temp*")))) | ||
| 1885 | (unwind-protect | 1805 | (unwind-protect |
| 1886 | (with-current-buffer ,temp-buffer | 1806 | (with-current-buffer ,temp-buffer |
| 1887 | ,@body) | 1807 | ,@body) |
| @@ -2652,5 +2572,132 @@ The properties used on SYMBOL are `composefunc', `sendfunc', | |||
| 2652 | (put symbol 'abortfunc (or abortfunc 'kill-buffer)) | 2572 | (put symbol 'abortfunc (or abortfunc 'kill-buffer)) |
| 2653 | (put symbol 'hookvar (or hookvar 'mail-send-hook))) | 2573 | (put symbol 'hookvar (or hookvar 'mail-send-hook))) |
| 2654 | 2574 | ||
| 2575 | ;; Standardized progress reporting | ||
| 2576 | |||
| 2577 | ;; Progress reporter has the following structure: | ||
| 2578 | ;; | ||
| 2579 | ;; (NEXT-UPDATE-VALUE . [NEXT-UPDATE-TIME | ||
| 2580 | ;; MIN-VALUE | ||
| 2581 | ;; MAX-VALUE | ||
| 2582 | ;; MESSAGE | ||
| 2583 | ;; MIN-CHANGE | ||
| 2584 | ;; MIN-TIME]) | ||
| 2585 | ;; | ||
| 2586 | ;; This weirdeness is for optimization reasons: we want | ||
| 2587 | ;; `progress-reporter-update' to be as fast as possible, so | ||
| 2588 | ;; `(car reporter)' is better than `(aref reporter 0)'. | ||
| 2589 | ;; | ||
| 2590 | ;; NEXT-UPDATE-TIME is a float. While `float-time' loses a couple | ||
| 2591 | ;; digits of precision, it doesn't really matter here. On the other | ||
| 2592 | ;; hand, it greatly simplifies the code. | ||
| 2593 | |||
| 2594 | (defsubst progress-reporter-update (reporter value) | ||
| 2595 | "Report progress of an operation in the echo area. | ||
| 2596 | However, if the change since last echo area update is too small | ||
| 2597 | or not enough time has passed, then do nothing (see | ||
| 2598 | `make-progress-reporter' for details). | ||
| 2599 | |||
| 2600 | First parameter, REPORTER, should be the result of a call to | ||
| 2601 | `make-progress-reporter'. Second, VALUE, determines the actual | ||
| 2602 | progress of operation; it must be between MIN-VALUE and MAX-VALUE | ||
| 2603 | as passed to `make-progress-reporter'. | ||
| 2604 | |||
| 2605 | This function is very inexpensive, you may not bother how often | ||
| 2606 | you call it." | ||
| 2607 | (when (>= value (car reporter)) | ||
| 2608 | (progress-reporter-do-update reporter value))) | ||
| 2609 | |||
| 2610 | (defun make-progress-reporter (message min-value max-value | ||
| 2611 | &optional current-value | ||
| 2612 | min-change min-time) | ||
| 2613 | "Return progress reporter object usage with `progress-reporter-update'. | ||
| 2614 | |||
| 2615 | MESSAGE is shown in the echo area. When at least 1% of operation | ||
| 2616 | is complete, the exact percentage will be appended to the | ||
| 2617 | MESSAGE. When you call `progress-reporter-done', word \"done\" | ||
| 2618 | is printed after the MESSAGE. You can change MESSAGE of an | ||
| 2619 | existing progress reporter with `progress-reporter-force-update'. | ||
| 2620 | |||
| 2621 | MIN-VALUE and MAX-VALUE designate starting (0% complete) and | ||
| 2622 | final (100% complete) states of operation. The latter should be | ||
| 2623 | larger; if this is not the case, then simply negate all values. | ||
| 2624 | Optional CURRENT-VALUE specifies the progress by the moment you | ||
| 2625 | call this function. You should omit it or set it to nil in most | ||
| 2626 | cases since it defaults to MIN-VALUE. | ||
| 2627 | |||
| 2628 | Optional MIN-CHANGE determines the minimal change in percents to | ||
| 2629 | report (default is 1%.) Optional MIN-TIME specifies the minimal | ||
| 2630 | time before echo area updates (default is 0.2 seconds.) If | ||
| 2631 | `float-time' function is not present, then time is not tracked | ||
| 2632 | at all. If OS is not capable of measuring fractions of seconds, | ||
| 2633 | then this parameter is effectively rounded up." | ||
| 2634 | |||
| 2635 | (unless min-time | ||
| 2636 | (setq min-time 0.2)) | ||
| 2637 | (let ((reporter | ||
| 2638 | (cons min-value ;; Force a call to `message' now | ||
| 2639 | (vector (if (and (fboundp 'float-time) | ||
| 2640 | (>= min-time 0.02)) | ||
| 2641 | (float-time) nil) | ||
| 2642 | min-value | ||
| 2643 | max-value | ||
| 2644 | message | ||
| 2645 | (if min-change (max (min min-change 50) 1) 1) | ||
| 2646 | min-time)))) | ||
| 2647 | (progress-reporter-update reporter (or current-value min-value)) | ||
| 2648 | reporter)) | ||
| 2649 | |||
| 2650 | (defun progress-reporter-force-update (reporter value &optional new-message) | ||
| 2651 | "Report progress of an operation in the echo area unconditionally. | ||
| 2652 | |||
| 2653 | First two parameters are the same as for | ||
| 2654 | `progress-reporter-update'. Optional NEW-MESSAGE allows you to | ||
| 2655 | change the displayed message." | ||
| 2656 | (let ((parameters (cdr reporter))) | ||
| 2657 | (when new-message | ||
| 2658 | (aset parameters 3 new-message)) | ||
| 2659 | (when (aref parameters 0) | ||
| 2660 | (aset parameters 0 (float-time))) | ||
| 2661 | (progress-reporter-do-update reporter value))) | ||
| 2662 | |||
| 2663 | (defun progress-reporter-do-update (reporter value) | ||
| 2664 | (let* ((parameters (cdr reporter)) | ||
| 2665 | (min-value (aref parameters 1)) | ||
| 2666 | (max-value (aref parameters 2)) | ||
| 2667 | (one-percent (/ (- max-value min-value) 100.0)) | ||
| 2668 | (percentage (truncate (/ (- value min-value) one-percent))) | ||
| 2669 | (update-time (aref parameters 0)) | ||
| 2670 | (current-time (float-time)) | ||
| 2671 | (enough-time-passed | ||
| 2672 | ;; See if enough time has passed since the last update. | ||
| 2673 | (or (not update-time) | ||
| 2674 | (when (>= current-time update-time) | ||
| 2675 | ;; Calculate time for the next update | ||
| 2676 | (aset parameters 0 (+ update-time (aref parameters 5))))))) | ||
| 2677 | ;; | ||
| 2678 | ;; Calculate NEXT-UPDATE-VALUE. If we are not going to print | ||
| 2679 | ;; message this time because not enough time has passed, then use | ||
| 2680 | ;; 1 instead of MIN-CHANGE. This makes delays between echo area | ||
| 2681 | ;; updates closer to MIN-TIME. | ||
| 2682 | (setcar reporter | ||
| 2683 | (min (+ min-value (* (+ percentage | ||
| 2684 | (if enough-time-passed | ||
| 2685 | (aref parameters 4) ;; MIN-CHANGE | ||
| 2686 | 1)) | ||
| 2687 | one-percent)) | ||
| 2688 | max-value)) | ||
| 2689 | (when (integerp value) | ||
| 2690 | (setcar reporter (ceiling (car reporter)))) | ||
| 2691 | ;; | ||
| 2692 | ;; Only print message if enough time has passed | ||
| 2693 | (when enough-time-passed | ||
| 2694 | (if (> percentage 0) | ||
| 2695 | (message "%s%d%%" (aref parameters 3) percentage) | ||
| 2696 | (message "%s" (aref parameters 3)))))) | ||
| 2697 | |||
| 2698 | (defun progress-reporter-done (reporter) | ||
| 2699 | "Print reporter's message followed by word \"done\" in echo area." | ||
| 2700 | (message "%sdone" (aref (cdr reporter) 3))) | ||
| 2701 | |||
| 2655 | ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc | 2702 | ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc |
| 2656 | ;;; subr.el ends here | 2703 | ;;; subr.el ends here |
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index a2e9ac8fff6..181fc9baca5 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el | |||
| @@ -405,11 +405,12 @@ MODE should be an integer which is a file mode value." | |||
| 405 | Place a dired-like listing on the front; | 405 | Place a dired-like listing on the front; |
| 406 | then narrow to it, so that only that listing | 406 | then narrow to it, so that only that listing |
| 407 | is visible (and the real data of the buffer is hidden)." | 407 | is visible (and the real data of the buffer is hidden)." |
| 408 | (message "Parsing tar file...") | 408 | (set-buffer-multibyte nil) |
| 409 | (let* ((result '()) | 409 | (let* ((result '()) |
| 410 | (pos (point-min)) | 410 | (pos (point-min)) |
| 411 | (bs (max 1 (- (buffer-size) 1024))) ; always 2+ empty blocks at end. | 411 | (progress-reporter |
| 412 | (bs100 (max 1 (/ bs 100))) | 412 | (make-progress-reporter "Parsing tar file..." |
| 413 | (point-min) (max 1 (- (buffer-size) 1024)))) | ||
| 413 | tokens) | 414 | tokens) |
| 414 | (while (and (<= (+ pos 512) (point-max)) | 415 | (while (and (<= (+ pos 512) (point-max)) |
| 415 | (not (eq 'empty-tar-block | 416 | (not (eq 'empty-tar-block |
| @@ -417,10 +418,7 @@ is visible (and the real data of the buffer is hidden)." | |||
| 417 | (tar-header-block-tokenize | 418 | (tar-header-block-tokenize |
| 418 | (buffer-substring pos (+ pos 512))))))) | 419 | (buffer-substring pos (+ pos 512))))))) |
| 419 | (setq pos (+ pos 512)) | 420 | (setq pos (+ pos 512)) |
| 420 | (message "Parsing tar file...%d%%" | 421 | (progress-reporter-update progress-reporter pos) |
| 421 | ;(/ (* pos 100) bs) ; this gets round-off lossage | ||
| 422 | (/ pos bs100) ; this doesn't | ||
| 423 | ) | ||
| 424 | (if (eq (tar-header-link-type tokens) 20) | 422 | (if (eq (tar-header-link-type tokens) 20) |
| 425 | ;; Foo. There's an extra empty block after these. | 423 | ;; Foo. There's an extra empty block after these. |
| 426 | (setq pos (+ pos 512))) | 424 | (setq pos (+ pos 512))) |
| @@ -447,7 +445,7 @@ is visible (and the real data of the buffer is hidden)." | |||
| 447 | ;; A tar file should end with a block or two of nulls, | 445 | ;; A tar file should end with a block or two of nulls, |
| 448 | ;; but let's not get a fatal error if it doesn't. | 446 | ;; but let's not get a fatal error if it doesn't. |
| 449 | (if (eq tokens 'empty-tar-block) | 447 | (if (eq tokens 'empty-tar-block) |
| 450 | (message "Parsing tar file...done") | 448 | (progress-reporter-done progress-reporter) |
| 451 | (message "Warning: premature EOF parsing tar file"))) | 449 | (message "Warning: premature EOF parsing tar file"))) |
| 452 | (save-excursion | 450 | (save-excursion |
| 453 | (goto-char (point-min)) | 451 | (goto-char (point-min)) |
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el index c2ed47cb48d..71bb6cf137d 100644 --- a/lisp/textmodes/enriched.el +++ b/lisp/textmodes/enriched.el | |||
| @@ -258,8 +258,8 @@ Commands: | |||
| 258 | (define-key enriched-mode-map "\M-j" 'facemenu-justification-menu) | 258 | (define-key enriched-mode-map "\M-j" 'facemenu-justification-menu) |
| 259 | (define-key enriched-mode-map "\M-S" 'set-justification-center) | 259 | (define-key enriched-mode-map "\M-S" 'set-justification-center) |
| 260 | (define-key enriched-mode-map "\C-x\t" 'increase-left-margin) | 260 | (define-key enriched-mode-map "\C-x\t" 'increase-left-margin) |
| 261 | (define-key enriched-mode-map "\C-c\C-l" 'set-left-margin) | 261 | (define-key enriched-mode-map "\C-c[" 'set-left-margin) |
| 262 | (define-key enriched-mode-map "\C-c\C-r" 'set-right-margin) | 262 | (define-key enriched-mode-map "\C-c]" 'set-right-margin) |
| 263 | 263 | ||
| 264 | ;;; | 264 | ;;; |
| 265 | ;;; Some functions dealing with text-properties, especially indentation | 265 | ;;; Some functions dealing with text-properties, especially indentation |
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 868dcb2d107..206f7a42f78 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; paragraphs.el --- paragraph and sentence parsing | 1 | ;;; paragraphs.el --- paragraph and sentence parsing |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1985, 86, 87, 91, 94, 95, 96, 1997, 1999, 2000, 2001 | 3 | ;; Copyright (C) 1985, 86, 87, 91, 94, 95, 96, 1997, 1999, 2000, 2001, 2004 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -122,8 +122,8 @@ This is relevant for filling. See also `sentence-end-without-period' | |||
| 122 | and `colon-double-space'. | 122 | and `colon-double-space'. |
| 123 | 123 | ||
| 124 | This value is used by the function `sentence-end' to construct the | 124 | This value is used by the function `sentence-end' to construct the |
| 125 | regexp describing the end of a sentence, in case when the value of | 125 | regexp describing the end of a sentence, when the value of the variable |
| 126 | the variable `sentence-end' is nil. See Info node `Sentences'." | 126 | `sentence-end' is nil. See Info node `(elisp)Standard Regexps'." |
| 127 | :type 'boolean | 127 | :type 'boolean |
| 128 | :group 'fill) | 128 | :group 'fill) |
| 129 | 129 | ||
| @@ -133,18 +133,18 @@ For example, a sentence in Thai text ends with double space but | |||
| 133 | without a period. | 133 | without a period. |
| 134 | 134 | ||
| 135 | This value is used by the function `sentence-end' to construct the | 135 | This value is used by the function `sentence-end' to construct the |
| 136 | regexp describing the end of a sentence, in case when the value of | 136 | regexp describing the end of a sentence, when the value of the variable |
| 137 | the variable `sentence-end' is nil. See Info node `Sentences'." | 137 | `sentence-end' is nil. See Info node `(elisp)Standard Regexps'." |
| 138 | :type 'boolean | 138 | :type 'boolean |
| 139 | :group 'fill) | 139 | :group 'fill) |
| 140 | 140 | ||
| 141 | (defcustom sentence-end-without-space | 141 | (defcustom sentence-end-without-space |
| 142 | "$B!#!%!)!*$A!##.#?#!$(0!$!%!)!*$(G!$!%!)!*(B" | 142 | "$B!#!%!)!*$A!##.#?#!$(0!$!%!)!*$(G!$!%!)!*(B" |
| 143 | "*String containing characters that end sentence without following spaces. | 143 | "*String of characters that end sentence without following spaces. |
| 144 | 144 | ||
| 145 | This value is used by the function `sentence-end' to construct the | 145 | This value is used by the function `sentence-end' to construct the |
| 146 | regexp describing the end of a sentence, in case when the value of | 146 | regexp describing the end of a sentence, when the value of the variable |
| 147 | the variable `sentence-end' is nil. See Info node `Sentences'." | 147 | `sentence-end' is nil. See Info node `(elisp)Standard Regexps'." |
| 148 | :group 'paragraphs | 148 | :group 'paragraphs |
| 149 | :type 'string) | 149 | :type 'string) |
| 150 | 150 | ||
| @@ -169,7 +169,7 @@ and `sentence-end-without-space'. The default value specifies | |||
| 169 | that in order to be recognized as the end of a sentence, the | 169 | that in order to be recognized as the end of a sentence, the |
| 170 | ending period, question mark, or exclamation point must be | 170 | ending period, question mark, or exclamation point must be |
| 171 | followed by two spaces, unless it's inside some sort of quotes or | 171 | followed by two spaces, unless it's inside some sort of quotes or |
| 172 | parenthesis. See Info node `Sentences'." | 172 | parenthesis. See Info node `(elisp)Standard Regexps'." |
| 173 | (or sentence-end | 173 | (or sentence-end |
| 174 | (concat (if sentence-end-without-period "\\w \\|") | 174 | (concat (if sentence-end-without-period "\\w \\|") |
| 175 | "\\([.?!][]\"'\xd0c9\x5397d)}]*" | 175 | "\\([.?!][]\"'\xd0c9\x5397d)}]*" |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 24347479e57..5a8d0df40d1 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -500,6 +500,11 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 500 | 1 font-lock-function-name-face)))) | 500 | 1 font-lock-function-name-face)))) |
| 501 | "Subdued expressions to highlight in TeX modes.") | 501 | "Subdued expressions to highlight in TeX modes.") |
| 502 | 502 | ||
| 503 | (defun tex-font-lock-append-prop (prop) | ||
| 504 | (unless (memq (get-text-property (match-end 1) 'face) | ||
| 505 | '(font-lock-comment-face tex-verbatim-face)) | ||
| 506 | prop)) | ||
| 507 | |||
| 503 | (defconst tex-font-lock-keywords-2 | 508 | (defconst tex-font-lock-keywords-2 |
| 504 | (append tex-font-lock-keywords-1 | 509 | (append tex-font-lock-keywords-1 |
| 505 | (eval-when-compile | 510 | (eval-when-compile |
| @@ -553,16 +558,19 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 553 | ;; | 558 | ;; |
| 554 | ;; Font environments. It seems a bit dubious to use `bold' etc. faces | 559 | ;; Font environments. It seems a bit dubious to use `bold' etc. faces |
| 555 | ;; since we might not be able to display those fonts. | 560 | ;; since we might not be able to display those fonts. |
| 556 | (list (concat slash bold " *" arg) 2 '(quote bold) 'append) | 561 | (list (concat slash bold " *" arg) 2 |
| 557 | (list (concat slash italic " *" arg) 2 '(quote italic) 'append) | 562 | '(tex-font-lock-append-prop 'bold) 'append) |
| 563 | (list (concat slash italic " *" arg) 2 | ||
| 564 | '(tex-font-lock-append-prop 'italic) 'append) | ||
| 558 | ;; (list (concat slash type arg) 2 '(quote bold-italic) 'append) | 565 | ;; (list (concat slash type arg) 2 '(quote bold-italic) 'append) |
| 559 | ;; | 566 | ;; |
| 560 | ;; Old-style bf/em/it/sl. Stop at `\\' and un-escaped `&', for tables. | 567 | ;; Old-style bf/em/it/sl. Stop at `\\' and un-escaped `&', for tables. |
| 561 | (list (concat "\\\\\\(em\\|it\\|sl\\)\\>" args) | 568 | (list (concat "\\\\\\(em\\|it\\|sl\\)\\>" args) |
| 562 | 2 '(quote italic) 'append) | 569 | 2 '(tex-font-lock-append-prop 'italic) 'append) |
| 563 | ;; This is separate from the previous one because of cases like | 570 | ;; This is separate from the previous one because of cases like |
| 564 | ;; {\em foo {\bf bar} bla} where both match. | 571 | ;; {\em foo {\bf bar} bla} where both match. |
| 565 | (list (concat "\\\\bf\\>" args) 1 '(quote bold) 'append))))) | 572 | (list (concat "\\\\\\(bf\\)\\>" args) |
| 573 | 2 '(tex-font-lock-append-prop 'bold) 'append))))) | ||
| 566 | "Gaudy expressions to highlight in TeX modes.") | 574 | "Gaudy expressions to highlight in TeX modes.") |
| 567 | 575 | ||
| 568 | (defun tex-font-lock-suscript (pos) | 576 | (defun tex-font-lock-suscript (pos) |
| @@ -604,11 +612,14 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 604 | (defvar tex-font-lock-syntactic-keywords | 612 | (defvar tex-font-lock-syntactic-keywords |
| 605 | (let ((verbs (regexp-opt tex-verbatim-environments t))) | 613 | (let ((verbs (regexp-opt tex-verbatim-environments t))) |
| 606 | `((,(concat "^\\\\begin *{" verbs "}.*\\(\n\\)") 2 "|") | 614 | `((,(concat "^\\\\begin *{" verbs "}.*\\(\n\\)") 2 "|") |
| 607 | (,(concat "^\\\\end *{" verbs "}\\(.?\\)") 2 | 615 | ;; Technically, we'd like to put the "|" property on the \n preceding |
| 608 | (unless (<= (match-beginning 0) (point-min)) | 616 | ;; the \end, but this would have 2 disadvantages: |
| 609 | (put-text-property (1- (match-beginning 0)) (match-beginning 0) | 617 | ;; 1 - it's wrong if the verbatim env is empty (the same \n is used to |
| 610 | 'syntax-table (string-to-syntax "|")) | 618 | ;; start and end the fenced-string). |
| 611 | "<")) | 619 | ;; 2 - font-lock considers the preceding \n as being part of the |
| 620 | ;; preceding line, so things gets screwed every time the previous | ||
| 621 | ;; line is re-font-locked on its own. | ||
| 622 | (,(concat "^\\(\\\\\\)end *{" verbs "}\\(.?\\)") (1 "|") (3 "<")) | ||
| 612 | ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b") | 623 | ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b") |
| 613 | ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b") | 624 | ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b") |
| 614 | ("\\\\verb\\**\\([^a-z@*]\\)" 1 "\"")))) | 625 | ("\\\\verb\\**\\([^a-z@*]\\)" 1 "\"")))) |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 69851ac5046..91a6c869a21 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,64 @@ | |||
| 1 | 2004-10-12 Simon Josefsson <jas@extundo.com> | ||
| 2 | |||
| 3 | * url-vars.el (url-gateway-method): Add new method `tls'. | ||
| 4 | |||
| 5 | * url-news.el (url-snews): Use nntp-open-tls-stream if | ||
| 6 | url-gateway-method is tls. | ||
| 7 | |||
| 8 | * url-ldap.el (url-ldap-certificate-formatter): Use | ||
| 9 | tls-certificate-information if ssl.el is not available. | ||
| 10 | |||
| 11 | * url-https.el (url-https-create-secure-wrapper): Use tls if ssl | ||
| 12 | is not available. | ||
| 13 | |||
| 14 | * url-gw.el (url-open-stream): Support tls url-gateway-method. | ||
| 15 | (url-open-stream): Likewise. | ||
| 16 | |||
| 17 | 2004-10-10 Lars Hansen <larsh@math.ku.dk> | ||
| 18 | |||
| 19 | * url-auth.el: Fix copyright notice. | ||
| 20 | |||
| 21 | * url-cache.el: Fix copyright notice. | ||
| 22 | |||
| 23 | * url-cookie.el: Fix copyright notice. | ||
| 24 | |||
| 25 | * url-dired.el: Fix copyright notice. | ||
| 26 | |||
| 27 | * url-file.el: Fix copyright notice. | ||
| 28 | |||
| 29 | * url-ftp.el: Fix copyright notice. | ||
| 30 | |||
| 31 | * url-handlers.el: Fix copyright notice. | ||
| 32 | |||
| 33 | * url-history.el: Fix copyright notice. | ||
| 34 | |||
| 35 | * url-irc.el: Fix copyright notice. | ||
| 36 | |||
| 37 | * url-mailto.el: Fix copyright notice. | ||
| 38 | |||
| 39 | * url-methods.el: Fix copyright notice. | ||
| 40 | |||
| 41 | * url-misc.el: Fix copyright notice. | ||
| 42 | |||
| 43 | * url-news.el: Fix copyright notice. | ||
| 44 | |||
| 45 | * url-nfs.el: Fix copyright notice. | ||
| 46 | |||
| 47 | * url-parse.el: Fix copyright notice. | ||
| 48 | |||
| 49 | * url-privacy.el: Fix copyright notice. | ||
| 50 | |||
| 51 | * url-vars.el: Fix copyright notice. | ||
| 52 | |||
| 53 | * url.el: Fix copyright notice. | ||
| 54 | |||
| 55 | * url-util.el: Fix copyright notice. | ||
| 56 | |||
| 57 | 2004-10-06 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 58 | |||
| 59 | * url-handlers.el (url-insert-file-contents): Use the URL to decide the | ||
| 60 | encoding, not the buffer-file-name (which might not even exist). | ||
| 61 | |||
| 1 | 2004-09-20 Stefan Monnier <monnier@iro.umontreal.ca> | 62 | 2004-09-20 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 63 | ||
| 3 | * url-handlers.el (url-insert-file-contents): Decode contents. | 64 | * url-handlers.el (url-insert-file-contents): Decode contents. |
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el new file mode 100644 index 00000000000..39bb730bebc --- /dev/null +++ b/lisp/url/url-auth.el | |||
| @@ -0,0 +1,316 @@ | |||
| 1 | ;;; url-auth.el --- Uniform Resource Locator authorization modules | ||
| 2 | ;; Keywords: comm, data, processes, hypermedia | ||
| 3 | |||
| 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 5 | ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. | ||
| 6 | ;;; | ||
| 7 | ;;; This file is part of GNU Emacs. | ||
| 8 | ;;; | ||
| 9 | ;;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;;; any later version. | ||
| 13 | ;;; | ||
| 14 | ;;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;;; GNU General Public License for more details. | ||
| 18 | ;;; | ||
| 19 | ;;; You should have received a copy of the GNU General Public License | ||
| 20 | ;;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;;; Boston, MA 02111-1307, USA. | ||
| 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 24 | |||
| 25 | (require 'url-vars) | ||
| 26 | (require 'url-parse) | ||
| 27 | (autoload 'url-warn "url") | ||
| 28 | |||
| 29 | (defsubst url-auth-user-prompt (url realm) | ||
| 30 | "String to usefully prompt for a username." | ||
| 31 | (concat "Username [for " | ||
| 32 | (or realm (url-truncate-url-for-viewing | ||
| 33 | (url-recreate-url url) | ||
| 34 | (- (window-width) 10 20))) | ||
| 35 | "]: ")) | ||
| 36 | |||
| 37 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 38 | ;;; Basic authorization code | ||
| 39 | ;;; ------------------------ | ||
| 40 | ;;; This implements the BASIC authorization type. See the online | ||
| 41 | ;;; documentation at | ||
| 42 | ;;; http://www.w3.org/hypertext/WWW/AccessAuthorization/Basic.html | ||
| 43 | ;;; for the complete documentation on this type. | ||
| 44 | ;;; | ||
| 45 | ;;; This is very insecure, but it works as a proof-of-concept | ||
| 46 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 47 | (defvar url-basic-auth-storage 'url-http-real-basic-auth-storage | ||
| 48 | "Where usernames and passwords are stored. | ||
| 49 | |||
| 50 | Must be a symbol pointing to another variable that will actually store | ||
| 51 | the information. The value of this variable is an assoc list of assoc | ||
| 52 | lists. The first assoc list is keyed by the server name. The cdr of | ||
| 53 | this is an assoc list based on the 'directory' specified by the url we | ||
| 54 | are looking up.") | ||
| 55 | |||
| 56 | (defun url-basic-auth (url &optional prompt overwrite realm args) | ||
| 57 | "Get the username/password for the specified URL. | ||
| 58 | If optional argument PROMPT is non-nil, ask for the username/password | ||
| 59 | to use for the url and its descendants. If optional third argument | ||
| 60 | OVERWRITE is non-nil, overwrite the old username/password pair if it | ||
| 61 | is found in the assoc list. If REALM is specified, use that as the realm | ||
| 62 | instead of the pathname inheritance method." | ||
| 63 | (let* ((href (if (stringp url) | ||
| 64 | (url-generic-parse-url url) | ||
| 65 | url)) | ||
| 66 | (server (url-host href)) | ||
| 67 | (port (url-port href)) | ||
| 68 | (path (url-filename href)) | ||
| 69 | user pass byserv retval data) | ||
| 70 | (setq server (format "%s:%d" server port) | ||
| 71 | path (cond | ||
| 72 | (realm realm) | ||
| 73 | ((string-match "/$" path) path) | ||
| 74 | (t (url-basepath path))) | ||
| 75 | byserv (cdr-safe (assoc server | ||
| 76 | (symbol-value url-basic-auth-storage)))) | ||
| 77 | (cond | ||
| 78 | ((and prompt (not byserv)) | ||
| 79 | (setq user (read-string (url-auth-user-prompt url realm) | ||
| 80 | (user-real-login-name)) | ||
| 81 | pass (funcall url-passwd-entry-func "Password: ")) | ||
| 82 | (set url-basic-auth-storage | ||
| 83 | (cons (list server | ||
| 84 | (cons path | ||
| 85 | (setq retval | ||
| 86 | (base64-encode-string | ||
| 87 | (format "%s:%s" user pass))))) | ||
| 88 | (symbol-value url-basic-auth-storage)))) | ||
| 89 | (byserv | ||
| 90 | (setq retval (cdr-safe (assoc path byserv))) | ||
| 91 | (if (and (not retval) | ||
| 92 | (string-match "/" path)) | ||
| 93 | (while (and byserv (not retval)) | ||
| 94 | (setq data (car (car byserv))) | ||
| 95 | (if (or (not (string-match "/" data)) ; Its a realm - take it! | ||
| 96 | (and | ||
| 97 | (>= (length path) (length data)) | ||
| 98 | (string= data (substring path 0 (length data))))) | ||
| 99 | (setq retval (cdr (car byserv)))) | ||
| 100 | (setq byserv (cdr byserv)))) | ||
| 101 | (if (or (and (not retval) prompt) overwrite) | ||
| 102 | (progn | ||
| 103 | (setq user (read-string (url-auth-user-prompt url realm) | ||
| 104 | (user-real-login-name)) | ||
| 105 | pass (funcall url-passwd-entry-func "Password: ") | ||
| 106 | retval (base64-encode-string (format "%s:%s" user pass)) | ||
| 107 | byserv (assoc server (symbol-value url-basic-auth-storage))) | ||
| 108 | (setcdr byserv | ||
| 109 | (cons (cons path retval) (cdr byserv)))))) | ||
| 110 | (t (setq retval nil))) | ||
| 111 | (if retval (setq retval (concat "Basic " retval))) | ||
| 112 | retval)) | ||
| 113 | |||
| 114 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 115 | ;;; Digest authorization code | ||
| 116 | ;;; ------------------------ | ||
| 117 | ;;; This implements the DIGEST authorization type. See the internet draft | ||
| 118 | ;;; ftp://ds.internic.net/internet-drafts/draft-ietf-http-digest-aa-01.txt | ||
| 119 | ;;; for the complete documentation on this type. | ||
| 120 | ;;; | ||
| 121 | ;;; This is very secure | ||
| 122 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 123 | (defvar url-digest-auth-storage nil | ||
| 124 | "Where usernames and passwords are stored. Its value is an assoc list of | ||
| 125 | assoc lists. The first assoc list is keyed by the server name. The cdr of | ||
| 126 | this is an assoc list based on the 'directory' specified by the url we are | ||
| 127 | looking up.") | ||
| 128 | |||
| 129 | (defun url-digest-auth-create-key (username password realm method uri) | ||
| 130 | "Create a key for digest authentication method" | ||
| 131 | (let* ((info (if (stringp uri) | ||
| 132 | (url-generic-parse-url uri) | ||
| 133 | uri)) | ||
| 134 | (a1 (md5 (concat username ":" realm ":" password))) | ||
| 135 | (a2 (md5 (concat method ":" (url-filename info))))) | ||
| 136 | (list a1 a2))) | ||
| 137 | |||
| 138 | (defun url-digest-auth (url &optional prompt overwrite realm args) | ||
| 139 | "Get the username/password for the specified URL. | ||
| 140 | If optional argument PROMPT is non-nil, ask for the username/password | ||
| 141 | to use for the url and its descendants. If optional third argument | ||
| 142 | OVERWRITE is non-nil, overwrite the old username/password pair if it | ||
| 143 | is found in the assoc list. If REALM is specified, use that as the realm | ||
| 144 | instead of hostname:portnum." | ||
| 145 | (if args | ||
| 146 | (let* ((href (if (stringp url) | ||
| 147 | (url-generic-parse-url url) | ||
| 148 | url)) | ||
| 149 | (server (url-host href)) | ||
| 150 | (port (url-port href)) | ||
| 151 | (path (url-filename href)) | ||
| 152 | user pass byserv retval data) | ||
| 153 | (setq path (cond | ||
| 154 | (realm realm) | ||
| 155 | ((string-match "/$" path) path) | ||
| 156 | (t (url-basepath path))) | ||
| 157 | server (format "%s:%d" server port) | ||
| 158 | byserv (cdr-safe (assoc server url-digest-auth-storage))) | ||
| 159 | (cond | ||
| 160 | ((and prompt (not byserv)) | ||
| 161 | (setq user (read-string (url-auth-user-prompt url realm) | ||
| 162 | (user-real-login-name)) | ||
| 163 | pass (funcall url-passwd-entry-func "Password: ") | ||
| 164 | url-digest-auth-storage | ||
| 165 | (cons (list server | ||
| 166 | (cons path | ||
| 167 | (setq retval | ||
| 168 | (cons user | ||
| 169 | (url-digest-auth-create-key | ||
| 170 | user pass realm | ||
| 171 | (or url-request-method "GET") | ||
| 172 | url))))) | ||
| 173 | url-digest-auth-storage))) | ||
| 174 | (byserv | ||
| 175 | (setq retval (cdr-safe (assoc path byserv))) | ||
| 176 | (if (and (not retval) ; no exact match, check directories | ||
| 177 | (string-match "/" path)) ; not looking for a realm | ||
| 178 | (while (and byserv (not retval)) | ||
| 179 | (setq data (car (car byserv))) | ||
| 180 | (if (or (not (string-match "/" data)) | ||
| 181 | (and | ||
| 182 | (>= (length path) (length data)) | ||
| 183 | (string= data (substring path 0 (length data))))) | ||
| 184 | (setq retval (cdr (car byserv)))) | ||
| 185 | (setq byserv (cdr byserv)))) | ||
| 186 | (if (or (and (not retval) prompt) overwrite) | ||
| 187 | (progn | ||
| 188 | (setq user (read-string (url-auth-user-prompt url realm) | ||
| 189 | (user-real-login-name)) | ||
| 190 | pass (funcall url-passwd-entry-func "Password: ") | ||
| 191 | retval (setq retval | ||
| 192 | (cons user | ||
| 193 | (url-digest-auth-create-key | ||
| 194 | user pass realm | ||
| 195 | (or url-request-method "GET") | ||
| 196 | url))) | ||
| 197 | byserv (assoc server url-digest-auth-storage)) | ||
| 198 | (setcdr byserv | ||
| 199 | (cons (cons path retval) (cdr byserv)))))) | ||
| 200 | (t (setq retval nil))) | ||
| 201 | (if retval | ||
| 202 | (let ((nonce (or (cdr-safe (assoc "nonce" args)) "nonegiven")) | ||
| 203 | (opaque (or (cdr-safe (assoc "opaque" args)) "nonegiven"))) | ||
| 204 | (format | ||
| 205 | (concat "Digest username=\"%s\", realm=\"%s\"," | ||
| 206 | "nonce=\"%s\", uri=\"%s\"," | ||
| 207 | "response=\"%s\", opaque=\"%s\"") | ||
| 208 | (nth 0 retval) realm nonce (url-filename href) | ||
| 209 | (md5 (concat (nth 1 retval) ":" nonce ":" | ||
| 210 | (nth 2 retval))) opaque)))))) | ||
| 211 | |||
| 212 | (defvar url-registered-auth-schemes nil | ||
| 213 | "A list of the registered authorization schemes and various and sundry | ||
| 214 | information associated with them.") | ||
| 215 | |||
| 216 | ;;;###autoload | ||
| 217 | (defun url-get-authentication (url realm type prompt &optional args) | ||
| 218 | "Return an authorization string suitable for use in the WWW-Authenticate | ||
| 219 | header in an HTTP/1.0 request. | ||
| 220 | |||
| 221 | URL is the url you are requesting authorization to. This can be either a | ||
| 222 | string representing the URL, or the parsed representation returned by | ||
| 223 | `url-generic-parse-url' | ||
| 224 | REALM is the realm at a specific site we are looking for. This should be a | ||
| 225 | string specifying the exact realm, or nil or the symbol 'any' to | ||
| 226 | specify that the filename portion of the URL should be used as the | ||
| 227 | realm | ||
| 228 | TYPE is the type of authentication to be returned. This is either a string | ||
| 229 | representing the type (basic, digest, etc), or nil or the symbol 'any' | ||
| 230 | to specify that any authentication is acceptable. If requesting 'any' | ||
| 231 | the strongest matching authentication will be returned. If this is | ||
| 232 | wrong, its no big deal, the error from the server will specify exactly | ||
| 233 | what type of auth to use | ||
| 234 | PROMPT is boolean - specifies whether to ask the user for a username/password | ||
| 235 | if one cannot be found in the cache" | ||
| 236 | (if (not realm) | ||
| 237 | (setq realm (cdr-safe (assoc "realm" args)))) | ||
| 238 | (if (stringp url) | ||
| 239 | (setq url (url-generic-parse-url url))) | ||
| 240 | (if (or (null type) (eq type 'any)) | ||
| 241 | ;; Whooo doogies! | ||
| 242 | ;; Go through and get _all_ the authorization strings that could apply | ||
| 243 | ;; to this URL, store them along with the 'rating' we have in the list | ||
| 244 | ;; of schemes, then sort them so that the 'best' is at the front of the | ||
| 245 | ;; list, then get the car, then get the cdr. | ||
| 246 | ;; Zooom zooom zoooooom | ||
| 247 | (cdr-safe | ||
| 248 | (car-safe | ||
| 249 | (sort | ||
| 250 | (mapcar | ||
| 251 | (function | ||
| 252 | (lambda (scheme) | ||
| 253 | (if (fboundp (car (cdr scheme))) | ||
| 254 | (cons (cdr (cdr scheme)) | ||
| 255 | (funcall (car (cdr scheme)) url nil nil realm)) | ||
| 256 | (cons 0 nil)))) | ||
| 257 | url-registered-auth-schemes) | ||
| 258 | (function | ||
| 259 | (lambda (x y) | ||
| 260 | (cond | ||
| 261 | ((null (cdr x)) nil) | ||
| 262 | ((and (cdr x) (null (cdr y))) t) | ||
| 263 | ((and (cdr x) (cdr y)) | ||
| 264 | (>= (car x) (car y))) | ||
| 265 | (t nil))))))) | ||
| 266 | (if (symbolp type) (setq type (symbol-name type))) | ||
| 267 | (let* ((scheme (car-safe | ||
| 268 | (cdr-safe (assoc (downcase type) | ||
| 269 | url-registered-auth-schemes))))) | ||
| 270 | (if (and scheme (fboundp scheme)) | ||
| 271 | (funcall scheme url prompt | ||
| 272 | (and prompt | ||
| 273 | (funcall scheme url nil nil realm args)) | ||
| 274 | realm args))))) | ||
| 275 | |||
| 276 | ;;;###autoload | ||
| 277 | (defun url-register-auth-scheme (type &optional function rating) | ||
| 278 | "Register an HTTP authentication method. | ||
| 279 | |||
| 280 | TYPE is a string or symbol specifying the name of the method. This | ||
| 281 | should be the same thing you expect to get returned in an Authenticate | ||
| 282 | header in HTTP/1.0 - it will be downcased. | ||
| 283 | FUNCTION is the function to call to get the authorization information. This | ||
| 284 | defaults to `url-?-auth', where ? is TYPE | ||
| 285 | RATING a rating between 1 and 10 of the strength of the authentication. | ||
| 286 | This is used when asking for the best authentication for a specific | ||
| 287 | URL. The item with the highest rating is returned." | ||
| 288 | (let* ((type (cond | ||
| 289 | ((stringp type) (downcase type)) | ||
| 290 | ((symbolp type) (downcase (symbol-name type))) | ||
| 291 | (t (error "Bad call to `url-register-auth-scheme'")))) | ||
| 292 | (function (or function (intern (concat "url-" type "-auth")))) | ||
| 293 | (rating (cond | ||
| 294 | ((null rating) 2) | ||
| 295 | ((stringp rating) (string-to-int rating)) | ||
| 296 | (t rating))) | ||
| 297 | (node (assoc type url-registered-auth-schemes))) | ||
| 298 | (if (not (fboundp function)) | ||
| 299 | (url-warn 'security | ||
| 300 | (format (concat | ||
| 301 | "Tried to register `%s' as an auth scheme" | ||
| 302 | ", but it is not a function!") function))) | ||
| 303 | |||
| 304 | (if node | ||
| 305 | (setcdr node (cons function rating)) | ||
| 306 | (setq url-registered-auth-schemes | ||
| 307 | (cons (cons type (cons function rating)) | ||
| 308 | url-registered-auth-schemes))))) | ||
| 309 | |||
| 310 | (defun url-auth-registered (scheme) | ||
| 311 | ;; Return non-nil iff SCHEME is registered as an auth type | ||
| 312 | (assoc scheme url-registered-auth-schemes)) | ||
| 313 | |||
| 314 | (provide 'url-auth) | ||
| 315 | |||
| 316 | ;;; arch-tag: 04058625-616d-44e4-9dbf-4b46b00b2a91 | ||
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el new file mode 100644 index 00000000000..1e3374639e1 --- /dev/null +++ b/lisp/url/url-cache.el | |||
| @@ -0,0 +1,202 @@ | |||
| 1 | ;;; url-cache.el --- Uniform Resource Locator retrieval tool | ||
| 2 | ;; Keywords: comm, data, processes, hypermedia | ||
| 3 | |||
| 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 5 | ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. | ||
| 6 | ;;; | ||
| 7 | ;;; This file is part of GNU Emacs. | ||
| 8 | ;;; | ||
| 9 | ;;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;;; any later version. | ||
| 13 | ;;; | ||
| 14 | ;;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;;; GNU General Public License for more details. | ||
| 18 | ;;; | ||
| 19 | ;;; You should have received a copy of the GNU General Public License | ||
| 20 | ;;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;;; Boston, MA 02111-1307, USA. | ||
| 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 24 | (require 'url-parse) | ||
| 25 | (require 'url-util) | ||
| 26 | |||
| 27 | (defcustom url-cache-directory | ||
| 28 | (expand-file-name "cache" url-configuration-directory) | ||
| 29 | "*The directory where cache files should be stored." | ||
| 30 | :type 'directory | ||
| 31 | :group 'url-file) | ||
| 32 | |||
| 33 | ;; Cache manager | ||
| 34 | (defun url-cache-file-writable-p (file) | ||
| 35 | "Follows the documentation of `file-writable-p', unlike `file-writable-p'." | ||
| 36 | (and (file-writable-p file) | ||
| 37 | (if (file-exists-p file) | ||
| 38 | (not (file-directory-p file)) | ||
| 39 | (file-directory-p (file-name-directory file))))) | ||
| 40 | |||
| 41 | (defun url-cache-prepare (file) | ||
| 42 | "Makes it possible to cache data in FILE. | ||
| 43 | Creates any necessary parent directories, deleting any non-directory files | ||
| 44 | that would stop this. Returns nil if parent directories can not be | ||
| 45 | created. If FILE already exists as a non-directory, it changes | ||
| 46 | permissions of FILE or deletes FILE to make it possible to write a new | ||
| 47 | version of FILE. Returns nil if this can not be done. Returns nil if | ||
| 48 | FILE already exists as a directory. Otherwise, returns t, indicating that | ||
| 49 | FILE can be created or overwritten." | ||
| 50 | (cond | ||
| 51 | ((url-cache-file-writable-p file) | ||
| 52 | t) | ||
| 53 | ((file-directory-p file) | ||
| 54 | nil) | ||
| 55 | (t | ||
| 56 | (condition-case () | ||
| 57 | (or (make-directory (file-name-directory file) t) t) | ||
| 58 | (error nil))))) | ||
| 59 | |||
| 60 | ;;;###autoload | ||
| 61 | (defun url-store-in-cache (&optional buff) | ||
| 62 | "Store buffer BUFF in the cache." | ||
| 63 | (if (not (and buff (get-buffer buff))) | ||
| 64 | nil | ||
| 65 | (save-excursion | ||
| 66 | (and buff (set-buffer buff)) | ||
| 67 | (let* ((fname (url-cache-create-filename (url-view-url t)))) | ||
| 68 | (if (url-cache-prepare fname) | ||
| 69 | (let ((coding-system-for-write 'binary)) | ||
| 70 | (write-region (point-min) (point-max) fname nil 5))))))) | ||
| 71 | |||
| 72 | ;;;###autoload | ||
| 73 | (defun url-is-cached (url) | ||
| 74 | "Return non-nil if the URL is cached." | ||
| 75 | (let* ((fname (url-cache-create-filename url)) | ||
| 76 | (attribs (file-attributes fname))) | ||
| 77 | (and fname ; got a filename | ||
| 78 | (file-exists-p fname) ; file exists | ||
| 79 | (not (eq (nth 0 attribs) t)) ; Its not a directory | ||
| 80 | (nth 5 attribs)))) ; Can get last mod-time | ||
| 81 | |||
| 82 | (defun url-cache-create-filename-human-readable (url) | ||
| 83 | "Return a filename in the local cache for URL" | ||
| 84 | (if url | ||
| 85 | (let* ((url (if (vectorp url) (url-recreate-url url) url)) | ||
| 86 | (urlobj (url-generic-parse-url url)) | ||
| 87 | (protocol (url-type urlobj)) | ||
| 88 | (hostname (url-host urlobj)) | ||
| 89 | (host-components | ||
| 90 | (cons | ||
| 91 | (user-real-login-name) | ||
| 92 | (cons (or protocol "file") | ||
| 93 | (reverse (split-string (or hostname "localhost") | ||
| 94 | (eval-when-compile | ||
| 95 | (regexp-quote "."))))))) | ||
| 96 | (fname (url-filename urlobj))) | ||
| 97 | (if (and fname (/= (length fname) 0) (= (aref fname 0) ?/)) | ||
| 98 | (setq fname (substring fname 1 nil))) | ||
| 99 | (if fname | ||
| 100 | (let ((slash nil)) | ||
| 101 | (setq fname | ||
| 102 | (mapconcat | ||
| 103 | (function | ||
| 104 | (lambda (x) | ||
| 105 | (cond | ||
| 106 | ((and (= ?/ x) slash) | ||
| 107 | (setq slash nil) | ||
| 108 | "%2F") | ||
| 109 | ((= ?/ x) | ||
| 110 | (setq slash t) | ||
| 111 | "/") | ||
| 112 | (t | ||
| 113 | (setq slash nil) | ||
| 114 | (char-to-string x))))) fname "")))) | ||
| 115 | |||
| 116 | (setq fname (and fname | ||
| 117 | (mapconcat | ||
| 118 | (function (lambda (x) | ||
| 119 | (if (= x ?~) "" (char-to-string x)))) | ||
| 120 | fname "")) | ||
| 121 | fname (cond | ||
| 122 | ((null fname) nil) | ||
| 123 | ((or (string= "" fname) (string= "/" fname)) | ||
| 124 | url-directory-index-file) | ||
| 125 | ((= (string-to-char fname) ?/) | ||
| 126 | (if (string= (substring fname -1 nil) "/") | ||
| 127 | (concat fname url-directory-index-file) | ||
| 128 | (substring fname 1 nil))) | ||
| 129 | (t | ||
| 130 | (if (string= (substring fname -1 nil) "/") | ||
| 131 | (concat fname url-directory-index-file) | ||
| 132 | fname)))) | ||
| 133 | (and fname | ||
| 134 | (expand-file-name fname | ||
| 135 | (expand-file-name | ||
| 136 | (mapconcat 'identity host-components "/") | ||
| 137 | url-cache-directory)))))) | ||
| 138 | |||
| 139 | (defun url-cache-create-filename-using-md5 (url) | ||
| 140 | "Create a cached filename using MD5. | ||
| 141 | Very fast if you have an `md5' primitive function, suitably fast otherwise." | ||
| 142 | (require 'md5) | ||
| 143 | (if url | ||
| 144 | (let* ((url (if (vectorp url) (url-recreate-url url) url)) | ||
| 145 | (checksum (md5 url)) | ||
| 146 | (urlobj (url-generic-parse-url url)) | ||
| 147 | (protocol (url-type urlobj)) | ||
| 148 | (hostname (url-host urlobj)) | ||
| 149 | (host-components | ||
| 150 | (cons | ||
| 151 | (user-real-login-name) | ||
| 152 | (cons (or protocol "file") | ||
| 153 | (nreverse | ||
| 154 | (delq nil | ||
| 155 | (split-string (or hostname "localhost") | ||
| 156 | (eval-when-compile | ||
| 157 | (regexp-quote ".")))))))) | ||
| 158 | (fname (url-filename urlobj))) | ||
| 159 | (and fname | ||
| 160 | (expand-file-name checksum | ||
| 161 | (expand-file-name | ||
| 162 | (mapconcat 'identity host-components "/") | ||
| 163 | url-cache-directory)))))) | ||
| 164 | |||
| 165 | (defcustom url-cache-creation-function 'url-cache-create-filename-using-md5 | ||
| 166 | "*What function to use to create a cached filename." | ||
| 167 | :type '(choice (const :tag "MD5 of filename (low collision rate)" | ||
| 168 | :value url-cache-create-filename-using-md5) | ||
| 169 | (const :tag "Human readable filenames (higher collision rate)" | ||
| 170 | :value url-cache-create-filename-human-readable) | ||
| 171 | (function :tag "Other")) | ||
| 172 | :group 'url-cache) | ||
| 173 | |||
| 174 | (defun url-cache-create-filename (url) | ||
| 175 | (funcall url-cache-creation-function url)) | ||
| 176 | |||
| 177 | ;;;###autoload | ||
| 178 | (defun url-cache-extract (fnam) | ||
| 179 | "Extract FNAM from the local disk cache" | ||
| 180 | (erase-buffer) | ||
| 181 | (insert-file-contents-literally fnam)) | ||
| 182 | |||
| 183 | ;;;###autoload | ||
| 184 | (defun url-cache-expired (url mod) | ||
| 185 | "Return t iff a cached file has expired." | ||
| 186 | (let* ((urlobj (if (vectorp url) url (url-generic-parse-url url))) | ||
| 187 | (type (url-type urlobj))) | ||
| 188 | (cond | ||
| 189 | (url-standalone-mode | ||
| 190 | (not (file-exists-p (url-cache-create-filename url)))) | ||
| 191 | ((string= type "http") | ||
| 192 | t) | ||
| 193 | ((member type '("file" "ftp")) | ||
| 194 | (if (or (equal mod '(0 0)) (not mod)) | ||
| 195 | t | ||
| 196 | (or (> (nth 0 mod) (nth 0 (current-time))) | ||
| 197 | (> (nth 1 mod) (nth 1 (current-time)))))) | ||
| 198 | (t nil)))) | ||
| 199 | |||
| 200 | (provide 'url-cache) | ||
| 201 | |||
| 202 | ;;; arch-tag: 95b050a6-8e81-4f23-8e63-191b9d1d657c | ||
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el new file mode 100644 index 00000000000..9f7db867597 --- /dev/null +++ b/lisp/url/url-cookie.el | |||
| @@ -0,0 +1,466 @@ | |||
| 1 | ;;; url-cookie.el --- Netscape Cookie support | ||
| 2 | |||
| 3 | ;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Keywords: comm, data, processes, hypermedia | ||
| 6 | |||
| 7 | ;; This file is part of GNU Emacs. | ||
| 8 | ;; | ||
| 9 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;; any later version. | ||
| 13 | ;; | ||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;; GNU General Public License for more details. | ||
| 18 | ;; | ||
| 19 | ;; You should have received a copy of the GNU General Public License | ||
| 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;; Boston, MA 02111-1307, USA. | ||
| 23 | |||
| 24 | ;;; Commentary: | ||
| 25 | |||
| 26 | ;;; Code: | ||
| 27 | |||
| 28 | (require 'timezone) | ||
| 29 | (require 'url-util) | ||
| 30 | (require 'url-parse) | ||
| 31 | (eval-when-compile (require 'cl)) | ||
| 32 | |||
| 33 | ;; See http://home.netscape.com/newsref/std/cookie_spec.html for the | ||
| 34 | ;; 'open standard' defining this crap. | ||
| 35 | ;; | ||
| 36 | ;; A cookie is stored internally as a vector of 7 slots | ||
| 37 | ;; [ 'cookie name value expires path domain secure ] | ||
| 38 | |||
| 39 | (defsubst url-cookie-name (cookie) (aref cookie 1)) | ||
| 40 | (defsubst url-cookie-value (cookie) (aref cookie 2)) | ||
| 41 | (defsubst url-cookie-expires (cookie) (aref cookie 3)) | ||
| 42 | (defsubst url-cookie-path (cookie) (aref cookie 4)) | ||
| 43 | (defsubst url-cookie-domain (cookie) (aref cookie 5)) | ||
| 44 | (defsubst url-cookie-secure (cookie) (aref cookie 6)) | ||
| 45 | |||
| 46 | (defsubst url-cookie-set-name (cookie val) (aset cookie 1 val)) | ||
| 47 | (defsubst url-cookie-set-value (cookie val) (aset cookie 2 val)) | ||
| 48 | (defsubst url-cookie-set-expires (cookie val) (aset cookie 3 val)) | ||
| 49 | (defsubst url-cookie-set-path (cookie val) (aset cookie 4 val)) | ||
| 50 | (defsubst url-cookie-set-domain (cookie val) (aset cookie 5 val)) | ||
| 51 | (defsubst url-cookie-set-secure (cookie val) (aset cookie 6 val)) | ||
| 52 | (defsubst url-cookie-retrieve-arg (key args) (nth 1 (memq key args))) | ||
| 53 | |||
| 54 | (defsubst url-cookie-create (&rest args) | ||
| 55 | (let ((retval (make-vector 7 nil))) | ||
| 56 | (aset retval 0 'cookie) | ||
| 57 | (url-cookie-set-name retval (url-cookie-retrieve-arg :name args)) | ||
| 58 | (url-cookie-set-value retval (url-cookie-retrieve-arg :value args)) | ||
| 59 | (url-cookie-set-expires retval (url-cookie-retrieve-arg :expires args)) | ||
| 60 | (url-cookie-set-path retval (url-cookie-retrieve-arg :path args)) | ||
| 61 | (url-cookie-set-domain retval (url-cookie-retrieve-arg :domain args)) | ||
| 62 | (url-cookie-set-secure retval (url-cookie-retrieve-arg :secure args)) | ||
| 63 | retval)) | ||
| 64 | |||
| 65 | (defun url-cookie-p (obj) | ||
| 66 | (and (vectorp obj) (= (length obj) 7) (eq (aref obj 0) 'cookie))) | ||
| 67 | |||
| 68 | (defgroup url-cookie nil | ||
| 69 | "URL cookies" | ||
| 70 | :prefix "url-" | ||
| 71 | :prefix "url-cookie-" | ||
| 72 | :group 'url) | ||
| 73 | |||
| 74 | (defvar url-cookie-storage nil "Where cookies are stored.") | ||
| 75 | (defvar url-cookie-secure-storage nil "Where secure cookies are stored.") | ||
| 76 | (defcustom url-cookie-file nil "*Where cookies are stored on disk." | ||
| 77 | :type '(choice (const :tag "Default" :value nil) file) | ||
| 78 | :group 'url-file | ||
| 79 | :group 'url-cookie) | ||
| 80 | |||
| 81 | (defcustom url-cookie-confirmation nil | ||
| 82 | "*If non-nil, confirmation by the user is required to accept HTTP cookies." | ||
| 83 | :type 'boolean | ||
| 84 | :group 'url-cookie) | ||
| 85 | |||
| 86 | (defcustom url-cookie-multiple-line nil | ||
| 87 | "*If nil, HTTP requests put all cookies for the server on one line. | ||
| 88 | Some web servers, such as http://www.hotmail.com/, only accept cookies | ||
| 89 | when they are on one line. This is broken behaviour, but just try | ||
| 90 | telling Microsoft that.") | ||
| 91 | |||
| 92 | (defvar url-cookies-changed-since-last-save nil | ||
| 93 | "Whether the cookies list has changed since the last save operation.") | ||
| 94 | |||
| 95 | ;;;###autoload | ||
| 96 | (defun url-cookie-parse-file (&optional fname) | ||
| 97 | (setq fname (or fname url-cookie-file)) | ||
| 98 | (condition-case () | ||
| 99 | (load fname nil t) | ||
| 100 | (error (message "Could not load cookie file %s" fname)))) | ||
| 101 | |||
| 102 | (defun url-cookie-clean-up (&optional secure) | ||
| 103 | (let* ( | ||
| 104 | (var (if secure 'url-cookie-secure-storage 'url-cookie-storage)) | ||
| 105 | (val (symbol-value var)) | ||
| 106 | (cur nil) | ||
| 107 | (new nil) | ||
| 108 | (cookies nil) | ||
| 109 | (cur-cookie nil) | ||
| 110 | (new-cookies nil) | ||
| 111 | ) | ||
| 112 | (while val | ||
| 113 | (setq cur (car val) | ||
| 114 | val (cdr val) | ||
| 115 | new-cookies nil | ||
| 116 | cookies (cdr cur)) | ||
| 117 | (while cookies | ||
| 118 | (setq cur-cookie (car cookies) | ||
| 119 | cookies (cdr cookies)) | ||
| 120 | (if (or (not (url-cookie-p cur-cookie)) | ||
| 121 | (url-cookie-expired-p cur-cookie) | ||
| 122 | (null (url-cookie-expires cur-cookie))) | ||
| 123 | nil | ||
| 124 | (setq new-cookies (cons cur-cookie new-cookies)))) | ||
| 125 | (if (not new-cookies) | ||
| 126 | nil | ||
| 127 | (setcdr cur new-cookies) | ||
| 128 | (setq new (cons cur new)))) | ||
| 129 | (set var new))) | ||
| 130 | |||
| 131 | ;;;###autoload | ||
| 132 | (defun url-cookie-write-file (&optional fname) | ||
| 133 | (setq fname (or fname url-cookie-file)) | ||
| 134 | (cond | ||
| 135 | ((not url-cookies-changed-since-last-save) nil) | ||
| 136 | ((not (file-writable-p fname)) | ||
| 137 | (message "Cookies file %s (see variable `url-cookie-file') is unwritable." fname)) | ||
| 138 | (t | ||
| 139 | (url-cookie-clean-up) | ||
| 140 | (url-cookie-clean-up t) | ||
| 141 | (save-excursion | ||
| 142 | (set-buffer (get-buffer-create " *cookies*")) | ||
| 143 | (erase-buffer) | ||
| 144 | (fundamental-mode) | ||
| 145 | (insert ";; Emacs-W3 HTTP cookies file\n" | ||
| 146 | ";; Automatically generated file!!! DO NOT EDIT!!!\n\n" | ||
| 147 | "(setq url-cookie-storage\n '") | ||
| 148 | (pp url-cookie-storage (current-buffer)) | ||
| 149 | (insert ")\n(setq url-cookie-secure-storage\n '") | ||
| 150 | (pp url-cookie-secure-storage (current-buffer)) | ||
| 151 | (insert ")\n") | ||
| 152 | (write-file fname) | ||
| 153 | (kill-buffer (current-buffer)))))) | ||
| 154 | |||
| 155 | (defun url-cookie-store (name value &optional expires domain path secure) | ||
| 156 | "Store a netscape-style cookie." | ||
| 157 | (let* ((storage (if secure url-cookie-secure-storage url-cookie-storage)) | ||
| 158 | (tmp storage) | ||
| 159 | (cur nil) | ||
| 160 | (found-domain nil)) | ||
| 161 | |||
| 162 | ;; First, look for a matching domain | ||
| 163 | (setq found-domain (assoc domain storage)) | ||
| 164 | |||
| 165 | (if found-domain | ||
| 166 | ;; Need to either stick the new cookie in existing domain storage | ||
| 167 | ;; or possibly replace an existing cookie if the names match. | ||
| 168 | (progn | ||
| 169 | (setq storage (cdr found-domain) | ||
| 170 | tmp nil) | ||
| 171 | (while storage | ||
| 172 | (setq cur (car storage) | ||
| 173 | storage (cdr storage)) | ||
| 174 | (if (and (equal path (url-cookie-path cur)) | ||
| 175 | (equal name (url-cookie-name cur))) | ||
| 176 | (progn | ||
| 177 | (url-cookie-set-expires cur expires) | ||
| 178 | (url-cookie-set-value cur value) | ||
| 179 | (setq tmp t)))) | ||
| 180 | (if (not tmp) | ||
| 181 | ;; New cookie | ||
| 182 | (setcdr found-domain (cons | ||
| 183 | (url-cookie-create :name name | ||
| 184 | :value value | ||
| 185 | :expires expires | ||
| 186 | :domain domain | ||
| 187 | :path path | ||
| 188 | :secure secure) | ||
| 189 | (cdr found-domain))))) | ||
| 190 | ;; Need to add a new top-level domain | ||
| 191 | (setq tmp (url-cookie-create :name name | ||
| 192 | :value value | ||
| 193 | :expires expires | ||
| 194 | :domain domain | ||
| 195 | :path path | ||
| 196 | :secure secure)) | ||
| 197 | (cond | ||
| 198 | (storage | ||
| 199 | (setcdr storage (cons (list domain tmp) (cdr storage)))) | ||
| 200 | (secure | ||
| 201 | (setq url-cookie-secure-storage (list (list domain tmp)))) | ||
| 202 | (t | ||
| 203 | (setq url-cookie-storage (list (list domain tmp)))))))) | ||
| 204 | |||
| 205 | (defun url-cookie-expired-p (cookie) | ||
| 206 | (let* ( | ||
| 207 | (exp (url-cookie-expires cookie)) | ||
| 208 | (cur-date (and exp (timezone-parse-date (current-time-string)))) | ||
| 209 | (exp-date (and exp (timezone-parse-date exp))) | ||
| 210 | (cur-greg (and cur-date (timezone-absolute-from-gregorian | ||
| 211 | (string-to-int (aref cur-date 1)) | ||
| 212 | (string-to-int (aref cur-date 2)) | ||
| 213 | (string-to-int (aref cur-date 0))))) | ||
| 214 | (exp-greg (and exp (timezone-absolute-from-gregorian | ||
| 215 | (string-to-int (aref exp-date 1)) | ||
| 216 | (string-to-int (aref exp-date 2)) | ||
| 217 | (string-to-int (aref exp-date 0))))) | ||
| 218 | (diff-in-days (and exp (- cur-greg exp-greg))) | ||
| 219 | ) | ||
| 220 | (cond | ||
| 221 | ((not exp) nil) ; No expiry == expires at browser quit | ||
| 222 | ((< diff-in-days 0) nil) ; Expires sometime after today | ||
| 223 | ((> diff-in-days 0) t) ; Expired before today | ||
| 224 | (t ; Expires sometime today, check times | ||
| 225 | (let* ((cur-time (timezone-parse-time (aref cur-date 3))) | ||
| 226 | (exp-time (timezone-parse-time (aref exp-date 3))) | ||
| 227 | (cur-norm (+ (* 360 (string-to-int (aref cur-time 2))) | ||
| 228 | (* 60 (string-to-int (aref cur-time 1))) | ||
| 229 | (* 1 (string-to-int (aref cur-time 0))))) | ||
| 230 | (exp-norm (+ (* 360 (string-to-int (aref exp-time 2))) | ||
| 231 | (* 60 (string-to-int (aref exp-time 1))) | ||
| 232 | (* 1 (string-to-int (aref exp-time 0)))))) | ||
| 233 | (> (- cur-norm exp-norm) 1)))))) | ||
| 234 | |||
| 235 | ;;;###autoload | ||
| 236 | (defun url-cookie-retrieve (host path &optional secure) | ||
| 237 | "Retrieve all the netscape-style cookies for a specified HOST and PATH." | ||
| 238 | (let ((storage (if secure | ||
| 239 | (append url-cookie-secure-storage url-cookie-storage) | ||
| 240 | url-cookie-storage)) | ||
| 241 | (case-fold-search t) | ||
| 242 | (cookies nil) | ||
| 243 | (cur nil) | ||
| 244 | (retval nil) | ||
| 245 | (path-regexp nil)) | ||
| 246 | (while storage | ||
| 247 | (setq cur (car storage) | ||
| 248 | storage (cdr storage) | ||
| 249 | cookies (cdr cur)) | ||
| 250 | (if (and (car cur) | ||
| 251 | (string-match (concat "^.*" (regexp-quote (car cur)) "$") host)) | ||
| 252 | ;; The domains match - a possible hit! | ||
| 253 | (while cookies | ||
| 254 | (setq cur (car cookies) | ||
| 255 | cookies (cdr cookies) | ||
| 256 | path-regexp (concat "^" (regexp-quote | ||
| 257 | (url-cookie-path cur)))) | ||
| 258 | (if (and (string-match path-regexp path) | ||
| 259 | (not (url-cookie-expired-p cur))) | ||
| 260 | (setq retval (cons cur retval)))))) | ||
| 261 | retval)) | ||
| 262 | |||
| 263 | ;;;###autolaod | ||
| 264 | (defun url-cookie-generate-header-lines (host path secure) | ||
| 265 | (let* ((cookies (url-cookie-retrieve host path secure)) | ||
| 266 | (retval nil) | ||
| 267 | (cur nil) | ||
| 268 | (chunk nil)) | ||
| 269 | ;; Have to sort this for sending most specific cookies first | ||
| 270 | (setq cookies (and cookies | ||
| 271 | (sort cookies | ||
| 272 | (function | ||
| 273 | (lambda (x y) | ||
| 274 | (> (length (url-cookie-path x)) | ||
| 275 | (length (url-cookie-path y)))))))) | ||
| 276 | (while cookies | ||
| 277 | (setq cur (car cookies) | ||
| 278 | cookies (cdr cookies) | ||
| 279 | chunk (format "%s=%s" (url-cookie-name cur) (url-cookie-value cur)) | ||
| 280 | retval (if (and url-cookie-multiple-line | ||
| 281 | (< 80 (+ (length retval) (length chunk) 4))) | ||
| 282 | (concat retval "\r\nCookie: " chunk) | ||
| 283 | (if retval | ||
| 284 | (concat retval "; " chunk) | ||
| 285 | (concat "Cookie: " chunk))))) | ||
| 286 | (if retval | ||
| 287 | (concat retval "\r\n") | ||
| 288 | ""))) | ||
| 289 | |||
| 290 | (defvar url-cookie-two-dot-domains | ||
| 291 | (concat "\\.\\(" | ||
| 292 | (mapconcat 'identity (list "com" "edu" "net" "org" "gov" "mil" "int") | ||
| 293 | "\\|") | ||
| 294 | "\\)$") | ||
| 295 | "A regexp of top level domains that only require two matching | ||
| 296 | '.'s in the domain name in order to set a cookie.") | ||
| 297 | |||
| 298 | (defcustom url-cookie-trusted-urls nil | ||
| 299 | "*A list of regular expressions matching URLs to always accept cookies from." | ||
| 300 | :type '(repeat regexp) | ||
| 301 | :group 'url-cookie) | ||
| 302 | |||
| 303 | (defcustom url-cookie-untrusted-urls nil | ||
| 304 | "*A list of regular expressions matching URLs to never accept cookies from." | ||
| 305 | :type '(repeat regexp) | ||
| 306 | :group 'url-cookie) | ||
| 307 | |||
| 308 | (defun url-cookie-host-can-set-p (host domain) | ||
| 309 | (let ((numdots 0) | ||
| 310 | (tmp domain) | ||
| 311 | (last nil) | ||
| 312 | (case-fold-search t) | ||
| 313 | (mindots 3)) | ||
| 314 | (while (setq last (string-match "\\." domain last)) | ||
| 315 | (setq numdots (1+ numdots) | ||
| 316 | last (1+ last))) | ||
| 317 | (if (string-match url-cookie-two-dot-domains domain) | ||
| 318 | (setq mindots 2)) | ||
| 319 | (cond | ||
| 320 | ((string= host domain) ; Apparently netscape lets you do this | ||
| 321 | t) | ||
| 322 | ((>= numdots mindots) ; We have enough dots in domain name | ||
| 323 | ;; Need to check and make sure the host is actually _in_ the | ||
| 324 | ;; domain it wants to set a cookie for though. | ||
| 325 | (string-match (concat (regexp-quote domain) "$") host)) | ||
| 326 | (t | ||
| 327 | nil)))) | ||
| 328 | |||
| 329 | ;;;###autoload | ||
| 330 | (defun url-cookie-handle-set-cookie (str) | ||
| 331 | (setq url-cookies-changed-since-last-save t) | ||
| 332 | (let* ((args (url-parse-args str t)) | ||
| 333 | (case-fold-search t) | ||
| 334 | (secure (and (assoc-string "secure" args t) t)) | ||
| 335 | (domain (or (cdr-safe (assoc-string "domain" args t)) | ||
| 336 | (url-host url-current-object))) | ||
| 337 | (current-url (url-view-url t)) | ||
| 338 | (trusted url-cookie-trusted-urls) | ||
| 339 | (untrusted url-cookie-untrusted-urls) | ||
| 340 | (expires (cdr-safe (assoc-string "expires" args t))) | ||
| 341 | (path (or (cdr-safe (assoc-string "path" args t)) | ||
| 342 | (file-name-directory | ||
| 343 | (url-filename url-current-object)))) | ||
| 344 | (rest nil)) | ||
| 345 | (while args | ||
| 346 | (if (not (member (downcase (car (car args))) | ||
| 347 | '("secure" "domain" "expires" "path"))) | ||
| 348 | (setq rest (cons (car args) rest))) | ||
| 349 | (setq args (cdr args))) | ||
| 350 | |||
| 351 | ;; Sometimes we get dates that the timezone package cannot handle very | ||
| 352 | ;; gracefully - take care of this here, instead of in url-cookie-expired-p | ||
| 353 | ;; to speed things up. | ||
| 354 | (if (and expires | ||
| 355 | (string-match | ||
| 356 | (concat "^[^,]+, +\\(..\\)-\\(...\\)-\\(..\\) +" | ||
| 357 | "\\(..:..:..\\) +\\[*\\([^\]]+\\)\\]*$") | ||
| 358 | expires)) | ||
| 359 | (setq expires (concat (match-string 1 expires) " " | ||
| 360 | (match-string 2 expires) " " | ||
| 361 | (match-string 3 expires) " " | ||
| 362 | (match-string 4 expires) " [" | ||
| 363 | (match-string 5 expires) "]"))) | ||
| 364 | |||
| 365 | ;; This one is for older Emacs/XEmacs variants that don't | ||
| 366 | ;; understand this format without tenths of a second in it. | ||
| 367 | ;; Wednesday, 30-Dec-2037 16:00:00 GMT | ||
| 368 | ;; - vs - | ||
| 369 | ;; Wednesday, 30-Dec-2037 16:00:00.00 GMT | ||
| 370 | (if (and expires | ||
| 371 | (string-match | ||
| 372 | "\\([0-9]+\\)-\\([A-Za-z]+\\)-\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9]+:[0-9]+\\)\\(\\.[0-9]+\\)*[ \t]+\\([-+a-zA-Z0-9]+\\)" | ||
| 373 | expires)) | ||
| 374 | (setq expires (concat (match-string 1 expires) "-" ; day | ||
| 375 | (match-string 2 expires) "-" ; month | ||
| 376 | (match-string 3 expires) " " ; year | ||
| 377 | (match-string 4 expires) ".00 " ; hour:minutes:seconds | ||
| 378 | (match-string 6 expires)))) ":" ; timezone | ||
| 379 | |||
| 380 | (while (consp trusted) | ||
| 381 | (if (string-match (car trusted) current-url) | ||
| 382 | (setq trusted (- (match-end 0) (match-beginning 0))) | ||
| 383 | (pop trusted))) | ||
| 384 | (while (consp untrusted) | ||
| 385 | (if (string-match (car untrusted) current-url) | ||
| 386 | (setq untrusted (- (match-end 0) (match-beginning 0))) | ||
| 387 | (pop untrusted))) | ||
| 388 | (if (and trusted untrusted) | ||
| 389 | ;; Choose the more specific match | ||
| 390 | (if (> trusted untrusted) | ||
| 391 | (setq untrusted nil) | ||
| 392 | (setq trusted nil))) | ||
| 393 | (cond | ||
| 394 | (untrusted | ||
| 395 | ;; The site was explicity marked as untrusted by the user | ||
| 396 | nil) | ||
| 397 | ((or (eq url-privacy-level 'paranoid) | ||
| 398 | (and (listp url-privacy-level) (memq 'cookies url-privacy-level))) | ||
| 399 | ;; user never wants cookies | ||
| 400 | nil) | ||
| 401 | ((and url-cookie-confirmation | ||
| 402 | (not trusted) | ||
| 403 | (save-window-excursion | ||
| 404 | (with-output-to-temp-buffer "*Cookie Warning*" | ||
| 405 | (mapcar | ||
| 406 | (function | ||
| 407 | (lambda (x) | ||
| 408 | (princ (format "%s - %s" (car x) (cdr x))))) rest)) | ||
| 409 | (prog1 | ||
| 410 | (not (funcall url-confirmation-func | ||
| 411 | (format "Allow %s to set these cookies? " | ||
| 412 | (url-host url-current-object)))) | ||
| 413 | (if (get-buffer "*Cookie Warning*") | ||
| 414 | (kill-buffer "*Cookie Warning*"))))) | ||
| 415 | ;; user wants to be asked, and declined. | ||
| 416 | nil) | ||
| 417 | ((url-cookie-host-can-set-p (url-host url-current-object) domain) | ||
| 418 | ;; Cookie is accepted by the user, and passes our security checks | ||
| 419 | (let ((cur nil)) | ||
| 420 | (while rest | ||
| 421 | (setq cur (pop rest)) | ||
| 422 | (url-cookie-store (car cur) (cdr cur) | ||
| 423 | expires domain path secure)))) | ||
| 424 | (t | ||
| 425 | (message "%s tried to set a cookie for domain %s - rejected." | ||
| 426 | (url-host url-current-object) domain))))) | ||
| 427 | |||
| 428 | (defvar url-cookie-timer nil) | ||
| 429 | |||
| 430 | (defcustom url-cookie-save-interval 3600 | ||
| 431 | "*The number of seconds between automatic saves of cookies. | ||
| 432 | Default is 1 hour. Note that if you change this variable outside of | ||
| 433 | the `customize' interface after `url-do-setup' has been run, you need | ||
| 434 | to run the `url-cookie-setup-save-timer' function manually." | ||
| 435 | :set (function (lambda (var val) | ||
| 436 | (set-default var val) | ||
| 437 | (and (featurep 'url) | ||
| 438 | (fboundp 'url-cookie-setup-save-timer) | ||
| 439 | (url-cookie-setup-save-timer)))) | ||
| 440 | :type 'integer | ||
| 441 | :group 'url) | ||
| 442 | |||
| 443 | ;;;###autoload | ||
| 444 | (defun url-cookie-setup-save-timer () | ||
| 445 | "Reset the cookie saver timer." | ||
| 446 | (interactive) | ||
| 447 | (ignore-errors | ||
| 448 | (cond ((fboundp 'cancel-timer) (cancel-timer url-cookie-timer)) | ||
| 449 | ((fboundp 'delete-itimer) (delete-itimer url-cookie-timer)))) | ||
| 450 | (setq url-cookie-timer nil) | ||
| 451 | (if url-cookie-save-interval | ||
| 452 | (setq url-cookie-timer | ||
| 453 | (cond | ||
| 454 | ((fboundp 'run-at-time) | ||
| 455 | (run-at-time url-cookie-save-interval | ||
| 456 | url-cookie-save-interval | ||
| 457 | 'url-cookie-write-file)) | ||
| 458 | ((fboundp 'start-itimer) | ||
| 459 | (start-itimer "url-cookie-saver" 'url-cookie-write-file | ||
| 460 | url-cookie-save-interval | ||
| 461 | url-cookie-save-interval)))))) | ||
| 462 | |||
| 463 | (provide 'url-cookie) | ||
| 464 | |||
| 465 | ;; arch-tag: 2568751b-6452-4398-aa2d-303edadb54d7 | ||
| 466 | ;;; url-cookie.el ends here | ||
diff --git a/lisp/url/url-dired.el b/lisp/url/url-dired.el new file mode 100644 index 00000000000..73307412e1e --- /dev/null +++ b/lisp/url/url-dired.el | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | ;;; url-dired.el --- URL Dired minor mode | ||
| 2 | ;; Keywords: comm, files | ||
| 3 | |||
| 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 5 | ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. | ||
| 6 | ;;; | ||
| 7 | ;;; This file is part of GNU Emacs. | ||
| 8 | ;;; | ||
| 9 | ;;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;;; any later version. | ||
| 13 | ;;; | ||
| 14 | ;;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;;; GNU General Public License for more details. | ||
| 18 | ;;; | ||
| 19 | ;;; You should have received a copy of the GNU General Public License | ||
| 20 | ;;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;;; Boston, MA 02111-1307, USA. | ||
| 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 24 | |||
| 25 | (autoload 'w3-fetch "w3") | ||
| 26 | (autoload 'w3-open-local "w3") | ||
| 27 | (autoload 'dired-get-filename "dired") | ||
| 28 | |||
| 29 | (defvar url-dired-minor-mode-map | ||
| 30 | (let ((map (make-sparse-keymap))) | ||
| 31 | (define-key map "\C-m" 'url-dired-find-file) | ||
| 32 | (if (featurep 'xemacs) | ||
| 33 | (define-key map [button2] 'url-dired-find-file-mouse) | ||
| 34 | (define-key map [mouse-2] 'url-dired-find-file-mouse)) | ||
| 35 | map) | ||
| 36 | "Keymap used when browsing directories.") | ||
| 37 | |||
| 38 | (defvar url-dired-minor-mode nil | ||
| 39 | "Whether we are in url-dired-minor-mode") | ||
| 40 | |||
| 41 | (make-variable-buffer-local 'url-dired-minor-mode) | ||
| 42 | |||
| 43 | (defun url-dired-find-file () | ||
| 44 | "In dired, visit the file or directory named on this line, using Emacs-W3." | ||
| 45 | (interactive) | ||
| 46 | (let ((filename (dired-get-filename))) | ||
| 47 | (cond ((string-match "/\\(.*@.*\\):\\(/.*\\)" filename) | ||
| 48 | (w3-fetch (concat "file://" (match-string 1 filename) (match-string 2 filename)))) | ||
| 49 | (t | ||
| 50 | (w3-open-local filename))))) | ||
| 51 | |||
| 52 | (defun url-dired-find-file-mouse (event) | ||
| 53 | "In dired, visit the file or directory name you click on, using Emacs-W3." | ||
| 54 | (interactive "@e") | ||
| 55 | (mouse-set-point event) | ||
| 56 | (url-dired-find-file)) | ||
| 57 | |||
| 58 | (defun url-dired-minor-mode (&optional arg) | ||
| 59 | "Minor mode for directory browsing with Emacs-W3." | ||
| 60 | (interactive "P") | ||
| 61 | (cond | ||
| 62 | ((null arg) | ||
| 63 | (setq url-dired-minor-mode (not url-dired-minor-mode))) | ||
| 64 | ((equal 0 arg) | ||
| 65 | (setq url-dired-minor-mode nil)) | ||
| 66 | (t | ||
| 67 | (setq url-dired-minor-mode t)))) | ||
| 68 | |||
| 69 | (if (not (fboundp 'add-minor-mode)) | ||
| 70 | (defun add-minor-mode (toggle name &optional keymap after toggle-fun) | ||
| 71 | "Add a minor mode to `minor-mode-alist' and `minor-mode-map-alist'. | ||
| 72 | TOGGLE is a symbol which is used as the variable which toggle the minor mode, | ||
| 73 | NAME is the name that should appear in the modeline (it should be a string | ||
| 74 | beginning with a space), KEYMAP is a keymap to make active when the minor | ||
| 75 | mode is active, and AFTER is the toggling symbol used for another minor | ||
| 76 | mode. If AFTER is non-nil, then it is used to position the new mode in the | ||
| 77 | minor-mode alists. TOGGLE-FUN specifies an interactive function that | ||
| 78 | is called to toggle the mode on and off; this affects what appens when | ||
| 79 | button2 is pressed on the mode, and when button3 is pressed somewhere | ||
| 80 | in the list of modes. If TOGGLE-FUN is nil and TOGGLE names an | ||
| 81 | interactive function, TOGGLE is used as the toggle function. | ||
| 82 | |||
| 83 | Example: (add-minor-mode 'view-minor-mode \" View\" view-mode-map)" | ||
| 84 | (if (not (assq toggle minor-mode-alist)) | ||
| 85 | (setq minor-mode-alist (cons (list toggle name) minor-mode-alist))) | ||
| 86 | (if (and keymap (not (assq toggle minor-mode-map-alist))) | ||
| 87 | (setq minor-mode-map-alist (cons (cons toggle keymap) | ||
| 88 | minor-mode-map-alist))))) | ||
| 89 | |||
| 90 | (add-minor-mode 'url-dired-minor-mode " URL" url-dired-minor-mode-map) | ||
| 91 | |||
| 92 | (defun url-find-file-dired (dir) | ||
| 93 | "\"Edit\" directory DIR, but with additional URL-friendly bindings." | ||
| 94 | (interactive "DURL Dired (directory): ") | ||
| 95 | (find-file dir) | ||
| 96 | (url-dired-minor-mode t)) | ||
| 97 | |||
| 98 | (provide 'url-dired) | ||
| 99 | |||
| 100 | ;;; arch-tag: 2694f21a-43e1-4391-b3cb-cf6e5349f15f | ||
diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el index 77c2e74555f..0aa23acc0ec 100644 --- a/lisp/url/url-file.el +++ b/lisp/url/url-file.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; url-file.el --- File retrieval code | 1 | ;;; url-file.el --- File retrieval code |
| 2 | 2 | ||
| 3 | ;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc. | 3 | ;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc. |
| 4 | ;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu> | ||
| 5 | 4 | ||
| 6 | ;; Keywords: comm, data, processes | 5 | ;; Keywords: comm, data, processes |
| 7 | 6 | ||
diff --git a/lisp/url/url-ftp.el b/lisp/url/url-ftp.el new file mode 100644 index 00000000000..4346f3910b1 --- /dev/null +++ b/lisp/url/url-ftp.el | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | ;;; url-ftp.el --- FTP wrapper | ||
| 2 | ;; Keywords: comm, data, processes | ||
| 3 | |||
| 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 5 | ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. | ||
| 6 | ;;; | ||
| 7 | ;;; This file is part of GNU Emacs. | ||
| 8 | ;;; | ||
| 9 | ;;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;;; any later version. | ||
| 13 | ;;; | ||
| 14 | ;;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;;; GNU General Public License for more details. | ||
| 18 | ;;; | ||
| 19 | ;;; You should have received a copy of the GNU General Public License | ||
| 20 | ;;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;;; Boston, MA 02111-1307, USA. | ||
| 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 24 | |||
| 25 | ;; We knew not what we did when we overloaded 'file' to mean 'file' | ||
| 26 | ;; and 'ftp' back in the dark ages of the web. | ||
| 27 | ;; | ||
| 28 | ;; This stub file is just here to please the auto-scheme-loading code | ||
| 29 | ;; in url-methods.el and just maps everything onto the code in | ||
| 30 | ;; url-file. | ||
| 31 | |||
| 32 | (require 'url-parse) | ||
| 33 | (require 'url-file) | ||
| 34 | |||
| 35 | (defconst url-ftp-default-port 21 "Default FTP port.") | ||
| 36 | (defconst url-ftp-asynchronous-p t "FTP transfers are asynchronous.") | ||
| 37 | (defalias 'url-ftp-expand-file-name 'url-default-expander) | ||
| 38 | (defalias 'url-ftp 'url-file) | ||
| 39 | |||
| 40 | (provide 'url-ftp) | ||
| 41 | |||
| 42 | ;;; arch-tag: 9c3e70c4-350f-4d4a-bb51-a1e9b459e7dc | ||
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el new file mode 100644 index 00000000000..608827d7cee --- /dev/null +++ b/lisp/url/url-gw.el | |||
| @@ -0,0 +1,268 @@ | |||
| 1 | ;;; url-gw.el --- Gateway munging for URL loading | ||
| 2 | ;; Author: Bill Perry <wmperry@gnu.org> | ||
| 3 | ;; Keywords: comm, data, processes | ||
| 4 | |||
| 5 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 6 | ;;; Copyright (c) 1997, 1998, 2004 Free Software Foundation, Inc. | ||
| 7 | ;;; | ||
| 8 | ;;; This file is part of GNU Emacs. | ||
| 9 | ;;; | ||
| 10 | ;;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 11 | ;;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;;; the Free Software Foundation; either version 2, or (at your option) | ||
| 13 | ;;; any later version. | ||
| 14 | ;;; | ||
| 15 | ;;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;;; GNU General Public License for more details. | ||
| 19 | ;;; | ||
| 20 | ;;; You should have received a copy of the GNU General Public License | ||
| 21 | ;;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 22 | ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 23 | ;;; Boston, MA 02111-1307, USA. | ||
| 24 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 25 | (eval-when-compile (require 'cl)) | ||
| 26 | (require 'url-vars) | ||
| 27 | |||
| 28 | ;; Fixme: support SSH explicitly or via a url-gateway-rlogin-program? | ||
| 29 | |||
| 30 | (autoload 'socks-open-network-stream "socks") | ||
| 31 | (autoload 'open-ssl-stream "ssl") | ||
| 32 | (autoload 'open-tls-stream "tls") | ||
| 33 | |||
| 34 | (defgroup url-gateway nil | ||
| 35 | "URL gateway variables" | ||
| 36 | :group 'url) | ||
| 37 | |||
| 38 | (defcustom url-gateway-local-host-regexp nil | ||
| 39 | "*A regular expression specifying local hostnames/machines." | ||
| 40 | :type '(choice (const nil) regexp) | ||
| 41 | :group 'url-gateway) | ||
| 42 | |||
| 43 | (defcustom url-gateway-prompt-pattern | ||
| 44 | "^[^#$%>;]*[#$%>;] *" ;; "bash\\|\$ *\r?$\\|> *\r?" | ||
| 45 | "*A regular expression matching a shell prompt." | ||
| 46 | :type 'regexp | ||
| 47 | :group 'url-gateway) | ||
| 48 | |||
| 49 | (defcustom url-gateway-rlogin-host nil | ||
| 50 | "*What hostname to actually rlog into before doing a telnet." | ||
| 51 | :type '(choice (const nil) string) | ||
| 52 | :group 'url-gateway) | ||
| 53 | |||
| 54 | (defcustom url-gateway-rlogin-user-name nil | ||
| 55 | "*Username to log into the remote machine with when using rlogin." | ||
| 56 | :type '(choice (const nil) string) | ||
| 57 | :group 'url-gateway) | ||
| 58 | |||
| 59 | (defcustom url-gateway-rlogin-parameters '("telnet" "-8") | ||
| 60 | "*Parameters to `url-open-rlogin'. | ||
| 61 | This list will be used as the parameter list given to rsh." | ||
| 62 | :type '(repeat string) | ||
| 63 | :group 'url-gateway) | ||
| 64 | |||
| 65 | (defcustom url-gateway-telnet-host nil | ||
| 66 | "*What hostname to actually login to before doing a telnet." | ||
| 67 | :type '(choice (const nil) string) | ||
| 68 | :group 'url-gateway) | ||
| 69 | |||
| 70 | (defcustom url-gateway-telnet-parameters '("exec" "telnet" "-8") | ||
| 71 | "*Parameters to `url-open-telnet'. | ||
| 72 | This list will be executed as a command after logging in via telnet." | ||
| 73 | :type '(repeat string) | ||
| 74 | :group 'url-gateway) | ||
| 75 | |||
| 76 | (defcustom url-gateway-telnet-login-prompt "^\r*.?login:" | ||
| 77 | "*Prompt that tells us we should send our username when loggin in w/telnet." | ||
| 78 | :type 'regexp | ||
| 79 | :group 'url-gateway) | ||
| 80 | |||
| 81 | (defcustom url-gateway-telnet-password-prompt "^\r*.?password:" | ||
| 82 | "*Prompt that tells us we should send our password when loggin in w/telnet." | ||
| 83 | :type 'regexp | ||
| 84 | :group 'url-gateway) | ||
| 85 | |||
| 86 | (defcustom url-gateway-telnet-user-name nil | ||
| 87 | "User name to log in via telnet with." | ||
| 88 | :type '(choice (const nil) string) | ||
| 89 | :group 'url-gateway) | ||
| 90 | |||
| 91 | (defcustom url-gateway-telnet-password nil | ||
| 92 | "Password to use to log in via telnet with." | ||
| 93 | :type '(choice (const nil) string) | ||
| 94 | :group 'url-gateway) | ||
| 95 | |||
| 96 | (defcustom url-gateway-broken-resolution nil | ||
| 97 | "*Whether to use nslookup to resolve hostnames. | ||
| 98 | This should be used when your version of Emacs cannot correctly use DNS, | ||
| 99 | but your machine can. This usually happens if you are running a statically | ||
| 100 | linked Emacs under SunOS 4.x" | ||
| 101 | :type 'boolean | ||
| 102 | :group 'url-gateway) | ||
| 103 | |||
| 104 | (defcustom url-gateway-nslookup-program "nslookup" | ||
| 105 | "*If non-NIL then a string naming nslookup program." | ||
| 106 | :type '(choice (const :tag "None" :value nil) string) | ||
| 107 | :group 'url-gateway) | ||
| 108 | |||
| 109 | ;; Stolen from ange-ftp | ||
| 110 | ;;;###autoload | ||
| 111 | (defun url-gateway-nslookup-host (host) | ||
| 112 | "Attempt to resolve the given HOST using nslookup if possible." | ||
| 113 | (interactive "sHost: ") | ||
| 114 | (if url-gateway-nslookup-program | ||
| 115 | (let ((proc (start-process " *nslookup*" " *nslookup*" | ||
| 116 | url-gateway-nslookup-program host)) | ||
| 117 | (res host)) | ||
| 118 | (process-kill-without-query proc) | ||
| 119 | (save-excursion | ||
| 120 | (set-buffer (process-buffer proc)) | ||
| 121 | (while (memq (process-status proc) '(run open)) | ||
| 122 | (accept-process-output proc)) | ||
| 123 | (goto-char (point-min)) | ||
| 124 | (if (re-search-forward "Name:.*\nAddress: *\\(.*\\)$" nil t) | ||
| 125 | (setq res (buffer-substring (match-beginning 1) | ||
| 126 | (match-end 1)))) | ||
| 127 | (kill-buffer (current-buffer))) | ||
| 128 | res) | ||
| 129 | host)) | ||
| 130 | |||
| 131 | ;; Stolen from red gnus nntp.el | ||
| 132 | (defun url-wait-for-string (regexp proc) | ||
| 133 | "Wait until string matching REGEXP arrives in process PROC's buffer." | ||
| 134 | (let ((buf (current-buffer))) | ||
| 135 | (goto-char (point-min)) | ||
| 136 | (while (not (re-search-forward regexp nil t)) | ||
| 137 | (accept-process-output proc) | ||
| 138 | (set-buffer buf) | ||
| 139 | (goto-char (point-min))))) | ||
| 140 | |||
| 141 | ;; Stolen from red gnus nntp.el | ||
| 142 | (defun url-open-rlogin (name buffer host service) | ||
| 143 | "Open a connection using rsh." | ||
| 144 | (if (not (stringp service)) | ||
| 145 | (setq service (int-to-string service))) | ||
| 146 | (let ((proc (if url-gateway-rlogin-user-name | ||
| 147 | (start-process | ||
| 148 | name buffer "rsh" | ||
| 149 | url-gateway-rlogin-host "-l" url-gateway-rlogin-user-name | ||
| 150 | (mapconcat 'identity | ||
| 151 | (append url-gateway-rlogin-parameters | ||
| 152 | (list host service)) " ")) | ||
| 153 | (start-process | ||
| 154 | name buffer "rsh" url-gateway-rlogin-host | ||
| 155 | (mapconcat 'identity | ||
| 156 | (append url-gateway-rlogin-parameters | ||
| 157 | (list host service)) | ||
| 158 | " "))))) | ||
| 159 | (set-buffer buffer) | ||
| 160 | (url-wait-for-string "^\r*200" proc) | ||
| 161 | (beginning-of-line) | ||
| 162 | (delete-region (point-min) (point)) | ||
| 163 | proc)) | ||
| 164 | |||
| 165 | ;; Stolen from red gnus nntp.el | ||
| 166 | (defun url-open-telnet (name buffer host service) | ||
| 167 | (if (not (stringp service)) | ||
| 168 | (setq service (int-to-string service))) | ||
| 169 | (save-excursion | ||
| 170 | (set-buffer (get-buffer-create buffer)) | ||
| 171 | (erase-buffer) | ||
| 172 | (let ((proc (start-process name buffer "telnet" "-8")) | ||
| 173 | (case-fold-search t)) | ||
| 174 | (when (memq (process-status proc) '(open run)) | ||
| 175 | (process-send-string proc "set escape \^X\n") | ||
| 176 | (process-send-string proc (concat | ||
| 177 | "open " url-gateway-telnet-host "\n")) | ||
| 178 | (url-wait-for-string url-gateway-telnet-login-prompt proc) | ||
| 179 | (process-send-string | ||
| 180 | proc (concat | ||
| 181 | (or url-gateway-telnet-user-name | ||
| 182 | (setq url-gateway-telnet-user-name (read-string "login: "))) | ||
| 183 | "\n")) | ||
| 184 | (url-wait-for-string url-gateway-telnet-password-prompt proc) | ||
| 185 | (process-send-string | ||
| 186 | proc (concat | ||
| 187 | (or url-gateway-telnet-password | ||
| 188 | (setq url-gateway-telnet-password | ||
| 189 | (funcall url-passwd-entry-func "Password: "))) | ||
| 190 | "\n")) | ||
| 191 | (erase-buffer) | ||
| 192 | (url-wait-for-string url-gateway-prompt-pattern proc) | ||
| 193 | (process-send-string | ||
| 194 | proc (concat (mapconcat 'identity | ||
| 195 | (append url-gateway-telnet-parameters | ||
| 196 | (list host service)) " ") "\n")) | ||
| 197 | (url-wait-for-string "^\r*Escape character.*\r*\n+" proc) | ||
| 198 | (delete-region (point-min) (match-end 0)) | ||
| 199 | (process-send-string proc "\^]\n") | ||
| 200 | (url-wait-for-string "^telnet" proc) | ||
| 201 | (process-send-string proc "mode character\n") | ||
| 202 | (accept-process-output proc 1) | ||
| 203 | (sit-for 1) | ||
| 204 | (goto-char (point-min)) | ||
| 205 | (forward-line 1) | ||
| 206 | (delete-region (point) (point-max))) | ||
| 207 | proc))) | ||
| 208 | |||
| 209 | ;;;###autoload | ||
| 210 | (defun url-open-stream (name buffer host service) | ||
| 211 | "Open a stream to HOST, possibly via a gateway. | ||
| 212 | Args per `open-network-stream'. | ||
| 213 | Will not make a connexion if `url-gateway-unplugged' is non-nil." | ||
| 214 | (unless url-gateway-unplugged | ||
| 215 | (let ((gw-method (if (and url-gateway-local-host-regexp | ||
| 216 | (not (eq 'tls url-gateway-method)) | ||
| 217 | (not (eq 'ssl url-gateway-method)) | ||
| 218 | (string-match | ||
| 219 | url-gateway-local-host-regexp | ||
| 220 | host)) | ||
| 221 | 'native | ||
| 222 | url-gateway-method)) | ||
| 223 | ;;; ;; This hack is for OS/2 Emacs so that it will not do bogus CRLF | ||
| 224 | ;;; ;; conversions while trying to be 'helpful' | ||
| 225 | ;;; (tcp-binary-process-output-services (if (stringp service) | ||
| 226 | ;;; (list service) | ||
| 227 | ;;; (list service | ||
| 228 | ;;; (int-to-string service)))) | ||
| 229 | |||
| 230 | ;; An attempt to deal with denied connections, and attempt | ||
| 231 | ;; to reconnect | ||
| 232 | (cur-retries 0) | ||
| 233 | (retry t) | ||
| 234 | (errobj nil) | ||
| 235 | (conn nil)) | ||
| 236 | |||
| 237 | ;; If the user told us to do DNS for them, do it. | ||
| 238 | (if url-gateway-broken-resolution | ||
| 239 | (setq host (url-gateway-nslookup-host host))) | ||
| 240 | |||
| 241 | (condition-case errobj | ||
| 242 | ;; This is a clean way to ensure the new process inherits the | ||
| 243 | ;; right coding systems in both Emacs and XEmacs. | ||
| 244 | (let ((coding-system-for-read 'binary) | ||
| 245 | (coding-system-for-write 'binary)) | ||
| 246 | (setq conn (case gw-method | ||
| 247 | (tls | ||
| 248 | (open-tls-stream name buffer host service)) | ||
| 249 | (ssl | ||
| 250 | (open-ssl-stream name buffer host service)) | ||
| 251 | ((native) | ||
| 252 | (open-network-stream name buffer host service)) | ||
| 253 | (socks | ||
| 254 | (socks-open-network-stream name buffer host service)) | ||
| 255 | (telnet | ||
| 256 | (url-open-telnet name buffer host service)) | ||
| 257 | (rlogin | ||
| 258 | (url-open-rlogin name buffer host service)) | ||
| 259 | (otherwise | ||
| 260 | (error "Bad setting of url-gateway-method: %s" | ||
| 261 | url-gateway-method))))) | ||
| 262 | (error | ||
| 263 | (setq conn nil))) | ||
| 264 | conn))) | ||
| 265 | |||
| 266 | (provide 'url-gw) | ||
| 267 | |||
| 268 | ;;; arch-tag: 1c4c0317-6d03-45b8-b3f3-838bd8f9d838 | ||
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index 56497b00119..db961b9c27e 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; url-handlers.el --- file-name-handler stuff for URL loading | 1 | ;;; url-handlers.el --- file-name-handler stuff for URL loading |
| 2 | 2 | ||
| 3 | ;; Copyright (c) 1996, 1997, 1998, 1999, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (c) 1996, 1997, 1998, 1999, 2004 Free Software Foundation, Inc. |
| 4 | ;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu> | ||
| 5 | 4 | ||
| 6 | ;; Keywords: comm, data, processes, hypermedia | 5 | ;; Keywords: comm, data, processes, hypermedia |
| 7 | 6 | ||
| @@ -208,7 +207,7 @@ accessible." | |||
| 208 | ;; annotation which we could use as a hint of the locale in use | 207 | ;; annotation which we could use as a hint of the locale in use |
| 209 | ;; at the remote site. Not sure how/if that should be done. --Stef | 208 | ;; at the remote site. Not sure how/if that should be done. --Stef |
| 210 | (decode-coding-inserted-region | 209 | (decode-coding-inserted-region |
| 211 | start (point) buffer-file-name visit beg end replace))) | 210 | start (point) url visit beg end replace))) |
| 212 | (list url (length data)))) | 211 | (list url (length data)))) |
| 213 | 212 | ||
| 214 | (defun url-file-name-completion (url directory) | 213 | (defun url-file-name-completion (url directory) |
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el new file mode 100644 index 00000000000..6a2d87cfbc1 --- /dev/null +++ b/lisp/url/url-history.el | |||
| @@ -0,0 +1,199 @@ | |||
| 1 | ;;; url-history.el --- Global history tracking for URL package | ||
| 2 | |||
| 3 | ;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Keywords: comm, data, processes, hypermedia | ||
| 6 | |||
| 7 | ;; This file is part of GNU Emacs. | ||
| 8 | ;; | ||
| 9 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;; any later version. | ||
| 13 | ;; | ||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;; GNU General Public License for more details. | ||
| 18 | ;; | ||
| 19 | ;; You should have received a copy of the GNU General Public License | ||
| 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;; Boston, MA 02111-1307, USA. | ||
| 23 | |||
| 24 | ;;; Commentary: | ||
| 25 | |||
| 26 | ;;; Code: | ||
| 27 | |||
| 28 | ;; This can get a recursive require. | ||
| 29 | ;;(require 'url) | ||
| 30 | (eval-when-compile (require 'cl)) | ||
| 31 | (require 'url-parse) | ||
| 32 | (autoload 'url-do-setup "url") | ||
| 33 | |||
| 34 | (defgroup url-history nil | ||
| 35 | "History variables in the URL package" | ||
| 36 | :prefix "url-history" | ||
| 37 | :group 'url) | ||
| 38 | |||
| 39 | (defcustom url-history-track nil | ||
| 40 | "*Controls whether to keep a list of all the URLS being visited. | ||
| 41 | If non-nil, url will keep track of all the URLS visited. | ||
| 42 | If eq to `t', then the list is saved to disk at the end of each emacs | ||
| 43 | session." | ||
| 44 | :type 'boolean | ||
| 45 | :group 'url-history) | ||
| 46 | |||
| 47 | (defcustom url-history-file nil | ||
| 48 | "*The global history file for the URL package. | ||
| 49 | This file contains a list of all the URLs you have visited. This file | ||
| 50 | is parsed at startup and used to provide URL completion." | ||
| 51 | :type '(choice (const :tag "Default" :value nil) file) | ||
| 52 | :group 'url-history) | ||
| 53 | |||
| 54 | (defcustom url-history-save-interval 3600 | ||
| 55 | "*The number of seconds between automatic saves of the history list. | ||
| 56 | Default is 1 hour. Note that if you change this variable outside of | ||
| 57 | the `customize' interface after `url-do-setup' has been run, you need | ||
| 58 | to run the `url-history-setup-save-timer' function manually." | ||
| 59 | :set (function (lambda (var val) | ||
| 60 | (set-default var val) | ||
| 61 | (and (featurep 'url) | ||
| 62 | (fboundp 'url-history-setup-save-timer) | ||
| 63 | (let ((def (symbol-function | ||
| 64 | 'url-history-setup-save-timer))) | ||
| 65 | (not (and (listp def) (eq 'autoload (car def))))) | ||
| 66 | (url-history-setup-save-timer)))) | ||
| 67 | :type 'integer | ||
| 68 | :group 'url-history) | ||
| 69 | |||
| 70 | (defvar url-history-timer nil) | ||
| 71 | |||
| 72 | (defvar url-history-list nil | ||
| 73 | "List of urls visited this session.") | ||
| 74 | |||
| 75 | (defvar url-history-changed-since-last-save nil | ||
| 76 | "Whether the history list has changed since the last save operation.") | ||
| 77 | |||
| 78 | (defvar url-history-hash-table nil | ||
| 79 | "Hash table for global history completion.") | ||
| 80 | |||
| 81 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 82 | |||
| 83 | ;;;###autoload | ||
| 84 | (defun url-history-setup-save-timer () | ||
| 85 | "Reset the history list timer." | ||
| 86 | (interactive) | ||
| 87 | (ignore-errors | ||
| 88 | (cond ((fboundp 'cancel-timer) (cancel-timer url-history-timer)) | ||
| 89 | ((fboundp 'delete-itimer) (delete-itimer url-history-timer)))) | ||
| 90 | (setq url-history-timer nil) | ||
| 91 | (if url-history-save-interval | ||
| 92 | (setq url-history-timer | ||
| 93 | (cond | ||
| 94 | ((fboundp 'run-at-time) | ||
| 95 | (run-at-time url-history-save-interval | ||
| 96 | url-history-save-interval | ||
| 97 | 'url-history-save-history)) | ||
| 98 | ((fboundp 'start-itimer) | ||
| 99 | (start-itimer "url-history-saver" 'url-history-save-history | ||
| 100 | url-history-save-interval | ||
| 101 | url-history-save-interval)))))) | ||
| 102 | |||
| 103 | ;;;###autoload | ||
| 104 | (defun url-history-parse-history (&optional fname) | ||
| 105 | "Parse a history file stored in FNAME." | ||
| 106 | ;; Parse out the mosaic global history file for completions, etc. | ||
| 107 | (or fname (setq fname (expand-file-name url-history-file))) | ||
| 108 | (cond | ||
| 109 | ((not (file-exists-p fname)) | ||
| 110 | (message "%s does not exist." fname)) | ||
| 111 | ((not (file-readable-p fname)) | ||
| 112 | (message "%s is unreadable." fname)) | ||
| 113 | (t | ||
| 114 | (condition-case nil | ||
| 115 | (load fname nil t) | ||
| 116 | (error (message "Could not load %s" fname))))) | ||
| 117 | (if (not url-history-hash-table) | ||
| 118 | (setq url-history-hash-table (make-hash-table :size 31 :test 'equal)))) | ||
| 119 | |||
| 120 | (defun url-history-update-url (url time) | ||
| 121 | (setq url-history-changed-since-last-save t) | ||
| 122 | (puthash (if (vectorp url) (url-recreate-url url) url) time url-history-hash-table)) | ||
| 123 | |||
| 124 | ;;;###autoload | ||
| 125 | (defun url-history-save-history (&optional fname) | ||
| 126 | "Write the global history file into `url-history-file'. | ||
| 127 | The type of data written is determined by what is in the file to begin | ||
| 128 | with. If the type of storage cannot be determined, then prompt the | ||
| 129 | user for what type to save as." | ||
| 130 | (interactive) | ||
| 131 | (or fname (setq fname (expand-file-name url-history-file))) | ||
| 132 | (cond | ||
| 133 | ((not url-history-changed-since-last-save) nil) | ||
| 134 | ((not (file-writable-p fname)) | ||
| 135 | (message "%s is unwritable." fname)) | ||
| 136 | (t | ||
| 137 | (let ((make-backup-files nil) | ||
| 138 | (version-control nil) | ||
| 139 | (require-final-newline t)) | ||
| 140 | (save-excursion | ||
| 141 | (set-buffer (get-buffer-create " *url-tmp*")) | ||
| 142 | (erase-buffer) | ||
| 143 | (let ((count 0)) | ||
| 144 | (maphash (function | ||
| 145 | (lambda (key value) | ||
| 146 | (while (string-match "[\r\n]+" key) | ||
| 147 | (setq key (concat (substring key 0 (match-beginning 0)) | ||
| 148 | (substring key (match-end 0) nil)))) | ||
| 149 | (setq count (1+ count)) | ||
| 150 | (insert "(puthash \"" key "\"" | ||
| 151 | (if (not (stringp value)) " '" "") | ||
| 152 | (prin1-to-string value) | ||
| 153 | " url-history-hash-table)\n"))) | ||
| 154 | url-history-hash-table) | ||
| 155 | (goto-char (point-min)) | ||
| 156 | (insert (format | ||
| 157 | "(setq url-history-hash-table (make-hash-table :size %d :test 'equal))\n" | ||
| 158 | (/ count 4))) | ||
| 159 | (goto-char (point-max)) | ||
| 160 | (insert "\n") | ||
| 161 | (write-file fname)) | ||
| 162 | (kill-buffer (current-buffer)))))) | ||
| 163 | (setq url-history-changed-since-last-save nil)) | ||
| 164 | |||
| 165 | (defun url-have-visited-url (url) | ||
| 166 | (url-do-setup) | ||
| 167 | (gethash url url-history-hash-table nil)) | ||
| 168 | |||
| 169 | (defun url-completion-function (string predicate function) | ||
| 170 | (url-do-setup) | ||
| 171 | (cond | ||
| 172 | ((eq function nil) | ||
| 173 | (let ((list nil)) | ||
| 174 | (maphash (function (lambda (key val) | ||
| 175 | (setq list (cons (cons key val) | ||
| 176 | list)))) | ||
| 177 | url-history-hash-table) | ||
| 178 | (try-completion string (nreverse list) predicate))) | ||
| 179 | ((eq function t) | ||
| 180 | (let ((stub (concat "^" (regexp-quote string))) | ||
| 181 | (retval nil)) | ||
| 182 | (maphash | ||
| 183 | (function | ||
| 184 | (lambda (url time) | ||
| 185 | (if (string-match stub url) | ||
| 186 | (setq retval (cons url retval))))) | ||
| 187 | url-history-hash-table) | ||
| 188 | retval)) | ||
| 189 | ((eq function 'lambda) | ||
| 190 | (and url-history-hash-table | ||
| 191 | (gethash string url-history-hash-table) | ||
| 192 | t)) | ||
| 193 | (t | ||
| 194 | (error "url-completion-function very confused.")))) | ||
| 195 | |||
| 196 | (provide 'url-history) | ||
| 197 | |||
| 198 | ;; arch-tag: fbbbaf63-db36-4e88-bc9f-2939aa93afb2 | ||
| 199 | ;;; url-history.el ends here | ||
diff --git a/lisp/url/url-https.el b/lisp/url/url-https.el index 11b2593ea80..9631aeb18e4 100644 --- a/lisp/url/url-https.el +++ b/lisp/url/url-https.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; url-https.el --- HTTP over SSL routines | 1 | ;;; url-https.el --- HTTP over SSL/TLS routines |
| 2 | 2 | ||
| 3 | ;; Copyright (c) 1999, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (c) 1999, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -30,6 +30,7 @@ | |||
| 30 | (require 'url-parse) | 30 | (require 'url-parse) |
| 31 | (require 'url-cookie) | 31 | (require 'url-cookie) |
| 32 | (require 'url-http) | 32 | (require 'url-http) |
| 33 | (require 'tls) | ||
| 33 | 34 | ||
| 34 | (defconst url-https-default-port 443 "Default HTTPS port.") | 35 | (defconst url-https-default-port 443 "Default HTTPS port.") |
| 35 | (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") | 36 | (defconst url-https-asynchronous-p t "HTTPS retrievals are asynchronous.") |
| @@ -38,12 +39,11 @@ | |||
| 38 | (defmacro url-https-create-secure-wrapper (method args) | 39 | (defmacro url-https-create-secure-wrapper (method args) |
| 39 | `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args | 40 | `(defun ,(intern (format (if method "url-https-%s" "url-https") method)) ,args |
| 40 | ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) | 41 | ,(format "HTTPS wrapper around `%s' call." (or method "url-http")) |
| 41 | (condition-case () | 42 | (let ((url-gateway-method (condition-case () |
| 42 | (require 'ssl) | 43 | (require 'ssl) |
| 43 | (error | 44 | (error 'tls)))) |
| 44 | (error "HTTPS support could not find `ssl' library"))) | 45 | (,(intern (format (if method "url-http-%s" "url-http") method)) |
| 45 | (let ((url-gateway-method 'ssl)) | 46 | ,@(remove '&rest (remove '&optional args)))))) |
| 46 | ( ,(intern (format (if method "url-http-%s" "url-http") method)) ,@(remove '&rest (remove '&optional args)))))) | ||
| 47 | 47 | ||
| 48 | (url-https-create-secure-wrapper nil (url callback cbargs)) | 48 | (url-https-create-secure-wrapper nil (url callback cbargs)) |
| 49 | (url-https-create-secure-wrapper file-exists-p (url)) | 49 | (url-https-create-secure-wrapper file-exists-p (url)) |
diff --git a/lisp/url/url-irc.el b/lisp/url/url-irc.el new file mode 100644 index 00000000000..a4b195f253f --- /dev/null +++ b/lisp/url/url-irc.el | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | ;;; url-irc.el --- IRC URL interface | ||
| 2 | ;; Keywords: comm, data, processes | ||
| 3 | |||
| 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 5 | ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. | ||
| 6 | ;;; | ||
| 7 | ;;; This file is part of GNU Emacs. | ||
| 8 | ;;; | ||
| 9 | ;;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;;; any later version. | ||
| 13 | ;;; | ||
| 14 | ;;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;;; GNU General Public License for more details. | ||
| 18 | ;;; | ||
| 19 | ;;; You should have received a copy of the GNU General Public License | ||
| 20 | ;;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;;; Boston, MA 02111-1307, USA. | ||
| 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 24 | |||
| 25 | ;;; IRC URLs are defined in http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt | ||
| 26 | |||
| 27 | (require 'url-vars) | ||
| 28 | (require 'url-parse) | ||
| 29 | |||
| 30 | (defconst url-irc-default-port 6667 "Default port for IRC connections") | ||
| 31 | |||
| 32 | (defcustom url-irc-function 'url-irc-zenirc | ||
| 33 | "*Function to actually open an IRC connection. | ||
| 34 | Should be a function that takes several argument: | ||
| 35 | HOST - the hostname of the IRC server to contact | ||
| 36 | PORT - the port number of the IRC server to contact | ||
| 37 | CHANNEL - What channel on the server to visit right away (can be nil) | ||
| 38 | USER - What username to use | ||
| 39 | PASSWORD - What password to use" | ||
| 40 | :type '(choice (const :tag "ZEN IRC" :value 'url-irc-zenirc) | ||
| 41 | (function :tag "Other")) | ||
| 42 | :group 'url) | ||
| 43 | |||
| 44 | (defun url-irc-zenirc (host port channel user password) | ||
| 45 | (let ((zenirc-buffer-name (if (and user host port) | ||
| 46 | (format "%s@%s:%d" user host port) | ||
| 47 | (format "%s:%d" host port))) | ||
| 48 | (zenirc-server-alist | ||
| 49 | (list | ||
| 50 | (list host port password nil user)))) | ||
| 51 | (zenirc) | ||
| 52 | (goto-char (point-max)) | ||
| 53 | (if (not channel) | ||
| 54 | nil | ||
| 55 | (insert "/join " channel) | ||
| 56 | (zenirc-send-line)))) | ||
| 57 | |||
| 58 | ;;;###autoload | ||
| 59 | (defun url-irc (url) | ||
| 60 | (let* ((host (url-host url)) | ||
| 61 | (port (string-to-int (url-port url))) | ||
| 62 | (pass (url-password url)) | ||
| 63 | (user (url-user url)) | ||
| 64 | (chan (url-filename url))) | ||
| 65 | (if (url-target url) | ||
| 66 | (setq chan (concat chan "#" (url-target url)))) | ||
| 67 | (if (string-match "^/" chan) | ||
| 68 | (setq chan (substring chan 1 nil))) | ||
| 69 | (if (= (length chan) 0) | ||
| 70 | (setq chan nil)) | ||
| 71 | (funcall url-irc-function host port chan user pass) | ||
| 72 | nil)) | ||
| 73 | |||
| 74 | (provide 'url-irc) | ||
| 75 | |||
| 76 | ;;; arch-tag: 2e5eecf8-9eb3-436b-9fbd-c26f2fb2bf3e | ||
diff --git a/lisp/url/url-ldap.el b/lisp/url/url-ldap.el new file mode 100644 index 00000000000..24a3ade4922 --- /dev/null +++ b/lisp/url/url-ldap.el | |||
| @@ -0,0 +1,240 @@ | |||
| 1 | ;;; url-ldap.el --- LDAP Uniform Resource Locator retrieval code | ||
| 2 | ;; Copyright (c) 1998 - 1999, 2004 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | ;; Keywords: comm, data, processes | ||
| 5 | |||
| 6 | ;; This file is part of GNU Emacs. | ||
| 7 | ;; | ||
| 8 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 9 | ;; it under the terms of the GNU General Public License as published by | ||
| 10 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 11 | ;; any later version. | ||
| 12 | ;; | ||
| 13 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 14 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | ;; GNU General Public License for more details. | ||
| 17 | ;; | ||
| 18 | ;; You should have received a copy of the GNU General Public License | ||
| 19 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 20 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 21 | ;; Boston, MA 02111-1307, USA. | ||
| 22 | |||
| 23 | ;;; Commentary: | ||
| 24 | |||
| 25 | ;;; Code: | ||
| 26 | |||
| 27 | (require 'url-vars) | ||
| 28 | (require 'url-parse) | ||
| 29 | (require 'url-util) | ||
| 30 | (require 'ldap) | ||
| 31 | (autoload 'tls-certificate-information "tls") | ||
| 32 | |||
| 33 | ;; This has been implemented from RFC2255 'The LDAP URL Format' (Dec 1997) | ||
| 34 | ;; | ||
| 35 | ;; basic format is: ldap://host:port/dn?attributes?scope?filter?extensions | ||
| 36 | ;; | ||
| 37 | ;; Test URLs: | ||
| 38 | ;; ldap://ldap.itd.umich.edu/cn%3Dumbflabmanager%2C%20ou%3DUser%20Groups%2C%20ou%3DGroups%2C%20o%3DUniversity%20of%20Michigan%2C%20c%3DUS | ||
| 39 | ;; ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US | ||
| 40 | ;; | ||
| 41 | ;; For simple queries, I have verified compatibility with Netscape | ||
| 42 | ;; Communicator v4.5 under GNU/Linux. | ||
| 43 | ;; | ||
| 44 | ;; For anything _useful_ though, like specifying the attributes, | ||
| 45 | ;; scope, filter, or extensions, netscape claims the URL format is | ||
| 46 | ;; unrecognized. So I don't think it supports anything other than the | ||
| 47 | ;; defaults (scope=base,attributes=*,filter=(objectClass=*) | ||
| 48 | |||
| 49 | (defconst url-ldap-default-port 389 "Default LDAP port.") | ||
| 50 | (defalias 'url-ldap-expand-file-name 'url-default-expander) | ||
| 51 | |||
| 52 | (defvar url-ldap-pretty-names | ||
| 53 | '(("l" . "City") | ||
| 54 | ("objectclass" . "Object Class") | ||
| 55 | ("o" . "Organization") | ||
| 56 | ("ou" . "Organizational Unit") | ||
| 57 | ("cn" . "Name") | ||
| 58 | ("sn" . "Last Name") | ||
| 59 | ("givenname" . "First Name") | ||
| 60 | ("mail" . "Email") | ||
| 61 | ("title" . "Title") | ||
| 62 | ("c" . "Country") | ||
| 63 | ("postalcode" . "ZIP Code") | ||
| 64 | ("telephonenumber" . "Phone Number") | ||
| 65 | ("facsimiletelephonenumber" . "Fax") | ||
| 66 | ("postaladdress" . "Mailing Address") | ||
| 67 | ("description" . "Notes")) | ||
| 68 | "*An assoc list mapping LDAP attribute names to pretty descriptions of them.") | ||
| 69 | |||
| 70 | (defvar url-ldap-attribute-formatters | ||
| 71 | '(("mail" . (lambda (x) (format "<a href='mailto:%s'>%s</a>" x x))) | ||
| 72 | ("owner" . url-ldap-dn-formatter) | ||
| 73 | ("creatorsname" . url-ldap-dn-formatter) | ||
| 74 | ("jpegphoto" . url-ldap-image-formatter) | ||
| 75 | ("usercertificate" . url-ldap-certificate-formatter) | ||
| 76 | ("modifiersname" . url-ldap-dn-formatter) | ||
| 77 | ("namingcontexts" . url-ldap-dn-formatter) | ||
| 78 | ("defaultnamingcontext" . url-ldap-dn-formatter) | ||
| 79 | ("member" . url-ldap-dn-formatter)) | ||
| 80 | "*An assoc list mapping LDAP attribute names to pretty formatters for them.") | ||
| 81 | |||
| 82 | (defsubst url-ldap-attribute-pretty-name (n) | ||
| 83 | (or (cdr-safe (assoc (downcase n) url-ldap-pretty-names)) n)) | ||
| 84 | |||
| 85 | (defsubst url-ldap-attribute-pretty-desc (n v) | ||
| 86 | (if (string-match "^\\([^;]+\\);" n) | ||
| 87 | (setq n (match-string 1 n))) | ||
| 88 | (funcall (or (cdr-safe (assoc (downcase n) url-ldap-attribute-formatters)) 'identity) v)) | ||
| 89 | |||
| 90 | (defun url-ldap-dn-formatter (dn) | ||
| 91 | (concat "<a href='/" | ||
| 92 | (url-hexify-string dn) | ||
| 93 | "'>" dn "</a>")) | ||
| 94 | |||
| 95 | (defun url-ldap-certificate-formatter (data) | ||
| 96 | (condition-case () | ||
| 97 | (require 'ssl) | ||
| 98 | (error nil)) | ||
| 99 | (let ((vals (if (fboundp 'ssl-certificate-information) | ||
| 100 | (ssl-certificate-information data) | ||
| 101 | (tls-certificate-information data)))) | ||
| 102 | (if (not vals) | ||
| 103 | "<b>Unable to parse certificate</b>" | ||
| 104 | (concat "<table border=0>\n" | ||
| 105 | (mapconcat | ||
| 106 | (lambda (ava) | ||
| 107 | (format "<tr><td>%s</td><td>%s</td></tr>\n" (car ava) (cdr ava))) | ||
| 108 | vals "\n") | ||
| 109 | "</table>\n")))) | ||
| 110 | |||
| 111 | (defun url-ldap-image-formatter (data) | ||
| 112 | (format "<img alt='JPEG Photo' src='data:image/jpeg;base64,%s'>" | ||
| 113 | (url-hexify-string (base64-encode-string data)))) | ||
| 114 | |||
| 115 | ;; FIXME: This needs sorting out for the Emacs LDAP functions, specifically | ||
| 116 | ;; calls of ldap-open, ldap-close, ldap-search-internal | ||
| 117 | ;;;###autoload | ||
| 118 | (defun url-ldap (url) | ||
| 119 | (save-excursion | ||
| 120 | (set-buffer (generate-new-buffer " *url-ldap*")) | ||
| 121 | (setq url-current-object url) | ||
| 122 | (insert "Content-type: text/html\r\n\r\n") | ||
| 123 | (if (not (fboundp 'ldap-search-internal)) | ||
| 124 | (insert "<html>\n" | ||
| 125 | " <head>\n" | ||
| 126 | " <title>LDAP Not Supported</title>\n" | ||
| 127 | " <base href='" (url-recreate-url url) "'>\n" | ||
| 128 | " </head>\n" | ||
| 129 | " <body>\n" | ||
| 130 | " <h1>LDAP Not Supported</h1>\n" | ||
| 131 | " <p>\n" | ||
| 132 | " This version of Emacs does not support LDAP.\n" | ||
| 133 | " </p>\n" | ||
| 134 | " </body>\n" | ||
| 135 | "</html>\n") | ||
| 136 | (let* ((binddn nil) | ||
| 137 | (data (url-filename url)) | ||
| 138 | (host (url-host url)) | ||
| 139 | (port (url-port url)) | ||
| 140 | (base-object nil) | ||
| 141 | (attributes nil) | ||
| 142 | (scope nil) | ||
| 143 | (filter nil) | ||
| 144 | (extensions nil) | ||
| 145 | (connection nil) | ||
| 146 | (results nil) | ||
| 147 | (extract-dn (and (fboundp 'function-max-args) | ||
| 148 | (= (function-max-args 'ldap-search-internal) 7)))) | ||
| 149 | |||
| 150 | ;; Get rid of leading / | ||
| 151 | (if (string-match "^/" data) | ||
| 152 | (setq data (substring data 1))) | ||
| 153 | |||
| 154 | (setq data (mapcar (lambda (x) (if (/= (length x) 0) x nil)) (split-string data "\\?")) | ||
| 155 | base-object (nth 0 data) | ||
| 156 | attributes (nth 1 data) | ||
| 157 | scope (nth 2 data) | ||
| 158 | filter (nth 3 data) | ||
| 159 | extensions (nth 4 data)) | ||
| 160 | |||
| 161 | ;; fill in the defaults | ||
| 162 | (setq base-object (url-unhex-string (or base-object "")) | ||
| 163 | scope (intern (url-unhex-string (or scope "base"))) | ||
| 164 | filter (url-unhex-string (or filter "(objectClass=*)"))) | ||
| 165 | |||
| 166 | (if (not (memq scope '(base one tree))) | ||
| 167 | (error "Malformed LDAP URL: Unknown scope: %S" scope)) | ||
| 168 | |||
| 169 | ;; Convert to the internal LDAP support scoping names. | ||
| 170 | (setq scope (cdr (assq scope '((base . base) (one . onelevel) (sub . subtree))))) | ||
| 171 | |||
| 172 | (if attributes | ||
| 173 | (setq attributes (mapcar 'url-unhex-string (split-string attributes ",")))) | ||
| 174 | |||
| 175 | ;; Parse out the exentions | ||
| 176 | (if extensions | ||
| 177 | (setq extensions (mapcar (lambda (ext) | ||
| 178 | (if (string-match "\\([^=]*\\)=\\(.*\\)" ext) | ||
| 179 | (cons (match-string 1 ext) (match-string 2 ext)) | ||
| 180 | (cons ext ext))) | ||
| 181 | (split-string extensions ",")) | ||
| 182 | extensions (mapcar (lambda (ext) | ||
| 183 | (cons (url-unhex-string (car ext)) | ||
| 184 | (url-unhex-string (cdr ext)))) | ||
| 185 | extensions))) | ||
| 186 | |||
| 187 | (setq binddn (cdr-safe (or (assoc "bindname" extensions) | ||
| 188 | (assoc "!bindname" extensions)))) | ||
| 189 | |||
| 190 | ;; Now, let's actually do something with it. | ||
| 191 | (setq connection (ldap-open host (if binddn (list 'binddn binddn))) | ||
| 192 | results (if extract-dn | ||
| 193 | (ldap-search-internal connection filter base-object scope attributes nil t) | ||
| 194 | (ldap-search-internal connection filter base-object scope attributes nil))) | ||
| 195 | |||
| 196 | (ldap-close connection) | ||
| 197 | (insert "<html>\n" | ||
| 198 | " <head>\n" | ||
| 199 | " <title>LDAP Search Results</title>\n" | ||
| 200 | " <base href='" (url-recreate-url url) "'>\n" | ||
| 201 | " </head>\n" | ||
| 202 | " <body>\n" | ||
| 203 | " <h1>" (int-to-string (length results)) " matches</h1>\n") | ||
| 204 | |||
| 205 | (mapc (lambda (obj) | ||
| 206 | (insert " <hr>\n" | ||
| 207 | " <table border=1>\n") | ||
| 208 | (if extract-dn | ||
| 209 | (insert " <tr><th colspan=2>" (car obj) "</th></tr>\n")) | ||
| 210 | (mapc (lambda (attr) | ||
| 211 | (if (= (length (cdr attr)) 1) | ||
| 212 | ;; single match, easy | ||
| 213 | (insert " <tr><td>" | ||
| 214 | (url-ldap-attribute-pretty-name (car attr)) | ||
| 215 | "</td><td>" | ||
| 216 | (url-ldap-attribute-pretty-desc (car attr) (car (cdr attr))) | ||
| 217 | "</td></tr>\n") | ||
| 218 | ;; Multiple matches, slightly uglier | ||
| 219 | (insert " <tr>\n" | ||
| 220 | (format " <td valign=top>") | ||
| 221 | (url-ldap-attribute-pretty-name (car attr)) "</td><td>" | ||
| 222 | (mapconcat (lambda (x) | ||
| 223 | (url-ldap-attribute-pretty-desc (car attr) x)) | ||
| 224 | (cdr attr) | ||
| 225 | "<br>\n") | ||
| 226 | "</td>" | ||
| 227 | " </tr>\n"))) | ||
| 228 | (if extract-dn (cdr obj) obj)) | ||
| 229 | (insert " </table>\n")) | ||
| 230 | results) | ||
| 231 | |||
| 232 | (insert " <hr>\n" | ||
| 233 | " </body>\n" | ||
| 234 | "</html>\n"))) | ||
| 235 | (current-buffer))) | ||
| 236 | |||
| 237 | (provide 'url-ldap) | ||
| 238 | |||
| 239 | ;; arch-tag: 6230e21c-41ae-4174-bd83-82c835676fc8 | ||
| 240 | ;;; url-ldap.el ends here | ||
diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el new file mode 100644 index 00000000000..bcb6bad4179 --- /dev/null +++ b/lisp/url/url-mailto.el | |||
| @@ -0,0 +1,131 @@ | |||
| 1 | ;;; url-mail.el --- Mail Uniform Resource Locator retrieval code | ||
| 2 | |||
| 3 | ;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Keywords: comm, data, processes | ||
| 6 | |||
| 7 | ;; This file is part of GNU Emacs. | ||
| 8 | ;; | ||
| 9 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;; any later version. | ||
| 13 | ;; | ||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;; GNU General Public License for more details. | ||
| 18 | ;; | ||
| 19 | ;; You should have received a copy of the GNU General Public License | ||
| 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;; Boston, MA 02111-1307, USA. | ||
| 23 | |||
| 24 | ;;; Commentary: | ||
| 25 | |||
| 26 | ;;; Code: | ||
| 27 | |||
| 28 | (eval-when-compile (require 'cl)) | ||
| 29 | (require 'url-vars) | ||
| 30 | (require 'url-parse) | ||
| 31 | (require 'url-util) | ||
| 32 | |||
| 33 | ;;;###autoload | ||
| 34 | (defun url-mail (&rest args) | ||
| 35 | (interactive "P") | ||
| 36 | (if (fboundp 'message-mail) | ||
| 37 | (apply 'message-mail args) | ||
| 38 | (or (apply 'mail args) | ||
| 39 | (error "Mail aborted")))) | ||
| 40 | |||
| 41 | (defun url-mail-goto-field (field) | ||
| 42 | (if (not field) | ||
| 43 | (goto-char (point-max)) | ||
| 44 | (let ((dest nil) | ||
| 45 | (lim nil) | ||
| 46 | (case-fold-search t)) | ||
| 47 | (save-excursion | ||
| 48 | (goto-char (point-min)) | ||
| 49 | (if (re-search-forward (regexp-quote mail-header-separator) nil t) | ||
| 50 | (setq lim (match-beginning 0))) | ||
| 51 | (goto-char (point-min)) | ||
| 52 | (if (re-search-forward (concat "^" (regexp-quote field) ":") lim t) | ||
| 53 | (setq dest (match-beginning 0)))) | ||
| 54 | (if dest | ||
| 55 | (progn | ||
| 56 | (goto-char dest) | ||
| 57 | (end-of-line)) | ||
| 58 | (goto-char lim) | ||
| 59 | (insert (capitalize field) ": ") | ||
| 60 | (save-excursion | ||
| 61 | (insert "\n")))))) | ||
| 62 | |||
| 63 | ;;;###autoload | ||
| 64 | (defun url-mailto (url) | ||
| 65 | "Handle the mailto: URL syntax." | ||
| 66 | (if (url-user url) | ||
| 67 | ;; malformed mailto URL (mailto://wmperry@gnu.org instead of | ||
| 68 | ;; mailto:wmperry@gnu.org | ||
| 69 | (url-set-filename url (concat (url-user url) "@" (url-filename url)))) | ||
| 70 | (setq url (url-filename url)) | ||
| 71 | (let (to args source-url subject func headers-start) | ||
| 72 | (if (string-match (regexp-quote "?") url) | ||
| 73 | (setq headers-start (match-end 0) | ||
| 74 | to (url-unhex-string (substring url 0 (match-beginning 0))) | ||
| 75 | args (url-parse-query-string | ||
| 76 | (substring url headers-start nil) t)) | ||
| 77 | (setq to (url-unhex-string url))) | ||
| 78 | (setq source-url (url-view-url t)) | ||
| 79 | (if (and url-request-data (not (assoc "subject" args))) | ||
| 80 | (setq args (cons (list "subject" | ||
| 81 | (concat "Automatic submission from " | ||
| 82 | url-package-name "/" | ||
| 83 | url-package-version)) args))) | ||
| 84 | (if (and source-url (not (assoc "x-url-from" args))) | ||
| 85 | (setq args (cons (list "x-url-from" source-url) args))) | ||
| 86 | |||
| 87 | (if (assoc "to" args) | ||
| 88 | (push to (cdr (assoc "to" args))) | ||
| 89 | (setq args (cons (list "to" to) args))) | ||
| 90 | (setq subject (cdr-safe (assoc "subject" args))) | ||
| 91 | (if (fboundp url-mail-command) (funcall url-mail-command) (mail)) | ||
| 92 | (while args | ||
| 93 | (if (string= (caar args) "body") | ||
| 94 | (progn | ||
| 95 | (goto-char (point-max)) | ||
| 96 | (insert (mapconcat 'identity (cdar args) "\n"))) | ||
| 97 | (url-mail-goto-field (caar args)) | ||
| 98 | (setq func (intern-soft (concat "mail-" (caar args)))) | ||
| 99 | (insert (mapconcat 'identity (cdar args) ", "))) | ||
| 100 | (setq args (cdr args))) | ||
| 101 | ;; (url-mail-goto-field "User-Agent") | ||
| 102 | ;; (insert url-package-name "/" url-package-version " URL/" url-version) | ||
| 103 | (if (not url-request-data) | ||
| 104 | (progn | ||
| 105 | (set-buffer-modified-p nil) | ||
| 106 | (if subject | ||
| 107 | (url-mail-goto-field nil) | ||
| 108 | (url-mail-goto-field "subject"))) | ||
| 109 | (if url-request-extra-headers | ||
| 110 | (mapconcat | ||
| 111 | (lambda (x) | ||
| 112 | (url-mail-goto-field (car x)) | ||
| 113 | (insert (cdr x))) | ||
| 114 | url-request-extra-headers "")) | ||
| 115 | (goto-char (point-max)) | ||
| 116 | (insert url-request-data) | ||
| 117 | ;; It seems Microsoft-ish to send without warning. | ||
| 118 | ;; Fixme: presumably this should depend on a privacy setting. | ||
| 119 | (if (y-or-n-p "Send this auto-generated mail? ") | ||
| 120 | (cond ((eq url-mail-command 'compose-mail) | ||
| 121 | (funcall (get mail-user-agent 'sendfunc) nil)) | ||
| 122 | ;; otherwise, we can't be sure | ||
| 123 | ((fboundp 'message-send-and-exit) | ||
| 124 | (message-send-and-exit)) | ||
| 125 | (t (mail-send-and-exit nil))))) | ||
| 126 | nil)) | ||
| 127 | |||
| 128 | (provide 'url-mailto) | ||
| 129 | |||
| 130 | ;; arch-tag: 7b7ad52e-8760-497b-9444-75fae14e34c5 | ||
| 131 | ;;; url-mailto.el ends here | ||
diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el new file mode 100644 index 00000000000..75d746f3e3f --- /dev/null +++ b/lisp/url/url-methods.el | |||
| @@ -0,0 +1,150 @@ | |||
| 1 | ;;; url-methods.el --- Load URL schemes as needed | ||
| 2 | |||
| 3 | ;; Copyright (c) 1996,1997,1998,1999,2004 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Keywords: comm, data, processes, hypermedia | ||
| 6 | |||
| 7 | ;; This file is part of GNU Emacs. | ||
| 8 | |||
| 9 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;; any later version. | ||
| 13 | ;; | ||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;; GNU General Public License for more details. | ||
| 18 | ;; | ||
| 19 | ;; You should have received a copy of the GNU General Public License | ||
| 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;; Boston, MA 02111-1307, USA. | ||
| 23 | |||
| 24 | ;;; Commentary: | ||
| 25 | |||
| 26 | ;;; Code: | ||
| 27 | |||
| 28 | (eval-when-compile | ||
| 29 | (require 'cl)) | ||
| 30 | |||
| 31 | ;; This loads up some of the small, silly URLs that I really don't | ||
| 32 | ;; want to bother putting in their own separate files. | ||
| 33 | (require 'url-parse) | ||
| 34 | |||
| 35 | (defvar url-scheme-registry (make-hash-table :size 7 :test 'equal)) | ||
| 36 | |||
| 37 | (defconst url-scheme-methods | ||
| 38 | '((default-port . variable) | ||
| 39 | (asynchronous-p . variable) | ||
| 40 | (expand-file-name . function) | ||
| 41 | (file-exists-p . function) | ||
| 42 | (file-attributes . function) | ||
| 43 | (parse-url . function) | ||
| 44 | (file-symlink-p . function) | ||
| 45 | (file-writable-p . function) | ||
| 46 | (file-directory-p . function) | ||
| 47 | (file-executable-p . function) | ||
| 48 | (directory-files . function) | ||
| 49 | (file-truename . function)) | ||
| 50 | "Assoc-list of methods that each URL loader can provide.") | ||
| 51 | |||
| 52 | (defconst url-scheme-default-properties | ||
| 53 | (list 'name "unknown" | ||
| 54 | 'loader 'url-scheme-default-loader | ||
| 55 | 'default-port 0 | ||
| 56 | 'expand-file-name 'url-identity-expander | ||
| 57 | 'parse-url 'url-generic-parse-url | ||
| 58 | 'asynchronous-p nil | ||
| 59 | 'file-directory-p 'ignore | ||
| 60 | 'file-truename (lambda (&rest args) | ||
| 61 | (url-recreate-url (car args))) | ||
| 62 | 'file-exists-p 'ignore | ||
| 63 | 'file-attributes 'ignore)) | ||
| 64 | |||
| 65 | (defun url-scheme-default-loader (url &optional callback cbargs) | ||
| 66 | "Signal an error for an unknown URL scheme." | ||
| 67 | (error "Unkown URL scheme: %s" (url-type url))) | ||
| 68 | |||
| 69 | (defun url-scheme-register-proxy (scheme) | ||
| 70 | "Automatically find a proxy for SCHEME and put it in `url-proxy-services'." | ||
| 71 | (let* ((env-var (concat scheme "_proxy")) | ||
| 72 | (env-proxy (or (getenv (upcase env-var)) | ||
| 73 | (getenv (downcase env-var)))) | ||
| 74 | (cur-proxy (assoc scheme url-proxy-services)) | ||
| 75 | (urlobj nil)) | ||
| 76 | |||
| 77 | ;; Store any proxying information - this will not overwrite an old | ||
| 78 | ;; entry, so that people can still set this information in their | ||
| 79 | ;; .emacs file | ||
| 80 | (cond | ||
| 81 | (cur-proxy nil) ; Keep their old settings | ||
| 82 | ((null env-proxy) nil) ; No proxy setup | ||
| 83 | ;; First check if its something like hostname:port | ||
| 84 | ((string-match "^\\([^:]+\\):\\([0-9]+\\)$" env-proxy) | ||
| 85 | (setq urlobj (url-generic-parse-url nil)) ; Get a blank object | ||
| 86 | (url-set-type urlobj "http") | ||
| 87 | (url-set-host urlobj (match-string 1 env-proxy)) | ||
| 88 | (url-set-port urlobj (string-to-number (match-string 2 env-proxy)))) | ||
| 89 | ;; Then check if its a fully specified URL | ||
| 90 | ((string-match url-nonrelative-link env-proxy) | ||
| 91 | (setq urlobj (url-generic-parse-url env-proxy)) | ||
| 92 | (url-set-type urlobj "http") | ||
| 93 | (url-set-target urlobj nil)) | ||
| 94 | ;; Finally, fall back on the assumption that its just a hostname | ||
| 95 | (t | ||
| 96 | (setq urlobj (url-generic-parse-url nil)) ; Get a blank object | ||
| 97 | (url-set-type urlobj "http") | ||
| 98 | (url-set-host urlobj env-proxy))) | ||
| 99 | |||
| 100 | (if (and (not cur-proxy) urlobj) | ||
| 101 | (progn | ||
| 102 | (setq url-proxy-services | ||
| 103 | (cons (cons scheme (format "%s:%d" (url-host urlobj) | ||
| 104 | (url-port urlobj))) | ||
| 105 | url-proxy-services)) | ||
| 106 | (message "Using a proxy for %s..." scheme))))) | ||
| 107 | |||
| 108 | (defun url-scheme-get-property (scheme property) | ||
| 109 | "Get property of a URL SCHEME. | ||
| 110 | Will automatically try to load a backend from url-SCHEME.el if | ||
| 111 | it has not already been loaded." | ||
| 112 | (setq scheme (downcase scheme)) | ||
| 113 | (let ((desc (gethash scheme url-scheme-registry))) | ||
| 114 | (if (not desc) | ||
| 115 | (let* ((stub (concat "url-" scheme)) | ||
| 116 | (loader (intern stub))) | ||
| 117 | (condition-case () | ||
| 118 | (require loader) | ||
| 119 | (error nil)) | ||
| 120 | (if (fboundp loader) | ||
| 121 | (progn | ||
| 122 | ;; Found the module to handle <scheme> URLs | ||
| 123 | (url-scheme-register-proxy scheme) | ||
| 124 | (setq desc (list 'name scheme | ||
| 125 | 'loader loader)) | ||
| 126 | (dolist (cell url-scheme-methods) | ||
| 127 | (let ((symbol (intern-soft (format "%s-%s" stub (car cell)))) | ||
| 128 | (type (cdr cell))) | ||
| 129 | (if symbol | ||
| 130 | (case type | ||
| 131 | (function | ||
| 132 | ;; Store the symbol name of a function | ||
| 133 | (if (fboundp symbol) | ||
| 134 | (setq desc (plist-put desc (car cell) symbol)))) | ||
| 135 | (variable | ||
| 136 | ;; Store the VALUE of a variable | ||
| 137 | (if (boundp symbol) | ||
| 138 | (setq desc (plist-put desc (car cell) | ||
| 139 | (symbol-value symbol))))) | ||
| 140 | (otherwise | ||
| 141 | (error "Malformed url-scheme-methods entry: %S" | ||
| 142 | cell)))))) | ||
| 143 | (puthash scheme desc url-scheme-registry))))) | ||
| 144 | (or (plist-get desc property) | ||
| 145 | (plist-get url-scheme-default-properties property)))) | ||
| 146 | |||
| 147 | (provide 'url-methods) | ||
| 148 | |||
| 149 | ;; arch-tag: 336863f8-5a07-4906-9be5-b3c6bcebbe67 | ||
| 150 | ;;; url-methods.el ends here | ||
diff --git a/lisp/url/url-misc.el b/lisp/url/url-misc.el new file mode 100644 index 00000000000..ff2f1282137 --- /dev/null +++ b/lisp/url/url-misc.el | |||
| @@ -0,0 +1,117 @@ | |||
| 1 | ;;; url-misc.el --- Misc Uniform Resource Locator retrieval code | ||
| 2 | ;; Keywords: comm, data, processes | ||
| 3 | |||
| 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 5 | ;;; Copyright (c) 1996,1997,1998,1999,2002 Free Software Foundation, Inc. | ||
| 6 | ;;; | ||
| 7 | ;;; This file is part of GNU Emacs. | ||
| 8 | ;;; | ||
| 9 | ;;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;;; any later version. | ||
| 13 | ;;; | ||
| 14 | ;;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;;; GNU General Public License for more details. | ||
| 18 | ;;; | ||
| 19 | ;;; You should have received a copy of the GNU General Public License | ||
| 20 | ;;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;;; Boston, MA 02111-1307, USA. | ||
| 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 24 | |||
| 25 | (require 'url-vars) | ||
| 26 | (require 'url-parse) | ||
| 27 | (autoload 'Info-goto-node "info" "" t) | ||
| 28 | (autoload 'man "man" nil t) | ||
| 29 | |||
| 30 | ;;;###autoload | ||
| 31 | (defun url-man (url) | ||
| 32 | "Fetch a Unix manual page URL." | ||
| 33 | (man (url-filename url)) | ||
| 34 | nil) | ||
| 35 | |||
| 36 | ;;;###autoload | ||
| 37 | (defun url-info (url) | ||
| 38 | "Fetch a GNU Info URL." | ||
| 39 | ;; Fetch an info node | ||
| 40 | (let* ((fname (url-filename url)) | ||
| 41 | (node (url-unhex-string (or (url-target url) "Top")))) | ||
| 42 | (if (and fname node) | ||
| 43 | (Info-goto-node (concat "(" fname ")" node)) | ||
| 44 | (error "Malformed url: %s" (url-recreate-url url))) | ||
| 45 | nil)) | ||
| 46 | |||
| 47 | (defun url-do-terminal-emulator (type server port user) | ||
| 48 | (terminal-emulator | ||
| 49 | (generate-new-buffer (format "%s%s" (if user (concat user "@") "") server)) | ||
| 50 | (case type | ||
| 51 | (rlogin "rlogin") | ||
| 52 | (telnet "telnet") | ||
| 53 | (tn3270 "tn3270") | ||
| 54 | (otherwise | ||
| 55 | (error "Unknown terminal emulator required: %s" type))) | ||
| 56 | (case type | ||
| 57 | (rlogin | ||
| 58 | (if user | ||
| 59 | (list server "-l" user) | ||
| 60 | (list server))) | ||
| 61 | (telnet | ||
| 62 | (if user (message "Please log in as user: %s" user)) | ||
| 63 | (if port | ||
| 64 | (list server port) | ||
| 65 | (list server))) | ||
| 66 | (tn3270 | ||
| 67 | (if user (message "Please log in as user: %s" user)) | ||
| 68 | (list server))))) | ||
| 69 | |||
| 70 | ;;;###autoload | ||
| 71 | (defun url-generic-emulator-loader (url) | ||
| 72 | (let* ((type (intern (downcase (url-type url)))) | ||
| 73 | (server (url-host url)) | ||
| 74 | (name (url-user url)) | ||
| 75 | (port (url-port url))) | ||
| 76 | (url-do-terminal-emulator type server port name)) | ||
| 77 | nil) | ||
| 78 | |||
| 79 | ;;;###autoload | ||
| 80 | (defalias 'url-rlogin 'url-generic-emulator-loader) | ||
| 81 | ;;;###autoload | ||
| 82 | (defalias 'url-telnet 'url-generic-emulator-loader) | ||
| 83 | ;;;###autoload | ||
| 84 | (defalias 'url-tn3270 'url-generic-emulator-loader) | ||
| 85 | |||
| 86 | ;; RFC 2397 | ||
| 87 | ;;;###autoload | ||
| 88 | (defun url-data (url) | ||
| 89 | "Fetch a data URL (RFC 2397)." | ||
| 90 | (let ((mediatype nil) | ||
| 91 | ;; The mediatype may need to be hex-encoded too -- see the RFC. | ||
| 92 | (desc (url-unhex-string (url-filename url))) | ||
| 93 | (encoding "8bit") | ||
| 94 | (data nil)) | ||
| 95 | (save-excursion | ||
| 96 | (if (not (string-match "\\([^,]*\\)?," desc)) | ||
| 97 | (error "Malformed data URL: %s" desc) | ||
| 98 | (setq mediatype (match-string 1 desc)) | ||
| 99 | (if (and mediatype (string-match ";base64\\'" mediatype)) | ||
| 100 | (setq mediatype (substring mediatype 0 (match-beginning 0)) | ||
| 101 | encoding "base64")) | ||
| 102 | (if (or (null mediatype) | ||
| 103 | (eq ?\; (aref mediatype 0))) | ||
| 104 | (setq mediatype (concat "text/plain" mediatype))) | ||
| 105 | (setq data (url-unhex-string (substring desc (match-end 0))))) | ||
| 106 | (set-buffer (generate-new-buffer " *url-data*")) | ||
| 107 | (mm-disable-multibyte) | ||
| 108 | (insert (format "Content-Length: %d\n" (length data)) | ||
| 109 | "Content-Type: " mediatype "\n" | ||
| 110 | "Content-Encoding: " encoding "\n" | ||
| 111 | "\n") | ||
| 112 | (if data (insert data)) | ||
| 113 | (current-buffer)))) | ||
| 114 | |||
| 115 | (provide 'url-misc) | ||
| 116 | |||
| 117 | ;;; arch-tag: 8c544e1b-d8bc-40a6-b319-f1f37fef65a0 | ||
diff --git a/lisp/url/url-news.el b/lisp/url/url-news.el new file mode 100644 index 00000000000..59364c9ccd0 --- /dev/null +++ b/lisp/url/url-news.el | |||
| @@ -0,0 +1,135 @@ | |||
| 1 | ;;; url-news.el --- News Uniform Resource Locator retrieval code | ||
| 2 | ;; Keywords: comm, data, processes | ||
| 3 | |||
| 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 5 | ;;; Copyright (c) 1996 - 1999, 2004 Free Software Foundation, Inc. | ||
| 6 | ;;; | ||
| 7 | ;;; This file is part of GNU Emacs. | ||
| 8 | ;;; | ||
| 9 | ;;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;;; any later version. | ||
| 13 | ;;; | ||
| 14 | ;;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;;; GNU General Public License for more details. | ||
| 18 | ;;; | ||
| 19 | ;;; You should have received a copy of the GNU General Public License | ||
| 20 | ;;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;;; Boston, MA 02111-1307, USA. | ||
| 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 24 | (require 'url-vars) | ||
| 25 | (require 'url-util) | ||
| 26 | (require 'url-parse) | ||
| 27 | (require 'nntp) | ||
| 28 | (autoload 'url-warn "url") | ||
| 29 | (autoload 'gnus-group-read-ephemeral-group "gnus-group") | ||
| 30 | (eval-when-compile (require 'cl)) | ||
| 31 | |||
| 32 | (defgroup url-news nil | ||
| 33 | "News related options" | ||
| 34 | :group 'url) | ||
| 35 | |||
| 36 | (defun url-news-open-host (host port user pass) | ||
| 37 | (if (fboundp 'nnheader-init-server-buffer) | ||
| 38 | (nnheader-init-server-buffer)) | ||
| 39 | (nntp-open-server host (list (string-to-int port))) | ||
| 40 | (if (and user pass) | ||
| 41 | (progn | ||
| 42 | (nntp-send-command "^.*\r?\n" "AUTHINFO USER" user) | ||
| 43 | (nntp-send-command "^.*\r?\n" "AUTHINFO PASS" pass) | ||
| 44 | (if (not (nntp-server-opened host)) | ||
| 45 | (url-warn 'url (format "NNTP authentication to `%s' as `%s' failed" | ||
| 46 | host user)))))) | ||
| 47 | |||
| 48 | (defun url-news-fetch-message-id (host message-id) | ||
| 49 | (let ((buf (generate-new-buffer " *url-news*"))) | ||
| 50 | (if (eq ?> (aref message-id (1- (length message-id)))) | ||
| 51 | nil | ||
| 52 | (setq message-id (concat "<" message-id ">"))) | ||
| 53 | (if (cdr-safe (nntp-request-article message-id nil host buf)) | ||
| 54 | ;; Successfully retrieved the article | ||
| 55 | nil | ||
| 56 | (save-excursion | ||
| 57 | (set-buffer buf) | ||
| 58 | (insert "Content-type: text/html\n\n" | ||
| 59 | "<html>\n" | ||
| 60 | " <head>\n" | ||
| 61 | " <title>Error</title>\n" | ||
| 62 | " </head>\n" | ||
| 63 | " <body>\n" | ||
| 64 | " <div>\n" | ||
| 65 | " <h1>Error requesting article...</h1>\n" | ||
| 66 | " <p>\n" | ||
| 67 | " The status message returned by the NNTP server was:" | ||
| 68 | "<br><hr>\n" | ||
| 69 | " <xmp>\n" | ||
| 70 | (nntp-status-message) | ||
| 71 | " </xmp>\n" | ||
| 72 | " </p>\n" | ||
| 73 | " <p>\n" | ||
| 74 | " If you If you feel this is an error, <a href=\"" | ||
| 75 | "mailto:" url-bug-address "\">send mail</a>\n" | ||
| 76 | " </p>\n" | ||
| 77 | " </div>\n" | ||
| 78 | " </body>\n" | ||
| 79 | "</html>\n" | ||
| 80 | "<!-- Automatically generated by URL v" url-version " -->\n" | ||
| 81 | ))) | ||
| 82 | buf)) | ||
| 83 | |||
| 84 | (defun url-news-fetch-newsgroup (newsgroup host) | ||
| 85 | (declare (special gnus-group-buffer)) | ||
| 86 | (if (string-match "^/+" newsgroup) | ||
| 87 | (setq newsgroup (substring newsgroup (match-end 0)))) | ||
| 88 | (if (string-match "/+$" newsgroup) | ||
| 89 | (setq newsgroup (substring newsgroup 0 (match-beginning 0)))) | ||
| 90 | |||
| 91 | ;; This saves us from checking new news if Gnus is already running | ||
| 92 | ;; FIXME - is it relatively safe to use gnus-alive-p here? FIXME | ||
| 93 | (if (or (not (get-buffer gnus-group-buffer)) | ||
| 94 | (save-excursion | ||
| 95 | (set-buffer gnus-group-buffer) | ||
| 96 | (not (eq major-mode 'gnus-group-mode)))) | ||
| 97 | (gnus)) | ||
| 98 | (set-buffer gnus-group-buffer) | ||
| 99 | (goto-char (point-min)) | ||
| 100 | (gnus-group-read-ephemeral-group newsgroup | ||
| 101 | (list 'nntp host | ||
| 102 | 'nntp-open-connection-function | ||
| 103 | nntp-open-connection-function) | ||
| 104 | nil | ||
| 105 | (cons (current-buffer) 'browse))) | ||
| 106 | |||
| 107 | ;;;###autoload | ||
| 108 | (defun url-news (url) | ||
| 109 | ;; Find a news reference | ||
| 110 | (let* ((host (or (url-host url) url-news-server)) | ||
| 111 | (port (url-port url)) | ||
| 112 | (article-brackets nil) | ||
| 113 | (buf nil) | ||
| 114 | (article (url-filename url))) | ||
| 115 | (url-news-open-host host port (url-user url) (url-password url)) | ||
| 116 | (setq article (url-unhex-string article)) | ||
| 117 | (cond | ||
| 118 | ((string-match "@" article) ; Its a specific article | ||
| 119 | (setq buf (url-news-fetch-message-id host article))) | ||
| 120 | ((string= article "") ; List all newsgroups | ||
| 121 | (gnus)) | ||
| 122 | (t ; Whole newsgroup | ||
| 123 | (url-news-fetch-newsgroup article host))) | ||
| 124 | buf)) | ||
| 125 | |||
| 126 | ;;;###autoload | ||
| 127 | (defun url-snews (url) | ||
| 128 | (let ((nntp-open-connection-function (if (eq 'tls url-gateway-method) | ||
| 129 | nntp-open-tls-stream | ||
| 130 | nntp-open-ssl-stream))) | ||
| 131 | (url-news url))) | ||
| 132 | |||
| 133 | (provide 'url-news) | ||
| 134 | |||
| 135 | ;;; arch-tag: 8975be13-04e8-4d38-bfff-47918e3ad311 | ||
diff --git a/lisp/url/url-nfs.el b/lisp/url/url-nfs.el index d068341b1c2..3b834bba75f 100644 --- a/lisp/url/url-nfs.el +++ b/lisp/url/url-nfs.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; url-nfs.el --- NFS URL interface | 1 | ;;; url-nfs.el --- NFS URL interface |
| 2 | 2 | ||
| 3 | ;; Copyright (c) 1996,97,98,1999,2004 Free Software Foundation, Inc. | 3 | ;; Copyright (c) 1996,1997,1998,1999,2004 Free Software Foundation, Inc. |
| 4 | ;; Copyright (c) 1996 by William M. Perry <wmperry@cs.indiana.edu> | ||
| 5 | 4 | ||
| 6 | ;; Keywords: comm, data, processes | 5 | ;; Keywords: comm, data, processes |
| 7 | 6 | ||
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el new file mode 100644 index 00000000000..97348ab5db2 --- /dev/null +++ b/lisp/url/url-parse.el | |||
| @@ -0,0 +1,210 @@ | |||
| 1 | ;;; url-parse.el --- Uniform Resource Locator parser | ||
| 2 | |||
| 3 | ;; Copyright (c) 1996,1997,1998,1999,2004 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Keywords: comm, data, processes | ||
| 6 | |||
| 7 | ;; This file is part of GNU Emacs. | ||
| 8 | ;; | ||
| 9 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;; any later version. | ||
| 13 | ;; | ||
| 14 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;; GNU General Public License for more details. | ||
| 18 | ;; | ||
| 19 | ;; You should have received a copy of the GNU General Public License | ||
| 20 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;; Boston, MA 02111-1307, USA. | ||
| 23 | |||
| 24 | ;;; Commentary: | ||
| 25 | |||
| 26 | ;;; Code: | ||
| 27 | |||
| 28 | (require 'url-vars) | ||
| 29 | |||
| 30 | (autoload 'url-scheme-get-property "url-methods") | ||
| 31 | |||
| 32 | (defmacro url-type (urlobj) | ||
| 33 | `(aref ,urlobj 0)) | ||
| 34 | |||
| 35 | (defmacro url-user (urlobj) | ||
| 36 | `(aref ,urlobj 1)) | ||
| 37 | |||
| 38 | (defmacro url-password (urlobj) | ||
| 39 | `(aref ,urlobj 2)) | ||
| 40 | |||
| 41 | (defmacro url-host (urlobj) | ||
| 42 | `(aref ,urlobj 3)) | ||
| 43 | |||
| 44 | (defmacro url-port (urlobj) | ||
| 45 | `(or (aref ,urlobj 4) | ||
| 46 | (if (url-fullness ,urlobj) | ||
| 47 | (url-scheme-get-property (url-type ,urlobj) 'default-port)))) | ||
| 48 | |||
| 49 | (defmacro url-filename (urlobj) | ||
| 50 | `(aref ,urlobj 5)) | ||
| 51 | |||
| 52 | (defmacro url-target (urlobj) | ||
| 53 | `(aref ,urlobj 6)) | ||
| 54 | |||
| 55 | (defmacro url-attributes (urlobj) | ||
| 56 | `(aref ,urlobj 7)) | ||
| 57 | |||
| 58 | (defmacro url-fullness (urlobj) | ||
| 59 | `(aref ,urlobj 8)) | ||
| 60 | |||
| 61 | (defmacro url-set-type (urlobj type) | ||
| 62 | `(aset ,urlobj 0 ,type)) | ||
| 63 | |||
| 64 | (defmacro url-set-user (urlobj user) | ||
| 65 | `(aset ,urlobj 1 ,user)) | ||
| 66 | |||
| 67 | (defmacro url-set-password (urlobj pass) | ||
| 68 | `(aset ,urlobj 2 ,pass)) | ||
| 69 | |||
| 70 | (defmacro url-set-host (urlobj host) | ||
| 71 | `(aset ,urlobj 3 ,host)) | ||
| 72 | |||
| 73 | (defmacro url-set-port (urlobj port) | ||
| 74 | `(aset ,urlobj 4 ,port)) | ||
| 75 | |||
| 76 | (defmacro url-set-filename (urlobj file) | ||
| 77 | `(aset ,urlobj 5 ,file)) | ||
| 78 | |||
| 79 | (defmacro url-set-target (urlobj targ) | ||
| 80 | `(aset ,urlobj 6 ,targ)) | ||
| 81 | |||
| 82 | (defmacro url-set-attributes (urlobj targ) | ||
| 83 | `(aset ,urlobj 7 ,targ)) | ||
| 84 | |||
| 85 | (defmacro url-set-full (urlobj val) | ||
| 86 | `(aset ,urlobj 8 ,val)) | ||
| 87 | |||
| 88 | ;;;###autoload | ||
| 89 | (defun url-recreate-url (urlobj) | ||
| 90 | "Recreate a URL string from the parsed URLOBJ." | ||
| 91 | (concat (url-type urlobj) ":" (if (url-host urlobj) "//" "") | ||
| 92 | (if (url-user urlobj) | ||
| 93 | (concat (url-user urlobj) | ||
| 94 | (if (url-password urlobj) | ||
| 95 | (concat ":" (url-password urlobj))) | ||
| 96 | "@")) | ||
| 97 | (url-host urlobj) | ||
| 98 | (if (and (url-port urlobj) | ||
| 99 | (not (equal (url-port urlobj) | ||
| 100 | (url-scheme-get-property (url-type urlobj) 'default-port)))) | ||
| 101 | (format ":%d" (url-port urlobj))) | ||
| 102 | (or (url-filename urlobj) "/") | ||
| 103 | (if (url-target urlobj) | ||
| 104 | (concat "#" (url-target urlobj))) | ||
| 105 | (if (url-attributes urlobj) | ||
| 106 | (concat ";" | ||
| 107 | (mapconcat | ||
| 108 | (function | ||
| 109 | (lambda (x) | ||
| 110 | (if (cdr x) | ||
| 111 | (concat (car x) "=" (cdr x)) | ||
| 112 | (car x)))) (url-attributes urlobj) ";"))))) | ||
| 113 | |||
| 114 | ;;;###autoload | ||
| 115 | (defun url-generic-parse-url (url) | ||
| 116 | "Return a vector of the parts of URL. | ||
| 117 | Format is: | ||
| 118 | \[TYPE USER PASSWORD HOST PORT FILE TARGET ATTRIBUTES FULL\]" | ||
| 119 | (cond | ||
| 120 | ((null url) | ||
| 121 | (make-vector 9 nil)) | ||
| 122 | ((or (not (string-match url-nonrelative-link url)) | ||
| 123 | (= ?/ (string-to-char url))) | ||
| 124 | (let ((retval (make-vector 9 nil))) | ||
| 125 | (url-set-filename retval url) | ||
| 126 | (url-set-full retval nil) | ||
| 127 | retval)) | ||
| 128 | (t | ||
| 129 | (save-excursion | ||
| 130 | (set-buffer (get-buffer-create " *urlparse*")) | ||
| 131 | (set-syntax-table url-parse-syntax-table) | ||
| 132 | (let ((save-pos nil) | ||
| 133 | (prot nil) | ||
| 134 | (user nil) | ||
| 135 | (pass nil) | ||
| 136 | (host nil) | ||
| 137 | (port nil) | ||
| 138 | (file nil) | ||
| 139 | (refs nil) | ||
| 140 | (attr nil) | ||
| 141 | (full nil) | ||
| 142 | (inhibit-read-only t)) | ||
| 143 | (erase-buffer) | ||
| 144 | (insert url) | ||
| 145 | (goto-char (point-min)) | ||
| 146 | (setq save-pos (point)) | ||
| 147 | (if (not (looking-at "//")) | ||
| 148 | (progn | ||
| 149 | (skip-chars-forward "a-zA-Z+.\\-") | ||
| 150 | (downcase-region save-pos (point)) | ||
| 151 | (setq prot (buffer-substring save-pos (point))) | ||
| 152 | (skip-chars-forward ":") | ||
| 153 | (setq save-pos (point)))) | ||
| 154 | |||
| 155 | ;; We are doing a fully specified URL, with hostname and all | ||
| 156 | (if (looking-at "//") | ||
| 157 | (progn | ||
| 158 | (setq full t) | ||
| 159 | (forward-char 2) | ||
| 160 | (setq save-pos (point)) | ||
| 161 | (skip-chars-forward "^/") | ||
| 162 | (setq host (buffer-substring save-pos (point))) | ||
| 163 | (if (string-match "^\\([^@]+\\)@" host) | ||
| 164 | (setq user (match-string 1 host) | ||
| 165 | host (substring host (match-end 0) nil))) | ||
| 166 | (if (and user (string-match "\\([^:]+\\):\\(.*\\)" user)) | ||
| 167 | (setq pass (match-string 2 user) | ||
| 168 | user (match-string 1 user))) | ||
| 169 | (if (string-match ":\\([0-9+]+\\)" host) | ||
| 170 | (setq port (string-to-int (match-string 1 host)) | ||
| 171 | host (substring host 0 (match-beginning 0)))) | ||
| 172 | (if (string-match ":$" host) | ||
| 173 | (setq host (substring host 0 (match-beginning 0)))) | ||
| 174 | (setq host (downcase host) | ||
| 175 | save-pos (point)))) | ||
| 176 | |||
| 177 | (if (not port) | ||
| 178 | (setq port (url-scheme-get-property prot 'default-port))) | ||
| 179 | |||
| 180 | ;; Gross hack to preserve ';' in data URLs | ||
| 181 | |||
| 182 | (setq save-pos (point)) | ||
| 183 | |||
| 184 | (if (string= "data" prot) | ||
| 185 | (goto-char (point-max)) | ||
| 186 | ;; Now check for references | ||
| 187 | (skip-chars-forward "^#") | ||
| 188 | (if (eobp) | ||
| 189 | nil | ||
| 190 | (delete-region | ||
| 191 | (point) | ||
| 192 | (progn | ||
| 193 | (skip-chars-forward "#") | ||
| 194 | (setq refs (buffer-substring (point) (point-max))) | ||
| 195 | (point-max)))) | ||
| 196 | (goto-char save-pos) | ||
| 197 | (skip-chars-forward "^;") | ||
| 198 | (if (not (eobp)) | ||
| 199 | (setq attr (url-parse-args (buffer-substring (point) (point-max)) t) | ||
| 200 | attr (nreverse attr)))) | ||
| 201 | |||
| 202 | (setq file (buffer-substring save-pos (point))) | ||
| 203 | (if (and host (string-match "%[0-9][0-9]" host)) | ||
| 204 | (setq host (url-unhex-string host))) | ||
| 205 | (vector prot user pass host port file refs attr full)))))) | ||
| 206 | |||
| 207 | (provide 'url-parse) | ||
| 208 | |||
| 209 | ;; arch-tag: f338325f-71ab-4bee-93cc-78fb9a03d403 | ||
| 210 | ;;; url-parse.el ends here | ||
diff --git a/lisp/url/url-privacy.el b/lisp/url/url-privacy.el new file mode 100644 index 00000000000..cb64cfbd4fc --- /dev/null +++ b/lisp/url/url-privacy.el | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | ;;; url-privacy.el --- Global history tracking for URL package | ||
| 2 | ;; Keywords: comm, data, processes, hypermedia | ||
| 3 | |||
| 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 5 | ;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. | ||
| 6 | ;;; | ||
| 7 | ;;; This file is part of GNU Emacs. | ||
| 8 | ;;; | ||
| 9 | ;;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;;; any later version. | ||
| 13 | ;;; | ||
| 14 | ;;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;;; GNU General Public License for more details. | ||
| 18 | ;;; | ||
| 19 | ;;; You should have received a copy of the GNU General Public License | ||
| 20 | ;;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;;; Boston, MA 02111-1307, USA. | ||
| 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 24 | |||
| 25 | (eval-when-compile (require 'cl)) | ||
| 26 | (require 'url-vars) | ||
| 27 | |||
| 28 | (if (fboundp 'device-type) | ||
| 29 | (defalias 'url-device-type 'device-type) | ||
| 30 | (defun url-device-type (&optional device) (or window-system 'tty))) | ||
| 31 | |||
| 32 | ;;;###autoload | ||
| 33 | (defun url-setup-privacy-info () | ||
| 34 | (interactive) | ||
| 35 | (setq url-system-type | ||
| 36 | (cond | ||
| 37 | ((or (eq url-privacy-level 'paranoid) | ||
| 38 | (and (listp url-privacy-level) | ||
| 39 | (memq 'os url-privacy-level))) | ||
| 40 | nil) | ||
| 41 | ;; First, we handle the inseparable OS/Windowing system | ||
| 42 | ;; combinations | ||
| 43 | ((eq system-type 'Apple-Macintosh) "Macintosh") | ||
| 44 | ((eq system-type 'next-mach) "NeXT") | ||
| 45 | ((eq system-type 'windows-nt) "Windows-NT; 32bit") | ||
| 46 | ((eq system-type 'ms-windows) "Windows; 16bit") | ||
| 47 | ((eq system-type 'ms-dos) "MS-DOS; 32bit") | ||
| 48 | ((memq (url-device-type) '(win32 w32)) "Windows; 32bit") | ||
| 49 | ((eq (url-device-type) 'pm) "OS/2; 32bit") | ||
| 50 | (t | ||
| 51 | (case (url-device-type) | ||
| 52 | (x "X11") | ||
| 53 | (ns "OpenStep") | ||
| 54 | (tty "TTY") | ||
| 55 | (otherwise nil))))) | ||
| 56 | |||
| 57 | (setq url-personal-mail-address (or url-personal-mail-address | ||
| 58 | user-mail-address | ||
| 59 | (format "%s@%s" (user-real-login-name) | ||
| 60 | (system-name)))) | ||
| 61 | |||
| 62 | (if (or (memq url-privacy-level '(paranoid high)) | ||
| 63 | (and (listp url-privacy-level) | ||
| 64 | (memq 'email url-privacy-level))) | ||
| 65 | (setq url-personal-mail-address nil)) | ||
| 66 | |||
| 67 | (setq url-os-type | ||
| 68 | (cond | ||
| 69 | ((or (eq url-privacy-level 'paranoid) | ||
| 70 | (and (listp url-privacy-level) | ||
| 71 | (memq 'os url-privacy-level))) | ||
| 72 | nil) | ||
| 73 | ((boundp 'system-configuration) | ||
| 74 | system-configuration) | ||
| 75 | ((boundp 'system-type) | ||
| 76 | (symbol-name system-type)) | ||
| 77 | (t nil)))) | ||
| 78 | |||
| 79 | (provide 'url-privacy) | ||
| 80 | |||
| 81 | ;;; arch-tag: fdaf95e4-98f0-4680-94c3-f3eadafabe1d | ||
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el index d4a3733eab5..5d1f73e0d5d 100644 --- a/lisp/url/url-util.el +++ b/lisp/url/url-util.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; url-util.el --- Miscellaneous helper routines for URL library | 1 | ;;; url-util.el --- Miscellaneous helper routines for URL library |
| 2 | 2 | ||
| 3 | ;; Copyright (c) 1996,97,98,99,2001,2004 Free Software Foundation, Inc. | 3 | ;; Copyright (c) 1996,1997,1998,1999,2001,2004 Free Software Foundation, Inc. |
| 4 | ;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu> | ||
| 5 | 4 | ||
| 6 | ;; Author: Bill Perry <wmperry@gnu.org> | 5 | ;; Author: Bill Perry <wmperry@gnu.org> |
| 7 | ;; Keywords: comm, data, processes | 6 | ;; Keywords: comm, data, processes |
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el new file mode 100644 index 00000000000..a33d8ba43e3 --- /dev/null +++ b/lisp/url/url-vars.el | |||
| @@ -0,0 +1,431 @@ | |||
| 1 | ;;; url-vars.el --- Variables for Uniform Resource Locator tool | ||
| 2 | ;; Keywords: comm, data, processes, hypermedia | ||
| 3 | |||
| 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 5 | ;;; Copyright (c) 1996,1997,1998,1999,2001,2004 Free Software Foundation, Inc. | ||
| 6 | ;;; | ||
| 7 | ;;; This file is part of GNU Emacs. | ||
| 8 | ;;; | ||
| 9 | ;;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 10 | ;;; it under the terms of the GNU General Public License as published by | ||
| 11 | ;;; the Free Software Foundation; either version 2, or (at your option) | ||
| 12 | ;;; any later version. | ||
| 13 | ;;; | ||
| 14 | ;;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 15 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | ;;; GNU General Public License for more details. | ||
| 18 | ;;; | ||
| 19 | ;;; You should have received a copy of the GNU General Public License | ||
| 20 | ;;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 21 | ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 22 | ;;; Boston, MA 02111-1307, USA. | ||
| 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 24 | |||
| 25 | (require 'mm-util) | ||
| 26 | |||
| 27 | (defconst url-version "Emacs" | ||
| 28 | "Version number of URL package.") | ||
| 29 | |||
| 30 | (defgroup url nil | ||
| 31 | "Uniform Resource Locator tool" | ||
| 32 | :version "21.4" | ||
| 33 | :group 'hypermedia) | ||
| 34 | |||
| 35 | (defgroup url-file nil | ||
| 36 | "URL storage" | ||
| 37 | :prefix "url-" | ||
| 38 | :group 'url) | ||
| 39 | |||
| 40 | (defgroup url-cache nil | ||
| 41 | "URL cache" | ||
| 42 | :prefix "url-" | ||
| 43 | :prefix "url-cache-" | ||
| 44 | :group 'url) | ||
| 45 | |||
| 46 | (defgroup url-mime nil | ||
| 47 | "MIME options of URL" | ||
| 48 | :prefix "url-" | ||
| 49 | :group 'url) | ||
| 50 | |||
| 51 | (defgroup url-hairy nil | ||
| 52 | "Hairy options of URL" | ||
| 53 | :prefix "url-" | ||
| 54 | :group 'url) | ||
| 55 | |||
| 56 | |||
| 57 | (defvar url-current-object nil | ||
| 58 | "A parsed representation of the current url.") | ||
| 59 | |||
| 60 | (defvar url-current-mime-headers nil | ||
| 61 | "A parsed representation of the MIME headers for the current url.") | ||
| 62 | |||
| 63 | (mapcar 'make-variable-buffer-local | ||
| 64 | '( | ||
| 65 | url-current-object | ||
| 66 | url-current-referer | ||
| 67 | url-current-mime-headers | ||
| 68 | )) | ||
| 69 | |||
| 70 | (defcustom url-honor-refresh-requests t | ||
| 71 | "*Whether to do automatic page reloads. | ||
| 72 | These are done at the request of the document author or the server via | ||
| 73 | the `Refresh' header in an HTTP response. If nil, no refresh | ||
| 74 | requests will be honored. If t, all refresh requests will be honored. | ||
| 75 | If non-nil and not t, the user will be asked for each refresh | ||
| 76 | request." | ||
| 77 | :type '(choice (const :tag "off" nil) | ||
| 78 | (const :tag "on" t) | ||
| 79 | (const :tag "ask" 'ask)) | ||
| 80 | :group 'url-hairy) | ||
| 81 | |||
| 82 | (defcustom url-automatic-caching nil | ||
| 83 | "*If non-nil, all documents will be automatically cached to the local disk." | ||
| 84 | :type 'boolean | ||
| 85 | :group 'url-cache) | ||
| 86 | |||
| 87 | ;; Fixme: sanitize this. | ||
| 88 | (defcustom url-cache-expired | ||
| 89 | (lambda (t1 t2) (>= (- (car t2) (car t1)) 5)) | ||
| 90 | "*A function determining if a cached item has expired. | ||
| 91 | It takes two times (numbers) as its arguments, and returns non-nil if | ||
| 92 | the second time is 'too old' when compared to the first time." | ||
| 93 | :type 'function | ||
| 94 | :group 'url-cache) | ||
| 95 | |||
| 96 | (defconst url-bug-address "bug-gnu-emacs@gnu.org" | ||
| 97 | "Where to send bug reports.") | ||
| 98 | |||
| 99 | (defcustom url-personal-mail-address nil | ||
| 100 | "*Your full email address. | ||
| 101 | This is what is sent to HTTP servers as the FROM field in an HTTP | ||
| 102 | request." | ||
| 103 | :type '(choice (const :tag "Unspecified" nil) string) | ||
| 104 | :group 'url) | ||
| 105 | |||
| 106 | (defcustom url-directory-index-file "index.html" | ||
| 107 | "*The filename to look for when indexing a directory. | ||
| 108 | If this file exists, and is readable, then it will be viewed instead of | ||
| 109 | using `dired' to view the directory." | ||
| 110 | :type 'string | ||
| 111 | :group 'url-file) | ||
| 112 | |||
| 113 | ;; Fixme: this should have a setter which calls url-setup-privacy-info. | ||
| 114 | (defcustom url-privacy-level '(email) | ||
| 115 | "*How private you want your requests to be. | ||
| 116 | HTTP has header fields for various information about the user, including | ||
| 117 | operating system information, email addresses, the last page you visited, etc. | ||
| 118 | This variable controls how much of this information is sent. | ||
| 119 | |||
| 120 | This should a symbol or a list. | ||
| 121 | Valid values if a symbol are: | ||
| 122 | none -- Send all information | ||
| 123 | low -- Don't send the last location | ||
| 124 | high -- Don't send the email address or last location | ||
| 125 | paranoid -- Don't send anything | ||
| 126 | |||
| 127 | If a list, this should be a list of symbols of what NOT to send. | ||
| 128 | Valid symbols are: | ||
| 129 | email -- the email address | ||
| 130 | os -- the operating system info | ||
| 131 | lastloc -- the last location | ||
| 132 | agent -- Do not send the User-Agent string | ||
| 133 | cookie -- never accept HTTP cookies | ||
| 134 | |||
| 135 | Samples: | ||
| 136 | |||
| 137 | (setq url-privacy-level 'high) | ||
| 138 | (setq url-privacy-level '(email lastloc)) ;; equivalent to 'high | ||
| 139 | (setq url-privacy-level '(os)) | ||
| 140 | |||
| 141 | ::NOTE:: | ||
| 142 | This variable controls several other variables and is _NOT_ automatically | ||
| 143 | updated. Call the function `url-setup-privacy-info' after modifying this | ||
| 144 | variable." | ||
| 145 | :type '(radio (const :tag "None (you believe in the basic goodness of humanity)" | ||
| 146 | :value none) | ||
| 147 | (const :tag "Low (do not reveal last location)" | ||
| 148 | :value low) | ||
| 149 | (const :tag "High (no email address or last location)" | ||
| 150 | :value high) | ||
| 151 | (const :tag "Paranoid (reveal nothing!)" | ||
| 152 | :value paranoid) | ||
| 153 | (checklist :tag "Custom" | ||
| 154 | (const :tag "Email address" :value email) | ||
| 155 | (const :tag "Operating system" :value os) | ||
| 156 | (const :tag "Last location" :value lastloc) | ||
| 157 | (const :tag "Browser identification" :value agent) | ||
| 158 | (const :tag "No cookies" :value cookie))) | ||
| 159 | :group 'url) | ||
| 160 | |||
| 161 | (defvar url-inhibit-uncompression nil "Do not do decompression if non-nil.") | ||
| 162 | |||
| 163 | (defcustom url-uncompressor-alist '((".z" . "x-gzip") | ||
| 164 | (".gz" . "x-gzip") | ||
| 165 | (".uue" . "x-uuencoded") | ||
| 166 | (".hqx" . "x-hqx") | ||
| 167 | (".Z" . "x-compress") | ||
| 168 | (".bz2" . "x-bzip2")) | ||
| 169 | "*An alist of file extensions and appropriate content-transfer-encodings." | ||
| 170 | :type '(repeat (cons :format "%v" | ||
| 171 | (string :tag "Extension") | ||
| 172 | (string :tag "Encoding"))) | ||
| 173 | :group 'url-mime) | ||
| 174 | |||
| 175 | (defcustom url-mail-command (if (fboundp 'compose-mail) | ||
| 176 | 'compose-mail | ||
| 177 | 'url-mail) | ||
| 178 | "*This function will be called whenever url needs to send mail. | ||
| 179 | It should enter a mail-mode-like buffer in the current window. | ||
| 180 | The commands `mail-to' and `mail-subject' should still work in this | ||
| 181 | buffer, and it should use `mail-header-separator' if possible." | ||
| 182 | :type 'function | ||
| 183 | :group 'url) | ||
| 184 | |||
| 185 | (defcustom url-proxy-services nil | ||
| 186 | "*An alist of schemes and proxy servers that gateway them. | ||
| 187 | Looks like ((\"http\" . \"hostname:portnumber\") ...). This is set up | ||
| 188 | from the ACCESS_proxy environment variables." | ||
| 189 | :type '(repeat (cons :format "%v" | ||
| 190 | (string :tag "Protocol") | ||
| 191 | (string :tag "Proxy"))) | ||
| 192 | :group 'url) | ||
| 193 | |||
| 194 | (defcustom url-passwd-entry-func nil | ||
| 195 | "*Symbol indicating which function to call to read in a password. | ||
| 196 | It will be set up depending on whether you are running EFS or ange-ftp | ||
| 197 | at startup if it is nil. This function should accept the prompt | ||
| 198 | string as its first argument, and the default value as its second | ||
| 199 | argument." | ||
| 200 | :type '(choice (const :tag "Guess" :value nil) | ||
| 201 | (const :tag "Use Ange-FTP" :value ange-ftp-read-passwd) | ||
| 202 | (const :tag "Use EFS" :value efs-read-passwd) | ||
| 203 | (const :tag "Use Password Package" :value read-passwd) | ||
| 204 | (function :tag "Other")) | ||
| 205 | :group 'url-hairy) | ||
| 206 | |||
| 207 | (defcustom url-standalone-mode nil | ||
| 208 | "*Rely solely on the cache?" | ||
| 209 | :type 'boolean | ||
| 210 | :group 'url-cache) | ||
| 211 | |||
| 212 | (defvar url-mime-separator-chars (mapcar 'identity | ||
| 213 | (concat "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | ||
| 214 | "abcdefghijklmnopqrstuvwxyz" | ||
| 215 | "0123456789'()+_,-./=?")) | ||
| 216 | "Characters allowable in a MIME multipart separator.") | ||
| 217 | |||
| 218 | (defcustom url-bad-port-list | ||
| 219 | '("25" "119" "19") | ||
| 220 | "*List of ports to warn the user about connecting to. | ||
| 221 | Defaults to just the mail, chargen, and NNTP ports so you cannot be | ||
| 222 | tricked into sending fake mail or forging messages by a malicious HTML | ||
| 223 | document." | ||
| 224 | :type '(repeat (string :tag "Port")) | ||
| 225 | :group 'url-hairy) | ||
| 226 | |||
| 227 | (defvar url-mime-content-type-charset-regexp | ||
| 228 | ";[ \t]*charset=\"?\\([^\"]+\\)\"?" | ||
| 229 | "Regexp used in parsing `Content-Type' for a charset indication.") | ||
| 230 | |||
| 231 | (defvar url-request-data nil "Any data to send with the next request.") | ||
| 232 | |||
| 233 | (defvar url-request-extra-headers nil | ||
| 234 | "A list of extra headers to send with the next request. | ||
| 235 | Should be an assoc list of headers/contents.") | ||
| 236 | |||
| 237 | (defvar url-request-method nil "The method to use for the next request.") | ||
| 238 | |||
| 239 | ;; FIXME!! (RFC 2616 gives examples like `compress, gzip'.) | ||
| 240 | (defvar url-mime-encoding-string nil | ||
| 241 | "*String to send in the Accept-encoding: field in HTTP requests.") | ||
| 242 | |||
| 243 | ;; `mm-mime-mule-charset-alist' in Gnus 5.8/9 contains elements whose | ||
| 244 | ;; cars aren't valid MIME charsets/coding systems, at least in Emacs. | ||
| 245 | ;; This gets it correct by construction in Emacs. Fixme: DTRT for | ||
| 246 | ;; XEmacs -- its `coding-system-list' doesn't have the BASE-ONLY arg. | ||
| 247 | (when (and (not (featurep 'xemacs)) | ||
| 248 | (fboundp 'coding-system-list)) | ||
| 249 | (setq mm-mime-mule-charset-alist | ||
| 250 | (apply | ||
| 251 | 'nconc | ||
| 252 | (mapcar | ||
| 253 | (lambda (cs) | ||
| 254 | (when (and (coding-system-get cs 'mime-charset) | ||
| 255 | (not (eq t (coding-system-get cs 'safe-charsets)))) | ||
| 256 | (list (cons (coding-system-get cs 'mime-charset) | ||
| 257 | (delq 'ascii | ||
| 258 | (coding-system-get cs 'safe-charsets)))))) | ||
| 259 | (coding-system-list 'base-only))))) | ||
| 260 | |||
| 261 | ;; Perhaps the first few should actually be given decreasing `q's and | ||
| 262 | ;; the list should be trimmed significantly. | ||
| 263 | ;; Fixme: do something sane if we don't have `sort-coding-systems' | ||
| 264 | ;; (Emacs 20, XEmacs). | ||
| 265 | (defun url-mime-charset-string () | ||
| 266 | "Generate a list of preferred MIME charsets for HTTP requests. | ||
| 267 | Generated according to current coding system priorities." | ||
| 268 | (if (fboundp 'sort-coding-systems) | ||
| 269 | (let ((ordered (sort-coding-systems | ||
| 270 | (let (accum) | ||
| 271 | (dolist (elt mm-mime-mule-charset-alist) | ||
| 272 | (if (mm-coding-system-p (car elt)) | ||
| 273 | (push (car elt) accum))) | ||
| 274 | (nreverse accum))))) | ||
| 275 | (concat (format "%s;q=1, " (pop ordered)) | ||
| 276 | (mapconcat 'symbol-name ordered ";q=0.5, ") | ||
| 277 | ";q=0.5")))) | ||
| 278 | |||
| 279 | (defvar url-mime-charset-string (url-mime-charset-string) | ||
| 280 | "*String to send in the Accept-charset: field in HTTP requests. | ||
| 281 | The MIME charset corresponding to the most preferred coding system is | ||
| 282 | given priority 1 and the rest are given priority 0.5.") | ||
| 283 | |||
| 284 | (defun url-set-mime-charset-string () | ||
| 285 | (setq url-mime-charset-string (url-mime-charset-string))) | ||
| 286 | ;; Regenerate if the language environment changes. | ||
| 287 | (add-hook 'set-language-environment-hook 'url-set-mime-charset-string) | ||
| 288 | |||
| 289 | ;; Fixme: set from the locale. | ||
| 290 | (defcustom url-mime-language-string nil | ||
| 291 | "*String to send in the Accept-language: field in HTTP requests. | ||
| 292 | |||
| 293 | Specifies the preferred language when servers can serve documents in | ||
| 294 | several languages. Use RFC 1766 abbreviations, e.g.@: `en' for | ||
| 295 | English, `de' for German. A comma-separated specifies descending | ||
| 296 | order of preference. The ordering can be made explicit using `q' | ||
| 297 | factors defined by HTTP, e.g. `de,en-gb;q=0.8,en;q=0.7'. `*' means | ||
| 298 | get the first available language (as opposed to the default)." | ||
| 299 | :type '(radio | ||
| 300 | (const :tag "None (get default language version)" :value nil) | ||
| 301 | (const :tag "Any (get first available language version)" :value "*") | ||
| 302 | (string :tag "Other")) | ||
| 303 | :group 'url-mime | ||
| 304 | :group 'i18n) | ||
| 305 | |||
| 306 | (defvar url-mime-accept-string nil | ||
| 307 | "String to send to the server in the Accept: field in HTTP requests.") | ||
| 308 | |||
| 309 | (defvar url-package-version nil | ||
| 310 | "Version number of package using URL.") | ||
| 311 | |||
| 312 | (defvar url-package-name nil "Version number of package using URL.") | ||
| 313 | |||
| 314 | (defvar url-system-type nil | ||
| 315 | "What type of system we are on.") | ||
| 316 | (defvar url-os-type nil | ||
| 317 | "What OS we are on.") | ||
| 318 | |||
| 319 | (defcustom url-max-password-attempts 5 | ||
| 320 | "*Maximum number of times a password will be prompted for. | ||
| 321 | Applies when a protected document is denied by the server." | ||
| 322 | :type 'integer | ||
| 323 | :group 'url) | ||
| 324 | |||
| 325 | (defcustom url-temporary-directory (or (getenv "TMPDIR") "/tmp") | ||
| 326 | "*Where temporary files go." | ||
| 327 | :type 'directory | ||
| 328 | :group 'url-file) | ||
| 329 | |||
| 330 | (defcustom url-show-status t | ||
| 331 | "*Whether to show a running total of bytes transferred. | ||
| 332 | Can cause a large hit if using a remote X display over a slow link, or | ||
| 333 | a terminal with a slow modem." | ||
| 334 | :type 'boolean | ||
| 335 | :group 'url) | ||
| 336 | |||
| 337 | (defvar url-using-proxy nil | ||
| 338 | "Either nil or the fully qualified proxy URL in use, e.g. | ||
| 339 | http://www.domain.com/") | ||
| 340 | |||
| 341 | (defcustom url-news-server nil | ||
| 342 | "*The default news server from which to get newsgroups/articles. | ||
| 343 | Applies if no server is specified in the URL. Defaults to the | ||
| 344 | environment variable NNTPSERVER or \"news\" if NNTPSERVER is | ||
| 345 | undefined." | ||
| 346 | :type '(choice (const :tag "None" :value nil) string) | ||
| 347 | :group 'url) | ||
| 348 | |||
| 349 | (defvar url-nonrelative-link | ||
| 350 | "\\`\\([-a-zA-Z0-9+.]+:\\)" | ||
| 351 | "A regular expression that will match an absolute URL.") | ||
| 352 | |||
| 353 | (defcustom url-confirmation-func 'y-or-n-p | ||
| 354 | "*What function to use for asking yes or no functions. | ||
| 355 | Possible values are `yes-or-no-p' or `y-or-n-p', or any function that | ||
| 356 | takes a single argument (the prompt), and returns t only if a positive | ||
| 357 | answer is given." | ||
| 358 | :type '(choice (const :tag "Short (y or n)" :value y-or-n-p) | ||
| 359 | (const :tag "Long (yes or no)" :value yes-or-no-p) | ||
| 360 | (function :tag "Other")) | ||
| 361 | :group 'url-hairy) | ||
| 362 | |||
| 363 | (defcustom url-gateway-method 'native | ||
| 364 | "*The type of gateway support to use. | ||
| 365 | Should be a symbol specifying how to get a connection from the local machine. | ||
| 366 | |||
| 367 | Currently supported methods: | ||
| 368 | `telnet': Run telnet in a subprocess to connect; | ||
| 369 | `rlogin': Rlogin to another machine to connect; | ||
| 370 | `socks': Connect through a socks server; | ||
| 371 | `tls': Connect with TLS; | ||
| 372 | `ssl': Connect with SSL (deprecated, use `tls' instead); | ||
| 373 | `native': Connect directy." | ||
| 374 | :type '(radio (const :tag "Telnet to gateway host" :value telnet) | ||
| 375 | (const :tag "Rlogin to gateway host" :value rlogin) | ||
| 376 | (const :tag "Use SOCKS proxy" :value socks) | ||
| 377 | (const :tag "Use SSL/TLS for all connections" :value tls) | ||
| 378 | (const :tag "Use SSL for all connections (obsolete)" :value ssl) | ||
| 379 | (const :tag "Direct connection" :value native)) | ||
| 380 | :group 'url-hairy) | ||
| 381 | |||
| 382 | (defvar url-setup-done nil "Has setup configuration been done?") | ||
| 383 | |||
| 384 | (defconst weekday-alist | ||
| 385 | '(("Sunday" . 0) ("Monday" . 1) ("Tuesday" . 2) ("Wednesday" . 3) | ||
| 386 | ("Thursday" . 4) ("Friday" . 5) ("Saturday" . 6) | ||
| 387 | ("Tues" . 2) ("Thurs" . 4) | ||
| 388 | ("Sun" . 0) ("Mon" . 1) ("Tue" . 2) ("Wed" . 3) | ||
| 389 | ("Thu" . 4) ("Fri" . 5) ("Sat" . 6))) | ||
| 390 | |||
| 391 | (defconst monthabbrev-alist | ||
| 392 | '(("Jan" . 1) ("Feb" . 2) ("Mar" . 3) ("Apr" . 4) ("May" . 5) ("Jun" . 6) | ||
| 393 | ("Jul" . 7) ("Aug" . 8) ("Sep" . 9) ("Oct" . 10) ("Nov" . 11) | ||
| 394 | ("Dec" . 12))) | ||
| 395 | |||
| 396 | (defvar url-lazy-message-time 0) | ||
| 397 | |||
| 398 | ;; Fixme: We may not be able to run SSL. | ||
| 399 | (defvar url-extensions-header "Security/Digest Security/SSL") | ||
| 400 | |||
| 401 | (defvar url-parse-syntax-table | ||
| 402 | (copy-syntax-table emacs-lisp-mode-syntax-table) | ||
| 403 | "*A syntax table for parsing URLs.") | ||
| 404 | |||
| 405 | (modify-syntax-entry ?' "\"" url-parse-syntax-table) | ||
| 406 | (modify-syntax-entry ?` "\"" url-parse-syntax-table) | ||
| 407 | (modify-syntax-entry ?< "(>" url-parse-syntax-table) | ||
| 408 | (modify-syntax-entry ?> ")<" url-parse-syntax-table) | ||
| 409 | (modify-syntax-entry ?/ " " url-parse-syntax-table) | ||
| 410 | |||
| 411 | (defvar url-load-hook nil | ||
| 412 | "*Hooks to be run after initalizing the URL library.") | ||
| 413 | |||
| 414 | ;;; Make OS/2 happy - yeeks | ||
| 415 | ;; (defvar tcp-binary-process-input-services nil | ||
| 416 | ;; "*Make OS/2 happy with our CRLF pairs...") | ||
| 417 | |||
| 418 | (defconst url-working-buffer " *url-work") | ||
| 419 | |||
| 420 | (defvar url-gateway-unplugged nil | ||
| 421 | "Non-nil means don't open new network connexions. | ||
| 422 | This should be set, e.g. by mail user agents rendering HTML to avoid | ||
| 423 | `bugs' which call home.") | ||
| 424 | |||
| 425 | (defun url-vars-unload-hook () | ||
| 426 | (remove-hook 'set-language-environment-hook 'url-set-mime-charset-string)) | ||
| 427 | |||
| 428 | (provide 'url-vars) | ||
| 429 | |||
| 430 | ;;; arch-tag: 29205e5f-c5ce-433c-8d5d-38cbaed64b49 | ||
| 431 | ;;; url-vars.el ends here | ||
diff --git a/lisp/url/url.el b/lisp/url/url.el new file mode 100644 index 00000000000..f7b1b717681 --- /dev/null +++ b/lisp/url/url.el | |||
| @@ -0,0 +1,269 @@ | |||
| 1 | ;;; url.el --- Uniform Resource Locator retrieval tool | ||
| 2 | |||
| 3 | ;; Copyright (c) 1996,1997,1998,1999,2001,2004 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Bill Perry <wmperry@gnu.org> | ||
| 6 | ;; Keywords: comm, data, processes, hypermedia | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | ;; | ||
| 10 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 11 | ;; it under the terms of the GNU General Public License as published by | ||
| 12 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 13 | ;; any later version. | ||
| 14 | ;; | ||
| 15 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 18 | ;; GNU General Public License for more details. | ||
| 19 | ;; | ||
| 20 | ;; You should have received a copy of the GNU General Public License | ||
| 21 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 22 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 23 | ;; Boston, MA 02111-1307, USA. | ||
| 24 | |||
| 25 | ;;; Commentary: | ||
| 26 | |||
| 27 | ;; Registered URI schemes: http://www.iana.org/assignments/uri-schemes | ||
| 28 | |||
| 29 | ;;; Code: | ||
| 30 | |||
| 31 | (eval-when-compile (require 'cl)) | ||
| 32 | ;; Don't require CL at runtime if we can avoid it (Emacs 21). | ||
| 33 | ;; Otherwise we need it for hashing functions. `puthash' was never | ||
| 34 | ;; defined in the Emacs 20 cl.el for some reason. | ||
| 35 | (if (fboundp 'puthash) | ||
| 36 | nil ; internal or CL is loaded | ||
| 37 | (defalias 'puthash 'cl-puthash) | ||
| 38 | (autoload 'cl-puthash "cl") | ||
| 39 | (autoload 'gethash "cl") | ||
| 40 | (autoload 'maphash "cl") | ||
| 41 | (autoload 'make-hash-table "cl")) | ||
| 42 | |||
| 43 | (eval-when-compile | ||
| 44 | (require 'mm-decode) | ||
| 45 | (require 'mm-view)) | ||
| 46 | |||
| 47 | (require 'mailcap) | ||
| 48 | (require 'url-vars) | ||
| 49 | (require 'url-cookie) | ||
| 50 | (require 'url-history) | ||
| 51 | (require 'url-expand) | ||
| 52 | (require 'url-privacy) | ||
| 53 | (require 'url-methods) | ||
| 54 | (require 'url-proxy) | ||
| 55 | (require 'url-parse) | ||
| 56 | (require 'url-util) | ||
| 57 | |||
| 58 | ;; Fixme: customize? convert-standard-filename? | ||
| 59 | ;;;###autoload | ||
| 60 | (defvar url-configuration-directory "~/.url") | ||
| 61 | |||
| 62 | (defun url-do-setup () | ||
| 63 | "Setup the url package. | ||
| 64 | This is to avoid conflict with user settings if URL is dumped with | ||
| 65 | Emacs." | ||
| 66 | (unless url-setup-done | ||
| 67 | |||
| 68 | ;; Make OS/2 happy | ||
| 69 | ;;(push '("http" "80") tcp-binary-process-input-services) | ||
| 70 | |||
| 71 | (mailcap-parse-mailcaps) | ||
| 72 | (mailcap-parse-mimetypes) | ||
| 73 | |||
| 74 | ;; Register all the authentication schemes we can handle | ||
| 75 | (url-register-auth-scheme "basic" nil 4) | ||
| 76 | (url-register-auth-scheme "digest" nil 7) | ||
| 77 | |||
| 78 | (setq url-cookie-file | ||
| 79 | (or url-cookie-file | ||
| 80 | (expand-file-name "cookies" url-configuration-directory))) | ||
| 81 | |||
| 82 | (setq url-history-file | ||
| 83 | (or url-history-file | ||
| 84 | (expand-file-name "history" url-configuration-directory))) | ||
| 85 | |||
| 86 | ;; Parse the global history file if it exists, so that it can be used | ||
| 87 | ;; for URL completion, etc. | ||
| 88 | (url-history-parse-history) | ||
| 89 | (url-history-setup-save-timer) | ||
| 90 | |||
| 91 | ;; Ditto for cookies | ||
| 92 | (url-cookie-setup-save-timer) | ||
| 93 | (url-cookie-parse-file url-cookie-file) | ||
| 94 | |||
| 95 | ;; Read in proxy gateways | ||
| 96 | (let ((noproxy (and (not (assoc "no_proxy" url-proxy-services)) | ||
| 97 | (or (getenv "NO_PROXY") | ||
| 98 | (getenv "no_PROXY") | ||
| 99 | (getenv "no_proxy"))))) | ||
| 100 | (if noproxy | ||
| 101 | (setq url-proxy-services | ||
| 102 | (cons (cons "no_proxy" | ||
| 103 | (concat "\\(" | ||
| 104 | (mapconcat | ||
| 105 | (lambda (x) | ||
| 106 | (cond | ||
| 107 | ((= x ?,) "\\|") | ||
| 108 | ((= x ? ) "") | ||
| 109 | ((= x ?.) (regexp-quote ".")) | ||
| 110 | ((= x ?*) ".*") | ||
| 111 | ((= x ??) ".") | ||
| 112 | (t (char-to-string x)))) | ||
| 113 | noproxy "") "\\)")) | ||
| 114 | url-proxy-services)))) | ||
| 115 | |||
| 116 | ;; Set the password entry funtion based on user defaults or guess | ||
| 117 | ;; based on which remote-file-access package they are using. | ||
| 118 | (cond | ||
| 119 | (url-passwd-entry-func nil) ; Already been set | ||
| 120 | ((fboundp 'read-passwd) ; Use secure password if available | ||
| 121 | (setq url-passwd-entry-func 'read-passwd)) | ||
| 122 | ((or (featurep 'efs) ; Using EFS | ||
| 123 | (featurep 'efs-auto)) ; or autoloading efs | ||
| 124 | (if (not (fboundp 'read-passwd)) | ||
| 125 | (autoload 'read-passwd "passwd" "Read in a password" nil)) | ||
| 126 | (setq url-passwd-entry-func 'read-passwd)) | ||
| 127 | ((or (featurep 'ange-ftp) ; Using ange-ftp | ||
| 128 | (and (boundp 'file-name-handler-alist) | ||
| 129 | (not (featurep 'xemacs)))) ; ?? | ||
| 130 | (setq url-passwd-entry-func 'ange-ftp-read-passwd)) | ||
| 131 | (t | ||
| 132 | (url-warn | ||
| 133 | 'security | ||
| 134 | "(url-setup): Can't determine how to read passwords, winging it."))) | ||
| 135 | |||
| 136 | (url-setup-privacy-info) | ||
| 137 | (run-hooks 'url-load-hook) | ||
| 138 | (setq url-setup-done t))) | ||
| 139 | |||
| 140 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 141 | ;;; Retrieval functions | ||
| 142 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 143 | (defun url-retrieve (url callback &optional cbargs) | ||
| 144 | "Retrieve URL asynchronously and call CALLBACK with CBARGS when finished. | ||
| 145 | The callback is called when the object has been completely retrieved, with | ||
| 146 | the current buffer containing the object, and any MIME headers associated | ||
| 147 | with it. URL is either a string or a parsed URL. | ||
| 148 | |||
| 149 | Return the buffer URL will load into, or nil if the process has | ||
| 150 | already completed." | ||
| 151 | (url-do-setup) | ||
| 152 | (url-gc-dead-buffers) | ||
| 153 | (if (stringp url) | ||
| 154 | (set-text-properties 0 (length url) nil url)) | ||
| 155 | (if (not (vectorp url)) | ||
| 156 | (setq url (url-generic-parse-url url))) | ||
| 157 | (if (not (functionp callback)) | ||
| 158 | (error "Must provide a callback function to url-retrieve")) | ||
| 159 | (unless (url-type url) | ||
| 160 | (error "Bad url: %s" (url-recreate-url url))) | ||
| 161 | (let ((loader (url-scheme-get-property (url-type url) 'loader)) | ||
| 162 | (url-using-proxy (if (url-host url) | ||
| 163 | (url-find-proxy-for-url url (url-host url)))) | ||
| 164 | (buffer nil) | ||
| 165 | (asynch (url-scheme-get-property (url-type url) 'asynchronous-p))) | ||
| 166 | (if url-using-proxy | ||
| 167 | (setq asynch t | ||
| 168 | loader 'url-proxy)) | ||
| 169 | (if asynch | ||
| 170 | (setq buffer (funcall loader url callback cbargs)) | ||
| 171 | (setq buffer (funcall loader url)) | ||
| 172 | (if buffer | ||
| 173 | (with-current-buffer buffer | ||
| 174 | (apply callback cbargs)))) | ||
| 175 | (url-history-update-url url (current-time)) | ||
| 176 | buffer)) | ||
| 177 | |||
| 178 | (defun url-retrieve-synchronously (url) | ||
| 179 | "Retrieve URL synchronously. | ||
| 180 | Return the buffer containing the data, or nil if there are no data | ||
| 181 | associated with it (the case for dired, info, or mailto URLs that need | ||
| 182 | no further processing). URL is either a string or a parsed URL." | ||
| 183 | (url-do-setup) | ||
| 184 | |||
| 185 | (lexical-let ((retrieval-done nil) | ||
| 186 | (asynch-buffer nil)) | ||
| 187 | (setq asynch-buffer | ||
| 188 | (url-retrieve url (lambda (&rest ignored) | ||
| 189 | (url-debug 'retrieval "Synchronous fetching done (%S)" (current-buffer)) | ||
| 190 | (setq retrieval-done t | ||
| 191 | asynch-buffer (current-buffer))))) | ||
| 192 | (if (not asynch-buffer) | ||
| 193 | ;; We do not need to do anything, it was a mailto or something | ||
| 194 | ;; similar that takes processing completely outside of the URL | ||
| 195 | ;; package. | ||
| 196 | nil | ||
| 197 | (while (not retrieval-done) | ||
| 198 | (url-debug 'retrieval "Spinning in url-retrieve-synchronously: %S (%S)" | ||
| 199 | retrieval-done asynch-buffer) | ||
| 200 | ;; Quoth Stef: | ||
| 201 | ;; It turns out that the problem seems to be that the (sit-for | ||
| 202 | ;; 0.1) below doesn't actually process the data: instead it | ||
| 203 | ;; returns immediately because there is keyboard input | ||
| 204 | ;; waiting, so we end up spinning endlessly waiting for the | ||
| 205 | ;; process to finish while not letting it finish. | ||
| 206 | |||
| 207 | ;; However, raman claims that it blocks Emacs with Emacspeak | ||
| 208 | ;; for unexplained reasons. Put back for his benefit until | ||
| 209 | ;; someone can understand it. | ||
| 210 | ;; (sleep-for 0.1) | ||
| 211 | (sit-for 0.1)) | ||
| 212 | asynch-buffer))) | ||
| 213 | |||
| 214 | (defun url-mm-callback (&rest ignored) | ||
| 215 | (let ((handle (mm-dissect-buffer t))) | ||
| 216 | (save-excursion | ||
| 217 | (url-mark-buffer-as-dead (current-buffer)) | ||
| 218 | (set-buffer (generate-new-buffer (url-recreate-url url-current-object))) | ||
| 219 | (if (eq (mm-display-part handle) 'external) | ||
| 220 | (progn | ||
| 221 | (set-process-sentinel | ||
| 222 | ;; Fixme: this shouldn't have to know the form of the | ||
| 223 | ;; undisplayer produced by `mm-display-part'. | ||
| 224 | (get-buffer-process (cdr (mm-handle-undisplayer handle))) | ||
| 225 | `(lambda (proc event) | ||
| 226 | (mm-destroy-parts (quote ,handle)))) | ||
| 227 | (message "Viewing externally") | ||
| 228 | (kill-buffer (current-buffer))) | ||
| 229 | (display-buffer (current-buffer)) | ||
| 230 | (mm-destroy-parts handle))))) | ||
| 231 | |||
| 232 | (defun url-mm-url (url) | ||
| 233 | "Retrieve URL and pass to the appropriate viewing application." | ||
| 234 | (require 'mm-decode) | ||
| 235 | (require 'mm-view) | ||
| 236 | (url-retrieve url 'url-mm-callback nil)) | ||
| 237 | |||
| 238 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 239 | ;;; Miscellaneous | ||
| 240 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
| 241 | (defvar url-dead-buffer-list nil) | ||
| 242 | |||
| 243 | (defun url-mark-buffer-as-dead (buff) | ||
| 244 | (push buff url-dead-buffer-list)) | ||
| 245 | |||
| 246 | (defun url-gc-dead-buffers () | ||
| 247 | (let ((buff)) | ||
| 248 | (while (setq buff (pop url-dead-buffer-list)) | ||
| 249 | (if (buffer-live-p buff) | ||
| 250 | (kill-buffer buff))))) | ||
| 251 | |||
| 252 | (cond | ||
| 253 | ((fboundp 'display-warning) | ||
| 254 | (defalias 'url-warn 'display-warning)) | ||
| 255 | ((fboundp 'warn) | ||
| 256 | (defun url-warn (class message &optional level) | ||
| 257 | (warn "(%s/%s) %s" class (or level 'warning) message))) | ||
| 258 | (t | ||
| 259 | (defun url-warn (class message &optional level) | ||
| 260 | (with-current-buffer (get-buffer-create "*URL-WARNINGS*") | ||
| 261 | (goto-char (point-max)) | ||
| 262 | (save-excursion | ||
| 263 | (insert (format "(%s/%s) %s\n" class (or level 'warning) message))) | ||
| 264 | (display-buffer (current-buffer)))))) | ||
| 265 | |||
| 266 | (provide 'url) | ||
| 267 | |||
| 268 | ;; arch-tag: bc182f1f-d187-4f10-b961-47af2066579a | ||
| 269 | ;;; url.el ends here | ||
diff --git a/lisp/vc.el b/lisp/vc.el index 663c45fd466..a0d3d1cd4be 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -646,9 +646,6 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'." | |||
| 646 | :group 'vc) | 646 | :group 'vc) |
| 647 | 647 | ||
| 648 | ;; vc-annotate functionality (CVS only). | 648 | ;; vc-annotate functionality (CVS only). |
| 649 | (defvar vc-annotate-mode nil | ||
| 650 | "Variable indicating if VC-Annotate mode is active.") | ||
| 651 | |||
| 652 | (defvar vc-annotate-mode-map | 649 | (defvar vc-annotate-mode-map |
| 653 | (let ((m (make-sparse-keymap))) | 650 | (let ((m (make-sparse-keymap))) |
| 654 | (define-key m [menu-bar] (make-sparse-keymap "VC-Annotate")) | 651 | (define-key m [menu-bar] (make-sparse-keymap "VC-Annotate")) |
| @@ -3004,7 +3001,7 @@ use; you may override this using the second optional arg MODE." | |||
| 3004 | (when buffer | 3001 | (when buffer |
| 3005 | (set-buffer buffer) | 3002 | (set-buffer buffer) |
| 3006 | (display-buffer buffer)) | 3003 | (display-buffer buffer)) |
| 3007 | (if (not vc-annotate-mode) ; Turn on vc-annotate-mode if not done | 3004 | (if (not vc-annotate-parent-rev) |
| 3008 | (vc-annotate-mode)) | 3005 | (vc-annotate-mode)) |
| 3009 | (cond ((null vc-annotate-display-mode) | 3006 | (cond ((null vc-annotate-display-mode) |
| 3010 | (vc-annotate-display-default vc-annotate-ratio)) | 3007 | (vc-annotate-display-default vc-annotate-ratio)) |
diff --git a/lisp/xml.el b/lisp/xml.el index 993ef59b276..b0d5d45f98d 100644 --- a/lisp/xml.el +++ b/lisp/xml.el | |||
| @@ -598,8 +598,8 @@ This follows the rule [28] in the XML specifications." | |||
| 598 | nil) | 598 | nil) |
| 599 | (t | 599 | (t |
| 600 | (if xml-validating-parser | 600 | (if xml-validating-parser |
| 601 | error "XML: (Validity) Invalid element type in the DTD"))) | 601 | (error "XML: (Validity) Invalid element type in the DTD")))) |
| 602 | 602 | ||
| 603 | ;; rule [45]: the element declaration must be unique | 603 | ;; rule [45]: the element declaration must be unique |
| 604 | (if (and (assoc element dtd) | 604 | (if (and (assoc element dtd) |
| 605 | xml-validating-parser) | 605 | xml-validating-parser) |
| @@ -727,14 +727,9 @@ This follows the rule [28] in the XML specifications." | |||
| 727 | (match-string 1 this-part))))))) | 727 | (match-string 1 this-part))))))) |
| 728 | 728 | ||
| 729 | (cond ((null children) | 729 | (cond ((null children) |
| 730 | (if (stringp expansion) | 730 | ;; FIXME: If we have an entity that expands into XML, this won't work. |
| 731 | (setq children (concat prev-part expansion)) | 731 | (setq children |
| 732 | (if (stringp (car (last expansion))) | 732 | (concat prev-part expansion))) |
| 733 | (progn | ||
| 734 | (setq children | ||
| 735 | (list (concat prev-part (car expansion)) | ||
| 736 | (cdr expansion)))) | ||
| 737 | (setq children (append expansion prev-part))))) | ||
| 738 | ((stringp children) | 733 | ((stringp children) |
| 739 | (if (stringp expansion) | 734 | (if (stringp expansion) |
| 740 | (setq children (concat children prev-part expansion)) | 735 | (setq children (concat children prev-part expansion)) |
| @@ -756,11 +751,15 @@ This follows the rule [28] in the XML specifications." | |||
| 756 | (cond ((stringp children) | 751 | (cond ((stringp children) |
| 757 | (concat children (substring string point))) | 752 | (concat children (substring string point))) |
| 758 | ((stringp (car (last children))) | 753 | ((stringp (car (last children))) |
| 759 | (concat (car children) (substring string point))) | 754 | (concat (car (last children)) (substring string point))) |
| 760 | ((null children) | 755 | ((null children) |
| 761 | string) | 756 | string) |
| 762 | (t | 757 | (t |
| 763 | (nreverse children))))) | 758 | (concat (mapconcat 'identity |
| 759 | (nreverse children) | ||
| 760 | "") | ||
| 761 | (substring string point)))))) | ||
| 762 | |||
| 764 | ;;******************************************************************* | 763 | ;;******************************************************************* |
| 765 | ;;** | 764 | ;;** |
| 766 | ;;** Printing a tree. | 765 | ;;** Printing a tree. |
diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index 2096a60928f..3714e010d18 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | @c \input texinfo @c -*-texinfo-*- | 1 | \input texinfo @c -*-texinfo-*- |
| 2 | @comment %**start of header | 2 | @comment %**start of header |
| 3 | @setfilename ../info/eintr | 3 | @setfilename ../info/eintr |
| 4 | @c setfilename emacs-lisp-intro.info | ||
| 4 | @c sethtmlfilename emacs-lisp-intro.html | 5 | @c sethtmlfilename emacs-lisp-intro.html |
| 5 | @settitle Programming in Emacs Lisp | 6 | @settitle Programming in Emacs Lisp |
| 6 | @syncodeindex vr cp | 7 | @syncodeindex vr cp |
| @@ -21,8 +22,8 @@ | |||
| 21 | 22 | ||
| 22 | @comment %**end of header | 23 | @comment %**end of header |
| 23 | 24 | ||
| 24 | @set edition-number 2.12 | 25 | @set edition-number 2.14 |
| 25 | @set update-date 2003 Nov 19 | 26 | @set update-date 2004 Oct 12 |
| 26 | 27 | ||
| 27 | @ignore | 28 | @ignore |
| 28 | ## Summary of shell commands to create various output formats: | 29 | ## Summary of shell commands to create various output formats: |
| @@ -61,6 +62,8 @@ | |||
| 61 | ## View Info output with standalone reader | 62 | ## View Info output with standalone reader |
| 62 | info emacs-lisp-intro.info | 63 | info emacs-lisp-intro.info |
| 63 | 64 | ||
| 65 | ## popd | ||
| 66 | |||
| 64 | @end ignore | 67 | @end ignore |
| 65 | 68 | ||
| 66 | @c ================ Included Figures ================ | 69 | @c ================ Included Figures ================ |
| @@ -180,7 +183,7 @@ people who are not programmers. | |||
| 180 | Edition @value{edition-number}, @value{update-date} | 183 | Edition @value{edition-number}, @value{update-date} |
| 181 | @sp 1 | 184 | @sp 1 |
| 182 | Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1997, 2001, | 185 | Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1997, 2001, |
| 183 | 2002, 2003 Free Software Foundation, Inc. | 186 | 2002, 2003, 2004 Free Software Foundation, Inc. |
| 184 | @sp 1 | 187 | @sp 1 |
| 185 | 188 | ||
| 186 | @iftex | 189 | @iftex |
| @@ -1050,13 +1053,16 @@ Robert J. Chassell | |||
| 1050 | @chapter List Processing | 1053 | @chapter List Processing |
| 1051 | 1054 | ||
| 1052 | To the untutored eye, Lisp is a strange programming language. In Lisp | 1055 | To the untutored eye, Lisp is a strange programming language. In Lisp |
| 1053 | code there are parentheses everywhere. Some people even claim that the | 1056 | code there are parentheses everywhere. Some people even claim that |
| 1054 | name stands for `Lots of Isolated Silly Parentheses'. But the claim is | 1057 | the name stands for `Lots of Isolated Silly Parentheses'. But the |
| 1055 | unwarranted. Lisp stands for LISt Processing, and the programming | 1058 | claim is unwarranted. Lisp stands for LISt Processing, and the |
| 1056 | language handles @emph{lists} (and lists of lists) by putting them | 1059 | programming language handles @emph{lists} (and lists of lists) by |
| 1057 | between parentheses. The parentheses mark the boundaries of the list. | 1060 | putting them between parentheses. The parentheses mark the boundaries |
| 1058 | Sometimes a list is preceded by a single apostrophe or quotation mark, | 1061 | of the list. Sometimes a list is preceded by a single apostrophe or |
| 1059 | @samp{'}. Lists are the basis of Lisp. | 1062 | quotation mark, @samp{'}@footnote{The single apostrophe or quotation |
| 1063 | mark is an abbreviation for the function @code{quote}; you need not | ||
| 1064 | think about functions now; functions are defined in @ref{Making | ||
| 1065 | Errors, , Generate an Error Message}.} Lists are the basis of Lisp. | ||
| 1060 | 1066 | ||
| 1061 | @menu | 1067 | @menu |
| 1062 | * Lisp Lists:: What are lists? | 1068 | * Lisp Lists:: What are lists? |
| @@ -2135,7 +2141,8 @@ Debugger entered--Lisp error: | |||
| 2135 | 2141 | ||
| 2136 | @need 1250 | 2142 | @need 1250 |
| 2137 | As usual, the error message tries to be helpful and makes sense after you | 2143 | As usual, the error message tries to be helpful and makes sense after you |
| 2138 | learn how to read it. | 2144 | learn how to read it.@footnote{@code{(quote hello)} is an expansion of |
| 2145 | the abbreviation @code{'hello}.} | ||
| 2139 | 2146 | ||
| 2140 | The first part of the error message is straightforward; it says | 2147 | The first part of the error message is straightforward; it says |
| 2141 | @samp{wrong type argument}. Next comes the mysterious jargon word | 2148 | @samp{wrong type argument}. Next comes the mysterious jargon word |
| @@ -4002,7 +4009,7 @@ the @dfn{else-part}, for the case when the true-or-false-test returns | |||
| 4002 | false. When this happens, the second argument or then-part of the | 4009 | false. When this happens, the second argument or then-part of the |
| 4003 | overall @code{if} expression is @emph{not} evaluated, but the third or | 4010 | overall @code{if} expression is @emph{not} evaluated, but the third or |
| 4004 | else-part @emph{is} evaluated. You might think of this as the cloudy | 4011 | else-part @emph{is} evaluated. You might think of this as the cloudy |
| 4005 | day alternative for the decision `if it is warm and sunny, then go to | 4012 | day alternative for the decision ``if it is warm and sunny, then go to |
| 4006 | the beach, else read a book!''. | 4013 | the beach, else read a book!''. |
| 4007 | 4014 | ||
| 4008 | The word ``else'' is not written in the Lisp code; the else-part of an | 4015 | The word ``else'' is not written in the Lisp code; the else-part of an |
| @@ -14924,10 +14931,10 @@ Here is the function: | |||
| 14924 | ((eq t (car (cdr (car current-directory-list)))) | 14931 | ((eq t (car (cdr (car current-directory-list)))) |
| 14925 | ;; decide whether to skip or recurse | 14932 | ;; decide whether to skip or recurse |
| 14926 | (if | 14933 | (if |
| 14927 | (equal (or "." "..") | 14934 | (equal "." |
| 14928 | (substring (car (car current-directory-list)) -1)) | 14935 | (substring (car (car current-directory-list)) -1)) |
| 14929 | ;; then do nothing if filename is that of | 14936 | ;; then do nothing since filename is that of |
| 14930 | ;; current directory or parent | 14937 | ;; current directory or parent, "." or ".." |
| 14931 | () | 14938 | () |
| 14932 | @end group | 14939 | @end group |
| 14933 | @group | 14940 | @group |
| @@ -17118,7 +17125,7 @@ problem recently.) | |||
| 17118 | @item Ignore case when using `grep'@* | 17125 | @item Ignore case when using `grep'@* |
| 17119 | @samp{-n}@w{ } Prefix each line of output with line number@* | 17126 | @samp{-n}@w{ } Prefix each line of output with line number@* |
| 17120 | @samp{-i}@w{ } Ignore case distinctions@* | 17127 | @samp{-i}@w{ } Ignore case distinctions@* |
| 17121 | @samp{-e}@w{ } Protect patterns beginning with a hyphen character, @samp{-} | 17128 | @samp{-e}@w{ } Protect patterns beginning with a hyphen character, @samp{-} |
| 17122 | 17129 | ||
| 17123 | @smallexample | 17130 | @smallexample |
| 17124 | (setq grep-command "grep -n -i -e ") | 17131 | (setq grep-command "grep -n -i -e ") |
| @@ -17159,7 +17166,7 @@ If you want to write with Chinese `GB' characters, set this instead: | |||
| 17159 | @end itemize | 17166 | @end itemize |
| 17160 | 17167 | ||
| 17161 | @subsubheading Fixing Unpleasant Key Bindings | 17168 | @subsubheading Fixing Unpleasant Key Bindings |
| 17162 | @cindex Key bindings, fixing | 17169 | @cindex Key bindings, fixing |
| 17163 | @cindex Bindings, key, fixing unpleasant | 17170 | @cindex Bindings, key, fixing unpleasant |
| 17164 | 17171 | ||
| 17165 | Some systems bind keys unpleasantly. Sometimes, for example, the | 17172 | Some systems bind keys unpleasantly. Sometimes, for example, the |
| @@ -18018,7 +18025,7 @@ beginning. | |||
| 18018 | 18025 | ||
| 18019 | Sometimes when you you write text, you duplicate words---as with ``you | 18026 | Sometimes when you you write text, you duplicate words---as with ``you |
| 18020 | you'' near the beginning of this sentence. I find that most | 18027 | you'' near the beginning of this sentence. I find that most |
| 18021 | frequently, I duplicate ``the'; hence, I call the function for | 18028 | frequently, I duplicate ``the''; hence, I call the function for |
| 18022 | detecting duplicated words, @code{the-the}. | 18029 | detecting duplicated words, @code{the-the}. |
| 18023 | 18030 | ||
| 18024 | @need 1250 | 18031 | @need 1250 |
| @@ -20638,6 +20645,7 @@ each column." | |||
| 20638 | @end smallexample | 20645 | @end smallexample |
| 20639 | @end ifnottex | 20646 | @end ifnottex |
| 20640 | 20647 | ||
| 20648 | @c qqq | ||
| 20641 | @ignore | 20649 | @ignore |
| 20642 | Graphing Definitions Re-listed | 20650 | Graphing Definitions Re-listed |
| 20643 | 20651 | ||
| @@ -21137,6 +21145,7 @@ each column." | |||
| 21137 | (print-X-axis numbers-list horizontal-step))) | 21145 | (print-X-axis numbers-list horizontal-step))) |
| 21138 | @end group | 21146 | @end group |
| 21139 | @end smallexample | 21147 | @end smallexample |
| 21148 | @c qqq | ||
| 21140 | @end ignore | 21149 | @end ignore |
| 21141 | 21150 | ||
| 21142 | @page | 21151 | @page |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index b568e99fb58..c33e49ca773 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2004-10-09 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * text.texi (Filling): Add anchor for definition of | ||
| 4 | `sentence-end-double-space'. | ||
| 5 | |||
| 6 | * searching.texi (Regexp Example): Update description of how | ||
| 7 | Emacs currently recognizes the end of a sentence. | ||
| 8 | (Standard Regexps): Update definition of the variable | ||
| 9 | `sentence-end'. Add definition of the function `sentence-end'. | ||
| 10 | |||
| 11 | 2004-10-08 Paul Pogonyshev <pogonyshev@gmx.net> | ||
| 12 | |||
| 13 | * display.texi (Progress): New node. | ||
| 14 | |||
| 15 | 2004-10-05 Kim F. Storm <storm@cua.dk> | ||
| 16 | |||
| 17 | * display.texi (Fringe Bitmaps): Update fringe-bitmaps-at-pos. | ||
| 18 | |||
| 1 | 2004-09-29 Kim F. Storm <storm@cua.dk> | 19 | 2004-09-29 Kim F. Storm <storm@cua.dk> |
| 2 | 20 | ||
| 3 | * display.texi (Fringe Bitmaps): Use symbols rather than numbers | 21 | * display.texi (Fringe Bitmaps): Use symbols rather than numbers |
diff --git a/lispref/display.texi b/lispref/display.texi index 00b91fe1fd8..d7e1303abad 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -16,6 +16,7 @@ that Emacs presents to the user. | |||
| 16 | * Truncation:: Folding or wrapping long text lines. | 16 | * Truncation:: Folding or wrapping long text lines. |
| 17 | * The Echo Area:: Where messages are displayed. | 17 | * The Echo Area:: Where messages are displayed. |
| 18 | * Warnings:: Displaying warning messages for the user. | 18 | * Warnings:: Displaying warning messages for the user. |
| 19 | * Progress:: Informing user about progress of a long operation. | ||
| 19 | * Invisible Text:: Hiding part of the buffer text. | 20 | * Invisible Text:: Hiding part of the buffer text. |
| 20 | * Selective Display:: Hiding part of the buffer text (the old way). | 21 | * Selective Display:: Hiding part of the buffer text (the old way). |
| 21 | * Overlay Arrow:: Display of an arrow to indicate position. | 22 | * Overlay Arrow:: Display of an arrow to indicate position. |
| @@ -533,6 +534,104 @@ symbols. If it matches the first few elements in a warning type, then | |||
| 533 | that warning is not logged. | 534 | that warning is not logged. |
| 534 | @end defopt | 535 | @end defopt |
| 535 | 536 | ||
| 537 | @node Progress | ||
| 538 | @section Reporting Operation Progress | ||
| 539 | @cindex progress reporting | ||
| 540 | |||
| 541 | When an operation can take a while to finish, you should inform the | ||
| 542 | user about the progress it makes. This way the user can estimate | ||
| 543 | remaining time and clearly see that Emacs is busy working, not hung. | ||
| 544 | |||
| 545 | Functions listed in this section provide simple and efficient way of | ||
| 546 | reporting operation progress. Here is a working example that does | ||
| 547 | nothing useful: | ||
| 548 | |||
| 549 | @example | ||
| 550 | (let ((progress-reporter | ||
| 551 | (make-progress-reporter "Collecting some mana for Emacs..." | ||
| 552 | 0 500))) | ||
| 553 | (dotimes (k 500) | ||
| 554 | (sit-for 0.01) | ||
| 555 | (progress-reporter-update progress-reporter k)) | ||
| 556 | (progress-reporter-done progress-reporter)) | ||
| 557 | @end example | ||
| 558 | |||
| 559 | @defun make-progress-reporter message min-value max-value &optional current-value min-change min-time | ||
| 560 | This function creates a progress reporter---the object you will use as | ||
| 561 | an argument for all other functions listed here. The idea is to | ||
| 562 | precompute as much data as possible to make progress reporting very | ||
| 563 | fast. | ||
| 564 | |||
| 565 | The @var{message} will be displayed in the echo area, followed by | ||
| 566 | progress percentage. @var{message} is treated as a simple string. If | ||
| 567 | you need it to depend on a filename, for instance, use @code{format} | ||
| 568 | before calling this function. | ||
| 569 | |||
| 570 | @var{min-value} and @var{max-value} arguments stand for starting and | ||
| 571 | final states of your operation. For instance, if you scan a buffer, | ||
| 572 | they should be the results of @code{point-min} and @code{point-max} | ||
| 573 | correspondingly. It is required that @var{max-value} is greater than | ||
| 574 | @var{min-value}. If you create progress reporter when some part of | ||
| 575 | the operation has already been completed, then specify | ||
| 576 | @var{current-value} argument. But normally you should omit it or set | ||
| 577 | it to @code{nil}---it will default to @var{min-value} then. | ||
| 578 | |||
| 579 | Remaining arguments control the rate of echo area updates. Progress | ||
| 580 | reporter will wait for at least @var{min-change} more percents of the | ||
| 581 | operation to be completed before printing next message. | ||
| 582 | @var{min-time} specifies the minimum time in seconds to pass between | ||
| 583 | successive prints. It can be fractional. Depending on Emacs and | ||
| 584 | system capabilities, progress reporter may or may not respect this | ||
| 585 | last argument or do it with varying precision. Default value for | ||
| 586 | @var{min-change} is 1 (one percent), for @var{min-time}---0.2 | ||
| 587 | (seconds.) | ||
| 588 | |||
| 589 | This function calls @code{progress-reporter-update}, so the first | ||
| 590 | message is printed immediately. | ||
| 591 | @end defun | ||
| 592 | |||
| 593 | @defun progress-reporter-update reporter value | ||
| 594 | This function does the main work of reporting progress of your | ||
| 595 | operation. It print the message of @var{reporter} followed by | ||
| 596 | progress percentage determined by @var{value}. If percentage is zero, | ||
| 597 | then it is not printed at all. | ||
| 598 | |||
| 599 | @var{reporter} must be the result of a call to | ||
| 600 | @code{make-progress-reporter}. @var{value} specifies the current | ||
| 601 | state of your operation and must be between @var{min-value} and | ||
| 602 | @var{max-value} (inclusive) as passed to | ||
| 603 | @code{make-progress-reporter}. For instance, if you scan a buffer, | ||
| 604 | then @var{value} should be the result of a call to @code{point}. | ||
| 605 | |||
| 606 | This function respects @var{min-change} and @var{min-time} as passed | ||
| 607 | to @code{make-progress-reporter} and so does not output new messages | ||
| 608 | on every invocation. It is thus very fast and normally you should not | ||
| 609 | try to reduce the number of calls to it: resulting overhead will most | ||
| 610 | likely negate your effort. | ||
| 611 | @end defun | ||
| 612 | |||
| 613 | @defun progress-reporter-force-update reporter value &optional new-message | ||
| 614 | This function is similar to @code{progress-reporter-update} except | ||
| 615 | that it prints a message in the echo area unconditionally. | ||
| 616 | |||
| 617 | The first two arguments have the same meaning as for | ||
| 618 | @code{progress-reporter-update}. Optional @var{new-message} allows | ||
| 619 | you to change the message of the @var{reporter}. Since this functions | ||
| 620 | always updates the echo area, such a change will be immediately | ||
| 621 | presented to the user. | ||
| 622 | @end defun | ||
| 623 | |||
| 624 | @defun progress-reporter-done reporter | ||
| 625 | This function should be called when the operation is finished. It | ||
| 626 | prints the message of @var{reporter} followed by word ``done'' in the | ||
| 627 | echo area. | ||
| 628 | |||
| 629 | You should always call this function and not hope for | ||
| 630 | @code{progress-reporter-update} to print ``100%.'' Firstly, it may | ||
| 631 | never print it, there are many good reasons for this not to happen. | ||
| 632 | Secondly, ``done'' is more explicit. | ||
| 633 | @end defun | ||
| 634 | |||
| 536 | @node Invisible Text | 635 | @node Invisible Text |
| 537 | @section Invisible Text | 636 | @section Invisible Text |
| 538 | 637 | ||
| @@ -2655,9 +2754,10 @@ symbols have their own name space. | |||
| 2655 | @defun fringe-bitmaps-at-pos &optional pos window | 2754 | @defun fringe-bitmaps-at-pos &optional pos window |
| 2656 | This function returns the fringe bitmaps of the display line | 2755 | This function returns the fringe bitmaps of the display line |
| 2657 | containing position @var{pos} in window @var{window}. The return | 2756 | containing position @var{pos} in window @var{window}. The return |
| 2658 | value has the form @code{(@var{left} . @var{right})}, where @var{left} | 2757 | value has the form @code{(@var{left} @var{right} @var{ov})}, where @var{left} |
| 2659 | is the symbol for the fringe bitmap in the left fringe (or @code{nil} | 2758 | is the symbol for the fringe bitmap in the left fringe (or @code{nil} |
| 2660 | if no bitmap), and @var{right} is similar for the right fringe. | 2759 | if no bitmap), @var{right} is similar for the right fringe, and @var{ov} |
| 2760 | is non-@code{nil} if there is an overlay arrow in the left fringe. | ||
| 2661 | 2761 | ||
| 2662 | The value is @code{nil} if @var{pos} is not visible in @var{window}. | 2762 | The value is @code{nil} if @var{pos} is not visible in @var{window}. |
| 2663 | If @var{window} is @code{nil}, that stands for the selected window. | 2763 | If @var{window} is @code{nil}, that stands for the selected window. |
diff --git a/lispref/searching.texi b/lispref/searching.texi index 93a152fbbe1..ee6cb06b1e1 100644 --- a/lispref/searching.texi +++ b/lispref/searching.texi | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 | 3 | @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2004 |
| 4 | @c Free Software Foundation, Inc. | 4 | @c Free Software Foundation, Inc. |
| 5 | @c See the file elisp.texi for copying conditions. | 5 | @c See the file elisp.texi for copying conditions. |
| 6 | @setfilename ../info/searching | 6 | @setfilename ../info/searching |
| @@ -694,9 +694,9 @@ an @code{invalid-regexp} error is signaled. | |||
| 694 | 694 | ||
| 695 | Here is a complicated regexp which was formerly used by Emacs to | 695 | Here is a complicated regexp which was formerly used by Emacs to |
| 696 | recognize the end of a sentence together with any whitespace that | 696 | recognize the end of a sentence together with any whitespace that |
| 697 | follows. It was used as the variable @code{sentence-end}. (Its value | 697 | follows. (Nowadays Emacs uses a similar but more complex default |
| 698 | nowadays contains alternatives for @samp{.}, @samp{?} and @samp{!} in | 698 | regexp constructed by the function @code{sentence-end}. |
| 699 | other character sets.) | 699 | @xref{Standard Regexps}.) |
| 700 | 700 | ||
| 701 | First, we show the regexp as a string in Lisp syntax to distinguish | 701 | First, we show the regexp as a string in Lisp syntax to distinguish |
| 702 | spaces from tab characters. The string constant begins and ends with a | 702 | spaces from tab characters. The string constant begins and ends with a |
| @@ -730,9 +730,9 @@ deciphered as follows: | |||
| 730 | The first part of the pattern is a character alternative that matches | 730 | The first part of the pattern is a character alternative that matches |
| 731 | any one of three characters: period, question mark, and exclamation | 731 | any one of three characters: period, question mark, and exclamation |
| 732 | mark. The match must begin with one of these three characters. (This | 732 | mark. The match must begin with one of these three characters. (This |
| 733 | is the one point where the new value of @code{sentence-end} differs | 733 | is one point where the new default regexp used by Emacs differs from |
| 734 | from the old. The new value also lists sentence ending | 734 | the old. The new value also allows some non-@acronym{ASCII} |
| 735 | non-@acronym{ASCII} characters.) | 735 | characters that end a sentence without any following whitespace.) |
| 736 | 736 | ||
| 737 | @item []\"')@}]* | 737 | @item []\"')@}]* |
| 738 | The second part of the pattern matches any closing braces and quotation | 738 | The second part of the pattern matches any closing braces and quotation |
| @@ -1698,23 +1698,25 @@ whitespace or starting with a form feed (after its left margin). | |||
| 1698 | @end defvar | 1698 | @end defvar |
| 1699 | 1699 | ||
| 1700 | @defvar sentence-end | 1700 | @defvar sentence-end |
| 1701 | This is the regular expression describing the end of a sentence. (All | 1701 | If non-@code{nil}, the value should be a regular expression describing |
| 1702 | paragraph boundaries also end sentences, regardless.) The (slightly | 1702 | the end of a sentence, including the whitespace following the |
| 1703 | simplified) default value is: | 1703 | sentence. (All paragraph boundaries also end sentences, regardless.) |
| 1704 | 1704 | ||
| 1705 | @example | 1705 | If the value is @code{nil}, the default, then the function |
| 1706 | "[.?!][]\"')@}]*\\($\\| $\\|\t\\|@ @ \\)[ \t\n]*" | 1706 | @code{sentence-end} has to construct the regexp. That is why you |
| 1707 | @end example | 1707 | should always call the function @code{sentence-end} to obtain the |
| 1708 | 1708 | regexp to be used to recognize the end of a sentence. | |
| 1709 | This means a period, question mark or exclamation mark (the actual | ||
| 1710 | default value also lists their alternatives in other character sets), | ||
| 1711 | followed optionally by closing parenthetical characters, followed by | ||
| 1712 | tabs, spaces or new lines. | ||
| 1713 | |||
| 1714 | For a detailed explanation of this regular expression, see @ref{Regexp | ||
| 1715 | Example}. | ||
| 1716 | @end defvar | 1709 | @end defvar |
| 1717 | 1710 | ||
| 1711 | @defun sentence-end | ||
| 1712 | This function returns the value of the variable @code{sentence-end}, | ||
| 1713 | if non-@code{nil}. Otherwise it returns a default value based on the | ||
| 1714 | values of the variables @code{sentence-end-double-space} | ||
| 1715 | (@pxref{Definition of sentence-end-double-space}), | ||
| 1716 | @code{sentence-end-without-period} and | ||
| 1717 | @code{sentence-end-without-space}. | ||
| 1718 | @end defun | ||
| 1719 | |||
| 1718 | @ignore | 1720 | @ignore |
| 1719 | arch-tag: c2573ca2-18aa-4839-93b8-924043ef831f | 1721 | arch-tag: c2573ca2-18aa-4839-93b8-924043ef831f |
| 1720 | @end ignore | 1722 | @end ignore |
diff --git a/lispref/text.texi b/lispref/text.texi index caa3f21b7b1..00aa235f513 100644 --- a/lispref/text.texi +++ b/lispref/text.texi | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | @c -*-texinfo-*- | 1 | @c -*-texinfo-*- |
| 2 | @c This is part of the GNU Emacs Lisp Reference Manual. | 2 | @c This is part of the GNU Emacs Lisp Reference Manual. |
| 3 | @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001 | 3 | @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, |
| 4 | @c 2000, 2001, 2004 | ||
| 4 | @c Free Software Foundation, Inc. | 5 | @c Free Software Foundation, Inc. |
| 5 | @c See the file elisp.texi for copying conditions. | 6 | @c See the file elisp.texi for copying conditions. |
| 6 | @setfilename ../info/text | 7 | @setfilename ../info/text |
| @@ -1448,6 +1449,7 @@ the text around point. | |||
| 1448 | @end defun | 1449 | @end defun |
| 1449 | 1450 | ||
| 1450 | @defopt sentence-end-double-space | 1451 | @defopt sentence-end-double-space |
| 1452 | @anchor{Definition of sentence-end-double-space} | ||
| 1451 | If this variable is non-@code{nil}, a period followed by just one space | 1453 | If this variable is non-@code{nil}, a period followed by just one space |
| 1452 | does not count as the end of a sentence, and the filling functions | 1454 | does not count as the end of a sentence, and the filling functions |
| 1453 | avoid breaking the line at such a place. | 1455 | avoid breaking the line at such a place. |
diff --git a/man/ChangeLog b/man/ChangeLog index fc0bd61497a..8aec01712ef 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,90 @@ | |||
| 1 | 2004-10-12 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * gnus-faq.texi ([5.9]): Improve code for reply-in-news. | ||
| 4 | |||
| 5 | 2004-10-12 Michael Albinus <michael.albinus@gmx.de> | ||
| 6 | |||
| 7 | Sync with Tramp 2.0.45. | ||
| 8 | |||
| 9 | * tramp.texi (Frequently Asked Questions): Comment paragraph about | ||
| 10 | plink link. The URL is outdated. Originator contacted for | ||
| 11 | clarification. | ||
| 12 | |||
| 13 | 2004-10-10 Juri Linkov <juri@jurta.org> | ||
| 14 | |||
| 15 | * gnus.texi (Top, Marking Articles): Join two menus in one node | ||
| 16 | because a node can have only one menu. | ||
| 17 | |||
| 18 | 2004-10-09 Luc Teirlinck <teirllm@auburn.edu> | ||
| 19 | |||
| 20 | * files.texi (Misc File Ops): View mode is a minor mode. | ||
| 21 | |||
| 22 | 2004-10-09 Juri Linkov <juri@jurta.org> | ||
| 23 | |||
| 24 | * gnus.texi (Fancy Mail Splitting): Remove backslash in the | ||
| 25 | example of nnmail-split-fancy. | ||
| 26 | |||
| 27 | 2004-10-08 Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 28 | |||
| 29 | * calendar.texi (iCalendar): Style changes. | ||
| 30 | |||
| 31 | 2004-10-07 Luc Teirlinck <teirllm@auburn.edu> | ||
| 32 | |||
| 33 | * search.texi (Regexps): The regexp described in the example is no | ||
| 34 | longer stored in the variable `sentence-end'. | ||
| 35 | |||
| 36 | 2004-10-06 Karl Berry <karl@gnu.org> | ||
| 37 | |||
| 38 | * info.texi (@kbd{1}--@kbd{9}): no space around --, for | ||
| 39 | consistency with other uses of dashes. | ||
| 40 | |||
| 41 | 2004-10-06 Nick Roberts <nickrob@snap.net.nz> | ||
| 42 | |||
| 43 | * building.texi (Starting GUD): Note that multiple debugging | ||
| 44 | sessions requires `gdb --fullname'. | ||
| 45 | |||
| 46 | 2004-10-05 Ulf Jasper <ulf.jasper@web.de> | ||
| 47 | |||
| 48 | * calendar.texi (iCalendar): New section for a new package. | ||
| 49 | |||
| 50 | 2004-10-05 Karl Berry <karl@gnu.org> | ||
| 51 | |||
| 52 | * info.texi: consistently use --- throughout, periods at end of | ||
| 53 | menu descriptions, and a couple typos. | ||
| 54 | |||
| 55 | 2004-10-05 Luc Teirlinck <teirllm@auburn.edu> | ||
| 56 | |||
| 57 | * text.texi: Various small changes in addition to the following. | ||
| 58 | (Text): Replace xref for autotype with inforef. | ||
| 59 | (Sentences): Explain nil value for `sentence-end'. | ||
| 60 | (Paragraphs): Update default values for `paragraph-start' and | ||
| 61 | `paragraph-separate'. | ||
| 62 | (Text Mode): Correct description of Text mode's effect on the | ||
| 63 | syntax table. | ||
| 64 | (Outline Visibility): `hide-other' does not hide top level headings. | ||
| 65 | `selective-display-ellipses' no longer has an effect on Outline mode. | ||
| 66 | (TeX Misc): Add missing @cindex. | ||
| 67 | Replace xref for RefTeX with inforef. | ||
| 68 | (Requesting Formatted Text): the variable | ||
| 69 | `enriched-fill-after-visiting' no longer exists. | ||
| 70 | (Editing Format Info): Update names of menu items and commands. | ||
| 71 | (Format Faces): Mention special effect of specifying the default face. | ||
| 72 | Describe inheritance of text properties. | ||
| 73 | Correct description of `fixed' face. | ||
| 74 | (Format Indentation): Correct description of effect of setting | ||
| 75 | margins. Mention `set-left-margin' and `set-right-margin'. | ||
| 76 | (Format Justification): Update names of menu items. | ||
| 77 | `set-justification-full' is now bound to `M-j b'. | ||
| 78 | Mention that `default-justification' is a per buffer variable. | ||
| 79 | (Format Properties): Update name of menu item. | ||
| 80 | (Forcing Enriched Mode): `format-decode-buffer' automatically | ||
| 81 | turns on Enriched mode if the buffer is in text/enriched format. | ||
| 82 | |||
| 83 | |||
| 84 | 2004-10-05 Emilio C. Lopes <eclig@gmx.net> | ||
| 85 | |||
| 86 | * calendar.texi (From Other Calendar): Add calendar-goto-iso-week. | ||
| 87 | |||
| 1 | 2004-09-28 Kim F. Storm <storm@cua.dk> | 88 | 2004-09-28 Kim F. Storm <storm@cua.dk> |
| 2 | 89 | ||
| 3 | * display.texi (Display Custom) <indicate-buffer-boundaries>: | 90 | * display.texi (Display Custom) <indicate-buffer-boundaries>: |
| @@ -893,7 +980,7 @@ | |||
| 893 | 980 | ||
| 894 | * misc.texi: Section "Saving Emacs Sessions" rewritten. | 981 | * misc.texi: Section "Saving Emacs Sessions" rewritten. |
| 895 | 982 | ||
| 896 | 2003-09-29 Jan D. <jhd@gaffa.gaia.swipnet.se> | 983 | 2003-09-29 Jan Dj,Ad(Brv. <jan.h.d@swipnet.se> |
| 897 | 984 | ||
| 898 | * xresources.texi (GTK names in Emacs): Correct typo. | 985 | * xresources.texi (GTK names in Emacs): Correct typo. |
| 899 | 986 | ||
diff --git a/man/building.texi b/man/building.texi index 972f88abbde..2ec96b0f6bf 100644 --- a/man/building.texi +++ b/man/building.texi | |||
| @@ -336,11 +336,13 @@ to a particular debugger program. | |||
| 336 | @findex gdb | 336 | @findex gdb |
| 337 | Run GDB as a subprocess of Emacs. If the variable | 337 | Run GDB as a subprocess of Emacs. If the variable |
| 338 | @code{gud-gdb-command-name} is ``gdb --annotate=3'' (the default | 338 | @code{gud-gdb-command-name} is ``gdb --annotate=3'' (the default |
| 339 | value) then GDB starts as for @kbd{M-x gdba} below. If you want to | 339 | value) then GDB starts as for @kbd{M-x gdba} below. If you want GDB |
| 340 | GDB to start as in Emacs 21.3 and earlier then set | 340 | to start as in Emacs 21.3 and earlier then edit the string in the |
| 341 | @code{gud-gdb-command-name} to ``gdb --fullname''. In this case, the | 341 | minibuffer or set @code{gud-gdb-command-name} to ``gdb --fullname''. |
| 342 | command creates a buffer for input and output to GDB, and switches to | 342 | You need to do this if you want to run multiple debugging sessions |
| 343 | it. If a GDB buffer already exists, it just switches to that buffer. | 343 | within one Emacs session. In this case, the command creates a buffer |
| 344 | for input and output to GDB, and switches to it. If a GDB buffer | ||
| 345 | already exists, it just switches to that buffer. | ||
| 344 | 346 | ||
| 345 | @item M-x gdba @key{RET} @var{file} @key{RET} | 347 | @item M-x gdba @key{RET} @var{file} @key{RET} |
| 346 | Run GDB as a subprocess of Emacs, providing a graphical interface | 348 | Run GDB as a subprocess of Emacs, providing a graphical interface |
diff --git a/man/calc.texi b/man/calc.texi index 8c3a3c5f92c..a77ba4eb266 100644 --- a/man/calc.texi +++ b/man/calc.texi | |||
| @@ -10026,19 +10026,17 @@ additional notes from the summary that apply to this command. | |||
| 10026 | @kindex h f | 10026 | @kindex h f |
| 10027 | @pindex calc-describe-function | 10027 | @pindex calc-describe-function |
| 10028 | The @kbd{h f} (@code{calc-describe-function}) command looks up an | 10028 | The @kbd{h f} (@code{calc-describe-function}) command looks up an |
| 10029 | algebraic function or a command name in the Calc manual. The | 10029 | algebraic function or a command name in the Calc manual. Enter an |
| 10030 | prompt initially contains @samp{calcFunc-}; follow this with an | ||
| 10031 | algebraic function name to look up that function in the Function | 10030 | algebraic function name to look up that function in the Function |
| 10032 | Index. Or, backspace and enter a command name beginning with | 10031 | Index or enter a command name beginning with @samp{calc-} to look it |
| 10033 | @samp{calc-} to look it up in the Command Index. This command | 10032 | up in the Command Index. This command will also look up operator |
| 10034 | will also look up operator symbols that can appear in algebraic | 10033 | symbols that can appear in algebraic formulas, like @samp{%} and |
| 10035 | formulas, like @samp{%} and @samp{=>}. | 10034 | @samp{=>}. |
| 10036 | 10035 | ||
| 10037 | @kindex h v | 10036 | @kindex h v |
| 10038 | @pindex calc-describe-variable | 10037 | @pindex calc-describe-variable |
| 10039 | The @kbd{h v} (@code{calc-describe-variable}) command looks up a | 10038 | The @kbd{h v} (@code{calc-describe-variable}) command looks up a |
| 10040 | variable in the Calc manual. The prompt initially contains the | 10039 | variable in the Calc manual. Enter a variable name like @code{pi} or |
| 10041 | @samp{var-} prefix; just add a variable name like @code{pi} or | ||
| 10042 | @code{PlotRejects}. | 10040 | @code{PlotRejects}. |
| 10043 | 10041 | ||
| 10044 | @kindex h b | 10042 | @kindex h b |
| @@ -21981,7 +21979,7 @@ back on. | |||
| 21981 | The most basic default simplification is the evaluation of functions. | 21979 | The most basic default simplification is the evaluation of functions. |
| 21982 | For example, @cite{2 + 3} is evaluated to @cite{5}, and @cite{@t{sqrt}(9)} | 21980 | For example, @cite{2 + 3} is evaluated to @cite{5}, and @cite{@t{sqrt}(9)} |
| 21983 | is evaluated to @cite{3}. Evaluation does not occur if the arguments | 21981 | is evaluated to @cite{3}. Evaluation does not occur if the arguments |
| 21984 | to a function are somehow of the wrong type (@cite{@t{tan}([2,3,4])}, | 21982 | to a function are somehow of the wrong type (@cite{@t{tan}([2,3,4])}), |
| 21985 | range (@cite{@t{tan}(90)}), or number (@cite{@t{tan}(3,5)}), or if the | 21983 | range (@cite{@t{tan}(90)}), or number (@cite{@t{tan}(3,5)}), or if the |
| 21986 | function name is not recognized (@cite{@t{f}(5)}), or if ``symbolic'' | 21984 | function name is not recognized (@cite{@t{f}(5)}), or if ``symbolic'' |
| 21987 | mode (@pxref{Symbolic Mode}) prevents evaluation (@cite{@t{sqrt}(2)}). | 21985 | mode (@pxref{Symbolic Mode}) prevents evaluation (@cite{@t{sqrt}(2)}). |
diff --git a/man/calendar.texi b/man/calendar.texi index 9e3d3cf9f41..45b3ed318b3 100644 --- a/man/calendar.texi +++ b/man/calendar.texi | |||
| @@ -37,6 +37,7 @@ information about the calendar and diary. | |||
| 37 | * Other Calendars:: Converting dates to other calendar systems. | 37 | * Other Calendars:: Converting dates to other calendar systems. |
| 38 | * Diary:: Displaying events from your diary. | 38 | * Diary:: Displaying events from your diary. |
| 39 | * Appointments:: Reminders when it's time to do something. | 39 | * Appointments:: Reminders when it's time to do something. |
| 40 | * iCalendar:: Converting diary events to/from iCalendar format. | ||
| 40 | * Daylight Savings:: How to specify when daylight savings time is active. | 41 | * Daylight Savings:: How to specify when daylight savings time is active. |
| 41 | * Time Intervals:: Keeping track of time intervals. | 42 | * Time Intervals:: Keeping track of time intervals. |
| 42 | @end menu | 43 | @end menu |
| @@ -754,6 +755,7 @@ other than Mayan; for the Mayan calendar, see the following section. | |||
| 754 | 755 | ||
| 755 | @kindex g @var{char} @r{(Calendar mode)} | 756 | @kindex g @var{char} @r{(Calendar mode)} |
| 756 | @findex calendar-goto-iso-date | 757 | @findex calendar-goto-iso-date |
| 758 | @findex calendar-goto-iso-week | ||
| 757 | @findex calendar-goto-julian-date | 759 | @findex calendar-goto-julian-date |
| 758 | @findex calendar-goto-astro-day-number | 760 | @findex calendar-goto-astro-day-number |
| 759 | @findex calendar-goto-hebrew-date | 761 | @findex calendar-goto-hebrew-date |
| @@ -767,6 +769,9 @@ other than Mayan; for the Mayan calendar, see the following section. | |||
| 767 | @item g c | 769 | @item g c |
| 768 | Move to a date specified in the ISO commercial calendar | 770 | Move to a date specified in the ISO commercial calendar |
| 769 | (@code{calendar-goto-iso-date}). | 771 | (@code{calendar-goto-iso-date}). |
| 772 | @item g w | ||
| 773 | Move to a week specified in the ISO commercial calendar | ||
| 774 | (@code{calendar-goto-iso-week}). | ||
| 770 | @item g j | 775 | @item g j |
| 771 | Move to a date specified in the Julian calendar | 776 | Move to a date specified in the Julian calendar |
| 772 | (@code{calendar-goto-julian-date}). | 777 | (@code{calendar-goto-julian-date}). |
| @@ -1379,6 +1384,55 @@ clock. The command @kbd{M-x appt-add} adds entries to the appointment | |||
| 1379 | list without affecting your diary file. You delete entries from the | 1384 | list without affecting your diary file. You delete entries from the |
| 1380 | appointment list with @kbd{M-x appt-delete}. | 1385 | appointment list with @kbd{M-x appt-delete}. |
| 1381 | 1386 | ||
| 1387 | @node iCalendar | ||
| 1388 | @section iCalendar | ||
| 1389 | @cindex iCalendar support | ||
| 1390 | |||
| 1391 | The icalendar package aims at providing an implementation of the | ||
| 1392 | iCalendar standard, as defined in ``RFC 2445 -- Internet Calendaring and | ||
| 1393 | Scheduling Core Object Specification (iCalendar)''. It provides a means | ||
| 1394 | for importing iCalendar (and the earlier vCalendar format) data into | ||
| 1395 | Emacs diary files and vice versa. | ||
| 1396 | |||
| 1397 | Importing works for ``ordinary'' (i.e. non-recurring) events, but (at | ||
| 1398 | present) may not work correctly (if at all) for recurring events. | ||
| 1399 | Exporting of diary files into iCalendar files should work correctly for | ||
| 1400 | most diary entries. Please note that @file{icalendar.el} is work in | ||
| 1401 | progress, so usage may evolve in future. | ||
| 1402 | |||
| 1403 | To activate the package, use @code{(require 'icalendar)}. | ||
| 1404 | |||
| 1405 | @findex icalendar-extract-ical-from-buffer | ||
| 1406 | The command @code{icalendar-extract-ical-from-buffer} extracts | ||
| 1407 | iCalendar data from the current buffer and adds it to your (default) | ||
| 1408 | diary file. This function is also suitable for automatic extraction of | ||
| 1409 | iCalendar data; for example with the Rmail mail client one could use: | ||
| 1410 | |||
| 1411 | @example | ||
| 1412 | (add-hook 'rmail-show-message-hook 'icalendar-extract-ical-from-buffer) | ||
| 1413 | @end example | ||
| 1414 | |||
| 1415 | @findex icalendar-import-file | ||
| 1416 | The command @code{icalendar-import-file} imports an iCalendar file. | ||
| 1417 | @strong{Caution:} the contents of the target diary file are | ||
| 1418 | @emph{deleted} by default! It is highly recommended to use a dedicated | ||
| 1419 | diary file for importing. For example: | ||
| 1420 | |||
| 1421 | @example | ||
| 1422 | (icalendar-import-file "/here/is/calendar.ics" "/there/goes/ical-diary") | ||
| 1423 | @end example | ||
| 1424 | |||
| 1425 | @noindent | ||
| 1426 | You can use an @code{#include} directive to add the import file contents | ||
| 1427 | to the diary. @xref{Fancy Diary Display,,, elisp, The Emacs Lisp | ||
| 1428 | Reference Manual}. | ||
| 1429 | |||
| 1430 | @findex icalendar-convert-diary-to-ical | ||
| 1431 | The command @code{icalendar-convert-diary-to-ical} exports an Emacs | ||
| 1432 | diary file to iCalendar format. @strong{Caution:} the contents of the | ||
| 1433 | target file are @emph{deleted} by default! | ||
| 1434 | |||
| 1435 | |||
| 1382 | @node Daylight Savings | 1436 | @node Daylight Savings |
| 1383 | @section Daylight Savings Time | 1437 | @section Daylight Savings Time |
| 1384 | @cindex daylight savings time | 1438 | @cindex daylight savings time |
diff --git a/man/files.texi b/man/files.texi index b5ebf7cf820..4e36c2ab2fa 100644 --- a/man/files.texi +++ b/man/files.texi | |||
| @@ -2858,7 +2858,7 @@ or @key{DEL} to scroll backward. Various other commands are provided | |||
| 2858 | for moving around in the file, but none for changing it; type @kbd{?} | 2858 | for moving around in the file, but none for changing it; type @kbd{?} |
| 2859 | while viewing for a list of them. They are mostly the same as normal | 2859 | while viewing for a list of them. They are mostly the same as normal |
| 2860 | Emacs cursor motion commands. To exit from viewing, type @kbd{q}. | 2860 | Emacs cursor motion commands. To exit from viewing, type @kbd{q}. |
| 2861 | The commands for viewing are defined by a special major mode called View | 2861 | The commands for viewing are defined by a special minor mode called View |
| 2862 | mode. | 2862 | mode. |
| 2863 | 2863 | ||
| 2864 | A related command, @kbd{M-x view-buffer}, views a buffer already present | 2864 | A related command, @kbd{M-x view-buffer}, views a buffer already present |
diff --git a/man/gnus-faq.texi b/man/gnus-faq.texi index 6f0fddc5562..5d243f8a02e 100644 --- a/man/gnus-faq.texi +++ b/man/gnus-faq.texi | |||
| @@ -1776,11 +1776,14 @@ Answer: | |||
| 1776 | 1776 | ||
| 1777 | 1777 | ||
| 1778 | @example | 1778 | @example |
| 1779 | (defadvice gnus-summary-reply (around reply-in-news activate) | 1779 | (eval-after-load "gnus-msg" |
| 1780 | '(unless (boundp 'gnus-confirm-mail-reply-to-news) | ||
| 1781 | (defadvice gnus-summary-reply (around reply-in-news activate) | ||
| 1782 | "Request confirmation when replying to news." | ||
| 1780 | (interactive) | 1783 | (interactive) |
| 1781 | (when (or (not (gnus-news-group-p gnus-newsgroup-name)) | 1784 | (when (or (not (gnus-news-group-p gnus-newsgroup-name)) |
| 1782 | (y-or-n-p "Really reply? ")) | 1785 | (y-or-n-p "Really reply by mail to article author? ")) |
| 1783 | ad-do-it)) | 1786 | ad-do-it)))) |
| 1784 | @end example | 1787 | @end example |
| 1785 | 1788 | ||
| 1786 | @ifnottex | 1789 | @ifnottex |
diff --git a/man/gnus.texi b/man/gnus.texi index c94845c7a8b..a62e9bcf149 100644 --- a/man/gnus.texi +++ b/man/gnus.texi | |||
| @@ -535,12 +535,9 @@ Marking Articles | |||
| 535 | * Unread Articles:: Marks for unread articles. | 535 | * Unread Articles:: Marks for unread articles. |
| 536 | * Read Articles:: Marks for read articles. | 536 | * Read Articles:: Marks for read articles. |
| 537 | * Other Marks:: Marks that do not affect readedness. | 537 | * Other Marks:: Marks that do not affect readedness. |
| 538 | 538 | * Setting Marks:: How to set and remove marks. | |
| 539 | Marking Articles | 539 | * Generic Marking Commands:: How to customize the marking. |
| 540 | 540 | * Setting Process Marks:: How to mark articles for later processing. | |
| 541 | * Setting Marks:: How to set and remove marks. | ||
| 542 | * Generic Marking Commands:: How to customize the marking. | ||
| 543 | * Setting Process Marks:: How to mark articles for later processing. | ||
| 544 | 541 | ||
| 545 | Threading | 542 | Threading |
| 546 | 543 | ||
| @@ -5686,20 +5683,17 @@ neologism ohoy!) of the article. Alphabetic marks generally mean | |||
| 5686 | 5683 | ||
| 5687 | In addition, you also have marks that do not affect readedness. | 5684 | In addition, you also have marks that do not affect readedness. |
| 5688 | 5685 | ||
| 5689 | @menu | ||
| 5690 | * Unread Articles:: Marks for unread articles. | ||
| 5691 | * Read Articles:: Marks for read articles. | ||
| 5692 | * Other Marks:: Marks that do not affect readedness. | ||
| 5693 | @end menu | ||
| 5694 | |||
| 5695 | @ifinfo | 5686 | @ifinfo |
| 5696 | There's a plethora of commands for manipulating these marks: | 5687 | There's a plethora of commands for manipulating these marks. |
| 5697 | @end ifinfo | 5688 | @end ifinfo |
| 5698 | 5689 | ||
| 5699 | @menu | 5690 | @menu |
| 5700 | * Setting Marks:: How to set and remove marks. | 5691 | * Unread Articles:: Marks for unread articles. |
| 5701 | * Generic Marking Commands:: How to customize the marking. | 5692 | * Read Articles:: Marks for read articles. |
| 5702 | * Setting Process Marks:: How to mark articles for later processing. | 5693 | * Other Marks:: Marks that do not affect readedness. |
| 5694 | * Setting Marks:: How to set and remove marks. | ||
| 5695 | * Generic Marking Commands:: How to customize the marking. | ||
| 5696 | * Setting Process Marks:: How to mark articles for later processing. | ||
| 5703 | @end menu | 5697 | @end menu |
| 5704 | 5698 | ||
| 5705 | 5699 | ||
| @@ -14002,7 +13996,7 @@ Let's look at an example value of this variable first: | |||
| 14002 | ;; @r{the bugs- list, but allow cross-posting when the} | 13996 | ;; @r{the bugs- list, but allow cross-posting when the} |
| 14003 | ;; @r{message was really cross-posted.} | 13997 | ;; @r{message was really cross-posted.} |
| 14004 | (any "bugs-mypackage@@somewhere" "mypkg.bugs") | 13998 | (any "bugs-mypackage@@somewhere" "mypkg.bugs") |
| 14005 | (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list") | 13999 | (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list") |
| 14006 | ;; @r{People@dots{}} | 14000 | ;; @r{People@dots{}} |
| 14007 | (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen")) | 14001 | (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen")) |
| 14008 | ;; @r{Unmatched mail goes to the catch all group.} | 14002 | ;; @r{Unmatched mail goes to the catch all group.} |
diff --git a/man/info.texi b/man/info.texi index 2e42a0b9edc..014e9165087 100644 --- a/man/info.texi +++ b/man/info.texi | |||
| @@ -130,15 +130,15 @@ the screen. | |||
| 130 | @end ifnotinfo | 130 | @end ifnotinfo |
| 131 | 131 | ||
| 132 | @menu | 132 | @menu |
| 133 | * Help-Small-Screen:: Starting Info on a Small Screen | 133 | * Help-Small-Screen:: Starting Info on a Small Screen. |
| 134 | * Help:: How to use Info | 134 | * Help:: How to use Info. |
| 135 | * Help-P:: Returning to the Previous node | 135 | * Help-P:: Returning to the Previous node. |
| 136 | * Help-^L:: The Space, DEL, B and ^L commands. | 136 | * Help-^L:: The Space, DEL, B and ^L commands. |
| 137 | * Help-Inv:: Invisible text in Emacs Info. | 137 | * Help-Inv:: Invisible text in Emacs Info. |
| 138 | * Help-M:: Menus | 138 | * Help-M:: Menus. |
| 139 | * Help-Xref:: Following cross-references | 139 | * Help-Xref:: Following cross-references. |
| 140 | * Help-Int:: Some intermediate Info commands | 140 | * Help-Int:: Some intermediate Info commands. |
| 141 | * Help-Q:: Quitting Info | 141 | * Help-Q:: Quitting Info. |
| 142 | @end menu | 142 | @end menu |
| 143 | 143 | ||
| 144 | @node Help-Small-Screen | 144 | @node Help-Small-Screen |
| @@ -212,8 +212,8 @@ This is line 59 | |||
| 212 | If you have managed to get here, go back to the beginning with | 212 | If you have managed to get here, go back to the beginning with |
| 213 | @kbd{DEL} (or @key{BACKSPACE}), and come back here again, then you | 213 | @kbd{DEL} (or @key{BACKSPACE}), and come back here again, then you |
| 214 | understand the about the @samp{Space} and @samp{Backspace} keys. So | 214 | understand the about the @samp{Space} and @samp{Backspace} keys. So |
| 215 | now type an @kbd{n} ---just one character; don't type the quotes and | 215 | now type an @kbd{n}---just one character; don't type the quotes and |
| 216 | don't type the Return key afterward--- to get to the normal start of | 216 | don't type the Return key afterward---to get to the normal start of |
| 217 | the course. | 217 | the course. |
| 218 | @end ifinfo | 218 | @end ifinfo |
| 219 | 219 | ||
| @@ -243,8 +243,8 @@ well. In Emacs, the header line is duplicated in a special typeface, | |||
| 243 | and the duplicate remains at the top of the window all the time even | 243 | and the duplicate remains at the top of the window all the time even |
| 244 | if you scroll through the node. | 244 | if you scroll through the node. |
| 245 | 245 | ||
| 246 | Besides a @samp{Next}, a node can have a @samp{Previous} or an | 246 | Besides a @samp{Next}, a node can have a @samp{Previous} link, or an |
| 247 | @samp{Up} links, or both. As you can see, this node has all of these | 247 | @samp{Up} link, or both. As you can see, this node has all of these |
| 248 | links. | 248 | links. |
| 249 | 249 | ||
| 250 | @kindex n @r{(Info mode)} | 250 | @kindex n @r{(Info mode)} |
| @@ -375,7 +375,7 @@ scroll beyond the beginning or the end of the current node. | |||
| 375 | 375 | ||
| 376 | @kindex C-l @r{(Info mode)} | 376 | @kindex C-l @r{(Info mode)} |
| 377 | If your screen is ever garbaged, you can tell Info to display it | 377 | If your screen is ever garbaged, you can tell Info to display it |
| 378 | again by typing @kbd{C-l} (@kbd{Control-L}, that is---hold down | 378 | again by typing @kbd{C-l} (@kbd{Control-L}---that is, hold down |
| 379 | @key{CTRL} and type @kbd{L} or @kbd{l}). | 379 | @key{CTRL} and type @kbd{L} or @kbd{l}). |
| 380 | 380 | ||
| 381 | @format | 381 | @format |
| @@ -414,8 +414,8 @@ the list, make it go away by typing a @key{SPC} repeatedly. | |||
| 414 | 414 | ||
| 415 | (If you are using the stand-alone Info reader, type @kbd{C-x 0} to | 415 | (If you are using the stand-alone Info reader, type @kbd{C-x 0} to |
| 416 | return here, that is---press and hold @key{CTRL}, type an @kbd{x}, | 416 | return here, that is---press and hold @key{CTRL}, type an @kbd{x}, |
| 417 | then release @key{CTRL} and @kbd{x}, and press @kbd{0}---a zero, not | 417 | then release @key{CTRL} and @kbd{x}, and press @kbd{0}; that's a zero, |
| 418 | the letter ``o''.) | 418 | not the letter ``o''.) |
| 419 | 419 | ||
| 420 | From now on, you will encounter large nodes without warning, and | 420 | From now on, you will encounter large nodes without warning, and |
| 421 | will be expected to know how to use @key{SPC} and @key{BACKSPACE} to | 421 | will be expected to know how to use @key{SPC} and @key{BACKSPACE} to |
| @@ -971,7 +971,7 @@ the node @samp{Top} in the Info file @file{dir}. Likewise, | |||
| 971 | all of the current file by typing @kbd{g*@key{RET}} or all of any | 971 | all of the current file by typing @kbd{g*@key{RET}} or all of any |
| 972 | other file with @kbd{g(@var{filename})@key{RET}}. | 972 | other file with @kbd{g(@var{filename})@key{RET}}. |
| 973 | 973 | ||
| 974 | @subheading @kbd{1} -- @kbd{9} choose a menu subtopic by its number | 974 | @subheading @kbd{1}--@kbd{9} choose a menu subtopic by its number |
| 975 | 975 | ||
| 976 | @kindex 1 @r{through} 9 @r{(Info mode)} | 976 | @kindex 1 @r{through} 9 @r{(Info mode)} |
| 977 | @findex Info-nth-menu-item | 977 | @findex Info-nth-menu-item |
| @@ -1061,7 +1061,7 @@ you typed @emph{as a substring}. For each match, Info shows in the | |||
| 1061 | echo area the full index entry it found. Often, the text of the full | 1061 | echo area the full index entry it found. Often, the text of the full |
| 1062 | index entry already gives you enough information to decide whether it | 1062 | index entry already gives you enough information to decide whether it |
| 1063 | is relevant to what you are looking for, so we recommend that you read | 1063 | is relevant to what you are looking for, so we recommend that you read |
| 1064 | what Emacs shows in the echo area before looking at the node it | 1064 | what Info shows in the echo area before looking at the node it |
| 1065 | displays. | 1065 | displays. |
| 1066 | 1066 | ||
| 1067 | Since @kbd{i} looks for a substring, you can search for subjects even | 1067 | Since @kbd{i} looks for a substring, you can search for subjects even |
| @@ -1205,7 +1205,7 @@ reads from the terminal. | |||
| 1205 | A menu begins with a line starting with @w{@samp{* Menu:}}. The | 1205 | A menu begins with a line starting with @w{@samp{* Menu:}}. The |
| 1206 | rest of the line is a comment. After the starting line, every line | 1206 | rest of the line is a comment. After the starting line, every line |
| 1207 | that begins with a @samp{* } lists a single topic. The name of the | 1207 | that begins with a @samp{* } lists a single topic. The name of the |
| 1208 | topic--what the user must type at the @kbd{m}'s command prompt to | 1208 | topic---what the user must type at the @kbd{m}'s command prompt to |
| 1209 | select this topic---comes right after the star and space, and is | 1209 | select this topic---comes right after the star and space, and is |
| 1210 | followed by a colon, spaces and tabs, and the name of the node which | 1210 | followed by a colon, spaces and tabs, and the name of the node which |
| 1211 | discusses that topic. The node name, like node names following | 1211 | discusses that topic. The node name, like node names following |
diff --git a/man/msdog.texi b/man/msdog.texi index 157eba28844..dec258ec672 100644 --- a/man/msdog.texi +++ b/man/msdog.texi | |||
| @@ -840,7 +840,7 @@ effect of bringing up the Windows menu, it alters the meaning of | |||
| 840 | subsequent commands. Many users find this frustrating. | 840 | subsequent commands. Many users find this frustrating. |
| 841 | 841 | ||
| 842 | @vindex w32-pass-alt-to-system | 842 | @vindex w32-pass-alt-to-system |
| 843 | You can reenable Windows's default handling of tapping the @key{ALT} key | 843 | You can re-enable Windows' default handling of tapping the @key{ALT} key |
| 844 | by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value. | 844 | by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value. |
| 845 | 845 | ||
| 846 | @ignore | 846 | @ignore |
diff --git a/man/sc.texi b/man/sc.texi index 5e911e2df72..11ae3d139ce 100644 --- a/man/sc.texi +++ b/man/sc.texi | |||
| @@ -1565,7 +1565,7 @@ incorrectly. | |||
| 1565 | @vindex sc-use-only-preference-p | 1565 | @vindex sc-use-only-preference-p |
| 1566 | @vindex use-only-preference-p (sc-) | 1566 | @vindex use-only-preference-p (sc-) |
| 1567 | Also, if the preferred attribution, which you specified in your | 1567 | Also, if the preferred attribution, which you specified in your |
| 1568 | @code{sc-preferred-attribution-alist} variable cannot be found, a | 1568 | @code{sc-preferred-attribution-list} variable cannot be found, a |
| 1569 | secondary method can be employed to find a valid attribution string. The | 1569 | secondary method can be employed to find a valid attribution string. The |
| 1570 | variable @code{sc-use-only-preference-p} controls what happens in this | 1570 | variable @code{sc-use-only-preference-p} controls what happens in this |
| 1571 | case. If the variable's value is non-@code{nil}, then | 1571 | case. If the variable's value is non-@code{nil}, then |
diff --git a/man/search.texi b/man/search.texi index 58265341c29..0f5e871630e 100644 --- a/man/search.texi +++ b/man/search.texi | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | @c This is part of the Emacs manual. | 1 | @c This is part of the Emacs manual. |
| 2 | @c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 2000, 2001 | 2 | @c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 2000, 2001, 2004 |
| 3 | @c Free Software Foundation, Inc. | 3 | @c Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Search, Fixit, Display, Top | 5 | @node Search, Fixit, Display, Top |
| @@ -193,9 +193,11 @@ repeat the search will then search for a string including that | |||
| 193 | character or word. | 193 | character or word. |
| 194 | 194 | ||
| 195 | @kbd{C-y} is similar to @kbd{C-w} but copies all the rest of the | 195 | @kbd{C-y} is similar to @kbd{C-w} but copies all the rest of the |
| 196 | current line into the search string. Both @kbd{C-y} and @kbd{C-w} | 196 | current line into the search string. If point is already at the end |
| 197 | convert the text they copy to lower case if the search is currently | 197 | of a line, it grabs the entire next line. Both @kbd{C-y} and |
| 198 | not case-sensitive; this is so the search remains case-insensitive. | 198 | @kbd{C-w} convert the text they copy to lower case if the search is |
| 199 | currently not case-sensitive; this is so the search remains | ||
| 200 | case-insensitive. | ||
| 199 | 201 | ||
| 200 | @kbd{C-M-w} and @kbd{C-M-y} modify the search string by only one | 202 | @kbd{C-M-w} and @kbd{C-M-y} modify the search string by only one |
| 201 | character at a time: @kbd{C-M-w} deletes the last character from the | 203 | character at a time: @kbd{C-M-w} deletes the last character from the |
| @@ -777,13 +779,13 @@ matches any character that does @emph{not} belong to category | |||
| 777 | The constructs that pertain to words and syntax are controlled by the | 779 | The constructs that pertain to words and syntax are controlled by the |
| 778 | setting of the syntax table (@pxref{Syntax}). | 780 | setting of the syntax table (@pxref{Syntax}). |
| 779 | 781 | ||
| 780 | Here is a complicated regexp, stored in @code{sentence-end} and used | 782 | Here is a complicated regexp. It is a simplified version of the |
| 781 | by Emacs to recognize the end of a sentence together with any | 783 | regexp that Emacs uses, by default, to recognize the end of a sentence |
| 782 | whitespace that follows. We show its Lisp syntax to distinguish the | 784 | together with any whitespace that follows. We show its Lisp syntax to |
| 783 | spaces from the tab characters. In Lisp syntax, the string constant | 785 | distinguish the spaces from the tab characters. In Lisp syntax, the |
| 784 | begins and ends with a double-quote. @samp{\"} stands for a | 786 | string constant begins and ends with a double-quote. @samp{\"} stands |
| 785 | double-quote as part of the regexp, @samp{\\} for a backslash as part | 787 | for a double-quote as part of the regexp, @samp{\\} for a backslash as |
| 786 | of the regexp, @samp{\t} for a tab, and @samp{\n} for a newline. | 788 | part of the regexp, @samp{\t} for a tab, and @samp{\n} for a newline. |
| 787 | 789 | ||
| 788 | @example | 790 | @example |
| 789 | "[.?!][]\"')]*\\($\\| $\\|\t\\| \\)[ \t\n]*" | 791 | "[.?!][]\"')]*\\($\\| $\\|\t\\| \\)[ \t\n]*" |
diff --git a/man/text.texi b/man/text.texi index dbf990a2b57..01405ae525b 100644 --- a/man/text.texi +++ b/man/text.texi | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | @c This is part of the Emacs manual. | 1 | @c This is part of the Emacs manual. |
| 2 | @c Copyright (C) 1985,86,87,93,94,95,97,2000,2001, 2002 | 2 | @c Copyright (C) 1985,86,87,93,94,95,97,2000,2001, 2002, 2004 |
| 3 | @c Free Software Foundation, Inc. | 3 | @c Free Software Foundation, Inc. |
| 4 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 5 | @node Text, Programs, Indentation, Top | 5 | @node Text, Programs, Indentation, Top |
| @@ -55,7 +55,7 @@ Then the formatting appears on the screen in Emacs while you edit. | |||
| 55 | @cindex autotyping | 55 | @cindex autotyping |
| 56 | @cindex automatic typing | 56 | @cindex automatic typing |
| 57 | The ``automatic typing'' features may be useful when writing text. | 57 | The ``automatic typing'' features may be useful when writing text. |
| 58 | @xref{Top,, Autotyping, autotype, Features for Automatic Typing}. | 58 | @inforef{Top,, autotype}. |
| 59 | 59 | ||
| 60 | @menu | 60 | @menu |
| 61 | * Words:: Moving over and killing words. | 61 | * Words:: Moving over and killing words. |
| @@ -215,10 +215,12 @@ followed by the end of a line or two spaces, with any number of | |||
| 215 | A sentence also begins or ends wherever a paragraph begins or ends. | 215 | A sentence also begins or ends wherever a paragraph begins or ends. |
| 216 | 216 | ||
| 217 | @vindex sentence-end | 217 | @vindex sentence-end |
| 218 | The variable @code{sentence-end} controls recognition of the end of a | 218 | The variable @code{sentence-end} controls recognition of the end of |
| 219 | sentence. It is a regexp that matches the last few characters of a | 219 | a sentence. If non-@code{nil}, it is a regexp that matches the last |
| 220 | sentence, together with the whitespace following the sentence. Its | 220 | few characters of a sentence, together with the whitespace following |
| 221 | normal value is | 221 | the sentence. If the value is @code{nil}, the default, then Emacs |
| 222 | computes the regexp according to various criteria. The result is | ||
| 223 | normally similar to the following regexp: | ||
| 222 | 224 | ||
| 223 | @example | 225 | @example |
| 224 | "[.?!][]\"')]*\\($\\| $\\|\t\\| \\)[ \t\n]*" | 226 | "[.?!][]\"')]*\\($\\| $\\|\t\\| \\)[ \t\n]*" |
| @@ -298,9 +300,10 @@ that either starts or separates paragraphs. The value of | |||
| 298 | that separate paragraphs without being part of any paragraph (for | 300 | that separate paragraphs without being part of any paragraph (for |
| 299 | example, blank lines). Lines that start a new paragraph and are | 301 | example, blank lines). Lines that start a new paragraph and are |
| 300 | contained in it must match only @code{paragraph-start}, not | 302 | contained in it must match only @code{paragraph-start}, not |
| 301 | @code{paragraph-separate}. For example, in Fundamental mode, | 303 | @code{paragraph-separate}. Each regular expression must match at the |
| 302 | @code{paragraph-start} is @w{@code{"[ \t\n\f]"}}, and | 304 | left margin. For example, in Fundamental mode, @code{paragraph-start} |
| 303 | @code{paragraph-separate} is @w{@code{"\f\\|[ \t]*$"}}. | 305 | is @w{@code{"\f\\|[ \t]*$"}}, and @code{paragraph-separate} is |
| 306 | @w{@code{"[ \t\f]*$"}}. | ||
| 304 | 307 | ||
| 305 | Normally it is desirable for page boundaries to separate paragraphs. | 308 | Normally it is desirable for page boundaries to separate paragraphs. |
| 306 | The default values of these variables recognize the usual separator for | 309 | The default values of these variables recognize the usual separator for |
| @@ -312,9 +315,9 @@ pages. | |||
| 312 | @cindex pages | 315 | @cindex pages |
| 313 | @cindex formfeed | 316 | @cindex formfeed |
| 314 | Files are often thought of as divided into @dfn{pages} by the | 317 | Files are often thought of as divided into @dfn{pages} by the |
| 315 | @dfn{formfeed} character (@acronym{ASCII} control-L, octal code 014). When you | 318 | @dfn{formfeed} character (@acronym{ASCII} control-L, octal code 014). |
| 316 | print hardcopy for a file, this character forces a page break; thus, | 319 | When you print hardcopy for a file, this character forces a page break; |
| 317 | each page of the file goes on a separate page on paper. Most Emacs | 320 | thus, each page of the file goes on a separate page on paper. Most Emacs |
| 318 | commands treat the page-separator character just like any other | 321 | commands treat the page-separator character just like any other |
| 319 | character: you can insert it with @kbd{C-q C-l}, and delete it with | 322 | character: you can insert it with @kbd{C-q C-l}, and delete it with |
| 320 | @key{DEL}. Thus, you are free to paginate your file or not. However, | 323 | @key{DEL}. Thus, you are free to paginate your file or not. However, |
| @@ -575,7 +578,7 @@ period. Set the variable @code{sentence-end-without-period} to | |||
| 575 | conditions for where line-breaking is allowed. Its value is either | 578 | conditions for where line-breaking is allowed. Its value is either |
| 576 | @code{nil} or a Lisp function; the function is called with no | 579 | @code{nil} or a Lisp function; the function is called with no |
| 577 | arguments, and if it returns a non-@code{nil} value, then point is not | 580 | arguments, and if it returns a non-@code{nil} value, then point is not |
| 578 | a good place to break the line. The standard functions you can use | 581 | a good place to break the line. Two standard functions you can use are |
| 579 | @code{fill-single-word-nobreak-p} (don't break after the first word of | 582 | @code{fill-single-word-nobreak-p} (don't break after the first word of |
| 580 | a sentence or before the last) and @code{fill-french-nobreak-p} (don't | 583 | a sentence or before the last) and @code{fill-french-nobreak-p} (don't |
| 581 | break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}). | 584 | break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}). |
| @@ -606,11 +609,12 @@ a new paragraph. | |||
| 606 | 609 | ||
| 607 | @kindex C-x . | 610 | @kindex C-x . |
| 608 | @findex set-fill-prefix | 611 | @findex set-fill-prefix |
| 609 | To specify a fill prefix, move to a line that starts with the desired | 612 | To specify a fill prefix for the current buffer, move to a line that |
| 610 | prefix, put point at the end of the prefix, and give the command | 613 | starts with the desired prefix, put point at the end of the prefix, |
| 611 | @w{@kbd{C-x .}}@: (@code{set-fill-prefix}). That's a period after the | 614 | and give the command @w{@kbd{C-x .}}@: (@code{set-fill-prefix}). |
| 612 | @kbd{C-x}. To turn off the fill prefix, specify an empty prefix: type | 615 | That's a period after the @kbd{C-x}. To turn off the fill prefix, |
| 613 | @w{@kbd{C-x .}}@: with point at the beginning of a line.@refill | 616 | specify an empty prefix: type @w{@kbd{C-x .}}@: with point at the |
| 617 | beginning of a line.@refill | ||
| 614 | 618 | ||
| 615 | When a fill prefix is in effect, the fill commands remove the fill | 619 | When a fill prefix is in effect, the fill commands remove the fill |
| 616 | prefix from each line before filling and insert it on each line after | 620 | prefix from each line before filling and insert it on each line after |
| @@ -824,14 +828,14 @@ filling determines what indentation to use when filling a paragraph. | |||
| 824 | @kindex TAB @r{(Text mode)} | 828 | @kindex TAB @r{(Text mode)} |
| 825 | Text mode defines @key{TAB} to run @code{indent-relative} | 829 | Text mode defines @key{TAB} to run @code{indent-relative} |
| 826 | (@pxref{Indentation}), so that you can conveniently indent a line like | 830 | (@pxref{Indentation}), so that you can conveniently indent a line like |
| 827 | the previous line. When the previous line is not indented, | 831 | the previous line. |
| 828 | @code{indent-relative} runs @code{tab-to-tab-stop}, which uses Emacs tab | ||
| 829 | stops that you can set (@pxref{Tab Stops}). | ||
| 830 | 832 | ||
| 831 | Text mode turns off the features concerned with comments except when | 833 | Text mode turns off the features concerned with comments except when |
| 832 | you explicitly invoke them. It changes the syntax table so that periods | 834 | you explicitly invoke them. It changes the syntax table so that |
| 833 | are not considered part of a word, while apostrophes, backspaces and | 835 | single-quotes are considered part of words. However, if a word starts |
| 834 | underlines are considered part of words. | 836 | with single-quotes, then these are treated as a prefix for purposes |
| 837 | such as capitalization. That is, @kbd{M-c} will convert | ||
| 838 | @samp{'hello'} into @samp{'Hello'}, as expected. | ||
| 835 | 839 | ||
| 836 | @cindex Paragraph-Indent Text mode | 840 | @cindex Paragraph-Indent Text mode |
| 837 | @cindex mode, Paragraph-Indent Text | 841 | @cindex mode, Paragraph-Indent Text |
| @@ -896,8 +900,8 @@ invisible lines follow). | |||
| 896 | 900 | ||
| 897 | Editing commands that operate on lines, such as @kbd{C-n} and | 901 | Editing commands that operate on lines, such as @kbd{C-n} and |
| 898 | @kbd{C-p}, treat the text of the invisible line as part of the previous | 902 | @kbd{C-p}, treat the text of the invisible line as part of the previous |
| 899 | visible line. Killing an entire visible line, including its terminating | 903 | visible line. Killing the ellipsis at the end of a visible line |
| 900 | newline, really kills all the following invisible lines along with it. | 904 | really kills all the following invisible lines. |
| 901 | 905 | ||
| 902 | Outline minor mode provides the same commands as the major mode, | 906 | Outline minor mode provides the same commands as the major mode, |
| 903 | Outline mode, but you can use it in conjunction with other major modes. | 907 | Outline mode, but you can use it in conjunction with other major modes. |
| @@ -1137,12 +1141,9 @@ except the top @var{n} levels of heading lines. | |||
| 1137 | @findex hide-other | 1141 | @findex hide-other |
| 1138 | @kindex C-c C-o @r{(Outline mode)} | 1142 | @kindex C-c C-o @r{(Outline mode)} |
| 1139 | The command @kbd{C-c C-o} (@code{hide-other}) hides everything except | 1143 | The command @kbd{C-c C-o} (@code{hide-other}) hides everything except |
| 1140 | the heading or body text that point is in, plus its parents (the headers | 1144 | the heading and body text that point is in, plus its parents (the headers |
| 1141 | leading up from there to top level in the outline). | 1145 | leading up from there to top level in the outline) and the top level |
| 1142 | 1146 | headings. | |
| 1143 | You can turn off the use of ellipses at the ends of visible lines by | ||
| 1144 | setting @code{selective-display-ellipses} to @code{nil}. Then there is | ||
| 1145 | no visible indication of the presence of invisible lines. | ||
| 1146 | 1147 | ||
| 1147 | @findex reveal-mode | 1148 | @findex reveal-mode |
| 1148 | When incremental search finds text that is hidden by Outline mode, | 1149 | When incremental search finds text that is hidden by Outline mode, |
| @@ -1180,7 +1181,7 @@ buffers. | |||
| 1180 | nested portion of the outline, while hiding its relatives at higher | 1181 | nested portion of the outline, while hiding its relatives at higher |
| 1181 | levels. | 1182 | levels. |
| 1182 | 1183 | ||
| 1183 | Consider an Outline mode buffer all the text and subheadings under | 1184 | Consider an Outline mode buffer with all the text and subheadings under |
| 1184 | level-1 headings hidden. To look at what is hidden under one of these | 1185 | level-1 headings hidden. To look at what is hidden under one of these |
| 1185 | headings, you could use @kbd{C-c C-e} (@kbd{M-x show-entry}) to expose | 1186 | headings, you could use @kbd{C-c C-e} (@kbd{M-x show-entry}) to expose |
| 1186 | the body, or @kbd{C-c C-i} to expose the child (level-2) headings. | 1187 | the body, or @kbd{C-c C-i} to expose the child (level-2) headings. |
| @@ -1215,8 +1216,8 @@ particular chapter or section of your document. | |||
| 1215 | To unzoom (exit) a fold, use @kbd{C-c C-x} (@kbd{M-x foldout-exit-fold}). | 1216 | To unzoom (exit) a fold, use @kbd{C-c C-x} (@kbd{M-x foldout-exit-fold}). |
| 1216 | This hides all the text and subheadings under the top-level heading and | 1217 | This hides all the text and subheadings under the top-level heading and |
| 1217 | returns you to the previous view of the buffer. Specifying a numeric | 1218 | returns you to the previous view of the buffer. Specifying a numeric |
| 1218 | argument exits that many levels of folds. Specifying a zero argument exits all | 1219 | argument exits that many levels of folds. Specifying a zero argument |
| 1219 | folds. | 1220 | exits all folds. |
| 1220 | 1221 | ||
| 1221 | To cancel the narrowing of a fold without hiding the text and | 1222 | To cancel the narrowing of a fold without hiding the text and |
| 1222 | subheadings, specify a negative argument. For example, @kbd{M--2 C-c | 1223 | subheadings, specify a negative argument. For example, @kbd{M--2 C-c |
| @@ -1633,7 +1634,7 @@ current buffer's file. Generally, you need to do @kbd{C-c C-f} | |||
| 1633 | @findex iso-iso2gtex | 1634 | @findex iso-iso2gtex |
| 1634 | @findex iso-gtex2iso | 1635 | @findex iso-gtex2iso |
| 1635 | @cindex Latin-1 @TeX{} encoding | 1636 | @cindex Latin-1 @TeX{} encoding |
| 1636 | @TeX{} encoding | 1637 | @cindex @TeX{} encoding |
| 1637 | The commands @kbd{M-x iso-iso2tex}, @kbd{M-x iso-tex2iso}, @kbd{M-x | 1638 | The commands @kbd{M-x iso-iso2tex}, @kbd{M-x iso-tex2iso}, @kbd{M-x |
| 1638 | iso-iso2gtex} and @kbd{M-x iso-gtex2iso} can be used to convert | 1639 | iso-iso2gtex} and @kbd{M-x iso-gtex2iso} can be used to convert |
| 1639 | between Latin-1 encoded files and @TeX{}-encoded equivalents. | 1640 | between Latin-1 encoded files and @TeX{}-encoded equivalents. |
| @@ -1659,7 +1660,7 @@ required. This is set up for Czech---customize the group | |||
| 1659 | @cindex references, La@TeX{} | 1660 | @cindex references, La@TeX{} |
| 1660 | @cindex La@TeX{} references | 1661 | @cindex La@TeX{} references |
| 1661 | For managing all kinds of references for La@TeX{}, you can use | 1662 | For managing all kinds of references for La@TeX{}, you can use |
| 1662 | Ref@TeX{}. @xref{Top, , RefTeX, reftex}. | 1663 | Ref@TeX{}. @inforef{Top,, reftex}. |
| 1663 | 1664 | ||
| 1664 | @node HTML Mode | 1665 | @node HTML Mode |
| 1665 | @section SGML, XML, and HTML Modes | 1666 | @section SGML, XML, and HTML Modes |
| @@ -1880,16 +1881,6 @@ into the file. When you visit the file again, Emacs will automatically | |||
| 1880 | recognize the format, reconvert the text, and turn on Enriched mode | 1881 | recognize the format, reconvert the text, and turn on Enriched mode |
| 1881 | again. | 1882 | again. |
| 1882 | 1883 | ||
| 1883 | @vindex enriched-fill-after-visiting | ||
| 1884 | Normally, after visiting a file in text/enriched format, Emacs refills | ||
| 1885 | each paragraph to fit the specified right margin. You can turn off this | ||
| 1886 | refilling, to save time, by setting the variable | ||
| 1887 | @code{enriched-fill-after-visiting} to @code{nil} or to @code{ask}. | ||
| 1888 | |||
| 1889 | However, when visiting a file that was saved from Enriched mode, there | ||
| 1890 | is no need for refilling, because Emacs saves the right margin settings | ||
| 1891 | along with the text. | ||
| 1892 | |||
| 1893 | @vindex enriched-translations | 1884 | @vindex enriched-translations |
| 1894 | You can add annotations for saving additional text properties, which | 1885 | You can add annotations for saving additional text properties, which |
| 1895 | Emacs normally does not save, by adding to @code{enriched-translations}. | 1886 | Emacs normally does not save, by adding to @code{enriched-translations}. |
| @@ -1951,22 +1942,22 @@ commands directly: | |||
| 1951 | @table @code | 1942 | @table @code |
| 1952 | @findex facemenu-remove-face-props | 1943 | @findex facemenu-remove-face-props |
| 1953 | @item Remove Face Properties | 1944 | @item Remove Face Properties |
| 1954 | Delete from the region all the text properties that the Text Properties | 1945 | Delete from the region all face and color text properties |
| 1955 | menu works with (@code{facemenu-remove-face-props}). | 1946 | (@code{facemenu-remove-face-props}). |
| 1956 | 1947 | ||
| 1957 | @findex facemenu-remove-all | 1948 | @findex facemenu-remove-all |
| 1958 | @item Remove All | 1949 | @item Remove Text Properties |
| 1959 | Delete @emph{all} text properties from the region | 1950 | Delete @emph{all} text properties from the region |
| 1960 | (@code{facemenu-remove-all}). | 1951 | (@code{facemenu-remove-all}). |
| 1961 | 1952 | ||
| 1962 | @findex describe-text-at | 1953 | @findex describe-text-properties |
| 1963 | @cindex text properties of characters | 1954 | @cindex text properties of characters |
| 1964 | @cindex overlays at character position | 1955 | @cindex overlays at character position |
| 1965 | @cindex widgets at buffer position | 1956 | @cindex widgets at buffer position |
| 1966 | @cindex buttons at buffer position | 1957 | @cindex buttons at buffer position |
| 1967 | @item Describe Text | 1958 | @item Describe Properties |
| 1968 | List all the text properties, widgets, buttons, and overlays of the | 1959 | List all the text properties, widgets, buttons, and overlays of the |
| 1969 | character following point (@code{describe-text-at}). | 1960 | character following point (@code{describe-text-properties}). |
| 1970 | 1961 | ||
| 1971 | @item Display Faces | 1962 | @item Display Faces |
| 1972 | Display a list of all the defined faces (@code{list-faces-display}). | 1963 | Display a list of all the defined faces (@code{list-faces-display}). |
| @@ -2018,8 +2009,20 @@ Set the region, or the next inserted character, to the face @var{face} | |||
| 2018 | 2009 | ||
| 2019 | If you use these commands with a prefix argument---or, in Transient Mark | 2010 | If you use these commands with a prefix argument---or, in Transient Mark |
| 2020 | mode, if the region is not active---then these commands specify a face | 2011 | mode, if the region is not active---then these commands specify a face |
| 2021 | to use for your next self-inserting input. @xref{Transient Mark}. This | 2012 | to use for any immediately following self-inserting input. |
| 2022 | applies to both the keyboard commands and the menu commands. | 2013 | @xref{Transient Mark}. This applies to both the keyboard commands and |
| 2014 | the menu commands. | ||
| 2015 | |||
| 2016 | Specifying the @code{default} face also resets foreground and | ||
| 2017 | background color to their defaults.(@pxref{Format Colors}). | ||
| 2018 | |||
| 2019 | Any self-inserting character you type inherits, by default, the face | ||
| 2020 | properties (as well as most other text properties) of the preceding | ||
| 2021 | character. Specifying any face property, including foreground or | ||
| 2022 | background color, for your next self-inserting character will prevent | ||
| 2023 | it from inheriting any face properties from the preceding character, | ||
| 2024 | although it will still inherit other text properties. Characters | ||
| 2025 | inserted by yanking do not inherit text properties. | ||
| 2023 | 2026 | ||
| 2024 | Enriched mode defines two additional faces: @code{excerpt} and | 2027 | Enriched mode defines two additional faces: @code{excerpt} and |
| 2025 | @code{fixed}. These correspond to codes used in the text/enriched file | 2028 | @code{fixed}. These correspond to codes used in the text/enriched file |
| @@ -2029,20 +2032,17 @@ format. | |||
| 2029 | same as @code{italic} unless you customize it (@pxref{Face Customization}). | 2032 | same as @code{italic} unless you customize it (@pxref{Face Customization}). |
| 2030 | 2033 | ||
| 2031 | The @code{fixed} face means, ``Use a fixed-width font for this part | 2034 | The @code{fixed} face means, ``Use a fixed-width font for this part |
| 2032 | of the text.'' This makes a visible difference only if you have | 2035 | of the text.'' Applying the @code{fixed} face to a part of the text |
| 2033 | specified a variable-width font in the default face; however, even if | 2036 | will cause that part of the text to appear in a fixed-width font, even |
| 2034 | the default font is fixed-width, applying the @code{fixed} face to a | 2037 | if the default font is variable-width. This applies to Emacs and to |
| 2035 | part of the text will cause that part of the text to appear in a | 2038 | other systems that display text/enriched format. So if you |
| 2036 | fixed-width font, if the file is ever displayed with a variable-width | 2039 | specifically want a certain part of the text to use a fixed-width |
| 2037 | default font. This applies to Emacs and to other systems that display | 2040 | font, you should specify the @code{fixed} face for that part. |
| 2038 | text/enriched format. So if you specifically want a certain part of | 2041 | |
| 2039 | the text to use a fixed-width font, you should specify the | 2042 | By default, the @code{fixed} face looks the same as @code{bold}. |
| 2040 | @code{fixed} face for that part. | 2043 | This is an attempt to distinguish it from @code{default}. You may |
| 2041 | 2044 | wish to customize @code{fixed} to some other fixed-width medium font. | |
| 2042 | The @code{fixed} face is normally set up to use a different font | 2045 | @xref{Face Customization}. |
| 2043 | from the default, even if the default face is also fixed-width. | ||
| 2044 | Different systems have different fonts installed, so you may need to | ||
| 2045 | customize this. @xref{Face Customization}. | ||
| 2046 | 2046 | ||
| 2047 | If your terminal cannot display different faces, you will not be | 2047 | If your terminal cannot display different faces, you will not be |
| 2048 | able to see them, but you can still edit documents containing faces, | 2048 | able to see them, but you can still edit documents containing faces, |
| @@ -2058,20 +2058,20 @@ text. There is a menu for specifying the foreground color and a menu | |||
| 2058 | for specifying the background color. Each color menu lists all the | 2058 | for specifying the background color. Each color menu lists all the |
| 2059 | colors that you have used in Enriched mode in the current Emacs session. | 2059 | colors that you have used in Enriched mode in the current Emacs session. |
| 2060 | 2060 | ||
| 2061 | If you specify a color with a prefix argument---or, in Transient Mark | 2061 | If you specify a color with a prefix argument---or, in Transient |
| 2062 | mode, if the region is not active---then it applies to your next | 2062 | Mark mode, if the region is not active---then it applies to any |
| 2063 | self-inserting input. @xref{Transient Mark}. Otherwise, the command | 2063 | immediately following self-inserting input. @xref{Transient Mark}. |
| 2064 | applies to the region. | 2064 | Otherwise, the command applies to the region. |
| 2065 | 2065 | ||
| 2066 | Each color menu contains one additional item: @samp{Other}. You can use | 2066 | Each color menu contains one additional item: @samp{Other}. You can use |
| 2067 | this item to specify a color that is not listed in the menu; it reads | 2067 | this item to specify a color that is not listed in the menu; it reads |
| 2068 | the color name with the minibuffer. To display list of available colors | 2068 | the color name with the minibuffer. To display a list of available colors |
| 2069 | and their names, use the @samp{Display Colors} menu item in the Text | 2069 | and their names, use the @samp{Display Colors} menu item in the Text |
| 2070 | Properties menu (@pxref{Editing Format Info}). | 2070 | Properties menu (@pxref{Editing Format Info}). |
| 2071 | 2071 | ||
| 2072 | Any color that you specify in this way, or that is mentioned in a | 2072 | Any color that you specify in this way, or that is mentioned in a |
| 2073 | formatted text file that you read in, is added to both color menus for | 2073 | formatted text file that you read in, is added to the corresponding |
| 2074 | the duration of the Emacs session. | 2074 | color menu for the duration of the Emacs session. |
| 2075 | 2075 | ||
| 2076 | @findex facemenu-set-foreground | 2076 | @findex facemenu-set-foreground |
| 2077 | @findex facemenu-set-background | 2077 | @findex facemenu-set-background |
| @@ -2113,33 +2113,42 @@ Remove 4 columns of indentation from the right margin. | |||
| 2113 | You can use these commands repeatedly to increase or decrease the | 2113 | You can use these commands repeatedly to increase or decrease the |
| 2114 | indentation. | 2114 | indentation. |
| 2115 | 2115 | ||
| 2116 | The most common way to use these commands is to change the indentation | 2116 | The most common way to use them is to change the indentation of an |
| 2117 | of an entire paragraph. However, that is not the only use. You can | 2117 | entire paragraph. For other uses, the effects of refilling can be |
| 2118 | change the margins at any point; the new values take effect at the end | 2118 | hard to predict, except in some special cases like the one described |
| 2119 | of the line (for right margins) or the beginning of the next line (for | 2119 | next. |
| 2120 | left margins). | ||
| 2121 | 2120 | ||
| 2122 | This makes it possible to format paragraphs with @dfn{hanging indents}, | 2121 | The most common other use is to format paragraphs with @dfn{hanging |
| 2123 | which means that the first line is indented less than subsequent lines. | 2122 | indents}, which means that the first line is indented less than |
| 2124 | To set up a hanging indent, increase the indentation of the region | 2123 | subsequent lines. To set up a hanging indent, increase the |
| 2125 | starting after the first word of the paragraph and running until the end | 2124 | indentation of the region starting after the first word of the |
| 2126 | of the paragraph. | 2125 | paragraph and running until the end of the paragraph. |
| 2127 | 2126 | ||
| 2128 | Indenting the first line of a paragraph is easier. Set the margin for | 2127 | Indenting the first line of a paragraph is easier. Set the margin for |
| 2129 | the whole paragraph where you want it to be for the body of the | 2128 | the whole paragraph where you want it to be for the body of the |
| 2130 | paragraph, then indent the first line by inserting extra spaces or tabs. | 2129 | paragraph, then indent the first line by inserting extra spaces or tabs. |
| 2131 | 2130 | ||
| 2132 | Sometimes, as a result of editing, the filling of a paragraph becomes | ||
| 2133 | messed up---parts of the paragraph may extend past the left or right | ||
| 2134 | margins. When this happens, use @kbd{M-q} (@code{fill-paragraph}) to | ||
| 2135 | refill the paragraph. | ||
| 2136 | |||
| 2137 | @vindex standard-indent | 2131 | @vindex standard-indent |
| 2138 | The variable @code{standard-indent} specifies how many columns these | 2132 | The variable @code{standard-indent} specifies how many columns these |
| 2139 | commands should add to or subtract from the indentation. The default | 2133 | commands should add to or subtract from the indentation. The default |
| 2140 | value is 4. The overall default right margin for Enriched mode is | 2134 | value is 4. The overall default right margin for Enriched mode is |
| 2141 | controlled by the variable @code{fill-column}, as usual. | 2135 | controlled by the variable @code{fill-column}, as usual. |
| 2142 | 2136 | ||
| 2137 | @kindex C-c [ @r{(Enriched mode)} | ||
| 2138 | @kindex C-c ] @r{(Enriched mode)} | ||
| 2139 | @findex set-left-margin | ||
| 2140 | @findex set-right-margin | ||
| 2141 | There are also two commands for setting the left or right margin of | ||
| 2142 | the region absolutely: @code{set-left-margin} and | ||
| 2143 | @code{set-right-margin}. Enriched mode binds these commands to | ||
| 2144 | @kbd{C-c [} and @kbd{C-c ]}, respectively. You can specify the | ||
| 2145 | margin width either with a numeric argument or in the minibuffer. | ||
| 2146 | |||
| 2147 | Sometimes, as a result of editing, the filling of a paragraph becomes | ||
| 2148 | messed up---parts of the paragraph may extend past the left or right | ||
| 2149 | margins. When this happens, use @kbd{M-q} (@code{fill-paragraph}) to | ||
| 2150 | refill the paragraph. | ||
| 2151 | |||
| 2143 | The fill prefix, if any, works in addition to the specified paragraph | 2152 | The fill prefix, if any, works in addition to the specified paragraph |
| 2144 | indentation: @kbd{C-x .} does not include the specified indentation's | 2153 | indentation: @kbd{C-x .} does not include the specified indentation's |
| 2145 | whitespace in the new value for the fill prefix, and the fill commands | 2154 | whitespace in the new value for the fill prefix, and the fill commands |
| @@ -2157,11 +2166,11 @@ affects the Emacs fill commands. | |||
| 2157 | the style. The submenu contains five items: | 2166 | the style. The submenu contains five items: |
| 2158 | 2167 | ||
| 2159 | @table @code | 2168 | @table @code |
| 2160 | @item Flush Left | 2169 | @item Left |
| 2161 | This is the most common style of justification (at least for English). | 2170 | This is the most common style of justification (at least for English). |
| 2162 | Lines are aligned at the left margin but left uneven at the right. | 2171 | Lines are aligned at the left margin but left uneven at the right. |
| 2163 | 2172 | ||
| 2164 | @item Flush Right | 2173 | @item Right |
| 2165 | This aligns each line with the right margin. Spaces and tabs are added | 2174 | This aligns each line with the right margin. Spaces and tabs are added |
| 2166 | on the left, if necessary, to make lines line up on the right. | 2175 | on the left, if necessary, to make lines line up on the right. |
| 2167 | 2176 | ||
| @@ -2175,7 +2184,7 @@ the width of spaces in a line to achieve elegant justification. | |||
| 2175 | @item Center | 2184 | @item Center |
| 2176 | This centers every line between the current margins. | 2185 | This centers every line between the current margins. |
| 2177 | 2186 | ||
| 2178 | @item None | 2187 | @item Unfilled |
| 2179 | This turns off filling entirely. Each line will remain as you wrote it; | 2188 | This turns off filling entirely. Each line will remain as you wrote it; |
| 2180 | the fill and auto-fill functions will have no effect on text which has | 2189 | the fill and auto-fill functions will have no effect on text which has |
| 2181 | this setting. You can, however, still indent the left margin. In | 2190 | this setting. You can, however, still indent the left margin. In |
| @@ -2195,9 +2204,9 @@ Make the region left-filled (@code{set-justification-left}). | |||
| 2195 | @findex set-justification-right | 2204 | @findex set-justification-right |
| 2196 | @item M-j r | 2205 | @item M-j r |
| 2197 | Make the region right-filled (@code{set-justification-right}). | 2206 | Make the region right-filled (@code{set-justification-right}). |
| 2198 | @kindex M-j f @r{(Enriched mode)} | 2207 | @kindex M-j b @r{(Enriched mode)} |
| 2199 | @findex set-justification-full | 2208 | @findex set-justification-full |
| 2200 | @item M-j f | 2209 | @item M-j b |
| 2201 | Make the region fully justified (@code{set-justification-full}). | 2210 | Make the region fully justified (@code{set-justification-full}). |
| 2202 | @kindex M-j c @r{(Enriched mode)} | 2211 | @kindex M-j c @r{(Enriched mode)} |
| 2203 | @kindex M-S @r{(Enriched mode)} | 2212 | @kindex M-S @r{(Enriched mode)} |
| @@ -2220,11 +2229,15 @@ region. | |||
| 2220 | The default justification style is specified by the variable | 2229 | The default justification style is specified by the variable |
| 2221 | @code{default-justification}. Its value should be one of the symbols | 2230 | @code{default-justification}. Its value should be one of the symbols |
| 2222 | @code{left}, @code{right}, @code{full}, @code{center}, or @code{none}. | 2231 | @code{left}, @code{right}, @code{full}, @code{center}, or @code{none}. |
| 2232 | This is a per-buffer variable. Setting the variable directly affects | ||
| 2233 | only the current buffer. However, customizing it in a Custom buffer | ||
| 2234 | sets (as always) the default value for buffers that do not override it. | ||
| 2235 | @xref{Locals}, and @ref{Easy Customization}. | ||
| 2223 | 2236 | ||
| 2224 | @node Format Properties | 2237 | @node Format Properties |
| 2225 | @subsection Setting Other Text Properties | 2238 | @subsection Setting Other Text Properties |
| 2226 | 2239 | ||
| 2227 | The Other Properties menu lets you add or remove three other useful text | 2240 | The Special Properties menu lets you add or remove three other useful text |
| 2228 | properties: @code{read-only}, @code{invisible} and @code{intangible}. | 2241 | properties: @code{read-only}, @code{invisible} and @code{intangible}. |
| 2229 | The @code{intangible} property disallows moving point within the text, | 2242 | The @code{intangible} property disallows moving point within the text, |
| 2230 | the @code{invisible} text property hides text from display, and the | 2243 | the @code{invisible} text property hides text from display, and the |
| @@ -2253,10 +2266,10 @@ When you visit a file that was created with some other editor, Emacs may | |||
| 2253 | not recognize the file as being in the text/enriched format. In this | 2266 | not recognize the file as being in the text/enriched format. In this |
| 2254 | case, when you visit the file you will see the formatting commands | 2267 | case, when you visit the file you will see the formatting commands |
| 2255 | rather than the formatted text. Type @kbd{M-x format-decode-buffer} to | 2268 | rather than the formatted text. Type @kbd{M-x format-decode-buffer} to |
| 2256 | translate it. | 2269 | translate it. This also automatically turns on Enriched mode. |
| 2257 | 2270 | ||
| 2258 | @item | 2271 | @item |
| 2259 | When you @emph{insert} a file into a buffer, rather than visiting it. | 2272 | When you @emph{insert} a file into a buffer, rather than visiting it, |
| 2260 | Emacs does the necessary conversions on the text which you insert, but | 2273 | Emacs does the necessary conversions on the text which you insert, but |
| 2261 | it does not enable Enriched mode. If you wish to do that, type @kbd{M-x | 2274 | it does not enable Enriched mode. If you wish to do that, type @kbd{M-x |
| 2262 | enriched-mode}. | 2275 | enriched-mode}. |
| @@ -2268,7 +2281,7 @@ to translate from; however, normally you can type just @key{RET}, which | |||
| 2268 | tells Emacs to guess the format. | 2281 | tells Emacs to guess the format. |
| 2269 | 2282 | ||
| 2270 | @findex format-find-file | 2283 | @findex format-find-file |
| 2271 | If you wish to look at text/enriched file in its raw form, as a | 2284 | If you wish to look at a text/enriched file in its raw form, as a |
| 2272 | sequence of characters rather than as formatted text, use the @kbd{M-x | 2285 | sequence of characters rather than as formatted text, use the @kbd{M-x |
| 2273 | find-file-literally} command. This visits a file, like | 2286 | find-file-literally} command. This visits a file, like |
| 2274 | @code{find-file}, but does not do format conversion. It also inhibits | 2287 | @code{find-file}, but does not do format conversion. It also inhibits |
diff --git a/man/tramp.texi b/man/tramp.texi index ebba03d6260..e8577af4982 100644 --- a/man/tramp.texi +++ b/man/tramp.texi | |||
| @@ -1952,9 +1952,12 @@ There is some informations on @value{tramp} on NT at the following URL; | |||
| 1952 | many thanks to Joe Stoy for providing the information: | 1952 | many thanks to Joe Stoy for providing the information: |
| 1953 | @uref{ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/} | 1953 | @uref{ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/} |
| 1954 | 1954 | ||
| 1955 | @c The link is broken. I've contacted Tom for clarification. Michael. | ||
| 1956 | @ignore | ||
| 1955 | The above mostly contains patches to old ssh versions; Tom Roche has a | 1957 | The above mostly contains patches to old ssh versions; Tom Roche has a |
| 1956 | Web page with instructions: | 1958 | Web page with instructions: |
| 1957 | @uref{http://www4.ncsu.edu/~tlroche/plinkTramp.html} | 1959 | @uref{http://www4.ncsu.edu/~tlroche/plinkTramp.html} |
| 1960 | @end ignore | ||
| 1958 | 1961 | ||
| 1959 | ??? Is the XEmacs info correct? | 1962 | ??? Is the XEmacs info correct? |
| 1960 | 1963 | ||
diff --git a/man/trampver.texi b/man/trampver.texi index a5cc874b3fb..743b49388f7 100644 --- a/man/trampver.texi +++ b/man/trampver.texi | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | @c In the Tramp CVS, the version number is auto-frobbed from | 4 | @c In the Tramp CVS, the version number is auto-frobbed from |
| 5 | @c configure.ac, so you should edit that file and run | 5 | @c configure.ac, so you should edit that file and run |
| 6 | @c "autoconf && ./configure" to change the version number. | 6 | @c "autoconf && ./configure" to change the version number. |
| 7 | @set trampver 2.0.44 | 7 | @set trampver 2.0.45 |
| 8 | 8 | ||
| 9 | @c Other flags from configuration | 9 | @c Other flags from configuration |
| 10 | @set prefix /usr/local | 10 | @set prefix /usr/local |
diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 1722153dc51..e906a8f4954 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-10-06 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * sed1v2.inp (LC_ALL=C): Fix src/Makefile breakage caused by | ||
| 4 | recent (2004-09-24) changes in src/Makefile.in. | ||
| 5 | |||
| 1 | 2004-08-14 Eli Zaretskii <eliz@gnu.org> | 6 | 2004-08-14 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * sedleim.inp: Remove the lines which say "<TAB>@true", to avoid | 8 | * sedleim.inp: Remove the lines which say "<TAB>@true", to avoid |
diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index dc316819a5d..8edc1616f23 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp | |||
| @@ -20,9 +20,9 @@ s/^#.*// | |||
| 20 | s/^[ \f\t][ \f\t]*$// | 20 | s/^[ \f\t][ \f\t]*$// |
| 21 | s/^ / / | 21 | s/^ / / |
| 22 | s/\.h\.in/.h-in/ | 22 | s/\.h\.in/.h-in/ |
| 23 | /^ LC_ALL=C \.\/temacs/i\ | 23 | /^ LC_ALL=C \$(RUN_TEMACS)/i\ |
| 24 | stubedit temacs.exe minstack=100k | 24 | stubedit temacs.exe minstack=100k |
| 25 | /^ LC_ALL=C.*temacs/s/LC_ALL=C/set &;/ | 25 | /^ LC_ALL=C.*\$(RUN_TEMACS)/s/LC_ALL=C/set &;/ |
| 26 | /^MAKE *=/s/^/# / | 26 | /^MAKE *=/s/^/# / |
| 27 | /^SHELL *=/s/^/# / | 27 | /^SHELL *=/s/^/# / |
| 28 | /^srcdir *=/s/@[^@\n]*@/./ | 28 | /^srcdir *=/s/@[^@\n]*@/./ |
diff --git a/nt/ChangeLog b/nt/ChangeLog index 77c8305b0e5..f91c59a85c5 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -77,7 +77,7 @@ | |||
| 77 | 77 | ||
| 78 | * multi-install-info.bat: New file. | 78 | * multi-install-info.bat: New file. |
| 79 | 79 | ||
| 80 | 2003-06-27 Jan D. <jan.h.d@swipnet.se> | 80 | 2003-06-27 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 81 | 81 | ||
| 82 | * config.nt (my_strftime): New define. | 82 | * config.nt (my_strftime): New define. |
| 83 | 83 | ||
diff --git a/src/.gdbinit b/src/.gdbinit index 943481d419e..adf2ccbf5f1 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -60,6 +60,16 @@ Print the emacs s-expression which is $. | |||
| 60 | Works only when an inferior emacs is executing. | 60 | Works only when an inferior emacs is executing. |
| 61 | end | 61 | end |
| 62 | 62 | ||
| 63 | # Print out s-expressions | ||
| 64 | define pp | ||
| 65 | set $tmp = $arg0 | ||
| 66 | set debug_print ($tmp) | ||
| 67 | end | ||
| 68 | document pp | ||
| 69 | Print the argument as an emacs s-expression | ||
| 70 | Works only when an inferior emacs is executing. | ||
| 71 | end | ||
| 72 | |||
| 63 | define xtype | 73 | define xtype |
| 64 | xgettype $ | 74 | xgettype $ |
| 65 | output $type | 75 | output $type |
| @@ -452,6 +462,16 @@ document xreload | |||
| 452 | end | 462 | end |
| 453 | xreload | 463 | xreload |
| 454 | 464 | ||
| 465 | # Flush display (X only) | ||
| 466 | define ff | ||
| 467 | set x_flush (0) | ||
| 468 | end | ||
| 469 | document ff | ||
| 470 | Flush pending X window display updates to screen. | ||
| 471 | Works only when an inferior emacs is executing. | ||
| 472 | end | ||
| 473 | |||
| 474 | |||
| 455 | define hook-run | 475 | define hook-run |
| 456 | xreload | 476 | xreload |
| 457 | end | 477 | end |
diff --git a/src/ChangeLog b/src/ChangeLog index e58ddb74284..9fedb52f42c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,157 @@ | |||
| 1 | 2004-10-14 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * xterm.h: Include Xutil.h after keysym.h to work around bug | ||
| 4 | (incorrectly recognising AltGr key) in some X versions. | ||
| 5 | |||
| 6 | 2004-10-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 7 | |||
| 8 | * keymap.c (get_keymap): An autoload form is not a keymap. | ||
| 9 | |||
| 10 | * textprop.c (syms_of_textprop): Make `syntax-table' nonsticky. | ||
| 11 | |||
| 12 | 2004-10-13 Kim F. Storm <storm@cua.dk> | ||
| 13 | |||
| 14 | * callproc.c (Fcall_process): Simplify handling of display arg. | ||
| 15 | Resume `display_on_the_fly' once a coding system is determined. | ||
| 16 | |||
| 17 | * xdisp.c (redisplay_preserve_echo_area): Fix last change. | ||
| 18 | |||
| 19 | 2004-10-12 Kim F. Storm <storm@cua.dk> | ||
| 20 | |||
| 21 | * xdisp.c (redisplay_preserve_echo_area): Flush display in case | ||
| 22 | caller, such as call-process, is not going to poll for input. | ||
| 23 | (calc_line_height_property): Handle case where it->object is nil. | ||
| 24 | |||
| 25 | * xterm.c (x_redisplay_interface): Fix flush_display_optional. | ||
| 26 | |||
| 27 | 2004-10-12 Kenichi Handa <handa@m17n.org> | ||
| 28 | |||
| 29 | * xdisp.c (get_next_display_element): | ||
| 30 | If unibyte_display_via_language_environment is zero, display 8-bit | ||
| 31 | chars in octal in unibyte buffer. | ||
| 32 | |||
| 33 | 2004-10-12 Kim F. Storm <storm@cua.dk> | ||
| 34 | |||
| 35 | * doc.c (Fsubstitute_command_keys): Ignore remappings unless there | ||
| 36 | are no ordinary bindings. | ||
| 37 | |||
| 38 | 2004-10-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 39 | |||
| 40 | * xfns.c (syms_of_xfns): Defsubr x-file-dialog for GTK also. | ||
| 41 | |||
| 42 | 2004-10-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 43 | |||
| 44 | * macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow. | ||
| 45 | (x_lower_frame): Add BLOCK_INPUT around SendBehind. | ||
| 46 | (make_mac_frame): Add BLOCK_INPUT around the making of a | ||
| 47 | terminal frame. | ||
| 48 | (mac_initialize): Add BLOCK_INPUT around carbon initialization. | ||
| 49 | * macgui.h (mktime): Use emacs_mktime. | ||
| 50 | * macfns.c (Fx_file_dialog): Add BLOCK_INPUT around more code. | ||
| 51 | Make a cancel file-open dialog be like C-g. | ||
| 52 | * mac.c (mktime): Use emacs_mktime. | ||
| 53 | (Fdo_applescript): Add BLOCK_INPUT around do_applescript. | ||
| 54 | (Fmac_paste_function): Add better error handling for carbon cut/paste. | ||
| 55 | |||
| 56 | 2004-10-10 Kim F. Storm <storm@cua.dk> | ||
| 57 | |||
| 58 | * keyboard.c (timer_resume_idle): New function to resume idle | ||
| 59 | timer without resetting timers on the idle list. | ||
| 60 | (read_char): Use timer_resume_idle. Remove local var last_idle_start. | ||
| 61 | (timer_start_idle, timer_stop_idle): Declare static. | ||
| 62 | (read_key_sequence): Use timer_resume_idle instead of timer_start_idle. | ||
| 63 | |||
| 64 | * keyboard.h (timer_start_idle, timer_stop_idle): Remove prototypes. | ||
| 65 | |||
| 66 | 2004-10-08 Steven Tamm <steventamm@mac.com> | ||
| 67 | |||
| 68 | * config.in (HAVE_MALLOC_MALLOC_H): Regenerate. | ||
| 69 | * macterm.c (mac_check_for_quit_char): Remove warning for using | ||
| 70 | NULL where 0 should be used. | ||
| 71 | * unexmacosx.c: Use malloc/malloc.h on Tiger instead of | ||
| 72 | objc/malloc.h | ||
| 73 | * mac.c: Include time.h for Tiger compatibility. | ||
| 74 | |||
| 75 | 2004-10-07 Kim F. Storm <storm@cua.dk> | ||
| 76 | |||
| 77 | * xdisp.c (redisplay_window): Fix flicker on vertical line between | ||
| 78 | windows. Update vertical line after drawing window fringes, but | ||
| 79 | only if actually drawing any bitmaps--or there is no fringe. | ||
| 80 | |||
| 81 | * xterm.c (x_update_window_end): Likewise. | ||
| 82 | * macterm.c (x_update_window_end): Likewise. | ||
| 83 | * w32term.c (x_update_window_end): Likewise. | ||
| 84 | |||
| 85 | * fringe.c (draw_window_fringes): Return value now indicates if | ||
| 86 | any fringe bitmaps were redrawn (or there are no fringes). | ||
| 87 | |||
| 88 | * dispextern.h (draw_window_fringes): Update prototype. | ||
| 89 | |||
| 90 | 2004-10-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 91 | |||
| 92 | * macfns.c (mac_get_window_bounds): Add extern. | ||
| 93 | (x_real_positions): Use mac_get_window_bounds. | ||
| 94 | |||
| 95 | * macmenu.c (update_submenu_strings): Apply 2004-09-07 change for | ||
| 96 | xmenu.c (YAILOM). | ||
| 97 | |||
| 98 | * macterm.c [!MAC_OSX]: Include Windows.h. | ||
| 99 | (front_emacs_window): Rename from mac_front_window. All uses | ||
| 100 | changed. Return the frontmost non-tooltip emacs window. | ||
| 101 | (mac_get_window_bounds): New function. | ||
| 102 | (x_calc_absolute_position): Use the difference of width and height | ||
| 103 | between the inner and outer window. | ||
| 104 | (x_set_offset): Specify window position by the coordinae of the | ||
| 105 | outer window. Adjust the position if the title bar is completely | ||
| 106 | outside the screen. | ||
| 107 | (app_is_suspended, app_sleep_time): Remove unused variables. | ||
| 108 | (do_app_resume, do_app_suspend): Remove their contents because | ||
| 109 | window-activate/deactivate events will do the job. | ||
| 110 | (do_zoom_window): Remove unused variables. Make compliant to the | ||
| 111 | standard way of zooming. Set f->left_pos and f->top_pos. | ||
| 112 | (XTread_socket): Don't use argument `expected'. Don't use | ||
| 113 | FrontWindow to determine the clicked window. Exclude unprocessed | ||
| 114 | mouseUp cases in the early stage. Add parentheses to fix operator | ||
| 115 | precedence. | ||
| 116 | (XTread_socket) [TARGET_API_MAC_CARBON]: Don't specify drag area. | ||
| 117 | |||
| 118 | |||
| 119 | 2004-10-05 Jan Dj,Ad(Brv. <jan.h.d@swipnet.se> | ||
| 120 | |||
| 121 | * config.in: Regenerate. | ||
| 122 | |||
| 123 | * Makefile.in (RUN_TEMACS): Check HAVE_RANDOM_HEAPSTART instead of | ||
| 124 | HAVE_EXECSHIELD. | ||
| 125 | |||
| 126 | 2004-10-05 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 127 | |||
| 128 | * xterm.c (x_find_modifier_meanings): Ignore any Super or Hyper for | ||
| 129 | a row if Alt or Meta has been found for that row. Also stop scanning | ||
| 130 | for Keysyms for that row. | ||
| 131 | |||
| 132 | 2004-10-04 Kim F. Storm <storm@cua.dk> | ||
| 133 | |||
| 134 | * fringe.c (Ffringe_bitmaps_at_pos): Change return value from cons | ||
| 135 | to list. Include overlay arrow bitmap in return value. | ||
| 136 | |||
| 137 | * xterm.c (XTset_vertical_scroll_bar): Improve handling of scroll | ||
| 138 | bars with fractional column width. If scroll bar separates two | ||
| 139 | windows, move it towards the window it belongs to. Only update | ||
| 140 | the padding area below the scroll bar widget when necessary, | ||
| 141 | i.e. when scroll bar widget is created, moved, or resized. | ||
| 142 | |||
| 143 | * xdisp.c (define_frame_cursor1): Do not change frame cursor | ||
| 144 | while tracking/dragging mouse. | ||
| 145 | (x_draw_vertical_border): Do not draw line if frame has scroll bars. | ||
| 146 | |||
| 147 | * window.c (coordinates_in_window): Relax check for cursor | ||
| 148 | on vertial border between mode lines. | ||
| 149 | (Fset_window_fringes): Do not allow negative widths. | ||
| 150 | (Fset_window_scroll_bars): Likewise. | ||
| 151 | |||
| 152 | * .gdbinit (pp): Shorthand for p ARG + pr. | ||
| 153 | (ff): New command: flush frame updates (X only). | ||
| 154 | |||
| 1 | 2004-10-03 Michael Albinus <michael.albinus@gmx.de> | 155 | 2004-10-03 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 156 | ||
| 3 | * fileio.c (auto_save_1) Call Ffile_modes for remote files. | 157 | * fileio.c (auto_save_1) Call Ffile_modes for remote files. |
| @@ -62,8 +216,8 @@ | |||
| 62 | Change arg to Lisp_Object and fail if not an integer. | 216 | Change arg to Lisp_Object and fail if not an integer. |
| 63 | (get_fringe_bitmap_name, resolve_fringe_bitmap) | 217 | (get_fringe_bitmap_name, resolve_fringe_bitmap) |
| 64 | (destroy_fringe_bitmap): New functions. | 218 | (destroy_fringe_bitmap): New functions. |
| 65 | (Fdestroy_fringe_bitmap): Change arg to bitmap symbol. Use | 219 | (Fdestroy_fringe_bitmap): Change arg to bitmap symbol. |
| 66 | destroy_fringe_bitmap. Remove symbol from Vfringe_bitmaps and | 220 | Use destroy_fringe_bitmap. Remove symbol from Vfringe_bitmaps and |
| 67 | clear its fringe property. | 221 | clear its fringe property. |
| 68 | (init_fringe_bitmap): Use destroy_fringe_bitmap instead of | 222 | (init_fringe_bitmap): Use destroy_fringe_bitmap instead of |
| 69 | Fdestroy_fringe_bitmap. | 223 | Fdestroy_fringe_bitmap. |
| @@ -88,7 +242,7 @@ | |||
| 88 | 242 | ||
| 89 | 2004-09-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 243 | 2004-09-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 90 | 244 | ||
| 91 | * config.in: Rebuild | 245 | * config.in: Rebuild. |
| 92 | 246 | ||
| 93 | 2004-09-24 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 247 | 2004-09-24 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 94 | 248 | ||
| @@ -108,7 +262,7 @@ | |||
| 108 | Handle the case where we reach the old displayed text, | 262 | Handle the case where we reach the old displayed text, |
| 109 | out of sync with the old line boundary. | 263 | out of sync with the old line boundary. |
| 110 | 264 | ||
| 111 | 2004-09-14 Stefan <monnier@iro.umontreal.ca> | 265 | 2004-09-14 Stefan Monnier <monnier@iro.umontreal.ca> |
| 112 | 266 | ||
| 113 | * fileio.c (Finsert_file_contents): Fix case of replacement in a | 267 | * fileio.c (Finsert_file_contents): Fix case of replacement in a |
| 114 | narrowed buffer. | 268 | narrowed buffer. |
| @@ -130,7 +284,7 @@ | |||
| 130 | (Fbyte_code): Remove dead code after `wrong_type_argument'. | 284 | (Fbyte_code): Remove dead code after `wrong_type_argument'. |
| 131 | 285 | ||
| 132 | * alloc.c (Fgarbage_collect): Mark keyboards, gtk data, and specpdl | 286 | * alloc.c (Fgarbage_collect): Mark keyboards, gtk data, and specpdl |
| 133 | before doing the mark_stack_check_gcpros since they are not on the stack. | 287 | before doing the mark_stack_check_gcpros since they're not on the stack. |
| 134 | 288 | ||
| 135 | 2004-09-12 Kim F. Storm <storm@cua.dk> | 289 | 2004-09-12 Kim F. Storm <storm@cua.dk> |
| 136 | 290 | ||
| @@ -149,8 +303,7 @@ | |||
| 149 | blockinput.h. | 303 | blockinput.h. |
| 150 | (dosfns.o): Depend on blockinput.h, window.h, dispextern.h, | 304 | (dosfns.o): Depend on blockinput.h, window.h, dispextern.h, |
| 151 | charset.h, and coding.h | 305 | charset.h, and coding.h |
| 152 | (w16select.o): Depend on buffer.h, charset.h, coding.h, and | 306 | (w16select.o): Depend on buffer.h, charset.h, coding.h, and composite.h. |
| 153 | composite.h. | ||
| 154 | (term.o): Depend on window.h and keymap.h. | 307 | (term.o): Depend on window.h and keymap.h. |
| 155 | (abbrev.o): Depend on syntax.h. | 308 | (abbrev.o): Depend on syntax.h. |
| 156 | (callint.o): Depend on keymap.h. | 309 | (callint.o): Depend on keymap.h. |
| @@ -183,8 +336,8 @@ | |||
| 183 | (lread.o): Depend on $(INTERVALS_SRC), termhooks.h, and coding.h. | 336 | (lread.o): Depend on $(INTERVALS_SRC), termhooks.h, and coding.h. |
| 184 | (intervals.o): Depend on keymap.h. | 337 | (intervals.o): Depend on keymap.h. |
| 185 | 338 | ||
| 186 | * msdos.c (msdos_set_cursor_shape, IT_display_cursor): Add | 339 | * msdos.c (msdos_set_cursor_shape, IT_display_cursor): |
| 187 | debugging print-out to termscript. | 340 | Add debugging print-out to termscript. |
| 188 | 341 | ||
| 189 | 2004-09-09 Richard M. Stallman <rms@gnu.org> | 342 | 2004-09-09 Richard M. Stallman <rms@gnu.org> |
| 190 | 343 | ||
| @@ -210,8 +363,8 @@ | |||
| 210 | 2004-09-07 Luc Teirlinck <teirllm@auburn.edu> | 363 | 2004-09-07 Luc Teirlinck <teirllm@auburn.edu> |
| 211 | 364 | ||
| 212 | * buffer.h (struct buffer): Add auto_save_file_format field. | 365 | * buffer.h (struct buffer): Add auto_save_file_format field. |
| 213 | * buffer.c (reset_buffer, init_buffer_once): Handle | 366 | * buffer.c (reset_buffer, init_buffer_once): |
| 214 | auto_save_file_format field. | 367 | Handle auto_save_file_format field. |
| 215 | (syms_of_buffer): Add DEFVAR_PER_BUFFER for | 368 | (syms_of_buffer): Add DEFVAR_PER_BUFFER for |
| 216 | `buffer-auto-save-file-format'. | 369 | `buffer-auto-save-file-format'. |
| 217 | * fileio.c: Delete declaration for removed Vauto_save_file_format. | 370 | * fileio.c: Delete declaration for removed Vauto_save_file_format. |
| @@ -224,15 +377,15 @@ | |||
| 224 | 377 | ||
| 225 | * w32term.h (AppendMenuW_Proc): Move declaration from w32menu.c. | 378 | * w32term.h (AppendMenuW_Proc): Move declaration from w32menu.c. |
| 226 | 379 | ||
| 227 | * w32fns.c (w32_wnd_proc) [WM_MEASUREITEM, WM_DRAWITEM]: Handle | 380 | * w32fns.c (w32_wnd_proc) [WM_MEASUREITEM, WM_DRAWITEM]: |
| 228 | Unicode menu titles. | 381 | Handle Unicode menu titles. |
| 229 | 382 | ||
| 230 | 2004-09-07 Kim F. Storm <storm@cua.dk> | 383 | 2004-09-07 Kim F. Storm <storm@cua.dk> |
| 231 | 384 | ||
| 232 | * xdisp.c (set_cursor_from_row): Fix last change. Only use 'cursor' | 385 | * xdisp.c (set_cursor_from_row): Fix last change. Only use 'cursor' |
| 233 | property from text property or overlay strings at point. | 386 | property from text property or overlay strings at point. |
| 234 | 387 | ||
| 235 | 2004-09-07 Stefan <monnier@iro.umontreal.ca> | 388 | 2004-09-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 236 | 389 | ||
| 237 | * xmenu.c (update_submenu_strings): YAILOM. | 390 | * xmenu.c (update_submenu_strings): YAILOM. |
| 238 | (set_frame_menubar): Make sure last_i is initialized. | 391 | (set_frame_menubar): Make sure last_i is initialized. |
| @@ -721,7 +874,7 @@ | |||
| 721 | * w32select.c (Fw32_set_clipboard_data): Update `nbytes' correctly | 874 | * w32select.c (Fw32_set_clipboard_data): Update `nbytes' correctly |
| 722 | after getting a new string by pre-write-conversion. | 875 | after getting a new string by pre-write-conversion. |
| 723 | 876 | ||
| 724 | 2004-06-30 Stefan <monnier@iro.umontreal.ca> | 877 | 2004-06-30 Stefan Monnier <monnier@iro.umontreal.ca> |
| 725 | 878 | ||
| 726 | * xterm.c (x_detect_focus_change): Remove unused var `nr_events'. | 879 | * xterm.c (x_detect_focus_change): Remove unused var `nr_events'. |
| 727 | (x_calc_absolute_position): Remove unused var `child'. | 880 | (x_calc_absolute_position): Remove unused var `child'. |
diff --git a/src/Makefile.in b/src/Makefile.in index 950564f8fa4..08504dcf725 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -887,7 +887,7 @@ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) \ | |||
| 887 | #define OBJECTS_MACHINE | 887 | #define OBJECTS_MACHINE |
| 888 | #endif | 888 | #endif |
| 889 | 889 | ||
| 890 | #ifdef HAVE_EXECSHIELD | 890 | #ifdef HAVE_RANDOM_HEAPSTART |
| 891 | #undef i386 | 891 | #undef i386 |
| 892 | RUN_TEMACS = @SETARCH@ i386 ./temacs | 892 | RUN_TEMACS = @SETARCH@ i386 ./temacs |
| 893 | #else | 893 | #else |
diff --git a/src/callproc.c b/src/callproc.c index 7632d491944..d9f9a342575 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -216,7 +216,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 216 | int nargs; | 216 | int nargs; |
| 217 | register Lisp_Object *args; | 217 | register Lisp_Object *args; |
| 218 | { | 218 | { |
| 219 | Lisp_Object infile, buffer, current_dir, display, path; | 219 | Lisp_Object infile, buffer, current_dir, path; |
| 220 | int display_p; | ||
| 220 | int fd[2]; | 221 | int fd[2]; |
| 221 | int filefd; | 222 | int filefd; |
| 222 | register int pid; | 223 | register int pid; |
| @@ -372,7 +373,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 372 | UNGCPRO; | 373 | UNGCPRO; |
| 373 | } | 374 | } |
| 374 | 375 | ||
| 375 | display = nargs >= 4 ? args[3] : Qnil; | 376 | display_p = INTERACTIVE && nargs >= 4 && !NILP (args[3]); |
| 376 | 377 | ||
| 377 | filefd = emacs_open (SDATA (infile), O_RDONLY, 0); | 378 | filefd = emacs_open (SDATA (infile), O_RDONLY, 0); |
| 378 | if (filefd < 0) | 379 | if (filefd < 0) |
| @@ -739,7 +740,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 739 | int first = 1; | 740 | int first = 1; |
| 740 | int total_read = 0; | 741 | int total_read = 0; |
| 741 | int carryover = 0; | 742 | int carryover = 0; |
| 742 | int display_on_the_fly = !NILP (display) && INTERACTIVE; | 743 | int display_on_the_fly = display_p; |
| 743 | struct coding_system saved_coding; | 744 | struct coding_system saved_coding; |
| 744 | 745 | ||
| 745 | saved_coding = process_coding; | 746 | saved_coding = process_coding; |
| @@ -803,6 +804,9 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 803 | display_on_the_fly = 0; | 804 | display_on_the_fly = 0; |
| 804 | process_coding = saved_coding; | 805 | process_coding = saved_coding; |
| 805 | carryover = nread; | 806 | carryover = nread; |
| 807 | /* This is to make the above condition always | ||
| 808 | fails in the future. */ | ||
| 809 | saved_coding.type = coding_type_no_conversion; | ||
| 806 | continue; | 810 | continue; |
| 807 | } | 811 | } |
| 808 | 812 | ||
| @@ -832,12 +836,16 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 832 | bufptr = tempptr; | 836 | bufptr = tempptr; |
| 833 | } | 837 | } |
| 834 | 838 | ||
| 835 | if (!NILP (display) && INTERACTIVE) | 839 | if (display_p) |
| 836 | { | 840 | { |
| 837 | if (first) | 841 | if (first) |
| 838 | prepare_menu_bars (); | 842 | prepare_menu_bars (); |
| 839 | first = 0; | 843 | first = 0; |
| 840 | redisplay_preserve_echo_area (1); | 844 | redisplay_preserve_echo_area (1); |
| 845 | /* This variable might have been set to 0 for code | ||
| 846 | detection. In that case, we set it back to 1 because | ||
| 847 | we should have already detected a coding system. */ | ||
| 848 | display_on_the_fly = 1; | ||
| 841 | } | 849 | } |
| 842 | immediate_quit = 1; | 850 | immediate_quit = 1; |
| 843 | QUIT; | 851 | QUIT; |
diff --git a/src/config.in b/src/config.in index d87d235fe55..49095ca4e5a 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -136,9 +136,6 @@ Boston, MA 02111-1307, USA. */ | |||
| 136 | /* Define to 1 if you have the `euidaccess' function. */ | 136 | /* Define to 1 if you have the `euidaccess' function. */ |
| 137 | #undef HAVE_EUIDACCESS | 137 | #undef HAVE_EUIDACCESS |
| 138 | 138 | ||
| 139 | /* Define to 1 if this OS has exec shield and we can handle it. */ | ||
| 140 | #undef HAVE_EXECSHIELD | ||
| 141 | |||
| 142 | /* Define to 1 if you have the <fcntl.h> header file. */ | 139 | /* Define to 1 if you have the <fcntl.h> header file. */ |
| 143 | #undef HAVE_FCNTL_H | 140 | #undef HAVE_FCNTL_H |
| 144 | 141 | ||
| @@ -355,6 +352,9 @@ Boston, MA 02111-1307, USA. */ | |||
| 355 | /* Define to 1 if you have the <maillock.h> header file. */ | 352 | /* Define to 1 if you have the <maillock.h> header file. */ |
| 356 | #undef HAVE_MAILLOCK_H | 353 | #undef HAVE_MAILLOCK_H |
| 357 | 354 | ||
| 355 | /* Define to 1 if you have the <malloc/malloc.h> header file. */ | ||
| 356 | #undef HAVE_MALLOC_MALLOC_H | ||
| 357 | |||
| 358 | /* Define to 1 if you have the `mblen' function. */ | 358 | /* Define to 1 if you have the `mblen' function. */ |
| 359 | #undef HAVE_MBLEN | 359 | #undef HAVE_MBLEN |
| 360 | 360 | ||
| @@ -432,6 +432,9 @@ Boston, MA 02111-1307, USA. */ | |||
| 432 | /* Define to 1 if you have the `random' function. */ | 432 | /* Define to 1 if you have the `random' function. */ |
| 433 | #undef HAVE_RANDOM | 433 | #undef HAVE_RANDOM |
| 434 | 434 | ||
| 435 | /* Define to 1 if this OS randomizes the start address of the heap. */ | ||
| 436 | #undef HAVE_RANDOM_HEAPSTART | ||
| 437 | |||
| 435 | /* Define to 1 if you have the `recvfrom' function. */ | 438 | /* Define to 1 if you have the `recvfrom' function. */ |
| 436 | #undef HAVE_RECVFROM | 439 | #undef HAVE_RECVFROM |
| 437 | 440 | ||
| @@ -754,9 +757,9 @@ Boston, MA 02111-1307, USA. */ | |||
| 754 | /* If using the C implementation of alloca, define if you know the | 757 | /* If using the C implementation of alloca, define if you know the |
| 755 | direction of stack growth for your system; otherwise it will be | 758 | direction of stack growth for your system; otherwise it will be |
| 756 | automatically deduced at run-time. | 759 | automatically deduced at run-time. |
| 757 | STACK_DIRECTION > 0 => grows toward higher addresses | 760 | STACK_DIRECTION > 0 => grows toward higher addresses |
| 758 | STACK_DIRECTION < 0 => grows toward lower addresses | 761 | STACK_DIRECTION < 0 => grows toward lower addresses |
| 759 | STACK_DIRECTION = 0 => direction of growth unknown */ | 762 | STACK_DIRECTION = 0 => direction of growth unknown */ |
| 760 | #undef STACK_DIRECTION | 763 | #undef STACK_DIRECTION |
| 761 | 764 | ||
| 762 | /* Define to 1 if you have the ANSI C header files. */ | 765 | /* Define to 1 if you have the ANSI C header files. */ |
diff --git a/src/dispextern.h b/src/dispextern.h index f28b39f0c64..a87a38ce469 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -1961,8 +1961,8 @@ struct it | |||
| 1961 | 1961 | ||
| 1962 | /* Object and position where the current display element came from. | 1962 | /* Object and position where the current display element came from. |
| 1963 | Object can be a Lisp string in case the current display element | 1963 | Object can be a Lisp string in case the current display element |
| 1964 | comes from an overlay string, or it is buffer. Position is | 1964 | comes from an overlay string, or it is buffer. It may also be nil |
| 1965 | a position in object. */ | 1965 | during mode-line update. Position is a position in object. */ |
| 1966 | Lisp_Object object; | 1966 | Lisp_Object object; |
| 1967 | struct text_pos position; | 1967 | struct text_pos position; |
| 1968 | 1968 | ||
| @@ -2637,7 +2637,7 @@ extern int x_intersect_rectangles P_ ((XRectangle *, XRectangle *, | |||
| 2637 | int lookup_fringe_bitmap (Lisp_Object); | 2637 | int lookup_fringe_bitmap (Lisp_Object); |
| 2638 | void draw_fringe_bitmap P_ ((struct window *, struct glyph_row *, int)); | 2638 | void draw_fringe_bitmap P_ ((struct window *, struct glyph_row *, int)); |
| 2639 | void draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *)); | 2639 | void draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *)); |
| 2640 | void draw_window_fringes P_ ((struct window *)); | 2640 | int draw_window_fringes P_ ((struct window *, int)); |
| 2641 | int update_window_fringes P_ ((struct window *, int)); | 2641 | int update_window_fringes P_ ((struct window *, int)); |
| 2642 | void compute_fringe_widths P_ ((struct frame *, int)); | 2642 | void compute_fringe_widths P_ ((struct frame *, int)); |
| 2643 | 2643 | ||
| @@ -776,9 +776,13 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int | |||
| 776 | idx = strp - SDATA (string); | 776 | idx = strp - SDATA (string); |
| 777 | tem = Fintern (make_string (start, length_byte), Qnil); | 777 | tem = Fintern (make_string (start, length_byte), Qnil); |
| 778 | 778 | ||
| 779 | /* Ignore remappings unless there are no ordinary bindings. */ | ||
| 780 | tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qt); | ||
| 781 | if (NILP (tem)) | ||
| 782 | tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qnil); | ||
| 783 | |||
| 779 | /* Note the Fwhere_is_internal can GC, so we have to take | 784 | /* Note the Fwhere_is_internal can GC, so we have to take |
| 780 | relocation of string contents into account. */ | 785 | relocation of string contents into account. */ |
| 781 | tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qnil); | ||
| 782 | strp = SDATA (string) + idx; | 786 | strp = SDATA (string) + idx; |
| 783 | start = SDATA (string) + start_idx; | 787 | start = SDATA (string) + start_idx; |
| 784 | 788 | ||
diff --git a/src/fringe.c b/src/fringe.c index 0bf830cbd8c..ef4c7631e05 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -722,19 +722,35 @@ draw_row_fringe_bitmaps (w, row) | |||
| 722 | } | 722 | } |
| 723 | 723 | ||
| 724 | /* Draw the fringes of window W. Only fringes for rows marked for | 724 | /* Draw the fringes of window W. Only fringes for rows marked for |
| 725 | update in redraw_fringe_bitmaps_p are drawn. */ | 725 | update in redraw_fringe_bitmaps_p are drawn. |
| 726 | 726 | ||
| 727 | void | 727 | Return >0 if left or right fringe was redrawn in any way. |
| 728 | draw_window_fringes (w) | 728 | |
| 729 | If NO_FRINGE is non-zero, also return >0 if either fringe has zero width. | ||
| 730 | |||
| 731 | A return value >0 indicates that the vertical line between windows | ||
| 732 | needs update (as it may be drawn in the fringe). | ||
| 733 | */ | ||
| 734 | |||
| 735 | int | ||
| 736 | draw_window_fringes (w, no_fringe) | ||
| 729 | struct window *w; | 737 | struct window *w; |
| 738 | int no_fringe; | ||
| 730 | { | 739 | { |
| 731 | struct glyph_row *row; | 740 | struct glyph_row *row; |
| 732 | int yb = window_text_bottom_y (w); | 741 | int yb = window_text_bottom_y (w); |
| 733 | int nrows = w->current_matrix->nrows; | 742 | int nrows = w->current_matrix->nrows; |
| 734 | int y = 0, rn; | 743 | int y = 0, rn; |
| 744 | int updated = 0; | ||
| 735 | 745 | ||
| 736 | if (w->pseudo_window_p) | 746 | if (w->pseudo_window_p) |
| 737 | return; | 747 | return 0; |
| 748 | |||
| 749 | /* Must draw line if no fringe */ | ||
| 750 | if (no_fringe | ||
| 751 | && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0 | ||
| 752 | || WINDOW_RIGHT_FRINGE_WIDTH (w) == 0)) | ||
| 753 | updated++; | ||
| 738 | 754 | ||
| 739 | for (y = 0, rn = 0, row = w->current_matrix->rows; | 755 | for (y = 0, rn = 0, row = w->current_matrix->rows; |
| 740 | y < yb && rn < nrows; | 756 | y < yb && rn < nrows; |
| @@ -744,7 +760,10 @@ draw_window_fringes (w) | |||
| 744 | continue; | 760 | continue; |
| 745 | draw_row_fringe_bitmaps (w, row); | 761 | draw_row_fringe_bitmaps (w, row); |
| 746 | row->redraw_fringe_bitmaps_p = 0; | 762 | row->redraw_fringe_bitmaps_p = 0; |
| 763 | updated++; | ||
| 747 | } | 764 | } |
| 765 | |||
| 766 | return updated; | ||
| 748 | } | 767 | } |
| 749 | 768 | ||
| 750 | 769 | ||
| @@ -950,11 +969,7 @@ update_window_fringes (w, force_p) | |||
| 950 | Typically, we add an equal amount (+/- 1 pixel) to each fringe, | 969 | Typically, we add an equal amount (+/- 1 pixel) to each fringe, |
| 951 | but a negative width value is taken literally (after negating it). | 970 | but a negative width value is taken literally (after negating it). |
| 952 | 971 | ||
| 953 | We never make the fringes narrower than specified. It is planned | 972 | We never make the fringes narrower than specified. |
| 954 | to make fringe bitmaps customizable and expandable, and at that | ||
| 955 | time, the user will typically specify the minimum number of pixels | ||
| 956 | needed for his bitmaps, so we shouldn't select anything less than | ||
| 957 | what is specified. | ||
| 958 | */ | 973 | */ |
| 959 | 974 | ||
| 960 | void | 975 | void |
| @@ -1343,9 +1358,10 @@ DEFUN ("fringe-bitmaps-at-pos", Ffringe_bitmaps_at_pos, Sfringe_bitmaps_at_pos, | |||
| 1343 | 0, 2, 0, | 1358 | 0, 2, 0, |
| 1344 | doc: /* Return fringe bitmaps of row containing position POS in window WINDOW. | 1359 | doc: /* Return fringe bitmaps of row containing position POS in window WINDOW. |
| 1345 | If WINDOW is nil, use selected window. If POS is nil, use value of point | 1360 | If WINDOW is nil, use selected window. If POS is nil, use value of point |
| 1346 | in that window. Return value is a cons (LEFT . RIGHT) where LEFT and RIGHT | 1361 | in that window. Return value is a list (LEFT RIGHT OV), where LEFT |
| 1347 | are the fringe bitmap numbers for the bitmaps in the left and right fringe, | 1362 | is the symbol for the bitmap in the left fringe (or nil if no bitmap), |
| 1348 | resp. If left or right fringe is empty, the corresponding element is nil. | 1363 | RIGHT is similar for the right fringe, and OV is non-nil if there is an |
| 1364 | overlay arrow in the left fringe. | ||
| 1349 | Return nil if POS is not visible in WINDOW. */) | 1365 | Return nil if POS is not visible in WINDOW. */) |
| 1350 | (pos, window) | 1366 | (pos, window) |
| 1351 | Lisp_Object pos, window; | 1367 | Lisp_Object pos, window; |
| @@ -1373,8 +1389,9 @@ Return nil if POS is not visible in WINDOW. */) | |||
| 1373 | row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 1389 | row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| 1374 | row = row_containing_pos (w, textpos, row, NULL, 0); | 1390 | row = row_containing_pos (w, textpos, row, NULL, 0); |
| 1375 | if (row) | 1391 | if (row) |
| 1376 | return Fcons (get_fringe_bitmap_name (row->left_fringe_bitmap), | 1392 | return list3 (get_fringe_bitmap_name (row->left_fringe_bitmap), |
| 1377 | get_fringe_bitmap_name (row->right_fringe_bitmap)); | 1393 | get_fringe_bitmap_name (row->right_fringe_bitmap), |
| 1394 | (row->overlay_arrow_p ? Qt : Qnil)); | ||
| 1378 | else | 1395 | else |
| 1379 | return Qnil; | 1396 | return Qnil; |
| 1380 | } | 1397 | } |
diff --git a/src/keyboard.c b/src/keyboard.c index 378350710b9..3360b11850e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -676,6 +676,9 @@ static Lisp_Object apply_modifiers P_ ((int, Lisp_Object)); | |||
| 676 | static void clear_event P_ ((struct input_event *)); | 676 | static void clear_event P_ ((struct input_event *)); |
| 677 | static void any_kboard_state P_ ((void)); | 677 | static void any_kboard_state P_ ((void)); |
| 678 | static SIGTYPE interrupt_signal P_ ((int signalnum)); | 678 | static SIGTYPE interrupt_signal P_ ((int signalnum)); |
| 679 | static void timer_start_idle P_ ((void)); | ||
| 680 | static void timer_stop_idle P_ ((void)); | ||
| 681 | static void timer_resume_idle P_ ((void)); | ||
| 679 | 682 | ||
| 680 | /* Nonzero means don't try to suspend even if the operating system seems | 683 | /* Nonzero means don't try to suspend even if the operating system seems |
| 681 | to support it. */ | 684 | to support it. */ |
| @@ -2387,7 +2390,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2387 | volatile Lisp_Object also_record; | 2390 | volatile Lisp_Object also_record; |
| 2388 | volatile int reread; | 2391 | volatile int reread; |
| 2389 | struct gcpro gcpro1, gcpro2; | 2392 | struct gcpro gcpro1, gcpro2; |
| 2390 | EMACS_TIME last_idle_start; | ||
| 2391 | int polling_stopped_here = 0; | 2393 | int polling_stopped_here = 0; |
| 2392 | 2394 | ||
| 2393 | also_record = Qnil; | 2395 | also_record = Qnil; |
| @@ -2894,9 +2896,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2894 | 2896 | ||
| 2895 | non_reread: | 2897 | non_reread: |
| 2896 | 2898 | ||
| 2897 | /* Record the last idle start time so that we can reset it | ||
| 2898 | should the next event read be a help-echo. */ | ||
| 2899 | last_idle_start = timer_idleness_start_time; | ||
| 2900 | timer_stop_idle (); | 2899 | timer_stop_idle (); |
| 2901 | RESUME_POLLING; | 2900 | RESUME_POLLING; |
| 2902 | 2901 | ||
| @@ -2936,7 +2935,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2936 | prevents automatic window selection (under | 2935 | prevents automatic window selection (under |
| 2937 | mouse_autoselect_window from acting as a real input event, for | 2936 | mouse_autoselect_window from acting as a real input event, for |
| 2938 | example banishing the mouse under mouse-avoidance-mode. */ | 2937 | example banishing the mouse under mouse-avoidance-mode. */ |
| 2939 | timer_idleness_start_time = last_idle_start; | 2938 | timer_resume_idle (); |
| 2940 | 2939 | ||
| 2941 | /* Resume allowing input from any kboard, if that was true before. */ | 2940 | /* Resume allowing input from any kboard, if that was true before. */ |
| 2942 | if (!was_locked) | 2941 | if (!was_locked) |
| @@ -3134,7 +3133,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 3134 | show_help_echo (help, window, object, position, 0); | 3133 | show_help_echo (help, window, object, position, 0); |
| 3135 | 3134 | ||
| 3136 | /* We stopped being idle for this event; undo that. */ | 3135 | /* We stopped being idle for this event; undo that. */ |
| 3137 | timer_idleness_start_time = last_idle_start; | 3136 | timer_resume_idle (); |
| 3138 | goto retry; | 3137 | goto retry; |
| 3139 | } | 3138 | } |
| 3140 | 3139 | ||
| @@ -4251,7 +4250,7 @@ swallow_events (do_display) | |||
| 4251 | /* Record the start of when Emacs is idle, | 4250 | /* Record the start of when Emacs is idle, |
| 4252 | for the sake of running idle-time timers. */ | 4251 | for the sake of running idle-time timers. */ |
| 4253 | 4252 | ||
| 4254 | void | 4253 | static void |
| 4255 | timer_start_idle () | 4254 | timer_start_idle () |
| 4256 | { | 4255 | { |
| 4257 | Lisp_Object timers; | 4256 | Lisp_Object timers; |
| @@ -4279,12 +4278,23 @@ timer_start_idle () | |||
| 4279 | 4278 | ||
| 4280 | /* Record that Emacs is no longer idle, so stop running idle-time timers. */ | 4279 | /* Record that Emacs is no longer idle, so stop running idle-time timers. */ |
| 4281 | 4280 | ||
| 4282 | void | 4281 | static void |
| 4283 | timer_stop_idle () | 4282 | timer_stop_idle () |
| 4284 | { | 4283 | { |
| 4285 | EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1); | 4284 | EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1); |
| 4286 | } | 4285 | } |
| 4287 | 4286 | ||
| 4287 | /* Resume idle timer from last idle start time. */ | ||
| 4288 | |||
| 4289 | static void | ||
| 4290 | timer_resume_idle () | ||
| 4291 | { | ||
| 4292 | if (! EMACS_TIME_NEG_P (timer_idleness_start_time)) | ||
| 4293 | return; | ||
| 4294 | |||
| 4295 | timer_idleness_start_time = timer_last_idleness_start_time; | ||
| 4296 | } | ||
| 4297 | |||
| 4288 | /* This is only for debugging. */ | 4298 | /* This is only for debugging. */ |
| 4289 | struct input_event last_timer_event; | 4299 | struct input_event last_timer_event; |
| 4290 | 4300 | ||
| @@ -8846,14 +8856,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 8846 | keymap may have changed, so replay the sequence. */ | 8856 | keymap may have changed, so replay the sequence. */ |
| 8847 | if (BUFFERP (key)) | 8857 | if (BUFFERP (key)) |
| 8848 | { | 8858 | { |
| 8849 | EMACS_TIME initial_idleness_start_time; | 8859 | timer_resume_idle (); |
| 8850 | EMACS_SET_SECS_USECS (initial_idleness_start_time, | ||
| 8851 | EMACS_SECS (timer_last_idleness_start_time), | ||
| 8852 | EMACS_USECS (timer_last_idleness_start_time)); | ||
| 8853 | |||
| 8854 | /* Resume idle state, using the same start-time as before. */ | ||
| 8855 | timer_start_idle (); | ||
| 8856 | timer_idleness_start_time = initial_idleness_start_time; | ||
| 8857 | 8860 | ||
| 8858 | mock_input = t; | 8861 | mock_input = t; |
| 8859 | /* Reset the current buffer from the selected window | 8862 | /* Reset the current buffer from the selected window |
diff --git a/src/keyboard.h b/src/keyboard.h index 4e14257359f..08cb934d3fe 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -326,8 +326,6 @@ extern void swallow_events P_ ((int)); | |||
| 326 | extern int help_char_p P_ ((Lisp_Object)); | 326 | extern int help_char_p P_ ((Lisp_Object)); |
| 327 | extern void quit_throw_to_read_char P_ ((void)) NO_RETURN; | 327 | extern void quit_throw_to_read_char P_ ((void)) NO_RETURN; |
| 328 | extern void cmd_error_internal P_ ((Lisp_Object, char *)); | 328 | extern void cmd_error_internal P_ ((Lisp_Object, char *)); |
| 329 | extern void timer_start_idle P_ ((void)); | ||
| 330 | extern void timer_stop_idle P_ ((void)); | ||
| 331 | extern int lucid_event_type_list_p P_ ((Lisp_Object)); | 329 | extern int lucid_event_type_list_p P_ ((Lisp_Object)); |
| 332 | extern void kbd_buffer_store_event P_ ((struct input_event *)); | 330 | extern void kbd_buffer_store_event P_ ((struct input_event *)); |
| 333 | extern void kbd_buffer_store_event_hold P_ ((struct input_event *, | 331 | extern void kbd_buffer_store_event_hold P_ ((struct input_event *, |
diff --git a/src/keymap.c b/src/keymap.c index 5177ccfbf8d..1711e7fbc36 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -268,7 +268,8 @@ get_keymap (object, error, autoload) | |||
| 268 | 268 | ||
| 269 | /* Should we do an autoload? Autoload forms for keymaps have | 269 | /* Should we do an autoload? Autoload forms for keymaps have |
| 270 | Qkeymap as their fifth element. */ | 270 | Qkeymap as their fifth element. */ |
| 271 | if ((autoload || !error) && EQ (XCAR (tem), Qautoload)) | 271 | if ((autoload || !error) && EQ (XCAR (tem), Qautoload) |
| 272 | && SYMBOLP (object)) | ||
| 272 | { | 273 | { |
| 273 | Lisp_Object tail; | 274 | Lisp_Object tail; |
| 274 | 275 | ||
| @@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 24 | 24 | ||
| 25 | #include <stdio.h> | 25 | #include <stdio.h> |
| 26 | #include <errno.h> | 26 | #include <errno.h> |
| 27 | #include <time.h> | ||
| 27 | #include <utime.h> | 28 | #include <utime.h> |
| 28 | #include <dirent.h> | 29 | #include <dirent.h> |
| 29 | #include <sys/types.h> | 30 | #include <sys/types.h> |
| @@ -46,6 +47,8 @@ Boston, MA 02111-1307, USA. */ | |||
| 46 | #undef realloc | 47 | #undef realloc |
| 47 | #undef init_process | 48 | #undef init_process |
| 48 | #include <Carbon/Carbon.h> | 49 | #include <Carbon/Carbon.h> |
| 50 | #undef mktime | ||
| 51 | #define mktime emacs_mktime | ||
| 49 | #undef free | 52 | #undef free |
| 50 | #define free unexec_free | 53 | #define free unexec_free |
| 51 | #undef malloc | 54 | #undef malloc |
| @@ -72,6 +75,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 72 | #include "process.h" | 75 | #include "process.h" |
| 73 | #include "sysselect.h" | 76 | #include "sysselect.h" |
| 74 | #include "systime.h" | 77 | #include "systime.h" |
| 78 | #include "blockinput.h" | ||
| 75 | 79 | ||
| 76 | Lisp_Object QCLIPBOARD; | 80 | Lisp_Object QCLIPBOARD; |
| 77 | 81 | ||
| @@ -2547,7 +2551,9 @@ component. */) | |||
| 2547 | 2551 | ||
| 2548 | CHECK_STRING (script); | 2552 | CHECK_STRING (script); |
| 2549 | 2553 | ||
| 2554 | BLOCK_INPUT; | ||
| 2550 | status = do_applescript (SDATA (script), &result); | 2555 | status = do_applescript (SDATA (script), &result); |
| 2556 | UNBLOCK_INPUT; | ||
| 2551 | if (status) | 2557 | if (status) |
| 2552 | { | 2558 | { |
| 2553 | if (!result) | 2559 | if (!result) |
| @@ -2617,26 +2623,23 @@ DEFUN ("mac-paste-function", Fmac_paste_function, Smac_paste_function, 0, 0, 0, | |||
| 2617 | () | 2623 | () |
| 2618 | { | 2624 | { |
| 2619 | #if TARGET_API_MAC_CARBON | 2625 | #if TARGET_API_MAC_CARBON |
| 2626 | OSStatus err; | ||
| 2620 | ScrapRef scrap; | 2627 | ScrapRef scrap; |
| 2621 | ScrapFlavorFlags sff; | 2628 | ScrapFlavorFlags sff; |
| 2622 | Size s; | 2629 | Size s; |
| 2623 | int i; | 2630 | int i; |
| 2624 | char *data; | 2631 | char *data; |
| 2625 | 2632 | ||
| 2626 | if (GetCurrentScrap (&scrap) != noErr) | 2633 | BLOCK_INPUT; |
| 2627 | return Qnil; | 2634 | err = GetCurrentScrap (&scrap); |
| 2628 | 2635 | if (err == noErr) | |
| 2629 | if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) != noErr) | 2636 | err = GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff); |
| 2630 | return Qnil; | 2637 | if (err == noErr) |
| 2631 | 2638 | err = GetScrapFlavorSize (scrap, kScrapFlavorTypeText, &s); | |
| 2632 | if (GetScrapFlavorSize (scrap, kScrapFlavorTypeText, &s) != noErr) | 2639 | if (err == noErr && (data = (char*) alloca (s))) |
| 2633 | return Qnil; | 2640 | err = GetScrapFlavorData (scrap, kScrapFlavorTypeText, &s, data); |
| 2634 | 2641 | UNBLOCK_INPUT; | |
| 2635 | if ((data = (char*) alloca (s)) == NULL) | 2642 | if (err != noErr || s == 0) |
| 2636 | return Qnil; | ||
| 2637 | |||
| 2638 | if (GetScrapFlavorData (scrap, kScrapFlavorTypeText, &s, data) != noErr | ||
| 2639 | || s == 0) | ||
| 2640 | return Qnil; | 2643 | return Qnil; |
| 2641 | 2644 | ||
| 2642 | /* Emacs expects clipboard contents have Unix-style eol's */ | 2645 | /* Emacs expects clipboard contents have Unix-style eol's */ |
| @@ -2701,13 +2704,22 @@ DEFUN ("mac-cut-function", Fmac_cut_function, Smac_cut_function, 1, 2, 0, | |||
| 2701 | #if TARGET_API_MAC_CARBON | 2704 | #if TARGET_API_MAC_CARBON |
| 2702 | { | 2705 | { |
| 2703 | ScrapRef scrap; | 2706 | ScrapRef scrap; |
| 2707 | |||
| 2708 | BLOCK_INPUT; | ||
| 2704 | ClearCurrentScrap (); | 2709 | ClearCurrentScrap (); |
| 2705 | if (GetCurrentScrap (&scrap) != noErr) | 2710 | if (GetCurrentScrap (&scrap) != noErr) |
| 2706 | error ("cannot get current scrap"); | 2711 | { |
| 2712 | UNBLOCK_INPUT; | ||
| 2713 | error ("cannot get current scrap"); | ||
| 2714 | } | ||
| 2707 | 2715 | ||
| 2708 | if (PutScrapFlavor (scrap, kScrapFlavorTypeText, kScrapFlavorMaskNone, len, | 2716 | if (PutScrapFlavor (scrap, kScrapFlavorTypeText, kScrapFlavorMaskNone, len, |
| 2709 | buf) != noErr) | 2717 | buf) != noErr) |
| 2710 | error ("cannot put to scrap"); | 2718 | { |
| 2719 | UNBLOCK_INPUT; | ||
| 2720 | error ("cannot put to scrap"); | ||
| 2721 | } | ||
| 2722 | UNBLOCK_INPUT; | ||
| 2711 | } | 2723 | } |
| 2712 | #else /* not TARGET_API_MAC_CARBON */ | 2724 | #else /* not TARGET_API_MAC_CARBON */ |
| 2713 | ZeroScrap (); | 2725 | ZeroScrap (); |
| @@ -2742,9 +2754,11 @@ and t is the same as `SECONDARY'. */) | |||
| 2742 | ScrapRef scrap; | 2754 | ScrapRef scrap; |
| 2743 | ScrapFlavorFlags sff; | 2755 | ScrapFlavorFlags sff; |
| 2744 | 2756 | ||
| 2757 | BLOCK_INPUT; | ||
| 2745 | if (GetCurrentScrap (&scrap) == noErr) | 2758 | if (GetCurrentScrap (&scrap) == noErr) |
| 2746 | if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) == noErr) | 2759 | if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) == noErr) |
| 2747 | val = Qt; | 2760 | val = Qt; |
| 2761 | UNBLOCK_INPUT; | ||
| 2748 | #else /* not TARGET_API_MAC_CARBON */ | 2762 | #else /* not TARGET_API_MAC_CARBON */ |
| 2749 | Handle my_handle; | 2763 | Handle my_handle; |
| 2750 | long rc, scrap_offset; | 2764 | long rc, scrap_offset; |
| @@ -2769,8 +2783,6 @@ and t is the same as `SECONDARY'. */) | |||
| 2769 | extern int inhibit_window_system; | 2783 | extern int inhibit_window_system; |
| 2770 | extern int noninteractive; | 2784 | extern int noninteractive; |
| 2771 | 2785 | ||
| 2772 | #include "blockinput.h" | ||
| 2773 | |||
| 2774 | /* When Emacs is started from the Finder, SELECT always immediately | 2786 | /* When Emacs is started from the Finder, SELECT always immediately |
| 2775 | returns as if input is present when file descriptor 0 is polled for | 2787 | returns as if input is present when file descriptor 0 is polled for |
| 2776 | input. Strangely, when Emacs is run as a GUI application from the | 2788 | input. Strangely, when Emacs is run as a GUI application from the |
diff --git a/src/macfns.c b/src/macfns.c index 3b09b344a55..88f975a65c8 100644 --- a/src/macfns.c +++ b/src/macfns.c | |||
| @@ -312,6 +312,9 @@ static Lisp_Object x_default_scroll_bar_color_parameter P_ ((struct frame *, | |||
| 312 | Lisp_Object, | 312 | Lisp_Object, |
| 313 | char *, char *, | 313 | char *, char *, |
| 314 | int)); | 314 | int)); |
| 315 | |||
| 316 | extern void mac_get_window_bounds P_ ((struct frame *, Rect *, Rect *)); | ||
| 317 | |||
| 315 | /* Store the screen positions of frame F into XPTR and YPTR. | 318 | /* Store the screen positions of frame F into XPTR and YPTR. |
| 316 | These are the positions of the containing window manager window, | 319 | These are the positions of the containing window manager window, |
| 317 | not Emacs's own window. */ | 320 | not Emacs's own window. */ |
| @@ -321,33 +324,15 @@ x_real_positions (f, xptr, yptr) | |||
| 321 | FRAME_PTR f; | 324 | FRAME_PTR f; |
| 322 | int *xptr, *yptr; | 325 | int *xptr, *yptr; |
| 323 | { | 326 | { |
| 324 | Point pt; | 327 | Rect inner, outer; |
| 325 | GrafPtr oldport; | ||
| 326 | 328 | ||
| 327 | GetPort (&oldport); | 329 | mac_get_window_bounds (f, &inner, &outer); |
| 328 | SetPortWindowPort (FRAME_MAC_WINDOW (f)); | ||
| 329 | 330 | ||
| 330 | #if TARGET_API_MAC_CARBON | 331 | f->x_pixels_diff = inner.left - outer.left; |
| 331 | { | 332 | f->y_pixels_diff = inner.top - outer.top; |
| 332 | Rect r; | ||
| 333 | 333 | ||
| 334 | GetWindowPortBounds (FRAME_MAC_WINDOW (f), &r); | 334 | *xptr = outer.left; |
| 335 | SetPt (&pt, r.left, r.top); | 335 | *yptr = outer.top; |
| 336 | } | ||
| 337 | #else /* not TARGET_API_MAC_CARBON */ | ||
| 338 | SetPt (&pt, | ||
| 339 | FRAME_MAC_WINDOW (f)->portRect.left, | ||
| 340 | FRAME_MAC_WINDOW (f)->portRect.top); | ||
| 341 | #endif /* not TARGET_API_MAC_CARBON */ | ||
| 342 | LocalToGlobal (&pt); | ||
| 343 | SetPort (oldport); | ||
| 344 | |||
| 345 | /* MAC has no frame pixel diff. */ | ||
| 346 | f->x_pixels_diff = 0; | ||
| 347 | f->y_pixels_diff = 0; | ||
| 348 | |||
| 349 | *xptr = pt.h; | ||
| 350 | *yptr = pt.v; | ||
| 351 | } | 336 | } |
| 352 | 337 | ||
| 353 | 338 | ||
| @@ -4262,6 +4247,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) | |||
| 4262 | NavUserAction userAction; | 4247 | NavUserAction userAction; |
| 4263 | CFStringRef message=NULL, client=NULL, saveName = NULL; | 4248 | CFStringRef message=NULL, client=NULL, saveName = NULL; |
| 4264 | 4249 | ||
| 4250 | BLOCK_INPUT; | ||
| 4265 | /* No need for a callback function because we are modal */ | 4251 | /* No need for a callback function because we are modal */ |
| 4266 | NavGetDefaultDialogCreationOptions(&options); | 4252 | NavGetDefaultDialogCreationOptions(&options); |
| 4267 | options.modality = kWindowModalityAppModal; | 4253 | options.modality = kWindowModalityAppModal; |
| @@ -4332,9 +4318,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) | |||
| 4332 | AEDisposeDesc(&defLocAed); | 4318 | AEDisposeDesc(&defLocAed); |
| 4333 | } | 4319 | } |
| 4334 | 4320 | ||
| 4335 | BLOCK_INPUT; | ||
| 4336 | status = NavDialogRun(dialogRef); | 4321 | status = NavDialogRun(dialogRef); |
| 4337 | UNBLOCK_INPUT; | ||
| 4338 | } | 4322 | } |
| 4339 | 4323 | ||
| 4340 | if (saveName) CFRelease(saveName); | 4324 | if (saveName) CFRelease(saveName); |
| @@ -4347,9 +4331,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) | |||
| 4347 | { | 4331 | { |
| 4348 | case kNavUserActionNone: | 4332 | case kNavUserActionNone: |
| 4349 | case kNavUserActionCancel: | 4333 | case kNavUserActionCancel: |
| 4350 | NavDialogDispose(dialogRef); | 4334 | break; /* Treat cancel like C-g */ |
| 4351 | Fsignal (Qquit, Qnil); /* Treat cancel like C-g */ | ||
| 4352 | return; | ||
| 4353 | case kNavUserActionOpen: | 4335 | case kNavUserActionOpen: |
| 4354 | case kNavUserActionChoose: | 4336 | case kNavUserActionChoose: |
| 4355 | case kNavUserActionSaveAs: | 4337 | case kNavUserActionSaveAs: |
| @@ -4384,6 +4366,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) | |||
| 4384 | dir, mustmatch, dir, Qfile_name_history, | 4366 | dir, mustmatch, dir, Qfile_name_history, |
| 4385 | default_filename, Qnil); | 4367 | default_filename, Qnil); |
| 4386 | } | 4368 | } |
| 4369 | UNBLOCK_INPUT; | ||
| 4387 | } | 4370 | } |
| 4388 | 4371 | ||
| 4389 | UNGCPRO; | 4372 | UNGCPRO; |
diff --git a/src/macgui.h b/src/macgui.h index 58081df52b4..e5ea665ac15 100644 --- a/src/macgui.h +++ b/src/macgui.h | |||
| @@ -42,6 +42,8 @@ typedef unsigned long Time; | |||
| 42 | #undef min | 42 | #undef min |
| 43 | #undef init_process | 43 | #undef init_process |
| 44 | #include <Carbon/Carbon.h> | 44 | #include <Carbon/Carbon.h> |
| 45 | #undef mktime | ||
| 46 | #define mktime emacs_mktime | ||
| 45 | #undef Z | 47 | #undef Z |
| 46 | #define Z (current_buffer->text->z) | 48 | #define Z (current_buffer->text->z) |
| 47 | #undef free | 49 | #undef free |
diff --git a/src/macmenu.c b/src/macmenu.c index 740bda261d8..007fab15eab 100644 --- a/src/macmenu.c +++ b/src/macmenu.c | |||
| @@ -1322,7 +1322,7 @@ update_submenu_strings (first_wv) | |||
| 1322 | 1322 | ||
| 1323 | for (wv = first_wv; wv; wv = wv->next) | 1323 | for (wv = first_wv; wv; wv = wv->next) |
| 1324 | { | 1324 | { |
| 1325 | if (wv->lname && ! NILP (wv->lname)) | 1325 | if (STRINGP (wv->lname)) |
| 1326 | { | 1326 | { |
| 1327 | wv->name = SDATA (wv->lname); | 1327 | wv->name = SDATA (wv->lname); |
| 1328 | 1328 | ||
| @@ -1336,7 +1336,7 @@ update_submenu_strings (first_wv) | |||
| 1336 | } | 1336 | } |
| 1337 | } | 1337 | } |
| 1338 | 1338 | ||
| 1339 | if (wv->lkey && ! NILP (wv->lkey)) | 1339 | if (STRINGP (wv->lkey)) |
| 1340 | wv->key = SDATA (wv->lkey); | 1340 | wv->key = SDATA (wv->lkey); |
| 1341 | 1341 | ||
| 1342 | if (wv->contents) | 1342 | if (wv->contents) |
diff --git a/src/macterm.c b/src/macterm.c index e1b8d49ddfa..2d09a2e93e9 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 50 | #include <TextUtils.h> | 50 | #include <TextUtils.h> |
| 51 | #include <LowMem.h> | 51 | #include <LowMem.h> |
| 52 | #include <Controls.h> | 52 | #include <Controls.h> |
| 53 | #include <Windows.h> | ||
| 53 | #if defined (__MRC__) || (__MSL__ >= 0x6000) | 54 | #if defined (__MRC__) || (__MSL__ >= 0x6000) |
| 54 | #include <ControlDefinitions.h> | 55 | #include <ControlDefinitions.h> |
| 55 | #endif | 56 | #endif |
| @@ -1292,9 +1293,8 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) | |||
| 1292 | output_cursor.vpos, | 1293 | output_cursor.vpos, |
| 1293 | output_cursor.x, output_cursor.y); | 1294 | output_cursor.x, output_cursor.y); |
| 1294 | 1295 | ||
| 1295 | x_draw_vertical_border (w); | 1296 | if (draw_window_fringes (w, 1)) |
| 1296 | 1297 | x_draw_vertical_border (w); | |
| 1297 | draw_window_fringes (w); | ||
| 1298 | 1298 | ||
| 1299 | UNBLOCK_INPUT; | 1299 | UNBLOCK_INPUT; |
| 1300 | } | 1300 | } |
| @@ -3893,18 +3893,21 @@ remember_mouse_glyph (f1, gx, gy) | |||
| 3893 | 3893 | ||
| 3894 | 3894 | ||
| 3895 | static WindowPtr | 3895 | static WindowPtr |
| 3896 | mac_front_window () | 3896 | front_emacs_window () |
| 3897 | { | 3897 | { |
| 3898 | #if TARGET_API_MAC_CARBON | 3898 | #if TARGET_API_MAC_CARBON |
| 3899 | return GetFrontWindowOfClass (kDocumentWindowClass, true); | 3899 | WindowPtr wp = GetFrontWindowOfClass (kDocumentWindowClass, true); |
| 3900 | |||
| 3901 | while (wp && !is_emacs_window (wp)) | ||
| 3902 | wp = GetNextWindowOfClass (wp, kDocumentWindowClass, true); | ||
| 3900 | #else | 3903 | #else |
| 3901 | WindowPtr front_window = FrontWindow (); | 3904 | WindowPtr wp = FrontWindow (); |
| 3902 | 3905 | ||
| 3903 | if (tip_window && front_window == tip_window) | 3906 | while (wp && (wp == tip_window || !is_emacs_window (wp))) |
| 3904 | return GetNextWindow (front_window); | 3907 | wp = GetNextWindow (wp); |
| 3905 | else | ||
| 3906 | return front_window; | ||
| 3907 | #endif | 3908 | #endif |
| 3909 | |||
| 3910 | return wp; | ||
| 3908 | } | 3911 | } |
| 3909 | 3912 | ||
| 3910 | #define mac_window_to_frame(wp) (((mac_output *) GetWRefCon (wp))->mFP) | 3913 | #define mac_window_to_frame(wp) (((mac_output *) GetWRefCon (wp))->mFP) |
| @@ -3940,7 +3943,7 @@ XTmouse_position (fp, insist, bar_window, part, x, y, time) | |||
| 3940 | { | 3943 | { |
| 3941 | Point mouse_pos; | 3944 | Point mouse_pos; |
| 3942 | int ignore1, ignore2; | 3945 | int ignore1, ignore2; |
| 3943 | WindowPtr wp = mac_front_window (); | 3946 | WindowPtr wp = front_emacs_window (); |
| 3944 | struct frame *f; | 3947 | struct frame *f; |
| 3945 | Lisp_Object frame, tail; | 3948 | Lisp_Object frame, tail; |
| 3946 | 3949 | ||
| @@ -4557,7 +4560,7 @@ x_scroll_bar_report_motion (fp, bar_window, part, x, y, time) | |||
| 4557 | unsigned long *time; | 4560 | unsigned long *time; |
| 4558 | { | 4561 | { |
| 4559 | struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); | 4562 | struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); |
| 4560 | WindowPtr wp = mac_front_window (); | 4563 | WindowPtr wp = front_emacs_window (); |
| 4561 | Point mouse_pos; | 4564 | Point mouse_pos; |
| 4562 | struct frame *f = mac_window_to_frame (wp); | 4565 | struct frame *f = mac_window_to_frame (wp); |
| 4563 | int win_y, top_range; | 4566 | int win_y, top_range; |
| @@ -5053,6 +5056,26 @@ xim_close_dpy (dpyinfo) | |||
| 5053 | */ | 5056 | */ |
| 5054 | 5057 | ||
| 5055 | 5058 | ||
| 5059 | void | ||
| 5060 | mac_get_window_bounds (f, inner, outer) | ||
| 5061 | struct frame *f; | ||
| 5062 | Rect *inner, *outer; | ||
| 5063 | { | ||
| 5064 | #if TARGET_API_MAC_CARBON | ||
| 5065 | GetWindowBounds (FRAME_MAC_WINDOW (f), kWindowContentRgn, inner); | ||
| 5066 | GetWindowBounds (FRAME_MAC_WINDOW (f), kWindowStructureRgn, outer); | ||
| 5067 | #else /* not TARGET_API_MAC_CARBON */ | ||
| 5068 | RgnHandle region = NewRgn (); | ||
| 5069 | |||
| 5070 | GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowContentRgn, region); | ||
| 5071 | *inner = (*region)->rgnBBox; | ||
| 5072 | GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowStructureRgn, region); | ||
| 5073 | *outer = (*region)->rgnBBox; | ||
| 5074 | DisposeRgn (region); | ||
| 5075 | #endif /* not TARGET_API_MAC_CARBON */ | ||
| 5076 | } | ||
| 5077 | |||
| 5078 | |||
| 5056 | /* Calculate the absolute position in frame F | 5079 | /* Calculate the absolute position in frame F |
| 5057 | from its current recorded position values and gravity. */ | 5080 | from its current recorded position values and gravity. */ |
| 5058 | 5081 | ||
| @@ -5060,47 +5083,36 @@ void | |||
| 5060 | x_calc_absolute_position (f) | 5083 | x_calc_absolute_position (f) |
| 5061 | struct frame *f; | 5084 | struct frame *f; |
| 5062 | { | 5085 | { |
| 5063 | Point pt; | 5086 | int width_diff = 0, height_diff = 0; |
| 5064 | int flags = f->size_hint_flags; | 5087 | int flags = f->size_hint_flags; |
| 5088 | Rect inner, outer; | ||
| 5065 | 5089 | ||
| 5066 | pt.h = pt.v = 0; | 5090 | /* We have nothing to do if the current position |
| 5091 | is already for the top-left corner. */ | ||
| 5092 | if (! ((flags & XNegative) || (flags & YNegative))) | ||
| 5093 | return; | ||
| 5067 | 5094 | ||
| 5068 | /* Find the position of the outside upper-left corner of | 5095 | /* Find the offsets of the outside upper-left corner of |
| 5069 | the inner window, with respect to the outer window. */ | 5096 | the inner window, with respect to the outer window. */ |
| 5070 | if (f->output_data.mac->parent_desc != FRAME_MAC_DISPLAY_INFO (f)->root_window) | 5097 | mac_get_window_bounds (f, &inner, &outer); |
| 5071 | { | ||
| 5072 | GrafPtr savePort; | ||
| 5073 | GetPort (&savePort); | ||
| 5074 | 5098 | ||
| 5075 | SetPortWindowPort (FRAME_MAC_WINDOW (f)); | 5099 | width_diff = (outer.right - outer.left) - (inner.right - inner.left); |
| 5076 | 5100 | height_diff = (outer.bottom - outer.top) - (inner.bottom - inner.top); | |
| 5077 | #if TARGET_API_MAC_CARBON | ||
| 5078 | { | ||
| 5079 | Rect r; | ||
| 5080 | |||
| 5081 | GetWindowPortBounds (FRAME_MAC_WINDOW (f), &r); | ||
| 5082 | SetPt(&pt, r.left, r.top); | ||
| 5083 | } | ||
| 5084 | #else /* not TARGET_API_MAC_CARBON */ | ||
| 5085 | SetPt(&pt, FRAME_MAC_WINDOW (f)->portRect.left, FRAME_MAC_WINDOW (f)->portRect.top); | ||
| 5086 | #endif /* not TARGET_API_MAC_CARBON */ | ||
| 5087 | LocalToGlobal (&pt); | ||
| 5088 | SetPort (savePort); | ||
| 5089 | } | ||
| 5090 | 5101 | ||
| 5091 | /* Treat negative positions as relative to the leftmost bottommost | 5102 | /* Treat negative positions as relative to the leftmost bottommost |
| 5092 | position that fits on the screen. */ | 5103 | position that fits on the screen. */ |
| 5093 | if (flags & XNegative) | 5104 | if (flags & XNegative) |
| 5094 | f->left_pos = (FRAME_MAC_DISPLAY_INFO (f)->width | 5105 | f->left_pos = (FRAME_MAC_DISPLAY_INFO (f)->width |
| 5095 | - 2 * f->border_width - pt.h | 5106 | - width_diff |
| 5096 | - FRAME_PIXEL_WIDTH (f) | 5107 | - FRAME_PIXEL_WIDTH (f) |
| 5097 | + f->left_pos); | 5108 | + f->left_pos); |
| 5098 | /* NTEMACS_TODO: Subtract menubar height? */ | 5109 | |
| 5099 | if (flags & YNegative) | 5110 | if (flags & YNegative) |
| 5100 | f->top_pos = (FRAME_MAC_DISPLAY_INFO (f)->height | 5111 | f->top_pos = (FRAME_MAC_DISPLAY_INFO (f)->height |
| 5101 | - 2 * f->border_width - pt.v | 5112 | - height_diff |
| 5102 | - FRAME_PIXEL_HEIGHT (f) | 5113 | - FRAME_PIXEL_HEIGHT (f) |
| 5103 | + f->top_pos); | 5114 | + f->top_pos); |
| 5115 | |||
| 5104 | /* The left_pos and top_pos | 5116 | /* The left_pos and top_pos |
| 5105 | are now relative to the top and left screen edges, | 5117 | are now relative to the top and left screen edges, |
| 5106 | so the flags should correspond. */ | 5118 | so the flags should correspond. */ |
| @@ -5119,8 +5131,6 @@ x_set_offset (f, xoff, yoff, change_gravity) | |||
| 5119 | register int xoff, yoff; | 5131 | register int xoff, yoff; |
| 5120 | int change_gravity; | 5132 | int change_gravity; |
| 5121 | { | 5133 | { |
| 5122 | int modified_top, modified_left; | ||
| 5123 | |||
| 5124 | if (change_gravity > 0) | 5134 | if (change_gravity > 0) |
| 5125 | { | 5135 | { |
| 5126 | f->top_pos = yoff; | 5136 | f->top_pos = yoff; |
| @@ -5137,11 +5147,55 @@ x_set_offset (f, xoff, yoff, change_gravity) | |||
| 5137 | BLOCK_INPUT; | 5147 | BLOCK_INPUT; |
| 5138 | x_wm_set_size_hint (f, (long) 0, 0); | 5148 | x_wm_set_size_hint (f, (long) 0, 0); |
| 5139 | 5149 | ||
| 5140 | modified_left = f->left_pos; | 5150 | #if TARGET_API_MAC_CARBON |
| 5141 | modified_top = f->top_pos; | 5151 | MoveWindowStructure (FRAME_MAC_WINDOW (f), f->left_pos, f->top_pos); |
| 5142 | 5152 | /* If the title bar is completely outside the screen, adjust the | |
| 5143 | MoveWindow (FRAME_MAC_WINDOW (f), modified_left + 6, | 5153 | position. */ |
| 5144 | modified_top + 42, false); | 5154 | ConstrainWindowToScreen (FRAME_MAC_WINDOW (f), kWindowTitleBarRgn, |
| 5155 | kWindowConstrainMoveRegardlessOfFit | ||
| 5156 | | kWindowConstrainAllowPartial, NULL, NULL); | ||
| 5157 | x_real_positions (f, &f->left_pos, &f->top_pos); | ||
| 5158 | #else | ||
| 5159 | { | ||
| 5160 | Rect inner, outer, screen_rect, dummy; | ||
| 5161 | RgnHandle region = NewRgn (); | ||
| 5162 | |||
| 5163 | mac_get_window_bounds (f, &inner, &outer); | ||
| 5164 | f->x_pixels_diff = inner.left - outer.left; | ||
| 5165 | f->y_pixels_diff = inner.top - outer.top; | ||
| 5166 | MoveWindow (FRAME_MAC_WINDOW (f), f->left_pos + f->x_pixels_diff, | ||
| 5167 | f->top_pos + f->y_pixels_diff, false); | ||
| 5168 | |||
| 5169 | /* If the title bar is completely outside the screen, adjust the | ||
| 5170 | position. The variable `outer' holds the title bar rectangle. | ||
| 5171 | The variable `inner' holds slightly smaller one than `outer', | ||
| 5172 | so that the calculation of overlapping may not become too | ||
| 5173 | strict. */ | ||
| 5174 | GetWindowRegion (FRAME_MAC_WINDOW (f), kWindowTitleBarRgn, region); | ||
| 5175 | outer = (*region)->rgnBBox; | ||
| 5176 | DisposeRgn (region); | ||
| 5177 | inner = outer; | ||
| 5178 | InsetRect (&inner, 8, 8); | ||
| 5179 | screen_rect = qd.screenBits.bounds; | ||
| 5180 | screen_rect.top += GetMBarHeight (); | ||
| 5181 | |||
| 5182 | if (!SectRect (&inner, &screen_rect, &dummy)) | ||
| 5183 | { | ||
| 5184 | if (inner.right <= screen_rect.left) | ||
| 5185 | f->left_pos = screen_rect.left; | ||
| 5186 | else if (inner.left >= screen_rect.right) | ||
| 5187 | f->left_pos = screen_rect.right - (outer.right - outer.left); | ||
| 5188 | |||
| 5189 | if (inner.bottom <= screen_rect.top) | ||
| 5190 | f->top_pos = screen_rect.top; | ||
| 5191 | else if (inner.top >= screen_rect.bottom) | ||
| 5192 | f->top_pos = screen_rect.bottom - (outer.bottom - outer.top); | ||
| 5193 | |||
| 5194 | MoveWindow (FRAME_MAC_WINDOW (f), f->left_pos + f->x_pixels_diff, | ||
| 5195 | f->top_pos + f->y_pixels_diff, false); | ||
| 5196 | } | ||
| 5197 | } | ||
| 5198 | #endif | ||
| 5145 | 5199 | ||
| 5146 | UNBLOCK_INPUT; | 5200 | UNBLOCK_INPUT; |
| 5147 | } | 5201 | } |
| @@ -5280,7 +5334,11 @@ x_raise_frame (f) | |||
| 5280 | struct frame *f; | 5334 | struct frame *f; |
| 5281 | { | 5335 | { |
| 5282 | if (f->async_visible) | 5336 | if (f->async_visible) |
| 5283 | SelectWindow (FRAME_MAC_WINDOW (f)); | 5337 | { |
| 5338 | BLOCK_INPUT; | ||
| 5339 | SelectWindow (FRAME_MAC_WINDOW (f)); | ||
| 5340 | UNBLOCK_INPUT; | ||
| 5341 | } | ||
| 5284 | } | 5342 | } |
| 5285 | 5343 | ||
| 5286 | /* Lower frame F. */ | 5344 | /* Lower frame F. */ |
| @@ -5289,7 +5347,11 @@ x_lower_frame (f) | |||
| 5289 | struct frame *f; | 5347 | struct frame *f; |
| 5290 | { | 5348 | { |
| 5291 | if (f->async_visible) | 5349 | if (f->async_visible) |
| 5292 | SendBehind (FRAME_MAC_WINDOW (f), nil); | 5350 | { |
| 5351 | BLOCK_INPUT; | ||
| 5352 | SendBehind (FRAME_MAC_WINDOW (f), nil); | ||
| 5353 | UNBLOCK_INPUT; | ||
| 5354 | } | ||
| 5293 | } | 5355 | } |
| 5294 | 5356 | ||
| 5295 | static void | 5357 | static void |
| @@ -6926,6 +6988,7 @@ x_find_ccl_program (fontp) | |||
| 6926 | /* true when cannot handle any Mac OS events */ | 6988 | /* true when cannot handle any Mac OS events */ |
| 6927 | static int handling_window_update = 0; | 6989 | static int handling_window_update = 0; |
| 6928 | 6990 | ||
| 6991 | #if 0 | ||
| 6929 | /* the flag appl_is_suspended is used both for determining the sleep | 6992 | /* the flag appl_is_suspended is used both for determining the sleep |
| 6930 | time to be passed to WaitNextEvent and whether the cursor should be | 6993 | time to be passed to WaitNextEvent and whether the cursor should be |
| 6931 | drawn when updating the display. The cursor is turned off when | 6994 | drawn when updating the display. The cursor is turned off when |
| @@ -6935,6 +6998,7 @@ static int handling_window_update = 0; | |||
| 6935 | suspended. */ | 6998 | suspended. */ |
| 6936 | static Boolean app_is_suspended = false; | 6999 | static Boolean app_is_suspended = false; |
| 6937 | static long app_sleep_time = WNE_SLEEP_AT_RESUME; | 7000 | static long app_sleep_time = WNE_SLEEP_AT_RESUME; |
| 7001 | #endif | ||
| 6938 | 7002 | ||
| 6939 | #define EXTRA_STACK_ALLOC (256 * 1024) | 7003 | #define EXTRA_STACK_ALLOC (256 * 1024) |
| 6940 | 7004 | ||
| @@ -7261,11 +7325,13 @@ is_emacs_window (WindowPtr win) | |||
| 7261 | static void | 7325 | static void |
| 7262 | do_app_resume () | 7326 | do_app_resume () |
| 7263 | { | 7327 | { |
| 7328 | /* Window-activate events will do the job. */ | ||
| 7329 | #if 0 | ||
| 7264 | WindowPtr wp; | 7330 | WindowPtr wp; |
| 7265 | struct frame *f; | 7331 | struct frame *f; |
| 7266 | 7332 | ||
| 7267 | wp = mac_front_window (); | 7333 | wp = front_emacs_window (); |
| 7268 | if (is_emacs_window (wp)) | 7334 | if (wp) |
| 7269 | { | 7335 | { |
| 7270 | f = mac_window_to_frame (wp); | 7336 | f = mac_window_to_frame (wp); |
| 7271 | 7337 | ||
| @@ -7278,16 +7344,19 @@ do_app_resume () | |||
| 7278 | 7344 | ||
| 7279 | app_is_suspended = false; | 7345 | app_is_suspended = false; |
| 7280 | app_sleep_time = WNE_SLEEP_AT_RESUME; | 7346 | app_sleep_time = WNE_SLEEP_AT_RESUME; |
| 7347 | #endif | ||
| 7281 | } | 7348 | } |
| 7282 | 7349 | ||
| 7283 | static void | 7350 | static void |
| 7284 | do_app_suspend () | 7351 | do_app_suspend () |
| 7285 | { | 7352 | { |
| 7353 | /* Window-deactivate events will do the job. */ | ||
| 7354 | #if 0 | ||
| 7286 | WindowPtr wp; | 7355 | WindowPtr wp; |
| 7287 | struct frame *f; | 7356 | struct frame *f; |
| 7288 | 7357 | ||
| 7289 | wp = mac_front_window (); | 7358 | wp = front_emacs_window (); |
| 7290 | if (is_emacs_window (wp)) | 7359 | if (wp) |
| 7291 | { | 7360 | { |
| 7292 | f = mac_window_to_frame (wp); | 7361 | f = mac_window_to_frame (wp); |
| 7293 | 7362 | ||
| @@ -7300,6 +7369,7 @@ do_app_suspend () | |||
| 7300 | 7369 | ||
| 7301 | app_is_suspended = true; | 7370 | app_is_suspended = true; |
| 7302 | app_sleep_time = WNE_SLEEP_AT_SUSPEND; | 7371 | app_sleep_time = WNE_SLEEP_AT_SUSPEND; |
| 7372 | #endif | ||
| 7303 | } | 7373 | } |
| 7304 | 7374 | ||
| 7305 | 7375 | ||
| @@ -7308,10 +7378,10 @@ do_mouse_moved (mouse_pos, f) | |||
| 7308 | Point mouse_pos; | 7378 | Point mouse_pos; |
| 7309 | FRAME_PTR *f; | 7379 | FRAME_PTR *f; |
| 7310 | { | 7380 | { |
| 7311 | WindowPtr wp = mac_front_window (); | 7381 | WindowPtr wp = front_emacs_window (); |
| 7312 | struct x_display_info *dpyinfo; | 7382 | struct x_display_info *dpyinfo; |
| 7313 | 7383 | ||
| 7314 | if (is_emacs_window (wp)) | 7384 | if (wp) |
| 7315 | { | 7385 | { |
| 7316 | *f = mac_window_to_frame (wp); | 7386 | *f = mac_window_to_frame (wp); |
| 7317 | dpyinfo = FRAME_MAC_DISPLAY_INFO (*f); | 7387 | dpyinfo = FRAME_MAC_DISPLAY_INFO (*f); |
| @@ -7373,7 +7443,7 @@ do_menu_choice (SInt32 menu_choice) | |||
| 7373 | 7443 | ||
| 7374 | default: | 7444 | default: |
| 7375 | { | 7445 | { |
| 7376 | struct frame *f = mac_window_to_frame (mac_front_window ()); | 7446 | struct frame *f = mac_window_to_frame (front_emacs_window ()); |
| 7377 | MenuHandle menu = GetMenuHandle (menu_id); | 7447 | MenuHandle menu = GetMenuHandle (menu_id); |
| 7378 | if (menu) | 7448 | if (menu) |
| 7379 | { | 7449 | { |
| @@ -7426,41 +7496,43 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out) | |||
| 7426 | GrafPtr save_port; | 7496 | GrafPtr save_port; |
| 7427 | Rect zoom_rect, port_rect; | 7497 | Rect zoom_rect, port_rect; |
| 7428 | Point top_left; | 7498 | Point top_left; |
| 7429 | int w_title_height, columns, rows, width, height, dummy, x, y; | 7499 | int w_title_height, columns, rows; |
| 7430 | struct frame *f = mac_window_to_frame (w); | 7500 | struct frame *f = mac_window_to_frame (w); |
| 7431 | 7501 | ||
| 7432 | GetPort (&save_port); | ||
| 7433 | |||
| 7434 | SetPortWindowPort (w); | ||
| 7435 | |||
| 7436 | /* Clear window to avoid flicker. */ | ||
| 7437 | #if TARGET_API_MAC_CARBON | 7502 | #if TARGET_API_MAC_CARBON |
| 7438 | { | 7503 | { |
| 7439 | Rect r; | 7504 | Point standard_size; |
| 7440 | BitMap bm; | ||
| 7441 | 7505 | ||
| 7442 | GetWindowPortBounds (w, &r); | 7506 | standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); |
| 7443 | EraseRect (&r); | 7507 | standard_size.v = FRAME_MAC_DISPLAY_INFO (f)->height; |
| 7444 | 7508 | ||
| 7445 | if (zoom_in_or_out == inZoomOut) | 7509 | if (IsWindowInStandardState (w, &standard_size, &zoom_rect)) |
| 7510 | zoom_in_or_out = inZoomIn; | ||
| 7511 | else | ||
| 7446 | { | 7512 | { |
| 7447 | /* calculate height of window's title bar (hard card it for now). */ | 7513 | /* Adjust the standard size according to character boundaries. */ |
| 7448 | w_title_height = 20 + GetMBarHeight (); | 7514 | |
| 7449 | 7515 | columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, zoom_rect.right - zoom_rect.left); | |
| 7450 | /* get maximum height of window into zoom_rect.bottom - | 7516 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, zoom_rect.bottom - zoom_rect.top); |
| 7451 | zoom_rect.top */ | 7517 | standard_size.h = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, columns); |
| 7452 | GetQDGlobalsScreenBits (&bm); | 7518 | standard_size.v = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows); |
| 7453 | zoom_rect = bm.bounds; | 7519 | GetWindowBounds (w, kWindowContentRgn, &port_rect); |
| 7454 | zoom_rect.top += w_title_height; | 7520 | if (IsWindowInStandardState (w, &standard_size, &zoom_rect) |
| 7455 | InsetRect (&zoom_rect, 8, 4); /* not too tight */ | 7521 | && port_rect.left == zoom_rect.left |
| 7456 | 7522 | && port_rect.top == zoom_rect.top) | |
| 7457 | zoom_rect.right = zoom_rect.left | 7523 | zoom_in_or_out = inZoomIn; |
| 7458 | + FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); | 7524 | else |
| 7459 | 7525 | zoom_in_or_out = inZoomOut; | |
| 7460 | SetWindowStandardState (w, &zoom_rect); | ||
| 7461 | } | 7526 | } |
| 7527 | |||
| 7528 | ZoomWindowIdeal (w, zoom_in_or_out, &standard_size); | ||
| 7462 | } | 7529 | } |
| 7463 | #else /* not TARGET_API_MAC_CARBON */ | 7530 | #else /* not TARGET_API_MAC_CARBON */ |
| 7531 | GetPort (&save_port); | ||
| 7532 | |||
| 7533 | SetPortWindowPort (w); | ||
| 7534 | |||
| 7535 | /* Clear window to avoid flicker. */ | ||
| 7464 | EraseRect (&(w->portRect)); | 7536 | EraseRect (&(w->portRect)); |
| 7465 | if (zoom_in_or_out == inZoomOut) | 7537 | if (zoom_in_or_out == inZoomOut) |
| 7466 | { | 7538 | { |
| @@ -7479,12 +7551,19 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out) | |||
| 7479 | zoom_rect.right = zoom_rect.left | 7551 | zoom_rect.right = zoom_rect.left |
| 7480 | + FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); | 7552 | + FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, DEFAULT_NUM_COLS); |
| 7481 | 7553 | ||
| 7554 | /* Adjust the standard size according to character boundaries. */ | ||
| 7555 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, zoom_rect.bottom - zoom_rect.top); | ||
| 7556 | zoom_rect.bottom = | ||
| 7557 | zoom_rect.top + FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows); | ||
| 7558 | |||
| 7482 | (**((WStateDataHandle) ((WindowPeek) w)->dataHandle)).stdState | 7559 | (**((WStateDataHandle) ((WindowPeek) w)->dataHandle)).stdState |
| 7483 | = zoom_rect; | 7560 | = zoom_rect; |
| 7484 | } | 7561 | } |
| 7485 | #endif /* not TARGET_API_MAC_CARBON */ | ||
| 7486 | 7562 | ||
| 7487 | ZoomWindow (w, zoom_in_or_out, w == mac_front_window ()); | 7563 | ZoomWindow (w, zoom_in_or_out, w == front_emacs_window ()); |
| 7564 | |||
| 7565 | SetPort (save_port); | ||
| 7566 | #endif /* not TARGET_API_MAC_CARBON */ | ||
| 7488 | 7567 | ||
| 7489 | /* retrieve window size and update application values */ | 7568 | /* retrieve window size and update application values */ |
| 7490 | #if TARGET_API_MAC_CARBON | 7569 | #if TARGET_API_MAC_CARBON |
| @@ -7495,8 +7574,7 @@ do_zoom_window (WindowPtr w, int zoom_in_or_out) | |||
| 7495 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, port_rect.bottom - port_rect.top); | 7574 | rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES (f, port_rect.bottom - port_rect.top); |
| 7496 | columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, port_rect.right - port_rect.left); | 7575 | columns = FRAME_PIXEL_WIDTH_TO_TEXT_COLS (f, port_rect.right - port_rect.left); |
| 7497 | x_set_window_size (f, 0, columns, rows); | 7576 | x_set_window_size (f, 0, columns, rows); |
| 7498 | 7577 | x_real_positions (f, &f->left_pos, &f->top_pos); | |
| 7499 | SetPort (save_port); | ||
| 7500 | } | 7578 | } |
| 7501 | 7579 | ||
| 7502 | /* Initialize Drag And Drop to allow files to be dropped onto emacs frames */ | 7580 | /* Initialize Drag And Drop to allow files to be dropped onto emacs frames */ |
| @@ -8046,19 +8124,15 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8046 | if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) | 8124 | if (NILP (Fboundp (Qmac_ready_for_drag_n_drop))) |
| 8047 | event_mask -= highLevelEventMask; | 8125 | event_mask -= highLevelEventMask; |
| 8048 | 8126 | ||
| 8049 | while (WaitNextEvent (event_mask, &er, | 8127 | while (WaitNextEvent (event_mask, &er, 0L, NULL)) |
| 8050 | (expected ? app_sleep_time : 0L), NULL)) | 8128 | #else /* USE_CARBON_EVENTS */ |
| 8051 | #else | 8129 | while (!ReceiveNextEvent (0, NULL, kEventDurationNoWait, |
| 8052 | while (!ReceiveNextEvent (0, NULL, | ||
| 8053 | (expected ? TicksToEventTime (app_sleep_time) : 0), | ||
| 8054 | kEventRemoveFromQueue, &eventRef)) | 8130 | kEventRemoveFromQueue, &eventRef)) |
| 8055 | #endif /* !USE_CARBON_EVENTS */ | 8131 | #endif /* USE_CARBON_EVENTS */ |
| 8056 | { | 8132 | { |
| 8057 | int do_help = 0; | 8133 | int do_help = 0; |
| 8058 | struct frame *f; | 8134 | struct frame *f; |
| 8059 | 8135 | ||
| 8060 | expected = 0; | ||
| 8061 | |||
| 8062 | /* It is necessary to set this (additional) argument slot of an | 8136 | /* It is necessary to set this (additional) argument slot of an |
| 8063 | event to nil because keyboard.c protects incompletely | 8137 | event to nil because keyboard.c protects incompletely |
| 8064 | processed event from being garbage collected by placing them | 8138 | processed event from being garbage collected by placing them |
| @@ -8073,7 +8147,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8073 | switch (GetEventClass (eventRef)) | 8147 | switch (GetEventClass (eventRef)) |
| 8074 | { | 8148 | { |
| 8075 | case kEventClassWindow: | 8149 | case kEventClassWindow: |
| 8076 | if (GetEventKind (eventRef) == kEventWindowBoundsChanged) | 8150 | if (GetEventKind (eventRef) == kEventWindowBoundsChanged) |
| 8077 | { | 8151 | { |
| 8078 | WindowPtr window_ptr; | 8152 | WindowPtr window_ptr; |
| 8079 | GetEventParameter(eventRef, kEventParamDirectObject, | 8153 | GetEventParameter(eventRef, kEventParamDirectObject, |
| @@ -8081,13 +8155,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8081 | NULL, &window_ptr); | 8155 | NULL, &window_ptr); |
| 8082 | f = mac_window_to_frame (window_ptr); | 8156 | f = mac_window_to_frame (window_ptr); |
| 8083 | if (f && !f->async_iconified) | 8157 | if (f && !f->async_iconified) |
| 8084 | { | 8158 | x_real_positions (f, &f->left_pos, &f->top_pos); |
| 8085 | int x, y; | ||
| 8086 | |||
| 8087 | x_real_positions (f, &x, &y); | ||
| 8088 | f->left_pos = x; | ||
| 8089 | f->top_pos = y; | ||
| 8090 | } | ||
| 8091 | SendEventToEventTarget (eventRef, toolbox_dispatcher); | 8159 | SendEventToEventTarget (eventRef, toolbox_dispatcher); |
| 8092 | } | 8160 | } |
| 8093 | break; | 8161 | break; |
| @@ -8096,7 +8164,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8096 | { | 8164 | { |
| 8097 | SInt32 delta; | 8165 | SInt32 delta; |
| 8098 | Point point; | 8166 | Point point; |
| 8099 | WindowPtr window_ptr = mac_front_window (); | 8167 | WindowPtr window_ptr = front_emacs_window (); |
| 8100 | 8168 | ||
| 8101 | if (!IsValidWindowPtr (window_ptr)) | 8169 | if (!IsValidWindowPtr (window_ptr)) |
| 8102 | { | 8170 | { |
| @@ -8158,33 +8226,28 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8158 | } | 8226 | } |
| 8159 | else | 8227 | else |
| 8160 | { | 8228 | { |
| 8161 | window_ptr = FrontWindow (); | 8229 | part_code = FindWindow (er.where, &window_ptr); |
| 8162 | if (tip_window && window_ptr == tip_window) | 8230 | if (tip_window && window_ptr == tip_window) |
| 8163 | { | 8231 | { |
| 8164 | HideWindow (tip_window); | 8232 | HideWindow (tip_window); |
| 8165 | window_ptr = FrontWindow (); | 8233 | part_code = FindWindow (er.where, &window_ptr); |
| 8166 | } | 8234 | } |
| 8167 | |||
| 8168 | if (!is_emacs_window (window_ptr)) | ||
| 8169 | break; | ||
| 8170 | |||
| 8171 | part_code = FindWindow (er.where, &window_ptr); | ||
| 8172 | } | 8235 | } |
| 8173 | 8236 | ||
| 8237 | if (er.what != mouseDown && part_code != inContent) | ||
| 8238 | break; | ||
| 8239 | |||
| 8174 | switch (part_code) | 8240 | switch (part_code) |
| 8175 | { | 8241 | { |
| 8176 | case inMenuBar: | 8242 | case inMenuBar: |
| 8177 | if (er.what == mouseDown) | 8243 | f = mac_window_to_frame (front_emacs_window ()); |
| 8178 | { | 8244 | saved_menu_event_location = er.where; |
| 8179 | f = mac_window_to_frame (mac_front_window ()); | 8245 | inev.kind = MENU_BAR_ACTIVATE_EVENT; |
| 8180 | saved_menu_event_location = er.where; | 8246 | XSETFRAME (inev.frame_or_window, f); |
| 8181 | inev.kind = MENU_BAR_ACTIVATE_EVENT; | ||
| 8182 | XSETFRAME (inev.frame_or_window, f); | ||
| 8183 | } | ||
| 8184 | break; | 8247 | break; |
| 8185 | 8248 | ||
| 8186 | case inContent: | 8249 | case inContent: |
| 8187 | if (window_ptr != mac_front_window ()) | 8250 | if (window_ptr != front_emacs_window ()) |
| 8188 | SelectWindow (window_ptr); | 8251 | SelectWindow (window_ptr); |
| 8189 | else | 8252 | else |
| 8190 | { | 8253 | { |
| @@ -8281,7 +8344,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8281 | } | 8344 | } |
| 8282 | else | 8345 | else |
| 8283 | { | 8346 | { |
| 8284 | if (dpyinfo->grabbed & (1 << inev.code) == 0) | 8347 | if ((dpyinfo->grabbed & (1 << inev.code)) == 0) |
| 8285 | /* If a button is released though it was not | 8348 | /* If a button is released though it was not |
| 8286 | previously pressed, that would be because | 8349 | previously pressed, that would be because |
| 8287 | of multi-button emulation. */ | 8350 | of multi-button emulation. */ |
| @@ -8304,27 +8367,16 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8304 | 8367 | ||
| 8305 | case inDrag: | 8368 | case inDrag: |
| 8306 | #if TARGET_API_MAC_CARBON | 8369 | #if TARGET_API_MAC_CARBON |
| 8307 | if (er.what == mouseDown) | 8370 | DragWindow (window_ptr, er.where, NULL); |
| 8308 | { | ||
| 8309 | BitMap bm; | ||
| 8310 | |||
| 8311 | GetQDGlobalsScreenBits (&bm); | ||
| 8312 | DragWindow (window_ptr, er.where, &bm.bounds); | ||
| 8313 | } | ||
| 8314 | #else /* not TARGET_API_MAC_CARBON */ | 8371 | #else /* not TARGET_API_MAC_CARBON */ |
| 8315 | DragWindow (window_ptr, er.where, &qd.screenBits.bounds); | 8372 | DragWindow (window_ptr, er.where, &qd.screenBits.bounds); |
| 8316 | #endif /* not TARGET_API_MAC_CARBON */ | 8373 | #endif /* not TARGET_API_MAC_CARBON */ |
| 8317 | /* Update the frame parameters. */ | 8374 | /* Update the frame parameters. */ |
| 8318 | { | 8375 | { |
| 8319 | struct frame *f = mac_window_to_frame (window_ptr); | 8376 | struct frame *f = mac_window_to_frame (window_ptr); |
| 8377 | |||
| 8320 | if (f && !f->async_iconified) | 8378 | if (f && !f->async_iconified) |
| 8321 | { | 8379 | x_real_positions (f, &f->left_pos, &f->top_pos); |
| 8322 | int x, y; | ||
| 8323 | |||
| 8324 | x_real_positions (f, &x, &y); | ||
| 8325 | f->left_pos = x; | ||
| 8326 | f->top_pos = y; | ||
| 8327 | } | ||
| 8328 | } | 8380 | } |
| 8329 | break; | 8381 | break; |
| 8330 | 8382 | ||
| @@ -8339,11 +8391,8 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8339 | 8391 | ||
| 8340 | /* window resize handling added --ben */ | 8392 | /* window resize handling added --ben */ |
| 8341 | case inGrow: | 8393 | case inGrow: |
| 8342 | if (er.what == mouseDown) | 8394 | do_grow_window (window_ptr, &er); |
| 8343 | { | 8395 | break; |
| 8344 | do_grow_window(window_ptr, &er); | ||
| 8345 | break; | ||
| 8346 | } | ||
| 8347 | 8396 | ||
| 8348 | /* window zoom handling added --ben */ | 8397 | /* window zoom handling added --ben */ |
| 8349 | case inZoomIn: | 8398 | case inZoomIn: |
| @@ -8415,7 +8464,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8415 | 8464 | ||
| 8416 | if (!is_emacs_window (window_ptr)) | 8465 | if (!is_emacs_window (window_ptr)) |
| 8417 | break; | 8466 | break; |
| 8418 | 8467 | ||
| 8419 | f = mac_window_to_frame (window_ptr); | 8468 | f = mac_window_to_frame (window_ptr); |
| 8420 | 8469 | ||
| 8421 | if ((er.modifiers & activeFlag) != 0) | 8470 | if ((er.modifiers & activeFlag) != 0) |
| @@ -8486,7 +8535,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8486 | #endif | 8535 | #endif |
| 8487 | 8536 | ||
| 8488 | #if TARGET_API_MAC_CARBON | 8537 | #if TARGET_API_MAC_CARBON |
| 8489 | if (!IsValidWindowPtr (mac_front_window ())) | 8538 | if (!IsValidWindowPtr (front_emacs_window ())) |
| 8490 | { | 8539 | { |
| 8491 | SysBeep (1); | 8540 | SysBeep (1); |
| 8492 | break; | 8541 | break; |
| @@ -8590,7 +8639,7 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8590 | inev.modifiers = mac_to_emacs_modifiers (er.modifiers); | 8639 | inev.modifiers = mac_to_emacs_modifiers (er.modifiers); |
| 8591 | #endif | 8640 | #endif |
| 8592 | XSETFRAME (inev.frame_or_window, | 8641 | XSETFRAME (inev.frame_or_window, |
| 8593 | mac_window_to_frame (mac_front_window ())); | 8642 | mac_window_to_frame (front_emacs_window ())); |
| 8594 | inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ | 8643 | inev.timestamp = er.when * (1000 / 60); /* ticks to milliseconds */ |
| 8595 | break; | 8644 | break; |
| 8596 | 8645 | ||
| @@ -8607,16 +8656,16 @@ XTread_socket (sd, expected, hold_quit) | |||
| 8607 | WindowPtr wp; | 8656 | WindowPtr wp; |
| 8608 | Lisp_Object frame; | 8657 | Lisp_Object frame; |
| 8609 | 8658 | ||
| 8610 | wp = mac_front_window (); | 8659 | wp = front_emacs_window (); |
| 8611 | 8660 | ||
| 8612 | if (!wp) | 8661 | if (!wp) |
| 8613 | { | 8662 | { |
| 8614 | struct frame *f = XFRAME (XCAR (Vframe_list)); | 8663 | struct frame *f = XFRAME (XCAR (Vframe_list)); |
| 8615 | CollapseWindow (FRAME_MAC_WINDOW (f), false); | 8664 | CollapseWindow (FRAME_MAC_WINDOW (f), false); |
| 8616 | wp = mac_front_window (); | 8665 | wp = front_emacs_window (); |
| 8617 | } | 8666 | } |
| 8618 | 8667 | ||
| 8619 | if (wp && is_emacs_window (wp)) | 8668 | if (wp) |
| 8620 | f = mac_window_to_frame (wp); | 8669 | f = mac_window_to_frame (wp); |
| 8621 | 8670 | ||
| 8622 | inev.kind = DRAG_N_DROP_EVENT; | 8671 | inev.kind = DRAG_N_DROP_EVENT; |
| @@ -8742,6 +8791,7 @@ make_mac_frame (FRAME_PTR fp) | |||
| 8742 | 8791 | ||
| 8743 | mwp = fp->output_data.mac; | 8792 | mwp = fp->output_data.mac; |
| 8744 | 8793 | ||
| 8794 | BLOCK_INPUT; | ||
| 8745 | if (making_terminal_window) | 8795 | if (making_terminal_window) |
| 8746 | { | 8796 | { |
| 8747 | if (!(mwp->mWP = GetNewCWindow (TERM_WINDOW_RESOURCE, NULL, | 8797 | if (!(mwp->mWP = GetNewCWindow (TERM_WINDOW_RESOURCE, NULL, |
| @@ -8769,9 +8819,8 @@ make_mac_frame (FRAME_PTR fp) | |||
| 8769 | /* so that update events can find this mac_output struct */ | 8819 | /* so that update events can find this mac_output struct */ |
| 8770 | mwp->mFP = fp; /* point back to emacs frame */ | 8820 | mwp->mFP = fp; /* point back to emacs frame */ |
| 8771 | 8821 | ||
| 8772 | SetPortWindowPort (mwp->mWP); | ||
| 8773 | |||
| 8774 | SizeWindow (mwp->mWP, FRAME_PIXEL_WIDTH (fp), FRAME_PIXEL_HEIGHT (fp), false); | 8822 | SizeWindow (mwp->mWP, FRAME_PIXEL_WIDTH (fp), FRAME_PIXEL_HEIGHT (fp), false); |
| 8823 | UNBLOCK_INPUT; | ||
| 8775 | } | 8824 | } |
| 8776 | 8825 | ||
| 8777 | 8826 | ||
| @@ -9073,7 +9122,7 @@ mac_check_for_quit_char () | |||
| 9073 | e.arg = Qnil; | 9122 | e.arg = Qnil; |
| 9074 | e.modifiers = NULL; | 9123 | e.modifiers = NULL; |
| 9075 | e.timestamp = EventTimeToTicks (GetEventTime (event)) * (1000/60); | 9124 | e.timestamp = EventTimeToTicks (GetEventTime (event)) * (1000/60); |
| 9076 | XSETFRAME (e.frame_or_window, mac_window_to_frame (mac_front_window ())); | 9125 | XSETFRAME (e.frame_or_window, mac_window_to_frame (front_emacs_window ())); |
| 9077 | /* Remove event from queue to prevent looping. */ | 9126 | /* Remove event from queue to prevent looping. */ |
| 9078 | RemoveEventFromQueue (GetMainEventQueue (), event); | 9127 | RemoveEventFromQueue (GetMainEventQueue (), event); |
| 9079 | ReleaseEvent (event); | 9128 | ReleaseEvent (event); |
| @@ -9194,6 +9243,7 @@ mac_initialize () | |||
| 9194 | signal (SIGPIPE, x_connection_signal); | 9243 | signal (SIGPIPE, x_connection_signal); |
| 9195 | #endif | 9244 | #endif |
| 9196 | 9245 | ||
| 9246 | BLOCK_INPUT; | ||
| 9197 | mac_initialize_display_info (); | 9247 | mac_initialize_display_info (); |
| 9198 | 9248 | ||
| 9199 | #if TARGET_API_MAC_CARBON | 9249 | #if TARGET_API_MAC_CARBON |
| @@ -9212,6 +9262,7 @@ mac_initialize () | |||
| 9212 | if (!inhibit_window_system) | 9262 | if (!inhibit_window_system) |
| 9213 | MakeMeTheFrontProcess (); | 9263 | MakeMeTheFrontProcess (); |
| 9214 | #endif | 9264 | #endif |
| 9265 | UNBLOCK_INPUT; | ||
| 9215 | } | 9266 | } |
| 9216 | 9267 | ||
| 9217 | 9268 | ||
diff --git a/src/textprop.c b/src/textprop.c index c8ec008dcbd..317f8fa6aa3 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Interface code for dealing with text properties. | 1 | /* Interface code for dealing with text properties. |
| 2 | Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003 | 2 | Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003, 2004 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -2233,7 +2233,9 @@ If a character in a buffer has PROPERTY, new text inserted adjacent to | |||
| 2233 | the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil, | 2233 | the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil, |
| 2234 | inherits it if NONSTICKINESS is nil. The front-sticky and | 2234 | inherits it if NONSTICKINESS is nil. The front-sticky and |
| 2235 | rear-nonsticky properties of the character overrides NONSTICKINESS. */); | 2235 | rear-nonsticky properties of the character overrides NONSTICKINESS. */); |
| 2236 | Vtext_property_default_nonsticky = Qnil; | 2236 | /* Text property `syntax-table' should be nonsticky by default. */ |
| 2237 | Vtext_property_default_nonsticky | ||
| 2238 | = Fcons (Fcons (intern ("syntax-table"), Qt), Qnil); | ||
| 2237 | 2239 | ||
| 2238 | staticpro (&interval_insert_behind_hooks); | 2240 | staticpro (&interval_insert_behind_hooks); |
| 2239 | staticpro (&interval_insert_in_front_hooks); | 2241 | staticpro (&interval_insert_in_front_hooks); |
diff --git a/src/unexmacosx.c b/src/unexmacosx.c index b41c586d2e0..1f2b4c96620 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c | |||
| @@ -99,7 +99,12 @@ Boston, MA 02111-1307, USA. */ | |||
| 99 | #if defined (__ppc__) | 99 | #if defined (__ppc__) |
| 100 | #include <mach-o/ppc/reloc.h> | 100 | #include <mach-o/ppc/reloc.h> |
| 101 | #endif | 101 | #endif |
| 102 | #if defined (HAVE_MALLOC_MALLOC_H) | ||
| 103 | #include <malloc/malloc.h> | ||
| 104 | #else | ||
| 102 | #include <objc/malloc.h> | 105 | #include <objc/malloc.h> |
| 106 | #endif | ||
| 107 | |||
| 103 | 108 | ||
| 104 | #define VERBOSE 1 | 109 | #define VERBOSE 1 |
| 105 | 110 | ||
diff --git a/src/w32term.c b/src/w32term.c index 1d6b4ec7535..574457f727f 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -567,9 +567,8 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) | |||
| 567 | output_cursor.vpos, | 567 | output_cursor.vpos, |
| 568 | output_cursor.x, output_cursor.y); | 568 | output_cursor.x, output_cursor.y); |
| 569 | 569 | ||
| 570 | x_draw_vertical_border (w); | 570 | if (draw_window_fringes (w, 1)) |
| 571 | 571 | x_draw_vertical_border (w); | |
| 572 | draw_window_fringes (w); | ||
| 573 | 572 | ||
| 574 | UNBLOCK_INPUT; | 573 | UNBLOCK_INPUT; |
| 575 | } | 574 | } |
diff --git a/src/window.c b/src/window.c index e7246b7c657..55d7d7d2799 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -607,9 +607,6 @@ coordinates_in_window (w, x, y) | |||
| 607 | int grabbable_width = ux; | 607 | int grabbable_width = ux; |
| 608 | int lmargin_width, rmargin_width, text_left, text_right; | 608 | int lmargin_width, rmargin_width, text_left, text_right; |
| 609 | 609 | ||
| 610 | if (*x < x0 || *x >= x1) | ||
| 611 | return ON_NOTHING; | ||
| 612 | |||
| 613 | /* In what's below, we subtract 1 when computing right_x because we | 610 | /* In what's below, we subtract 1 when computing right_x because we |
| 614 | want the rightmost pixel, which is given by left_pixel+width-1. */ | 611 | want the rightmost pixel, which is given by left_pixel+width-1. */ |
| 615 | if (w->pseudo_window_p) | 612 | if (w->pseudo_window_p) |
| @@ -659,6 +656,9 @@ coordinates_in_window (w, x, y) | |||
| 659 | return ON_VERTICAL_BORDER; | 656 | return ON_VERTICAL_BORDER; |
| 660 | } | 657 | } |
| 661 | 658 | ||
| 659 | if (*x < x0 || *x >= x1) | ||
| 660 | return ON_NOTHING; | ||
| 661 | |||
| 662 | /* Convert X and Y to window relative coordinates. | 662 | /* Convert X and Y to window relative coordinates. |
| 663 | Mode line starts at left edge of window. */ | 663 | Mode line starts at left edge of window. */ |
| 664 | *x -= x0; | 664 | *x -= x0; |
| @@ -673,6 +673,9 @@ coordinates_in_window (w, x, y) | |||
| 673 | goto header_vertical_border_check; | 673 | goto header_vertical_border_check; |
| 674 | } | 674 | } |
| 675 | 675 | ||
| 676 | if (*x < x0 || *x >= x1) | ||
| 677 | return ON_NOTHING; | ||
| 678 | |||
| 676 | /* Outside any interesting column? */ | 679 | /* Outside any interesting column? */ |
| 677 | if (*x < left_x || *x > right_x) | 680 | if (*x < left_x || *x > right_x) |
| 678 | return ON_SCROLL_BAR; | 681 | return ON_SCROLL_BAR; |
| @@ -6034,9 +6037,9 @@ display marginal areas and the text area. */) | |||
| 6034 | struct window *w = decode_window (window); | 6037 | struct window *w = decode_window (window); |
| 6035 | 6038 | ||
| 6036 | if (!NILP (left)) | 6039 | if (!NILP (left)) |
| 6037 | CHECK_NUMBER (left); | 6040 | CHECK_NATNUM (left); |
| 6038 | if (!NILP (right)) | 6041 | if (!NILP (right)) |
| 6039 | CHECK_NUMBER (right); | 6042 | CHECK_NATNUM (right); |
| 6040 | 6043 | ||
| 6041 | if (!EQ (w->left_fringe_width, left) | 6044 | if (!EQ (w->left_fringe_width, left) |
| 6042 | || !EQ (w->right_fringe_width, right) | 6045 | || !EQ (w->right_fringe_width, right) |
| @@ -6096,7 +6099,7 @@ If TYPE is t, use the frame's scroll-bar type. */) | |||
| 6096 | struct window *w = decode_window (window); | 6099 | struct window *w = decode_window (window); |
| 6097 | 6100 | ||
| 6098 | if (!NILP (width)) | 6101 | if (!NILP (width)) |
| 6099 | CHECK_NUMBER (width); | 6102 | CHECK_NATNUM (width); |
| 6100 | 6103 | ||
| 6101 | if (XINT (width) == 0) | 6104 | if (XINT (width) == 0) |
| 6102 | vertical_type = Qnil; | 6105 | vertical_type = Qnil; |
diff --git a/src/xdisp.c b/src/xdisp.c index 04c313ef18b..008195eba73 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -216,6 +216,8 @@ extern int pending_menu_activation; | |||
| 216 | extern int interrupt_input; | 216 | extern int interrupt_input; |
| 217 | extern int command_loop_level; | 217 | extern int command_loop_level; |
| 218 | 218 | ||
| 219 | extern Lisp_Object do_mouse_tracking; | ||
| 220 | |||
| 219 | extern int minibuffer_auto_raise; | 221 | extern int minibuffer_auto_raise; |
| 220 | extern Lisp_Object Vminibuffer_list; | 222 | extern Lisp_Object Vminibuffer_list; |
| 221 | 223 | ||
| @@ -10517,6 +10519,9 @@ redisplay_preserve_echo_area (from_where) | |||
| 10517 | } | 10519 | } |
| 10518 | else | 10520 | else |
| 10519 | redisplay_internal (1); | 10521 | redisplay_internal (1); |
| 10522 | |||
| 10523 | if (rif != NULL && rif->flush_display_optional) | ||
| 10524 | rif->flush_display_optional (NULL); | ||
| 10520 | } | 10525 | } |
| 10521 | 10526 | ||
| 10522 | 10527 | ||
| @@ -12320,7 +12325,8 @@ redisplay_window (window, just_this_one_p) | |||
| 12320 | { | 12325 | { |
| 12321 | update_begin (f); | 12326 | update_begin (f); |
| 12322 | BLOCK_INPUT; | 12327 | BLOCK_INPUT; |
| 12323 | draw_window_fringes (w); | 12328 | if (draw_window_fringes (w, 1)) |
| 12329 | x_draw_vertical_border (w); | ||
| 12324 | UNBLOCK_INPUT; | 12330 | UNBLOCK_INPUT; |
| 12325 | update_end (f); | 12331 | update_end (f); |
| 12326 | } | 12332 | } |
| @@ -18800,8 +18806,10 @@ calc_line_height_property (it, prop, font, boff, total) | |||
| 18800 | 18806 | ||
| 18801 | if (STRINGP (it->object)) | 18807 | if (STRINGP (it->object)) |
| 18802 | position = make_number (IT_STRING_CHARPOS (*it)); | 18808 | position = make_number (IT_STRING_CHARPOS (*it)); |
| 18803 | else | 18809 | else if (BUFFERP (it->object)) |
| 18804 | position = make_number (IT_CHARPOS (*it)); | 18810 | position = make_number (IT_CHARPOS (*it)); |
| 18811 | else | ||
| 18812 | return Qnil; | ||
| 18805 | 18813 | ||
| 18806 | val = Fget_char_property (position, prop, it->object); | 18814 | val = Fget_char_property (position, prop, it->object); |
| 18807 | 18815 | ||
| @@ -20912,6 +20920,10 @@ define_frame_cursor1 (f, cursor, pointer) | |||
| 20912 | Cursor cursor; | 20920 | Cursor cursor; |
| 20913 | Lisp_Object pointer; | 20921 | Lisp_Object pointer; |
| 20914 | { | 20922 | { |
| 20923 | /* Do not change cursor shape while dragging mouse. */ | ||
| 20924 | if (!NILP (do_mouse_tracking)) | ||
| 20925 | return; | ||
| 20926 | |||
| 20915 | if (!NILP (pointer)) | 20927 | if (!NILP (pointer)) |
| 20916 | { | 20928 | { |
| 20917 | if (EQ (pointer, Qarrow)) | 20929 | if (EQ (pointer, Qarrow)) |
| @@ -21773,6 +21785,9 @@ x_draw_vertical_border (w) | |||
| 21773 | do it for frames with vertical scroll bars because either the | 21785 | do it for frames with vertical scroll bars because either the |
| 21774 | right scroll bar of a window, or the left scroll bar of its | 21786 | right scroll bar of a window, or the left scroll bar of its |
| 21775 | neighbor will suffice as a border. */ | 21787 | neighbor will suffice as a border. */ |
| 21788 | if (FRAME_HAS_VERTICAL_SCROLL_BARS (XFRAME (w->frame))) | ||
| 21789 | return; | ||
| 21790 | |||
| 21776 | if (!WINDOW_RIGHTMOST_P (w) | 21791 | if (!WINDOW_RIGHTMOST_P (w) |
| 21777 | && !WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) | 21792 | && !WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) |
| 21778 | { | 21793 | { |
diff --git a/src/xfns.c b/src/xfns.c index b0864cbdffe..e41540a9942 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -5551,7 +5551,7 @@ Chinese, Japanese, and Korean. */); | |||
| 5551 | last_show_tip_args = Qnil; | 5551 | last_show_tip_args = Qnil; |
| 5552 | staticpro (&last_show_tip_args); | 5552 | staticpro (&last_show_tip_args); |
| 5553 | 5553 | ||
| 5554 | #ifdef USE_MOTIF | 5554 | #if defined (USE_MOTIF) || defined (USE_GTK) |
| 5555 | defsubr (&Sx_file_dialog); | 5555 | defsubr (&Sx_file_dialog); |
| 5556 | #endif | 5556 | #endif |
| 5557 | } | 5557 | } |
diff --git a/src/xterm.c b/src/xterm.c index cf7ec09cf46..ef469a2b82e 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -572,9 +572,8 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) | |||
| 572 | output_cursor.vpos, | 572 | output_cursor.vpos, |
| 573 | output_cursor.x, output_cursor.y); | 573 | output_cursor.x, output_cursor.y); |
| 574 | 574 | ||
| 575 | x_draw_vertical_border (w); | 575 | if (draw_window_fringes (w, 1)) |
| 576 | 576 | x_draw_vertical_border (w); | |
| 577 | draw_window_fringes (w); | ||
| 578 | 577 | ||
| 579 | UNBLOCK_INPUT; | 578 | UNBLOCK_INPUT; |
| 580 | } | 579 | } |
| @@ -3389,12 +3388,14 @@ x_find_modifier_meanings (dpyinfo) | |||
| 3389 | Alt keysyms are on. */ | 3388 | Alt keysyms are on. */ |
| 3390 | { | 3389 | { |
| 3391 | int row, col; /* The row and column in the modifier table. */ | 3390 | int row, col; /* The row and column in the modifier table. */ |
| 3391 | int found_alt_or_meta; | ||
| 3392 | 3392 | ||
| 3393 | for (row = 3; row < 8; row++) | 3393 | for (row = 3; row < 8; row++) |
| 3394 | { | ||
| 3395 | found_alt_or_meta = 0; | ||
| 3394 | for (col = 0; col < mods->max_keypermod; col++) | 3396 | for (col = 0; col < mods->max_keypermod; col++) |
| 3395 | { | 3397 | { |
| 3396 | KeyCode code | 3398 | KeyCode code = mods->modifiermap[(row * mods->max_keypermod) + col]; |
| 3397 | = mods->modifiermap[(row * mods->max_keypermod) + col]; | ||
| 3398 | 3399 | ||
| 3399 | /* Zeroes are used for filler. Skip them. */ | 3400 | /* Zeroes are used for filler. Skip them. */ |
| 3400 | if (code == 0) | 3401 | if (code == 0) |
| @@ -3412,33 +3413,44 @@ x_find_modifier_meanings (dpyinfo) | |||
| 3412 | { | 3413 | { |
| 3413 | case XK_Meta_L: | 3414 | case XK_Meta_L: |
| 3414 | case XK_Meta_R: | 3415 | case XK_Meta_R: |
| 3416 | found_alt_or_meta = 1; | ||
| 3415 | dpyinfo->meta_mod_mask |= (1 << row); | 3417 | dpyinfo->meta_mod_mask |= (1 << row); |
| 3416 | break; | 3418 | break; |
| 3417 | 3419 | ||
| 3418 | case XK_Alt_L: | 3420 | case XK_Alt_L: |
| 3419 | case XK_Alt_R: | 3421 | case XK_Alt_R: |
| 3422 | found_alt_or_meta = 1; | ||
| 3420 | dpyinfo->alt_mod_mask |= (1 << row); | 3423 | dpyinfo->alt_mod_mask |= (1 << row); |
| 3421 | break; | 3424 | break; |
| 3422 | 3425 | ||
| 3423 | case XK_Hyper_L: | 3426 | case XK_Hyper_L: |
| 3424 | case XK_Hyper_R: | 3427 | case XK_Hyper_R: |
| 3425 | dpyinfo->hyper_mod_mask |= (1 << row); | 3428 | if (!found_alt_or_meta) |
| 3429 | dpyinfo->hyper_mod_mask |= (1 << row); | ||
| 3430 | code_col = syms_per_code; | ||
| 3431 | col = mods->max_keypermod; | ||
| 3426 | break; | 3432 | break; |
| 3427 | 3433 | ||
| 3428 | case XK_Super_L: | 3434 | case XK_Super_L: |
| 3429 | case XK_Super_R: | 3435 | case XK_Super_R: |
| 3430 | dpyinfo->super_mod_mask |= (1 << row); | 3436 | if (!found_alt_or_meta) |
| 3437 | dpyinfo->super_mod_mask |= (1 << row); | ||
| 3438 | code_col = syms_per_code; | ||
| 3439 | col = mods->max_keypermod; | ||
| 3431 | break; | 3440 | break; |
| 3432 | 3441 | ||
| 3433 | case XK_Shift_Lock: | 3442 | case XK_Shift_Lock: |
| 3434 | /* Ignore this if it's not on the lock modifier. */ | 3443 | /* Ignore this if it's not on the lock modifier. */ |
| 3435 | if ((1 << row) == LockMask) | 3444 | if (!found_alt_or_meta && ((1 << row) == LockMask)) |
| 3436 | dpyinfo->shift_lock_mask = LockMask; | 3445 | dpyinfo->shift_lock_mask = LockMask; |
| 3446 | code_col = syms_per_code; | ||
| 3447 | col = mods->max_keypermod; | ||
| 3437 | break; | 3448 | break; |
| 3438 | } | 3449 | } |
| 3439 | } | 3450 | } |
| 3440 | } | 3451 | } |
| 3441 | } | 3452 | } |
| 3453 | } | ||
| 3442 | } | 3454 | } |
| 3443 | 3455 | ||
| 3444 | /* If we couldn't find any meta keys, accept any alt keys as meta keys. */ | 3456 | /* If we couldn't find any meta keys, accept any alt keys as meta keys. */ |
| @@ -5052,9 +5064,15 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5052 | /* Compute the left edge of the scroll bar. */ | 5064 | /* Compute the left edge of the scroll bar. */ |
| 5053 | #ifdef USE_TOOLKIT_SCROLL_BARS | 5065 | #ifdef USE_TOOLKIT_SCROLL_BARS |
| 5054 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) | 5066 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) |
| 5055 | sb_left = left + width - sb_width - (width - sb_width) / 2; | 5067 | sb_left = (left + |
| 5068 | (WINDOW_RIGHTMOST_P (w) | ||
| 5069 | ? width - sb_width - (width - sb_width) / 2 | ||
| 5070 | : 0)); | ||
| 5056 | else | 5071 | else |
| 5057 | sb_left = left + (width - sb_width) / 2; | 5072 | sb_left = (left + |
| 5073 | (WINDOW_LEFTMOST_P (w) | ||
| 5074 | ? (width - sb_width) / 2 | ||
| 5075 | : width - sb_width)); | ||
| 5058 | #else | 5076 | #else |
| 5059 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) | 5077 | if (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)) |
| 5060 | sb_left = left + width - sb_width; | 5078 | sb_left = left + width - sb_width; |
| @@ -5107,19 +5125,20 @@ XTset_vertical_scroll_bar (w, portion, whole, position) | |||
| 5107 | width); | 5125 | width); |
| 5108 | #else /* not USE_GTK */ | 5126 | #else /* not USE_GTK */ |
| 5109 | 5127 | ||
| 5110 | /* Since toolkit scroll bars are smaller than the space reserved | ||
| 5111 | for them on the frame, we have to clear "under" them. */ | ||
| 5112 | if (width > 0 && height > 0) | ||
| 5113 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | ||
| 5114 | left, top, width, height, False); | ||
| 5115 | /* Move/size the scroll bar widget. */ | 5128 | /* Move/size the scroll bar widget. */ |
| 5116 | if (mask) | 5129 | if (mask) |
| 5130 | { | ||
| 5131 | /* Since toolkit scroll bars are smaller than the space reserved | ||
| 5132 | for them on the frame, we have to clear "under" them. */ | ||
| 5133 | if (width > 0 && height > 0) | ||
| 5134 | x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), | ||
| 5135 | left, top, width, height, False); | ||
| 5117 | XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar), | 5136 | XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar), |
| 5118 | sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, | 5137 | sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, |
| 5119 | top, | 5138 | top, |
| 5120 | sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, | 5139 | sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, |
| 5121 | max (height, 1), 0); | 5140 | max (height, 1), 0); |
| 5122 | 5141 | } | |
| 5123 | #endif /* not USE_GTK */ | 5142 | #endif /* not USE_GTK */ |
| 5124 | #else /* not USE_TOOLKIT_SCROLL_BARS */ | 5143 | #else /* not USE_TOOLKIT_SCROLL_BARS */ |
| 5125 | 5144 | ||
| @@ -10918,7 +10937,7 @@ static struct redisplay_interface x_redisplay_interface = | |||
| 10918 | x_update_window_end, | 10937 | x_update_window_end, |
| 10919 | x_cursor_to, | 10938 | x_cursor_to, |
| 10920 | x_flush, | 10939 | x_flush, |
| 10921 | #ifndef XFlush | 10940 | #ifdef XFlush |
| 10922 | x_flush, | 10941 | x_flush, |
| 10923 | #else | 10942 | #else |
| 10924 | 0, /* flush_display_optional */ | 10943 | 0, /* flush_display_optional */ |
diff --git a/src/xterm.h b/src/xterm.h index d87135e8bf6..76cba8a2517 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -21,8 +21,8 @@ Boston, MA 02111-1307, USA. */ | |||
| 21 | 21 | ||
| 22 | #include <X11/Xlib.h> | 22 | #include <X11/Xlib.h> |
| 23 | #include <X11/cursorfont.h> | 23 | #include <X11/cursorfont.h> |
| 24 | #include <X11/Xutil.h> | ||
| 25 | #include <X11/keysym.h> | 24 | #include <X11/keysym.h> |
| 25 | #include <X11/Xutil.h> | ||
| 26 | #include <X11/Xatom.h> | 26 | #include <X11/Xatom.h> |
| 27 | #include <X11/Xresource.h> | 27 | #include <X11/Xresource.h> |
| 28 | 28 | ||