Now on revision 111221. ------------------------------------------------------------ revno: 111221 committer: Paul Eggert branch nick: trunk timestamp: Thu 2012-12-13 11:35:10 -0800 message: * fileio.c (Finsert_file_contents): Don't put tail into head area, as that confuses set-auto-coding, so insist on the head-read returning the full 1024 bytes. Let lseek compute the tail offset; less work for us. Do not ignore I/O errors when reading the tail. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-12-13 16:55:28 +0000 +++ src/ChangeLog 2012-12-13 19:35:10 +0000 @@ -1,5 +1,10 @@ 2012-12-13 Paul Eggert + * fileio.c (Finsert_file_contents): Don't put tail into head area, + as that confuses set-auto-coding, so insist on the head-read + returning the full 1024 bytes. Let lseek compute the tail offset; + less work for us. Do not ignore I/O errors when reading the tail. + * xdisp.c: Minor style fixes. (init_iterator): Hoist assignment out of if-expression. (markpos_of_region): Callers now test for sign, not for -1. === modified file 'src/fileio.c' --- src/fileio.c 2012-12-13 05:29:15 +0000 +++ src/fileio.c 2012-12-13 19:35:10 +0000 @@ -3487,12 +3487,14 @@ else { nread = emacs_read (fd, read_buf, 1024); - if (nread >= 0) + if (nread == 1024) { - if (lseek (fd, st.st_size - (1024 * 3), SEEK_SET) < 0) + int ntail; + if (lseek (fd, - (1024 * 3), SEEK_END) < 0) report_file_error ("Setting file position", Fcons (orig_filename, Qnil)); - nread += emacs_read (fd, read_buf + nread, 1024 * 3); + ntail = emacs_read (fd, read_buf + nread, 1024 * 3); + nread = ntail < 0 ? ntail : nread + ntail; } } ------------------------------------------------------------ revno: 111220 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2012-12-13 19:15:42 +0100 message: lisp/emacs-lisp/edebug.el: Fix previous change. (edebug-unload-function): Make sure that unload-feature finishes even when aborting an ongoing edebug session. Also, do not worry about edebug-mode, unload-feature takes care of it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-13 09:48:54 +0000 +++ lisp/ChangeLog 2012-12-13 18:15:42 +0000 @@ -1,3 +1,9 @@ +2012-12-13 Juanma Barranquero + + * emacs-lisp/edebug.el (edebug-unload-function): Make sure that + unload-feature finishes even when aborting an ongoing edebug session. + Also, do not worry about edebug-mode, unload-feature takes care of it. + 2012-12-13 Andreas Schwab * net/tls.el (tls-program): Update customize type. === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2012-12-13 09:45:54 +0000 +++ lisp/emacs-lisp/edebug.el 2012-12-13 18:15:42 +0000 @@ -4293,14 +4293,11 @@ (defun edebug-unload-function () "Unload the Edebug source level debugger." (when edebug-active + (setq edebug-active nil) (unwind-protect (abort-recursive-edit) - (setq edebug-active nil) - (edebug-unload-function))) - (save-current-buffer - (dolist (buffer (buffer-list)) - (set-buffer buffer) - (when (eq major-mode 'edebug-mode) (emacs-lisp-mode)))) + ;; We still want to run unload-feature to completion + (run-with-idle-timer 0 nil #'(lambda () (unload-feature 'edebug))))) (remove-hook 'called-interactively-p-functions 'edebug--called-interactively-skip) (remove-hook 'cl-read-load-hooks 'edebug--require-cl-read) ------------------------------------------------------------ revno: 111219 committer: Paul Eggert branch nick: trunk timestamp: Thu 2012-12-13 08:55:28 -0800 message: * xdisp.c: Minor style fixes. (init_iterator): Hoist assignment out of if-expression. (markpos_of_region): Callers now test for sign, not for -1. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-12-13 08:04:40 +0000 +++ src/ChangeLog 2012-12-13 16:55:28 +0000 @@ -1,3 +1,9 @@ +2012-12-13 Paul Eggert + + * xdisp.c: Minor style fixes. + (init_iterator): Hoist assignment out of if-expression. + (markpos_of_region): Callers now test for sign, not for -1. + 2012-12-13 Dmitry Antipov Minor redisplay optimization when the region length is zero. === modified file 'src/xdisp.c' --- src/xdisp.c 2012-12-13 08:04:40 +0000 +++ src/xdisp.c 2012-12-13 16:55:28 +0000 @@ -2711,7 +2711,8 @@ /* If visible region is of non-zero length, set IT->region_beg_charpos and IT->region_end_charpos to the start and end of a visible region in window IT->w. Set both to -1 to indicate no region. */ - if ((markpos = markpos_of_region ()) != -1 + markpos = markpos_of_region (); + if (0 <= markpos /* Maybe highlight only in selected window. */ && (/* Either show region everywhere. */ highlight_nonselected_windows @@ -10916,7 +10917,7 @@ static int window_outdated (struct window *w) { - return (w->last_modified < MODIFF + return (w->last_modified < MODIFF || w->last_overlay_modified < OVERLAY_MODIFF); } @@ -15082,7 +15083,7 @@ /* Can't use this case if highlighting a region. When a region exists, cursor movement has to do more than just set the cursor. */ - && (markpos_of_region () == -1) + && markpos_of_region () < 0 && NILP (w->region_showing) && NILP (Vshow_trailing_whitespace) /* This code is not used for mini-buffer for the sake of the case @@ -15751,7 +15752,7 @@ /* If we are highlighting the region, then we just changed the region, so redisplay to show it. */ - if (markpos_of_region () != -1) + if (0 <= markpos_of_region ()) { clear_glyph_matrix (w->desired_matrix); if (!try_window (window, startp, 0)) @@ -16456,7 +16457,7 @@ return 0; /* Can't do this if region may have changed. */ - if ((markpos_of_region () != -1) + if (0 <= markpos_of_region () || !NILP (w->region_showing) || !NILP (Vshow_trailing_whitespace)) return 0; @@ -17288,7 +17289,7 @@ /* Can't use this if highlighting a region because a cursor movement will do more than just set the cursor. */ - if (markpos_of_region () != -1) + if (0 <= markpos_of_region ()) GIVE_UP (9); /* Likewise if highlighting trailing whitespace. */ @@ -21466,8 +21467,8 @@ register int i; /* Let lots_of_dashes be a string of infinite length. */ - if (mode_line_target == MODE_LINE_NOPROP || - mode_line_target == MODE_LINE_STRING) + if (mode_line_target == MODE_LINE_NOPROP + || mode_line_target == MODE_LINE_STRING) return "--"; if (field_width <= 0 || field_width > sizeof (lots_of_dashes)) ------------------------------------------------------------ revno: 111218 committer: Andreas Schwab branch nick: emacs timestamp: Thu 2012-12-13 10:48:54 +0100 message: * net/tls.el (tls-program): Update customize type. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-13 09:45:54 +0000 +++ lisp/ChangeLog 2012-12-13 09:48:54 +0000 @@ -1,3 +1,7 @@ +2012-12-13 Andreas Schwab + + * net/tls.el (tls-program): Update customize type. + 2012-12-13 Juanma Barranquero * emacs-lisp/edebug.el (edebug--require-cl-read): New function. === modified file 'lisp/net/tls.el' --- lisp/net/tls.el 2012-04-19 17:20:26 +0000 +++ lisp/net/tls.el 2012-12-13 09:48:54 +0000 @@ -89,10 +89,14 @@ successful negotiation." :type '(choice + (const :tag "Default list of commands" + ("gnutls-cli --insecure -p %p %h" + "gnutls-cli --insecure -p %p %h --protocols ssl3" + "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")) (list :tag "Choose commands" :value - ("gnutls-cli -p %p %h" - "gnutls-cli -p %p %h --protocols ssl3" + ("gnutls-cli --insecure -p %p %h" + "gnutls-cli --insecure -p %p %h --protocols ssl3" "openssl s_client -connect %h:%p -no_ssl2 -ign_eof") (set :inline t ;; FIXME: add brief `:tag "..."' descriptions. @@ -102,14 +106,10 @@ (const "gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h --protocols ssl3") (const "openssl s_client -connect %h:%p -CAfile /etc/ssl/certs/ca-certificates.crt -no_ssl2 -ign_eof") ;; No trust check: - (const "gnutls-cli -p %p %h") - (const "gnutls-cli -p %p %h --protocols ssl3") + (const "gnutls-cli --insecure -p %p %h") + (const "gnutls-cli --insecure -p %p %h --protocols ssl3") (const "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")) (repeat :inline t :tag "Other" (string))) - (const :tag "Default list of commands" - ("gnutls-cli -p %p %h" - "gnutls-cli -p %p %h --protocols ssl3" - "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")) (list :tag "List of commands" (repeat :tag "Command" (string)))) :version "22.1" ------------------------------------------------------------ revno: 111217 fixes bug: http://debbugs.gnu.org/13163 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2012-12-13 10:45:54 +0100 message: lisp/emacs-lisp/edebug.el: Fix bug#13163. (edebug--require-cl-read): New function. (edebug-setup-hook, cl-read-load-hooks): Use it. (edebug-unload-function): New function. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-13 08:42:25 +0000 +++ lisp/ChangeLog 2012-12-13 09:45:54 +0000 @@ -1,3 +1,9 @@ +2012-12-13 Juanma Barranquero + + * emacs-lisp/edebug.el (edebug--require-cl-read): New function. + (edebug-setup-hook, cl-read-load-hooks): Use it. + (edebug-unload-function): New function. (Bug#13163) + 2012-12-13 Michael Albinus * net/tramp-adb.el (tramp-adb-file-name-p): Make it a defsubst. === modified file 'lisp/emacs-lisp/edebug.el' --- lisp/emacs-lisp/edebug.el 2012-11-20 04:24:09 +0000 +++ lisp/emacs-lisp/edebug.el 2012-12-13 09:45:54 +0000 @@ -4258,12 +4258,13 @@ ;;; Autoloading of Edebug accessories ;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu +(defun edebug--require-cl-read () + (require 'edebug-cl-read)) + (if (featurep 'cl-read) - (add-hook 'edebug-setup-hook - (function (lambda () (require 'edebug-cl-read)))) + (add-hook 'edebug-setup-hook #'edebug--require-cl-read) ;; The following causes edebug-cl-read to be loaded when you load cl-read.el. - (add-hook 'cl-read-load-hooks - (function (lambda () (require 'edebug-cl-read))))) + (add-hook 'cl-read-load-hooks #'edebug--require-cl-read)) ;;; Finalize Loading @@ -4289,6 +4290,24 @@ ;; Install edebug read and eval functions. (edebug-install-read-eval-functions) +(defun edebug-unload-function () + "Unload the Edebug source level debugger." + (when edebug-active + (unwind-protect + (abort-recursive-edit) + (setq edebug-active nil) + (edebug-unload-function))) + (save-current-buffer + (dolist (buffer (buffer-list)) + (set-buffer buffer) + (when (eq major-mode 'edebug-mode) (emacs-lisp-mode)))) + (remove-hook 'called-interactively-p-functions + 'edebug--called-interactively-skip) + (remove-hook 'cl-read-load-hooks 'edebug--require-cl-read) + (edebug-uninstall-read-eval-functions) + ;; continue standard unloading + nil) + (provide 'edebug) ;;; edebug.el ends here ------------------------------------------------------------ revno: 111216 committer: Michael Albinus + + * net/tramp-adb.el (tramp-adb-file-name-p): Make it a defsubst. + Otherwise, there could be errors in autoloading. (Bug#13151) + 2012-12-13 Jürgen Hötzel * net/tramp-adb.el (tramp-adb-wait-for-output): Remove spurious " ^H" === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2012-12-13 08:38:16 +0000 +++ lisp/net/tramp-adb.el 2012-12-13 08:42:25 +0000 @@ -112,7 +112,7 @@ "Alist of handler functions for Tramp ADB method.") ;;;###tramp-autoload -(defun tramp-adb-file-name-p (filename) +(defsubst tramp-adb-file-name-p (filename) "Check if it's a filename for ADB." (let ((v (tramp-dissect-file-name filename))) (string= (tramp-file-name-method v) tramp-adb-method))) ------------------------------------------------------------ revno: 111215 author: J?rgen H?tzel committer: Michael Albinus + + * net/tramp-adb.el (tramp-adb-wait-for-output): Remove spurious " ^H" + sequences. + 2012-12-13 Alan Mackenzie Make CC Mode not hang when _some_ lines end in CRLF. Bug #11841. === modified file 'lisp/net/tramp-adb.el' --- lisp/net/tramp-adb.el 2012-12-06 07:33:20 +0000 +++ lisp/net/tramp-adb.el 2012-12-13 08:38:16 +0000 @@ -933,10 +933,15 @@ (if (tramp-wait-for-regexp proc timeout tramp-adb-prompt) (let (buffer-read-only) (goto-char (point-min)) - (when (re-search-forward tramp-adb-prompt (point-at-eol) t) + ;; ADB terminal sends "^H" sequences. + (when (re-search-forward "<\b+" (point-at-eol) t) (forward-line 1) (delete-region (point-min) (point))) ;; Delete the prompt. + (goto-char (point-min)) + (when (re-search-forward tramp-adb-prompt (point-at-eol) t) + (forward-line 1) + (delete-region (point-min) (point))) (goto-char (point-max)) (re-search-backward tramp-adb-prompt nil t) (delete-region (point) (point-max))) ------------------------------------------------------------ revno: 111214 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2012-12-13 12:04:40 +0400 message: Minor redisplay optimization when the region length is zero. * xdisp.c (markpos_of_region): New function. (init_iterator): Do not highlight the region of zero length. (redisplay_window): Check whether the region is of non-zero length. (try_cursor_movement): Allow if the region length is zero. (try_window_reusing_current_matrix, try_window_id): Likewise. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-12-13 05:29:15 +0000 +++ src/ChangeLog 2012-12-13 08:04:40 +0000 @@ -1,3 +1,12 @@ +2012-12-13 Dmitry Antipov + + Minor redisplay optimization when the region length is zero. + * xdisp.c (markpos_of_region): New function. + (init_iterator): Do not highlight the region of zero length. + (redisplay_window): Check whether the region is of non-zero length. + (try_cursor_movement): Allow if the region length is zero. + (try_window_reusing_current_matrix, try_window_id): Likewise. + 2012-12-13 Eli Zaretskii * search.c (search_buffer): Check the inverse translations of each === modified file 'src/xdisp.c' --- src/xdisp.c 2012-12-12 15:33:30 +0000 +++ src/xdisp.c 2012-12-13 08:04:40 +0000 @@ -2559,8 +2559,24 @@ #endif /* GLYPH_DEBUG and ENABLE_CHECKING */ - - +/* Return mark position if current buffer has the region of non-zero length, + or -1 otherwise. */ + +static ptrdiff_t +markpos_of_region (void) +{ + if (!NILP (Vtransient_mark_mode) + && !NILP (BVAR (current_buffer, mark_active)) + && XMARKER (BVAR (current_buffer, mark))->buffer != NULL) + { + ptrdiff_t markpos = XMARKER (BVAR (current_buffer, mark))->charpos; + + if (markpos != PT) + return markpos; + } + return -1; +} + /*********************************************************************** Iterator initialization ***********************************************************************/ @@ -2589,7 +2605,7 @@ ptrdiff_t charpos, ptrdiff_t bytepos, struct glyph_row *row, enum face_id base_face_id) { - int highlight_region_p; + ptrdiff_t markpos; enum face_id remapped_base_face_id = base_face_id; /* Some precondition checks. */ @@ -2692,16 +2708,10 @@ /* Are multibyte characters enabled in current_buffer? */ it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); - /* Non-zero if we should highlight the region. */ - highlight_region_p - = (!NILP (Vtransient_mark_mode) - && !NILP (BVAR (current_buffer, mark_active)) - && XMARKER (BVAR (current_buffer, mark))->buffer != 0); - - /* Set IT->region_beg_charpos and IT->region_end_charpos to the - start and end of a visible region in window IT->w. Set both to - -1 to indicate no region. */ - if (highlight_region_p + /* If visible region is of non-zero length, set IT->region_beg_charpos + and IT->region_end_charpos to the start and end of a visible region + in window IT->w. Set both to -1 to indicate no region. */ + if ((markpos = markpos_of_region ()) != -1 /* Maybe highlight only in selected window. */ && (/* Either show region everywhere. */ highlight_nonselected_windows @@ -2713,7 +2723,6 @@ && WINDOWP (minibuf_selected_window) && w == XWINDOW (minibuf_selected_window)))) { - ptrdiff_t markpos = marker_position (BVAR (current_buffer, mark)); it->region_beg_charpos = min (PT, markpos); it->region_end_charpos = max (PT, markpos); } @@ -15073,8 +15082,7 @@ /* Can't use this case if highlighting a region. When a region exists, cursor movement has to do more than just set the cursor. */ - && !(!NILP (Vtransient_mark_mode) - && !NILP (BVAR (current_buffer, mark_active))) + && (markpos_of_region () == -1) && NILP (w->region_showing) && NILP (Vshow_trailing_whitespace) /* This code is not used for mini-buffer for the sake of the case @@ -15743,8 +15751,7 @@ /* If we are highlighting the region, then we just changed the region, so redisplay to show it. */ - if (!NILP (Vtransient_mark_mode) - && !NILP (BVAR (current_buffer, mark_active))) + if (markpos_of_region () != -1) { clear_glyph_matrix (w->desired_matrix); if (!try_window (window, startp, 0)) @@ -16449,8 +16456,7 @@ return 0; /* Can't do this if region may have changed. */ - if ((!NILP (Vtransient_mark_mode) - && !NILP (BVAR (current_buffer, mark_active))) + if ((markpos_of_region () != -1) || !NILP (w->region_showing) || !NILP (Vshow_trailing_whitespace)) return 0; @@ -17282,8 +17288,7 @@ /* Can't use this if highlighting a region because a cursor movement will do more than just set the cursor. */ - if (!NILP (Vtransient_mark_mode) - && !NILP (BVAR (current_buffer, mark_active))) + if (markpos_of_region () != -1) GIVE_UP (9); /* Likewise if highlighting trailing whitespace. */ ------------------------------------------------------------ revno: 111213 committer: Glenn Morris branch nick: trunk timestamp: Wed 2012-12-12 21:33:36 -0800 message: * doc/misc/cl.texi (Modify Macros, Obsolete Macros): Now letf == cl-letf. * etc/NEWS: Related edit. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-12-13 05:29:15 +0000 +++ doc/misc/ChangeLog 2012-12-13 05:33:36 +0000 @@ -1,5 +1,7 @@ 2012-12-13 Glenn Morris + * cl.texi (Modify Macros, Obsolete Macros): Now letf == cl-letf. + * wisent.texi: Small edits. Set copyright to FSF, update license to GFDL 1.3+. * Makefile.in (INFO_TARGETS, DVI_TARGETS, PDF_TARGETS): Add wisent. === modified file 'doc/misc/cl.texi' --- doc/misc/cl.texi 2012-12-05 22:27:56 +0000 +++ doc/misc/cl.texi 2012-12-13 05:33:36 +0000 @@ -1200,9 +1200,6 @@ bound on entry, it is simply made unbound by @code{makunbound} or @code{fmakunbound} on exit. @end ignore - -Note that the @file{cl.el} version of this macro behaves slightly -differently. @xref{Obsolete Macros}. @end defmac @defmac cl-letf* (bindings@dots{}) forms@dots{} @@ -4888,13 +4885,6 @@ lexical binding that @code{cl-labels} uses. @end defmac -@defmac letf (bindings@dots{}) forms@dots{} -This macro is almost exactly the same as @code{cl-letf}, which -replaces it (@pxref{Modify Macros}). The only difference is in -details that relate to some deprecated usage of @code{symbol-function} -in place forms. -@end defmac - @node Obsolete Setf Customization @appendixsec Obsolete Ways to Customize Setf === modified file 'etc/NEWS' --- etc/NEWS 2012-12-12 14:43:45 +0000 +++ etc/NEWS 2012-12-13 05:33:36 +0000 @@ -41,7 +41,13 @@ * Changes in Specialized Modes and Packages in Emacs 24.4 -** New macro cl-tagbody in cl-lib. +** cl-lib + +*** New macro cl-tagbody. + ++++ +*** letf is now just an alias for cl-letf. + ** Calc *** Calc by default now uses the Gregorian calendar for all dates, and