Now on revision 113566. ------------------------------------------------------------ revno: 113566 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-07-26 21:18:21 -0400 message: * configure.ac: Extend the --with-sound option to allow specification of OSS or ALSA (see bug#14812#64). diff: === modified file 'ChangeLog' --- ChangeLog 2013-07-26 17:02:22 +0000 +++ ChangeLog 2013-07-27 01:18:21 +0000 @@ -1,3 +1,8 @@ +2013-07-27 Glenn Morris + + * configure.ac: Extend the --with-sound option to allow + specification of OSS or ALSA (see bug#14812#64). + 2013-07-25 Glenn Morris * info/dir: Add ido. === modified file 'configure.ac' --- configure.ac 2013-07-24 01:03:56 +0000 +++ configure.ac 2013-07-27 01:18:21 +0000 @@ -141,7 +141,18 @@ [string giving default POP mail host])], AC_DEFINE_UNQUOTED(MAILHOST, ["$withval"], [String giving fallback POP mail host.])) -OPTION_DEFAULT_ON([sound],[don't compile with sound support]) +AC_ARG_WITH([sound],[AS_HELP_STRING([--with-sound=VALUE], + [compile with sound support (VALUE one of: yes, ossaudio, alsa, no; +default yes). Only for GNU/Linux, FreeBSD, NetBSD, MinGW.])], + [ case "${withval}" in + yes|no|ossaudio|alsa) val=$withval ;; + *) AC_MSG_ERROR([`--with-sound=$withval' is invalid; +this option's value should be `yes', `no', `ossaudio', or `alsa'.]) + ;; + esac + with_sound=$val + ], + [with_sound=$with_features]) dnl FIXME currently it is not the last. dnl This should be the last --with option, because --with-x is @@ -1253,6 +1264,7 @@ fi ]) +HAVE_SOUND=no if test "${with_sound}" != "no"; then # Sound support for GNU/Linux, the free BSDs, and MinGW. AC_CHECK_HEADERS([machine/soundcard.h sys/soundcard.h soundcard.h], @@ -1262,47 +1274,61 @@ #include #endif ]) - # Emulation library used on NetBSD. - AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) + if test "${with_sound}" = "ossaudio" || test "${with_sound}" = "yes"; then + # Emulation library used on NetBSD. + AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBSOUND=-lossaudio, LIBSOUND=) + test "${with_sound}" = "ossaudio" && test -z "$LIBSOUND" && \ + AC_MSG_ERROR([ossaudio sound support requested but not found.]) + dnl FIXME? If we did find ossaudio, should we set with_sound=ossaudio? + dnl Traditionally, we go on to check for alsa too. Does that make sense? + fi AC_SUBST(LIBSOUND) - ALSA_REQUIRED=1.0.0 - ALSA_MODULES="alsa >= $ALSA_REQUIRED" - PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no) - if test $HAVE_ALSA = yes; then - SAVE_CFLAGS="$CFLAGS" - SAVE_LIBS="$LIBS" - CFLAGS="$ALSA_CFLAGS $CFLAGS" - LIBS="$ALSA_LIBS $LIBS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[snd_lib_error_set_handler (0);]])], - emacs_alsa_normal=yes, - emacs_alsa_normal=no) - if test "$emacs_alsa_normal" != yes; then - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[snd_lib_error_set_handler (0);]])], - emacs_alsa_subdir=yes, - emacs_alsa_subdir=no) - if test "$emacs_alsa_subdir" != yes; then - AC_MSG_ERROR([pkg-config found alsa, but it does not compile. See config.log for error messages.]) + if test "${with_sound}" = "alsa" || test "${with_sound}" = "yes"; then + ALSA_REQUIRED=1.0.0 + ALSA_MODULES="alsa >= $ALSA_REQUIRED" + PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no) + if test $HAVE_ALSA = yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LIBS="$LIBS" + CFLAGS="$ALSA_CFLAGS $CFLAGS" + LIBS="$ALSA_LIBS $LIBS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[snd_lib_error_set_handler (0);]])], + emacs_alsa_normal=yes, + emacs_alsa_normal=no) + if test "$emacs_alsa_normal" != yes; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[snd_lib_error_set_handler (0);]])], + emacs_alsa_subdir=yes, + emacs_alsa_subdir=no) + if test "$emacs_alsa_subdir" != yes; then + AC_MSG_ERROR([pkg-config found alsa, but it does not compile. See config.log for error messages.]) + fi + ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" fi - ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" + + CFLAGS="$SAVE_CFLAGS" + LIBS="$SAVE_LIBS" + LIBSOUND="$LIBSOUND $ALSA_LIBS" + CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" + AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) + elif test "${with_sound}" = "alsa"; then + AC_MSG_ERROR([ALSA sound support requested but not found.]) fi - - CFLAGS="$SAVE_CFLAGS" - LIBS="$SAVE_LIBS" - LIBSOUND="$LIBSOUND $ALSA_LIBS" - CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" - AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) - fi + fi dnl with_sound = alsa|yes dnl Define HAVE_SOUND if we have sound support. We know it works and dnl compiles only on the specified platforms. For others, it dnl probably doesn't make sense to try. + dnl FIXME So surely we should bypass this whole section if not using + dnl one of these platforms? if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then case "$opsys" in dnl defined __FreeBSD__ || defined __NetBSD__ || defined __linux__ + dnl Adjust the --with-sound help text if you change this. gnu-linux|freebsd|netbsd|mingw32) AC_DEFINE(HAVE_SOUND, 1, [Define to 1 if you have sound support.]) + HAVE_SOUND=yes ;; esac fi @@ -4749,6 +4775,8 @@ echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" +echo " Does Emacs support sound? ${HAVE_SOUND}" + echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" ------------------------------------------------------------ revno: 113565 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2013-07-27 03:02:00 +0200 message: lisp/desktop.el: Restore frames at their positions, even if offscreen. (desktop--make-frame): Apply most frame parameters after creating the frame to force (partially or totally) offscreen frames to be restored as such. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-27 00:23:21 +0000 +++ lisp/ChangeLog 2013-07-27 01:02:00 +0000 @@ -1,3 +1,9 @@ +2013-07-27 Juanma Barranquero + + * desktop.el (desktop--make-frame): Apply most frame parameters after + creating the frame to force (partially or totally) offscreen frames to + be restored as such. + 2013-07-26 Xue Fuqiao * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff. @@ -15,7 +21,7 @@ 2013-07-26 Juanma Barranquero * desktop.el (desktop--select-frame): - Try harder to reuse the initial frame. + Try harder to reuse existing frames. 2013-07-26 Stefan Monnier === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-07-26 17:49:52 +0000 +++ lisp/desktop.el 2013-07-27 01:02:00 +0000 @@ -1311,14 +1311,22 @@ (push visible alt-cfg) (push (cons 'fullscreen fullscreen) alt-cfg))) - ;; Time to select or create a frame an apply the big bunch of parameters - (if (setq frame (desktop--select-frame display filtered-cfg)) - (modify-frame-parameters frame - (if (eq (frame-parameter frame 'fullscreen) fullscreen) - ;; Workaround for bug#14949 - (assq-delete-all 'fullscreen filtered-cfg) - filtered-cfg)) - (setq frame (make-frame-on-display display filtered-cfg))) + ;; Time to find or create a frame an apply the big bunch of parameters. + ;; If a frame needs to be created and it falls partially or wholly offscreen, + ;; sometimes it gets "pushed back" onscreen; however, moving it afterwards is + ;; allowed. So we create the frame as invisible and then reapply the full + ;; parameter list (including position and size parameters). + (setq frame (or (desktop--select-frame display filtered-cfg) + (make-frame-on-display display + (cons '(visibility) + (cl-loop + for param in '(left top width height) + collect (assq param filtered-cfg)))))) + (modify-frame-parameters frame + (if (eq (frame-parameter frame 'fullscreen) fullscreen) + ;; Workaround for bug#14949 + (assq-delete-all 'fullscreen filtered-cfg) + filtered-cfg)) ;; Let's give the finishing touches (visibility, tool-bar, maximization). (when lines (push lines alt-cfg)) ------------------------------------------------------------ revno: 113564 committer: Xue Fuqiao branch nick: trunk timestamp: Sat 2013-07-27 08:23:21 +0800 message: ChangeLog fix. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-07-27 00:09:51 +0000 +++ doc/emacs/ChangeLog 2013-07-27 00:23:21 +0000 @@ -1,6 +1,7 @@ 2013-07-27 Xue Fuqiao - * maintaining.texi (VC Directory Commands): Mention `D' and `L' in vc-dir. + * maintaining.texi (VC Directory Commands): Mention `D' and `L' in + vc-dir. (Bug#14948) 2013-07-26 Eli Zaretskii === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-27 00:09:51 +0000 +++ lisp/ChangeLog 2013-07-27 00:23:21 +0000 @@ -1,6 +1,7 @@ 2013-07-26 Xue Fuqiao * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff. + (Bug#14948) 2013-07-26 Stefan Monnier @@ -35,7 +36,8 @@ 2013-07-26 Matthias Meulien - * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-print-root-log. + * vc/vc-dir.el (vc-dir-mode-map): Add binding for + vc-print-root-log. (Bug#14948) 2013-07-26 Richard Stallman ------------------------------------------------------------ revno: 113563 committer: Xue Fuqiao branch nick: trunk timestamp: Sat 2013-07-27 08:09:51 +0800 message: Keybinding fix for vc-dir. * lisp/vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff. * doc/emacs/maintaining.texi (VC Directory Commands): Mention `D' and `L' in vc-dir. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-07-26 06:56:35 +0000 +++ doc/emacs/ChangeLog 2013-07-27 00:09:51 +0000 @@ -1,3 +1,7 @@ +2013-07-27 Xue Fuqiao + + * maintaining.texi (VC Directory Commands): Mention `D' and `L' in vc-dir. + 2013-07-26 Eli Zaretskii * display.texi (Fringes): Document the variable fringe-mode. === modified file 'doc/emacs/maintaining.texi' --- doc/emacs/maintaining.texi 2013-07-03 03:20:04 +0000 +++ doc/emacs/maintaining.texi 2013-07-27 00:09:51 +0000 @@ -1222,7 +1222,7 @@ The VC Directory buffer also defines some single-key shortcuts for VC commands with the @kbd{C-x v} prefix: @kbd{=}, @kbd{+}, @kbd{l}, -@kbd{i}, and @kbd{v}. +@kbd{i}, @kbd{D}, @kbd{L} and @kbd{v}. For example, you can commit a set of edited files by opening a VC Directory buffer, where the files are listed with the @samp{edited} === modified file 'etc/NEWS' --- etc/NEWS 2013-07-26 09:33:38 +0000 +++ etc/NEWS 2013-07-27 00:09:51 +0000 @@ -233,6 +233,11 @@ *** New variable `diary-from-outlook-function', used by the command `diary-from-outlook'. +** VC Directory Mode + +*** `D' displays diffs between VC-controlled whole tree revisions. +*** `L' lists the change log for the current VC controlled tree in a window. + ** cl-lib *** New macro cl-tagbody. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-26 18:48:05 +0000 +++ lisp/ChangeLog 2013-07-27 00:09:51 +0000 @@ -1,3 +1,7 @@ +2013-07-26 Xue Fuqiao + + * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-root-diff. + 2013-07-26 Stefan Monnier * emacs-lisp/nadvice.el (advice--called-interactively-skip): Use the new === modified file 'lisp/vc/vc-dir.el' --- lisp/vc/vc-dir.el 2013-07-26 09:49:59 +0000 +++ lisp/vc/vc-dir.el 2013-07-27 00:09:51 +0000 @@ -237,6 +237,7 @@ ;; VC commands (define-key map "v" 'vc-next-action) ;; C-x v v (define-key map "=" 'vc-diff) ;; C-x v = + (define-key map "D" 'vc-root-diff) ;; C-x v D (define-key map "i" 'vc-register) ;; C-x v i (define-key map "+" 'vc-update) ;; C-x v + (define-key map "l" 'vc-print-log) ;; C-x v l ------------------------------------------------------------ revno: 113562 author: Tassilo Horn committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2013-07-26 22:24:33 +0000 message: Gnus: Add option to sort threads non-recursively gnus-sum.el (gnus-sort-threads-recursively): New defcustom. (gnus-sort-threads): Use it. gnus.texi (Sorting the Summary Buffer): Document new defcustom `gnus-sort-threads-recursively'. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-07-26 17:02:22 +0000 +++ doc/misc/ChangeLog 2013-07-26 22:24:33 +0000 @@ -1,3 +1,8 @@ +2013-07-26 Tassilo Horn + + * gnus.texi (Sorting the Summary Buffer): Document new defcustom + `gnus-sort-threads-recursively'. + 2013-07-25 Glenn Morris * Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add ido. === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2013-07-19 14:50:21 +0000 +++ doc/misc/gnus.texi 2013-07-26 22:24:33 +0000 @@ -7394,6 +7394,11 @@ gnus-thread-sort-by-score)) @end lisp +By default, threads are sorted recursively, that is, first the roots, +then all subthreads, and so on. If you feel more like sorting only +the roots, so that inside a thread the original chronological order is +retained, you can set @code{gnus-sort-threads-recursively} to nil. + @vindex gnus-thread-score-function The function in the @code{gnus-thread-score-function} variable (default @code{+}) is used for calculating the total score of a thread. Useful === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-07-26 17:02:22 +0000 +++ lisp/gnus/ChangeLog 2013-07-26 22:24:33 +0000 @@ -1,3 +1,8 @@ +2013-07-26 Tassilo Horn + + * gnus-sum.el (gnus-sort-threads-recursively): New defcustom. + (gnus-sort-threads): Use it. + 2013-07-25 Andreas Schwab * gnus-art.el (gnus-button-url-regexp): Make it match url in which === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2013-07-14 05:18:48 +0000 +++ lisp/gnus/gnus-sum.el 2013-07-26 22:24:33 +0000 @@ -847,6 +847,13 @@ (function :tag "other")) (boolean :tag "Reverse order")))) +(defcustom gnus-sort-threads-recursively t + "If non-nil, `gnus-thread-sort-functions' are applied recursively. +Setting this to nil allows sorting high-score, recent, +etc. threads to the top of the summary buffer while still +retaining chronological old to new sorting order inside threads." + :group 'gnus-summary-sort + :type 'boolean) (defcustom gnus-thread-sort-functions '(gnus-thread-sort-by-number) "*List of functions used for sorting threads in the summary buffer. @@ -4876,9 +4883,11 @@ (gnus-message 8 "Sorting threads...") (prog1 (condition-case nil - (let ((max-lisp-eval-depth (max max-lisp-eval-depth 5000))) - (gnus-sort-threads-recursive - threads (gnus-make-sort-function gnus-thread-sort-functions))) + (let ((max-lisp-eval-depth (max max-lisp-eval-depth 5000)) + (sort-func (gnus-make-sort-function gnus-thread-sort-functions))) + (if gnus-sort-threads-recursively + (gnus-sort-threads-recursive threads sort-func) + (sort threads sort-func))) ;; Even after binding max-lisp-eval-depth, the recursive ;; sorter might fail for very long threads. In that case, ;; try using a (less well-tested) non-recursive sorter. ------------------------------------------------------------ revno: 113561 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-07-26 21:48:05 +0300 message: Fix documentation of list-processes and process-list. src/process.c (Fprocess_list): Doc fix. lisp/simple.el (list-processes): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-26 18:41:18 +0000 +++ lisp/ChangeLog 2013-07-26 18:48:05 +0000 @@ -3,6 +3,10 @@ * emacs-lisp/nadvice.el (advice--called-interactively-skip): Use the new `base' arg of backtrace-frame. +2013-07-26 Eli Zaretskii + + * simple.el (list-processes): Doc fix. + 2013-07-26 Juanma Barranquero * desktop.el (desktop--select-frame): === modified file 'lisp/simple.el' --- lisp/simple.el 2013-07-26 01:55:06 +0000 +++ lisp/simple.el 2013-07-26 18:48:05 +0000 @@ -3141,14 +3141,17 @@ (display-buffer (button-get button 'process-buffer))) (defun list-processes (&optional query-only buffer) - "Display a list of all processes. + "Display a list of all processes that are Emacs sub-processes. If optional argument QUERY-ONLY is non-nil, only processes with the query-on-exit flag set are listed. Any process listed as exited or signaled is actually eliminated after the listing is made. Optional argument BUFFER specifies a buffer to use, instead of \"*Process List*\". -The return value is always nil." +The return value is always nil. + +This function lists only processes that were launched by Emacs. To +see other processes running on the system, use `list-system-processes'." (interactive) (or (fboundp 'process-list) (error "Asynchronous subprocesses are not supported on this system")) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-26 09:59:59 +0000 +++ src/ChangeLog 2013-07-26 18:48:05 +0000 @@ -1,5 +1,7 @@ 2013-07-26 Eli Zaretskii + * process.c (Fprocess_list): Doc fix. + * w32term.c (w32_read_socket) : Warn about frame being re-exposed only if it didn't ask to become visible. : Under SIZE_RESTORED, only set the frame visible if it === modified file 'src/process.c' --- src/process.c 2013-07-21 06:53:47 +0000 +++ src/process.c 2013-07-26 18:48:05 +0000 @@ -1330,7 +1330,7 @@ } DEFUN ("process-list", Fprocess_list, Sprocess_list, 0, 0, 0, - doc: /* Return a list of all processes. */) + doc: /* Return a list of all processes that are Emacs sub-processes. */) (void) { return Fmapcar (Qcdr, Vprocess_alist); ------------------------------------------------------------ revno: 113560 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-07-26 14:41:18 -0400 message: * lisp/emacs-lisp/nadvice.el (advice--called-interactively-skip): Use the new `base' arg of backtrace-frame. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-26 17:49:52 +0000 +++ lisp/ChangeLog 2013-07-26 18:41:18 +0000 @@ -1,3 +1,8 @@ +2013-07-26 Stefan Monnier + + * emacs-lisp/nadvice.el (advice--called-interactively-skip): Use the new + `base' arg of backtrace-frame. + 2013-07-26 Juanma Barranquero * desktop.el (desktop--select-frame): === modified file 'lisp/emacs-lisp/nadvice.el' --- lisp/emacs-lisp/nadvice.el 2013-06-26 22:31:19 +0000 +++ lisp/emacs-lisp/nadvice.el 2013-07-26 18:41:18 +0000 @@ -425,7 +425,7 @@ (get-next-frame (lambda () (setq frame1 frame2) - (setq frame2 (internal--called-interactively-p--get-frame i)) + (setq frame2 (backtrace-frame i #'called-interactively-p)) ;; (message "Advice Frame %d = %S" i frame2) (setq i (1+ i))))) (when (and (eq (nth 1 frame2) 'apply) ------------------------------------------------------------ revno: 113559 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2013-07-26 19:49:52 +0200 message: lisp/desktop.el (desktop--select-frame): Try harder to reuse the initial frame. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-26 15:09:04 +0000 +++ lisp/ChangeLog 2013-07-26 17:49:52 +0000 @@ -1,3 +1,8 @@ +2013-07-26 Juanma Barranquero + + * desktop.el (desktop--select-frame): + Try harder to reuse the initial frame. + 2013-07-26 Stefan Monnier * emacs-lisp/edebug.el: Use backtrace-eval to handle lexical variables. === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-07-26 14:01:19 +0000 +++ lisp/desktop.el 2013-07-26 17:49:52 +0000 @@ -1235,10 +1235,20 @@ ;; If the frame has its own minibuffer, let's see whether ;; that frame has already been loaded (which can happen after ;; M-x desktop-read). - (setq frame (or (desktop--find-frame - (lambda (f m) - (equal (frame-parameter f 'desktop--mini) m)) - display mini)))) + (setq frame (desktop--find-frame + (lambda (f m) + (equal (frame-parameter f 'desktop--mini) m)) + display mini)) + ;; If it has not been loaded, and it is not a minibuffer-only frame, + ;; let's look for an existing non-minibuffer-only frame to reuse. + (unless (or frame (eq (cdr (assq 'minibuffer frame-cfg)) 'only)) + (setq frame (desktop--find-frame + (lambda (f) + (let ((w (frame-parameter f 'minibuffer))) + (and (window-live-p w) + (window-minibuffer-p w) + (eq (window-frame w) f)))) + display)))) (mini ;; For minibufferless frames, check whether they already exist, ;; and that they are linked to the right minibuffer frame. ------------------------------------------------------------ revno: 113558 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2013-07-26 19:02:22 +0200 message: Fix typos in ChangeLogs. diff: === modified file 'ChangeLog' --- ChangeLog 2013-07-25 15:46:00 +0000 +++ ChangeLog 2013-07-26 17:02:22 +0000 @@ -61,7 +61,7 @@ * lib/ignore-value.h: Remove this gnulib-imported file. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. -2013-07-08 Magnus Henoch (tiny change) +2013-07-08 Magnus Henoch (tiny change) * configure.ac (HAVE_IMAGEMAGICK): Check on NS also (Bug#14798). @@ -2027,7 +2027,7 @@ * Makefile.in (install-arch-indep, install-doc, install-info) (uninstall): Scrap superfluous subshells. -2012-05-19 Ulrich Mueller +2012-05-19 Ulrich Müller * Makefile.in (install-etc): Respect DESTDIR. (Bug#11518) @@ -3803,7 +3803,7 @@ * Makefile.in (install-arch-indep, info): Replace MAKEINFO = off with HAVE_MAKEINFO = no. -2010-12-29 Ulrich Mueller +2010-12-29 Ulrich Müller * configure.in: Make gameuser configurable (Bug#7717). @@ -5013,7 +5013,7 @@ * info/dir: Untabify. -2008-11-28 Ulrich Mueller +2008-11-28 Ulrich Müller * configure.in: Fix last change. @@ -5076,7 +5076,7 @@ * configure (*-sunos5*, *-solaris*): Use the new file sol2-10.h. Use sol2-6.h for Solaris 7-9. -2008-10-18 Ulrich Mueller +2008-10-18 Ulrich Müller * configure.in: Add support for GNU/Linux on SuperH. @@ -5160,7 +5160,7 @@ * configure.in (COCOA_EXPERIMENTAL_CTRL_G): Fix 2008-08-04 change. -2008-08-05 Ulrich Mueller +2008-08-05 Ulrich Müller * configure.in: Add checks for krb5_error.text and krb5_error.e_text struct members. @@ -5528,7 +5528,7 @@ * configure.in (--with-gcc): Remove. * INSTALL (DETAILED BUILDING AND INSTALLATION): Remove --with-gcc. -2008-02-05 Ulrich Mueller +2008-02-05 Ulrich Müller * INSTALL: Recommend giflib, not libungif. @@ -5550,7 +5550,7 @@ * configure.in: For libotf and m17n-flt checks, set shell vars HAVE_LIBOTF and HAVE_M17N_FLT instead of pkg_check_libotf and pkg_check_m17n_flt, respectively, for the sake of the summary output. - Reported by Ulrich Mueller. + Reported by Ulrich Müller. 2008-02-02 Eli Zaretskii @@ -5864,7 +5864,7 @@ * configure.in: Put quotes around nested macro calls. -2007-08-31 Ulrich Mueller (tiny change) +2007-08-31 Ulrich Müller (tiny change) * configure.in: Fix typo. * configure: Regenerate. === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-07-24 13:10:38 +0000 +++ doc/lispref/ChangeLog 2013-07-26 17:02:22 +0000 @@ -1080,7 +1080,7 @@ * display.texi (Face Attributes): Copyedits. Add a few cindex entries. Overlining no longer behaves exactly like underlining. -2012-06-16 Aurelien Aptel +2012-06-16 Aurélien Aptel * display.texi (Face Attributes): Document wave-style underline face attribute. === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-07-25 15:46:00 +0000 +++ doc/misc/ChangeLog 2013-07-26 17:02:22 +0000 @@ -1122,7 +1122,7 @@ corresponding function names, according to `org-agenda-view-mode-dispatch'. -2012-09-30 Jan Bäcker +2012-09-30 Jan Böcker * org.texi (The spreadsheet): Fix typo. === modified file 'lisp/ChangeLog.10' --- lisp/ChangeLog.10 2013-04-01 07:58:04 +0000 +++ lisp/ChangeLog.10 2013-07-26 17:02:22 +0000 @@ -5182,7 +5182,7 @@ inserted. (Info-hide-note-references): Fix doc and customize type. -2003-03-02 Matt Swift +2003-03-02 Matthew Swift * emacs-lisp/lisp-mode.el (emacs-lisp-docstring-fill-column): New custom variable. @@ -5228,7 +5228,7 @@ (tramp-send-region): Correct debug message. (tramp-bug): Add `tramp-chunksize'. -2003-02-26 Matt Swift +2003-02-26 Matthew Swift * startup.el: Streamline code in several functions for efficiency and readability. Rephrase booleans to avoid `(not noninteractive)'. === modified file 'lisp/ChangeLog.15' --- lisp/ChangeLog.15 2013-01-02 16:13:04 +0000 +++ lisp/ChangeLog.15 2013-07-26 17:02:22 +0000 @@ -5119,7 +5119,7 @@ (x-setup-function-keys, xw-defined-colors): Merge x- and w32- definitions here. -2010-10-24 T.V. Raman (tiny change) +2010-10-24 T. V. Raman (tiny change) * net/mairix.el (mairix-searches-mode-map): * mail/mspools.el (mspools-mode-map): Fix 2010-10-10 change. === modified file 'lisp/ChangeLog.16' --- lisp/ChangeLog.16 2013-06-19 16:59:23 +0000 +++ lisp/ChangeLog.16 2013-07-26 17:02:22 +0000 @@ -4569,7 +4569,7 @@ * bookmark.el (bookmark-completing-read): Set the completion category to `bookmark' (bug#11131). -2012-10-26 Bastien +2012-10-26 Bastien Guerry Stefan Monnier * face-remap.el: Use lexical-binding. @@ -9712,7 +9712,7 @@ * international/mule-cmds.el (mule-menu-keymap) (set-language-environment, set-locale-environment): Doc tweaks. -2012-06-16 Aurelien Aptel +2012-06-16 Aurélien Aptel * cus-face.el (custom-face-attributes): Add wave-style underline attribute. === modified file 'lisp/ChangeLog.7' --- lisp/ChangeLog.7 2013-01-01 09:11:05 +0000 +++ lisp/ChangeLog.7 2013-07-26 17:02:22 +0000 @@ -7617,7 +7617,7 @@ Delete the binding for toggle-enable-multibyte-characters. (mule-menu-keymap): Delete the menu item for it. -1997-12-17 Peter Galbraith +1997-12-17 Peter S Galbraith * simple.el (copy-region-as-kill): Deactivate mark in transient-mark-mode. @@ -19637,7 +19637,7 @@ * term/x-win.el (function-key-map): Define iso-lefttab. -1997-03-24 Vince Del Vecchio +1997-03-24 Vincent Del Vecchio * mh-utils.el (mh-find-progs): When looking for mh-lib, construct likely paths based on mh-progs rather than using a static list. === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-07-25 23:40:51 +0000 +++ lisp/gnus/ChangeLog 2013-07-26 17:02:22 +0000 @@ -1897,7 +1897,7 @@ * nnmail.el (mail-send-and-exit): Silence the byte compiler. -2012-06-26 Peter Munster +2012-06-26 Peter Münster * gnus-demon.el (gnus-demon-timers): Now a plist (function -> timer). (gnus-demon-cancel): Ditto. @@ -2124,7 +2124,7 @@ (spam-check-BBDB): Use it. (spam-enter-ham-BBDB): Use it. -2012-06-26 Peter Munster (tiny change) +2012-06-26 Peter Münster (tiny change) * gnus-group.el (gnus-group-get-new-news): New parameter `one-level' for scanning exactly one level. @@ -8487,7 +8487,7 @@ * nnimap.el (nnimap-request-group): Low higher than high to signal no messages in empty groups. -2010-10-01 Ted Zlatanov +2010-10-01 Teodor Zlatanov * nnimap.el (nnimap-request-group): Don't bug out when there's an empty non-UIDNEXT group. @@ -8628,7 +8628,7 @@ * nndraft.el (nndraft-request-expire-articles): Use the group name instead if "nndraft". Fix found by Nils Ackermann. -2010-09-29 Ludovic Courtes +2010-09-29 Ludovic Courtès * nnregistry.el: Add. === modified file 'lisp/gnus/ChangeLog.1' --- lisp/gnus/ChangeLog.1 2013-03-05 17:13:01 +0000 +++ lisp/gnus/ChangeLog.1 2013-07-26 17:02:22 +0000 @@ -340,7 +340,7 @@ * nnmail.el (nnmail-spool-file): Allow lists of files. -1998-08-20 Per Starback +1998-08-20 Per Starbäck * gnus/gnus-start.el (gnus-check-first-time-used): Change current buffer before creating help group. === modified file 'lisp/gnus/ChangeLog.2' --- lisp/gnus/ChangeLog.2 2013-03-12 02:25:36 +0000 +++ lisp/gnus/ChangeLog.2 2013-07-26 17:02:22 +0000 @@ -210,7 +210,7 @@ * mml1991.el (mml1991-pgg-encrypt): Decode according to CTE before encrypting. -2003-12-28 Ivan Boldyrev (tiny change). +2003-12-28 Ivan Boldyrev (tiny change) * mml1991.el (mml1991-pgg-sign): Use unibyte when re-encoding. @@ -4490,7 +4490,7 @@ * gnus-start.el (gnus-backup-startup-file): Fixed custom type. -2003-02-24 Ted Zlatanov +2003-02-24 Teodor Zlatanov * spam.el: Disabled spam-get-article-as-filename. === modified file 'lisp/mh-e/ChangeLog.1' --- lisp/mh-e/ChangeLog.1 2013-03-05 17:13:01 +0000 +++ lisp/mh-e/ChangeLog.1 2013-07-26 17:02:22 +0000 @@ -1403,11 +1403,11 @@ (mh-x-image-url-display): Don't display image if the URL looks malformed. -2003-10-04 Mark D Baushke +2003-10-04 Mark D. Baushke * mh-comp.el (mh-letter-menu): Simplify menu heading. -2003-10-03 Mark D Baushke +2003-10-03 Mark D. Baushke * mh-mime.el (mh-mml-query-cryptographic-method): Avoid revisionist history and still provide a good default. @@ -3877,7 +3877,7 @@ runs checkdoc and lm-verify which is useful before releasing the software. It can and should be expanded to do real unit tests. -2003-04-22 Mark D Baushke +2003-04-22 Mark D. Baushke * mh-alias.el: Update Copyright. * mh-comp.el: Ditto. @@ -6106,7 +6106,7 @@ explicitly stated. (mh-visit-folder): Really fix it this time. -2003-01-01 Mark D Baushke +2003-01-01 Mark D. Baushke * mh-alias.el (mh-alias-from-has-no-alias-p): Needs the mh-autoload comment or mh-customize may have problems finding the @@ -6854,7 +6854,7 @@ * Makefile: Moved .PHONY rule after all rule for compatibility with BSD/OS's old pmake. -2002-12-03 Mark D Baushke +2002-12-03 Mark D. Baushke * mh-e.el (mh-get-new-mail): Simplify no-new-mail test. (mh-add-cur-notation): Remove unnecessary function. @@ -6878,7 +6878,7 @@ number of scan lines is fewer than mh-large-folders (closes SF #646794). -2002-12-02 Mark D Baushke +2002-12-02 Mark D. Baushke * mh-e.el (mh-add-cur-notation): New function to mark the current message with the mh-note-cur character. @@ -8312,7 +8312,7 @@ variable as new-file-flag. This addresses part of SF #627015. -2002-10-24 Mark D Baushke +2002-10-24 Mark D. Baushke * mh-comp.el (mh-forward): Fix mh-mml-compose-insert-p reference in last commit to be mh-mml-compose-insert-flag. @@ -8581,7 +8581,7 @@ * mh-comp.el (mh-mml-to-mime autoload): Ditto. -2002-10-21 Mark D Baushke +2002-10-21 Mark D. Baushke * mh-mime.el (smiley-region): Use load for a non-fatal dependency on the smiley library. @@ -8735,7 +8735,7 @@ prompted for the number of messages to display, you got an error. This has been fixed. -2002-10-19 Mark D Baushke +2002-10-19 Mark D. Baushke * mh-e.el (mh-last-destination-folder): Destination of last refile command. @@ -8777,7 +8777,7 @@ macro mh-compat-write-file-hook to use write-file-functions for Emacs 21.4 and local-write-file-hooks for older versions. -2002-10-18 Mark D Baushke +2002-10-18 Mark D. Baushke * mh-utils.el (mh-invisible-headers): Add more anti-spam headers. @@ -9079,7 +9079,7 @@ (mh-remove-xemacs-horizontal-scrollbar): New macro to avoid compiler-warnings. -2002-10-10 Mark D Baushke +2002-10-10 Mark D. Baushke * Makefile (EMACS_OPTIONS): New macro for command-line compile options. @@ -9088,13 +9088,13 @@ (COMPILE_COMMAND): Combine the compile command with its options. (.el.elc): Use the new $(COMPILE_COMMAND). -2002-10-10 Mark D Baushke +2002-10-10 Mark D. Baushke * mh-speed.el (mh-speed-select-attached-frame): Define a new compatibility macro for getting to the attached-frame. (mh-speed-update-current-folder): Use it. -2002-10-10 Mark D Baushke +2002-10-10 Mark D. Baushke * mh-speed.el (mh-speed-update-current-folder): Use 'dframe-select-attached-frame if we are in a newer speedbar @@ -9452,7 +9452,7 @@ present in the load-path. * mh-mime.el (mh-require): Don't use it anymore. -2002-07-15 Mark D Baushke +2002-07-15 Mark D. Baushke * mh-utils.el (mh-update-scan-format): Rewrite for compatibility with XEmacs as replace-match appears not to have identical @@ -9531,7 +9531,7 @@ * mh-mime.el (mm-destroy-parts): Add definition for old emacs. -2002-06-30 Mark D Baushke +2002-06-30 Mark D. Baushke * mh-utils.el (mh-update-scan-format): Add documentation string. (mh-scan-msg-format-regexp): Update the regexp to find %(msg). @@ -9574,7 +9574,7 @@ * mh-index.el (mh-count-windows): This function works around the lack of the window-list builtin function in emacs20. -2002-06-29 Mark D Baushke +2002-06-29 Mark D. Baushke * mh-utils.el (mh-message-number-width): New function to scan the last message of a folder and return its width. @@ -9625,7 +9625,7 @@ * mh-mime.el (gnus-newsgroup-name): Initialize it to nil, so that mm-uu-dissect doesn't cause error. -2002-06-27 Mark D Baushke +2002-06-27 Mark D. Baushke * mh-utils.el (mh-cmd-note): Make buffer-local. Changes to this variable should be made via the new mh-set-default-cmd-note === modified file 'lisp/org/ChangeLog' --- lisp/org/ChangeLog 2013-06-19 20:10:57 +0000 +++ lisp/org/ChangeLog 2013-07-26 17:02:22 +0000 @@ -3983,7 +3983,7 @@ (org-export-latex-tables-tend): New options. (org-export-latex-tables): Use the new options. -2012-09-30 tumashu (tiny change) +2012-09-30 Feng Shu (tiny change) * org-exp.el (org-export-language-setup): Add simplified chinese translation. @@ -9437,7 +9437,7 @@ (org-update-checkbox-count-maybe): Add an optional argument passed to org-update-checkbox-count. -2011-07-28 Ted Zlatanov +2011-07-28 Teodor Zlatanov * org.el (org-fontify-meta-lines-and-blocks): Ignore errors. @@ -18000,7 +18000,7 @@ * org-habit.el (org-habit-build-graph): Help-echo date when mouse is over stars. -2010-07-19 Jan Böker +2010-07-19 Jan Böcker * org.el (org-file-apps): Improve docstring to reflect grouping matches. === modified file 'src/ChangeLog.12' --- src/ChangeLog.12 2013-06-18 11:17:50 +0000 +++ src/ChangeLog.12 2013-07-26 17:02:22 +0000 @@ -69,7 +69,7 @@ * dispnew.c (update_window): Use MATRIX_ROW and MATRIX_MODE_LINE_ROW. -2013-03-10 handa +2013-03-10 Kenichi Handa * lisp.h (adjust_after_replace): Extern it. @@ -11043,7 +11043,7 @@ * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't referenced (Bug#11583). -2012-06-16 Aurelien Aptel +2012-06-16 Aurélien Aptel Implement wave-style variant of underlining. * dispextern.h (face_underline_type): New enum. @@ -21400,7 +21400,7 @@ * process.c (Fformat_network_address): Doc fix. -2011-04-08 T.V. Raman (tiny change) +2011-04-08 T. V. Raman (tiny change) * xml.c (parse_region): Avoid creating spurious whitespace nodes. ------------------------------------------------------------ revno: 113557 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-07-26 11:09:04 -0400 message: * lisp/emacs-lisp/edebug.el: Use backtrace-eval to handle lexical variables. (edebug-eval): Use backtrace-eval. (edebug--display, edebug--recursive-edit): Don't let-bind the edebug-outer-* vars that keep track of variables we locally let-bind. (edebug-outside-excursion): Don't restore outside values of locally let-bound vars. (edebug--display): Use user-error. (cl-lexical-debug, cl-debug-env): Remove. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-26 14:01:19 +0000 +++ lisp/ChangeLog 2013-07-26 15:09:04 +0000 @@ -1,3 +1,14 @@ +2013-07-26 Stefan Monnier + + * emacs-lisp/edebug.el: Use backtrace-eval to handle lexical variables. + (edebug-eval): Use backtrace-eval. + (edebug--display, edebug--recursive-edit): Don't let-bind the + edebug-outer-* vars that keep track of variables we locally let-bind. + (edebug-outside-excursion): Don't restore outside values of locally + let-bound vars. + (edebug--display): Use user-error. + (cl-lexical-debug, cl-debug-env): Remove. + 2013-07-26 Juanma Barranquero * desktop.el (desktop-restore-frames): Call `sit-for' once all frames === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2013-07-26 07:38:18 +0000 +++ lisp/emacs-lisp/edebug.el 2013-07-26 15:09:04 +0000 @@ -2088,8 +2088,6 @@ (defvar edebug-coverage) ; the coverage results of each expression of function. (defvar edebug-buffer) ; which buffer the function is in. -(defvar edebug-outside-executing-macro) -(defvar edebug-outside-defining-kbd-macro) (defvar edebug-execution-mode 'step) ; Current edebug mode set by user. (defvar edebug-next-execution-mode nil) ; Use once instead of initial mode. @@ -2097,12 +2095,6 @@ (defvar edebug-outside-debug-on-error) ; the value of debug-on-error outside (defvar edebug-outside-debug-on-quit) ; the value of debug-on-quit outside - -(defvar edebug-outside-pre-command-hook) -(defvar edebug-outside-post-command-hook) - -(defvar cl-lexical-debug) ;; Defined in cl.el - ;;; Handling signals (defun edebug-signal (signal-name signal-data) @@ -2154,10 +2146,7 @@ ;; Binding these may not be the right thing to do. ;; We want to allow the global values to be changed. (debug-on-error (or debug-on-error edebug-on-error)) - (debug-on-quit edebug-on-quit) - - ;; Lexical bindings must be uncompiled for this to work. - (cl-lexical-debug t)) + (debug-on-quit edebug-on-quit)) (unwind-protect (let ((signal-hook-function 'edebug-signal)) (setq edebug-execution-mode (or edebug-next-execution-mode @@ -2386,9 +2375,6 @@ (defvar edebug-window-data) ; window and window-start for current function (defvar edebug-outside-windows) ; outside window configuration (defvar edebug-eval-buffer) ; for the evaluation list. -(defvar edebug-outside-o-a-p) ; outside overlay-arrow-position -(defvar edebug-outside-o-a-s) ; outside overlay-arrow-string -(defvar edebug-outside-c-i-e-a) ; outside cursor-in-echo-area (defvar edebug-outside-d-c-i-n-s-w) ; outside default-cursor-in-non-selected-windows (defvar edebug-eval-list nil) ;; List of expressions to evaluate. @@ -2398,8 +2384,6 @@ ;; Emacs 19 adds an arg to mark and mark-marker. (defalias 'edebug-mark-marker 'mark-marker) -(defvar edebug-outside-unread-command-events) - (defun edebug--display (value offset-index arg-mode) (unless (marker-position edebug-def-mark) ;; The buffer holding the source has been killed. @@ -2421,7 +2405,6 @@ (edebug-outside-buffer (current-buffer)) (edebug-outside-point (point)) (edebug-outside-mark (edebug-mark)) - (edebug-outside-unread-command-events unread-command-events) edebug-outside-windows ; Window or screen configuration. edebug-buffer-points @@ -2431,9 +2414,6 @@ edebug-trace-window edebug-trace-window-start - (edebug-outside-o-a-p overlay-arrow-position) - (edebug-outside-o-a-s overlay-arrow-string) - (edebug-outside-c-i-e-a cursor-in-echo-area) (edebug-outside-d-c-i-n-s-w (default-value 'cursor-in-non-selected-windows))) (unwind-protect @@ -2445,8 +2425,7 @@ ) (setq-default cursor-in-non-selected-windows t) (if (not (buffer-name edebug-buffer)) - (let ((debug-on-error nil)) - (error "Buffer defining %s not found" edebug-function))) + (user-error "Buffer defining %s not found" edebug-function)) (if (eq 'after arg-mode) ;; Compute result string now before windows are modified. @@ -2486,10 +2465,9 @@ ;; Check whether positions are up-to-date. ;; This assumes point is never before symbol. (if (not (memq (following-char) '(?\( ?\# ?\` ))) - (let ((debug-on-error nil)) - (error "Source has changed - reevaluate definition of %s" - edebug-function) - ))) + (user-error "Source has changed - reevaluate definition of %s" + edebug-function) + )) (setcdr edebug-window-data (edebug-adjust-window (cdr edebug-window-data))) @@ -2645,11 +2623,6 @@ (if edebug-eval-buffer (kill-buffer edebug-eval-buffer)) (with-timeout-unsuspend edebug-with-timeout-suspend) ;; Reset global variables to outside values in case they were changed. - (setq - unread-command-events edebug-outside-unread-command-events - overlay-arrow-position edebug-outside-o-a-p - overlay-arrow-string edebug-outside-o-a-s - cursor-in-echo-area edebug-outside-c-i-e-a) (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) ))) @@ -2667,27 +2640,6 @@ (defvar edebug-inside-windows) (defvar edebug-interactive-p) -(defvar edebug-outside-map) -(defvar edebug-outside-standard-output) -(defvar edebug-outside-standard-input) -(defvar edebug-outside-current-prefix-arg) -(defvar edebug-outside-last-command) -(defvar edebug-outside-this-command) - -;; Note: here we have defvars for variables that are -;; built-in in certain versions. -;; Each defvar makes a difference -;; in versions where the variable is *not* built-in. - -;; Emacs 18 FIXME - -;; Emacs 19. -(defvar edebug-outside-last-command-event) -(defvar edebug-outside-last-input-event) -(defvar edebug-outside-last-event-frame) -(defvar edebug-outside-last-nonmenu-event) -(defvar edebug-outside-track-mouse) - (defun edebug--recursive-edit (arg-mode) ;; Start up a recursive edit inside of edebug. ;; The current buffer is the edebug-buffer, which is put into edebug-mode. @@ -2705,28 +2657,6 @@ ;; The window configuration may be saved and restored ;; during a recursive-edit edebug-inside-windows - - ;; Save the outside value of executing macro. (here??) - (edebug-outside-executing-macro executing-kbd-macro) - (edebug-outside-pre-command-hook - (edebug-var-status 'pre-command-hook)) - (edebug-outside-post-command-hook - (edebug-var-status 'post-command-hook)) - - (edebug-outside-standard-output standard-output) - (edebug-outside-standard-input standard-input) - (edebug-outside-defining-kbd-macro defining-kbd-macro) - - (edebug-outside-last-command last-command) - (edebug-outside-this-command this-command) - - (edebug-outside-current-prefix-arg current-prefix-arg) - - (edebug-outside-last-input-event last-input-event) - (edebug-outside-last-command-event last-command-event) - (edebug-outside-last-event-frame last-event-frame) - (edebug-outside-last-nonmenu-event last-nonmenu-event) - (edebug-outside-track-mouse track-mouse) ) (unwind-protect @@ -2757,7 +2687,7 @@ (overriding-local-map nil) (overriding-terminal-local-map nil) - ;; Bind again to outside values. + ;; Bind again to outside values. (debug-on-error edebug-outside-debug-on-error) (debug-on-quit edebug-outside-debug-on-quit) @@ -2805,27 +2735,7 @@ ;; gotta have a buffer to let its buffer local variables be set (get-buffer-create " bogus edebug buffer")) ));; inner let - - ;; Reset global vars to outside values, in case they have been changed. - (setq - last-command-event edebug-outside-last-command-event - last-command edebug-outside-last-command - this-command edebug-outside-this-command - current-prefix-arg edebug-outside-current-prefix-arg - last-input-event edebug-outside-last-input-event - last-event-frame edebug-outside-last-event-frame - last-nonmenu-event edebug-outside-last-nonmenu-event - track-mouse edebug-outside-track-mouse - - standard-output edebug-outside-standard-output - standard-input edebug-outside-standard-input - defining-kbd-macro edebug-outside-defining-kbd-macro) - - (setq executing-kbd-macro edebug-outside-executing-macro) - (edebug-restore-status - 'post-command-hook edebug-outside-post-command-hook) - (edebug-restore-status - 'pre-command-hook edebug-outside-pre-command-hook)))) + ))) ;;; Display related functions @@ -3423,6 +3333,9 @@ (defmacro edebug-outside-excursion (&rest body) "Evaluate an expression list in the outside context. Return the result of the last expression." + ;; Only restores the non-variables context since all the variables let-bound + ;; by Edebug will be properly reset to the appropriate context's value by + ;; backtrace-eval. (declare (debug t)) `(save-excursion ; of current-buffer (if edebug-save-windows @@ -3435,89 +3348,32 @@ (edebug-set-windows edebug-outside-windows))) (set-buffer edebug-buffer) ; why? - ;; (use-local-map edebug-outside-map) (set-match-data edebug-outside-match-data) ;; Restore outside context. - (let (;; (edebug-inside-map (current-local-map)) ;; restore map?? - (last-command-event edebug-outside-last-command-event) - (last-command edebug-outside-last-command) - (this-command edebug-outside-this-command) - (unread-command-events edebug-outside-unread-command-events) - (current-prefix-arg edebug-outside-current-prefix-arg) - (last-input-event edebug-outside-last-input-event) - (last-event-frame edebug-outside-last-event-frame) - (last-nonmenu-event edebug-outside-last-nonmenu-event) - (track-mouse edebug-outside-track-mouse) - (standard-output edebug-outside-standard-output) - (standard-input edebug-outside-standard-input) - - (executing-kbd-macro edebug-outside-executing-macro) - (defining-kbd-macro edebug-outside-defining-kbd-macro) - ;; Get the values out of the saved statuses. - (pre-command-hook (cdr edebug-outside-pre-command-hook)) - (post-command-hook (cdr edebug-outside-post-command-hook)) - - ;; See edebug-display. - (overlay-arrow-position edebug-outside-o-a-p) - (overlay-arrow-string edebug-outside-o-a-s) - (cursor-in-echo-area edebug-outside-c-i-e-a) - ) - (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) - (unwind-protect - (with-current-buffer edebug-outside-buffer ; of edebug-buffer - (goto-char edebug-outside-point) - (if (marker-buffer (edebug-mark-marker)) - (set-marker (edebug-mark-marker) edebug-outside-mark)) - ,@body) - - ;; Back to edebug-buffer. Restore rest of inside context. - ;; (use-local-map edebug-inside-map) - (if edebug-save-windows - ;; Restore inside windows. - (edebug-set-windows edebug-inside-windows)) - - ;; Save values that may have been changed. - (setq - edebug-outside-last-command-event last-command-event - edebug-outside-last-command last-command - edebug-outside-this-command this-command - edebug-outside-unread-command-events unread-command-events - edebug-outside-current-prefix-arg current-prefix-arg - edebug-outside-last-input-event last-input-event - edebug-outside-last-event-frame last-event-frame - edebug-outside-last-nonmenu-event last-nonmenu-event - edebug-outside-track-mouse track-mouse - edebug-outside-standard-output standard-output - edebug-outside-standard-input standard-input - - edebug-outside-executing-macro executing-kbd-macro - edebug-outside-defining-kbd-macro defining-kbd-macro - - edebug-outside-o-a-p overlay-arrow-position - edebug-outside-o-a-s overlay-arrow-string - edebug-outside-c-i-e-a cursor-in-echo-area - edebug-outside-d-c-i-n-s-w (default-value - 'cursor-in-non-selected-windows) - ) - - ;; Restore the outside saved values; don't alter - ;; the outside binding loci. - (setcdr edebug-outside-pre-command-hook pre-command-hook) - (setcdr edebug-outside-post-command-hook post-command-hook) - - (setq-default cursor-in-non-selected-windows t) - )) ; let - )) - -(defvar cl-debug-env) ; defined in cl; non-nil when lexical env used. + (setq-default cursor-in-non-selected-windows edebug-outside-d-c-i-n-s-w) + (unwind-protect + (with-current-buffer edebug-outside-buffer ; of edebug-buffer + (goto-char edebug-outside-point) + (if (marker-buffer (edebug-mark-marker)) + (set-marker (edebug-mark-marker) edebug-outside-mark)) + ,@body) + + ;; Back to edebug-buffer. Restore rest of inside context. + ;; (use-local-map edebug-inside-map) + (if edebug-save-windows + ;; Restore inside windows. + (edebug-set-windows edebug-inside-windows)) + + ;; Save values that may have been changed. + (setq edebug-outside-d-c-i-n-s-w + (default-value 'cursor-in-non-selected-windows)) + + ;; Restore the outside saved values; don't alter + ;; the outside binding loci. + (setq-default cursor-in-non-selected-windows t)))) (defun edebug-eval (expr) - ;; Are there cl lexical variables active? - (eval (if (and (bound-and-true-p cl-debug-env) - (fboundp 'cl-macroexpand-all)) - (cl-macroexpand-all expr cl-debug-env) - expr) - lexical-binding)) + (backtrace-eval expr 0 'edebug-after)) (defun edebug-safe-eval (expr) ;; Evaluate EXPR safely. ------------------------------------------------------------ revno: 113556 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2013-07-26 16:01:19 +0200 message: lisp/desktop.el (desktop-restore-frames): Call `sit-for'. We want to be sure that new frames are visible before deleting any remaining ones. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-26 09:49:59 +0000 +++ lisp/ChangeLog 2013-07-26 14:01:19 +0000 @@ -1,3 +1,9 @@ +2013-07-26 Juanma Barranquero + + * desktop.el (desktop-restore-frames): Call `sit-for' once all frames + are restored to be sure that they are visible before deleting any + remaining ones. + 2013-07-26 Matthias Meulien * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-print-root-log. === modified file 'lisp/desktop.el' --- lisp/desktop.el 2013-07-25 09:24:26 +0000 +++ lisp/desktop.el 2013-07-26 14:01:19 +0000 @@ -1404,6 +1404,10 @@ (error (delay-warning 'desktop (error-message-string err) :error)))) + ;; In case we try to delete the initial frame, we want to make sure that + ;; other frames are already visible (discussed in thread for bug#14841). + (sit-for 0 t) + ;; Delete remaining frames, but do not fail if some resist being deleted. (unless (eq desktop-restoring-reuses-frames 'keep) (dolist (frame desktop--reuse-list) ------------------------------------------------------------ revno: 113555 fixes bug: http://debbugs.gnu.org/14841 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-07-26 12:59:59 +0300 message: Fix bug #14841 with invisible frames on MS-Windows. src/w32term.c (w32_read_socket) : Warn about frame being re-exposed only if it didn't ask to become visible. : Under SIZE_RESTORED, only set the frame visible if it was previously iconified. (x_iconify_frame): Mark the frame iconified. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-26 08:39:55 +0000 +++ src/ChangeLog 2013-07-26 09:59:59 +0000 @@ -1,3 +1,11 @@ +2013-07-26 Eli Zaretskii + + * w32term.c (w32_read_socket) : Warn about frame + being re-exposed only if it didn't ask to become visible. + : Under SIZE_RESTORED, only set the frame visible if it + was previously iconified. (Bug#14841) + (x_iconify_frame): Mark the frame iconified. + 2013-07-26 Paul Eggert Fix minor problems found by static checking. === modified file 'src/w32term.c' --- src/w32term.c 2013-07-18 16:50:05 +0000 +++ src/w32term.c 2013-07-26 09:59:59 +0000 @@ -4360,8 +4360,9 @@ SET_FRAME_VISIBLE (f, 1); SET_FRAME_ICONIFIED (f, 0); SET_FRAME_GARBAGED (f); - DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f, - SDATA (f->name))); + if (!f->output_data.w32->asked_for_visible) + DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f, + SDATA (f->name))); /* WM_PAINT serves as MapNotify as well, so report visibility changes properly. */ @@ -4819,7 +4820,8 @@ { bool iconified = FRAME_ICONIFIED_P (f); - SET_FRAME_VISIBLE (f, 1); + if (iconified) + SET_FRAME_VISIBLE (f, 1); SET_FRAME_ICONIFIED (f, 0); /* wait_reading_process_output will notice this @@ -6129,6 +6131,9 @@ /* Simulate the user minimizing the frame. */ SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0); + SET_FRAME_VISIBLE (f, 0); + SET_FRAME_ICONIFIED (f, 1); + unblock_input (); } ------------------------------------------------------------ revno: 113554 author: Matthias Meulien committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2013-07-26 11:49:59 +0200 message: lisp/vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-print-root-log. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-26 09:32:44 +0000 +++ lisp/ChangeLog 2013-07-26 09:49:59 +0000 @@ -1,3 +1,7 @@ +2013-07-26 Matthias Meulien + + * vc/vc-dir.el (vc-dir-mode-map): Add binding for vc-print-root-log. + 2013-07-26 Richard Stallman Add aliases for encrypting mail. === modified file 'lisp/vc/vc-dir.el' --- lisp/vc/vc-dir.el 2013-05-28 07:01:59 +0000 +++ lisp/vc/vc-dir.el 2013-07-26 09:49:59 +0000 @@ -240,6 +240,7 @@ (define-key map "i" 'vc-register) ;; C-x v i (define-key map "+" 'vc-update) ;; C-x v + (define-key map "l" 'vc-print-log) ;; C-x v l + (define-key map "L" 'vc-print-root-log) ;; C-x v L ;; More confusing than helpful, probably ;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark. ;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer ------------------------------------------------------------ revno: 113553 committer: Richard Stallman branch nick: trunk timestamp: Fri 2013-07-26 05:33:38 -0400 message: *** empty log message *** diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-07-26 07:38:18 +0000 +++ etc/NEWS 2013-07-26 09:33:38 +0000 @@ -276,6 +276,22 @@ If set to a number, this can be used to avoid accidentally paste large amounts of data into the ERC input. +** EPA + +*** New option `epa-mail-aliases'. + +You can set this to a list of alias expansions for keys to use +in `epa-mail-encrypt'. + +If one element of the variable's value is ("foo@bar.com" "foo@hello.org"), +that means: when one of the recipients of the message being encrypted +is `foo@bar.com', encrypt the message for `foo@hello.org' instead. + +If one element of the variable's value is ("foo@bar.com"), +that means: when one of the recipients of the message being encrypted +is `foo@bar.com', ignore that name as regards encryption. +This is useful to avoid a query when you have no key for that name. + --- ** New F90 mode option `f90-smart-end-names'. ------------------------------------------------------------ revno: 113552 committer: Richard Stallman branch nick: trunk timestamp: Fri 2013-07-26 05:32:44 -0400 message: Add aliases for encrypting mail. * epa.el (epa-mail-aliases): New option. * epa-mail.el (epa-mail-encrypt): Rewrite to be callable from programs. Bind inhibit-read-only so read-only text doesn't ruin everything. (epa-mail-default-recipients): New subroutine broken out. Handle epa-mail-aliases. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-26 07:38:18 +0000 +++ lisp/ChangeLog 2013-07-26 09:32:44 +0000 @@ -1,3 +1,12 @@ +2013-07-26 Richard Stallman + + Add aliases for encrypting mail. + * epa.el (epa-mail-aliases): New option. + * epa-mail.el (epa-mail-encrypt): Rewrite to be callable from programs. + Bind inhibit-read-only so read-only text doesn't ruin everything. + (epa-mail-default-recipients): New subroutine broken out. + Handle epa-mail-aliases. + 2013-07-26 Stefan Monnier Add support for lexical variables to the debugger's `e' command. === modified file 'lisp/epa-mail.el' --- lisp/epa-mail.el 2013-01-01 09:11:05 +0000 +++ lisp/epa-mail.el 2013-07-26 09:32:44 +0000 @@ -109,94 +109,127 @@ (if verbose (epa--read-signature-type) 'clear))))) - (epa-sign-region start end signers mode)) + (let ((inhibit-read-only t)) + (epa-sign-region start end signers mode))) + +(defun epa-mail-default-recipients () + "Return the default list of encryption recipients for a mail buffer." + (let ((config (epg-configuration)) + recipients-string real-recipients) + (save-excursion + (goto-char (point-min)) + (save-restriction + (narrow-to-region (point) + (if (search-forward mail-header-separator nil 0) + (match-beginning 0) + (point))) + (setq recipients-string + (mapconcat #'identity + (nconc (mail-fetch-field "to" nil nil t) + (mail-fetch-field "cc" nil nil t) + (mail-fetch-field "bcc" nil nil t)) + ",")) + (setq recipients-string + (mail-strip-quoted-names + (with-temp-buffer + (insert "to: " recipients-string "\n") + (expand-mail-aliases (point-min) (point-max)) + (car (mail-fetch-field "to" nil nil t)))))) + + (setq real-recipients + (split-string recipients-string "," t "[ \t\n]*")) + + ;; Process all the recipients thru the list of GnuPG groups. + ;; Expand GnuPG group names to what they stand for. + (setq real-recipients + (apply #'nconc + (mapcar + (lambda (recipient) + (or (epg-expand-group config recipient) + (list recipient))) + real-recipients))) + + ;; Process all the recipients thru the user's list + ;; of encryption aliases. + (setq real-recipients + (apply #'nconc + (mapcar + (lambda (recipient) + (let ((tem (assoc recipient epa-mail-aliases))) + (if tem (cdr tem) + (list recipient)))) + real-recipients))) + ))) ;;;###autoload -(defun epa-mail-encrypt (start end recipients sign signers) - "Encrypt the current buffer. -The buffer is expected to contain a mail message. - -Don't use this command in Lisp programs!" +(defun epa-mail-encrypt (&optional recipients signers) + "Encrypt the outgoing mail message in the current buffer. +Takes the recipients from the text in the header in the buffer +and translates them through `epa-mail-aliases'. +With prefix argument, asks you to select among them interactively +and also whether and how to sign. + +Called from Lisp, the optional argument RECIPIENTS is a list +of recipient addresses, t to perform symmetric encryption, +or nil meaning use the defaults. + +SIGNERS is a list of keys to sign the message with." (interactive - (save-excursion - (let ((verbose current-prefix-arg) - (config (epg-configuration)) - (context (epg-make-context epa-protocol)) - recipients-string recipients recipient-key sign) - (goto-char (point-min)) - (save-restriction - (narrow-to-region (point) - (if (search-forward mail-header-separator nil 0) - (match-beginning 0) - (point))) - (setq recipients-string - (mapconcat #'identity - (nconc (mail-fetch-field "to" nil nil t) - (mail-fetch-field "cc" nil nil t) - (mail-fetch-field "bcc" nil nil t)) - ",")) - (setq recipients - (mail-strip-quoted-names - (with-temp-buffer - (insert "to: " recipients-string "\n") - (expand-mail-aliases (point-min) (point-max)) - (car (mail-fetch-field "to" nil nil t)))))) - (if recipients - (setq recipients (delete "" - (split-string recipients - "[ \t\n]*,[ \t\n]*")))) - - ;; Process all the recipients thru the list of GnuPG groups. - ;; Expand GnuPG group names to what they stand for. - (setq recipients - (apply #'nconc - (mapcar - (lambda (recipient) - (or (epg-expand-group config recipient) - (list recipient))) - recipients))) - - (goto-char (point-min)) - (if (search-forward mail-header-separator nil t) - (forward-line)) - (setq epa-last-coding-system-specified - (or coding-system-for-write - (epa--select-safe-coding-system (point) (point-max)))) - (list (point) (point-max) - (if verbose - (epa-select-keys - context - "Select recipients for encryption. + (let ((verbose current-prefix-arg) + (context (epg-make-context epa-protocol))) + (list (if verbose + (or (epa-select-keys + context + "Select recipients for encryption. If no one is selected, symmetric encryption will be performed. " - recipients) - (if recipients + (epa-mail-default-recipients)) + t)) + (and verbose (y-or-n-p "Sign? ") + (epa-select-keys context + "Select keys for signing. "))))) + (let (start recipient-keys default-recipients) + (save-excursion + (setq recipient-keys + (cond ((eq recipients t) + nil) + (recipients recipients) + (t + (setq default-recipients + (epa-mail-default-recipients)) + ;; Convert recipients to keys. (apply 'nconc (mapcar (lambda (recipient) - (setq recipient-key - (epa-mail--find-usable-key - (epg-list-keys - (epg-make-context epa-protocol) - (if (string-match "@" recipient) - (concat "<" recipient ">") - recipient)) - 'encrypt)) - (unless (or recipient-key - (y-or-n-p - (format - "No public key for %s; skip it? " - recipient))) - (error "No public key for %s" recipient)) - (if recipient-key (list recipient-key))) - recipients)))) - (setq sign (if verbose (y-or-n-p "Sign? "))) - (if sign - (epa-select-keys context - "Select keys for signing. ")))))) - ;; Don't let some read-only text stop us from encrypting. - (let ((inhibit-read-only t)) - (epa-encrypt-region start end recipients sign signers))) + (let ((recipient-key + (epa-mail--find-usable-key + (epg-list-keys + (epg-make-context epa-protocol) + (if (string-match "@" recipient) + (concat "<" recipient ">") + recipient)) + 'encrypt))) + (unless (or recipient-key + (y-or-n-p + (format + "No public key for %s; skip it? " + recipient))) + (error "No public key for %s" recipient)) + (if recipient-key (list recipient-key)))) + default-recipients))))) + + (goto-char (point-min)) + (if (search-forward mail-header-separator nil t) + (forward-line)) + (setq start (point)) + + (setq epa-last-coding-system-specified + (or coding-system-for-write + (epa--select-safe-coding-system (point) (point-max))))) + + ;; Don't let some read-only text stop us from encrypting. + (let ((inhibit-read-only t)) + (epa-encrypt-region start (point-max) recipient-keys signers signers)))) ;;;###autoload (defun epa-mail-import-keys () === modified file 'lisp/epa.el' --- lisp/epa.el 2013-07-19 13:30:58 +0000 +++ lisp/epa.el 2013-07-26 09:32:44 +0000 @@ -48,6 +48,18 @@ :version "23.1" :group 'epa) +(defcustom epa-mail-aliases nil + "Alist of aliases of email addresses that stand for encryption keys. +Each element is (ALIAS EXPANSIONS...). +It means that when a message is addressed to ALIAS, +instead of encrypting it for ALIAS, encrypt it for EXPANSIONS... +If EXPANSIONS is empty, ignore ALIAS as regards encryption. +That is a handy way to avoid warnings about addresses +that you don't have any key for." + :type '(repeat (cons (string :tag "Alias") (repeat '(string :tag "Expansion")))) + :group 'epa + :version "24.4") + (defface epa-validity-high '((default :weight bold) (((class color) (background dark)) :foreground "PaleTurquoise")) ------------------------------------------------------------ revno: 113551 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-07-26 09:39:55 +0100 message: Fix minor problems found by static checking. * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static. (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-26 07:38:18 +0000 +++ src/ChangeLog 2013-07-26 08:39:55 +0000 @@ -1,3 +1,9 @@ +2013-07-26 Paul Eggert + + Fix minor problems found by static checking. + * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static. + (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC. + 2013-07-26 Stefan Monnier * eval.c (set_specpdl_old_value): New function. === modified file 'src/eval.c' --- src/eval.c 2013-07-26 07:38:18 +0000 +++ src/eval.c 2013-07-26 08:39:55 +0000 @@ -3424,7 +3424,7 @@ return Qnil; } -union specbinding * +static union specbinding * get_backtrace_frame (Lisp_Object nframes, Lisp_Object base) { union specbinding *pdl = backtrace_top (); @@ -3483,7 +3483,7 @@ pointer-reversal trick. As it turns out, the rewind does the same as the unwind, except it starts from the other end of the spepdl stack, so we use the same function for both unwind and rewind. */ -void +static void backtrace_eval_unrewind (int distance) { union specbinding *tmp = specpdl_ptr; @@ -3524,10 +3524,11 @@ break; } else - /* FALLTHROUGH! - NOTE: we only ever come here if make_local_foo was used for - the first time on this var within this let. */ - ; + { + /* FALLTHROUGH! + NOTE: we only ever come here if make_local_foo was used for + the first time on this var within this let. */ + } case SPECPDL_LET_DEFAULT: { Lisp_Object sym = specpdl_symbol (tmp); ------------------------------------------------------------ revno: 113550 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-07-26 03:38:18 -0400 message: Add support for lexical variables to the debugger's `e' command. * lisp/emacs-lisp/debug.el (debug): Don't let-bind the debugger-outer-* vars, except for debugger-outer-match-data. (debugger-frame-number): Move check for "on a function call" from callers into it. Add `skip-base' argument. (debugger-frame, debugger-frame-clear): Simplify accordingly. (debugger-env-macro): Only reset the state stored in non-variables, i.e. current-buffer and match-data. (debugger-eval-expression): Rewrite using backtrace-eval. * lisp/subr.el (internal--called-interactively-p--get-frame): Remove. (called-interactively-p): * lisp/emacs-lisp/edebug.el (edebug--called-interactively-skip): Use the new `base' arg of backtrace-frame instead. * src/eval.c (set_specpdl_old_value): New function. (unbind_to): Minor simplification. (get_backtrace_frame): New function. (Fbacktrace_frame): Use it. Add `base' argument. (backtrace_eval_unrewind, Fbacktrace_eval): New functions. (syms_of_eval): Export backtrace-eval. * src/xterm.c (x_focus_changed): Simplify. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-07-24 22:39:41 +0000 +++ etc/NEWS 2013-07-26 07:38:18 +0000 @@ -158,6 +158,10 @@ * Changes in Specialized Modes and Packages in Emacs 24.4 +** The debugger's `e' command evaluates the code in the context at point. +This includes using the lexical environment at point, which means that +`e' now lets you access lexical variables as well. + ** `eshell' now supports visual subcommands and options Eshell has been able to handle "visual" commands (interactive, non-line oriented commands such as top that require display === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-07-26 02:45:15 +0000 +++ lisp/ChangeLog 2013-07-26 07:38:18 +0000 @@ -1,3 +1,19 @@ +2013-07-26 Stefan Monnier + + Add support for lexical variables to the debugger's `e' command. + * emacs-lisp/debug.el (debug): Don't let-bind the debugger-outer-* + vars, except for debugger-outer-match-data. + (debugger-frame-number): Move check for "on a function call" from + callers into it. Add `skip-base' argument. + (debugger-frame, debugger-frame-clear): Simplify accordingly. + (debugger-env-macro): Only reset the state stored in non-variables, + i.e. current-buffer and match-data. + (debugger-eval-expression): Rewrite using backtrace-eval. + * subr.el (internal--called-interactively-p--get-frame): Remove. + (called-interactively-p): + * emacs-lisp/edebug.el (edebug--called-interactively-skip): Use the new + `base' arg of backtrace-frame instead. + 2013-07-26 Glenn Morris * align.el (align-regexp): Doc fix. (Bug#14857) === modified file 'lisp/emacs-lisp/debug.el' --- lisp/emacs-lisp/debug.el 2013-01-02 16:13:04 +0000 +++ lisp/emacs-lisp/debug.el 2013-07-26 07:38:18 +0000 @@ -102,22 +102,6 @@ This is to optimize `debugger-make-xrefs'.") (defvar debugger-outer-match-data) -(defvar debugger-outer-load-read-function) -(defvar debugger-outer-overriding-local-map) -(defvar debugger-outer-overriding-terminal-local-map) -(defvar debugger-outer-track-mouse) -(defvar debugger-outer-last-command) -(defvar debugger-outer-this-command) -(defvar debugger-outer-unread-command-events) -(defvar debugger-outer-unread-post-input-method-events) -(defvar debugger-outer-last-input-event) -(defvar debugger-outer-last-command-event) -(defvar debugger-outer-last-nonmenu-event) -(defvar debugger-outer-last-event-frame) -(defvar debugger-outer-standard-input) -(defvar debugger-outer-standard-output) -(defvar debugger-outer-inhibit-redisplay) -(defvar debugger-outer-cursor-in-echo-area) (defvar debugger-will-be-back nil "Non-nil if we expect to get back in the debugger soon.") @@ -174,24 +158,6 @@ ;; Save the outer values of these vars for the `e' command ;; before we replace the values. (debugger-outer-match-data (match-data)) - (debugger-outer-load-read-function load-read-function) - (debugger-outer-overriding-local-map overriding-local-map) - (debugger-outer-overriding-terminal-local-map - overriding-terminal-local-map) - (debugger-outer-track-mouse track-mouse) - (debugger-outer-last-command last-command) - (debugger-outer-this-command this-command) - (debugger-outer-unread-command-events unread-command-events) - (debugger-outer-unread-post-input-method-events - unread-post-input-method-events) - (debugger-outer-last-input-event last-input-event) - (debugger-outer-last-command-event last-command-event) - (debugger-outer-last-nonmenu-event last-nonmenu-event) - (debugger-outer-last-event-frame last-event-frame) - (debugger-outer-standard-input standard-input) - (debugger-outer-standard-output standard-output) - (debugger-outer-inhibit-redisplay inhibit-redisplay) - (debugger-outer-cursor-in-echo-area cursor-in-echo-area) (debugger-with-timeout-suspend (with-timeout-suspend))) ;; Set this instead of binding it, so that `q' ;; will not restore it. @@ -294,26 +260,6 @@ (funcall (nth 0 debugger-previous-state)))))) (with-timeout-unsuspend debugger-with-timeout-suspend) (set-match-data debugger-outer-match-data))) - ;; Put into effect the modified values of these variables - ;; in case the user set them with the `e' command. - (setq load-read-function debugger-outer-load-read-function) - (setq overriding-local-map debugger-outer-overriding-local-map) - (setq overriding-terminal-local-map - debugger-outer-overriding-terminal-local-map) - (setq track-mouse debugger-outer-track-mouse) - (setq last-command debugger-outer-last-command) - (setq this-command debugger-outer-this-command) - (setq unread-command-events debugger-outer-unread-command-events) - (setq unread-post-input-method-events - debugger-outer-unread-post-input-method-events) - (setq last-input-event debugger-outer-last-input-event) - (setq last-command-event debugger-outer-last-command-event) - (setq last-nonmenu-event debugger-outer-last-nonmenu-event) - (setq last-event-frame debugger-outer-last-event-frame) - (setq standard-input debugger-outer-standard-input) - (setq standard-output debugger-outer-standard-output) - (setq inhibit-redisplay debugger-outer-inhibit-redisplay) - (setq cursor-in-echo-area debugger-outer-cursor-in-echo-area) (setq debug-on-next-call debugger-step-after-exit) debugger-value))) @@ -518,18 +464,21 @@ (setq debugger-jumping-flag nil) (remove-hook 'post-command-hook 'debugger-reenable)) -(defun debugger-frame-number () +(defun debugger-frame-number (&optional skip-base) "Return number of frames in backtrace before the one point points at." (save-excursion (beginning-of-line) + (if (looking-at " *;;;\\|[a-z]") + (error "This line is not a function call")) (let ((opoint (point)) (count 0)) - (while (not (eq (cadr (backtrace-frame count)) 'debug)) - (setq count (1+ count))) - ;; Skip debug--implement-debug-on-entry frame. - (when (eq 'debug--implement-debug-on-entry - (cadr (backtrace-frame (1+ count)))) - (setq count (+ 2 count))) + (unless skip-base + (while (not (eq (cadr (backtrace-frame count)) 'debug)) + (setq count (1+ count))) + ;; Skip debug--implement-debug-on-entry frame. + (when (eq 'debug--implement-debug-on-entry + (cadr (backtrace-frame (1+ count)))) + (setq count (+ 2 count)))) (goto-char (point-min)) (when (looking-at "Debugger entered--\\(Lisp error\\|returning value\\):") (goto-char (match-end 0)) @@ -551,12 +500,8 @@ "Request entry to debugger when this frame exits. Applies to the frame whose line point is on in the backtrace." (interactive) - (save-excursion - (beginning-of-line) - (if (looking-at " *;;;\\|[a-z]") - (error "This line is not a function call"))) - (beginning-of-line) (backtrace-debug (debugger-frame-number) t) + (beginning-of-line) (if (= (following-char) ? ) (let ((inhibit-read-only t)) (delete-char 1) @@ -567,12 +512,8 @@ "Do not enter debugger when this frame exits. Applies to the frame whose line point is on in the backtrace." (interactive) - (save-excursion - (beginning-of-line) - (if (looking-at " *;;;\\|[a-z]") - (error "This line is not a function call"))) - (beginning-of-line) (backtrace-debug (debugger-frame-number) nil) + (beginning-of-line) (if (= (following-char) ?*) (let ((inhibit-read-only t)) (delete-char 1) @@ -583,59 +524,33 @@ "Run BODY in original environment." (declare (indent 0)) `(save-excursion - (if (null (buffer-name debugger-old-buffer)) + (if (null (buffer-live-p debugger-old-buffer)) ;; old buffer deleted (setq debugger-old-buffer (current-buffer))) (set-buffer debugger-old-buffer) - (let ((load-read-function debugger-outer-load-read-function) - (overriding-terminal-local-map - debugger-outer-overriding-terminal-local-map) - (overriding-local-map debugger-outer-overriding-local-map) - (track-mouse debugger-outer-track-mouse) - (last-command debugger-outer-last-command) - (this-command debugger-outer-this-command) - (unread-command-events debugger-outer-unread-command-events) - (unread-post-input-method-events - debugger-outer-unread-post-input-method-events) - (last-input-event debugger-outer-last-input-event) - (last-command-event debugger-outer-last-command-event) - (last-nonmenu-event debugger-outer-last-nonmenu-event) - (last-event-frame debugger-outer-last-event-frame) - (standard-input debugger-outer-standard-input) - (standard-output debugger-outer-standard-output) - (inhibit-redisplay debugger-outer-inhibit-redisplay) - (cursor-in-echo-area debugger-outer-cursor-in-echo-area)) - (set-match-data debugger-outer-match-data) - (prog1 - (progn ,@body) - (setq debugger-outer-match-data (match-data)) - (setq debugger-outer-load-read-function load-read-function) - (setq debugger-outer-overriding-terminal-local-map - overriding-terminal-local-map) - (setq debugger-outer-overriding-local-map overriding-local-map) - (setq debugger-outer-track-mouse track-mouse) - (setq debugger-outer-last-command last-command) - (setq debugger-outer-this-command this-command) - (setq debugger-outer-unread-command-events unread-command-events) - (setq debugger-outer-unread-post-input-method-events - unread-post-input-method-events) - (setq debugger-outer-last-input-event last-input-event) - (setq debugger-outer-last-command-event last-command-event) - (setq debugger-outer-last-nonmenu-event last-nonmenu-event) - (setq debugger-outer-last-event-frame last-event-frame) - (setq debugger-outer-standard-input standard-input) - (setq debugger-outer-standard-output standard-output) - (setq debugger-outer-inhibit-redisplay inhibit-redisplay) - (setq debugger-outer-cursor-in-echo-area cursor-in-echo-area) - )))) + (set-match-data debugger-outer-match-data) + (prog1 + (progn ,@body) + (setq debugger-outer-match-data (match-data))))) (defun debugger-eval-expression (exp) - "Eval an expression, in an environment like that outside the debugger." + "Eval an expression, in an environment like that outside the debugger. +The environment used is the one when entering the activation frame at point." (interactive (list (read-from-minibuffer "Eval: " nil read-expression-map t 'read-expression-history))) - (debugger-env-macro (eval-expression exp))) + (let ((nframe (condition-case nil (1+ (debugger-frame-number 'skip-base)) + (error 0))) ;; If on first line. + (base (if (eq 'debug--implement-debug-on-entry + (cadr (backtrace-frame 1 'debug))) + 'debug--implement-debug-on-entry 'debug))) + (debugger-env-macro + (let ((val (backtrace-eval exp nframe base))) + (prog1 + (prin1 val t) + (let ((str (eval-expression-print-format val))) + (if str (princ str t)))))))) (defvar debugger-mode-map (let ((map (make-keymap)) === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2013-07-11 17:16:19 +0000 +++ lisp/emacs-lisp/edebug.el 2013-07-26 07:38:18 +0000 @@ -4268,7 +4268,7 @@ (eq (nth 1 (nth 1 frame1)) '()) (eq (nth 1 frame2) 'edebug-enter)) ;; `edebug-enter' calls itself on its first invocation. - (if (eq (nth 1 (internal--called-interactively-p--get-frame i)) + (if (eq (nth 1 (backtrace-frame i 'called-interactively-p)) 'edebug-enter) 2 1))) === modified file 'lisp/subr.el' --- lisp/subr.el 2013-07-22 17:24:31 +0000 +++ lisp/subr.el 2013-07-26 07:38:18 +0000 @@ -4191,22 +4191,6 @@ if those frames don't seem special and otherwise, it should return the number of frames to skip (minus 1).") -(defmacro internal--called-interactively-p--get-frame (n) - ;; `sym' will hold a global variable, which will be used kind of like C's - ;; "static" variables. - (let ((sym (make-symbol "base-index"))) - `(progn - (defvar ,sym) - (unless (boundp ',sym) - (let ((i 1)) - (while (not (eq (indirect-function (nth 1 (backtrace-frame i)) t) - (indirect-function 'called-interactively-p))) - (setq i (1+ i))) - (setq ,sym i))) - ;; (unless (eq (nth 1 (backtrace-frame ,sym)) 'called-interactively-p) - ;; (error "called-interactively-p: %s is out-of-sync!" ,sym)) - (backtrace-frame (+ ,sym ,n))))) - (defun called-interactively-p (&optional kind) "Return t if the containing function was called by `call-interactively'. If KIND is `interactive', then only return t if the call was made @@ -4241,7 +4225,7 @@ (get-next-frame (lambda () (setq frame nextframe) - (setq nextframe (internal--called-interactively-p--get-frame i)) + (setq nextframe (backtrace-frame i 'called-interactively-p)) ;; (message "Frame %d = %S" i nextframe) (setq i (1+ i))))) (funcall get-next-frame) ;; Get the first frame. === modified file 'src/ChangeLog' --- src/ChangeLog 2013-07-25 07:29:36 +0000 +++ src/ChangeLog 2013-07-26 07:38:18 +0000 @@ -1,3 +1,13 @@ +2013-07-26 Stefan Monnier + + * eval.c (set_specpdl_old_value): New function. + (unbind_to): Minor simplification. + (get_backtrace_frame): New function. + (Fbacktrace_frame): Use it. Add `base' argument. + (backtrace_eval_unrewind, Fbacktrace_eval): New functions. + (syms_of_eval): Export backtrace-eval. + * xterm.c (x_focus_changed): Simplify. + 2013-07-25 Paul Eggert * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936). === modified file 'src/eval.c' --- src/eval.c 2013-07-24 06:21:07 +0000 +++ src/eval.c 2013-07-26 07:38:18 +0000 @@ -138,6 +138,13 @@ return pdl->let.old_value; } +static void +set_specpdl_old_value (union specbinding *pdl, Lisp_Object val) +{ + eassert (pdl->kind >= SPECPDL_LET); + pdl->let.old_value = val; +} + static Lisp_Object specpdl_where (union specbinding *pdl) { @@ -3301,6 +3308,8 @@ case SPECPDL_UNWIND_VOID: specpdl_ptr->unwind_void.func (); break; + case SPECPDL_BACKTRACE: + break; case SPECPDL_LET: /* If variable has a trivial value (no forwarding), we can just set it. No need to check for constant symbols here, @@ -3315,27 +3324,20 @@ Fset_default (specpdl_symbol (specpdl_ptr), specpdl_old_value (specpdl_ptr)); break; - case SPECPDL_BACKTRACE: + case SPECPDL_LET_DEFAULT: + Fset_default (specpdl_symbol (specpdl_ptr), + specpdl_old_value (specpdl_ptr)); break; case SPECPDL_LET_LOCAL: - case SPECPDL_LET_DEFAULT: - { /* If the symbol is a list, it is really (SYMBOL WHERE - . CURRENT-BUFFER) where WHERE is either nil, a buffer, or a - frame. If WHERE is a buffer or frame, this indicates we - bound a variable that had a buffer-local or frame-local - binding. WHERE nil means that the variable had the default - value when it was bound. CURRENT-BUFFER is the buffer that - was current when the variable was bound. */ + { Lisp_Object symbol = specpdl_symbol (specpdl_ptr); Lisp_Object where = specpdl_where (specpdl_ptr); Lisp_Object old_value = specpdl_old_value (specpdl_ptr); eassert (BUFFERP (where)); - if (specpdl_ptr->kind == SPECPDL_LET_DEFAULT) - Fset_default (symbol, old_value); /* If this was a local binding, reset the value in the appropriate buffer, but only if that buffer's binding still exists. */ - else if (!NILP (Flocal_variable_p (symbol, where))) + if (!NILP (Flocal_variable_p (symbol, where))) set_internal (symbol, old_value, where, 1); } break; @@ -3422,7 +3424,30 @@ return Qnil; } -DEFUN ("backtrace-frame", Fbacktrace_frame, Sbacktrace_frame, 1, 1, NULL, +union specbinding * +get_backtrace_frame (Lisp_Object nframes, Lisp_Object base) +{ + union specbinding *pdl = backtrace_top (); + register EMACS_INT i; + + CHECK_NATNUM (nframes); + + if (!NILP (base)) + { /* Skip up to `base'. */ + base = Findirect_function (base, Qt); + while (backtrace_p (pdl) + && !EQ (base, Findirect_function (backtrace_function (pdl), Qt))) + pdl = backtrace_next (pdl); + } + + /* Find the frame requested. */ + for (i = XFASTINT (nframes); i > 0 && backtrace_p (pdl); i--) + pdl = backtrace_next (pdl); + + return pdl; +} + +DEFUN ("backtrace-frame", Fbacktrace_frame, Sbacktrace_frame, 1, 2, NULL, doc: /* Return the function and arguments NFRAMES up from current execution point. If that frame has not evaluated the arguments yet (or is a special form), the value is (nil FUNCTION ARG-FORMS...). @@ -3431,17 +3456,12 @@ A &rest arg is represented as the tail of the list ARG-VALUES. FUNCTION is whatever was supplied as car of evaluated list, or a lambda expression for macro calls. -If NFRAMES is more than the number of frames, the value is nil. */) - (Lisp_Object nframes) +If NFRAMES is more than the number of frames, the value is nil. +If BASE is non-nil, it should be a function and NFRAMES counts from its +nearest activation frame. */) + (Lisp_Object nframes, Lisp_Object base) { - union specbinding *pdl = backtrace_top (); - register EMACS_INT i; - - CHECK_NATNUM (nframes); - - /* Find the frame requested. */ - for (i = 0; backtrace_p (pdl) && i < XFASTINT (nframes); i++) - pdl = backtrace_next (pdl); + union specbinding *pdl = get_backtrace_frame (nframes, base); if (!backtrace_p (pdl)) return Qnil; @@ -3456,6 +3476,108 @@ } } +/* For backtrace-eval, we want to temporarily unwind the last few elements of + the specpdl stack, and then rewind them. We store the pre-unwind values + directly in the pre-existing specpdl elements (i.e. we swap the current + value and the old value stored in the specpdl), kind of like the inplace + pointer-reversal trick. As it turns out, the rewind does the same as the + unwind, except it starts from the other end of the spepdl stack, so we use + the same function for both unwind and rewind. */ +void +backtrace_eval_unrewind (int distance) +{ + union specbinding *tmp = specpdl_ptr; + int step = -1; + if (distance < 0) + { /* It's a rewind rather than unwind. */ + tmp += distance - 1; + step = 1; + distance = -distance; + } + + for (; distance > 0; distance--) + { + tmp += step; + /* */ + switch (tmp->kind) + { + /* FIXME: Ideally we'd like to "temporarily unwind" (some of) those + unwind_protect, but the problem is that we don't know how to + rewind them afterwards. */ + case SPECPDL_UNWIND: + case SPECPDL_UNWIND_PTR: + case SPECPDL_UNWIND_INT: + case SPECPDL_UNWIND_VOID: + case SPECPDL_BACKTRACE: + break; + case SPECPDL_LET: + /* If variable has a trivial value (no forwarding), we can + just set it. No need to check for constant symbols here, + since that was already done by specbind. */ + if (XSYMBOL (specpdl_symbol (tmp))->redirect + == SYMBOL_PLAINVAL) + { + struct Lisp_Symbol *sym = XSYMBOL (specpdl_symbol (tmp)); + Lisp_Object old_value = specpdl_old_value (tmp); + set_specpdl_old_value (tmp, SYMBOL_VAL (sym)); + SET_SYMBOL_VAL (sym, old_value); + break; + } + else + /* FALLTHROUGH! + NOTE: we only ever come here if make_local_foo was used for + the first time on this var within this let. */ + ; + case SPECPDL_LET_DEFAULT: + { + Lisp_Object sym = specpdl_symbol (tmp); + Lisp_Object old_value = specpdl_old_value (tmp); + set_specpdl_old_value (tmp, Fdefault_value (sym)); + Fset_default (sym, old_value); + } + break; + case SPECPDL_LET_LOCAL: + { + Lisp_Object symbol = specpdl_symbol (tmp); + Lisp_Object where = specpdl_where (tmp); + Lisp_Object old_value = specpdl_old_value (tmp); + eassert (BUFFERP (where)); + + /* If this was a local binding, reset the value in the appropriate + buffer, but only if that buffer's binding still exists. */ + if (!NILP (Flocal_variable_p (symbol, where))) + { + set_specpdl_old_value + (tmp, Fbuffer_local_value (symbol, where)); + set_internal (symbol, old_value, where, 1); + } + } + break; + } + } +} + +DEFUN ("backtrace-eval", Fbacktrace_eval, Sbacktrace_eval, 2, 3, NULL, + doc: /* Evaluate EXP in the context of some activation frame. +NFRAMES and BASE specify the activation frame to use, as in `backtrace-frame'. */) + (Lisp_Object exp, Lisp_Object nframes, Lisp_Object base) +{ + union specbinding *pdl = get_backtrace_frame (nframes, base); + ptrdiff_t count = SPECPDL_INDEX (); + ptrdiff_t distance = specpdl_ptr - pdl; + eassert (distance >= 0); + + if (!backtrace_p (pdl)) + error ("Activation frame not found!"); + + backtrace_eval_unrewind (distance); + record_unwind_protect_int (backtrace_eval_unrewind, -distance); + + /* Use eval_sub rather than Feval since the main motivation behind + backtrace-eval is to be able to get/set the value of lexical variables + from the debugger. */ + return unbind_to (count, eval_sub (exp)); +} void mark_specpdl (void) @@ -3701,6 +3823,7 @@ defsubr (&Sbacktrace_debug); defsubr (&Sbacktrace); defsubr (&Sbacktrace_frame); + defsubr (&Sbacktrace_eval); defsubr (&Sspecial_variable_p); defsubr (&Sfunctionp); } === modified file 'src/xterm.c' --- src/xterm.c 2013-07-16 11:41:06 +0000 +++ src/xterm.c 2013-07-26 07:38:18 +0000 @@ -3435,17 +3435,10 @@ /* Don't stop displaying the initial startup message for a switch-frame event we don't need. */ /* When run as a daemon, Vterminal_frame is always NIL. */ - if ((NILP (Vterminal_frame) || EQ (Fdaemonp(), Qt)) - && CONSP (Vframe_list) - && !NILP (XCDR (Vframe_list))) - { - bufp->arg = Qt; - } - else - { - bufp->arg = Qnil; - } - + bufp->arg = (((NILP (Vterminal_frame) || EQ (Fdaemonp (), Qt)) + && CONSP (Vframe_list) + && !NILP (XCDR (Vframe_list))) + ? Qt : Qnil); bufp->kind = FOCUS_IN_EVENT; XSETFRAME (bufp->frame_or_window, frame); } ------------------------------------------------------------ revno: 113549 fixes bug: http://debbugs.gnu.org/14946 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-07-26 09:56:35 +0300 message: Fix bug #14946 with documentation of fringe-mode the variable. doc/emacs/display.texi (Fringes): Document the variable fringe-mode. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-07-03 03:20:04 +0000 +++ doc/emacs/ChangeLog 2013-07-26 06:56:35 +0000 @@ -1,3 +1,8 @@ +2013-07-26 Eli Zaretskii + + * display.texi (Fringes): Document the variable fringe-mode. + (Bug#14946) + 2013-07-03 Glenn Morris * maintaining.texi (EDE): Fix cross-reference. === modified file 'doc/emacs/display.texi' --- doc/emacs/display.texi 2013-06-03 08:51:50 +0000 +++ doc/emacs/display.texi 2013-07-26 06:56:35 +0000 @@ -1017,12 +1017,15 @@ @findex set-fringe-style @findex fringe-mode +@vindex fringe-mode @r{(variable)} On graphical displays, each Emacs window normally has narrow @dfn{fringes} on the left and right edges. The fringes are used to display symbols that provide information about the text in the window. You can type @kbd{M-x fringe-mode} to disable the fringes, or modify their width. This command affects fringes in all frames; to modify fringes on the selected frame only, use @kbd{M-x set-fringe-style}. +You can make your changes to the fringes permanent by customizing the +variable @code{fringe-mode}. The most common use of the fringes is to indicate a continuation line (@pxref{Continuation Lines}). When one line of text is split