Now on revision 114374. ------------------------------------------------------------ revno: 114374 committer: Dmitry Antipov branch nick: trunk timestamp: Wed 2013-09-18 10:48:11 +0400 message: * frame.c (x_mouse_grabbed): New function. * dispextern.h (x_mouse_grabbed): Add prototype. (last_mouse_frame): Remove declaration. * xterm.h (struct x_display_info): * w32term.h (struct w32_display_info): * nsterm.h (struct ns_display_info): New member last_mouse_frame, going to replace... * xdisp.c (last_mouse_frame): ...global variable. (note_tool_bar_highlight): * w32term.c (w32_mouse_position, w32_read_socket): * xterm.c (XTmouse_position, handle_one_xevent): Use x_mouse_grabbed. * nsterm.m (ns_mouse_position, mouseDown): Adjust user. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-17 15:57:45 +0000 +++ src/ChangeLog 2013-09-18 06:48:11 +0000 @@ -1,3 +1,19 @@ +2013-09-18 Dmitry Antipov + + * frame.c (x_mouse_grabbed): New function. + * dispextern.h (x_mouse_grabbed): Add prototype. + (last_mouse_frame): Remove declaration. + * xterm.h (struct x_display_info): + * w32term.h (struct w32_display_info): + * nsterm.h (struct ns_display_info): New member + last_mouse_frame, going to replace... + * xdisp.c (last_mouse_frame): ...global variable. + (note_tool_bar_highlight): + * w32term.c (w32_mouse_position, w32_read_socket): + * xterm.c (XTmouse_position, handle_one_xevent): + Use x_mouse_grabbed. + * nsterm.m (ns_mouse_position, mouseDown): Adjust user. + 2013-09-17 Dmitry Antipov * w32term.c (w32_read_socket): Avoid temporary === modified file 'src/dispextern.h' --- src/dispextern.h 2013-09-17 12:27:21 +0000 +++ src/dispextern.h 2013-09-18 06:48:11 +0000 @@ -3194,7 +3194,6 @@ extern Lisp_Object help_echo_string, help_echo_window; extern Lisp_Object help_echo_object, previous_help_echo_string; extern ptrdiff_t help_echo_pos; -extern struct frame *last_mouse_frame; extern int last_tool_bar_item; extern void reseat_at_previous_visible_line_start (struct it *); extern Lisp_Object lookup_glyphless_char_display (int, struct it *); @@ -3531,6 +3530,7 @@ RES_TYPE_BOOLEAN_NUMBER }; +extern bool x_mouse_grabbed (Display_Info *); extern Display_Info *check_x_display_info (Lisp_Object); extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object, Lisp_Object, const char *, const char *class, === modified file 'src/frame.c' --- src/frame.c 2013-09-17 12:59:45 +0000 +++ src/frame.c 2013-09-18 06:48:11 +0000 @@ -3432,7 +3432,16 @@ return; } - +/* Non-zero if mouse is grabbed on DPYINFO + and we know the frame where it is. */ + +bool x_mouse_grabbed (Display_Info *dpyinfo) +{ + return (dpyinfo->grabbed + && dpyinfo->last_mouse_frame + && FRAME_LIVE_P (dpyinfo->last_mouse_frame)); +} + /* Subroutines of creating an X frame. */ /* Make sure that Vx_resource_name is set to a reasonable value. === modified file 'src/nsterm.h' --- src/nsterm.h 2013-09-17 12:27:21 +0000 +++ src/nsterm.h 2013-09-18 06:48:11 +0000 @@ -597,6 +597,9 @@ struct frame *x_highlight_frame; struct frame *x_focus_frame; + + /* The frame where the mouse was last time we reported a mouse event. */ + struct frame *last_mouse_frame; }; /* This is a chain of structures for all the NS displays currently in use. */ === modified file 'src/nsterm.m' --- src/nsterm.m 2013-09-16 15:55:02 +0000 +++ src/nsterm.m 2013-09-18 06:48:11 +0000 @@ -1812,8 +1812,9 @@ XFRAME (frame)->mouse_moved = 0; last_mouse_scroll_bar = nil; - if (last_mouse_frame && FRAME_LIVE_P (last_mouse_frame)) - f = last_mouse_frame; + if (dpyinfo->last_mouse_frame + && FRAME_LIVE_P (dpyinfo->last_mouse_frame)) + f = dpyinfo->last_mouse_frame; else f = dpyinfo->x_focus_frame ? dpyinfo->x_focus_frame : SELECTED_FRAME (); @@ -5362,6 +5363,7 @@ /* This is what happens when the user presses a mouse button. */ - (void)mouseDown: (NSEvent *)theEvent { + struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (emacsframe); NSPoint p = [self convertPoint: [theEvent locationInWindow] fromView: nil]; NSTRACE (mouseDown); @@ -5371,10 +5373,10 @@ if (!emacs_event) return; - last_mouse_frame = emacsframe; + dpyinfo->last_mouse_frame = emacsframe; /* appears to be needed to prevent spurious movement events generated on button clicks */ - last_mouse_frame->mouse_moved = 0; + emacsframe->mouse_moved = 0; if ([theEvent type] == NSScrollWheel) { === modified file 'src/w32term.c' --- src/w32term.c 2013-09-17 15:57:45 +0000 +++ src/w32term.c 2013-09-18 06:48:11 +0000 @@ -3404,6 +3404,7 @@ unsigned long *time) { struct frame *f1; + struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp); block_input (); @@ -3426,19 +3427,11 @@ /* Now we have a position on the root; find the innermost window containing the pointer. */ { - if (FRAME_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame - && FRAME_LIVE_P (last_mouse_frame)) - { - /* If mouse was grabbed on a frame, give coords for that frame - even if the mouse is now outside it. */ - f1 = last_mouse_frame; - } - else - { - /* Is window under mouse one of our frames? */ - f1 = x_any_window_to_frame (FRAME_DISPLAY_INFO (*fp), - WindowFromPoint (pt)); - } + /* If mouse was grabbed on a frame, give coords for that + frame even if the mouse is now outside it. Otherwise + check for window under mouse on one of our frames. */ + f1 = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame + : x_any_window_to_frame (dpyinfo, WindowFromPoint (pt))); /* If not, is it one of our scroll bars? */ if (! f1) @@ -4479,11 +4472,8 @@ previous_help_echo_string = help_echo_string; help_echo_string = Qnil; - if (dpyinfo->grabbed && last_mouse_frame - && FRAME_LIVE_P (last_mouse_frame)) - f = last_mouse_frame; - else - f = x_window_to_frame (dpyinfo, msg.msg.hwnd); + f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame + : x_window_to_frame (dpyinfo, msg.msg.hwnd)); if (hlinfo->mouse_face_hidden) { @@ -4559,11 +4549,8 @@ int button; int up; - if (dpyinfo->grabbed && last_mouse_frame - && FRAME_LIVE_P (last_mouse_frame)) - f = last_mouse_frame; - else - f = x_window_to_frame (dpyinfo, msg.msg.hwnd); + f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame + : x_window_to_frame (dpyinfo, msg.msg.hwnd)); if (f) { @@ -4602,7 +4589,7 @@ else { dpyinfo->grabbed |= (1 << button); - last_mouse_frame = f; + dpyinfo->last_mouse_frame = f; /* Ignore any mouse motion that happened before this event; any subsequent mouse-movement Emacs events should reflect only motion after @@ -4619,11 +4606,8 @@ case WM_MOUSEWHEEL: case WM_MOUSEHWHEEL: { - if (dpyinfo->grabbed && last_mouse_frame - && FRAME_LIVE_P (last_mouse_frame)) - f = last_mouse_frame; - else - f = x_window_to_frame (dpyinfo, msg.msg.hwnd); + f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame + : x_window_to_frame (dpyinfo, msg.msg.hwnd)); if (f) { @@ -4640,7 +4624,7 @@ ButtonPress. */ f->mouse_moved = 0; } - last_mouse_frame = f; + dpyinfo->last_mouse_frame = f; last_tool_bar_item = -1; } break; === modified file 'src/w32term.h' --- src/w32term.h 2013-09-17 08:24:20 +0000 +++ src/w32term.h 2013-09-18 06:48:11 +0000 @@ -182,6 +182,9 @@ /* The frame waiting to be auto-raised in w32_read_socket. */ struct frame *w32_pending_autoraise_frame; + + /* The frame where the mouse was last time we reported a mouse event. */ + struct frame *last_mouse_frame; }; /* This is a chain of structures for all the displays currently in use. */ === modified file 'src/xdisp.c' --- src/xdisp.c 2013-09-17 07:39:54 +0000 +++ src/xdisp.c 2013-09-18 06:48:11 +0000 @@ -11454,10 +11454,6 @@ #ifdef HAVE_WINDOW_SYSTEM -/* Where the mouse was last time we reported a mouse event. */ - -struct frame *last_mouse_frame; - /* Tool-bar item index of the item on which a mouse button was pressed or -1. */ @@ -12320,9 +12316,9 @@ clear_mouse_face (hlinfo); /* Mouse is down, but on different tool-bar item? */ - mouse_down_p = (dpyinfo->grabbed - && f == last_mouse_frame - && FRAME_LIVE_P (f)); + mouse_down_p = (x_mouse_grabbed (dpyinfo) + && f == dpyinfo->last_mouse_frame); + if (mouse_down_p && last_tool_bar_item != prop_idx) return; === modified file 'src/xterm.c' --- src/xterm.c 2013-09-17 15:57:45 +0000 +++ src/xterm.c 2013-09-18 06:48:11 +0000 @@ -3945,6 +3945,7 @@ Time *timestamp) { struct frame *f1; + struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp); block_input (); @@ -4004,22 +4005,24 @@ x_catch_errors (FRAME_X_DISPLAY (*fp)); - if (FRAME_DISPLAY_INFO (*fp)->grabbed && last_mouse_frame - && FRAME_LIVE_P (last_mouse_frame)) + if (x_mouse_grabbed (dpyinfo)) { /* If mouse was grabbed on a frame, give coords for that frame even if the mouse is now outside it. */ XTranslateCoordinates (FRAME_X_DISPLAY (*fp), - /* From-window, to-window. */ - root, FRAME_X_WINDOW (last_mouse_frame), + /* From-window. */ + root, + + /* To-window. */ + FRAME_X_WINDOW (dpyinfo->last_mouse_frame), /* From-position, to-position. */ root_x, root_y, &win_x, &win_y, /* Child of win. */ &child); - f1 = last_mouse_frame; + f1 = dpyinfo->last_mouse_frame; } else { @@ -4043,7 +4046,7 @@ want the edit window. For non-Gtk+ the innermost window is the edit window. For Gtk+ it might not be. It might be the tool bar for example. */ - if (x_window_to_frame (FRAME_DISPLAY_INFO (*fp), win)) + if (x_window_to_frame (dpyinfo, win)) break; #endif win = child; @@ -4065,10 +4068,10 @@ #ifdef USE_GTK /* We don't wan't to know the innermost window. We want the edit window. */ - f1 = x_window_to_frame (FRAME_DISPLAY_INFO (*fp), win); + f1 = x_window_to_frame (dpyinfo, win); #else /* Is win one of our frames? */ - f1 = x_any_window_to_frame (FRAME_DISPLAY_INFO (*fp), win); + f1 = x_any_window_to_frame (dpyinfo, win); #endif #ifdef USE_X_TOOLKIT @@ -6704,11 +6707,8 @@ previous_help_echo_string = help_echo_string; help_echo_string = Qnil; - if (dpyinfo->grabbed && last_mouse_frame - && FRAME_LIVE_P (last_mouse_frame)) - f = last_mouse_frame; - else - f = x_window_to_frame (dpyinfo, event->xmotion.window); + f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame + : x_window_to_frame (dpyinfo, event->xmotion.window)); if (hlinfo->mouse_face_hidden) { @@ -6845,12 +6845,8 @@ last_mouse_glyph_frame = 0; dpyinfo->last_user_time = event->xbutton.time; - if (dpyinfo->grabbed - && last_mouse_frame - && FRAME_LIVE_P (last_mouse_frame)) - f = last_mouse_frame; - else - f = x_window_to_frame (dpyinfo, event->xbutton.window); + f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame + : x_window_to_frame (dpyinfo, event->xbutton.window)); #ifdef USE_GTK if (f && xg_event_is_for_scrollbar (f, event)) @@ -6923,7 +6919,7 @@ if (event->type == ButtonPress) { dpyinfo->grabbed |= (1 << event->xbutton.button); - last_mouse_frame = f; + dpyinfo->last_mouse_frame = f; if (!tool_bar_p) last_tool_bar_item = -1; === modified file 'src/xterm.h' --- src/xterm.h 2013-09-17 12:27:21 +0000 +++ src/xterm.h 2013-09-18 06:48:11 +0000 @@ -305,6 +305,9 @@ /* The frame waiting to be auto-raised in XTread_socket. */ struct frame *x_pending_autoraise_frame; + /* The frame where the mouse was last time we reported a mouse event. */ + struct frame *last_mouse_frame; + /* Time of last user interaction as returned in X events on this display. */ Time last_user_time; ------------------------------------------------------------ revno: 114373 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 22:19:28 -0700 message: * progmodes/gud.el (gud-mode): Silence --without-x compilation. (tooltip-mode): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 05:16:36 +0000 +++ lisp/ChangeLog 2013-09-18 05:19:28 +0000 @@ -20,7 +20,9 @@ * mail/rmailmm.el (rmail-mime-set-bulk-data): Silence --without-x compilation. - * progmodes/gud.el (gud-find-file): Silence --without-x compilation. + * progmodes/gud.el (gud-find-file, gud-mode): + Silence --without-x compilation. + (tooltip-mode): Declare. * wdired.el (dired-backup-overwrite): Remove declaration. (wdired-mode-map): Add doc string. === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2013-09-18 05:16:36 +0000 +++ lisp/progmodes/gud.el 2013-09-18 05:19:28 +0000 @@ -321,7 +321,7 @@ ;; Copy `gud-minor-mode' to the found buffer to turn on the menu. (with-current-buffer buf (setq-local gud-minor-mode minor-mode) - (if (boundp 'tool-bar-map) + (if (boundp 'tool-bar-map) ; not --without-x (setq-local tool-bar-map gud-tool-bar-map)) (when (and gud-tooltip-mode (eq gud-minor-mode 'gdbmi)) @@ -2482,7 +2482,8 @@ (setq mode-line-process '(":%s")) (define-key (current-local-map) "\C-c\C-l" 'gud-refresh) (set (make-local-variable 'gud-last-frame) nil) - (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) + (if (boundp 'tool-bar-map) ; not --without-x + (setq-local tool-bar-map gud-tool-bar-map)) (make-local-variable 'comint-prompt-regexp) ;; Don't put repeated commands in command history many times. (set (make-local-variable 'comint-input-ignoredups) t) @@ -3282,6 +3283,8 @@ ;;; Customizable settings +(defvar tooltip-mode) + ;;;###autoload (define-minor-mode gud-tooltip-mode "Toggle the display of GUD tooltips. ------------------------------------------------------------ revno: 114372 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 22:16:36 -0700 message: * progmodes/gud.el (gud-find-file): Silence --without-x compilation. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 05:11:38 +0000 +++ lisp/ChangeLog 2013-09-18 05:16:36 +0000 @@ -20,6 +20,8 @@ * mail/rmailmm.el (rmail-mime-set-bulk-data): Silence --without-x compilation. + * progmodes/gud.el (gud-find-file): Silence --without-x compilation. + * wdired.el (dired-backup-overwrite): Remove declaration. (wdired-mode-map): Add doc string. === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2013-05-24 06:50:22 +0000 +++ lisp/progmodes/gud.el 2013-09-18 05:16:36 +0000 @@ -1,7 +1,6 @@ ;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers -;; Copyright (C) 1992-1996, 1998, 2000-2013 Free Software Foundation, -;; Inc. +;; Copyright (C) 1992-1996, 1998, 2000-2013 Free Software Foundation, Inc. ;; Author: Eric S. Raymond ;; Maintainer: FSF @@ -321,8 +320,9 @@ (when buf ;; Copy `gud-minor-mode' to the found buffer to turn on the menu. (with-current-buffer buf - (set (make-local-variable 'gud-minor-mode) minor-mode) - (set (make-local-variable 'tool-bar-map) gud-tool-bar-map) + (setq-local gud-minor-mode minor-mode) + (if (boundp 'tool-bar-map) + (setq-local tool-bar-map gud-tool-bar-map)) (when (and gud-tooltip-mode (eq gud-minor-mode 'gdbmi)) (make-local-variable 'gdb-define-alist) ------------------------------------------------------------ revno: 114371 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 22:11:38 -0700 message: * eshell/em-glob.el (ange-cache): * eshell/em-unix.el (ange-cache): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 05:04:41 +0000 +++ lisp/ChangeLog 2013-09-18 05:11:38 +0000 @@ -25,6 +25,9 @@ * custom.el (x-get-resource): Declare. + * eshell/em-glob.el (ange-cache): + * eshell/em-unix.el (ange-cache): Declare. + * faces.el (x-display-list, x-open-connection, x-get-resource): Declare. === modified file 'lisp/eshell/em-glob.el' --- lisp/eshell/em-glob.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/em-glob.el 2013-09-18 05:11:38 +0000 @@ -232,6 +232,8 @@ (regexp-quote (substring pattern matched-in-pattern)) "\\'"))) +(defvar ange-cache) ; XEmacs? See esh-util + (defun eshell-extended-glob (glob) "Return a list of files generated from GLOB, perhaps looking for DIRS-ONLY. This function almost fully supports zsh style filename generation === modified file 'lisp/eshell/em-unix.el' --- lisp/eshell/em-unix.el 2013-09-15 00:35:54 +0000 +++ lisp/eshell/em-unix.el 2013-09-18 05:11:38 +0000 @@ -461,6 +461,8 @@ (eshell-parse-command (format "tar %s %s" tar-args archive) args)))) +(defvar ange-cache) ; XEmacs? See esh-util + ;; this is to avoid duplicating code... (defmacro eshell-mvcpln-template (command action func query-var force-var &optional preserve) ------------------------------------------------------------ revno: 114370 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 22:10:21 -0700 message: Fix typo in declaration diff: === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2013-09-18 01:44:44 +0000 +++ lisp/url/url-http.el 2013-09-18 05:10:21 +0000 @@ -858,7 +858,7 @@ (goto-char (point-min)) success)) -(declare-function zlib-decompress-region "decompress.c" (start) (end)) +(declare-function zlib-decompress-region "decompress.c" (start end)) (defun url-handle-content-transfer-encoding () (let ((encoding (mail-fetch-field "content-encoding"))) ------------------------------------------------------------ revno: 114369 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 22:04:41 -0700 message: * emacs-lisp/chart.el (x-display-color-cells): Declare. (chart-face-list): Drop Emacsen without display-color-p. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:53:05 +0000 +++ lisp/ChangeLog 2013-09-18 05:04:41 +0000 @@ -1,5 +1,8 @@ 2013-09-18 Glenn Morris + * emacs-lisp/chart.el (x-display-color-cells): Declare. + (chart-face-list): Drop Emacsen without display-color-p. + * net/eww.el (libxml-parse-html-region): Declare. (eww-display-html): Explicit error if no libxml2 support. === modified file 'lisp/emacs-lisp/chart.el' --- lisp/emacs-lisp/chart.el 2013-05-24 06:59:13 +0000 +++ lisp/emacs-lisp/chart.el 2013-09-18 05:04:41 +0000 @@ -1,7 +1,7 @@ ;;; chart.el --- Draw charts (bar charts, etc) -*- lexical-binding: t -*- -;; Copyright (C) 1996, 1998-1999, 2001, 2004-2005, 2007-2013 Free -;; Software Foundation, Inc. +;; Copyright (C) 1996, 1998-1999, 2001, 2004-2005, 2007-2013 +;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam ;; Version: 0.2 @@ -86,10 +86,10 @@ :group 'eieio :type 'boolean) +(declare-function x-display-color-cells "xfns.c" (&optional terminal)) + (defvar chart-face-list - (if (if (fboundp 'display-color-p) - (display-color-p) - window-system) + (if (display-color-p) (let ((cl chart-face-color-list) (pl chart-face-pixmap-list) (faces ()) ------------------------------------------------------------ revno: 114368 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 22:00:26 -0700 message: * semantic/find.el (semantic-brute-find-first-tag-by-name): Replace obsolete function assoc-ignore-case with assoc-string. diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-09-18 04:57:25 +0000 +++ lisp/cedet/ChangeLog 2013-09-18 05:00:26 +0000 @@ -1,5 +1,8 @@ 2013-09-18 Glenn Morris + * semantic/find.el (semantic-brute-find-first-tag-by-name): + Replace obsolete function assoc-ignore-case with assoc-string. + * semantic/complete.el (tooltip-mode, tooltip-frame-parameters) (tooltip-show): Declare. === modified file 'lisp/cedet/semantic/find.el' --- lisp/cedet/semantic/find.el 2013-09-12 17:23:48 +0000 +++ lisp/cedet/semantic/find.el 2013-09-18 05:00:26 +0000 @@ -457,13 +457,11 @@ "Find a tag NAME within STREAMORBUFFER. NAME is a string. If SEARCH-PARTS is non-nil, search children of tags. If SEARCH-INCLUDE was never implemented. +Respects `semantic-case-fold'. Use `semantic-find-first-tag-by-name' instead." (let* ((stream (semantic-something-to-tag-table streamorbuffer)) - (assoc-fun (if semantic-case-fold - #'assoc-ignore-case - #'assoc)) - (m (funcall assoc-fun name stream))) + (m (assoc-string name stream semantic-case-fold))) (if m m (let ((toklst stream) ------------------------------------------------------------ revno: 114367 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:57:25 -0700 message: * semantic/complete.el (tooltip-mode, tooltip-frame-parameters, tooltip-show): Declare. diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-09-17 15:50:33 +0000 +++ lisp/cedet/ChangeLog 2013-09-18 04:57:25 +0000 @@ -1,3 +1,8 @@ +2013-09-18 Glenn Morris + + * semantic/complete.el (tooltip-mode, tooltip-frame-parameters) + (tooltip-show): Declare. + 2013-09-17 Stefan Monnier * semantic/symref/list.el (semantic-symref-results-mode): === modified file 'lisp/cedet/semantic/complete.el' --- lisp/cedet/semantic/complete.el 2013-06-02 13:33:09 +0000 +++ lisp/cedet/semantic/complete.el 2013-09-18 04:57:25 +0000 @@ -1634,6 +1634,8 @@ (error nil)) ) +(defvar tooltip-mode) + (defmethod semantic-displayor-show-request ((obj semantic-displayor-tooltip)) "A request to show the current tags table." (if (or (not (featurep 'tooltip)) (not tooltip-mode)) @@ -1726,6 +1728,9 @@ (+ (cdr point-pix-pos) (cadr edges) top)))) +(defvar tooltip-frame-parameters) +(declare-function tooltip-show "tooltip" (text &optional use-echo-area)) + (defun semantic-displayor-tooltip-show (text) "Display a tooltip with TEXT near cursor." (let ((point-pix-pos (semantic-displayor-point-position)) ------------------------------------------------------------ revno: 114366 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:54:21 -0700 message: * gnus-util.el (image-size): Declare. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-17 23:49:48 +0000 +++ lisp/gnus/ChangeLog 2013-09-18 04:54:21 +0000 @@ -1,3 +1,7 @@ +2013-09-18 Glenn Morris + + * gnus-util.el (image-size): Declare. + 2013-09-17 Katsumi Yamaoka * gnus-icalendar.el (gnus-icalendar-event--find-attendee) === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2013-09-17 07:39:54 +0000 +++ lisp/gnus/gnus-util.el 2013-09-18 04:54:21 +0000 @@ -1891,6 +1891,8 @@ (get-char-table ,character ,display-table))) `(aref ,display-table ,character))) +(declare-function image-size "image.c" (spec &optional pixels frame)) + (defun gnus-rescale-image (image size) "Rescale IMAGE to SIZE if possible. SIZE is in format (WIDTH . HEIGHT). Return a new image. ------------------------------------------------------------ revno: 114365 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:53:05 -0700 message: * net/shr.el (image-size, image-animate): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:50:54 +0000 +++ lisp/ChangeLog 2013-09-18 04:53:05 +0000 @@ -33,6 +33,8 @@ * net/gnutls.el (gnutls-log-level): Declare. + * net/shr.el (image-size, image-animate): Declare. + * simple.el (font-info): Declare. * subr.el (x-popup-dialog): Declare. === modified file 'lisp/net/shr.el' --- lisp/net/shr.el 2013-08-16 15:17:21 +0000 +++ lisp/net/shr.el 2013-09-18 04:53:05 +0000 @@ -732,6 +732,10 @@ (setq payload (base64-decode-string payload))) payload))) +;; Behind display-graphic-p test. +(declare-function image-size "image.c" (spec &optional pixels frame)) +(declare-function image-animate "image" (image &optional index limit)) + (defun shr-put-image (spec alt &optional flags) "Insert image SPEC with a string ALT. Return image. SPEC is either an image data blob, or a list where the first ------------------------------------------------------------ revno: 114364 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:50:54 -0700 message: * net/gnutls.el (gnutls-log-level): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:48:55 +0000 +++ lisp/ChangeLog 2013-09-18 04:50:54 +0000 @@ -31,6 +31,8 @@ * frame.el (x-display-grayscale-p, x-display-name): Declare. + * net/gnutls.el (gnutls-log-level): Declare. + * simple.el (font-info): Declare. * subr.el (x-popup-dialog): Declare. === modified file 'lisp/net/gnutls.el' --- lisp/net/gnutls.el 2013-08-09 21:22:44 +0000 +++ lisp/net/gnutls.el 2013-09-18 04:50:54 +0000 @@ -115,6 +115,7 @@ (declare-function gnutls-boot "gnutls.c" (proc type proplist)) (declare-function gnutls-errorp "gnutls.c" (error)) +(defvar gnutls-log-level) ; gnutls.c (cl-defun gnutls-negotiate (&rest spec ------------------------------------------------------------ revno: 114363 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:48:55 -0700 message: * net/eww.el (libxml-parse-html-region): Declare. (eww-display-html): Explicit error if no libxml2 support. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:46:44 +0000 +++ lisp/ChangeLog 2013-09-18 04:48:55 +0000 @@ -1,5 +1,8 @@ 2013-09-18 Glenn Morris + * net/eww.el (libxml-parse-html-region): Declare. + (eww-display-html): Explicit error if no libxml2 support. + * doc-view.el (doc-view-mode): Silence --without-x compilation. * image.el (image-type-from-buffer, image-multi-frame-p): === modified file 'lisp/net/eww.el' --- lisp/net/eww.el 2013-09-05 03:30:07 +0000 +++ lisp/net/eww.el 2013-09-18 04:48:55 +0000 @@ -197,7 +197,12 @@ "[\t\n\r ]*<\\?xml[\t\n\r ]+[^>]*encoding=\"\\([^\"]+\\)") (match-string 1))))) +(declare-function libxml-parse-html-region "xml.c" + (start end &optional base-url)) + (defun eww-display-html (charset url) + (or (fboundp 'libxml-parse-html-region) + (error "This function requires Emacs to be compiled with libxml2")) (unless (eq charset 'utf8) (condition-case nil (decode-coding-region (point) (point-max) charset) ------------------------------------------------------------ revno: 114362 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:46:44 -0700 message: * term.el (term-mouse-paste): Reorder to silence --without-x compilation. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:44:20 +0000 +++ lisp/ChangeLog 2013-09-18 04:46:44 +0000 @@ -6,6 +6,7 @@ Remove --without-x warning/error. * mouse.el (mouse-yank-primary): + * term.el (term-mouse-paste): Reorder to silence --without-x compilation. * mpc.el (doc-view-mode): Silence --without-x compilation. === modified file 'lisp/term.el' --- lisp/term.el 2013-09-13 13:22:47 +0000 +++ lisp/term.el 2013-09-18 04:46:44 +0000 @@ -1252,15 +1252,14 @@ (setq this-command 'yank) (mouse-set-point click) (term-send-raw-string - (or (cond ; From `mouse-yank-primary': - ((eq system-type 'windows-nt) - (or (x-get-selection 'PRIMARY) - (x-get-selection-value))) - ((fboundp 'x-get-selection-value) - (or (x-get-selection-value) - (x-get-selection 'PRIMARY))) - (t - (x-get-selection 'PRIMARY))) + ;; From `mouse-yank-primary': + (or (if (fboundp 'x-get-selection-value) + (if (eq system-type 'windows-nt) + (or (x-get-selection 'PRIMARY) + (x-get-selection-value)) + (or (x-get-selection-value) + (x-get-selection 'PRIMARY))) + (x-get-selection 'PRIMARY)) (error "No selection is available"))))) (defun term-paste () ------------------------------------------------------------ revno: 114361 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:44:20 -0700 message: * mpc.el (doc-view-mode): Silence --without-x compilation. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:42:30 +0000 +++ lisp/ChangeLog 2013-09-18 04:44:20 +0000 @@ -8,6 +8,8 @@ * mouse.el (mouse-yank-primary): Reorder to silence --without-x compilation. + * mpc.el (doc-view-mode): Silence --without-x compilation. + * mail/rmailmm.el (rmail-mime-set-bulk-data): Silence --without-x compilation. === modified file 'lisp/mpc.el' --- lisp/mpc.el 2013-09-12 05:32:57 +0000 +++ lisp/mpc.el 2013-09-18 04:44:20 +0000 @@ -1139,7 +1139,8 @@ "Major mode for the features common to all buffers of MPC." (buffer-disable-undo) (setq buffer-read-only t) - (setq-local tool-bar-map mpc-tool-bar-map) + (if (boundp 'tool-bar-map) ; not if --without-x + (setq-local tool-bar-map mpc-tool-bar-map)) (setq-local truncate-lines t)) ;;; The mpc-status-mode buffer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ------------------------------------------------------------ revno: 114360 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:42:30 -0700 message: * follow.el (scroll-bar-toolkit-scroll, scroll-bar-drag) (scroll-bar-scroll-up, scroll-bar-scroll-down, mwheel-scroll): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:38:49 +0000 +++ lisp/ChangeLog 2013-09-18 04:42:30 +0000 @@ -19,6 +19,10 @@ * faces.el (x-display-list, x-open-connection, x-get-resource): Declare. + * follow.el (scroll-bar-toolkit-scroll, scroll-bar-drag) + (scroll-bar-scroll-up, scroll-bar-scroll-down, mwheel-scroll): + Declare. + * frame.el (x-display-grayscale-p, x-display-name): Declare. * simple.el (font-info): Declare. === modified file 'lisp/follow.el' --- lisp/follow.el 2013-08-16 00:20:56 +0000 +++ lisp/follow.el 2013-09-18 04:42:30 +0000 @@ -1,6 +1,6 @@ ;;; follow.el --- synchronize windows showing the same buffer -;; Copyright (C) 1995-1997, 1999, 2001-2013 Free Software Foundation, -;; Inc. + +;; Copyright (C) 1995-1997, 1999, 2001-2013 Free Software Foundation, Inc. ;; Author: Anders Lindgren ;; Maintainer: FSF (Anders' email bounces, Sep 2005) @@ -1299,6 +1299,12 @@ ;; This handles the case where the user drags the scroll bar of a ;; non-selected window whose buffer is in Follow mode. +(declare-function scroll-bar-toolkit-scroll "scroll-bar" (event)) +(declare-function scroll-bar-drag "scroll-bar" (event)) +(declare-function scroll-bar-scroll-up "scroll-bar" (event)) +(declare-function scroll-bar-scroll-down "scroll-bar" (event)) +(declare-function mwheel-scroll "mwheel" (event)) + (defun follow-scroll-bar-toolkit-scroll (event) (interactive "e") (scroll-bar-toolkit-scroll event) ------------------------------------------------------------ revno: 114359 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:38:49 -0700 message: * doc-view.el (doc-view-mode): Silence --without-x compilation. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:36:34 +0000 +++ lisp/ChangeLog 2013-09-18 04:38:49 +0000 @@ -1,5 +1,7 @@ 2013-09-18 Glenn Morris + * doc-view.el (doc-view-mode): Silence --without-x compilation. + * image.el (image-type-from-buffer, image-multi-frame-p): Remove --without-x warning/error. === modified file 'lisp/doc-view.el' --- lisp/doc-view.el 2013-08-05 14:26:57 +0000 +++ lisp/doc-view.el 2013-09-18 04:38:49 +0000 @@ -1733,9 +1733,12 @@ "/" (:eval (number-to-string (doc-view-last-page-number))))) ;; Don't scroll unless the user specifically asked for it. (setq-local auto-hscroll-mode nil) - (setq-local mwheel-scroll-up-function #'doc-view-scroll-up-or-next-page) - (setq-local mwheel-scroll-down-function - #'doc-view-scroll-down-or-previous-page) + (if (boundp 'mwheel-scroll-up-function) ; not --without-x build + (setq-local mwheel-scroll-up-function + #'doc-view-scroll-up-or-next-page)) + (if (boundp 'mwheel-scroll-down-function) + (setq-local mwheel-scroll-down-function + #'doc-view-scroll-down-or-previous-page)) (setq-local cursor-type nil) (use-local-map doc-view-mode-map) (add-hook 'after-revert-hook 'doc-view-reconvert-doc nil t) ------------------------------------------------------------ revno: 114358 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:36:34 -0700 message: * term/ns-win.el (x-handle-args): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:34:56 +0000 +++ lisp/ChangeLog 2013-09-18 04:36:34 +0000 @@ -27,6 +27,8 @@ (x-last-selected-text-primary, x-last-selected-text-clipboard): Declare. + * term/ns-win.el (x-handle-args): Declare. + * term/x-win.el (x-select-enable-clipboard): Declare. * term/w32-win.el (create-default-fontset): Declare. === modified file 'lisp/term/ns-win.el' --- lisp/term/ns-win.el 2013-09-12 20:21:41 +0000 +++ lisp/term/ns-win.el 2013-09-18 04:36:34 +0000 @@ -872,6 +872,7 @@ (defvar ns-initialized nil "Non-nil if Nextstep windowing has been initialized.") +(declare-function x-handle-args "common-win" (args)) (declare-function ns-list-services "nsfns.m" ()) (declare-function x-open-connection "nsfns.m" (display &optional xrm-string must-succeed)) ------------------------------------------------------------ revno: 114357 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:34:56 -0700 message: * w32-common-fns.el (x-server-version, x-select-enable-clipboard): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:32:01 +0000 +++ lisp/ChangeLog 2013-09-18 04:34:56 +0000 @@ -31,6 +31,9 @@ * term/w32-win.el (create-default-fontset): Declare. + * w32-common-fns.el (x-server-version, x-select-enable-clipboard): + Declare. + * window.el (x-display-pixel-height, tool-bar-lines-needed): Declare. (fit-frame-to-buffer): Explicit error if --without-x. (mouse-autoselect-window-select): Silence compiler. === modified file 'lisp/w32-common-fns.el' --- lisp/w32-common-fns.el 2013-09-12 05:32:57 +0000 +++ lisp/w32-common-fns.el 2013-09-18 04:34:56 +0000 @@ -23,6 +23,8 @@ ;;; and Cygwin Emacs compiled to use the native Windows widget ;;; library. +(declare-function x-server-version "w32fns.c" (&optional terminal)) + (defun w32-version () "Return the MS-Windows version numbers. The value is a list of three integers: the major and minor version @@ -100,6 +102,7 @@ ;; current selection against it, and avoid passing back our own text ;; from x-selection-value. (defvar x-last-selected-text nil) +(defvar x-select-enable-clipboard) (defun x-get-selection-value () "Return the value of the current selection. ------------------------------------------------------------ revno: 114356 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:32:01 -0700 message: * term/w32-win.el (create-default-fontset): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:30:33 +0000 +++ lisp/ChangeLog 2013-09-18 04:32:01 +0000 @@ -29,6 +29,8 @@ * term/x-win.el (x-select-enable-clipboard): Declare. + * term/w32-win.el (create-default-fontset): Declare. + * window.el (x-display-pixel-height, tool-bar-lines-needed): Declare. (fit-frame-to-buffer): Explicit error if --without-x. (mouse-autoselect-window-select): Silence compiler. === modified file 'lisp/term/w32-win.el' --- lisp/term/w32-win.el 2013-08-12 13:15:01 +0000 +++ lisp/term/w32-win.el 2013-09-18 04:32:01 +0000 @@ -238,6 +238,7 @@ (declare-function x-open-connection "w32fns.c" (display &optional xrm-string must-succeed)) +(declare-function create-default-fontset "fontset" ()) (declare-function create-fontset-from-fontset-spec "fontset" (fontset-spec &optional style-variant noerror)) (declare-function create-fontset-from-x-resource "fontset" ()) ------------------------------------------------------------ revno: 114355 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:30:33 -0700 message: * term/x-win.el (x-select-enable-clipboard): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:28:57 +0000 +++ lisp/ChangeLog 2013-09-18 04:30:33 +0000 @@ -27,6 +27,8 @@ (x-last-selected-text-primary, x-last-selected-text-clipboard): Declare. + * term/x-win.el (x-select-enable-clipboard): Declare. + * window.el (x-display-pixel-height, tool-bar-lines-needed): Declare. (fit-frame-to-buffer): Explicit error if --without-x. (mouse-autoselect-window-select): Silence compiler. === modified file 'lisp/term/x-win.el' --- lisp/term/x-win.el 2013-08-08 23:59:14 +0000 +++ lisp/term/x-win.el 2013-09-18 04:30:33 +0000 @@ -1217,6 +1217,8 @@ (remove-text-properties 0 (length text) '(foreign-selection nil) text)) text)) +(defvar x-select-enable-clipboard) ; common-win + ;; Return the value of the current X selection. ;; Consult the selection. Treat empty strings as if they were unset. ;; If this function is called twice and finds the same text, ------------------------------------------------------------ revno: 114354 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:28:57 -0700 message: * term/common-win.el (x-select-enable-primary, x-last-selected-text-primary) (x-last-selected-text-clipboard): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:26:19 +0000 +++ lisp/ChangeLog 2013-09-18 04:28:57 +0000 @@ -23,6 +23,10 @@ * subr.el (x-popup-dialog): Declare. + * term/common-win.el (x-select-enable-primary) + (x-last-selected-text-primary, x-last-selected-text-clipboard): + Declare. + * window.el (x-display-pixel-height, tool-bar-lines-needed): Declare. (fit-frame-to-buffer): Explicit error if --without-x. (mouse-autoselect-window-select): Silence compiler. === modified file 'lisp/term/common-win.el' --- lisp/term/common-win.el 2013-08-08 23:59:14 +0000 +++ lisp/term/common-win.el 2013-09-18 04:28:57 +0000 @@ -44,6 +44,10 @@ (defvar ns-last-selected-text) ; ns-win.el (declare-function ns-set-pasteboard "ns-win" (string)) +(defvar x-select-enable-primary) ; x-win.el +(defvar x-last-selected-text-primary) +(defvar x-last-selected-text-clipboard) + (defun x-select-text (text) "Select TEXT, a string, according to the window system. ------------------------------------------------------------ revno: 114353 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:26:19 -0700 message: * image.el (image-multi-frame-p): Remove --without-x warning/error. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:24:14 +0000 +++ lisp/ChangeLog 2013-09-18 04:26:19 +0000 @@ -1,6 +1,7 @@ 2013-09-18 Glenn Morris - * image.el (image-type-from-buffer): Remove --without-x warning/error. + * image.el (image-type-from-buffer, image-multi-frame-p): + Remove --without-x warning/error. * mouse.el (mouse-yank-primary): Reorder to silence --without-x compilation. === modified file 'lisp/image.el' --- lisp/image.el 2013-09-18 04:24:14 +0000 +++ lisp/image.el 2013-09-18 04:26:19 +0000 @@ -625,13 +625,14 @@ the number of frames (or sub-images) in the image and DELAY is the delay in seconds that the image specifies between each frame. DELAY may be nil, in which case you might want to use `image-default-frame-delay'." - (let* ((metadata (image-metadata image)) - (images (plist-get metadata 'count)) - (delay (plist-get metadata 'delay))) - (when (and images (> images 1)) - (if (or (not (numberp delay)) (< delay 0)) - (setq delay image-default-frame-delay)) - (cons images delay)))) + (when (fboundp 'image-metadata) + (let* ((metadata (image-metadata image)) + (images (plist-get metadata 'count)) + (delay (plist-get metadata 'delay))) + (when (and images (> images 1)) + (if (or (not (numberp delay)) (< delay 0)) + (setq delay image-default-frame-delay)) + (cons images delay))))) (defun image-animated-p (image) "Like `image-multi-frame-p', but returns nil if no delay is specified." ------------------------------------------------------------ revno: 114352 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:24:14 -0700 message: * image.el (image-type-from-buffer): Remove --without-x warning/error. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 04:21:29 +0000 +++ lisp/ChangeLog 2013-09-18 04:24:14 +0000 @@ -1,5 +1,7 @@ 2013-09-18 Glenn Morris + * image.el (image-type-from-buffer): Remove --without-x warning/error. + * mouse.el (mouse-yank-primary): Reorder to silence --without-x compilation. === modified file 'lisp/image.el' --- lisp/image.el 2013-08-16 06:33:08 +0000 +++ lisp/image.el 2013-09-18 04:24:14 +0000 @@ -291,6 +291,7 @@ (setq types (cdr types))))) (goto-char opoint) (and type + (boundp 'image-types) (memq type image-types) type))) ------------------------------------------------------------ revno: 114351 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:21:29 -0700 message: * mouse.el (mouse-yank-primary): Reorder to silence --without-x compilation. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 03:58:26 +0000 +++ lisp/ChangeLog 2013-09-18 04:21:29 +0000 @@ -1,5 +1,8 @@ 2013-09-18 Glenn Morris + * mouse.el (mouse-yank-primary): + Reorder to silence --without-x compilation. + * mail/rmailmm.el (rmail-mime-set-bulk-data): Silence --without-x compilation. === modified file 'lisp/mouse.el' --- lisp/mouse.el 2013-03-20 18:13:00 +0000 +++ lisp/mouse.el 2013-09-18 04:21:29 +0000 @@ -1147,22 +1147,21 @@ (deactivate-mark))) (or mouse-yank-at-point (mouse-set-point click)) (let ((primary - (cond - ((eq (framep (selected-frame)) 'w32) - ;; MS-Windows emulates PRIMARY in x-get-selection, but not - ;; in x-get-selection-value (the latter only accesses the - ;; clipboard). So try PRIMARY first, in case they selected - ;; something with the mouse in the current Emacs session. - (or (x-get-selection 'PRIMARY) - (x-get-selection-value))) - ((fboundp 'x-get-selection-value) ; MS-DOS and X. - ;; On X, x-get-selection-value supports more formats and - ;; encodings, so use it in preference to x-get-selection. - (or (x-get-selection-value) - (x-get-selection 'PRIMARY))) - ;; FIXME: What about xterm-mouse-mode etc.? - (t - (x-get-selection 'PRIMARY))))) + (if (fboundp 'x-get-selection-value) + (if (eq (framep (selected-frame)) 'w32) + ;; MS-Windows emulates PRIMARY in x-get-selection, but not + ;; in x-get-selection-value (the latter only accesses the + ;; clipboard). So try PRIMARY first, in case they selected + ;; something with the mouse in the current Emacs session. + (or (x-get-selection 'PRIMARY) + (x-get-selection-value)) + ;; Else MS-DOS or X. + ;; On X, x-get-selection-value supports more formats and + ;; encodings, so use it in preference to x-get-selection. + (or (x-get-selection-value) + (x-get-selection 'PRIMARY))) + ;; FIXME: What about xterm-mouse-mode etc.? + (x-get-selection 'PRIMARY)))) (unless primary (error "No selection is available")) (push-mark (point)) ------------------------------------------------------------ revno: 114350 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 20:58:26 -0700 message: * frame.el (x-display-name): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 03:53:10 +0000 +++ lisp/ChangeLog 2013-09-18 03:58:26 +0000 @@ -11,7 +11,7 @@ * faces.el (x-display-list, x-open-connection, x-get-resource): Declare. - * frame.el (x-display-grayscale-p): Declare. + * frame.el (x-display-grayscale-p, x-display-name): Declare. * simple.el (font-info): Declare. === modified file 'lisp/frame.el' --- lisp/frame.el 2013-09-18 02:50:04 +0000 +++ lisp/frame.el 2013-09-18 03:58:26 +0000 @@ -590,6 +590,8 @@ ;; FIXME: Shouldn't we add `font' here as well? "Parameters `make-frame' copies from the `selected-frame' to the new frame.") +(defvar x-display-name) + (defun make-frame (&optional parameters) "Return a newly created frame displaying the current buffer. Optional argument PARAMETERS is an alist of frame parameters for ------------------------------------------------------------ revno: 114349 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 20:53:10 -0700 message: * faces.el (x-display-list, x-open-connection, x-get-resource): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 03:50:18 +0000 +++ lisp/ChangeLog 2013-09-18 03:53:10 +0000 @@ -8,6 +8,9 @@ * custom.el (x-get-resource): Declare. + * faces.el (x-display-list, x-open-connection, x-get-resource): + Declare. + * frame.el (x-display-grayscale-p): Declare. * simple.el (font-info): Declare. === modified file 'lisp/faces.el' --- lisp/faces.el 2013-07-08 22:26:37 +0000 +++ lisp/faces.el 2013-09-18 03:53:10 +0000 @@ -1921,6 +1921,11 @@ ;;; Frame creation. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(declare-function x-display-list "xfns.c" ()) +(declare-function x-open-connection "xfns.c" + (display &optional xrm-string must-succeed)) +(declare-function x-get-resource "frame.c" + (attribute class &optional component subclass)) (declare-function x-parse-geometry "frame.c" (string)) (defvar x-display-name) ------------------------------------------------------------ revno: 114348 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 20:50:18 -0700 message: * lisp/subr.el (x-popup-dialog): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 03:47:11 +0000 +++ lisp/ChangeLog 2013-09-18 03:50:18 +0000 @@ -12,6 +12,8 @@ * simple.el (font-info): Declare. + * subr.el (x-popup-dialog): Declare. + * window.el (x-display-pixel-height, tool-bar-lines-needed): Declare. (fit-frame-to-buffer): Explicit error if --without-x. (mouse-autoselect-window-select): Silence compiler. === modified file 'lisp/subr.el' --- lisp/subr.el 2013-09-18 01:27:00 +0000 +++ lisp/subr.el 2013-09-18 03:50:18 +0000 @@ -2239,6 +2239,9 @@ (push read unread-command-events) nil)))))) +;; Behind display-popup-menus-p test. +(declare-function x-popup-dialog "xmenu.c" (position contents &optional header)) + (defun y-or-n-p (prompt) "Ask user a \"y or n\" question. Return t if answer is \"y\". PROMPT is the string to display to ask the question. It should ------------------------------------------------------------ revno: 114347 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 20:47:11 -0700 message: * mail/rmailmm.el (rmail-mime-set-bulk-data): Silence --without-x compilation. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 03:45:54 +0000 +++ lisp/ChangeLog 2013-09-18 03:47:11 +0000 @@ -1,5 +1,8 @@ 2013-09-18 Glenn Morris + * mail/rmailmm.el (rmail-mime-set-bulk-data): + Silence --without-x compilation. + * wdired.el (dired-backup-overwrite): Remove declaration. (wdired-mode-map): Add doc string. === modified file 'lisp/mail/rmailmm.el' --- lisp/mail/rmailmm.el 2013-01-19 20:38:13 +0000 +++ lisp/mail/rmailmm.el 2013-09-18 03:47:11 +0000 @@ -685,7 +685,8 @@ ((string-match "image/\\(.*\\)" content-type) (setq type (image-type-from-file-name (concat "." (match-string 1 content-type)))) - (if (and (memq type image-types) + (if (and (boundp 'image-types) + (memq type image-types) (image-type-available-p type)) (if (and rmail-mime-show-images (not (eq rmail-mime-show-images 'button)) ------------------------------------------------------------ revno: 114346 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 20:45:54 -0700 message: wdired.el trivia * lisp/wdired.el (dired-backup-overwrite): Remove declaration. (wdired-mode-map): Add doc string. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 02:50:04 +0000 +++ lisp/ChangeLog 2013-09-18 03:45:54 +0000 @@ -1,5 +1,8 @@ 2013-09-18 Glenn Morris + * wdired.el (dired-backup-overwrite): Remove declaration. + (wdired-mode-map): Add doc string. + * custom.el (x-get-resource): Declare. * frame.el (x-display-grayscale-p): Declare. === modified file 'lisp/wdired.el' --- lisp/wdired.el 2013-08-05 18:05:46 +0000 +++ lisp/wdired.el 2013-09-18 03:45:54 +0000 @@ -73,8 +73,6 @@ ;;; Code: -(defvar dired-backup-overwrite) ; Only in Emacs 20.x this is a custom var - (require 'dired) (autoload 'dired-do-create-files-regexp "dired-aux") @@ -185,7 +183,8 @@ (define-key map [remap capitalize-word] 'wdired-capitalize-word) (define-key map [remap downcase-word] 'wdired-downcase-word) - map)) + map) + "Keymap used in `wdired-mode'.") (defvar wdired-mode-hook nil "Hooks run when changing to WDired mode.") ------------------------------------------------------------ revno: 114345 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 19:50:04 -0700 message: Silence some --without-x compilation warnings * custom.el (x-get-resource): Declare. * frame.el (x-display-grayscale-p): Declare. * simple.el (font-info): Declare. * window.el (x-display-pixel-height, tool-bar-lines-needed): Declare. (fit-frame-to-buffer): Explicit error if --without-x. (mouse-autoselect-window-select): Silence compiler. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 02:45:31 +0000 +++ lisp/ChangeLog 2013-09-18 02:50:04 +0000 @@ -1,5 +1,15 @@ 2013-09-18 Glenn Morris + * custom.el (x-get-resource): Declare. + + * frame.el (x-display-grayscale-p): Declare. + + * simple.el (font-info): Declare. + + * window.el (x-display-pixel-height, tool-bar-lines-needed): Declare. + (fit-frame-to-buffer): Explicit error if --without-x. + (mouse-autoselect-window-select): Silence compiler. + * dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Declare. * eshell/em-cmpl.el (eshell-complete-parse-arguments): === modified file 'lisp/custom.el' --- lisp/custom.el 2013-08-02 21:16:33 +0000 +++ lisp/custom.el 2013-09-18 02:50:04 +0000 @@ -1,7 +1,6 @@ ;;; custom.el --- tools for declaring and initializing options ;; -;; Copyright (C) 1996-1997, 1999, 2001-2013 Free Software Foundation, -;; Inc. +;; Copyright (C) 1996-1997, 1999, 2001-2013 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen ;; Maintainer: FSF @@ -1416,6 +1415,10 @@ (setq custom-enabled-themes (delq theme custom-enabled-themes))))) +;; Only used if window-system not null. +(declare-function x-get-resource "frame.c" + (attribute class &optional component subclass)) + (defun custom--frame-color-default (frame attribute resource-attr resource-class tty-default x-default) (let ((col (face-attribute 'default attribute t))) === modified file 'lisp/frame.el' --- lisp/frame.el 2013-09-13 16:46:18 +0000 +++ lisp/frame.el 2013-09-18 02:50:04 +0000 @@ -889,6 +889,9 @@ (declare-function x-get-resource "frame.c" (attribute class &optional component subclass)) +;; Only used if window-system is not null. +(declare-function x-display-grayscale-p "xfns.c" (&optional terminal)) + (defvar inhibit-frame-set-background-mode nil) (defun frame-set-background-mode (frame &optional keep-face-specs) === modified file 'lisp/simple.el' --- lisp/simple.el 2013-09-17 20:27:10 +0000 +++ lisp/simple.el 2013-09-18 02:50:04 +0000 @@ -4714,6 +4714,9 @@ :group 'editing-basics :version "23.1") +;; Only used if display-graphic-p. +(declare-function font-info "font.c" (name &optional frame)) + (defun default-font-height () "Return the height in pixels of the current buffer's default face font." (let ((default-font (face-font 'default))) === modified file 'lisp/window.el' --- lisp/window.el 2013-09-15 16:08:04 +0000 +++ lisp/window.el 2013-09-18 02:50:04 +0000 @@ -1,7 +1,6 @@ ;;; window.el --- GNU Emacs window commands aside from those written in C -;; Copyright (C) 1985, 1989, 1992-1994, 2000-2013 Free Software -;; Foundation, Inc. +;; Copyright (C) 1985, 1989, 1992-1994, 2000-2013 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -6153,6 +6152,9 @@ :version "24.3" :group 'windows) +(declare-function x-display-pixel-height "xfns.c" (&optional terminal)) +(declare-function tool-bar-lines-needed "xdisp.c" (&optional frame)) + (defun fit-frame-to-buffer (&optional frame max-height min-height) "Adjust height of FRAME to display its buffer contents exactly. FRAME can be any live frame and defaults to the selected one. @@ -6163,6 +6165,8 @@ Optional argument MIN-HEIGHT specifies the minimum height of FRAME. The default corresponds to `window-min-height'." (interactive) + (or (fboundp 'x-display-pixel-height) + (user-error "Cannot resize frame in non-graphic Emacs")) (setq frame (window-normalize-frame frame)) (let* ((root (frame-root-window frame)) (frame-min-height @@ -6685,7 +6689,7 @@ (window-at (cadr mouse-position) (cddr mouse-position) (car mouse-position))))) (cond - ((or (menu-or-popup-active-p) + ((or (and (fboundp 'menu-or-popup-active-p) (menu-or-popup-active-p)) (and window (let ((coords (coordinates-in-window-p (cdr mouse-position) window))) ------------------------------------------------------------ revno: 114344 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 19:45:31 -0700 message: * eshell/esh-util.el (eshell-sublist): Remove unused local variable. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 01:48:00 +0000 +++ lisp/ChangeLog 2013-09-18 02:45:31 +0000 @@ -5,6 +5,7 @@ * eshell/em-cmpl.el (eshell-complete-parse-arguments): * eshell/em-hist.el (eshell/history, eshell-isearch-backward): * eshell/em-pred.el (eshell-parse-modifiers, eshell-pred-file-time): + * eshell/esh-util.el (eshell-sublist): Remove unused local variables. * eshell/esh-io.el (x-select-enable-clipboard): Declare. === modified file 'lisp/eshell/esh-util.el' --- lisp/eshell/esh-util.el 2013-09-16 18:23:30 +0000 +++ lisp/eshell/esh-util.el 2013-09-18 02:45:31 +0000 @@ -217,8 +217,7 @@ (defun eshell-sublist (l &optional n m) "Return from LIST the N to M elements. If N or M is nil, it means the end of the list." - (let* ((a (copy-sequence l)) - result) + (let ((a (copy-sequence l))) (if (and m (consp (nthcdr m a))) (setcdr (nthcdr m a) nil)) (if n ------------------------------------------------------------ revno: 114343 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:48:00 -0400 message: Address some "unused lexical variable" warnings * lisp/dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Declare. * lisp/eshell/esh-io.el (x-select-enable-clipboard): Declare. * lisp/erc/erc-button.el (erc-button-add-buttons): * lisp/eshell/em-cmpl.el (eshell-complete-parse-arguments): * lisp/eshell/em-hist.el (eshell/history, eshell-isearch-backward): * lisp/eshell/em-pred.el (eshell-parse-modifiers, eshell-pred-file-time): Remove unused local variables. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 01:42:43 +0000 +++ lisp/ChangeLog 2013-09-18 01:48:00 +0000 @@ -1,5 +1,14 @@ 2013-09-18 Glenn Morris + * dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Declare. + + * eshell/em-cmpl.el (eshell-complete-parse-arguments): + * eshell/em-hist.el (eshell/history, eshell-isearch-backward): + * eshell/em-pred.el (eshell-parse-modifiers, eshell-pred-file-time): + Remove unused local variables. + + * eshell/esh-io.el (x-select-enable-clipboard): Declare. + * textmodes/two-column.el: Make 2C-split work for --without-x. (scroll-bar-columns): Autoload. (top-level): Require fringe when compiling. === modified file 'lisp/dframe.el' --- lisp/dframe.el 2013-09-12 05:32:57 +0000 +++ lisp/dframe.el 2013-09-18 01:48:00 +0000 @@ -243,6 +243,9 @@ "Return non-nil if FRAME is currently available." (and frame (frame-live-p frame) (frame-visible-p frame))) +(defvar x-sensitive-text-pointer-shape) +(defvar x-pointer-shape) + (defun dframe-frame-mode (arg frame-var cache-var buffer-var frame-name local-mode-fn &optional === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2013-09-14 23:33:19 +0000 +++ lisp/erc/ChangeLog 2013-09-18 01:48:00 +0000 @@ -1,3 +1,7 @@ +2013-09-18 Glenn Morris + + * erc-button.el (erc-button-add-buttons): Remove unused local vars. + 2013-09-14 Vivek Dasmohapatra * erc.el (erc-update-mode-line-buffer): === modified file 'lisp/erc/erc-button.el' --- lisp/erc/erc-button.el 2013-08-22 04:06:45 +0000 +++ lisp/erc/erc-button.el 2013-09-18 01:48:00 +0000 @@ -267,7 +267,7 @@ (inhibit-point-motion-hooks t) (inhibit-field-text-motion t) (alist erc-button-alist) - entry regexp data) + regexp) (erc-button-remove-old-buttons) (dolist (entry alist) (if (equal (car entry) (quote (quote nicknames))) === modified file 'lisp/eshell/em-cmpl.el' --- lisp/eshell/em-cmpl.el 2013-09-12 20:38:35 +0000 +++ lisp/eshell/em-cmpl.el 2013-09-18 01:48:00 +0000 @@ -370,7 +370,7 @@ (cl-assert (= (length args) (length posns))) (let ((a args) (i 0) - l final) + l) (while a (if (and (consp (car a)) (eq (caar a) 'eshell-operator)) === modified file 'lisp/eshell/em-hist.el' --- lisp/eshell/em-hist.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/em-hist.el 2013-09-18 01:48:00 +0000 @@ -330,7 +330,7 @@ (and (or (not (ring-p eshell-history-ring)) (ring-empty-p eshell-history-ring)) (error "No history")) - (let (length command file) + (let (length file) (when (and args (string-match "^[0-9]+$" (car args))) (setq length (min (eshell-convert (car args)) (ring-length eshell-history-ring)) @@ -346,8 +346,7 @@ (write-history (eshell-write-history file)) (append-history (eshell-write-history file t)) (t - (let* ((history nil) - (index (1- (or length (ring-length eshell-history-ring)))) + (let* ((index (1- (or length (ring-length eshell-history-ring)))) (ref (- (ring-length eshell-history-ring) index))) ;; We have to build up a list ourselves from the ring vector. (while (>= index 0) @@ -945,7 +944,7 @@ (defun eshell-isearch-backward (&optional invert) "Do incremental regexp search backward through past commands." (interactive) - (let ((inhibit-read-only t) end) + (let ((inhibit-read-only t)) (eshell-prepare-for-search) (goto-char (point-max)) (set-marker eshell-last-output-end (point)) === modified file 'lisp/eshell/em-pred.el' --- lisp/eshell/em-pred.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/em-pred.el 2013-09-18 01:48:00 +0000 @@ -306,7 +306,7 @@ functions. PRED-FUNCS take a filename and return t if the test succeeds; MOD-FUNCS take any string and preform a modification, returning the resultant string." - (let (result negate follow preds mods) + (let (negate follow preds mods) (condition-case nil (while (not (eobp)) (let ((char (char-after))) @@ -399,7 +399,7 @@ (defun eshell-pred-file-time (mod-char mod-type attr-index) "Return a predicate to test whether a file matches a certain time." (let* ((quantum 86400) - qual amount when open close end) + qual when open close end) (when (memq (char-after) '(?M ?w ?h ?m ?s)) (setq quantum (char-after)) (cond === modified file 'lisp/eshell/esh-io.el' --- lisp/eshell/esh-io.el 2013-09-17 15:19:12 +0000 +++ lisp/eshell/esh-io.el 2013-09-18 01:48:00 +0000 @@ -118,6 +118,8 @@ :type 'integer :group 'eshell-io) +(defvar x-select-enable-clipboard) ; term/common-win + (defcustom eshell-virtual-targets '(("/dev/eshell" eshell-interactive-print nil) ("/dev/kill" (lambda (mode) ------------------------------------------------------------ revno: 114342 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:44:44 -0400 message: * lisp/url/url-http.el (zlib-decompress-region): Declare. diff: === modified file 'lisp/url/ChangeLog' --- lisp/url/ChangeLog 2013-09-16 21:28:11 +0000 +++ lisp/url/ChangeLog 2013-09-18 01:44:44 +0000 @@ -1,3 +1,7 @@ +2013-09-18 Glenn Morris + + * url-http.el (zlib-decompress-region): Declare. + 2013-09-16 Glenn Morris * url-misc.el (url-data): Avoid match-data mix-up with base64 case. === modified file 'lisp/url/url-http.el' --- lisp/url/url-http.el 2013-09-13 07:01:55 +0000 +++ lisp/url/url-http.el 2013-09-18 01:44:44 +0000 @@ -858,6 +858,8 @@ (goto-char (point-min)) success)) +(declare-function zlib-decompress-region "decompress.c" (start) (end)) + (defun url-handle-content-transfer-encoding () (let ((encoding (mail-fetch-field "content-encoding"))) (when (and encoding ------------------------------------------------------------ revno: 114341 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 21:42:43 -0400 message: * lisp/textmodes/two-column.el: Make 2C-split work for --without-x. (scroll-bar-columns): Autoload. (top-level): Require fringe when compiling. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-18 01:27:00 +0000 +++ lisp/ChangeLog 2013-09-18 01:42:43 +0000 @@ -1,3 +1,9 @@ +2013-09-18 Glenn Morris + + * textmodes/two-column.el: Make 2C-split work for --without-x. + (scroll-bar-columns): Autoload. + (top-level): Require fringe when compiling. + 2013-09-18 Leo Liu * subr.el (add-hook): Robustify to handle closure as well. === modified file 'lisp/textmodes/two-column.el' --- lisp/textmodes/two-column.el 2013-02-12 17:36:54 +0000 +++ lisp/textmodes/two-column.el 2013-09-18 01:42:43 +0000 @@ -349,6 +349,9 @@ (if b1 (setq 2C-window-width (- (frame-width) b1))) (2C-two-columns b2))) +(autoload 'scroll-bar-columns "scroll-bar") +(eval-when-compile + (require 'fringe)) ; fringe-columns defsubst ;;;###autoload (defun 2C-split (arg) ------------------------------------------------------------ revno: 114340 committer: Leo Liu branch nick: trunk timestamp: Wed 2013-09-18 09:27:00 +0800 message: * subr.el (add-hook): Robustify to handle closure as well. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-17 20:27:10 +0000 +++ lisp/ChangeLog 2013-09-18 01:27:00 +0000 @@ -1,3 +1,7 @@ +2013-09-18 Leo Liu + + * subr.el (add-hook): Robustify to handle closure as well. + 2013-09-17 Glenn Morris * simple.el (messages-buffer-mode-map): Unbind "g". === modified file 'lisp/subr.el' --- lisp/subr.el 2013-09-17 07:26:07 +0000 +++ lisp/subr.el 2013-09-18 01:27:00 +0000 @@ -1366,7 +1366,7 @@ (setq local t))) (let ((hook-value (if local (symbol-value hook) (default-value hook)))) ;; If the hook value is a single function, turn it into a list. - (when (or (not (listp hook-value)) (eq (car hook-value) 'lambda)) + (when (or (not (listp hook-value)) (functionp hook-value)) (setq hook-value (list hook-value))) ;; Do the actual addition if necessary (unless (member function hook-value) ------------------------------------------------------------ revno: 114339 committer: Katsumi Yamaoka branch nick: trunk timestamp: Wed 2013-09-18 00:25:23 +0000 message: lisp/gnus/mm-decode.el (mm-add-meta-html-tag): Fix last change diff: === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2013-09-17 10:21:24 +0000 +++ lisp/gnus/mm-decode.el 2013-09-18 00:25:23 +0000 @@ -1415,7 +1415,7 @@ (goto-char (point-min)) (if (re-search-forward "\ ]+\\)\\)?" nil t) +text/\\(\\sw+\\)\\(?:\;\\s-*charset=\\([^\"'>]+\\)\\)?[^>]*>" nil t) (if (and (not force-charset) (match-beginning 2) (string-match "\\`html\\'" (match-string 1))) ------------------------------------------------------------ revno: 114338 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2013-09-17 23:49:48 +0000 message: [Gnus] Silence the byte compiler * gnus-icalendar.el (gnus-icalendar-event--find-attendee) (gnus-icalendar-event-from-ical) (gnus-icalendar-event--build-reply-event-body) (gnus-icalendar-event-reply-from-buffer) (gnus-icalendar-find-org-event-file) (gnus-icalendar-event->gnus-calendar, gnus-icalendar-reply) (gnus-icalendar-mm-inline): Use gmm-labels instead of labels or flet. * mm-util.el (mm-special-display-p): Isolate XEmacs stuff. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-17 17:22:32 +0000 +++ lisp/gnus/ChangeLog 2013-09-17 23:49:48 +0000 @@ -1,3 +1,15 @@ +2013-09-17 Katsumi Yamaoka + + * gnus-icalendar.el (gnus-icalendar-event--find-attendee) + (gnus-icalendar-event-from-ical) + (gnus-icalendar-event--build-reply-event-body) + (gnus-icalendar-event-reply-from-buffer) + (gnus-icalendar-find-org-event-file) + (gnus-icalendar-event->gnus-calendar, gnus-icalendar-reply) + (gnus-icalendar-mm-inline): Use gmm-labels instead of labels or flet. + + * mm-util.el (mm-special-display-p): Isolate XEmacs stuff. + 2013-09-17 Stefan Monnier * gnus-salt.el (gnus-tree-mode): Use define-derived-mode. === modified file 'lisp/gnus/gnus-icalendar.el' --- lisp/gnus/gnus-icalendar.el 2013-09-12 06:47:07 +0000 +++ lisp/gnus/gnus-icalendar.el 2013-09-17 23:49:48 +0000 @@ -35,6 +35,7 @@ (require 'icalendar) (require 'eieio) +(require 'gmm-utils) (require 'mm-decode) (require 'gnus-sum) @@ -149,7 +150,7 @@ (defun gnus-icalendar-event--find-attendee (ical name-or-email) (let* ((event (car (icalendar--all-events ical))) (event-props (caddr event))) - (labels ((attendee-name (att) (plist-get (cadr att) 'CN)) + (gmm-labels ((attendee-name (att) (plist-get (cadr att) 'CN)) (attendee-email (att) (replace-regexp-in-string "^.*MAILTO:" "" (caddr att))) (attendee-prop-matches-p (prop) @@ -189,7 +190,7 @@ ((string= method "REPLY") 'gnus-icalendar-event-reply) (t 'gnus-icalendar-event)))) - (labels ((map-property (prop) + (gmm-labels ((map-property (prop) (let ((value (icalendar--get-event-property event prop))) (when value ;; ugly, but cannot get @@ -233,7 +234,7 @@ (let ((summary-status (capitalize (symbol-name status))) (attendee-status (upcase (symbol-name status))) reply-event-lines) - (labels ((update-summary (line) + (gmm-labels ((update-summary (line) (if (string-match "^[^:]+:" line) (replace-match (format "\\&%s: " summary-status) t nil line) line)) @@ -280,7 +281,7 @@ The reply will have STATUS (`accepted', `tentative' or `declined'). The reply will be composed for attendees matching any entry on the IDENTITIES list." - (flet ((extract-block (blockname) + (gmm-labels ((extract-block (blockname) (save-excursion (let ((block-start-re (format "^BEGIN:%s" blockname)) (block-end-re (format "^END:%s" blockname)) @@ -419,7 +420,7 @@ is searched." (let ((uid (gnus-icalendar-event:uid event)) (files (or org-file (org-agenda-files t 'ifmode)))) - (flet + (gmm-labels ((find-event-in (file) (org-check-agenda-file file) (with-current-buffer (find-file-noselect file) @@ -596,7 +597,7 @@ ;; TODO: make the template customizable (defmethod gnus-icalendar-event->gnus-calendar ((event gnus-icalendar-event) &optional reply-status) "Format an overview of EVENT details." - (flet ((format-header (x) + (gmm-labels ((format-header (x) (format "%-12s%s" (propertize (concat (car x) ":") 'face 'bold) (cadr x)))) @@ -673,7 +674,7 @@ (current-buffer) status gnus-icalendar-identities)))) (when reply - (flet ((fold-icalendar-buffer () + (gmm-labels ((fold-icalendar-buffer () (goto-char (point-min)) (while (re-search-forward "^\\(.\\{72\\}\\)\\(.+\\)$" nil t) (replace-match "\\1\n \\2") @@ -735,7 +736,7 @@ (setq gnus-icalendar-reply-status nil) (when event - (flet ((insert-button-group (buttons) + (gmm-labels ((insert-button-group (buttons) (when buttons (mapc (lambda (x) (apply 'gnus-icalendar-insert-button x) === modified file 'lisp/gnus/mm-util.el' --- lisp/gnus/mm-util.el 2013-08-19 05:10:33 +0000 +++ lisp/gnus/mm-util.el 2013-09-17 23:49:48 +0000 @@ -129,22 +129,6 @@ (multibyte-char-to-unibyte . identity) ;; `set-buffer-multibyte' is an Emacs function, not available in XEmacs. (set-buffer-multibyte . ignore) - ;; `special-display-p' is an Emacs function, not available in XEmacs. - (special-display-p - . ,(lambda (buffer-name) - "Returns non-nil if a buffer named BUFFER-NAME gets a special frame." - (and special-display-function - (or (and (member buffer-name special-display-buffer-names) t) - (cdr (assoc buffer-name special-display-buffer-names)) - (catch 'return - (dolist (elem special-display-regexps) - (and (stringp elem) - (string-match elem buffer-name) - (throw 'return t)) - (and (consp elem) - (stringp (car elem)) - (string-match (car elem) buffer-name) - (throw 'return (cdr elem))))))))) ;; `substring-no-properties' is available only in Emacs 22.1 or greater. (substring-no-properties . ,(lambda (string &optional from to) @@ -174,6 +158,25 @@ (forward-line 0) (1+ (count-lines start (point)))))))))) +;; `special-display-p' is an Emacs function, not available in XEmacs. +(defalias 'mm-special-display-p + (if (featurep 'emacs) + 'special-display-p + (lambda (buffer-name) + "Returns non-nil if a buffer named BUFFER-NAME gets a special frame." + (and special-display-function + (or (and (member buffer-name special-display-buffer-names) t) + (cdr (assoc buffer-name special-display-buffer-names)) + (catch 'return + (dolist (elem special-display-regexps) + (and (stringp elem) + (string-match elem buffer-name) + (throw 'return t)) + (and (consp elem) + (stringp (car elem)) + (string-match (car elem) buffer-name) + (throw 'return (cdr elem)))))))))) + ;; `decode-coding-string', `encode-coding-string', `decode-coding-region' ;; and `encode-coding-region' are available in Emacs and XEmacs built with ;; the `file-coding' feature, but the XEmacs versions treat nil, that is ------------------------------------------------------------ revno: 114337 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 16:27:10 -0400 message: * lisp/simple.el (messages-buffer-mode-map): Unbind "g". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-17 17:48:06 +0000 +++ lisp/ChangeLog 2013-09-17 20:27:10 +0000 @@ -1,3 +1,7 @@ +2013-09-17 Glenn Morris + + * simple.el (messages-buffer-mode-map): Unbind "g". + 2013-09-17 Stefan Monnier * help-mode.el (help-mode-finish): Use derived-mode-p. === modified file 'lisp/simple.el' --- lisp/simple.el 2013-09-17 07:39:54 +0000 +++ lisp/simple.el 2013-09-17 20:27:10 +0000 @@ -7344,6 +7344,12 @@ buffer-invisibility-spec) (setq buffer-invisibility-spec nil))) +(defvar messages-buffer-mode-map + (let ((map (make-sparse-keymap))) + (set-keymap-parent map special-mode-map) + (define-key map "g" nil) ; nothing to revert + map)) + (define-derived-mode messages-buffer-mode special-mode "Messages" "Major mode used in the \"*Messages*\" buffer.") ------------------------------------------------------------ revno: 114336 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-17 13:48:06 -0400 message: * lisp/help-mode.el (help-mode-finish): Use derived-mode-p. Remove obsolete highlighting. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-17 17:47:01 +0000 +++ lisp/ChangeLog 2013-09-17 17:48:06 +0000 @@ -1,5 +1,8 @@ 2013-09-17 Stefan Monnier + * help-mode.el (help-mode-finish): Use derived-mode-p. + Remove obsolete highlighting. + * play/life.el (life-mode): Use define-derived-mode. Derive from special-mode. (life): Let-bind inhibit-read-only. === modified file 'lisp/help-mode.el' --- lisp/help-mode.el 2013-08-10 15:17:29 +0000 +++ lisp/help-mode.el 2013-09-17 17:48:06 +0000 @@ -295,16 +295,8 @@ ;;;###autoload (defun help-mode-finish () - (when (eq major-mode 'help-mode) + (when (derived-mode-p 'help-mode) (setq buffer-read-only t) - (save-excursion - (goto-char (point-min)) - (let ((inhibit-read-only t)) - (when (re-search-forward "^This [^[:space:]]+ is advised.$" nil t) - (put-text-property (match-beginning 0) - (match-end 0) - 'face 'font-lock-warning-face)))) - (help-make-xrefs (current-buffer)))) ;; Grokking cross-reference information in doc strings and ------------------------------------------------------------ revno: 114335 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-17 13:47:01 -0400 message: * lisp/play/life.el (life-mode): Use define-derived-mode. Derive from special-mode. (life): Let-bind inhibit-read-only. (life-setup): Avoid `setq'. Use `life-mode'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-17 15:52:31 +0000 +++ lisp/ChangeLog 2013-09-17 17:47:01 +0000 @@ -1,5 +1,10 @@ 2013-09-17 Stefan Monnier + * play/life.el (life-mode): Use define-derived-mode. Derive from + special-mode. + (life): Let-bind inhibit-read-only. + (life-setup): Avoid `setq'. Use `life-mode'. + * emacs-lisp/package.el (package-generate-autoloads): Remove `require' which should not be needed any more. (package-menu-refresh, package-menu-describe-package): Use user-error. === modified file 'lisp/play/life.el' --- lisp/play/life.el 2013-08-09 21:22:44 +0000 +++ lisp/play/life.el 2013-09-17 17:47:01 +0000 @@ -122,33 +122,32 @@ (life-setup) (catch 'life-exit (while t - (let ((inhibit-quit t)) + (let ((inhibit-quit t) + (inhibit-read-only t)) (life-display-generation sleeptime) (life-grim-reaper) (life-expand-plane-if-needed) (life-increment-generation))))) -(defalias 'life-mode 'life) -(put 'life-mode 'mode-class 'special) +(define-derived-mode life-mode special-mode "Life" + "Major mode for the buffer of `life'." + (setq-local case-fold-search nil) + (setq-local truncate-lines t) + (setq-local show-trailing-whitespace nil) + (setq-local life-current-generation 0) + (setq-local life-generation-string "0") + (setq-local mode-line-buffer-identification '("Life: generation " + life-generation-string)) + (setq-local fill-column (1- (window-width))) + (setq-local life-window-start 1) + (buffer-disable-undo)) (defun life-setup () - (let (n) - (switch-to-buffer (get-buffer-create "*Life*") t) - (erase-buffer) - (kill-all-local-variables) - (setq case-fold-search nil - mode-name "Life" - major-mode 'life-mode - truncate-lines t - show-trailing-whitespace nil - life-current-generation 0 - life-generation-string "0" - mode-line-buffer-identification '("Life: generation " - life-generation-string) - fill-column (1- (window-width)) - life-window-start 1) - (buffer-disable-undo (current-buffer)) - ;; stuff in the random pattern + (switch-to-buffer (get-buffer-create "*Life*") t) + (erase-buffer) + (life-mode) + ;; stuff in the random pattern + (let ((inhibit-read-only t)) (life-insert-random-pattern) ;; make sure (life-life-char) is used throughout (goto-char (point-min)) @@ -156,18 +155,18 @@ (replace-match (life-life-string) t t)) ;; center the pattern horizontally (goto-char (point-min)) - (setq n (/ (- fill-column (line-end-position)) 2)) - (while (not (eobp)) - (indent-to n) - (forward-line)) + (let ((n (/ (- fill-column (line-end-position)) 2))) + (while (not (eobp)) + (indent-to n) + (forward-line))) ;; center the pattern vertically - (setq n (/ (- (1- (window-height)) - (count-lines (point-min) (point-max))) - 2)) - (goto-char (point-min)) - (newline n) - (goto-char (point-max)) - (newline n) + (let ((n (/ (- (1- (window-height)) + (count-lines (point-min) (point-max))) + 2))) + (goto-char (point-min)) + (newline n) + (goto-char (point-max)) + (newline n)) ;; pad lines out to fill-column (goto-char (point-min)) (while (not (eobp)) ------------------------------------------------------------ revno: 114334 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-17 13:22:32 -0400 message: * lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode. (gnus-agent-mode): Use derived-mode-p. (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind gnus-command-method and *-command-method to nil, but bind gnus-command-method to *-command-method instead! (gnus-agent-fetch-articles): Remove unused var `id'. (gnus-agent-fetch-headers): Remove unused arg `force'. (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. (gnus-agent-short-article, gnus-agent-long-article) (gnus-agent-low-score, gnus-agent-high-score): Move declaration before first use. (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', `score-param'. (gnus-tmp-name, gnus-tmp-groups): Defvar them. (gnus-get-predicate): Push in front of the cache, rather than end. (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. (gnus-agent-expire-unagentized-dirs): Don't rebind gnus-agent-expire-current-dirs since the defvar silences the warning. (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. (gnus-agent-regenerate): Simplify interactive spec and doc. * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. * lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode. Use save-current-buffer. (gnus-tree-mode-map): Initialize in the declaration. (gnus-pick-mouse-pick-region): Remove unused var `fun'. (scroll-in-place): Defvar it. (gnus-tmp-*): Defvar them. (gnus-get-tree-buffer): Use derived-mode-p. (gnus--let-eval): New macro. (gnus-tree-highlight-node): Use it to avoid dynamic binding of non-prefixed variables. (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. * lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of vars since it doesn't seem to be available. (gnus-set-global-variables, gnus-summary-read-group-1) (gnus-select-newsgroup, gnus-handle-ephemeral-exit) (gnus-summary-display-article, gnus-summary-select-article) (gnus-summary-next-article, gnus-offer-save-summaries) (gnus-summary-generic-mark): Use derived-mode-p. (gnus-summary-read-group-1, gnus-summary-exit) (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): Adjust calls to gnus-tree-close and gnus-tree-open. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-17 14:08:24 +0000 +++ lisp/gnus/ChangeLog 2013-09-17 17:22:32 +0000 @@ -1,3 +1,54 @@ +2013-09-17 Stefan Monnier + + * gnus-salt.el (gnus-tree-mode): Use define-derived-mode. + Use save-current-buffer. + (gnus-tree-mode-map): Initialize in the declaration. + (gnus-pick-mouse-pick-region): Remove unused var `fun'. + (scroll-in-place): Defvar it. + (gnus-tmp-*): Defvar them. + (gnus-get-tree-buffer): Use derived-mode-p. + (gnus--let-eval): New macro. + (gnus-tree-highlight-node): Use it to avoid dynamic binding of + non-prefixed variables. + (gnus-tree-open, gnus-tree-close): Remove unused arg `group'. + + * gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of + vars since it doesn't seem to be available. + (gnus-set-global-variables, gnus-summary-read-group-1) + (gnus-select-newsgroup, gnus-handle-ephemeral-exit) + (gnus-summary-display-article, gnus-summary-select-article) + (gnus-summary-next-article, gnus-offer-save-summaries) + (gnus-summary-generic-mark): Use derived-mode-p. + (gnus-summary-read-group-1, gnus-summary-exit) + (gnus-summary-exit-no-update, gnus-kill-or-deaden-summary): + Adjust calls to gnus-tree-close and gnus-tree-open. + + * gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode. + + * gnus-agent.el (gnus-category-mode): Use define-derived-mode. + (gnus-agent-mode): Use derived-mode-p. + (gnus-agent-rename-group, gnus-agent-delete-group): Don't bind + gnus-command-method and *-command-method to nil, but bind + gnus-command-method to *-command-method instead! + (gnus-agent-fetch-articles): Remove unused var `id'. + (gnus-agent-fetch-headers): Remove unused arg `force'. + (gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers. + (gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'. + (gnus-agent-short-article, gnus-agent-long-article) + (gnus-agent-low-score, gnus-agent-high-score): Move declaration before + first use. + (gnus-agent-fetch-group-1): Remove unused vars `arts', `category', + `score-param'. + (gnus-tmp-name, gnus-tmp-groups): Defvar them. + (gnus-get-predicate): Push in front of the cache, rather than end. + (gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them. + (gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding. + (gnus-agent-expire-unagentized-dirs): Don't rebind + gnus-agent-expire-current-dirs since the defvar silences the warning. + (gnus-agent-retrieve-headers): Remove unused var `cached-articles'. + (gnus-agent-regenerate-group): Remove unused vars `point' and `dl'. + (gnus-agent-regenerate): Simplify interactive spec and doc. + 2013-09-17 Katsumi Yamaoka * gnus-int.el (gnus-open-server): Silence compiler. === modified file 'lisp/gnus/gnus-agent.el' --- lisp/gnus/gnus-agent.el 2013-01-02 16:13:04 +0000 +++ lisp/gnus/gnus-agent.el 2013-09-17 17:22:32 +0000 @@ -492,7 +492,7 @@ (push (cons mode (symbol-value (intern (format "gnus-agent-%s-mode-map" buffer)))) minor-mode-map-alist)) - (when (eq major-mode 'gnus-group-mode) + (when (derived-mode-p 'gnus-group-mode) (let ((init-plugged gnus-plugged) (gnus-agent-go-online nil)) ;; g-a-t-p does nothing when gnus-plugged isn't changed. @@ -881,11 +881,11 @@ supported." (let* ((old-command-method (gnus-find-method-for-group old-group)) (old-path (directory-file-name - (let (gnus-command-method old-command-method) + (let ((gnus-command-method old-command-method)) (gnus-agent-group-pathname old-group)))) (new-command-method (gnus-find-method-for-group new-group)) (new-path (directory-file-name - (let (gnus-command-method new-command-method) + (let ((gnus-command-method new-command-method)) (gnus-agent-group-pathname new-group)))) (file-name-coding-system nnmail-pathname-coding-system)) (gnus-rename-file old-path new-path t) @@ -914,19 +914,18 @@ supported." (let* ((command-method (gnus-find-method-for-group group)) (path (directory-file-name - (let (gnus-command-method command-method) + (let ((gnus-command-method command-method)) (gnus-agent-group-pathname group)))) (file-name-coding-system nnmail-pathname-coding-system)) (gnus-delete-directory path) (let* ((real-group (gnus-group-real-name group))) (gnus-agent-save-group-info command-method real-group nil) - - (let ((local (gnus-agent-get-local group - real-group command-method))) - (gnus-agent-set-local group - nil nil - real-group command-method))))) + ;; FIXME: Does gnus-agent-get-local have any useful side-effect? + (gnus-agent-get-local group real-group command-method) + (gnus-agent-set-local group + nil nil + real-group command-method)))) ;;; ;;; Server mode commands @@ -1549,7 +1548,7 @@ (dir (gnus-agent-group-pathname group)) (date (time-to-days (current-time))) (case-fold-search t) - pos crosses id + pos crosses (file-name-coding-system nnmail-pathname-coding-system)) (setcar selected-sets (nreverse (car selected-sets))) @@ -1603,11 +1602,6 @@ (goto-char (match-end 0))) (gnus-agent-crosspost crosses (caar pos) date))) (goto-char (point-min)) - (if (not (re-search-forward - "^Message-ID: *<\\([^>\n]+\\)>" nil t)) - (setq id "No-Message-ID-in-article") - (setq id (buffer-substring - (match-beginning 1) (match-end 1)))) (let ((coding-system-for-write gnus-agent-file-coding-system)) (write-region (point-min) (point-max) @@ -1832,7 +1826,7 @@ . gnus-agent-enable-expiration) (agent-predicate . gnus-agent-predicate))))))) -(defun gnus-agent-fetch-headers (group &optional force) +(defun gnus-agent-fetch-headers (group) "Fetch interesting headers into the agent. The group's overview file will be updated to include the headers while a list of available article numbers will be returned." @@ -1931,7 +1925,7 @@ ;; NOTE: Call g-a-brand-nov even when the file does not ;; exist. As a minimum, it will validate the article ;; numbers already in the buffer. - (gnus-agent-braid-nov group articles file) + (gnus-agent-braid-nov articles file) (let ((coding-system-for-write gnus-agent-file-coding-system)) (gnus-agent-check-overview-buffer) @@ -1980,7 +1974,7 @@ (set-buffer nntp-server-buffer) (insert-buffer-substring gnus-agent-overview-buffer b e)))) -(defun gnus-agent-braid-nov (group articles file) +(defun gnus-agent-braid-nov (articles file) "Merge agent overview data with given file. Takes unvalidated headers for ARTICLES from `gnus-agent-overview-buffer' and validated headers from the given @@ -2154,7 +2148,7 @@ (let* ((file-name-coding-system nnmail-pathname-coding-system) (prev (cons nil gnus-agent-article-alist)) (all prev) - print-level print-length item article) + print-level print-length article) (while (setq article (pop articles)) (while (and (cdr prev) (< (caadr prev) article)) @@ -2288,7 +2282,7 @@ (file-name-coding-system nnmail-pathname-coding-system)) (with-temp-file dest (let ((gnus-command-method (symbol-value (intern "+method" my-obarray))) - print-level print-length item article + print-level print-length (standard-output (current-buffer))) (mapatoms (lambda (symbol) (cond ((not (boundp symbol)) @@ -2411,6 +2405,18 @@ (gnus-run-hooks 'gnus-agent-fetched-hook) (gnus-message 6 "Finished fetching articles into the Gnus agent")))) +(defvar gnus-agent-short-article 500 + "Articles that have fewer lines than this are short.") + +(defvar gnus-agent-long-article 1000 + "Articles that have more lines than this are long.") + +(defvar gnus-agent-low-score 0 + "Articles that have a score lower than this have a low score.") + +(defvar gnus-agent-high-score 0 + "Articles that have a score higher than this have a high score.") + (defun gnus-agent-fetch-group-1 (group method) "Fetch GROUP." (let ((gnus-command-method method) @@ -2427,8 +2433,8 @@ gnus-headers gnus-score - articles arts - category predicate info marks score-param + articles + predicate info marks ) (unless (gnus-check-group group) (error "Can't open server for %s" group)) @@ -2471,9 +2477,6 @@ ;; timeout reason. If so, recreate it. (gnus-agent-create-buffer) - ;; Figure out how to select articles in this group - (setq category (gnus-group-category group)) - (setq predicate (gnus-get-predicate (gnus-agent-find-parameter group 'agent-predicate))) @@ -2624,23 +2627,14 @@ (defvar gnus-agent-predicate 'false "The selection predicate used when no other source is available.") -(defvar gnus-agent-short-article 500 - "Articles that have fewer lines than this are short.") - -(defvar gnus-agent-long-article 1000 - "Articles that have more lines than this are long.") - -(defvar gnus-agent-low-score 0 - "Articles that have a score lower than this have a low score.") - -(defvar gnus-agent-high-score 0 - "Articles that have a score higher than this have a high score.") - ;;; Internal variables. (defvar gnus-category-buffer "*Agent Category*") +(defvar gnus-tmp-name) +(defvar gnus-tmp-groups) + (defvar gnus-category-line-format-alist `((?c gnus-tmp-name ?s) (?g gnus-tmp-groups ?d))) @@ -2692,7 +2686,7 @@ (gnus-run-hooks 'gnus-category-menu-hook))) -(defun gnus-category-mode () +(define-derived-mode gnus-category-mode fundamental-mode "Category" "Major mode for listing and editing agent categories. All normal editing commands are switched off. @@ -2703,20 +2697,14 @@ The following commands are available: \\{gnus-category-mode-map}" - (interactive) (when (gnus-visual-p 'category-menu 'menu) (gnus-category-make-menu-bar)) - (kill-all-local-variables) (gnus-simplify-mode-line) - (setq major-mode 'gnus-category-mode) - (setq mode-name "Category") (gnus-set-default-directory) (setq mode-line-process nil) - (use-local-map gnus-category-mode-map) (buffer-disable-undo) (setq truncate-lines t) - (setq buffer-read-only t) - (gnus-run-mode-hooks 'gnus-category-mode-hook)) + (setq buffer-read-only t)) (defalias 'gnus-category-position-point 'gnus-goto-colon) @@ -2992,9 +2980,7 @@ "Return the function implementing PREDICATE." (or (cdr (assoc predicate gnus-category-predicate-cache)) (let ((func (gnus-category-make-function predicate))) - (setq gnus-category-predicate-cache - (nconc gnus-category-predicate-cache - (list (cons predicate func)))) + (push (cons predicate func) gnus-category-predicate-cache) func))) (defun gnus-predicate-implies-unread (predicate) @@ -3066,6 +3052,9 @@ (or (gnus-gethash group gnus-category-group-cache) (assq 'default gnus-category-alist))) +(defvar gnus-agent-expire-current-dirs) +(defvar gnus-agent-expire-stats) + (defun gnus-agent-expire-group (group &optional articles force) "Expire all old articles in GROUP. If you want to force expiring of certain articles, this function can @@ -3080,7 +3069,7 @@ (if (not group) (gnus-agent-expire articles group force) - (let ( ;; Bind gnus-agent-expire-stats to enable tracking of + (let (;; Bind gnus-agent-expire-stats to enable tracking of ;; expiration statistics of this single group (gnus-agent-expire-stats (list 0 0 0.0))) (if (or (not (eq articles t)) @@ -3117,9 +3106,7 @@ (gnus-agent-with-refreshed-group group (when (boundp 'gnus-agent-expire-current-dirs) - (set 'gnus-agent-expire-current-dirs - (cons dir - (symbol-value 'gnus-agent-expire-current-dirs)))) + (push dir gnus-agent-expire-current-dirs)) (if (and (not force) (eq 'DISABLE (gnus-agent-find-parameter group @@ -3263,24 +3250,24 @@ ;; only problem is that much of it is spread across multiple ;; entries. Sort then MERGE!! (gnus-message 7 "gnus-agent-expire: Sorting entries... ") - ;; If two entries have the same article-number then sort by - ;; ascending keep_flag. - (let ((special 0) - (marked 1) - (unread 2)) - (setq dlist - (sort dlist - (lambda (a b) - (cond ((< (nth 0 a) (nth 0 b)) - t) - ((> (nth 0 a) (nth 0 b)) - nil) - (t - (let ((a (or (symbol-value (nth 2 a)) - 3)) - (b (or (symbol-value (nth 2 b)) - 3))) - (<= a b)))))))) + (setq dlist + (sort dlist + (lambda (a b) + (cond ((< (nth 0 a) (nth 0 b)) + t) + ((> (nth 0 a) (nth 0 b)) + nil) + (t + ;; If two entries have the same article-number + ;; then sort by ascending keep_flag. + (let* ((kf-score '((special . 0) + (marked . 1) + (unread . 2))) + (a (or (cdr (assq (nth 2 a) kf-score)) + 3)) + (b (or (cdr (assq (nth 2 b) kf-score)) + 3))) + (<= a b))))))) (gnus-message 7 "gnus-agent-expire: Sorting entries... Done") (gnus-message 7 "gnus-agent-expire: Merging entries... ") (let ((dlist dlist)) @@ -3474,7 +3461,7 @@ (gnus-summary-update-info)))) (when (boundp 'gnus-agent-expire-stats) - (let ((stats (symbol-value 'gnus-agent-expire-stats))) + (let ((stats gnus-agent-expire-stats)) (incf (nth 2 stats) bytes-freed) (incf (nth 1 stats) files-deleted) (incf (nth 0 stats) nov-entries-deleted))) @@ -3534,7 +3521,7 @@ (defun gnus-agent-expire-done-message () (if (and (> gnus-verbose 4) (boundp 'gnus-agent-expire-stats)) - (let* ((stats (symbol-value 'gnus-agent-expire-stats)) + (let* ((stats gnus-agent-expire-stats) (size (nth 2 stats)) (units '(B KB MB GB))) (while (and (> size 1024.0) @@ -3553,16 +3540,10 @@ (when (and gnus-agent-expire-unagentized-dirs (boundp 'gnus-agent-expire-current-dirs)) (let* ((keep (gnus-make-hashtable)) - ;; Formally bind gnus-agent-expire-current-dirs so that the - ;; compiler will not complain about free references. - (gnus-agent-expire-current-dirs - (symbol-value 'gnus-agent-expire-current-dirs)) - dir (file-name-coding-system nnmail-pathname-coding-system)) (gnus-sethash gnus-agent-directory t keep) - (while gnus-agent-expire-current-dirs - (setq dir (pop gnus-agent-expire-current-dirs)) + (dolist (dir gnus-agent-expire-current-dirs) (when (and (stringp dir) (file-directory-p dir)) (while (not (gnus-gethash dir keep)) @@ -3715,7 +3696,7 @@ (let ((gnus-decode-encoded-word-function 'identity) (gnus-decode-encoded-address-function 'identity) (file (gnus-agent-article-name ".overview" group)) - cached-articles uncached-articles + uncached-articles (file-name-coding-system nnmail-pathname-coding-system)) (gnus-make-directory (nnheader-translate-file-chars (file-name-directory file) t)) @@ -3812,7 +3793,7 @@ ;; Merge the temp buffer with the known headers (found on ;; disk in FILE) into the nntp-server-buffer (when uncached-articles - (gnus-agent-braid-nov group uncached-articles file)) + (gnus-agent-braid-nov uncached-articles file)) ;; Save the new set of known headers to FILE (set-buffer nntp-server-buffer) @@ -3907,7 +3888,6 @@ (gnus-find-method-for-group group))) (file (gnus-agent-article-name ".overview" group)) (dir (file-name-directory file)) - point (file-name-coding-system nnmail-pathname-coding-system) (downloaded (if (file-exists-p dir) (sort (delq nil (mapcar (lambda (name) @@ -3916,7 +3896,7 @@ (directory-files dir nil "^[0-9]+$" t))) '>) (progn (gnus-make-directory dir) nil))) - dl nov-arts + nov-arts alist header regenerated) @@ -4099,16 +4079,16 @@ regenerated))) ;;;###autoload -(defun gnus-agent-regenerate (&optional clean reread) +(defun gnus-agent-regenerate (&optional _clean reread) "Regenerate all agent covered files. -If CLEAN, obsolete (ignore)." - (interactive "P") +CLEAN is obsolete and ignored." + (interactive) (let (regenerated) (gnus-message 4 "Regenerating Gnus agent files...") (dolist (gnus-command-method (gnus-agent-covered-methods)) - (dolist (group (gnus-groups-from-server gnus-command-method)) - (setq regenerated (or (gnus-agent-regenerate-group group reread) - regenerated)))) + (dolist (group (gnus-groups-from-server gnus-command-method)) + (setq regenerated (or (gnus-agent-regenerate-group group reread) + regenerated)))) (gnus-message 4 "Regenerating Gnus agent files...done") regenerated)) === modified file 'lisp/gnus/gnus-eform.el' --- lisp/gnus/gnus-eform.el 2013-01-01 09:11:05 +0000 +++ lisp/gnus/gnus-eform.el 2013-09-17 17:22:32 +0000 @@ -67,21 +67,15 @@ ["Exit" gnus-edit-form-exit t])) (gnus-run-hooks 'gnus-edit-form-menu-hook))) -(defun gnus-edit-form-mode () +(define-derived-mode gnus-edit-form-mode fundamental-mode "Edit Form" "Major mode for editing forms. It is a slightly enhanced emacs-lisp-mode. \\{gnus-edit-form-mode-map}" - (interactive) (when (gnus-visual-p 'group-menu 'menu) (gnus-edit-form-make-menu-bar)) - (kill-all-local-variables) - (setq major-mode 'gnus-edit-form-mode) - (setq mode-name "Edit Form") - (use-local-map gnus-edit-form-mode-map) (make-local-variable 'gnus-edit-form-done-function) - (make-local-variable 'gnus-prev-winconf) - (gnus-run-mode-hooks 'gnus-edit-form-mode-hook)) + (make-local-variable 'gnus-prev-winconf)) (defun gnus-edit-form (form documentation exit-func &optional layout) "Edit FORM in a new buffer. === modified file 'lisp/gnus/gnus-salt.el' --- lisp/gnus/gnus-salt.el 2013-05-09 01:40:20 +0000 +++ lisp/gnus/gnus-salt.el 2013-09-17 17:22:32 +0000 @@ -292,22 +292,25 @@ (mouse-scroll-subr start-window (1+ (- mouse-row bottom))))))))))) (when (consp event) - (let ((fun (key-binding (vector (car event))))) + (let (;; (fun (key-binding (vector (car event)))) + ) ;; Run the binding of the terminating up-event, if possible. - ;; In the case of a multiple click, it gives the wrong results, + ;; In the case of a multiple click, it gives the wrong results, ;; because it would fail to set up a region. (when nil - ;; (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun)) - ;; In this case, we can just let the up-event execute normally. + ;; (and (= (mod mouse-selection-click-count 3) 0) (fboundp fun)) + ;; In this case, we can just let the up-event execute normally. (let ((end (event-end event))) ;; Set the position in the event before we replay it, ;; because otherwise it may have a position in the wrong ;; buffer. (setcar (cdr end) end-of-range) ;; Delete the overlay before calling the function, - ;; because delete-overlay increases buffer-modified-tick. + ;; because delete-overlay increases buffer-modified-tick. (push event unread-command-events)))))))) +(defvar scroll-in-place) + (defun gnus-pick-next-page () "Go to the next page. If at the end of the buffer, start reading articles." (interactive) @@ -356,7 +359,7 @@ (when (gnus-visual-p 'binary-menu 'menu) (gnus-binary-make-menu-bar))))) -(defun gnus-binary-display-article (article &optional all-header) +(defun gnus-binary-display-article (article &optional _all-header) "Run ARTICLE through the binary decode functions." (when (gnus-summary-goto-subject article) (let ((gnus-view-pseudos (or gnus-view-pseudos 'automatic))) @@ -423,6 +426,13 @@ ;;; Internal variables. +(defvar gnus-tmp-name) +(defvar gnus-tmp-from) +(defvar gnus-tmp-number) +(defvar gnus-tmp-open-bracket) +(defvar gnus-tmp-close-bracket) +(defvar gnus-tmp-subject) + (defvar gnus-tree-line-format-alist `((?n gnus-tmp-name ?s) (?f gnus-tmp-from ?s) @@ -442,24 +452,24 @@ (defvar gnus-tree-displayed-thread nil) (defvar gnus-tree-inhibit nil) -(defvar gnus-tree-mode-map nil) +(defvar gnus-tree-mode-map + (let ((map (make-keymap))) + (suppress-keymap map) + (gnus-define-keys + map + "\r" gnus-tree-select-article + gnus-mouse-2 gnus-tree-pick-article + "\C-?" gnus-tree-read-summary-keys + "h" gnus-tree-show-summary + + "\C-c\C-i" gnus-info-find-node) + + (substitute-key-definition + 'undefined 'gnus-tree-read-summary-keys map) + map)) + (put 'gnus-tree-mode 'mode-class 'special) -(unless gnus-tree-mode-map - (setq gnus-tree-mode-map (make-keymap)) - (suppress-keymap gnus-tree-mode-map) - (gnus-define-keys - gnus-tree-mode-map - "\r" gnus-tree-select-article - gnus-mouse-2 gnus-tree-pick-article - "\C-?" gnus-tree-read-summary-keys - "h" gnus-tree-show-summary - - "\C-c\C-i" gnus-info-find-node) - - (substitute-key-definition - 'undefined 'gnus-tree-read-summary-keys gnus-tree-mode-map)) - (defun gnus-tree-make-menu-bar () (unless (boundp 'gnus-tree-menu) (easy-menu-define @@ -467,26 +477,20 @@ '("Tree" ["Select article" gnus-tree-select-article t])))) -(defun gnus-tree-mode () +(define-derived-mode gnus-tree-mode fundamental-mode "Tree" "Major mode for displaying thread trees." - (interactive) (gnus-set-format 'tree-mode) (gnus-set-format 'tree t) (when (gnus-visual-p 'tree-menu 'menu) (gnus-tree-make-menu-bar)) - (kill-all-local-variables) (gnus-simplify-mode-line) - (setq mode-name "Tree") - (setq major-mode 'gnus-tree-mode) - (use-local-map gnus-tree-mode-map) (buffer-disable-undo) (setq buffer-read-only t) (setq truncate-lines t) - (save-excursion + (save-current-buffer (gnus-set-work-buffer) (gnus-tree-node-insert (make-mail-header "") nil) - (setq gnus-tree-node-length (1- (point)))) - (gnus-run-mode-hooks 'gnus-tree-mode-hook)) + (setq gnus-tree-node-length (1- (point))))) (defun gnus-tree-read-summary-keys (&optional arg) "Read a summary buffer key sequence and execute it." @@ -562,7 +566,7 @@ (defun gnus-get-tree-buffer () "Return the tree buffer properly initialized." (with-current-buffer (gnus-get-buffer-create gnus-tree-buffer) - (unless (eq major-mode 'gnus-tree-mode) + (unless (derived-mode-p 'gnus-tree-mode) (gnus-tree-mode)) (current-buffer))) @@ -571,7 +575,7 @@ (not (one-window-p))) (let ((windows 0) tot-win-height) - (walk-windows (lambda (window) (incf windows))) + (walk-windows (lambda (_window) (incf windows))) (setq tot-win-height (- (frame-height) (* window-min-height (1- windows)) @@ -642,23 +646,41 @@ (when (or t (gnus-visual-p 'tree-highlight 'highlight)) (gnus-tree-highlight-node gnus-tmp-number beg end)))) +(defmacro gnus--let-eval (bindings evalsym &rest body) + "Build an environment in which to evaluate expressions. +BINDINGS is a `let'-style list of bindings to use for the environment. +EVALSYM is then bound in BODY to a function that takes a sexp and evaluates +it in the environment specified by BINDINGS." + (declare (indent 2) (debug ((&rest (sym form)) sym body))) + (if (ignore-errors (let ((x 3)) (eq (eval '(- x 1) '((x . 4))) x))) + ;; Use lexical vars if possible. + `(let* ((env (list ,@(mapcar (lambda (binding) + `(cons ',(car binding) ,(cadr binding))) + bindings))) + (,evalsym (lambda (exp) (eval exp env)))) + ,@body) + `(let (,@bindings (,evalsym #'eval)) ,@body))) + (defun gnus-tree-highlight-node (article beg end) "Highlight current line according to `gnus-summary-highlight'." (let ((list gnus-summary-highlight) face) (with-current-buffer gnus-summary-buffer - (let* ((score (or (cdr (assq article gnus-newsgroup-scored)) + (let ((uncached (memq article gnus-newsgroup-undownloaded))) + (gnus--let-eval + ((score (or (cdr (assq article gnus-newsgroup-scored)) gnus-summary-default-score 0)) (default gnus-summary-default-score) (default-high gnus-summary-default-high-score) (default-low gnus-summary-default-low-score) - (uncached (memq article gnus-newsgroup-undownloaded)) + (uncached uncached) (downloaded (not uncached)) (mark (or (gnus-summary-article-mark article) gnus-unread-mark))) - ;; Eval the cars of the lists until we find a match. - (while (and list - (not (eval (caar list)))) - (setq list (cdr list))))) + evalfun + ;; Eval the cars of the lists until we find a match. + (while (and list + (not (funcall evalfun (caar list)))) + (setq list (cdr list)))))) (unless (eq (setq face (cdar list)) (gnus-get-text-property-excluding-characters-with-faces beg 'face)) (gnus-put-text-property-excluding-characters-with-faces beg end 'face @@ -814,10 +836,10 @@ (gnus-generate-tree top) (setq gnus-tree-displayed-thread top)))))) -(defun gnus-tree-open (group) +(defun gnus-tree-open () (gnus-get-tree-buffer)) -(defun gnus-tree-close (group) +(defun gnus-tree-close () (gnus-kill-buffer gnus-tree-buffer)) (defun gnus-tree-perhaps-minimize () === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2013-07-30 22:09:37 +0000 +++ lisp/gnus/gnus-sum.el 2013-09-17 17:22:32 +0000 @@ -1140,7 +1140,6 @@ default: The default article score. default-high: The default score for high scored articles. default-low: The default score for low scored articles. -below: The score below which articles are automatically marked as read. mark: The article's mark. uncached: Non-nil if the article is uncached." :group 'gnus-summary-visual @@ -3104,6 +3103,7 @@ The following commands are available: \\{gnus-summary-mode-map}" + ;; FIXME: Use define-derived-mode. (interactive) (kill-all-local-variables) (let ((gnus-summary-local-variables gnus-newsgroup-variables)) @@ -3542,7 +3542,7 @@ "Set the global equivalents of the buffer-local variables. They are set to the latest values they had. These reflect the summary buffer that was in action when the last article was fetched." - (when (eq major-mode 'gnus-summary-mode) + (when (derived-mode-p 'gnus-summary-mode) (setq gnus-summary-buffer (current-buffer)) (let ((name gnus-newsgroup-name) (marked gnus-newsgroup-marked) @@ -3990,7 +3990,7 @@ t) ;; We couldn't select this group. ((null did-select) - (when (and (eq major-mode 'gnus-summary-mode) + (when (and (derived-mode-p 'gnus-summary-mode) (not (equal (current-buffer) kill-buffer))) (kill-buffer (current-buffer)) (if (not quit-config) @@ -4009,7 +4009,7 @@ ;; The user did a `C-g' while prompting for number of articles, ;; so we exit this group. ((eq did-select 'quit) - (and (eq major-mode 'gnus-summary-mode) + (and (derived-mode-p 'gnus-summary-mode) (not (equal (current-buffer) kill-buffer)) (kill-buffer (current-buffer))) (when kill-buffer @@ -4052,7 +4052,7 @@ (unless no-display (gnus-summary-prepare)) (when gnus-use-trees - (gnus-tree-open group) + (gnus-tree-open) (setq gnus-summary-highlight-line-function 'gnus-tree-highlight-article)) ;; If the summary buffer is empty, but there are some low-scored @@ -5612,7 +5612,7 @@ (or (and entry (not (eq (car entry) t))) ; Either it's active... (gnus-activate-group group) ; Or we can activate it... (progn ; Or we bug out. - (when (equal major-mode 'gnus-summary-mode) + (when (derived-mode-p 'gnus-summary-mode) (gnus-kill-buffer (current-buffer))) (error "Couldn't activate group %s: %s" @@ -5620,7 +5620,7 @@ (mm-decode-coding-string (gnus-status-message group) charset)))) (unless (gnus-request-group group t) - (when (equal major-mode 'gnus-summary-mode) + (when (derived-mode-p 'gnus-summary-mode) (gnus-kill-buffer (current-buffer))) (error "Couldn't request group %s: %s" (mm-decode-coding-string group charset) @@ -7257,7 +7257,7 @@ (when gnus-suppress-duplicates (gnus-dup-enter-articles)) (when gnus-use-trees - (gnus-tree-close group)) + (gnus-tree-close)) (when gnus-use-cache (gnus-cache-write-active)) ;; Remove entries for this group. @@ -7360,7 +7360,7 @@ (unless gnus-single-article-buffer (setq gnus-article-current nil)) (when gnus-use-trees - (gnus-tree-close group)) + (gnus-tree-close)) (gnus-async-prefetch-remove-group group) (when (get-buffer gnus-article-buffer) (bury-buffer gnus-article-buffer)) @@ -7383,9 +7383,9 @@ (unless (eq (cdr quit-config) 'group) (setq gnus-current-select-method (gnus-find-method-for-group gnus-newsgroup-name))) - (cond ((eq major-mode 'gnus-summary-mode) + (cond ((derived-mode-p 'gnus-summary-mode) (gnus-set-global-variables)) - ((eq major-mode 'gnus-article-mode) + ((derived-mode-p 'gnus-article-mode) (save-current-buffer ;; The `gnus-summary-buffer' variable may point ;; to the old summary buffer when using a single @@ -7400,7 +7400,7 @@ (gnus-configure-windows 'pick 'force) (gnus-configure-windows (cdr quit-config) 'force)) (gnus-configure-windows (cdr quit-config) 'force)) - (when (eq major-mode 'gnus-summary-mode) + (when (derived-mode-p 'gnus-summary-mode) (if (memq gnus-auto-select-on-ephemeral-exit '(next-noselect next-unread-noselect)) (when (zerop (cond ((eq gnus-auto-select-on-ephemeral-exit @@ -7470,7 +7470,7 @@ (when (and gnus-use-trees (gnus-buffer-exists-p buffer)) (with-current-buffer buffer - (gnus-tree-close gnus-newsgroup-name))) + (gnus-tree-close))) (gnus-kill-buffer buffer)) ;; Deaden the buffer. ((gnus-buffer-exists-p buffer) @@ -7699,7 +7699,7 @@ "Display ARTICLE in article buffer." (unless (and (gnus-buffer-live-p gnus-article-buffer) (with-current-buffer gnus-article-buffer - (eq major-mode 'gnus-article-mode))) + (derived-mode-p 'gnus-article-mode))) (gnus-article-setup-buffer)) (gnus-set-global-variables) (with-current-buffer gnus-article-buffer @@ -7731,7 +7731,7 @@ the article buffer. If PSEUDO is non-nil, pseudo-articles will also be displayed." ;; Make sure we are in the summary buffer to work around bbdb bug. - (unless (eq major-mode 'gnus-summary-mode) + (unless (derived-mode-p 'gnus-summary-mode) (set-buffer gnus-summary-buffer)) (let ((article (or article (gnus-summary-article-number))) (all-headers (not (not all-headers))) ;Must be t or nil. @@ -7783,7 +7783,7 @@ If BACKWARD, the previous article is selected instead of the next." (interactive "P") ;; Make sure we are in the summary buffer. - (unless (eq major-mode 'gnus-summary-mode) + (unless (derived-mode-p 'gnus-summary-mode) (set-buffer gnus-summary-buffer)) (cond ;; Is there such an article? @@ -12680,7 +12680,7 @@ (string-match "Summary" buffer) (with-current-buffer buffer ;; We check that this is, indeed, a summary buffer. - (and (eq major-mode 'gnus-summary-mode) + (and (derived-mode-p 'gnus-summary-mode) ;; Also make sure this isn't bogus. gnus-newsgroup-prepared ;; Also make sure that this isn't a @@ -12815,7 +12815,7 @@ (defun gnus-summary-generic-mark (n mark move unread) "Mark N articles with MARK." - (unless (eq major-mode 'gnus-summary-mode) + (unless (derived-mode-p 'gnus-summary-mode) (error "This command can only be used in the summary buffer")) (gnus-summary-show-thread) (let ((nummove ------------------------------------------------------------ revno: 114333 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-17 19:57:45 +0400 message: * w32term.c (w32_read_socket): Avoid temporary variables in a call to x_real_positions. * xterm.c (handle_one_xevent): Likewise. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-17 12:59:45 +0000 +++ src/ChangeLog 2013-09-17 15:57:45 +0000 @@ -1,5 +1,11 @@ 2013-09-17 Dmitry Antipov + * w32term.c (w32_read_socket): Avoid temporary + variables in a call to x_real_positions. + * xterm.c (handle_one_xevent): Likewise. + +2013-09-17 Dmitry Antipov + * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function. (x_icon_type): Remove prototype. (x_bitmap_icon) [!HAVE_NS]: Declare as such. === modified file 'src/w32term.c' --- src/w32term.c 2013-09-17 12:59:45 +0000 +++ src/w32term.c 2013-09-17 15:57:45 +0000 @@ -4687,13 +4687,7 @@ f = x_window_to_frame (dpyinfo, msg.msg.hwnd); if (f && !FRAME_ICONIFIED_P (f)) - { - int x, y; - - x_real_positions (f, &x, &y); - f->left_pos = x; - f->top_pos = y; - } + x_real_positions (f, &f->left_pos, &f->top_pos); check_visibility = 1; break; @@ -4756,16 +4750,12 @@ if (iconified) { - int x, y; - /* Reset top and left positions of the Window here since Windows sends a WM_MOVE message BEFORE telling us the Window is minimized when the Window is iconified, with 3000,3000 as the co-ords. */ - x_real_positions (f, &x, &y); - f->left_pos = x; - f->top_pos = y; + x_real_positions (f, &f->left_pos, &f->top_pos); inev.kind = DEICONIFY_EVENT; XSETFRAME (inev.frame_or_window, f); === modified file 'src/xterm.c' --- src/xterm.c 2013-09-17 12:59:45 +0000 +++ src/xterm.c 2013-09-17 15:57:45 +0000 @@ -6129,11 +6129,8 @@ f = x_top_window_to_frame (dpyinfo, event->xreparent.window); if (f) { - int x, y; f->output_data.x->parent_desc = event->xreparent.parent; - x_real_positions (f, &x, &y); - f->left_pos = x; - f->top_pos = y; + x_real_positions (f, &f->left_pos, &f->top_pos); /* Perhaps reparented due to a WM restart. Reset this. */ FRAME_DISPLAY_INFO (f)->wm_type = X_WMTYPE_UNKNOWN; @@ -6827,9 +6824,7 @@ if (FRAME_GTK_OUTER_WIDGET (f) && gtk_widget_get_mapped (FRAME_GTK_OUTER_WIDGET (f))) #endif - { - x_real_positions (f, &f->left_pos, &f->top_pos); - } + x_real_positions (f, &f->left_pos, &f->top_pos); #ifdef HAVE_X_I18N if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMStatusArea)) ------------------------------------------------------------ revno: 114332 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-17 11:52:31 -0400 message: * lisp/emacs-lisp/package.el (package-generate-autoloads): Remove `require' which should not be needed any more. (package-menu-refresh, package-menu-describe-package): Use user-error. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-17 15:19:12 +0000 +++ lisp/ChangeLog 2013-09-17 15:52:31 +0000 @@ -1,5 +1,9 @@ 2013-09-17 Stefan Monnier + * emacs-lisp/package.el (package-generate-autoloads): Remove `require' + which should not be needed any more. + (package-menu-refresh, package-menu-describe-package): Use user-error. + * eshell/esh-cmd.el (eshell-post-rewrite-command-function): New var. (eshell-post-rewrite-command-hook): Make obsolete. (eshell-parse-command): Simplify. === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-09-03 18:21:41 +0000 +++ lisp/emacs-lisp/package.el 2013-09-17 15:52:31 +0000 @@ -597,7 +597,6 @@ (defvar version-control) (defun package-generate-autoloads (name pkg-dir) - (require 'autoload) ;Load before we let-bind generated-autoload-file! (let* ((auto-name (format "%s-autoloads.el" name)) ;;(ignore-name (concat name "-pkg.el")) (generated-autoload-file (expand-file-name auto-name pkg-dir)) @@ -1523,7 +1522,7 @@ `package-archives', and then refreshes the package menu." (interactive) (unless (derived-mode-p 'package-menu-mode) - (error "The current buffer is not a Package Menu")) + (user-error "The current buffer is not a Package Menu")) (package-refresh-contents) (package-menu--generate t t)) @@ -1535,7 +1534,7 @@ (tabulated-list-get-id)))) (if pkg-desc (describe-package pkg-desc) - (error "No package here")))) + (user-error "No package here")))) ;; fixme numeric argument (defun package-menu-mark-delete (&optional _num) ------------------------------------------------------------ revno: 114331 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-17 11:50:33 -0400 message: * lisp/cedet/semantic/symref/list.el (semantic-symref-results-mode): Use define-derived-mode. (semantic-symref-produce-list-on-results): Set up the results here instead of in semantic-symref-results-mode. Move after semantic-symref-current-results's defvar now that it refers to that var. (semantic-symref-auto-expand-results) (semantic-symref-results-summary-function) (semantic-symref-results-mode-hook): Remove redundant :group arg. (semantic-symref, semantic-symref-symbol, semantic-symref-regexp): Initialize directly in the let. diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-09-17 07:45:18 +0000 +++ lisp/cedet/ChangeLog 2013-09-17 15:50:33 +0000 @@ -1,3 +1,16 @@ +2013-09-17 Stefan Monnier + + * semantic/symref/list.el (semantic-symref-results-mode): + Use define-derived-mode. + (semantic-symref-produce-list-on-results): Set up the results here + instead of in semantic-symref-results-mode. Move after + semantic-symref-current-results's defvar now that it refers to that var. + (semantic-symref-auto-expand-results) + (semantic-symref-results-summary-function) + (semantic-symref-results-mode-hook): Remove redundant :group arg. + (semantic-symref, semantic-symref-symbol, semantic-symref-regexp): + Initialize directly in the let. + 2013-09-13 Glenn Morris * semantic/ia.el (semantic-ia-complete-symbol-menu): === modified file 'lisp/cedet/semantic/symref/list.el' --- lisp/cedet/semantic/symref/list.el 2013-05-15 23:55:41 +0000 +++ lisp/cedet/semantic/symref/list.el 2013-09-17 15:50:33 +0000 @@ -48,18 +48,18 @@ Display the references in `semantic-symref-results-mode'." (interactive) (semantic-fetch-tags) - (let ((ct (semantic-current-tag)) - (res nil) - ) + (let ((ct (semantic-current-tag))) ;; Must have a tag... (when (not ct) (error "Place cursor inside tag to be searched for")) ;; Check w/ user. - (when (not (y-or-n-p (format "Find references for %s? " (semantic-tag-name ct)))) + (when (not (y-or-n-p (format "Find references for %s? " + (semantic-tag-name ct)))) (error "Quit")) ;; Gather results and tags (message "Gathering References...") - (setq res (semantic-symref-find-references-by-name (semantic-tag-name ct))) - (semantic-symref-produce-list-on-results res (semantic-tag-name ct)))) + (let* ((name (semantic-tag-name ct)) + (res (semantic-symref-find-references-by-name name))) + (semantic-symref-produce-list-on-results res name)))) ;;;###autoload (defun semantic-symref-symbol (sym) @@ -72,11 +72,9 @@ (interactive (list (semantic-tag-name (semantic-complete-read-tag-project "Symrefs for: ")))) (semantic-fetch-tags) - (let ((res nil) - ) - ;; Gather results and tags - (message "Gathering References...") - (setq res (semantic-symref-find-references-by-name sym)) + ;; Gather results and tags + (message "Gathering References...") + (let ((res (semantic-symref-find-references-by-name sym))) (semantic-symref-produce-list-on-results res sym))) ;;;###autoload @@ -90,28 +88,11 @@ (interactive (list (semantic-tag-name (semantic-complete-read-tag-buffer-deep "Symrefs for: ")))) (semantic-fetch-tags) - (let ((res nil) - ) - ;; Gather results and tags - (message "Gathering References...") - (setq res (semantic-symref-find-text sym)) + (message "Gathering References...") + ;; Gather results and tags + (let ((res (semantic-symref-find-text sym))) (semantic-symref-produce-list-on-results res sym))) - -(defun semantic-symref-produce-list-on-results (res str) - "Produce a symref list mode buffer on the results RES." - (when (not res) (error "No references found")) - (semantic-symref-result-get-tags res t) - (message "Gathering References...done") - ;; Build a references buffer. - (let ((buff (get-buffer-create - (format "*Symref %s" str))) - ) - (switch-to-buffer-other-window buff) - (set-buffer buff) - (semantic-symref-results-mode res)) - ) - ;;; RESULTS MODE ;; (defgroup semantic-symref-results-mode nil @@ -178,36 +159,35 @@ (defcustom semantic-symref-auto-expand-results nil "Non-nil to expand symref results on buffer creation." - :group 'semantic-symref-results-mode :type 'boolean) (defcustom semantic-symref-results-mode-hook nil "Hook run when `semantic-symref-results-mode' starts." - :group 'semantic-symref-results-mode :type 'hook) (defvar semantic-symref-current-results nil "The current results in a results mode buffer.") -(defun semantic-symref-results-mode (results) - ;; FIXME: Use define-derived-mode. - "Major-mode for displaying Semantic Symbol Reference RESULTS. -RESULTS is an object of class `semantic-symref-results'." - (interactive) - (kill-all-local-variables) - (setq major-mode 'semantic-symref-results-mode - mode-name "Symref" - ) - (use-local-map semantic-symref-results-mode-map) - (set (make-local-variable 'semantic-symref-current-results) - results) - (semantic-symref-results-dump results) - (goto-char (point-min)) +(defun semantic-symref-produce-list-on-results (res str) + "Produce a symref list mode buffer on the results RES." + (when (not res) (error "No references found")) + (semantic-symref-result-get-tags res t) + (message "Gathering References...done") + ;; Build a references buffer. + (let ((buff (get-buffer-create (format "*Symref %s" str)))) + (switch-to-buffer-other-window buff) + (set-buffer buff) + (semantic-symref-results-mode) + (set (make-local-variable 'semantic-symref-current-results) res) + (semantic-symref-results-dump res) + (goto-char (point-min)))) + +(define-derived-mode semantic-symref-results-mode nil "Symref" + "Major-mode for displaying Semantic Symbol Reference results." (buffer-disable-undo) + ;; FIXME: Why bother turning off font-lock? (set (make-local-variable 'font-lock-global-modes) nil) - (font-lock-mode -1) - (run-mode-hooks 'semantic-symref-results-mode-hook) - ) + (font-lock-mode -1)) (defun semantic-symref-hide-buffer () "Hide buffer with semantic-symref results." @@ -215,9 +195,8 @@ (bury-buffer)) (defcustom semantic-symref-results-summary-function 'semantic-format-tag-prototype - "*Function to use when creating items in Imenu. + "Function to use when creating items in Imenu. Some useful functions are found in `semantic-format-tag-functions'." - :group 'semantic-symref-results-mode :type semantic-format-tag-custom-list) (defun semantic-symref-results-dump (results) === modified file 'lisp/cedet/srecode/srt-mode.el' --- lisp/cedet/srecode/srt-mode.el 2013-03-21 22:11:03 +0000 +++ lisp/cedet/srecode/srt-mode.el 2013-09-17 15:50:33 +0000 @@ -188,6 +188,7 @@ ;;;###autoload (define-derived-mode srecode-template-mode fundamental-mode "SRecode" + ;; FIXME: Shouldn't it derive from prog-mode? "Major-mode for writing SRecode macros." (set (make-local-variable 'comment-start) ";;") (set (make-local-variable 'comment-end) "") ------------------------------------------------------------ revno: 114330 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15399 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-09-17 11:19:12 -0400 message: * lisp/eshell/esh-cmd.el (eshell-post-rewrite-command-function): New var. (eshell-post-rewrite-command-hook): Make obsolete. (eshell-parse-command): Simplify. (eshell-structure-basic-command): Remove unused arg `vocal-test'. (eshell--cmd): Declare. (eshell-parse-pipeline): Remove unused var `final-p'. Pass a dynvar to eshell-post-rewrite-command-hook. Implement the new eshell-post-rewrite-command-function. (eshell-invoke-directly): Remove unused arg `input'. * lisp/eshell/esh-io.el (eshell-io-initialize): Use eshell-post-rewrite-command-function. (eshell--apply-redirections): Rename from eshell-apply-redirections; adjust to new calling convention. (eshell-create-handles): Rename args to avoid clashing with dynvar `standard-output'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-17 07:47:51 +0000 +++ lisp/ChangeLog 2013-09-17 15:19:12 +0000 @@ -1,3 +1,21 @@ +2013-09-17 Stefan Monnier + + * eshell/esh-cmd.el (eshell-post-rewrite-command-function): New var. + (eshell-post-rewrite-command-hook): Make obsolete. + (eshell-parse-command): Simplify. + (eshell-structure-basic-command): Remove unused arg `vocal-test'. + (eshell--cmd): Declare. + (eshell-parse-pipeline): Remove unused var `final-p'. + Pass a dynvar to eshell-post-rewrite-command-hook. + Implement the new eshell-post-rewrite-command-function. + (eshell-invoke-directly): Remove unused arg `input'. + * eshell/esh-io.el (eshell-io-initialize): + Use eshell-post-rewrite-command-function (bug#15399). + (eshell--apply-redirections): Rename from eshell-apply-redirections; + adjust to new calling convention. + (eshell-create-handles): Rename args to avoid clashing with dynvar + `standard-output'. + 2013-09-17 Glenn Morris * simple.el (messages-buffer-mode): New major mode. === modified file 'lisp/eshell/esh-cmd.el' --- lisp/eshell/esh-cmd.el 2013-09-15 00:10:45 +0000 +++ lisp/eshell/esh-cmd.el 2013-09-17 15:19:12 +0000 @@ -205,12 +205,16 @@ :type 'hook :group 'eshell-cmd) -(defcustom eshell-post-rewrite-command-hook nil +(defvar eshell-post-rewrite-command-function #'identity + "Function run after command rewriting is finished. +Takes the (rewritten) command, modifies it as it sees fit and returns +the new result to use instead.") +(defvar eshell-post-rewrite-command-hook nil "A hook run after command rewriting is finished. Each function is passed the symbol containing the rewritten command, -which may be modified directly. Any return value is ignored." - :type 'hook - :group 'eshell-cmd) +which may be modified directly. Any return value is ignored.") +(make-obsolete-variable 'eshell-post-rewrite-command-hook + 'eshell-post-rewrite-command-function "24.4") (defcustom eshell-complex-commands '("ls") "A list of commands names or functions, that determine complexity. @@ -335,10 +339,10 @@ ;; Command parsing -(defun eshell-parse-command (command &optional args top-level) +(defun eshell-parse-command (command &optional args toplevel) "Parse the COMMAND, adding ARGS if given. COMMAND can either be a string, or a cons cell demarcating a buffer -region. TOP-LEVEL, if non-nil, means that the outermost command (the +region. TOPLEVEL, if non-nil, means that the outermost command (the user's input command) is being parsed, and that pre and post command hooks should be run before and after the command." (let* (sep-terms @@ -363,7 +367,7 @@ (setq cmd (if (or (not (car sep-terms)) (string= (car sep-terms) ";")) - (eshell-parse-pipeline cmd (not (car sep-terms))) + (eshell-parse-pipeline cmd) `(eshell-do-subjob (list ,(eshell-parse-pipeline cmd))))) (setq sep-terms (cdr sep-terms)) @@ -376,17 +380,12 @@ (if (cdr cmd) (setcar cmd `(eshell-commands ,(car cmd)))) (setq cmd (cdr cmd)))) - (setq commands - `(progn - ,@(if top-level - '((run-hooks 'eshell-pre-command-hook))) - ,@(if (not top-level) - commands - `((catch 'top-level (progn ,@commands)) - (run-hooks 'eshell-post-command-hook))))) - (if top-level - `(eshell-commands ,commands) - commands))) + (if toplevel + `(eshell-commands (progn + (run-hooks 'eshell-pre-command-hook) + (catch 'top-level (progn ,@commands)) + (run-hooks 'eshell-post-command-hook))) + (macroexp-progn commands)))) (defun eshell-debug-command (tag subform) "Output a debugging message to '*eshell last cmd*'." @@ -509,14 +508,11 @@ (list 'quote eshell-last-command-result)))))) (defun eshell-structure-basic-command (func names keyword test body - &optional else vocal-test) + &optional else) "With TERMS, KEYWORD, and two NAMES, structure a basic command. The first of NAMES should be the positive form, and the second the negative. It's not likely that users should ever need to call this -function. - -If VOCAL-TEST is non-nil, it means output from the test should be -shown, as well as output from the body." +function." ;; If the test form begins with `eshell-convert', it means ;; something data-wise will be returned, and we should let ;; that determine the truth of the statement. @@ -586,7 +582,9 @@ eshell-last-command-result (= eshell-last-command-status 0))) -(defun eshell-parse-pipeline (terms &optional final-p) +(defvar eshell--cmd) + +(defun eshell-parse-pipeline (terms) "Parse a pipeline from TERMS, return the appropriate Lisp forms." (let* (sep-terms (bigpieces (eshell-separate-commands terms "\\(&&\\|||\\)" @@ -603,8 +601,11 @@ (run-hook-with-args 'eshell-pre-rewrite-command-hook cmd) (setq cmd (run-hook-with-args-until-success 'eshell-rewrite-command-hook cmd)) - (run-hook-with-args 'eshell-post-rewrite-command-hook 'cmd) - (setcar p cmd)) + (let ((eshell--cmd cmd)) + (run-hook-with-args 'eshell-post-rewrite-command-hook + 'eshell--cmd) + (setq cmd eshell--cmd)) + (setcar p (funcall eshell-post-rewrite-command-function cmd))) (setq p (cdr p))) (nconc results (list @@ -625,8 +626,7 @@ (setq final (eshell-structure-basic-command 'if (string= (car sep-terms) "&&") "if" `(eshell-protect ,(car results)) - `(eshell-protect ,final) - nil t) + `(eshell-protect ,final)) results (cdr results) sep-terms (cdr sep-terms))) final)) @@ -916,7 +916,7 @@ "Completion for the `debug' command." (while (pcomplete-here '("errors" "commands")))) -(defun eshell-invoke-directly (command input) +(defun eshell-invoke-directly (command) (let ((base (cadr (nth 2 (nth 2 (cadr command))))) name) (if (and (eq (car base) 'eshell-trap-errors) (eq (car (cadr base)) 'eshell-named-command)) === modified file 'lisp/eshell/esh-io.el' --- lisp/eshell/esh-io.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/esh-io.el 2013-09-17 15:19:12 +0000 @@ -179,8 +179,8 @@ (make-local-variable 'eshell-current-redirections) (add-hook 'eshell-pre-rewrite-command-hook 'eshell-strip-redirections nil t) - (add-hook 'eshell-post-rewrite-command-hook - 'eshell-apply-redirections nil t)) + (add-function :filter-return (local 'eshell-post-rewrite-command-function) + #'eshell--apply-redirections)) (defun eshell-parse-redirection () "Parse an output redirection, such as '2>'." @@ -223,28 +223,27 @@ (setq eshell-current-redirections (cdr eshell-current-redirections)))) -(defun eshell-apply-redirections (cmdsym) +(defun eshell--apply-redirections (cmd) "Apply any redirection which were specified for COMMAND." (if eshell-current-redirections - (set cmdsym - (append (list 'progn) - eshell-current-redirections - (list (symbol-value cmdsym)))))) + `(progn + ,@eshell-current-redirections + ,cmd) + cmd)) (defun eshell-create-handles - (standard-output output-mode &optional standard-error error-mode) + (stdout output-mode &optional stderr error-mode) "Create a new set of file handles for a command. The default location for standard output and standard error will go to -STANDARD-OUTPUT and STANDARD-ERROR, respectively. +STDOUT and STDERR, respectively. OUTPUT-MODE and ERROR-MODE are either `overwrite', `append' or `insert'; a nil value of mode defaults to `insert'." (let ((handles (make-vector eshell-number-of-handles nil)) - (output-target (eshell-get-target standard-output output-mode)) - (error-target (eshell-get-target standard-error error-mode))) + (output-target (eshell-get-target stdout output-mode)) + (error-target (eshell-get-target stderr error-mode))) (aset handles eshell-output-handle (cons output-target 1)) - (if standard-error - (aset handles eshell-error-handle (cons error-target 1)) - (aset handles eshell-error-handle (cons output-target 1))) + (aset handles eshell-error-handle + (cons (if stderr error-target output-target) 1)) handles)) (defun eshell-protect-handles (handles) === modified file 'lisp/eshell/esh-mode.el' --- lisp/eshell/esh-mode.el 2013-09-12 20:15:53 +0000 +++ lisp/eshell/esh-mode.el 2013-09-17 15:19:12 +0000 @@ -671,7 +671,7 @@ (run-hooks 'eshell-input-filter-functions) (and (catch 'eshell-terminal (ignore - (if (eshell-invoke-directly cmd input) + (if (eshell-invoke-directly cmd) (eval cmd) (eshell-eval-command cmd input)))) (eshell-life-is-too-much))))) ------------------------------------------------------------ revno: 114329 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2013-09-17 14:08:24 +0000 message: gnus-int.el (gnus-open-server): Silence compiler diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-17 10:21:24 +0000 +++ lisp/gnus/ChangeLog 2013-09-17 14:08:24 +0000 @@ -1,5 +1,7 @@ 2013-09-17 Katsumi Yamaoka + * gnus-int.el (gnus-open-server): Silence compiler. + * mm-decode.el (mm-add-meta-html-tag): Fix regexp matching meta tag. * message.el (message-display-completion-list): Abolish. === modified file 'lisp/gnus/gnus-int.el' --- lisp/gnus/gnus-int.el 2013-08-05 14:15:37 +0000 +++ lisp/gnus/gnus-int.el 2013-09-17 14:08:24 +0000 @@ -302,7 +302,7 @@ (setcar (cdr elem) (cond (result - (if (eq open-server-function #'nnagent-open-server) + (if (eq open-server-function 'nnagent-open-server) ;; The agent's backend has a "special" status 'offline 'ok)) ------------------------------------------------------------ revno: 114328 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-17 16:59:45 +0400 message: * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function. (x_icon_type): Remove prototype. (x_bitmap_icon) [!HAVE_NS]: Declare as such. * frame.c (x_icon_type): Remove. * w32term.c (x_make_frame_visible, x_iconify_frame): * xterm.c (x_make_frame_visible, x_iconify_frame): Use x_set_bitmap_icon to factor out common code. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-17 12:27:21 +0000 +++ src/ChangeLog 2013-09-17 12:59:45 +0000 @@ -1,5 +1,15 @@ 2013-09-17 Dmitry Antipov + * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function. + (x_icon_type): Remove prototype. + (x_bitmap_icon) [!HAVE_NS]: Declare as such. + * frame.c (x_icon_type): Remove. + * w32term.c (x_make_frame_visible, x_iconify_frame): + * xterm.c (x_make_frame_visible, x_iconify_frame): + Use x_set_bitmap_icon to factor out common code. + +2013-09-17 Dmitry Antipov + * dispextern.h (check_x_display_info, x_get_string_resource): Declare here just once and unify the latter. * frame.c (check_x_display_info, x_get_string_resource): === modified file 'src/frame.c' --- src/frame.c 2013-09-17 12:27:21 +0000 +++ src/frame.c 2013-09-17 12:59:45 +0000 @@ -3381,22 +3381,6 @@ XWINDOW (FRAME_SELECTED_WINDOW (f))->cursor.x = 0; } - - -/* Return non-nil if frame F wants a bitmap icon. */ - -Lisp_Object -x_icon_type (struct frame *f) -{ - Lisp_Object tem; - - tem = assq_no_quit (Qicon_type, f->param_alist); - if (CONSP (tem)) - return XCDR (tem); - else - return Qnil; -} - void x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval) { === modified file 'src/frame.h' --- src/frame.h 2013-09-16 07:27:51 +0000 +++ src/frame.h 2013-09-17 12:59:45 +0000 @@ -1230,8 +1230,6 @@ extern void x_set_scroll_bar_width (struct frame *, Lisp_Object, Lisp_Object); -extern Lisp_Object x_icon_type (struct frame *); - extern long x_figure_window_size (struct frame *, Lisp_Object, bool); extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object); @@ -1260,7 +1258,6 @@ Lisp_Object oldval); extern void x_activate_menubar (struct frame *); extern void x_real_positions (struct frame *, int *, int *); -extern int x_bitmap_icon (struct frame *, Lisp_Object); extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); @@ -1279,8 +1276,24 @@ extern void x_query_color (struct frame *f, XColor *); extern void x_focus_frame (struct frame *); +#ifndef HAVE_NS + +extern int x_bitmap_icon (struct frame *, Lisp_Object); + +/* Set F's bitmap icon, if specified among F's parameters. */ + +FRAME_INLINE void +x_set_bitmap_icon (struct frame *f) +{ + Lisp_Object obj = assq_no_quit (Qicon_type, f->param_alist); + + if (CONSP (obj)) + x_bitmap_icon (f, XCDR (obj)); +} + +#endif /* !HAVE_NS */ + #endif /* HAVE_WINDOW_SYSTEM */ - FRAME_INLINE void flush_frame (struct frame *f) === modified file 'src/w32term.c' --- src/w32term.c 2013-09-17 08:24:20 +0000 +++ src/w32term.c 2013-09-17 12:59:45 +0000 @@ -5915,13 +5915,9 @@ void x_make_frame_visible (struct frame *f) { - Lisp_Object type; - block_input (); - type = x_icon_type (f); - if (!NILP (type)) - x_bitmap_icon (f, type); + x_set_bitmap_icon (f); if (! FRAME_VISIBLE_P (f)) { @@ -6031,8 +6027,6 @@ void x_iconify_frame (struct frame *f) { - Lisp_Object type; - /* Don't keep the highlight on an invisible frame. */ if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f) FRAME_DISPLAY_INFO (f)->x_highlight_frame = 0; @@ -6042,9 +6036,7 @@ block_input (); - type = x_icon_type (f); - if (!NILP (type)) - x_bitmap_icon (f, type); + x_set_bitmap_icon (f); /* Simulate the user minimizing the frame. */ SendMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0); === modified file 'src/xterm.c' --- src/xterm.c 2013-09-17 08:24:20 +0000 +++ src/xterm.c 2013-09-17 12:59:45 +0000 @@ -9008,7 +9008,6 @@ void x_make_frame_visible (struct frame *f) { - Lisp_Object type; int original_top, original_left; int retry_count = 2; @@ -9016,9 +9015,7 @@ block_input (); - type = x_icon_type (f); - if (!NILP (type)) - x_bitmap_icon (f, type); + x_set_bitmap_icon (f); if (! FRAME_VISIBLE_P (f)) { @@ -9225,7 +9222,6 @@ #ifdef USE_X_TOOLKIT int result; #endif - Lisp_Object type; /* Don't keep the highlight on an invisible frame. */ if (FRAME_DISPLAY_INFO (f)->x_highlight_frame == f) @@ -9236,9 +9232,7 @@ block_input (); - type = x_icon_type (f); - if (!NILP (type)) - x_bitmap_icon (f, type); + x_set_bitmap_icon (f); #if defined (USE_GTK) if (FRAME_GTK_OUTER_WIDGET (f)) ------------------------------------------------------------ revno: 114327 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-17 16:27:21 +0400 message: * dispextern.h (check_x_display_info, x_get_string_resource): Declare here just once and unify the latter. * frame.c (check_x_display_info, x_get_string_resource): * nsterm.h (check_x_display_info): * xrdb.c (x_get_string_resource): * xterm.h (check_x_display_info): Remove prototypes. * nsfns.m (x_get_string_resource): Likewise. Adjust definition. * w32reg.c (x_get_string_resource): Likewise. (w32_get_rdb_resource): Adjust user. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-17 08:24:20 +0000 +++ src/ChangeLog 2013-09-17 12:27:21 +0000 @@ -1,5 +1,17 @@ 2013-09-17 Dmitry Antipov + * dispextern.h (check_x_display_info, x_get_string_resource): + Declare here just once and unify the latter. + * frame.c (check_x_display_info, x_get_string_resource): + * nsterm.h (check_x_display_info): + * xrdb.c (x_get_string_resource): + * xterm.h (check_x_display_info): Remove prototypes. + * nsfns.m (x_get_string_resource): Likewise. Adjust definition. + * w32reg.c (x_get_string_resource): Likewise. + (w32_get_rdb_resource): Adjust user. + +2013-09-17 Dmitry Antipov + * xterm.h (struct x_display_info): New member x_pending_autoraise_frame, going to replace... * xterm.c (pending_autoraise_frame): ...static variable. === modified file 'src/dispextern.h' --- src/dispextern.h 2013-09-09 12:15:45 +0000 +++ src/dispextern.h 2013-09-17 12:27:21 +0000 @@ -61,6 +61,7 @@ } #ifdef HAVE_X_WINDOWS +#include /* for XrmDatabase */ typedef struct x_display_info Display_Info; typedef XImage * XImagePtr; typedef XImagePtr XImagePtr_or_DC; @@ -3530,6 +3531,7 @@ RES_TYPE_BOOLEAN_NUMBER }; +extern Display_Info *check_x_display_info (Lisp_Object); extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object, Lisp_Object, const char *, const char *class, enum resource_types); @@ -3541,6 +3543,8 @@ Lisp_Object, Lisp_Object, const char *, const char *, enum resource_types); +extern char *x_get_string_resource (XrmDatabase, const char *, + const char *); #endif /* HAVE_WINDOW_SYSTEM */ === modified file 'src/frame.c' --- src/frame.c 2013-09-15 08:28:30 +0000 +++ src/frame.c 2013-09-17 12:27:21 +0000 @@ -3520,11 +3520,6 @@ } } - -extern char *x_get_string_resource (XrmDatabase, const char *, const char *); -extern Display_Info *check_x_display_info (Lisp_Object); - - /* Get specified attribute from resource database RDB. See Fx_get_resource below for other parameters. */ === modified file 'src/nsfns.m' --- src/nsfns.m 2013-09-15 19:43:32 +0000 +++ src/nsfns.m 2013-09-17 12:27:21 +0000 @@ -2211,17 +2211,13 @@ wid - 1) / wid; } - -extern const char *x_get_string_resource (XrmDatabase, char *, char *); - - /* terms impl this instead of x-get-resource directly */ -const char * -x_get_string_resource (XrmDatabase rdb, char *name, char *class) +char * +x_get_string_resource (XrmDatabase rdb, const char *name, const char *class) { /* remove appname prefix; TODO: allow for !="Emacs" */ - char *toCheck = class + (!strncmp (class, "Emacs.", 6) ? 6 : 0); - const char *res; + const char *res, *toCheck = class + (!strncmp (class, "Emacs.", 6) ? 6 : 0); + check_window_system (NULL); if (inhibit_x_resources) @@ -2229,9 +2225,9 @@ return NULL; res = ns_get_defaults_value (toCheck); - return !res ? NULL : - (!c_strncasecmp (res, "YES", 3) ? "true" : - (!c_strncasecmp (res, "NO", 2) ? "false" : res)); + return (!res ? NULL : + (!c_strncasecmp (res, "YES", 3) ? "true" : + (!c_strncasecmp (res, "NO", 2) ? "false" : (char *) res))); } === modified file 'src/nsterm.h' --- src/nsterm.h 2013-09-15 17:58:46 +0000 +++ src/nsterm.h 2013-09-17 12:27:21 +0000 @@ -605,8 +605,6 @@ extern Lisp_Object ns_display_name_list; extern struct ns_display_info *ns_display_info_for_name (Lisp_Object name); -struct ns_display_info *check_x_display_info (Lisp_Object frame); - struct ns_output { #ifdef __OBJC__ === modified file 'src/w32reg.c' --- src/w32reg.c 2013-01-01 09:11:05 +0000 +++ src/w32reg.c 2013-09-17 12:27:21 +0000 @@ -56,7 +56,7 @@ */ static char * -w32_get_rdb_resource (char *rdb, char *resource) +w32_get_rdb_resource (char *rdb, const char *resource) { char *value = rdb; int len = strlen (resource); @@ -141,7 +141,7 @@ database RDB. */ char * -x_get_string_resource (XrmDatabase rdb, char *name, char *class) +x_get_string_resource (XrmDatabase rdb, const char *name, const char *class) { if (rdb) { === modified file 'src/xrdb.c' --- src/xrdb.c 2013-08-11 01:30:20 +0000 +++ src/xrdb.c 2013-09-17 12:27:21 +0000 @@ -48,10 +48,6 @@ #include "keyboard.h" #endif -char *x_get_string_resource (XrmDatabase rdb, const char *name, - const char *class); - - /* X file search path processing. */ === modified file 'src/xterm.h' --- src/xterm.h 2013-09-17 08:24:20 +0000 +++ src/xterm.h 2013-09-17 12:27:21 +0000 @@ -975,7 +975,6 @@ /* Defined in xfns.c */ -extern struct x_display_info * check_x_display_info (Lisp_Object); extern Lisp_Object x_get_focus_frame (struct frame *); #ifdef USE_GTK ------------------------------------------------------------ revno: 114326 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2013-09-17 10:21:24 +0000 message: lisp/gnus/mm-decode.el (mm-add-meta-html-tag): Fix regexp matching meta tag diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-17 09:24:02 +0000 +++ lisp/gnus/ChangeLog 2013-09-17 10:21:24 +0000 @@ -1,5 +1,7 @@ 2013-09-17 Katsumi Yamaoka + * mm-decode.el (mm-add-meta-html-tag): Fix regexp matching meta tag. + * message.el (message-display-completion-list): Abolish. (message-completion-in-region): Use display-completion-list. === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2013-08-28 08:38:28 +0000 +++ lisp/gnus/mm-decode.el 2013-09-17 10:21:24 +0000 @@ -1415,7 +1415,7 @@ (goto-char (point-min)) (if (re-search-forward "\ ]*>" nil t) +text/\\(\\sw+\\)\\(?:\;\\s-*charset=\\([^\"'>]+\\)\\)?" nil t) (if (and (not force-charset) (match-beginning 2) (string-match "\\`html\\'" (match-string 1))) ------------------------------------------------------------ revno: 114325 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 06:17:44 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/config.in' --- autogen/config.in 2013-08-16 10:17:35 +0000 +++ autogen/config.in 2013-09-17 10:17:44 +0000 @@ -604,9 +604,6 @@ /* Define to 1 if you have the `gtk_window_set_has_resize_grip' function. */ #undef HAVE_GTK_WINDOW_SET_HAS_RESIZE_GRIP -/* Define to 1 if you have the `g_type_init' function. */ -#undef HAVE_G_TYPE_INIT - /* Define to 1 if netdb.h declares h_errno. */ #undef HAVE_H_ERRNO === modified file 'autogen/configure' --- autogen/configure 2013-09-16 10:17:41 +0000 +++ autogen/configure 2013-09-17 10:17:44 +0000 @@ -12114,17 +12114,6 @@ SAVE_LIBS="$LIBS" CFLAGS="$SETTINGS_CFLAGS $CFLAGS" LIBS="$SETTINGS_LIBS $LIBS" - for ac_func in g_type_init -do : - ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init" -if test "x$ac_cv_func_g_type_init" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_G_TYPE_INIT 1 -_ACEOF - -fi -done - CFLAGS="$SAVE_CFLAGS" LIBS="$SAVE_LIBS" fi ------------------------------------------------------------ revno: 114324 committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2013-09-17 09:24:02 +0000 message: message.el (message-display-completion-list): Abolish diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-17 07:47:51 +0000 +++ lisp/gnus/ChangeLog 2013-09-17 09:24:02 +0000 @@ -1,3 +1,8 @@ +2013-09-17 Katsumi Yamaoka + + * message.el (message-display-completion-list): Abolish. + (message-completion-in-region): Use display-completion-list. + 2013-09-17 Glenn Morris * gnus-util.el (gnus-message-with-timestamp-1): === modified file 'lisp/gnus/message.el' --- lisp/gnus/message.el 2013-09-16 23:22:02 +0000 +++ lisp/gnus/message.el 2013-09-17 09:24:02 +0000 @@ -7947,17 +7947,6 @@ ;; falling back to message-tab-body-function. (lambda () (funcall fun) 'completion-attempted))))) -(eval-and-compile - (condition-case nil - (with-temp-buffer - (let ((standard-output (current-buffer))) - (eval '(display-completion-list nil ""))) - (defalias 'message-display-completion-list 'display-completion-list)) - (error ;; Don't use `wrong-number-of-arguments' here because of XEmacs. - (defun message-display-completion-list (completions &optional ignore) - "Display the list of completions, COMPLETIONS, using `standard-output'." - (display-completion-list completions))))) - (defun message-expand-group () "Expand the group name under point." (let ((b (save-excursion @@ -8012,8 +8001,7 @@ (let ((buffer-read-only nil)) (erase-buffer) (let ((standard-output (current-buffer))) - (message-display-completion-list (sort completions 'string<) - string)) + (display-completion-list (sort completions 'string<))) (setq buffer-read-only nil) (goto-char (point-min)) (delete-region (point) ------------------------------------------------------------ revno: 114323 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-17 12:24:20 +0400 message: * xterm.h (struct x_display_info): New member x_pending_autoraise_frame, going to replace... * xterm.c (pending_autoraise_frame): ...static variable. (x_new_focus_frame, XTread_socket): Adjust users. * w32term.h (struct w32_display_info): New member w32_pending_autoraise_frame, going to replace... * w32term.c (pending_autoraise_frame): ...global variable. (x_new_focus_frame, w32_read_socket): Adjust users. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-17 07:39:54 +0000 +++ src/ChangeLog 2013-09-17 08:24:20 +0000 @@ -1,3 +1,14 @@ +2013-09-17 Dmitry Antipov + + * xterm.h (struct x_display_info): New member + x_pending_autoraise_frame, going to replace... + * xterm.c (pending_autoraise_frame): ...static variable. + (x_new_focus_frame, XTread_socket): Adjust users. + * w32term.h (struct w32_display_info): New member + w32_pending_autoraise_frame, going to replace... + * w32term.c (pending_autoraise_frame): ...global variable. + (x_new_focus_frame, w32_read_socket): Adjust users. + 2013-09-17 Glenn Morris * xdisp.c (message_dolog): If we create *Messages*, === modified file 'src/w32term.c' --- src/w32term.c 2013-09-15 08:28:30 +0000 +++ src/w32term.c 2013-09-17 08:24:20 +0000 @@ -149,9 +149,6 @@ #define SM_CYVIRTUALSCREEN 79 #endif -/* This is a frame waiting to be autoraised, within w32_read_socket. */ -struct frame *pending_autoraise_frame; - /* The handle of the frame that currently owns the system caret. */ HWND w32_system_caret_hwnd; int w32_system_caret_height; @@ -2823,9 +2820,9 @@ x_lower_frame (old_focus); if (dpyinfo->w32_focus_frame && dpyinfo->w32_focus_frame->auto_raise) - pending_autoraise_frame = dpyinfo->w32_focus_frame; + dpyinfo->w32_pending_autoraise_frame = dpyinfo->w32_focus_frame; else - pending_autoraise_frame = 0; + dpyinfo->w32_pending_autoraise_frame = NULL; } x_frame_rehighlight (dpyinfo); @@ -4981,12 +4978,11 @@ } /* If the focus was just given to an autoraising frame, - raise it now. */ - /* ??? This ought to be able to handle more than one such frame. */ - if (pending_autoraise_frame) + raise it now. FIXME: handle more than one such frame. */ + if (dpyinfo->w32_pending_autoraise_frame) { - x_raise_frame (pending_autoraise_frame); - pending_autoraise_frame = 0; + x_raise_frame (dpyinfo->w32_pending_autoraise_frame); + dpyinfo->w32_pending_autoraise_frame = NULL; } /* Check which frames are still visible, if we have enqueued any user === modified file 'src/w32term.h' --- src/w32term.h 2013-09-15 08:28:30 +0000 +++ src/w32term.h 2013-09-17 08:24:20 +0000 @@ -179,6 +179,9 @@ frame. It differs from w32_focus_frame when we're using a global minibuffer. */ struct frame *x_highlight_frame; + + /* The frame waiting to be auto-raised in w32_read_socket. */ + struct frame *w32_pending_autoraise_frame; }; /* This is a chain of structures for all the displays currently in use. */ === modified file 'src/xterm.c' --- src/xterm.c 2013-09-17 07:36:35 +0000 +++ src/xterm.c 2013-09-17 08:24:20 +0000 @@ -155,10 +155,6 @@ Lisp_Object x_display_name_list; -/* This is a frame waiting to be auto-raised, within XTread_socket. */ - -static struct frame *pending_autoraise_frame; - #ifdef USE_X_TOOLKIT /* The application context for Xt use. */ @@ -3299,9 +3295,9 @@ x_lower_frame (old_focus); if (dpyinfo->x_focus_frame && dpyinfo->x_focus_frame->auto_raise) - pending_autoraise_frame = dpyinfo->x_focus_frame; + dpyinfo->x_pending_autoraise_frame = dpyinfo->x_focus_frame; else - pending_autoraise_frame = 0; + dpyinfo->x_pending_autoraise_frame = NULL; } x_frame_rehighlight (dpyinfo); @@ -7088,6 +7084,7 @@ { int count = 0; int event_found = 0; + struct x_display_info *dpyinfo = terminal->display_info.x; block_input (); @@ -7095,36 +7092,33 @@ input_signal_count++; /* For debugging, this gives a way to fake an I/O error. */ - if (terminal->display_info.x == XTread_socket_fake_io_error) + if (dpyinfo == XTread_socket_fake_io_error) { XTread_socket_fake_io_error = 0; - x_io_error_quitter (terminal->display_info.x->display); + x_io_error_quitter (dpyinfo->display); } #ifndef USE_GTK - while (XPending (terminal->display_info.x->display)) + while (XPending (dpyinfo->display)) { int finish; XEvent event; - XNextEvent (terminal->display_info.x->display, &event); + XNextEvent (dpyinfo->display, &event); #ifdef HAVE_X_I18N /* Filter events for the current X input method. */ - if (x_filter_event (terminal->display_info.x, &event)) + if (x_filter_event (dpyinfo, &event)) continue; #endif event_found = 1; - count += handle_one_xevent (terminal->display_info.x, - &event, &finish, hold_quit); + count += handle_one_xevent (dpyinfo, &event, &finish, hold_quit); if (finish == X_EVENT_GOTO_OUT) - goto out; + break; } - out:; - #else /* USE_GTK */ /* For GTK we must use the GTK event loop. But XEvents gets passed @@ -7174,12 +7168,11 @@ } /* If the focus was just given to an auto-raising frame, - raise it now. */ - /* ??? This ought to be able to handle more than one such frame. */ - if (pending_autoraise_frame) + raise it now. FIXME: handle more than one such frame. */ + if (dpyinfo->x_pending_autoraise_frame) { - x_raise_frame (pending_autoraise_frame); - pending_autoraise_frame = 0; + x_raise_frame (dpyinfo->x_pending_autoraise_frame); + dpyinfo->x_pending_autoraise_frame = NULL; } unblock_input (); @@ -10651,8 +10644,6 @@ #endif #endif - pending_autoraise_frame = 0; - /* Note that there is no real way portable across R3/R4 to get the original error handler. */ XSetErrorHandler (x_error_handler); === modified file 'src/xterm.h' --- src/xterm.h 2013-09-17 07:06:42 +0000 +++ src/xterm.h 2013-09-17 08:24:20 +0000 @@ -302,6 +302,9 @@ minibuffer. */ struct frame *x_highlight_frame; + /* The frame waiting to be auto-raised in XTread_socket. */ + struct frame *x_pending_autoraise_frame; + /* Time of last user interaction as returned in X events on this display. */ Time last_user_time; ------------------------------------------------------------ revno: 114322 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 00:47:51 -0700 message: Fix ChangeLog typos diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-17 07:39:54 +0000 +++ lisp/ChangeLog 2013-09-17 07:47:51 +0000 @@ -4,10 +4,10 @@ (messages-buffer): New function. * startup.el (normal-top-level): Switch mode of *Messages* buffer. * emacs-lisp/ert.el (ert--force-message-log-buffer-truncation) - (ert-run-test): Use `message-buffer' function. + (ert-run-test): Use `messages-buffer' function. (ert--force-message-log-buffer-truncation): Ignore read-only. - * help.el (view-echo-area-messages): Use `message-buffer' function. - * mail/emacsbug.el (report-emacs-bug): Use `message-buffer' function. + * help.el (view-echo-area-messages): Use `messages-buffer' function. + * mail/emacsbug.el (report-emacs-bug): Use `messages-buffer' function. 2013-09-17 Stefan Monnier === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-17 07:39:54 +0000 +++ lisp/gnus/ChangeLog 2013-09-17 07:47:51 +0000 @@ -1,7 +1,7 @@ 2013-09-17 Glenn Morris * gnus-util.el (gnus-message-with-timestamp-1): - Use `message-buffer' function if available. Ignore read-only. + Use `messages-buffer' function if available. Ignore read-only. 2013-09-16 Katsumi Yamaoka ------------------------------------------------------------ revno: 114321 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 00:45:18 -0700 message: ChangeLog whitespace fixes diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-09-17 07:31:09 +0000 +++ lisp/cedet/ChangeLog 2013-09-17 07:45:18 +0000 @@ -22,7 +22,7 @@ * semantic/fw.el (semantic-make-local-hook): Simplify by dropping Emacs <= 20. -2013-07-29 David Engster +2013-07-29 David Engster * lisp/cedet/cedet.el (cedet-packages): Remove speedbar since its development does no longer happens in CEDET upstream but in Emacs @@ -39,13 +39,13 @@ * semantic/wisent/python.el (semantic/format): New require. -2013-07-27 Eric Ludlam +2013-07-27 Eric Ludlam * lisp/cedet/semantic/edit.el (semantic-edits-splice-remove): Wrap debug message removing middle tag in semantic-edits-verbose-flag check. -2013-07-27 David Engster +2013-07-27 David Engster * semantic/bovine/el.el (semantic/db-el): New require. ------------------------------------------------------------ revno: 114320 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 00:43:14 -0700 message: Commentary update diff: === modified file 'lisp/ls-lisp.el' --- lisp/ls-lisp.el 2013-09-13 14:56:03 +0000 +++ lisp/ls-lisp.el 2013-09-17 07:43:14 +0000 @@ -27,11 +27,9 @@ ;; OVERVIEW ========================================================== -;; This file redefines the function `insert-directory' to implement it -;; directly from Emacs lisp, without running ls in a subprocess. It -;; is useful if you cannot afford to fork Emacs on a real memory UNIX, -;; or other non-UNIX platforms if you don't have the ls -;; program, or if you want a different format from what ls offers. +;; This file advises the function `insert-directory' to implement it +;; directly from Emacs lisp, without running ls in a subprocess. +;; This is useful if you don't have ls installed (ie, on MS Windows). ;; This function can use regexps instead of shell wildcards. If you ;; enter regexps remember to double each $ sign. For example, to ------------------------------------------------------------ revno: 114319 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 00:39:54 -0700 message: Add a major-mode for the *Messages* buffer Ref: http://lists.gnu.org/archive/html/emacs-devel/2010-02/msg00135.html * lisp/simple.el (messages-buffer-mode): New major mode. (messages-buffer): New function. * lisp/startup.el (normal-top-level): Switch mode of *Messages* buffer. * src/xdisp.c (message_dolog): If we create *Messages*, switch it to messages-buffer-mode. * lisp/emacs-lisp/ert.el (ert--force-message-log-buffer-truncation) (ert-run-test): Use `message-buffer' function. (ert--force-message-log-buffer-truncation): Ignore read-only. * lisp/help.el (view-echo-area-messages): Use `message-buffer' function. * lisp/mail/emacsbug.el (report-emacs-bug): Use `message-buffer' function. * lisp/gnus/gnus-util.el (gnus-message-with-timestamp-1): Use `message-buffer' function if available. Ignore read-only. * etc/NEWS: Mention this. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-09-15 17:58:46 +0000 +++ etc/NEWS 2013-09-17 07:39:54 +0000 @@ -93,6 +93,10 @@ ** `initial-buffer-choice' can now specify a function to set up the initial buffer. +** The *Messages* buffer is created in a new major mode `messages-buffer-mode', +and read-only. Code that might create the *Messages* buffer should +call the function `messages-buffer' to do so and set the mode. + ** `remember-notes' creates a buffer whose content is saved on kill-emacs. You may think of it as a *scratch* buffer whose content is preserved. In fact, it was designed as a replacement for *scratch* buffer and can === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-17 07:31:09 +0000 +++ lisp/ChangeLog 2013-09-17 07:39:54 +0000 @@ -1,3 +1,14 @@ +2013-09-17 Glenn Morris + + * simple.el (messages-buffer-mode): New major mode. + (messages-buffer): New function. + * startup.el (normal-top-level): Switch mode of *Messages* buffer. + * emacs-lisp/ert.el (ert--force-message-log-buffer-truncation) + (ert-run-test): Use `message-buffer' function. + (ert--force-message-log-buffer-truncation): Ignore read-only. + * help.el (view-echo-area-messages): Use `message-buffer' function. + * mail/emacsbug.el (report-emacs-bug): Use `message-buffer' function. + 2013-09-17 Stefan Monnier * subr.el (eval-after-load): Preserve evaluation order (bug#15389). === modified file 'lisp/emacs-lisp/ert.el' --- lisp/emacs-lisp/ert.el 2013-08-09 21:22:44 +0000 +++ lisp/emacs-lisp/ert.el 2013-09-17 07:39:54 +0000 @@ -785,7 +785,7 @@ "Immediately truncate *Messages* buffer according to `message-log-max'. This can be useful after reducing the value of `message-log-max'." - (with-current-buffer (get-buffer-create "*Messages*") + (with-current-buffer (messages-buffer) ;; This is a reimplementation of this part of message_dolog() in xdisp.c: ;; if (NATNUMP (Vmessage_log_max)) ;; { @@ -798,7 +798,8 @@ (end (save-excursion (goto-char (point-max)) (forward-line (- message-log-max)) - (point)))) + (point))) + (inhibit-read-only t)) (delete-region begin end))))) (defvar ert--running-tests nil @@ -818,7 +819,7 @@ (setf (ert-test-most-recent-result ert-test) nil) (cl-block error (let ((begin-marker - (with-current-buffer (get-buffer-create "*Messages*") + (with-current-buffer (messages-buffer) (point-max-marker)))) (unwind-protect (let ((info (make-ert--test-execution-info @@ -837,7 +838,7 @@ (ert--run-test-internal info)) (let ((result (ert--test-execution-info-result info))) (setf (ert-test-result-messages result) - (with-current-buffer (get-buffer-create "*Messages*") + (with-current-buffer (messages-buffer) (buffer-substring begin-marker (point-max)))) (ert--force-message-log-buffer-truncation) (setq should-form-accu (nreverse should-form-accu)) === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-09-16 23:22:02 +0000 +++ lisp/gnus/ChangeLog 2013-09-17 07:39:54 +0000 @@ -1,3 +1,8 @@ +2013-09-17 Glenn Morris + + * gnus-util.el (gnus-message-with-timestamp-1): + Use `message-buffer' function if available. Ignore read-only. + 2013-09-16 Katsumi Yamaoka * message.el (message-expand-group, message-completion-in-region): === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2013-08-01 03:51:41 +0000 +++ lisp/gnus/gnus-util.el 2013-09-17 07:39:54 +0000 @@ -514,11 +514,14 @@ (> message-log-max 0) (/= (length str) 0)) (setq time (current-time)) - (with-current-buffer (get-buffer-create "*Messages*") + (with-current-buffer (if (fboundp 'messages-buffer) + (messages-buffer) + (get-buffer-create "*Messages*")) (goto-char (point-max)) - (insert ,timestamp str "\n") - (forward-line (- message-log-max)) - (delete-region (point-min) (point)) + (let ((inhibit-read-only t)) + (insert ,timestamp str "\n") + (forward-line (- message-log-max)) + (delete-region (point-min) (point))) (goto-char (point-max)))) str) (gnus-add-timestamp-to-message === modified file 'lisp/help.el' --- lisp/help.el 2013-08-08 23:59:14 +0000 +++ lisp/help.el 2013-09-17 07:39:54 +0000 @@ -1,7 +1,6 @@ ;;; help.el --- help commands for Emacs -;; Copyright (C) 1985-1986, 1993-1994, 1998-2013 Free Software -;; Foundation, Inc. +;; Copyright (C) 1985-1986, 1993-1994, 1998-2013 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: help, internal @@ -412,7 +411,7 @@ The number of messages retained in that buffer is specified by the variable `message-log-max'." (interactive) - (with-current-buffer (get-buffer-create "*Messages*") + (with-current-buffer (messages-buffer) (goto-char (point-max)) (display-buffer (current-buffer)))) === modified file 'lisp/mail/emacsbug.el' --- lisp/mail/emacsbug.el 2013-02-10 01:56:25 +0000 +++ lisp/mail/emacsbug.el 2013-09-17 07:39:54 +0000 @@ -1,7 +1,7 @@ ;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list -;; Copyright (C) 1985, 1994, 1997-1998, 2000-2013 Free Software -;; Foundation, Inc. +;; Copyright (C) 1985, 1994, 1997-1998, 2000-2013 +;; Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: FSF @@ -160,7 +160,7 @@ (report-emacs-bug-can-use-osx-open))) user-point message-end-point) (setq message-end-point - (with-current-buffer (get-buffer-create "*Messages*") + (with-current-buffer (messages-buffer) (point-max-marker))) (compose-mail report-emacs-bug-address topic) ;; The rest of this does not execute if the user was asked to === modified file 'lisp/simple.el' --- lisp/simple.el 2013-09-10 17:13:48 +0000 +++ lisp/simple.el 2013-09-17 07:39:54 +0000 @@ -7344,6 +7344,18 @@ buffer-invisibility-spec) (setq buffer-invisibility-spec nil))) +(define-derived-mode messages-buffer-mode special-mode "Messages" + "Major mode used in the \"*Messages*\" buffer.") + +(defun messages-buffer () + "Return the \"*Messages*\" buffer. +If it does not exist, create and it switch it to `messages-buffer-mode'." + (or (get-buffer "*Messages*") + (with-current-buffer (get-buffer-create "*Messages*") + (messages-buffer-mode) + (current-buffer)))) + + ;; Minibuffer prompt stuff. ;;(defun minibuffer-prompt-modification (start end) === modified file 'lisp/startup.el' --- lisp/startup.el 2013-08-05 14:26:57 +0000 +++ lisp/startup.el 2013-09-17 07:39:54 +0000 @@ -1,7 +1,6 @@ ;;; startup.el --- process Emacs shell arguments -*- lexical-binding: t -*- -;; Copyright (C) 1985-1986, 1992, 1994-2013 Free Software Foundation, -;; Inc. +;; Copyright (C) 1985-1986, 1992, 1994-2013 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: internal @@ -494,6 +493,7 @@ (setq command-line-processed t) (let ((dir default-directory)) (with-current-buffer "*Messages*" + (messages-buffer-mode) ;; Make it easy to do like "tail -f". (set (make-local-variable 'window-point-insertion-type) t) ;; Give *Messages* the same default-directory as *scratch*, === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-17 07:36:35 +0000 +++ src/ChangeLog 2013-09-17 07:39:54 +0000 @@ -1,3 +1,8 @@ +2013-09-17 Glenn Morris + + * xdisp.c (message_dolog): If we create *Messages*, + switch it to messages-buffer-mode. + 2013-09-17 Paul Eggert Don't overuse 'const' in types of locals. === modified file 'src/xdisp.c' --- src/xdisp.c 2013-09-13 15:03:51 +0000 +++ src/xdisp.c 2013-09-17 07:39:54 +0000 @@ -1,7 +1,6 @@ /* Display generation from window structure and buffer text. -Copyright (C) 1985-1988, 1993-1995, 1997-2013 Free Software Foundation, -Inc. +Copyright (C) 1985-1988, 1993-1995, 1997-2013 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -9538,7 +9537,20 @@ old_deactivate_mark = Vdeactivate_mark; oldbuf = current_buffer; - Fset_buffer (Fget_buffer_create (Vmessages_buffer_name)); + + /* Ensure the Messages buffer exists, and switch to it. + If we created it, set the major-mode. */ + { + int newbuffer = 0; + if (NILP (Fget_buffer (Vmessages_buffer_name))) newbuffer = 1; + + Fset_buffer (Fget_buffer_create (Vmessages_buffer_name)); + + if (newbuffer && + !NILP (Ffboundp (intern ("messages-buffer-mode")))) + call0 (intern ("messages-buffer-mode")); + } + bset_undo_list (current_buffer, Qt); oldpoint = message_dolog_marker1; ------------------------------------------------------------ revno: 114318 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-17 11:36:35 +0400 message: * xterm.c (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-17 07:06:42 +0000 +++ src/ChangeLog 2013-09-17 07:36:35 +0000 @@ -28,6 +28,7 @@ for g_type_init. * xterm.c (handle_one_xevent): Do not call to x_clear_area if GTK >= 2.7.0. + (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC. 2013-09-16 Jan Djärv === modified file 'src/xterm.c' --- src/xterm.c 2013-09-17 07:06:42 +0000 +++ src/xterm.c 2013-09-17 07:36:35 +0000 @@ -84,7 +84,7 @@ #endif #endif -#ifdef USE_LUCID +#if defined (USE_LUCID) || defined (USE_MOTIF) #include "../lwlib/xlwmenu.h" #endif ------------------------------------------------------------ revno: 114317 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 00:31:09 -0700 message: ChangeLog whitespace fixes diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2013-09-15 17:58:46 +0000 +++ etc/ChangeLog 2013-09-17 07:31:09 +0000 @@ -724,7 +724,7 @@ * refcards/vipcard.tex, refcards/viperCard.tex: Update short copyright year to 2012. -2012-01-04 Chong Yidong +2012-01-04 Chong Yidong * org/README: Rename from COPYRIGHT-AND-LICENSE. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-17 07:26:07 +0000 +++ lisp/ChangeLog 2013-09-17 07:31:09 +0000 @@ -4144,7 +4144,7 @@ * term/xterm.el (xterm--query): Stop after first matching handler. (Bug#14615) -2013-06-14 Ivan Kanis +2013-06-14 Ivan Kanis Add support for dired in saveplace. * dired.el (dired-initial-position-hook): New variable. @@ -6754,7 +6754,7 @@ (vc-exec-after): Allow code to be a function. Use add/remove-function. (compilation-error-regexp-alist, view-old-buffer-read-only): Declare. -2013-04-19 Masatake YAMATO +2013-04-19 Masatake YAMATO * progmodes/sh-script.el (sh-imenu-generic-expression): Handle function names with a single character. (Bug#14111) === modified file 'lisp/ChangeLog.16' --- lisp/ChangeLog.16 2013-07-26 17:02:22 +0000 +++ lisp/ChangeLog.16 2013-09-17 07:31:09 +0000 @@ -7788,7 +7788,7 @@ (ruby-syntax-propertize-function): Adjust for changes in `ruby-syntax-propertize-heredoc'. -2012-08-09 Nobuyoshi Nakada +2012-08-09 Nobuyoshi Nakada * progmodes/ruby-mode.el (ruby-mode-map): Remove deprecated binding (use `M-;' instead). === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-09-13 06:37:39 +0000 +++ lisp/cedet/ChangeLog 2013-09-17 07:31:09 +0000 @@ -962,7 +962,7 @@ (semantic-gcc-setup): If the first attempt at calling cpp fails, try straight GCC. -2012-10-01 Jan Moringen +2012-10-01 Jan Moringen * semantic/idle.el (semantic-idle-breadcrumbs--display-in-header-line): ------------------------------------------------------------ revno: 114316 [merge] committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-09-17 00:26:07 -0700 message: Merge from emacs-24; up to r111406 diff: === modified file 'etc/CONTRIBUTE' --- etc/CONTRIBUTE 2013-02-16 20:24:50 +0000 +++ etc/CONTRIBUTE 2013-09-16 18:37:18 +0000 @@ -60,6 +60,11 @@ answers), at the emacs-devel@gnu.org mailing list. A copyright disclaimer is also a possibility, but we prefer an assignment. +Note that the disclaimer, like an assignment, involves you sending +signed paperwork to the FSF (simply saying "this is in the public domain" +is not enough). Also, a disclaimer cannot be applied to future work, it +has to be repeated each time you want to send something new. + We can accept small changes (roughly, fewer than 15 lines) without an assignment. This is a cumulative limit (e.g. three separate 5 line patches) over all your contributions. @@ -94,8 +99,7 @@ ** Description -For bug fixes, a description of the bug and how your patch fixes this -bug. +For bug fixes, a description of the bug and how your patch fixes it. For new features, a description of the feature and your implementation. @@ -103,7 +107,7 @@ A ChangeLog entry as plaintext (separate from the patch). -See the various ChangeLog files for format and content. Note that, +See the existing ChangeLog files for format and content. Note that, unlike some other projects, we do require ChangeLogs also for documentation, i.e. Texinfo files. @@ -112,24 +116,16 @@ ** The patch itself. -Please use "Context Diff" format. - If you are accessing the Bazaar repository, make sure your copy is up-to-date (e.g. with `bzr pull'), then use bzr diff --no-aliases --diff-options=-cp Else, use diff -cp OLD NEW -If your version of diff does not support these options, then get the -latest version of GNU Diff. - ** Mail format. -We prefer to get the patches as inline plain text. - -Please be aware of line wrapping which will make the patch unreadable -and useless for us. To avoid that, you can use MIME attachments or, -as a last resort, uuencoded gzipped text. +We prefer to get the patches as plain text, either inline (be careful +your mail client does not change line breaks) or as MIME attachments. ** Please reread your patch before submitting it. @@ -179,18 +175,12 @@ ** Document your changes. -Think carefully about whether your change requires updating the -documentation. If it does, you can either do this yourself or add an -item to the NEWS file. - -If you document your change in NEWS, please mark the NEWS entry with -the documentation status of the change: if you submit the changes for -the manuals, mark it with "+++"; if it doesn't need to be documented, -mark it with "---"; if it needs to be documented, but you didn't -submit documentation changes, leave the NEWS entry unmarked. (These -marks are checked by the Emacs maintainers to make sure every change -was reflected in the manuals.) - +Any change that matters to end-users should have a NEWS entry. + +Think about whether your change requires updating the documentation +(both manuals and doc-strings). If you know it does not, mark the NEWS +entry with "---". If you know that *all* the necessary documentation +updates have been made, mark the entry with "+++". Otherwise do not mark it. ** Understanding Emacs Internals. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-09-16 19:09:24 +0000 +++ lisp/ChangeLog 2013-09-17 07:26:07 +0000 @@ -1,3 +1,9 @@ +2013-09-17 Stefan Monnier + + * subr.el (eval-after-load): Preserve evaluation order (bug#15389). + + * abbrev.el (abbrev--check-chars): Fix thinko (bug#15329). + 2013-09-16 Stefan Monnier * icomplete.el (icomplete-in-buffer): New var. === modified file 'lisp/abbrev.el' --- lisp/abbrev.el 2013-09-06 15:37:01 +0000 +++ lisp/abbrev.el 2013-09-17 07:26:07 +0000 @@ -607,9 +607,9 @@ "Check if the characters in ABBREV have word syntax in either the current (if global is nil) or standard syntax table." (with-syntax-table - (cond ((null global) (standard-syntax-table)) + (cond ((null global) (syntax-table)) ;; ((syntax-table-p global) global) - (t (syntax-table))) + (t (standard-syntax-table))) (when (string-match "\\W" abbrev) (let ((badchars ()) (pos 0)) === modified file 'lisp/subr.el' --- lisp/subr.el 2013-09-12 06:37:02 +0000 +++ lisp/subr.el 2013-09-17 07:26:07 +0000 @@ -3878,7 +3878,7 @@ (when (equal file lfn) (remove-hook 'after-load-functions fun) (funcall func)))) - (add-hook 'after-load-functions fun))))))) + (add-hook 'after-load-functions fun 'append))))))) ;; Add FORM to the element unless it's already there. (unless (member delayed-func (cdr elt)) (nconc elt (list delayed-func))))))) ------------------------------------------------------------ revno: 114315 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-09-17 00:06:42 -0700 message: Don't overuse 'const' in types of locals. * bidi.c (bidi_count_bytes): * gtkutil.c, gtkutil.h (xg_event_is_for_menubar) (xg_event_is_for_scrollbar): * xselect.c (x_handle_property_notify) (x_handle_selection_notify, x_handle_dnd_message): * xsettings.c, xsettings.h (xft_settings_event): * xterm.c (x_handle_net_wm_state, handle_one_event) (x_menubar_window_to_frame, x_detect_focus_change) (construct_mouse_click, note_mouse_movement) (x_scroll_bar_to_input_event, x_scroll_bar_expose) (x_scroll_bar_handle_click, x_scroll_bar_note_movement) (handle_one_xevent, x_handle_net_wm_state): * xterm.h (x_handle_property_notify, x_handle_selection_notify) (x_handle_dnd_message): Avoid unnecessary 'const', typically the second 'const' in 'const foo * const arg', a 'const' that does not affect the API and doesn't significantly help the human reader. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-17 06:57:30 +0000 +++ src/ChangeLog 2013-09-17 07:06:42 +0000 @@ -1,3 +1,24 @@ +2013-09-17 Paul Eggert + + Don't overuse 'const' in types of locals. + * bidi.c (bidi_count_bytes): + * gtkutil.c, gtkutil.h (xg_event_is_for_menubar) + (xg_event_is_for_scrollbar): + * xselect.c (x_handle_property_notify) + (x_handle_selection_notify, x_handle_dnd_message): + * xsettings.c, xsettings.h (xft_settings_event): + * xterm.c (x_handle_net_wm_state, handle_one_event) + (x_menubar_window_to_frame, x_detect_focus_change) + (construct_mouse_click, note_mouse_movement) + (x_scroll_bar_to_input_event, x_scroll_bar_expose) + (x_scroll_bar_handle_click, x_scroll_bar_note_movement) + (handle_one_xevent, x_handle_net_wm_state): + * xterm.h (x_handle_property_notify, x_handle_selection_notify) + (x_handle_dnd_message): + Avoid unnecessary 'const', typically the second 'const' in + 'const foo * const arg', a 'const' that does not affect the API + and doesn't significantly help the human reader. + 2013-09-17 Dmitry Antipov * image.c (fn_g_type_init) [WINDOWSNT]: Define and load === modified file 'src/bidi.c' --- src/bidi.c 2013-08-06 06:53:09 +0000 +++ src/bidi.c 2013-09-17 07:06:42 +0000 @@ -870,8 +870,8 @@ are zero-based character positions in S, BEGBYTE is byte position corresponding to BEG. UNIBYTE means S is a unibyte string. */ static ptrdiff_t -bidi_count_bytes (const unsigned char *s, const ptrdiff_t beg, - const ptrdiff_t begbyte, const ptrdiff_t end, bool unibyte) +bidi_count_bytes (const unsigned char *s, ptrdiff_t beg, + ptrdiff_t begbyte, ptrdiff_t end, bool unibyte) { ptrdiff_t pos = beg; const unsigned char *p = s + begbyte, *start = p; === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-09-16 10:41:41 +0000 +++ src/gtkutil.c 2013-09-17 07:06:42 +0000 @@ -3409,7 +3409,7 @@ } bool -xg_event_is_for_menubar (struct frame *f, const XEvent * const event) +xg_event_is_for_menubar (struct frame *f, const XEvent *event) { struct x_output *x = f->output_data.x; GList *iter; @@ -3861,7 +3861,7 @@ frame. This function does additional checks. */ bool -xg_event_is_for_scrollbar (struct frame *f, const XEvent * const event) +xg_event_is_for_scrollbar (struct frame *f, const XEvent *event) { bool retval = 0; === modified file 'src/gtkutil.h' --- src/gtkutil.h 2013-09-16 10:41:41 +0000 +++ src/gtkutil.h 2013-09-17 07:06:42 +0000 @@ -105,7 +105,7 @@ extern void xg_update_frame_menubar (struct frame *f); -extern bool xg_event_is_for_menubar (struct frame *, const XEvent * const); +extern bool xg_event_is_for_menubar (struct frame *, const XEvent *); extern bool xg_have_tear_offs (void); @@ -129,7 +129,7 @@ int portion, int position, int whole); -extern bool xg_event_is_for_scrollbar (struct frame *, const XEvent * const); +extern bool xg_event_is_for_scrollbar (struct frame *, const XEvent *); extern int xg_get_default_scrollbar_width (void); extern void update_frame_tool_bar (struct frame *f); === modified file 'src/xselect.c' --- src/xselect.c 2013-09-16 10:41:41 +0000 +++ src/xselect.c 2013-09-17 07:06:42 +0000 @@ -1141,7 +1141,7 @@ /* Called from XTread_socket in response to a PropertyNotify event. */ void -x_handle_property_notify (const XPropertyEvent * const event) +x_handle_property_notify (const XPropertyEvent *event) { struct prop_location *rest; @@ -1888,7 +1888,7 @@ We store t there if the reply is successful, lambda if not. */ void -x_handle_selection_notify (const XSelectionEvent * const event) +x_handle_selection_notify (const XSelectionEvent *event) { if (event->requestor != reading_selection_window) return; @@ -2488,7 +2488,7 @@ /* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */ int -x_handle_dnd_message (struct frame *f, const XClientMessageEvent * const event, +x_handle_dnd_message (struct frame *f, const XClientMessageEvent *event, struct x_display_info *dpyinfo, struct input_event *bufp) { Lisp_Object vec; === modified file 'src/xsettings.c' --- src/xsettings.c 2013-09-17 06:33:24 +0000 +++ src/xsettings.c 2013-09-17 07:06:42 +0000 @@ -754,7 +754,7 @@ /* Check if EVENT for the display in DPYINFO is XSettings related. */ void -xft_settings_event (struct x_display_info *dpyinfo, const XEvent * const event) +xft_settings_event (struct x_display_info *dpyinfo, const XEvent *event) { bool check_window_p = 0, apply_settings_p = 0; === modified file 'src/xsettings.h' --- src/xsettings.h 2013-09-16 10:41:41 +0000 +++ src/xsettings.h 2013-09-17 07:06:42 +0000 @@ -21,7 +21,7 @@ #define XSETTINGS_H extern void xsettings_initialize (struct x_display_info *); -extern void xft_settings_event (struct x_display_info *, const XEvent * const); +extern void xft_settings_event (struct x_display_info *, const XEvent *); extern const char *xsettings_get_system_font (void); #ifdef USE_LUCID extern const char *xsettings_get_system_normal_font (void); === modified file 'src/xterm.c' --- src/xterm.c 2013-09-17 06:57:30 +0000 +++ src/xterm.c 2013-09-17 07:06:42 +0000 @@ -303,12 +303,12 @@ enum scroll_bar_part *, Lisp_Object *, Lisp_Object *, Time *); -static int x_handle_net_wm_state (struct frame *, const XPropertyEvent * const); +static int x_handle_net_wm_state (struct frame *, const XPropertyEvent *); static void x_check_fullscreen (struct frame *); static void x_check_expected_move (struct frame *, int, int); static void x_sync_with_move (struct frame *, int, int, int); static int handle_one_xevent (struct x_display_info *, - const XEvent * const, int *, + const XEvent *, int *, struct input_event *); #ifdef USE_GTK static int x_dispatch_event (XEvent *, Display *); @@ -3462,7 +3462,7 @@ static struct frame * x_menubar_window_to_frame (struct x_display_info *dpyinfo, - const XEvent * const event) + const XEvent *event) { Window wdesc = event->xany.window; Lisp_Object tail, frame; @@ -3544,7 +3544,7 @@ static void x_detect_focus_change (struct x_display_info *dpyinfo, struct frame *frame, - const XEvent * const event, struct input_event *bufp) + const XEvent *event, struct input_event *bufp) { if (!frame) return; @@ -3835,7 +3835,7 @@ static Lisp_Object construct_mouse_click (struct input_event *result, - const XButtonEvent * const event, + const XButtonEvent *event, struct frame *f) { /* Make the event type NO_EVENT; we'll change that when we decide @@ -3868,7 +3868,7 @@ static Lisp_Object last_mouse_motion_frame; static int -note_mouse_movement (struct frame *frame, const XMotionEvent * const event) +note_mouse_movement (struct frame *frame, const XMotionEvent *event) { last_mouse_movement_time = event->time; last_mouse_motion_event = *event; @@ -4359,7 +4359,7 @@ in *IEVENT. */ static void -x_scroll_bar_to_input_event (const XEvent * const event, +x_scroll_bar_to_input_event (const XEvent *event, struct input_event *ievent) { XClientMessageEvent *ev = (XClientMessageEvent *) event; @@ -5504,7 +5504,7 @@ mark bits. */ static void -x_scroll_bar_expose (struct scroll_bar *bar, const XEvent * const event) +x_scroll_bar_expose (struct scroll_bar *bar, const XEvent *event) { Window w = bar->x_window; struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); @@ -5543,7 +5543,7 @@ static void x_scroll_bar_handle_click (struct scroll_bar *bar, - const XEvent * const event, + const XEvent *event, struct input_event *emacs_event) { if (! WINDOWP (bar->window)) @@ -5602,7 +5602,7 @@ static void x_scroll_bar_note_movement (struct scroll_bar *bar, - const XMotionEvent * const event) + const XMotionEvent *event) { struct frame *f = XFRAME (XWINDOW (bar->window)->frame); @@ -5853,7 +5853,7 @@ static int handle_one_xevent (struct x_display_info *dpyinfo, - const XEvent * const event, + const XEvent *event, int *finish, struct input_event *hold_quit) { union { @@ -6078,7 +6078,7 @@ goto OTHER; #endif /* USE_X_TOOLKIT */ { - const XSelectionClearEvent * const eventp = &event->xselectionclear; + const XSelectionClearEvent *eventp = &event->xselectionclear; inev.ie.kind = SELECTION_CLEAR_EVENT; SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display; @@ -6094,7 +6094,7 @@ goto OTHER; #endif /* USE_X_TOOLKIT */ { - const XSelectionRequestEvent * const eventp = &event->xselectionrequest; + const XSelectionRequestEvent *eventp = &event->xselectionrequest; inev.ie.kind = SELECTION_REQUEST_EVENT; SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display; @@ -8533,7 +8533,7 @@ static int -x_handle_net_wm_state (struct frame *f, const XPropertyEvent * const event) +x_handle_net_wm_state (struct frame *f, const XPropertyEvent *event) { int value = FULLSCREEN_NONE; Lisp_Object lval; === modified file 'src/xterm.h' --- src/xterm.h 2013-09-16 10:41:41 +0000 +++ src/xterm.h 2013-09-17 07:06:42 +0000 @@ -941,8 +941,8 @@ /* Defined in xselect.c */ -extern void x_handle_property_notify (const XPropertyEvent * const); -extern void x_handle_selection_notify (const XSelectionEvent * const); +extern void x_handle_property_notify (const XPropertyEvent *); +extern void x_handle_selection_notify (const XSelectionEvent *); extern void x_handle_selection_event (struct input_event *); extern void x_clear_frame_selections (struct frame *); @@ -954,7 +954,7 @@ Lisp_Object values); extern int x_handle_dnd_message (struct frame *, - const XClientMessageEvent * const, + const XClientMessageEvent *, struct x_display_info *, struct input_event *); extern int x_check_property_data (Lisp_Object); ------------------------------------------------------------ revno: 114314 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-09-17 10:57:30 +0400 message: * xterm.c (handle_one_xevent): Do not call to x_clear_area if GTK >= 2.7.0. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-09-17 06:33:24 +0000 +++ src/ChangeLog 2013-09-17 06:57:30 +0000 @@ -5,6 +5,8 @@ (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0. * xsettings.c (init_gconf, init_gsettings): Do not check for g_type_init. + * xterm.c (handle_one_xevent): Do not call to x_clear_area + if GTK >= 2.7.0. 2013-09-16 Jan Djärv === modified file 'src/xterm.c' --- src/xterm.c 2013-09-16 11:23:03 +0000 +++ src/xterm.c 2013-09-17 06:57:30 +0000 @@ -6151,7 +6151,7 @@ f = x_window_to_frame (dpyinfo, event->xexpose.window); if (f) { -#ifdef USE_GTK +#if ! GTK_CHECK_VERSION (2, 7, 0) /* This seems to be needed for GTK 2.6. */ x_clear_area (event->xexpose.display, event->xexpose.window, ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.