Now on revision 110563. ------------------------------------------------------------ revno: 110563 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2012-10-17 09:22:23 +0400 message: * buffer.c (Fkill_buffer): When unchaining the marker, reset it's buffer pointer to NULL (Bug#12652). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-17 04:58:15 +0000 +++ src/ChangeLog 2012-10-17 05:22:23 +0000 @@ -1,5 +1,10 @@ 2012-10-17 Dmitry Antipov + * buffer.c (Fkill_buffer): When unchaining the marker, + reset it's buffer pointer to NULL (Bug#12652). + +2012-10-17 Dmitry Antipov + Do not verify indirection counters of killed buffers (Bug#12579). * buffer.h (BUFFER_CHECK_INDIRECTION): New macro. * buffer.c (compact_buffer, set_buffer_internal_1): Use it. === modified file 'src/buffer.c' --- src/buffer.c 2012-10-17 04:58:15 +0000 +++ src/buffer.c 2012-10-17 05:22:23 +0000 @@ -1881,19 +1881,20 @@ if (b->base_buffer) { - { /* Unchain all markers that belong to this indirect buffer. - Don't unchain the markers that belong to the base buffer - or its other indirect buffers. */ - struct Lisp_Marker **mp; - for (mp = &BUF_MARKERS (b); *mp; ) - { - struct Lisp_Marker *m = *mp; - if (m->buffer == b) + /* Unchain all markers that belong to this indirect buffer. + Don't unchain the markers that belong to the base buffer + or its other indirect buffers. */ + struct Lisp_Marker **mp = &BUF_MARKERS (b); + while ((m = *mp)) + { + if (m->buffer == b) + { + m->buffer = NULL; *mp = m->next; - else - mp = &m->next; - } - } + } + else + mp = &m->next; + } } else { ------------------------------------------------------------ revno: 110562 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2012-10-17 08:58:15 +0400 message: Do not verify indirection counters of killed buffers (Bug#12579). * buffer.h (BUFFER_CHECK_INDIRECTION): New macro. * buffer.c (compact_buffer, set_buffer_internal_1): Use it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-16 07:56:44 +0000 +++ src/ChangeLog 2012-10-17 04:58:15 +0000 @@ -1,3 +1,9 @@ +2012-10-17 Dmitry Antipov + + Do not verify indirection counters of killed buffers (Bug#12579). + * buffer.h (BUFFER_CHECK_INDIRECTION): New macro. + * buffer.c (compact_buffer, set_buffer_internal_1): Use it. + 2012-10-16 Dmitry Antipov * alloc.c (Fmake_byte_code): Fix typo in comment. === modified file 'src/buffer.c' --- src/buffer.c 2012-10-12 01:47:40 +0000 +++ src/buffer.c 2012-10-17 04:58:15 +0000 @@ -1663,18 +1663,11 @@ void compact_buffer (struct buffer *buffer) { - /* Verify indirection counters. */ - if (buffer->base_buffer) - { - eassert (buffer->indirections == -1); - eassert (buffer->base_buffer->indirections > 0); - } - else - eassert (buffer->indirections >= 0); + BUFFER_CHECK_INDIRECTION (buffer); /* Skip dead buffers, indirect buffers and buffers which aren't changed since last compaction. */ - if (!NILP (buffer->INTERNAL_FIELD (name)) + if (BUFFER_LIVE_P (buffer) && (buffer->base_buffer == NULL) && (buffer->text->compact != buffer->text->modiff)) { @@ -2114,6 +2107,8 @@ if (current_buffer == b) return; + BUFFER_CHECK_INDIRECTION (b); + old_buf = current_buffer; current_buffer = b; last_known_column_point = -1; /* invalidate indentation cache */ === modified file 'src/buffer.h' --- src/buffer.h 2012-09-11 04:22:03 +0000 +++ src/buffer.h 2012-10-17 04:58:15 +0000 @@ -963,6 +963,22 @@ #define BUFFER_LIVE_P(b) (!NILP (BVAR (b, name))) +/* Verify indirection counters. */ + +#define BUFFER_CHECK_INDIRECTION(b) \ + do { \ + if (BUFFER_LIVE_P (b)) \ + { \ + if (b->base_buffer) \ + { \ + eassert (b->indirections == -1); \ + eassert (b->base_buffer->indirections > 0); \ + } \ + else \ + eassert (b->indirections >= 0); \ + } \ + } while (0) + /* Chain of all buffers, including killed ones. */ extern struct buffer *all_buffers; ------------------------------------------------------------ revno: 110561 [merge] committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-16 20:44:00 -0700 message: Merge from emacs-24; up to r108162 diff: === modified file 'doc/lispintro/ChangeLog' --- doc/lispintro/ChangeLog 2012-08-28 16:01:59 +0000 +++ doc/lispintro/ChangeLog 2012-10-17 03:44:00 +0000 @@ -1,3 +1,8 @@ +2012-10-17 Gregor Zattler (tiny change) + + * emacs-lisp-intro.texi (Narrowing advantages): + Minor update for changed what-line implementation. (Bug#12629) + 2012-06-21 Glenn Morris * Makefile.in: Rename infodir to buildinfodir throughout. (Bug#11737) === modified file 'doc/lispintro/emacs-lisp-intro.texi' --- doc/lispintro/emacs-lisp-intro.texi 2012-05-29 00:53:40 +0000 +++ doc/lispintro/emacs-lisp-intro.texi 2012-10-17 03:44:00 +0000 @@ -6600,8 +6600,8 @@ buffer that has been narrowed. The @code{what-line} function, for example, removes the narrowing from a buffer, if it has any narrowing and when it has finished its job, restores the narrowing to what it was. -On the other hand, the @code{count-lines} function, which is called by -@code{what-line}, uses narrowing to restrict itself to just that portion +On the other hand, the @code{count-lines} function +uses narrowing to restrict itself to just that portion of the buffer in which it is interested and then restores the previous situation. === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-10-09 02:28:34 +0000 +++ lisp/gnus/ChangeLog 2012-10-17 03:44:00 +0000 @@ -1,3 +1,7 @@ +2012-10-17 Kazuhiro Ito (tiny change) + + * starttls.el (starttls-extra-arguments): Doc fix. + 2012-10-09 Lars Magne Ingebrigtsen * shr.el (shr-insert): \r is also not inserted, so don't try to delete === modified file 'lisp/gnus/starttls.el' --- lisp/gnus/starttls.el 2012-01-19 07:21:25 +0000 +++ lisp/gnus/starttls.el 2012-10-09 17:55:08 +0000 @@ -149,7 +149,7 @@ :group 'starttls) (defcustom starttls-extra-arguments nil - "Extra arguments to `starttls-program'. + "Extra arguments to `starttls-gnutls-program'. These apply when GnuTLS is used, i.e. when `starttls-use-gnutls' is non-nil. For example, non-TLS compliant servers may require ------------------------------------------------------------ revno: 110560 fixes bug: http://debbugs.gnu.org/12655 committer: Juri Linkov branch nick: trunk timestamp: Wed 2012-10-17 02:27:40 +0300 message: * doc/emacs/search.texi (Query Replace): Document multi-buffer replacement keys. * doc/emacs/maintaining.texi (Tags Search): Change link "Replace" to "Query Replace". * lisp/replace.el (query-replace-help): Mention multi-buffer replacement keys in the Help message. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-10-13 01:18:52 +0000 +++ doc/emacs/ChangeLog 2012-10-16 23:27:40 +0000 @@ -1,3 +1,11 @@ +2012-10-16 Juri Linkov + + * search.texi (Query Replace): Document multi-buffer replacement + keys. (Bug#12655) + + * maintaining.texi (Tags Search): Change link "Replace" to + "Query Replace". + 2012-10-13 Chong Yidong * files.texi (File Conveniences): ImageMagick enabled by default. === modified file 'doc/emacs/maintaining.texi' --- doc/emacs/maintaining.texi 2012-10-02 06:44:30 +0000 +++ doc/emacs/maintaining.texi 2012-10-16 23:27:40 +0000 @@ -2221,7 +2221,7 @@ reads a regexp to search for and a string to replace with, just like ordinary @kbd{M-x query-replace-regexp}. It searches much like @kbd{M-x tags-search}, but repeatedly, processing matches according to your -input. @xref{Replace}, for more information on query replace. +input. @xref{Query Replace}, for more information on query replace. @vindex tags-case-fold-search @cindex case-sensitivity and tags search === modified file 'doc/emacs/search.texi' --- doc/emacs/search.texi 2012-09-30 09:18:38 +0000 +++ doc/emacs/search.texi 2012-10-16 23:27:40 +0000 @@ -1239,6 +1239,19 @@ @item ! to replace all remaining occurrences without asking again. +@item Y @r{(Upper-case)} +to replace all remaining occurrences in all remaining buffers in +multi-buffer replacements (like the Dired `Q' command which performs +query replace on selected files). It answers this question and all +subsequent questions in the series with "yes", without further +user interaction. + +@item N @r{(Upper-case)} +to skip to the next buffer in multi-buffer replacements without +replacing remaining occurrences in the current buffer. It answers +this question "no", gives up on the questions for the current buffer, +and continues to the next buffer in the sequence. + @item ^ to go back to the position of the previous occurrence (or what used to be an occurrence), in case you changed it by mistake or want to === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-15 04:03:04 +0000 +++ lisp/ChangeLog 2012-10-16 23:27:40 +0000 @@ -1,3 +1,8 @@ +2012-10-16 Juri Linkov + + * replace.el (query-replace-help): Mention multi-buffer replacement + keys in the Help message. (Bug#12655) + 2012-10-15 Chong Yidong * emacs-lisp/byte-run.el (defsubst): Doc fix. === modified file 'lisp/replace.el' --- lisp/replace.el 2012-10-04 19:28:11 +0000 +++ lisp/replace.el 2012-10-16 23:27:40 +0000 @@ -1603,9 +1603,13 @@ C-r to enter recursive edit (\\[exit-recursive-edit] to get out again), C-w to delete match and recursive edit, C-l to clear the screen, redisplay, and offer same replacement again, -! to replace all remaining matches with no more questions, +! to replace all remaining matches in this buffer with no more questions, ^ to move point back to previous match, -E to edit the replacement string" +E to edit the replacement string. +In multi-buffer replacements type `Y' to replace all remaining +matches in all remaining buffers with no more questions, +`N' to skip to the next buffer without replacing remaining matches +in the current buffer." "Help message while in `query-replace'.") (defvar query-replace-map ------------------------------------------------------------ revno: 110559 committer: David Engster branch nick: trunk timestamp: Tue 2012-10-16 17:17:21 +0200 message: ChangeLog fix. diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2012-10-14 19:24:16 +0000 +++ lisp/cedet/ChangeLog 2012-10-16 15:17:21 +0000 @@ -11,13 +11,11 @@ `python-shell-internal-send-string' if available to query Python for system paths. - * semantic/senator.el (senator-next-tag): - (senator-previous-tag): + * semantic/senator.el (senator-next-tag, senator-previous-tag) (senator-go-to-up-reference): Use `semantic-error-if-unparsed'. - * semantic/complete.el (semantic-complete-jump-local): - (semantic-complete-jump): - (semantic-complete-jump-local-members): + * semantic/complete.el (semantic-complete-jump-local) + (semantic-complete-jump, semantic-complete-jump-local-members) (semantic-complete-self-insert): Use `semantic-error-if-unparsed'. (semantic-complete-inline-project): Fix autoload cookie. @@ -28,7 +26,7 @@ * cedet.el (cedet-menu-map): Fix copy&paste typo in menu creation. -2012-10-08 David Engster > +2012-10-08 David Engster * semantic/bovine/el.el: Add `semantic-default-elisp-setup' to `emacs-lisp-mode-hook'. This was accidentally removed during the ------------------------------------------------------------ revno: 110558 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2012-10-16 11:56:44 +0400 message: * alloc.c (Fmake_byte_code): Fix typo in comment. * print.c (print_interval): Define as static to match prototype. * indent.c (disptab_matches_widthtab, recompute_width_table): Convert to eassert. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-16 02:22:25 +0000 +++ src/ChangeLog 2012-10-16 07:56:44 +0000 @@ -1,5 +1,12 @@ 2012-10-16 Dmitry Antipov + * alloc.c (Fmake_byte_code): Fix typo in comment. + * print.c (print_interval): Define as static to match prototype. + * indent.c (disptab_matches_widthtab, recompute_width_table): + Convert to eassert. + +2012-10-16 Dmitry Antipov + * editfns.c (get_system_name): Remove. * lisp.h (get_system_name): Remove prototype. * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes. === modified file 'src/alloc.c' --- src/alloc.c 2012-10-10 15:31:21 +0000 +++ src/alloc.c 2012-10-16 07:56:44 +0000 @@ -3100,7 +3100,7 @@ ptrdiff_t i; register struct Lisp_Vector *p; - /* We used to purecopy everything here, if purify-flga was set. This worked + /* We used to purecopy everything here, if purify-flag was set. This worked OK for Emacs-23, but with Emacs-24's lexical binding code, it can be dangerous, since make-byte-code is used during execution to build closures, so any closure built during the preload phase would end up === modified file 'src/indent.c' --- src/indent.c 2012-10-10 15:10:57 +0000 +++ src/indent.c 2012-10-16 07:56:44 +0000 @@ -119,8 +119,7 @@ { int i; - if (widthtab->header.size != 256) - emacs_abort (); + eassert (widthtab->header.size == 256); for (i = 0; i < 256; i++) if (character_width (i, disptab) @@ -141,8 +140,7 @@ if (!VECTORP (BVAR (buf, width_table))) bset_width_table (buf, Fmake_vector (make_number (256), make_number (0))); widthtab = XVECTOR (BVAR (buf, width_table)); - if (widthtab->header.size != 256) - emacs_abort (); + eassert (widthtab->header.size == 256); for (i = 0; i < 256; i++) XSETFASTINT (widthtab->contents[i], character_width (i, disptab)); === modified file 'src/print.c' --- src/print.c 2012-09-23 08:44:20 +0000 +++ src/print.c 2012-10-16 07:56:44 +0000 @@ -2075,7 +2075,7 @@ /* Print a description of INTERVAL using PRINTCHARFUN. This is part of printing a string that has text properties. */ -void +static void print_interval (INTERVAL interval, Lisp_Object printcharfun) { if (NILP (interval->plist)) ------------------------------------------------------------ revno: 110557 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2012-10-16 06:22:25 +0400 message: * editfns.c (get_system_name): Remove. * lisp.h (get_system_name): Remove prototype. * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes. (get_environ_db): Use Vsystem_name. Avoid call to strlen. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-15 16:49:57 +0000 +++ src/ChangeLog 2012-10-16 02:22:25 +0000 @@ -1,3 +1,10 @@ +2012-10-16 Dmitry Antipov + + * editfns.c (get_system_name): Remove. + * lisp.h (get_system_name): Remove prototype. + * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes. + (get_environ_db): Use Vsystem_name. Avoid call to strlen. + 2012-10-15 Daniel Colascione * dbusbind.c: Add comment explaining reason for previous change. === modified file 'src/editfns.c' --- src/editfns.c 2012-10-11 13:23:12 +0000 +++ src/editfns.c 2012-10-16 02:22:25 +0000 @@ -1339,15 +1339,6 @@ return Vsystem_name; } -const char * -get_system_name (void) -{ - if (STRINGP (Vsystem_name)) - return SSDATA (Vsystem_name); - else - return ""; -} - DEFUN ("emacs-pid", Femacs_pid, Semacs_pid, 0, 0, 0, doc: /* Return the process ID of Emacs, as a number. */) (void) === modified file 'src/lisp.h' --- src/lisp.h 2012-10-12 15:19:54 +0000 +++ src/lisp.h 2012-10-16 02:22:25 +0000 @@ -3127,7 +3127,6 @@ extern Lisp_Object make_buffer_string_both (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, bool); extern void init_editfns (void); -const char *get_system_name (void); extern void syms_of_editfns (void); extern void set_time_zone_rule (const char *); === modified file 'src/xrdb.c' --- src/xrdb.c 2012-09-15 07:06:56 +0000 +++ src/xrdb.c 2012-10-16 02:22:25 +0000 @@ -24,7 +24,7 @@ #include #include #include - +#include #include #include "lisp.h" @@ -48,11 +48,6 @@ #include "keyboard.h" #endif -extern char *getenv (const char *); - -extern struct passwd *getpwuid (uid_t); -extern struct passwd *getpwnam (const char *); - char *x_get_string_resource (XrmDatabase rdb, const char *name, const char *class); static int file_p (const char *filename); @@ -429,8 +424,9 @@ { static char const xdefaults[] = ".Xdefaults-"; char *home = gethomedir (); - char const *host = get_system_name (); - ptrdiff_t pathsize = strlen (home) + sizeof xdefaults + strlen (host); + char const *host = SSDATA (Vsystem_name); + ptrdiff_t pathsize = (strlen (home) + sizeof xdefaults + + SBYTES (Vsystem_name)); path = xrealloc (home, pathsize); strcat (strcat (path, xdefaults), host); p = path; ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.