Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 102395. ------------------------------------------------------------ revno: 102395 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-11-14 22:42:21 -0800 message: * lib-src/test-distrib.c: Remove include guards for config.h and fcntl.h. (O_RDONLY): Do not define. (cool_read): Fix type for variable "sofar". diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2010-10-25 00:48:26 +0000 +++ lib-src/ChangeLog 2010-11-15 06:42:21 +0000 @@ -1,3 +1,9 @@ +2010-11-15 Dan Nicolaescu + + * test-distrib.c: Remove include guards for config.h and fcntl.h. + (O_RDONLY): Do not define. + (cool_read): Fix type for variable "sofar". + 2010-10-25 Glenn Morris * makefile.w32-in (OTHER_PLATFORM_SUPPORT): Remove easymenu.elc. === modified file 'lib-src/test-distrib.c' --- lib-src/test-distrib.c 2010-10-03 23:35:22 +0000 +++ lib-src/test-distrib.c 2010-11-15 06:42:21 +0000 @@ -19,24 +19,14 @@ along with GNU Emacs. If not, see . */ -#ifdef HAVE_CONFIG_H #include -#endif - #include - -#ifdef HAVE_FCNTL_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif -#ifndef O_RDONLY -#define O_RDONLY 0 -#endif - /* Break string in two parts to avoid buggy C compilers that ignore characters after nulls in strings. */ @@ -55,7 +45,7 @@ cool_read (int fd, char *buf, size_t size) { ssize_t num; - size_t sofar = 0; + ssize_t sofar = 0; while (1) { ------------------------------------------------------------ revno: 102394 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-11-14 22:39:02 -0800 message: * configure.in: Do not check for unconditionally included headers. diff: === modified file 'ChangeLog' --- ChangeLog 2010-11-09 20:07:10 +0000 +++ ChangeLog 2010-11-15 06:39:02 +0000 @@ -1,3 +1,7 @@ +2010-11-15 Dan Nicolaescu + + * configure.in: Do not check for unconditionally included headers. + 2010-11-09 Stefan Monnier * .dir-locals.el (log-edit-mode): Set log-edit-rewrite-fixes. === modified file 'configure' --- configure 2010-11-09 20:07:10 +0000 +++ configure 2010-11-15 06:39:02 +0000 @@ -6221,10 +6221,10 @@ fi -for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ - linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ - stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ - sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ +for ac_header in sys/select.h sys/time.h unistd.h utime.h \ + linux/version.h sys/systeminfo.h limits.h \ + stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ + sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ sys/utsname.h pwd.h utmp.h dirent.h util.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` === modified file 'configure.in' --- configure.in 2010-11-09 20:07:10 +0000 +++ configure.in 2010-11-15 06:39:02 +0000 @@ -1218,10 +1218,10 @@ fi dnl checks for header files -AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ - linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ - stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ - sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ +AC_CHECK_HEADERS(sys/select.h sys/time.h unistd.h utime.h \ + linux/version.h sys/systeminfo.h limits.h \ + stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \ + sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \ sys/utsname.h pwd.h utmp.h dirent.h util.h) AC_MSG_CHECKING(if personality LINUX32 can be set) === modified file 'src/config.in' --- src/config.in 2010-11-09 20:07:10 +0000 +++ src/config.in 2010-11-15 06:39:02 +0000 @@ -687,9 +687,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSTEMINFO_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIMEB_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H @@ -711,9 +708,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS__MBSTATE_T_H -/* Define to 1 if you have the header file. */ -#undef HAVE_TERMIOS_H - /* Define to 1 if you have the header file. */ #undef HAVE_TERM_H ------------------------------------------------------------ revno: 102393 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-11-14 22:27:41 -0800 message: * src/process.c: Include unconditionally, keyboard.c already does it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-11-15 06:18:50 +0000 +++ src/ChangeLog 2010-11-15 06:27:41 +0000 @@ -1,5 +1,8 @@ 2010-11-15 Dan Nicolaescu + * process.c: Include unconditionally, + keyboard.c already does it. + * keyboard.c (pending_malloc_warning): Add const to match definition in alloc.c. (Fset_input_interrupt_mode): Simplify #ifdefs. === modified file 'src/process.c' --- src/process.c 2010-11-09 20:07:10 +0000 +++ src/process.c 2010-11-15 06:27:41 +0000 @@ -56,12 +56,10 @@ #endif #endif -#if defined(HAVE_SYS_IOCTL_H) #include #if defined(HAVE_NET_IF_H) #include #endif /* HAVE_NET_IF_H */ -#endif /* HAVE_SYS_IOCTL_H */ #ifdef NEED_BSDTTY #include ------------------------------------------------------------ revno: 102392 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-11-14 22:18:50 -0800 message: * src/keyboard.c (pending_malloc_warning): Add const to match definition in alloc.c. (Fset_input_interrupt_mode): Simplify #ifdefs. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-11-15 06:10:35 +0000 +++ src/ChangeLog 2010-11-15 06:18:50 +0000 @@ -1,5 +1,11 @@ 2010-11-15 Dan Nicolaescu + * keyboard.c (pending_malloc_warning): Add const to match + definition in alloc.c. + (Fset_input_interrupt_mode): Simplify #ifdefs. + +2010-11-15 Dan Nicolaescu + Clean up systty.h macros. * systty.h (EMACS_GET_TTY_PGRP, EMACS_SET_TTY_PGRP, EMACS_GET_TTY) (EMACS_SET_TTY): Remove unneeded abstraction, instead inline the === modified file 'src/keyboard.c' --- src/keyboard.c 2010-11-14 06:55:27 +0000 +++ src/keyboard.c 2010-11-15 06:18:50 +0000 @@ -431,7 +431,7 @@ /* Nonzero if input is available. */ int input_pending; -extern char *pending_malloc_warning; +extern const char *pending_malloc_warning; /* Circular buffer for pre-read keyboard input. */ @@ -11100,10 +11100,10 @@ #ifndef DOS_NT /* this causes startup screen to be restored and messes with the mouse */ reset_all_sys_modes (); -#endif interrupt_input = new_interrupt_input; -#ifndef DOS_NT init_all_sys_modes (); +#else + interrupt_input = new_interrupt_input; #endif #ifdef POLL_FOR_INPUT ------------------------------------------------------------ revno: 102391 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-11-14 22:10:35 -0800 message: Clean up src/systty.h macros. * systty.h (EMACS_GET_TTY_PGRP, EMACS_SET_TTY_PGRP, EMACS_GET_TTY) (EMACS_SET_TTY): Remove unneeded abstraction, instead inline the definition in all uses. (EMACS_TTY_TABS_OK): Remove, it has a single user. * src/sysdep.c (discard_tty_input, child_setup_tty) (init_sys_modes, tabs_safe_p, reset_sys_modes): * src/emacs.c (shut_down_emacs): * src/callproc.c (child_setup): * src/term.c (dissociate_if_controlling_tty): Inline removed macros. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-11-15 05:52:58 +0000 +++ src/ChangeLog 2010-11-15 06:10:35 +0000 @@ -1,5 +1,16 @@ 2010-11-15 Dan Nicolaescu + Clean up systty.h macros. + * systty.h (EMACS_GET_TTY_PGRP, EMACS_SET_TTY_PGRP, EMACS_GET_TTY) + (EMACS_SET_TTY): Remove unneeded abstraction, instead inline the + definition in all uses. + (EMACS_TTY_TABS_OK): Remove, it has a single user. + * sysdep.c (discard_tty_input, child_setup_tty) + (init_sys_modes, tabs_safe_p, reset_sys_modes): + * emacs.c (shut_down_emacs): + * callproc.c (child_setup): + * term.c (dissociate_if_controlling_tty): Inline removed macros. + * data.c (sign_extend_temp, sign_extend_lisp_int): Remove, unused. 2010-11-14 Chong Yidong === modified file 'src/callproc.c' --- src/callproc.c 2010-10-08 10:14:47 +0000 +++ src/callproc.c 2010-11-15 06:10:35 +0000 @@ -1221,7 +1221,7 @@ return cpid; #else /* not WINDOWSNT */ /* setpgrp_of_tty is incorrect here; it uses input_fd. */ - EMACS_SET_TTY_PGRP (0, &pid); + tcsetpgrp (0, pid); /* execvp does not accept an environment arg so the only way to pass this environment is to set environ. Our caller @@ -1609,5 +1609,3 @@ defsubr (&Scall_process_region); } -/* arch-tag: 769b8045-1df7-4d2b-8968-e3fb49017f95 - (do not change this comment) */ === modified file 'src/emacs.c' --- src/emacs.c 2010-11-10 03:45:29 +0000 +++ src/emacs.c 2010-11-15 06:10:35 +0000 @@ -2053,10 +2053,8 @@ #ifndef DOS_NT { int pgrp = EMACS_GETPGRP (0); - - int tpgrp; - if (EMACS_GET_TTY_PGRP (0, &tpgrp) != -1 - && tpgrp == pgrp) + int tpgrp = tcgetpgrp (0); + if ((tpgrp != -1) && tpgrp == pgrp) { reset_all_sys_modes (); if (sig && sig != SIGTERM) === modified file 'src/sysdep.c' --- src/sysdep.c 2010-11-13 22:17:22 +0000 +++ src/sysdep.c 2010-11-15 06:10:35 +0000 @@ -229,8 +229,8 @@ { if (tty->input) /* Is the device suspended? */ { - EMACS_GET_TTY (fileno (tty->input), &buf); - EMACS_SET_TTY (fileno (tty->input), &buf, 0); + emacs_get_tty (fileno (tty->input), &buf); + emacs_set_tty (fileno (tty->input), &buf, 0); } } } @@ -366,7 +366,7 @@ #ifndef WINDOWSNT struct emacs_tty s; - EMACS_GET_TTY (out, &s); + emacs_get_tty (out, &s); s.main.c_oflag |= OPOST; /* Enable output postprocessing */ s.main.c_oflag &= ~ONLCR; /* Disable map of NL to CR-NL on output */ #ifdef NLDLY @@ -444,7 +444,7 @@ s.main.c_cc[VTIME] = 0; #endif - EMACS_SET_TTY (out, &s, 0); + emacs_set_tty (out, &s, 0); #endif /* not WINDOWSNT */ } #endif /* not MSDOS */ @@ -856,7 +856,7 @@ if (! tty_out->old_tty) tty_out->old_tty = (struct emacs_tty *) xmalloc (sizeof (struct emacs_tty)); - EMACS_GET_TTY (fileno (tty_out->input), tty_out->old_tty); + emacs_get_tty (fileno (tty_out->input), tty_out->old_tty); tty = *tty_out->old_tty; @@ -1002,7 +1002,7 @@ dos_ttraw (tty_out); #endif - EMACS_SET_TTY (fileno (tty_out->input), &tty, 0); + emacs_set_tty (fileno (tty_out->input), &tty, 0); /* This code added to insure that, if flow-control is not to be used, we have an unlocked terminal at the start. */ @@ -1094,8 +1094,16 @@ { struct emacs_tty etty; - EMACS_GET_TTY (fd, &etty); - return EMACS_TTY_TABS_OK (&etty); + emacs_get_tty (fd, &etty); +#ifndef DOS_NT +#ifdef TABDLY + return ((etty.main.c_oflag & TABDLY) != TAB3); +#else /* not TABDLY */ + return 1; +#endif /* not TABDLY */ +#else /* DOS_NT */ + return 0; +#endif /* DOS_NT */ } /* Get terminal size from system. @@ -1257,7 +1265,7 @@ #endif /* F_SETFL */ if (tty_out->old_tty) - while (EMACS_SET_TTY (fileno (tty_out->input), + while (emacs_set_tty (fileno (tty_out->input), tty_out->old_tty, 0) < 0 && errno == EINTR) ; === modified file 'src/systty.h' --- src/systty.h 2010-08-22 15:14:37 +0000 +++ src/systty.h 2010-11-15 06:10:35 +0000 @@ -86,17 +86,6 @@ /* Manipulate a terminal's current process group. */ -/* EMACS_GET_TTY_PGRP(int FD, int *PGID) sets *PGID the terminal FD's - current process group. Return -1 if there is an error. - - EMACS_SET_TTY_PGRP(int FD, int *PGID) sets the terminal FD's - current process group to *PGID. Return -1 if there is an error. */ - -#ifndef DOS_NT -#define EMACS_GET_TTY_PGRP(fd, pgid) (*(pgid) = tcgetpgrp ((fd))) -#define EMACS_SET_TTY_PGRP(fd, pgid) (tcsetpgrp ((fd), *(pgid))) -#endif /* not DOS_NT */ - /* EMACS_GETPGRP (arg) returns the process group of the process. */ #if defined (GETPGRP_VOID) @@ -112,21 +101,7 @@ state, for example a struct tchars, a struct sgttyb, a struct tchars, a struct ltchars, and a struct pagechars, struct emacs_tty should contain an element for each parameter struct - that Emacs may change. - - EMACS_GET_TTY (int FD, struct emacs_tty *P) stores the parameters - of the tty on FD in *P. Return zero if all's well, or -1 if we ran - into an error we couldn't deal with. - - EMACS_SET_TTY (int FD, struct emacs_tty *P, int flushp) - sets the parameters of the tty on FD according to the contents of - *P. If flushp is non-zero, we discard queued input to be - written before making the change. - Return 0 if all went well, and -1 if anything failed. - - EMACS_TTY_TABS_OK (struct emacs_tty *P) is false if the kernel - expands tabs to spaces upon output; in that case, there is no - advantage to using tabs over spaces. */ + that Emacs may change. */ /* For each tty parameter structure that Emacs might want to save and restore, @@ -145,31 +120,6 @@ #endif /* DOS_NT */ }; -/* Define EMACS_GET_TTY and EMACS_SET_TTY, - the macros for reading and setting parts of `struct emacs_tty'. - - These got pretty unmanageable (huge macros are hard to debug), and - finally needed some code which couldn't be done as part of an - expression, so we moved them out to their own functions in sysdep.c. */ -#define EMACS_GET_TTY(fd, p) (emacs_get_tty ((fd), (p))) -#define EMACS_SET_TTY(fd, p, waitp) (emacs_set_tty ((fd), (p), (waitp))) extern int emacs_get_tty (int, struct emacs_tty *); extern int emacs_set_tty (int, struct emacs_tty *, int); - -/* Define EMACS_TTY_TABS_OK. */ - -#ifndef DOS_NT - -#ifdef TABDLY -#define EMACS_TTY_TABS_OK(p) (((p)->main.c_oflag & TABDLY) != TAB3) -#else /* not TABDLY */ -#define EMACS_TTY_TABS_OK(p) 1 -#endif /* not TABDLY */ - -#else /* DOS_NT */ -#define EMACS_TTY_TABS_OK(p) 0 -#endif /* DOS_NT */ - -/* arch-tag: cf4b90bc-be41-401c-be98-40619178a712 - (do not change this comment) */ === modified file 'src/term.c' --- src/term.c 2010-11-13 13:29:31 +0000 +++ src/term.c 2010-11-15 06:10:35 +0000 @@ -3087,8 +3087,7 @@ dissociate_if_controlling_tty (int fd) { #ifndef DOS_NT - int pgid; - EMACS_GET_TTY_PGRP (fd, &pgid); /* If tcgetpgrp succeeds, fd is the ctty. */ + int pgid = tcgetpgrp (fd); /* If tcgetpgrp succeeds, fd is the ctty. */ if (pgid != -1) { #if defined (USG5) @@ -3832,7 +3831,3 @@ encode_terminal_dst = NULL; } - - -/* arch-tag: 498e7449-6f2e-45e2-91dd-b7d4ca488193 - (do not change this comment) */ ------------------------------------------------------------ revno: 102390 committer: Dan Nicolaescu branch nick: trunk timestamp: Sun 2010-11-14 21:52:58 -0800 message: * src/data.c (sign_extend_temp, sign_extend_lisp_int): Remove, unused. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-11-14 19:58:24 +0000 +++ src/ChangeLog 2010-11-15 05:52:58 +0000 @@ -1,3 +1,7 @@ +2010-11-15 Dan Nicolaescu + + * data.c (sign_extend_temp, sign_extend_lisp_int): Remove, unused. + 2010-11-14 Chong Yidong * w32fns.c (Fx_create_frame): === modified file 'src/data.c' --- src/data.c 2010-09-24 17:48:10 +0000 +++ src/data.c 2010-11-15 05:52:58 +0000 @@ -135,21 +135,6 @@ xsignal3 (Qargs_out_of_range, a1, a2, a3); } -/* On some machines, XINT needs a temporary location. - Here it is, in case it is needed. */ - -int sign_extend_temp; - -/* On a few machines, XINT can only be done by calling this. */ - -int -sign_extend_lisp_int (EMACS_INT num) -{ - if (num & (((EMACS_INT) 1) << (VALBITS - 1))) - return num | (((EMACS_INT) (-1)) << VALBITS); - else - return num & ((((EMACS_INT) 1) << VALBITS) - 1); -} /* Data type predicates */ ------------------------------------------------------------ revno: 102389 committer: Katsumi Yamaoka branch nick: trunk timestamp: Mon 2010-11-15 02:40:42 +0000 message: gnus-sum.el (gnus-summary-move-article): Fix `while' loop to make it work for two or more articles. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-11-12 06:24:47 +0000 +++ lisp/gnus/ChangeLog 2010-11-15 02:40:42 +0000 @@ -1,3 +1,8 @@ +2010-11-15 Katsumi Yamaoka + + * gnus-sum.el (gnus-summary-move-article): Fix `while' loop to make it + work for two or more articles. + 2010-11-12 Katsumi Yamaoka * gnus-art.el (article-treat-non-ascii): Keep text properties not to === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-11-11 02:10:07 +0000 +++ lisp/gnus/gnus-sum.el 2010-11-15 02:40:42 +0000 @@ -9709,199 +9709,206 @@ (gnus-article-original-subject (mail-header-subject (gnus-data-header (assoc article (gnus-data-list nil)))))) - (setq - art-group - (cond - ;; Move the article. - ((eq action 'move) - ;; Remove this article from future suppression. - (gnus-dup-unsuppress-article article) - (let* ((from-method (gnus-find-method-for-group - gnus-newsgroup-name)) - (to-method (or select-method - (gnus-find-method-for-group to-newsgroup))) - (move-is-internal (gnus-server-equal from-method to-method))) - (gnus-request-move-article - article ; Article to move - gnus-newsgroup-name ; From newsgroup - (nth 1 (gnus-find-method-for-group - gnus-newsgroup-name)) ; Server - (list 'gnus-request-accept-article - to-newsgroup (list 'quote select-method) - (not articles) t) ; Accept form - (not articles) ; Only save nov last time - (and move-is-internal - to-newsgroup ; Not respooling - (gnus-group-real-name to-newsgroup))))) ; Is this move internal? - ;; Copy the article. - ((eq action 'copy) - (with-current-buffer copy-buf - (when (gnus-request-article-this-buffer article gnus-newsgroup-name) - (save-restriction - (nnheader-narrow-to-headers) - (dolist (hdr gnus-copy-article-ignored-headers) - (message-remove-header hdr t))) - (gnus-request-accept-article - to-newsgroup select-method (not articles) t)))) - ;; Crosspost the article. - ((eq action 'crosspost) - (let ((xref (message-tokenize-header - (mail-header-xref (gnus-summary-article-header article)) - " "))) - (setq new-xref (concat (gnus-group-real-name gnus-newsgroup-name) - ":" (number-to-string article))) - (unless xref - (setq xref (list (system-name)))) - (setq new-xref - (concat - (mapconcat 'identity - (delete "Xref:" (delete new-xref xref)) - " ") - " " new-xref)) + (setq + art-group + (cond + ;; Move the article. + ((eq action 'move) + ;; Remove this article from future suppression. + (gnus-dup-unsuppress-article article) + (let* ((from-method (gnus-find-method-for-group + gnus-newsgroup-name)) + (to-method (or select-method + (gnus-find-method-for-group to-newsgroup))) + (move-is-internal (gnus-server-equal from-method to-method))) + (gnus-request-move-article + article ; Article to move + gnus-newsgroup-name ; From newsgroup + (nth 1 (gnus-find-method-for-group + gnus-newsgroup-name)) ; Server + (list 'gnus-request-accept-article + to-newsgroup (list 'quote select-method) + (not articles) t) ; Accept form + (not articles) ; Only save nov last time + (and move-is-internal + to-newsgroup ; Not respooling + ; Is this move internal? + (gnus-group-real-name to-newsgroup))))) + ;; Copy the article. + ((eq action 'copy) (with-current-buffer copy-buf - ;; First put the article in the destination group. - (gnus-request-article-this-buffer article gnus-newsgroup-name) - (when (consp (setq art-group - (gnus-request-accept-article - to-newsgroup select-method (not articles) t))) - (setq new-xref (concat new-xref " " (car art-group) - ":" - (number-to-string (cdr art-group)))) - ;; Now we have the new Xrefs header, so we insert - ;; it and replace the new article. - (nnheader-replace-header "Xref" new-xref) - (gnus-request-replace-article - (cdr art-group) to-newsgroup (current-buffer) t) - art-group)))))) - (cond - ((not art-group) - (gnus-message 1 "Couldn't %s article %s: %s" - (cadr (assq action names)) article - (nnheader-get-report (car to-method)))) - ((eq art-group 'junk) - (when (eq action 'move) - (gnus-summary-mark-article article gnus-canceled-mark) - (gnus-message 4 "Deleted article %s" article) - ;; run the delete hook - (run-hook-with-args 'gnus-summary-article-delete-hook - action - (gnus-data-header - (assoc article (gnus-data-list nil))) - gnus-newsgroup-original-name nil - select-method))) - (t - (let* ((pto-group (gnus-group-prefixed-name - (car art-group) to-method)) - (info (gnus-get-info pto-group)) - (to-group (gnus-info-group info)) - to-marks) - ;; Update the group that has been moved to. - (when (and info - (memq action '(move copy))) - (unless (member to-group to-groups) - (push to-group to-groups)) - - (unless (memq article gnus-newsgroup-unreads) - (push 'read to-marks) - (gnus-info-set-read - info (gnus-add-to-range (gnus-info-read info) - (list (cdr art-group))))) - - ;; See whether the article is to be put in the cache. - (let* ((expirable (gnus-group-auto-expirable-p to-group)) - (marks (if expirable - gnus-article-mark-lists - (delete '(expirable . expire) - (copy-sequence gnus-article-mark-lists)))) - (to-article (cdr art-group))) - - ;; Enter the article into the cache in the new group, - ;; if that is required. - (when gnus-use-cache - (gnus-cache-possibly-enter-article - to-group to-article - (memq article gnus-newsgroup-marked) - (memq article gnus-newsgroup-dormant) - (memq article gnus-newsgroup-unreads))) - - (when gnus-preserve-marks - ;; Copy any marks over to the new group. - (when (and (equal to-group gnus-newsgroup-name) - (not (memq article gnus-newsgroup-unreads))) - ;; Mark this article as read in this group. - (push (cons to-article gnus-read-mark) gnus-newsgroup-reads) - ;; Increase the active status of this group. - (setcdr (gnus-active to-group) to-article) - (setcdr gnus-newsgroup-active to-article)) - - (while marks - (when (eq (gnus-article-mark-to-type (cdar marks)) 'list) - (when (memq article (symbol-value - (intern (format "gnus-newsgroup-%s" - (caar marks))))) - (push (cdar marks) to-marks) - ;; If the other group is the same as this group, - ;; then we have to add the mark to the list. - (when (equal to-group gnus-newsgroup-name) - (set (intern (format "gnus-newsgroup-%s" (caar marks))) - (cons to-article - (symbol-value - (intern (format "gnus-newsgroup-%s" - (caar marks))))))) - ;; Copy the marks to other group. - (gnus-add-marked-articles - to-group (cdar marks) (list to-article) info))) - (setq marks (cdr marks))) - - (when (and expirable - gnus-mark-copied-or-moved-articles-as-expirable - (not (memq 'expire to-marks))) - ;; Mark this article as expirable. - (push 'expire to-marks) - (when (equal to-group gnus-newsgroup-name) - (push to-article gnus-newsgroup-expirable)) - ;; Copy the expirable mark to other group. - (gnus-add-marked-articles - to-group 'expire (list to-article) info)) - - (when to-marks - (gnus-request-set-mark - to-group (list (list (list to-article) 'add to-marks))))) - - (gnus-dribble-enter - (concat "(gnus-group-set-info '" - (gnus-prin1-to-string (gnus-get-info to-group)) - ")")))) - - ;; Update the Xref header in this article to point to - ;; the new crossposted article we have just created. - (when (eq action 'crosspost) - (with-current-buffer copy-buf - (gnus-request-article-this-buffer article gnus-newsgroup-name) - (nnheader-replace-header "Xref" new-xref) - (gnus-request-replace-article - article gnus-newsgroup-name (current-buffer) t))) - - ;; run the move/copy/crosspost/respool hook - (let ((header (gnus-data-header - (assoc article (gnus-data-list nil))))) - (mail-header-set-subject header gnus-article-original-subject) - (run-hook-with-args 'gnus-summary-article-move-hook - action - (gnus-data-header - (assoc article (gnus-data-list nil))) - gnus-newsgroup-original-name - to-newsgroup - select-method))) - - ;;;!!!Why is this necessary? - (set-buffer gnus-summary-buffer) - - (when (eq action 'move) - (save-excursion - (gnus-summary-goto-subject article) - (gnus-summary-mark-article article gnus-canceled-mark))))) - (push article articles-to-update-marks)) + (when (gnus-request-article-this-buffer article + gnus-newsgroup-name) + (save-restriction + (nnheader-narrow-to-headers) + (dolist (hdr gnus-copy-article-ignored-headers) + (message-remove-header hdr t))) + (gnus-request-accept-article + to-newsgroup select-method (not articles) t)))) + ;; Crosspost the article. + ((eq action 'crosspost) + (let ((xref (message-tokenize-header + (mail-header-xref (gnus-summary-article-header + article)) + " "))) + (setq new-xref (concat (gnus-group-real-name gnus-newsgroup-name) + ":" (number-to-string article))) + (unless xref + (setq xref (list (system-name)))) + (setq new-xref + (concat + (mapconcat 'identity + (delete "Xref:" (delete new-xref xref)) + " ") + " " new-xref)) + (with-current-buffer copy-buf + ;; First put the article in the destination group. + (gnus-request-article-this-buffer article gnus-newsgroup-name) + (when (consp (setq art-group + (gnus-request-accept-article + to-newsgroup select-method (not articles) + t))) + (setq new-xref (concat new-xref " " (car art-group) + ":" + (number-to-string (cdr art-group)))) + ;; Now we have the new Xrefs header, so we insert + ;; it and replace the new article. + (nnheader-replace-header "Xref" new-xref) + (gnus-request-replace-article + (cdr art-group) to-newsgroup (current-buffer) t) + art-group)))))) + (cond + ((not art-group) + (gnus-message 1 "Couldn't %s article %s: %s" + (cadr (assq action names)) article + (nnheader-get-report (car to-method)))) + ((eq art-group 'junk) + (when (eq action 'move) + (gnus-summary-mark-article article gnus-canceled-mark) + (gnus-message 4 "Deleted article %s" article) + ;; run the delete hook + (run-hook-with-args 'gnus-summary-article-delete-hook + action + (gnus-data-header + (assoc article (gnus-data-list nil))) + gnus-newsgroup-original-name nil + select-method))) + (t + (let* ((pto-group (gnus-group-prefixed-name + (car art-group) to-method)) + (info (gnus-get-info pto-group)) + (to-group (gnus-info-group info)) + to-marks) + ;; Update the group that has been moved to. + (when (and info + (memq action '(move copy))) + (unless (member to-group to-groups) + (push to-group to-groups)) + + (unless (memq article gnus-newsgroup-unreads) + (push 'read to-marks) + (gnus-info-set-read + info (gnus-add-to-range (gnus-info-read info) + (list (cdr art-group))))) + + ;; See whether the article is to be put in the cache. + (let* ((expirable (gnus-group-auto-expirable-p to-group)) + (marks (if expirable + gnus-article-mark-lists + (delete '(expirable . expire) + (copy-sequence + gnus-article-mark-lists)))) + (to-article (cdr art-group))) + + ;; Enter the article into the cache in the new group, + ;; if that is required. + (when gnus-use-cache + (gnus-cache-possibly-enter-article + to-group to-article + (memq article gnus-newsgroup-marked) + (memq article gnus-newsgroup-dormant) + (memq article gnus-newsgroup-unreads))) + + (when gnus-preserve-marks + ;; Copy any marks over to the new group. + (when (and (equal to-group gnus-newsgroup-name) + (not (memq article gnus-newsgroup-unreads))) + ;; Mark this article as read in this group. + (push (cons to-article gnus-read-mark) + gnus-newsgroup-reads) + ;; Increase the active status of this group. + (setcdr (gnus-active to-group) to-article) + (setcdr gnus-newsgroup-active to-article)) + + (while marks + (when (eq (gnus-article-mark-to-type (cdar marks)) 'list) + (when (memq article (symbol-value + (intern (format "gnus-newsgroup-%s" + (caar marks))))) + (push (cdar marks) to-marks) + ;; If the other group is the same as this group, + ;; then we have to add the mark to the list. + (when (equal to-group gnus-newsgroup-name) + (set (intern (format "gnus-newsgroup-%s" + (caar marks))) + (cons to-article + (symbol-value + (intern (format "gnus-newsgroup-%s" + (caar marks))))))) + ;; Copy the marks to other group. + (gnus-add-marked-articles + to-group (cdar marks) (list to-article) info))) + (setq marks (cdr marks))) + + (when (and expirable + gnus-mark-copied-or-moved-articles-as-expirable + (not (memq 'expire to-marks))) + ;; Mark this article as expirable. + (push 'expire to-marks) + (when (equal to-group gnus-newsgroup-name) + (push to-article gnus-newsgroup-expirable)) + ;; Copy the expirable mark to other group. + (gnus-add-marked-articles + to-group 'expire (list to-article) info)) + + (when to-marks + (gnus-request-set-mark + to-group (list (list (list to-article) 'add to-marks))))) + + (gnus-dribble-enter + (concat "(gnus-group-set-info '" + (gnus-prin1-to-string (gnus-get-info to-group)) + ")")))) + + ;; Update the Xref header in this article to point to + ;; the new crossposted article we have just created. + (when (eq action 'crosspost) + (with-current-buffer copy-buf + (gnus-request-article-this-buffer article gnus-newsgroup-name) + (nnheader-replace-header "Xref" new-xref) + (gnus-request-replace-article + article gnus-newsgroup-name (current-buffer) t))) + + ;; run the move/copy/crosspost/respool hook + (let ((header (gnus-data-header + (assoc article (gnus-data-list nil))))) + (mail-header-set-subject header gnus-article-original-subject) + (run-hook-with-args 'gnus-summary-article-move-hook + action + (gnus-data-header + (assoc article (gnus-data-list nil))) + gnus-newsgroup-original-name + to-newsgroup + select-method))) + + ;;;!!!Why is this necessary? + (set-buffer gnus-summary-buffer) + + (when (eq action 'move) + (save-excursion + (gnus-summary-goto-subject article) + (gnus-summary-mark-article article gnus-canceled-mark))))) + (push article articles-to-update-marks))) (save-excursion (apply 'gnus-summary-remove-process-mark articles-to-update-marks)) @@ -9912,7 +9919,7 @@ (gnus-kill-buffer copy-buf) (gnus-summary-position-point) - (gnus-set-mode-line 'summary)))) + (gnus-set-mode-line 'summary))) (defun gnus-summary-copy-article (&optional n to-newsgroup select-method) "Copy the current article to some other group. ------------------------------------------------------------ revno: 102388 committer: Chong Yidong branch nick: trunk timestamp: Sun 2010-11-14 14:58:24 -0500 message: Repeat 2010-11-14 change to xfns.c for w32 and ns. * w32fns.c (Fx_create_frame): * nsfns.m (Fx_create_frame): Don't check for the cursorColor resource here; it's now done at startup. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-11-14 10:21:16 +0000 +++ src/ChangeLog 2010-11-14 19:58:24 +0000 @@ -1,3 +1,9 @@ +2010-11-14 Chong Yidong + + * w32fns.c (Fx_create_frame): + * nsfns.m (Fx_create_frame): Don't check for the cursorColor + resource here; it's now done at startup. + 2010-11-14 Jan Djärv * xterm.c (set_wm_state): Add Qnil to final cons. === modified file 'src/nsfns.m' --- src/nsfns.m 2010-10-29 07:04:09 +0000 +++ src/nsfns.m 2010-11-14 19:58:24 +0000 @@ -1224,8 +1224,6 @@ "foreground", "Foreground", RES_TYPE_STRING); x_default_parameter (f, parms, Qbackground_color, build_string ("White"), "background", "Background", RES_TYPE_STRING); - x_default_parameter (f, parms, Qcursor_color, build_string ("grey"), - "cursorColor", "CursorColor", RES_TYPE_STRING); /* FIXME: not suppported yet in Nextstep */ x_default_parameter (f, parms, Qline_spacing, Qnil, "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); === modified file 'src/w32fns.c' --- src/w32fns.c 2010-11-14 06:55:27 +0000 +++ src/w32fns.c 2010-11-14 19:58:24 +0000 @@ -4345,8 +4345,6 @@ "background", "Background", RES_TYPE_STRING); x_default_parameter (f, parameters, Qmouse_color, build_string ("black"), "pointerColor", "Foreground", RES_TYPE_STRING); - x_default_parameter (f, parameters, Qcursor_color, build_string ("black"), - "cursorColor", "Foreground", RES_TYPE_STRING); x_default_parameter (f, parameters, Qborder_color, build_string ("black"), "borderColor", "BorderColor", RES_TYPE_STRING); x_default_parameter (f, parameters, Qscreen_gamma, Qnil, ------------------------------------------------------------ revno: 102387 committer: Jan D branch nick: trunk timestamp: Sun 2010-11-14 11:21:16 +0100 message: Fix last cons in set_wm_state, remove unused variables. * src/xselect.c (x_send_client_event): Remove unused variables cons and size. * src/xterm.c (set_wm_state): Add Qnil to final cons. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-11-14 06:55:27 +0000 +++ src/ChangeLog 2010-11-14 10:21:16 +0000 @@ -1,3 +1,10 @@ +2010-11-14 Jan Djärv + + * xterm.c (set_wm_state): Add Qnil to final cons. + + * xselect.c (x_send_client_event): Remove unused variables cons and + size. + 2010-11-14 YAMAMOTO Mitsuharu * keyboard.c (modify_event_symbol) : Add const to array elements of === modified file 'src/xselect.c' --- src/xselect.c 2010-11-13 18:59:28 +0000 +++ src/xselect.c 2010-11-14 10:21:16 +0000 @@ -2544,8 +2544,6 @@ struct x_display_info *dpyinfo = check_x_display_info (display); Window wdest; XEvent event; - Lisp_Object cons; - int size; struct frame *f = check_x_frame (from); int to_root; @@ -2593,9 +2591,6 @@ if (wdest == 0) wdest = dpyinfo->root_window; to_root = wdest == dpyinfo->root_window; - for (cons = values, size = 0; CONSP (cons); cons = XCDR (cons), ++size) - ; - BLOCK_INPUT; event.xclient.message_type = message_type; === modified file 'src/xterm.c' --- src/xterm.c 2010-11-13 18:59:28 +0000 +++ src/xterm.c 2010-11-14 10:21:16 +0000 @@ -8382,7 +8382,8 @@ Fcons (make_fixnum_or_float (atom), value != 0 - ? make_fixnum_or_float (value) : Qnil))); + ? Fcons (make_fixnum_or_float (value), Qnil) + : Qnil))); } void ------------------------------------------------------------ revno: 102386 committer: YAMAMOTO Mitsuharu branch nick: trunk timestamp: Sun 2010-11-14 15:55:27 +0900 message: Add const to array elements. * keyboard.c (modify_event_symbol) : Add const to array elements of arg NAME_TABLE. (lispy_accent_keys, lispy_function_keys, lispy_multimedia_keys) (lispy_kana_keys, iso_lispy_function_keys, lispy_wheel_names) (lispy_wheel_names, lispy_drag_n_drop_names, modifier_names): Add const to array elements. (scroll_bar_parts): Make static. Fix position of const. * w32fns.c (lispy_function_keys): Add const to extern. * w32inevt.c (lispy_function_keys): Likewise. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-11-14 02:09:11 +0000 +++ src/ChangeLog 2010-11-14 06:55:27 +0000 @@ -1,3 +1,17 @@ +2010-11-14 YAMAMOTO Mitsuharu + + * keyboard.c (modify_event_symbol) : Add const to array elements of + arg NAME_TABLE. + (lispy_accent_keys, lispy_function_keys, lispy_multimedia_keys) + (lispy_kana_keys, iso_lispy_function_keys, lispy_wheel_names) + (lispy_wheel_names, lispy_drag_n_drop_names, modifier_names): + Add const to array elements. + (scroll_bar_parts): Make static. Fix position of const. + + * w32fns.c (lispy_function_keys): Add const to extern. + + * w32inevt.c (lispy_function_keys): Likewise. + 2010-11-14 Chong Yidong * xfns.c (Fx_create_frame): Don't check for the cursorColor === modified file 'src/keyboard.c' --- src/keyboard.c 2010-11-09 20:07:10 +0000 +++ src/keyboard.c 2010-11-14 06:55:27 +0000 @@ -620,7 +620,7 @@ unsigned long); #endif static Lisp_Object modify_event_symbol (EMACS_INT, unsigned, Lisp_Object, - Lisp_Object, const char **, + Lisp_Object, const char *const *, Lisp_Object *, unsigned); static Lisp_Object make_lispy_switch_frame (Lisp_Object); static void save_getcjmp (jmp_buf); @@ -4752,7 +4752,7 @@ /* This is a list of Lisp names for special "accent" characters. It parallels lispy_accent_codes. */ -static const char *lispy_accent_keys[] = +static const char *const lispy_accent_keys[] = { "dead-circumflex", "dead-grave", @@ -4779,7 +4779,7 @@ #ifdef HAVE_NTGUI #define FUNCTION_KEY_OFFSET 0x0 -char const *lispy_function_keys[] = +const char *const lispy_function_keys[] = { 0, /* 0 */ @@ -4973,7 +4973,7 @@ /* Some of these duplicate the "Media keys" on newer keyboards, but they are delivered to the application in a different way. */ -static const char *lispy_multimedia_keys[] = +static const char *const lispy_multimedia_keys[] = { 0, "browser-back", @@ -5037,7 +5037,7 @@ the XK_kana_A case below. */ #if 0 #ifdef XK_kana_A -static const char *lispy_kana_keys[] = +static const char *const lispy_kana_keys[] = { /* X Keysym value */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x400 .. 0x40f */ @@ -5076,7 +5076,7 @@ /* You'll notice that this table is arranged to be conveniently indexed by X Windows keysym values. */ -static const char *lispy_function_keys[] = +static const char *const lispy_function_keys[] = { /* X Keysym value */ @@ -5162,7 +5162,7 @@ /* ISO 9995 Function and Modifier Keys; the first byte is 0xFE. */ #define ISO_FUNCTION_KEY_OFFSET 0xfe00 -static const char *iso_lispy_function_keys[] = +static const char *const iso_lispy_function_keys[] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0xfe00 */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0xfe08 */ @@ -5185,14 +5185,14 @@ Lisp_Object Vlispy_mouse_stem; -static const char *lispy_wheel_names[] = +static const char *const lispy_wheel_names[] = { "wheel-up", "wheel-down", "wheel-left", "wheel-right" }; /* drag-n-drop events are generated when a set of selected files are dragged from another application and dropped onto an Emacs window. */ -static const char *lispy_drag_n_drop_names[] = +static const char *const lispy_drag_n_drop_names[] = { "drag-n-drop" }; @@ -5203,7 +5203,7 @@ Lisp_Object Qtop, Qratio; /* An array of scroll bar parts, indexed by an enum scroll_bar_part value. */ -const Lisp_Object *scroll_bar_parts[] = { +static Lisp_Object *const scroll_bar_parts[] = { &Qabove_handle, &Qhandle, &Qbelow_handle, &Qup, &Qdown, &Qtop, &Qbottom, &Qend_scroll, &Qratio }; @@ -6351,7 +6351,7 @@ } -static const char *modifier_names[] = +static const char *const modifier_names[] = { "up", "down", "drag", "click", "double", "triple", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6571,7 +6571,7 @@ static Lisp_Object modify_event_symbol (EMACS_INT symbol_num, unsigned int modifiers, Lisp_Object symbol_kind, - Lisp_Object name_alist_or_stem, const char **name_table, + Lisp_Object name_alist_or_stem, const char *const *name_table, Lisp_Object *symbol_table, unsigned int table_size) { Lisp_Object value; === modified file 'src/w32fns.c' --- src/w32fns.c 2010-11-06 13:45:37 +0000 +++ src/w32fns.c 2010-11-14 06:55:27 +0000 @@ -82,7 +82,7 @@ extern int quit_char; -extern char *lispy_function_keys[]; +extern const char *const lispy_function_keys[]; /* The colormap for converting color names to RGB values */ Lisp_Object Vw32_color_map; === modified file 'src/w32inevt.c' --- src/w32inevt.c 2010-10-14 14:32:27 +0000 +++ src/w32inevt.c 2010-11-14 06:55:27 +0000 @@ -282,7 +282,7 @@ } -extern char *lispy_function_keys[]; +extern const char *const lispy_function_keys[]; static int faked_key = 0;