------------------------------------------------------------ revno: 118023 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2014-10-03 09:31:17 +0400 message: * fileio.c (emacs_readlinkat, Finsert_file_contents): * w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-10-03 04:35:10 +0000 +++ src/ChangeLog 2014-10-03 05:31:17 +0000 @@ -9,6 +9,9 @@ Adjust users. * gmalloc.c (min): Tiny style change. + * fileio.c (emacs_readlinkat, Finsert_file_contents): + * w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING. + 2014-10-03 Paul Eggert Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586). === modified file 'src/fileio.c' --- src/fileio.c 2014-10-01 03:28:16 +0000 +++ src/fileio.c 2014-10-03 05:31:17 +0000 @@ -2691,7 +2691,10 @@ val = build_unibyte_string (buf); if (buf[0] == '/' && strchr (buf, ':')) - val = concat2 (build_unibyte_string ("/:"), val); + { + AUTO_STRING (slash_colon, "/:"); + val = concat2 (slash_colon, val); + } if (buf != readlink_buf) xfree (buf); val = DECODE_FILE (val); @@ -3645,13 +3648,14 @@ report_file_error ("Read error", orig_filename); else if (nread > 0) { + AUTO_STRING (name, " *code-converting-work*"); struct buffer *prev = current_buffer; Lisp_Object workbuf; struct buffer *buf; record_unwind_current_buffer (); - workbuf = Fget_buffer_create (build_string (" *code-converting-work*")); + workbuf = Fget_buffer_create (name); buf = XBUFFER (workbuf); delete_all_overlays (buf); === modified file 'src/w32fns.c' --- src/w32fns.c 2014-09-30 23:19:31 +0000 +++ src/w32fns.c 2014-10-03 05:31:17 +0000 @@ -5653,7 +5653,8 @@ f->wants_modeline = 0; XSETFRAME (frame, f); - buffer = Fget_buffer_create (build_string (" *tip*")); + AUTO_STRING (tip, " *tip*"); + buffer = Fget_buffer_create (tip); /* Use set_window_buffer instead of Fset_window_buffer (see discussion of bug#11984, bug#12025, bug#12026). */ set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, 0, 0); === modified file 'src/xfns.c' --- src/xfns.c 2014-10-01 03:28:16 +0000 +++ src/xfns.c 2014-10-03 05:31:17 +0000 @@ -4829,7 +4829,8 @@ f = make_frame (1); XSETFRAME (frame, f); - buffer = Fget_buffer_create (build_string (" *tip*")); + AUTO_STRING (tip, " *tip*"); + buffer = Fget_buffer_create (tip); /* Use set_window_buffer instead of Fset_window_buffer (see discussion of bug#11984, bug#12025, bug#12026). */ set_window_buffer (FRAME_ROOT_WINDOW (f), buffer, 0, 0); ------------------------------------------------------------ revno: 118022 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2014-10-03 08:35:10 +0400 message: Consistently use min and max macros from lisp.h. * coding.c (min, max): * font.c (MAX): * unexhp9k800.c (min): * unexw32.c (min, max): Use definitions from lisp.h. * regex.c (MAX, MIN) [!emacs]: Define own max and min as such. Adjust users. * gmalloc.c (min): Tiny style change. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-10-03 02:20:52 +0000 +++ src/ChangeLog 2014-10-03 04:35:10 +0000 @@ -1,3 +1,14 @@ +2014-10-03 Dmitry Antipov + + Consistently use min and max macros from lisp.h. + * coding.c (min, max): + * font.c (MAX): + * unexhp9k800.c (min): + * unexw32.c (min, max): Use definitions from lisp.h. + * regex.c (MAX, MIN) [!emacs]: Define own max and min as such. + Adjust users. + * gmalloc.c (min): Tiny style change. + 2014-10-03 Paul Eggert Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586). === modified file 'src/coding.c' --- src/coding.c 2014-09-07 22:27:59 +0000 +++ src/coding.c 2014-10-03 04:35:10 +0000 @@ -642,15 +642,6 @@ Nth coding category. */ static struct coding_system coding_categories[coding_category_max]; -/*** Commonly used macros and functions ***/ - -#ifndef min -#define min(a, b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef max -#define max(a, b) ((a) > (b) ? (a) : (b)) -#endif - /* Encode a flag that can be nil, something else, or t as -1, 0, 1. */ static int === modified file 'src/font.c' --- src/font.c 2014-10-01 03:28:16 +0000 +++ src/font.c 2014-10-03 04:35:10 +0000 @@ -41,10 +41,6 @@ #include TERM_HEADER #endif /* HAVE_WINDOW_SYSTEM */ -#ifndef MAX -# define MAX(a, b) ((a) > (b) ? (a) : (b)) -#endif - Lisp_Object Qopentype; /* Important character set strings. */ @@ -1310,7 +1306,7 @@ val = AREF (font, FONT_SIZE_INDEX); eassert (NUMBERP (val) || NILP (val)); char font_size_index_buf[sizeof "-*" - + MAX (INT_STRLEN_BOUND (EMACS_INT), + + max (INT_STRLEN_BOUND (EMACS_INT), 1 + DBL_MAX_10_EXP + 1)]; if (INTEGERP (val)) { === modified file 'src/gmalloc.c' --- src/gmalloc.c 2014-09-28 22:31:59 +0000 +++ src/gmalloc.c 2014-10-03 04:35:10 +0000 @@ -1303,7 +1303,7 @@ or (US mail) as Mike Haertel c/o Free Software Foundation. */ #ifndef min -#define min(A, B) ((A) < (B) ? (A) : (B)) +#define min(a, b) ((a) < (b) ? (a) : (b)) #endif /* Debugging hook for realloc. */ === modified file 'src/regex.c' --- src/regex.c 2014-09-07 07:04:01 +0000 +++ src/regex.c 2014-10-03 04:35:10 +0000 @@ -515,10 +515,12 @@ #define STREQ(s1, s2) ((strcmp (s1, s2) == 0)) -#undef MAX -#undef MIN -#define MAX(a, b) ((a) > (b) ? (a) : (b)) -#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#ifndef emacs +# undef max +# undef min +# define max(a, b) ((a) > (b) ? (a) : (b)) +# define min(a, b) ((a) < (b) ? (a) : (b)) +#endif /* Type of source-pattern and string chars. */ #ifdef _MSC_VER @@ -1394,14 +1396,14 @@ : ((fail_stack).stack \ = REGEX_REALLOCATE_STACK ((fail_stack).stack, \ (fail_stack).size * sizeof (fail_stack_elt_t), \ - MIN (re_max_failures * TYPICAL_FAILURE_SIZE, \ + min (re_max_failures * TYPICAL_FAILURE_SIZE, \ ((fail_stack).size * sizeof (fail_stack_elt_t) \ * FAIL_STACK_GROWTH_FACTOR))), \ \ (fail_stack).stack == NULL \ ? 0 \ : ((fail_stack).size \ - = (MIN (re_max_failures * TYPICAL_FAILURE_SIZE, \ + = (min (re_max_failures * TYPICAL_FAILURE_SIZE, \ ((fail_stack).size * sizeof (fail_stack_elt_t) \ * FAIL_STACK_GROWTH_FACTOR)) \ / sizeof (fail_stack_elt_t)), \ @@ -2309,8 +2311,8 @@ cmin = c, cmax = c; else { - cmin = MIN (cmin, c); - cmax = MAX (cmax, c); + cmin = min (cmin, c); + cmax = max (cmax, c); } } } @@ -2989,7 +2991,7 @@ #else /* emacs */ if (c < 128) { - ch = MIN (127, c1); + ch = min (127, c1); SETUP_ASCII_RANGE (range_table_work, c, ch); c = ch + 1; if (CHAR_BYTE8_P (c1)) @@ -5210,7 +5212,7 @@ { /* No. So allocate them with malloc. We need one extra element beyond `num_regs' for the `-1' marker GNU code uses. */ - regs->num_regs = MAX (RE_NREGS, num_regs + 1); + regs->num_regs = max (RE_NREGS, num_regs + 1); regs->start = TALLOC (regs->num_regs, regoff_t); regs->end = TALLOC (regs->num_regs, regoff_t); if (regs->start == NULL || regs->end == NULL) @@ -5254,7 +5256,7 @@ /* Go through the first `min (num_regs, regs->num_regs)' registers, since that is all we initialized. */ - for (reg = 1; reg < MIN (num_regs, regs->num_regs); reg++) + for (reg = 1; reg < min (num_regs, regs->num_regs); reg++) { if (REG_UNSET (regstart[reg]) || REG_UNSET (regend[reg])) regs->start[reg] = regs->end[reg] = -1; === modified file 'src/unexhp9k800.c' --- src/unexhp9k800.c 2014-02-13 17:23:08 +0000 +++ src/unexhp9k800.c 2014-10-03 04:35:10 +0000 @@ -72,7 +72,6 @@ #undef roundup #define roundup(x,n) (((x) + ((n) - 1)) & ~((n) - 1)) /* n is power of 2 */ -#define min(x,y) (((x) < (y)) ? (x) : (y)) /* Report a fatal error and exit. */ static _Noreturn void === modified file 'src/unexw32.c' --- src/unexw32.c 2014-09-01 02:37:22 +0000 +++ src/unexw32.c 2014-10-03 04:35:10 +0000 @@ -48,11 +48,6 @@ #include "w32heap.h" -#undef min -#undef max -#define min(x, y) (((x) < (y)) ? (x) : (y)) -#define max(x, y) (((x) > (y)) ? (x) : (y)) - /* Basically, our "initialized" flag. */ BOOL using_dynamic_heap = FALSE; ------------------------------------------------------------ revno: 118021 fixes bug: http://debbugs.gnu.org/18586 committer: Paul Eggert branch nick: trunk timestamp: Thu 2014-10-02 19:20:52 -0700 message: Fix x-focus-frame bug with "Not an in-range integer". * xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN) (X_ULONG_MAX): Move these macros to xterm.h. (x_fill_property_data): Be more generous about allowing either signed or unsigned data of the appropriate width. * xterm.h (x_display_set_last_user_time): New function. All setters of last_user_time changd to use this function. If ENABLE_CHECKING, check that the times are in range. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-10-02 15:33:55 +0000 +++ src/ChangeLog 2014-10-03 02:20:52 +0000 @@ -1,3 +1,14 @@ +2014-10-03 Paul Eggert + + Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586). + * xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN) + (X_ULONG_MAX): Move these macros to xterm.h. + (x_fill_property_data): Be more generous about allowing either + signed or unsigned data of the appropriate width. + * xterm.h (x_display_set_last_user_time): New function. + All setters of last_user_time changd to use this function. + If ENABLE_CHECKING, check that the times are in range. + 2014-10-02 Eli Zaretskii * dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of === modified file 'src/xselect.c' --- src/xselect.c 2014-10-01 22:13:11 +0000 +++ src/xselect.c 2014-10-03 02:20:52 +0000 @@ -96,13 +96,6 @@ is not necessarily sizeof (long). */ #define X_LONG_SIZE 4 -/* Extreme 'short' and 'long' values suitable for libX11. */ -#define X_SHRT_MAX 0x7fff -#define X_SHRT_MIN (-1 - X_SHRT_MAX) -#define X_LONG_MAX 0x7fffffff -#define X_LONG_MIN (-1 - X_LONG_MAX) -#define X_ULONG_MAX 0xffffffffUL - /* If this is a smaller number than the max-request-size of the display, emacs will use INCR selection transfer when the selection is larger than this. The max-request-size is usually around 64k, so if you want @@ -2284,10 +2277,10 @@ void x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format) { - long val; - long *d32 = (long *) ret; - short *d16 = (short *) ret; - char *d08 = (char *) ret; + unsigned long val; + unsigned long *d32 = (unsigned long *) ret; + unsigned short *d16 = (unsigned short *) ret; + unsigned char *d08 = (unsigned char *) ret; Lisp_Object iter; for (iter = data; CONSP (iter); iter = XCDR (iter)) @@ -2300,16 +2293,16 @@ && RANGED_INTEGERP (X_LONG_MIN >> 16, XCAR (o), X_LONG_MAX >> 16) && RANGED_INTEGERP (- (1 << 15), XCDR (o), -1)) { - long v1 = XINT (XCAR (o)); - long v2 = XINT (XCDR (o)); - /* cons_to_signed does not handle negative values for v2. + /* cons_to_x_long does not handle negative values for v2. For XDnd, v2 might be y of a window, and can be negative. The XDnd spec. is not explicit about negative values, but let's assume negative v2 is sent modulo 2**16. */ - val = (v1 << 16) | (v2 & 0xffff); + unsigned long v1 = XINT (XCAR (o)) & 0xffff; + unsigned long v2 = XINT (XCDR (o)) & 0xffff; + val = (v1 << 16) | v2; } else - val = cons_to_signed (o, X_LONG_MIN, X_LONG_MAX); + val = cons_to_x_long (o); } else if (STRINGP (o)) { @@ -2322,17 +2315,15 @@ if (format == 8) { - if (CHAR_MIN <= val && val <= CHAR_MAX) - *d08++ = val; - else + if ((1 << 8) < val && val <= X_ULONG_MAX - (1 << 7)) error ("Out of 'char' range"); + *d08++ = val; } else if (format == 16) { - if (X_SHRT_MIN <= val && val <= X_SHRT_MAX) - *d16++ = val; - else + if ((1 << 16) < val && val <= X_ULONG_MAX - (1 << 15)) error ("Out of 'short' range"); + *d16++ = val; } else *d32++ = val; === modified file 'src/xterm.c' --- src/xterm.c 2014-10-01 03:28:16 +0000 +++ src/xterm.c 2014-10-03 02:20:52 +0000 @@ -6802,7 +6802,7 @@ break; case SelectionNotify: - dpyinfo->last_user_time = event->xselection.time; + x_display_set_last_user_time (dpyinfo, event->xselection.time); #ifdef USE_X_TOOLKIT if (! x_window_to_frame (dpyinfo, event->xselection.requestor)) goto OTHER; @@ -6811,7 +6811,7 @@ break; case SelectionClear: /* Someone has grabbed ownership. */ - dpyinfo->last_user_time = event->xselectionclear.time; + x_display_set_last_user_time (dpyinfo, event->xselectionclear.time); #ifdef USE_X_TOOLKIT if (! x_window_to_frame (dpyinfo, event->xselectionclear.window)) goto OTHER; @@ -6827,7 +6827,7 @@ break; case SelectionRequest: /* Someone wants our selection. */ - dpyinfo->last_user_time = event->xselectionrequest.time; + x_display_set_last_user_time (dpyinfo, event->xselectionrequest.time); #ifdef USE_X_TOOLKIT if (!x_window_to_frame (dpyinfo, event->xselectionrequest.owner)) goto OTHER; @@ -6846,7 +6846,7 @@ break; case PropertyNotify: - dpyinfo->last_user_time = event->xproperty.time; + x_display_set_last_user_time (dpyinfo, event->xproperty.time); f = x_top_window_to_frame (dpyinfo, event->xproperty.window); if (f && event->xproperty.atom == dpyinfo->Xatom_net_wm_state) { @@ -7044,7 +7044,7 @@ case KeyPress: - dpyinfo->last_user_time = event->xkey.time; + x_display_set_last_user_time (dpyinfo, event->xkey.time); ignore_next_mouse_click_timeout = 0; #if defined (USE_X_TOOLKIT) || defined (USE_GTK) @@ -7378,7 +7378,7 @@ #endif case KeyRelease: - dpyinfo->last_user_time = event->xkey.time; + x_display_set_last_user_time (dpyinfo, event->xkey.time); #ifdef HAVE_X_I18N /* Don't dispatch this event since XtDispatchEvent calls XFilterEvent, and two calls in a row may freeze the @@ -7389,7 +7389,7 @@ #endif case EnterNotify: - dpyinfo->last_user_time = event->xcrossing.time; + x_display_set_last_user_time (dpyinfo, event->xcrossing.time); x_detect_focus_change (dpyinfo, any, event, &inev.ie); f = any; @@ -7414,7 +7414,7 @@ goto OTHER; case LeaveNotify: - dpyinfo->last_user_time = event->xcrossing.time; + x_display_set_last_user_time (dpyinfo, event->xcrossing.time); x_detect_focus_change (dpyinfo, any, event, &inev.ie); f = x_top_window_to_frame (dpyinfo, event->xcrossing.window); @@ -7448,7 +7448,7 @@ case MotionNotify: { - dpyinfo->last_user_time = event->xmotion.time; + x_display_set_last_user_time (dpyinfo, event->xmotion.time); previous_help_echo_string = help_echo_string; help_echo_string = Qnil; @@ -7588,7 +7588,7 @@ memset (&compose_status, 0, sizeof (compose_status)); dpyinfo->last_mouse_glyph_frame = NULL; - dpyinfo->last_user_time = event->xbutton.time; + x_display_set_last_user_time (dpyinfo, event->xbutton.time); f = (x_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame : x_window_to_frame (dpyinfo, event->xbutton.window)); === modified file 'src/xterm.h' --- src/xterm.h 2014-08-03 20:34:33 +0000 +++ src/xterm.h 2014-10-03 02:20:52 +0000 @@ -434,7 +434,7 @@ struct x_output { -#if defined (USE_X_TOOLKIT) || defined (USE_GTK) +#if defined (USE_X_TOOLKIT) || defined (USE_GTK) /* Height of menu bar widget, in pixels. This value is not meaningful if the menubar is turned off. */ int menubar_height; @@ -654,6 +654,13 @@ int move_offset_left; }; +/* Extreme 'short' and 'long' values suitable for libX11. */ +#define X_SHRT_MAX 0x7fff +#define X_SHRT_MIN (-1 - X_SHRT_MAX) +#define X_LONG_MAX 0x7fffffff +#define X_LONG_MIN (-1 - X_LONG_MAX) +#define X_ULONG_MAX 0xffffffffUL + #define No_Cursor (None) enum @@ -1022,6 +1029,15 @@ return WidthOfScreen (dpyinfo->screen); } +INLINE void +x_display_set_last_user_time (struct x_display_info *dpyinfo, Time t) +{ +#ifdef ENABLE_CHECKING + eassert (t <= X_ULONG_MAX); +#endif + dpyinfo->last_user_time = t; +} + extern void x_set_sticky (struct frame *, Lisp_Object, Lisp_Object); extern void x_wait_for_event (struct frame *, int); extern void x_clear_under_internal_border (struct frame *f); ------------------------------------------------------------ revno: 118020 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-10-02 22:15:42 -0400 message: * lisp/select.el: Add commentary discussion. diff: === modified file 'lisp/select.el' --- lisp/select.el 2014-10-03 01:39:49 +0000 +++ lisp/select.el 2014-10-03 02:15:42 +0000 @@ -24,6 +24,31 @@ ;; Based partially on earlier release by Lucid. +;; The functionality here is pretty messy, because there are different +;; functions that claim to get or set the "selection", with no clear +;; distinction between them. Here's my best understanding of it: +;; - gui-select-text and gui-selection-value go together to access the general +;; notion of "GUI selection" for interoperation with other applications. +;; This can use either the clipboard or the primary selection, or both or +;; none according to gui-select-enable-clipboard and x-select-enable-primary. +;; These are the default values of interprogram-cut/paste-function. +;; - gui-get-primary-selection is used to get the PRIMARY selection, +;; specifically for mouse-yank-primary. +;; - gui-get-selection and gui-set-selection are lower-level functions meant to +;; access various kinds of selections (CLIPBOARD, PRIMARY, SECONDARY). + +;; Currently gui-select-text and gui-selection-value provide gui-methods so the +;; actual backend can do it whichever way it wants. This means for example +;; that gui-select-enable-clipboard is defined here but implemented in each and +;; every backend. +;; Maybe a better structure would be to make gui-select-text and +;; gui-selection-value have no associated gui-method, and implement +;; gui-select-enable-clipboard (and x-select-enable-clipboard) themselves. +;; This would instead rely on gui-get/set-selection being implemented well +;; (e.g. currently w32's implementation thereof sucks, for example, +;; since it doesn't access the system's clipboard when setting/getting the +;; CLIPBOARD selection). + ;;; Code: (defcustom selection-coding-system nil ------------------------------------------------------------ revno: 118019 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-10-02 21:39:49 -0400 message: New gui-selection-value consolidating x-selection-value. * lisp/select.el (gui-selection-value-alist): New method. (gui-selection-value): New function. (x-selection-value): Make it an obsolete alias. * lisp/simple.el (interprogram-paste-function): Default to gui-selection-value. * lisp/w32-common-fns.el (w32-get-selection-value): Simplify. (x-selection-value): Remove alias. (interprogram-paste-function): Don't set. (gui-selection-value): Define for w32. * lisp/term/x-win.el (gui-selection-value): Define for x. (x--selection-value): Rename from x--selection-value. (interprogram-paste-function): Don't set. * lisp/term/pc-win.el (w16-get-selection-value): Simplify. (msdos-initialize-window-system): Don't set interprogram-paste-function. (gui-selection-value): Define for pc. * lisp/term/ns-win.el (x-selection-value): Remove. (gui-selection-value): Define for ns, instead. * lisp/term/common-win.el (x-setup-function-keys): Don't set interprogram-paste-function. * lisp/obsolete/mouse-sel.el (mouse-sel-get-selection-function): Use gui-selection-value. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-10-02 04:24:07 +0000 +++ etc/NEWS 2014-10-03 01:39:49 +0000 @@ -247,6 +247,7 @@ ** Some "x-*" were obsoleted: *** x-select-text is renamed gui-select-text. +*** x-selection-value is renamed gui-selection-value. *** x-get-selection is renamed gui-get-selection. *** x-get-clipboard and x-clipboard-yank are marked obsolete. *** x-get-selection-value is renamed to gui-get-primary-selection. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-10-03 00:15:34 +0000 +++ lisp/ChangeLog 2014-10-03 01:39:49 +0000 @@ -1,3 +1,29 @@ +2014-10-03 Stefan Monnier + + New gui-selection-value consolidating x-selection-value. + * select.el (gui-selection-value-alist): New method. + (gui-selection-value): New function. + (x-selection-value): Make it an obsolete alias. + * simple.el (interprogram-paste-function): Default to + gui-selection-value. + * w32-common-fns.el (w32-get-selection-value): Simplify. + (x-selection-value): Remove alias. + (interprogram-paste-function): Don't set. + (gui-selection-value): Define for w32. + * term/x-win.el (gui-selection-value): Define for x. + (x--selection-value): Rename from x--selection-value. + (interprogram-paste-function): Don't set. + * term/pc-win.el (w16-get-selection-value): Simplify. + (msdos-initialize-window-system): Don't set + interprogram-paste-function. + (gui-selection-value): Define for pc. + * term/ns-win.el (x-selection-value): Remove. + (gui-selection-value): Define for ns, instead. + * term/common-win.el (x-setup-function-keys): Don't set + interprogram-paste-function. + * obsolete/mouse-sel.el (mouse-sel-get-selection-function): + Use gui-selection-value. + 2014-10-02 David Raynes (tiny change) * term/ns-win.el: Add functions to ns frame, not x frame (bug#18614). === modified file 'lisp/obsolete/mouse-sel.el' --- lisp/obsolete/mouse-sel.el 2014-10-02 03:19:32 +0000 +++ lisp/obsolete/mouse-sel.el 2014-10-03 01:39:49 +0000 @@ -98,7 +98,7 @@ ;; ;; Selection/kill-ring interaction is retained ;; interprogram-cut-function = gui-select-text -;; interprogram-paste-function = x-selection-value +;; interprogram-paste-function = gui-selection-value ;; ;; What you lose is the ability to select some text in ;; delete-selection-mode and yank over the top of it. @@ -308,13 +308,13 @@ This sets the selection, unless `mouse-sel-default-bindings' is `interprogram-cut-paste'.") -(declare-function x-selection-value "term/x-win" ()) (defvar mouse-sel-get-selection-function (lambda (selection) (if (eq selection 'PRIMARY) - (or (x-selection-value) - (bound-and-true-p x-last-selected-text-primary)) + (or (gui-selection-value) + (bound-and-true-p x-last-selected-text-primary) + gui-last-selected-text) (x-get-selection selection))) "Function to call to get the selection. Called with one argument: === modified file 'lisp/select.el' --- lisp/select.el 2014-10-02 03:19:32 +0000 +++ lisp/select.el 2014-10-03 01:39:49 +0000 @@ -98,6 +98,9 @@ TARGET-TYPE is the type of data desired, typically `STRING'.") (defvar gui-last-selected-text nil + ;; We keep track of the last text selected here, so we can check the + ;; current selection against it, and avoid passing back our own text + ;; from gui-selection-value. "Last text passed to `gui-select-text'.") (defun gui-select-text (text) @@ -116,6 +119,25 @@ (setq gui-last-selected-text text)) (define-obsolete-function-alias 'x-select-text 'gui-select-text "25.1") +(gui-method-declare gui-selection-value #'ignore + "Method to return the GUI's selection. +Takes no argument, and returns a string. +Should obey `gui-select-enable-clipboard'.") + +(defun gui-selection-value () + (let ((text (gui-call gui-selection-value))) + (if (string= text "") (setq text nil)) + (cond + ((not text) nil) + ((eq text gui-last-selected-text) nil) + ((string= text gui-last-selected-text) + ;; Record the newer string, so subsequent calls can use the `eq' test. + (setq gui-last-selected-text text) + nil) + (t + (setq gui-last-selected-text text))))) +(define-obsolete-function-alias 'x-selection-value 'gui-selection-value "25.1") + (defun gui-get-selection (&optional type data-type) "Return the value of an X Windows selection. The argument TYPE (default `PRIMARY') says which selection, === modified file 'lisp/simple.el' --- lisp/simple.el 2014-10-02 12:44:48 +0000 +++ lisp/simple.el 2014-10-03 01:39:49 +0000 @@ -3640,7 +3640,7 @@ programs. The function takes one argument, TEXT, which is a string containing the text which should be made available.") -(defvar interprogram-paste-function #'ignore +(defvar interprogram-paste-function #'gui-selection-value "Function to call to get text cut from other programs. Most window systems provide a facility for cutting and pasting text between different programs, such as the clipboard on X and === modified file 'lisp/term/common-win.el' --- lisp/term/common-win.el 2014-10-01 22:13:11 +0000 +++ lisp/term/common-win.el 2014-10-03 01:39:49 +0000 @@ -56,8 +56,7 @@ (set-keymap-parent map (keymap-parent local-function-key-map)) (set-keymap-parent local-function-key-map map)) (when (featurep 'ns) - (setq interprogram-paste-function 'x-selection-value - system-key-alist + (setq system-key-alist (list ;; These are special "keys" used to pass events from C to lisp. (cons (logior (lsh 0 16) 1) 'ns-power-off) === modified file 'lisp/term/ns-win.el' --- lisp/term/ns-win.el 2014-10-03 00:15:34 +0000 +++ lisp/term/ns-win.el 2014-10-03 01:39:49 +0000 @@ -736,27 +736,14 @@ (if (not (stringp string)) (error "Nonstring given to pasteboard")) (ns-store-selection-internal 'CLIPBOARD string)) -;; We keep track of the last text selected here, so we can check the -;; current selection against it, and avoid passing back our own text -;; from x-selection-value. - ;; Return the value of the current Nextstep selection. For ;; compatibility with older Nextstep applications, this checks cut ;; buffer 0 before retrieving the value of the primary selection. -(defun x-selection-value () - (let (text) - ;; Consult the selection. Treat empty strings as if they were unset. - (or text (setq text (ns-get-pasteboard))) - (if (string= text "") (setq text nil)) - (cond - ((not text) nil) - ((eq text gui-last-selected-text) nil) - ((string= text gui-last-selected-text) - ;; Record the newer string, so subsequent calls can use the `eq' test. - (setq gui-last-selected-text text) - nil) - (t - (setq gui-last-selected-text text))))) +(gui-method-define gui-selection-value ns #'ns-selection-value) +(defun ns-selection-value () + ;; Consult the selection. Treat empty strings as if they were unset. + (if gui-select-enable-clipboard + (ns-get-pasteboard))) (defun ns-copy-including-secondary () (interactive) === modified file 'lisp/term/pc-win.el' --- lisp/term/pc-win.el 2014-10-02 03:19:32 +0000 +++ lisp/term/pc-win.el 2014-10-03 01:39:49 +0000 @@ -223,20 +223,9 @@ "Return the value of the current selection. Consult the selection. Treat empty strings as if they were unset." (if gui-select-enable-clipboard - (let (text) - ;; Don't die if x-get-selection signals an error. - (with-demoted-errors "w16-get-clipboard-data:%s" - (setq text (w16-get-clipboard-data))) - (if (string= text "") (setq text nil)) - (cond - ((not text) nil) - ((eq text gui-last-selected-text) nil) - ((string= text gui-last-selected-text) - ;; Record the newer string, so subsequent calls can use the 'eq' test. - (setq gui-last-selected-text text) - nil) - (t - (setq gui-last-selected-text text)))))) + ;; Don't die if x-get-selection signals an error. + (with-demoted-errors "w16-get-clipboard-data:%s" + (w16-get-clipboard-data)))) ;; gui-selection-owner-p is used in simple.el. (gui-method-define gui-selection-owner-p pc #'w16-selection-owner-p) @@ -380,7 +369,6 @@ (setq split-window-keep-point t) ;; Arrange for the kill and yank functions to set and check the ;; clipboard. - (setq interprogram-paste-function #'w16-get-selection-value) (menu-bar-enable-clipboard) (run-hooks 'terminal-init-msdos-hook)) @@ -398,6 +386,7 @@ (declare-function w16-set-clipboard-data "w16select.c" (string &optional ignored)) (gui-method-define gui-select-text pc #'w16--select-text) +(gui-method-define gui-selection-value pc #'w16-get-selection-value) (defun w16--select-text (text) (when gui-select-enable-clipboard (w16-set-clipboard-data text))) === modified file 'lisp/term/x-win.el' --- lisp/term/x-win.el 2014-10-02 03:19:32 +0000 +++ lisp/term/x-win.el 2014-10-03 01:39:49 +0000 @@ -1156,7 +1156,7 @@ ;; We keep track of the last text selected here, so we can check the ;; current selection against it, and avoid passing back our own text -;; from x-selection-value. We track both +;; from x--selection-value. We track both ;; separately in case another X application only sets one of them ;; we aren't fooled by the PRIMARY or CLIPBOARD selection staying the same. (defvar x-last-selected-text-clipboard nil @@ -1222,73 +1222,72 @@ ;; If this function is called twice and finds the same text, ;; it returns nil the second time. This is so that a single ;; selection won't be added to the kill ring over and over. -(defun x-selection-value () +(gui-method-define gui-selection-value x #'x--selection-value) +(defun x--selection-value () ;; With multi-tty, this function may be called from a tty frame. - (when (eq (framep (selected-frame)) 'x) - (let (clip-text primary-text) - (when x-select-enable-clipboard - (setq clip-text (x-selection-value-internal 'CLIPBOARD)) - (if (string= clip-text "") (setq clip-text nil)) - - ;; Check the CLIPBOARD selection for 'newness', is it different - ;; from what we remembered them to be last time we did a - ;; cut/paste operation. - (setq clip-text - (cond ;; check clipboard - ((or (not clip-text) (string= clip-text "")) - (setq x-last-selected-text-clipboard nil)) - ((eq clip-text x-last-selected-text-clipboard) nil) - ((string= clip-text x-last-selected-text-clipboard) - ;; Record the newer string, - ;; so subsequent calls can use the `eq' test. - (setq x-last-selected-text-clipboard clip-text) - nil) - (t (setq x-last-selected-text-clipboard clip-text))))) - - (when x-select-enable-primary - (setq primary-text (x-selection-value-internal 'PRIMARY)) - ;; Check the PRIMARY selection for 'newness', is it different - ;; from what we remembered them to be last time we did a - ;; cut/paste operation. - (setq primary-text - (cond ;; check primary selection - ((or (not primary-text) (string= primary-text "")) - (setq x-last-selected-text-primary nil)) - ((eq primary-text x-last-selected-text-primary) nil) - ((string= primary-text x-last-selected-text-primary) - ;; Record the newer string, - ;; so subsequent calls can use the `eq' test. - (setq x-last-selected-text-primary primary-text) - nil) - (t - (setq x-last-selected-text-primary primary-text))))) - - ;; As we have done one selection, clear this now. - (setq next-selection-coding-system nil) - - ;; At this point we have recorded the current values for the - ;; selection from clipboard (if we are supposed to) and primary. - ;; So return the first one that has changed - ;; (which is the first non-null one). - ;; - ;; NOTE: There will be cases where more than one of these has - ;; changed and the new values differ. This indicates that - ;; something like the following has happened since the last time - ;; we looked at the selections: Application X set all the - ;; selections, then Application Y set only one of them. - ;; In this case since we don't have - ;; timestamps there is no way to know what the 'correct' value to - ;; return is. The nice thing to do would be to tell the user we - ;; saw multiple possible selections and ask the user which was the - ;; one they wanted. - (or clip-text primary-text) - ))) + (let (clip-text primary-text) + (when x-select-enable-clipboard + (setq clip-text (x-selection-value-internal 'CLIPBOARD)) + (if (string= clip-text "") (setq clip-text nil)) + + ;; Check the CLIPBOARD selection for 'newness', is it different + ;; from what we remembered them to be last time we did a + ;; cut/paste operation. + (setq clip-text + (cond ;; check clipboard + ((or (not clip-text) (string= clip-text "")) + (setq x-last-selected-text-clipboard nil)) + ((eq clip-text x-last-selected-text-clipboard) nil) + ((string= clip-text x-last-selected-text-clipboard) + ;; Record the newer string, + ;; so subsequent calls can use the `eq' test. + (setq x-last-selected-text-clipboard clip-text) + nil) + (t (setq x-last-selected-text-clipboard clip-text))))) + + (when x-select-enable-primary + (setq primary-text (x-selection-value-internal 'PRIMARY)) + ;; Check the PRIMARY selection for 'newness', is it different + ;; from what we remembered them to be last time we did a + ;; cut/paste operation. + (setq primary-text + (cond ;; check primary selection + ((or (not primary-text) (string= primary-text "")) + (setq x-last-selected-text-primary nil)) + ((eq primary-text x-last-selected-text-primary) nil) + ((string= primary-text x-last-selected-text-primary) + ;; Record the newer string, + ;; so subsequent calls can use the `eq' test. + (setq x-last-selected-text-primary primary-text) + nil) + (t + (setq x-last-selected-text-primary primary-text))))) + + ;; As we have done one selection, clear this now. + (setq next-selection-coding-system nil) + + ;; At this point we have recorded the current values for the + ;; selection from clipboard (if we are supposed to) and primary. + ;; So return the first one that has changed + ;; (which is the first non-null one). + ;; + ;; NOTE: There will be cases where more than one of these has + ;; changed and the new values differ. This indicates that + ;; something like the following has happened since the last time + ;; we looked at the selections: Application X set all the + ;; selections, then Application Y set only one of them. + ;; In this case since we don't have + ;; timestamps there is no way to know what the 'correct' value to + ;; return is. The nice thing to do would be to tell the user we + ;; saw multiple possible selections and ask the user which was the + ;; one they wanted. + (or clip-text primary-text) + )) (define-obsolete-function-alias 'x-cut-buffer-or-selection-value 'x-selection-value "24.1") ;; Arrange for the kill and yank functions to set and check the clipboard. -(setq interprogram-paste-function 'x-selection-value) (defun x-clipboard-yank () "Insert the clipboard contents, or the last stretch of killed text." === modified file 'lisp/w32-common-fns.el' --- lisp/w32-common-fns.el 2014-10-02 03:19:32 +0000 +++ lisp/w32-common-fns.el 2014-10-03 01:39:49 +0000 @@ -70,32 +70,15 @@ ;;;; Selections -;; We keep track of the last text selected here, so we can check the -;; current selection against it, and avoid passing back our own text -;; from x-selection-value. - (defun w32-get-selection-value () "Return the value of the current selection. Consult the selection. Treat empty strings as if they were unset." (if gui-select-enable-clipboard - (let ((text - ;; Don't die if x-get-selection signals an error. - (with-demoted-errors "w32-get-clipboard-data:%S" - (w32-get-clipboard-data)))) - (if (string= text "") (setq text nil)) - (cond - ((not text) nil) - ((eq text gui-last-selected-text) nil) - ((string= text gui-last-selected-text) - ;; Record the newer string, so subsequent calls can use the 'eq' test. - (setq gui-last-selected-text text) - nil) - (t - (setq gui-last-selected-text text)))))) + ;; Don't die if x-get-selection signals an error. + (with-demoted-errors "w32-get-clipboard-data:%S" + (w32-get-clipboard-data)))) -(defalias 'x-selection-value #'w32-get-selection-value) - ;; Arrange for the kill and yank functions to set and check the clipboard. -(setq interprogram-paste-function #'w32-get-selection-value) +(gui-method-define gui-selection-value w32 #'w32-get-selection-value) (provide 'w32-common-fns) ------------------------------------------------------------ revno: 118018 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18614 author: David Raynes committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-10-02 20:15:34 -0400 message: * lisp/term/ns-win.el: Add functions to ns frame, not x frame. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-10-02 17:18:57 +0000 +++ lisp/ChangeLog 2014-10-03 00:15:34 +0000 @@ -1,3 +1,7 @@ +2014-10-02 David Raynes (tiny change) + + * term/ns-win.el: Add functions to ns frame, not x frame (bug#18614). + 2014-10-02 Stefan Monnier * obsolete/lucid.el (read-number): Remove, redundant. === modified file 'lisp/term/ns-win.el' --- lisp/term/ns-win.el 2014-10-02 03:19:32 +0000 +++ lisp/term/ns-win.el 2014-10-03 00:15:34 +0000 @@ -971,10 +971,10 @@ (when gui-select-enable-clipboard (ns-set-pasteboard text)))) -(gui-method-define gui-own-selection x #'ns-own-selection-internal) -(gui-method-define gui-disown-selection x #'ns-disown-selection-internal) -(gui-method-define gui-selection-owner-p x #'ns-selection-owner-p) -(gui-method-define gui-get-selection x #'x-get-selection-internal) ;FIXME:name! +(gui-method-define gui-own-selection ns #'ns-own-selection-internal) +(gui-method-define gui-disown-selection ns #'ns-disown-selection-internal) +(gui-method-define gui-selection-owner-p ns #'ns-selection-owner-p) +(gui-method-define gui-get-selection ns #'x-get-selection-internal) ;FIXME:name! (provide 'ns-win) ------------------------------------------------------------ revno: 118017 committer: Paul Eggert branch nick: trunk timestamp: Thu 2014-10-02 12:28:26 -0700 message: * erc.el (erc-nick-at-point): Fix format-string typo (Bug#17755). diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2014-10-02 11:55:22 +0000 +++ lisp/erc/ChangeLog 2014-10-02 19:28:26 +0000 @@ -1,3 +1,7 @@ +2014-10-02 Paul Eggert + + * erc.el (erc-nick-at-point): Fix format-string typo (Bug#17755). + 2014-10-02 Kelvin White * erc.el (erc-rename-buffer-p): When set to t buffers will be === modified file 'lisp/erc/erc.el' --- lisp/erc/erc.el 2014-10-02 11:55:22 +0000 +++ lisp/erc/erc.el 2014-10-02 19:28:26 +0000 @@ -5374,7 +5374,7 @@ (null erc-flood-protect) t)) (or (and erc-flood-protect (erc-split-line line)) (list line)))) - (split-string str "\n")) + (split-string str "\n")) (erc-process-input-line (concat str "\n") t nil)) t))))) @@ -6082,7 +6082,7 @@ nick login host (if full-name (format " (%s)" full-name) "") (if (or voice halfop op admin owner) - (format " and is +%s%s on %s" + (format " and is +%s%s%s%s%s on %s" (if voice "v" "") (if halfop "h" "") (if op "o" "") @@ -6229,7 +6229,7 @@ (cond ((erc-default-target) (concat (erc-string-no-properties (erc-default-target)) "@" network-name)) - ((and network-name + ((and network-name (not (get-buffer network-name))) (when erc-rename-buffer-p (rename-buffer network-name)) ------------------------------------------------------------ revno: 118016 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-10-02 13:18:57 -0400 message: * lisp/obsolete/lucid.el (read-number): Remove, redundant. * lisp/obsolete/cl-compat.el (cl-floor, cl-ceiling, cl-round, cl-truncate): Remove, broken. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-10-02 15:13:05 +0000 +++ lisp/ChangeLog 2014-10-02 17:18:57 +0000 @@ -1,3 +1,9 @@ +2014-10-02 Stefan Monnier + + * obsolete/lucid.el (read-number): Remove, redundant. + * obsolete/cl-compat.el (cl-floor, cl-ceiling, cl-round, cl-truncate): + Remove, broken. + 2014-10-02 Glenn Morris * emacs-lisp/package.el (package-import-keyring): === modified file 'lisp/obsolete/cl-compat.el' --- lisp/obsolete/cl-compat.el 2014-01-01 07:43:34 +0000 +++ lisp/obsolete/cl-compat.el 2014-10-02 17:18:57 +0000 @@ -129,14 +129,6 @@ (if test-not (not (funcall test-not item elt)) (funcall (or test 'eql) item elt)))) - -;;; Rounding functions with old-style multiple value returns. - -(defun cl-floor (a &optional b) (Values-list (floor* a b))) -(defun cl-ceiling (a &optional b) (Values-list (ceiling* a b))) -(defun cl-round (a &optional b) (Values-list (round* a b))) -(defun cl-truncate (a &optional b) (Values-list (truncate* a b))) - (defun safe-idiv (a b) (let* ((q (/ (abs a) (abs b))) (s (* (signum a) (signum b)))) === modified file 'lisp/obsolete/lucid.el' --- lisp/obsolete/lucid.el 2014-04-15 13:21:18 +0000 +++ lisp/obsolete/lucid.el 2014-10-02 17:18:57 +0000 @@ -30,27 +30,6 @@ (defalias 'current-time-seconds 'current-time) -(defun read-number (prompt &optional integers-only) - "Read a number from the minibuffer. -Keep reentering the minibuffer until we get suitable input. -If optional argument INTEGERS-ONLY is non-nil, insist on an integer." - (interactive) - (let (success - (number nil) - (predicate (if integers-only 'integerp 'numberp))) - (while (not success) - (let ((input-string (read-string prompt))) - (condition-case () - (setq number (read input-string)) - (error)) - (if (funcall predicate number) - (setq success t) - (let ((cursor-in-echo-area t)) - (message "Please type %s" - (if integers-only "an integer" "a number")) - (sit-for 1))))) - number)) - (defun real-path-name (name &optional default) (file-truename (expand-file-name name default))) ------------------------------------------------------------ revno: 118015 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2014-10-02 18:33:55 +0300 message: src/dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of 'ssize_t'. Suggested by Paul Eggert . diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-10-02 15:13:05 +0000 +++ src/ChangeLog 2014-10-02 15:33:55 +0000 @@ -1,3 +1,8 @@ +2014-10-02 Eli Zaretskii + + * dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of + 'ssize_t'. Suggested by Paul Eggert . + 2014-10-02 Jan Djärv * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to === modified file 'src/dispnew.c' --- src/dispnew.c 2014-10-01 14:58:54 +0000 +++ src/dispnew.c 2014-10-02 15:33:55 +0000 @@ -2137,7 +2137,7 @@ static void adjust_decode_mode_spec_buffer (struct frame *f) { - ssize_t frame_message_buf_size = FRAME_MESSAGE_BUF_SIZE (f); + int frame_message_buf_size = FRAME_MESSAGE_BUF_SIZE (f); eassert (frame_message_buf_size >= 0); f->decode_mode_spec_buffer = xrealloc (f->decode_mode_spec_buffer, ------------------------------------------------------------ revno: 118014 [merge] committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-10-02 11:13:05 -0400 message: Merge from emacs-24 diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-09-29 19:49:44 +0000 +++ doc/emacs/ChangeLog 2014-10-02 15:13:05 +0000 @@ -1,3 +1,7 @@ +2014-10-02 Glenn Morris + + * package.texi (Package Installation): Mention etc/package-keyring.gpg. + 2014-09-29 Eli Zaretskii * emacsver.texi (EMACSVER): Bump to 20.0.50. === modified file 'doc/emacs/package.texi' --- doc/emacs/package.texi 2014-06-05 08:14:36 +0000 +++ doc/emacs/package.texi 2014-10-01 23:29:46 +0000 @@ -184,11 +184,8 @@ Use @kbd{M-x package-import-keyring} to import the key into Emacs. Emacs stores package keys in the @file{gnupg} subdirectory of @code{package-user-dir}. -@c Uncomment this if it becomes true. -@ignore The public key for the GNU package archive is distributed with Emacs, in the @file{etc/package-keyring.gpg}. Emacs uses it automatically. -@end ignore @vindex package-check-signature @vindex package-unsigned-archives === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-10-02 13:26:23 +0000 +++ lisp/ChangeLog 2014-10-02 15:13:05 +0000 @@ -1,3 +1,15 @@ +2014-10-02 Glenn Morris + + * emacs-lisp/package.el (package-import-keyring): + Create gnupg directory private. (Bug#17625#155) + +2014-10-02 Stefan Monnier + + * progmodes/python.el (python-shell-completion-get-completions): + Use python-shell--prompt-calculated-input-regexp from the + process buffer (bug#18582). + Don't assume that `line' comes from the process buffer. + 2014-10-02 Stefan Monnier * frame.el: Use lexical-binding (bug#18598). === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2014-09-30 23:19:31 +0000 +++ lisp/emacs-lisp/package.el 2014-10-02 15:13:05 +0000 @@ -289,6 +289,8 @@ :group 'package :version "24.1") +(defvar epg-gpg-program) + (defcustom package-check-signature (if (progn (require 'epg-config) (executable-find epg-gpg-program)) 'allow-unsigned) @@ -1299,7 +1301,8 @@ (setq file (expand-file-name file)) (let ((context (epg-make-context 'OpenPGP)) (homedir (expand-file-name "gnupg" package-user-dir))) - (make-directory homedir t) + (with-file-modes 448 + (make-directory homedir t)) (epg-context-set-home-directory context homedir) (message "Importing %s..." (file-name-nondirectory file)) (epg-import-keys-from-file context file) === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2014-09-29 11:05:40 +0000 +++ lisp/gnus/ChangeLog 2014-10-02 15:13:05 +0000 @@ -1,3 +1,8 @@ +2014-10-02 Daiki Ueno + + * mml.el (mml-parse-1): Error out if unknown mode is specified in + <#secure> tag (bug#18513). + 2014-09-29 Daiki Ueno * mml.el (mml-parse-1): Error out if unknown mode is specified in === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2014-09-30 23:19:31 +0000 +++ lisp/progmodes/python.el 2014-10-02 15:13:05 +0000 @@ -2888,31 +2888,30 @@ "Do completion at point using PROCESS for IMPORT or INPUT. When IMPORT is non-nil takes precedence over INPUT for completion." - (let* ((prompt - (with-current-buffer (process-buffer process) + (with-current-buffer (process-buffer process) + (let* ((prompt (let ((prompt-boundaries (python-util-comint-last-prompt))) (buffer-substring-no-properties - (car prompt-boundaries) (cdr prompt-boundaries))))) - (completion-code - ;; Check whether a prompt matches a pdb string, an import - ;; statement or just the standard prompt and use the - ;; correct python-shell-completion-*-code string - (cond ((and (string-match - (concat "^" python-shell-prompt-pdb-regexp) prompt)) - ;; Since there are no guarantees the user will remain - ;; in the same context where completion code was sent - ;; (e.g. user steps into a function), safeguard - ;; resending completion setup continuously. - (concat python-shell-completion-setup-code - "\nprint (" python-shell-completion-string-code ")")) - ((string-match - python-shell--prompt-calculated-input-regexp prompt) - python-shell-completion-string-code) - (t nil))) - (subject (or import input))) - (and completion-code - (> (length input) 0) - (with-current-buffer (process-buffer process) + (car prompt-boundaries) (cdr prompt-boundaries)))) + (completion-code + ;; Check whether a prompt matches a pdb string, an import + ;; statement or just the standard prompt and use the + ;; correct python-shell-completion-*-code string + (cond ((and (string-match + (concat "^" python-shell-prompt-pdb-regexp) prompt)) + ;; Since there are no guarantees the user will remain + ;; in the same context where completion code was sent + ;; (e.g. user steps into a function), safeguard + ;; resending completion setup continuously. + (concat python-shell-completion-setup-code + "\nprint (" python-shell-completion-string-code ")")) + ((string-match + python-shell--prompt-calculated-input-regexp prompt) + python-shell-completion-string-code) + (t nil))) + (subject (or import input))) + (and completion-code + (> (length input) 0) (let ((completions (python-util-strip-string (python-shell-send-string-no-output === modified file 'src/ChangeLog' --- src/ChangeLog 2014-10-02 14:01:27 +0000 +++ src/ChangeLog 2014-10-02 15:13:05 +0000 @@ -1,3 +1,9 @@ +2014-10-02 Jan Djärv + + * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to + make a font_object from a tty frame (Bug#18573). + (Finternal_set_lisp_face_attribute): Add FIXME comment. + 2014-10-02 Dmitry Antipov * alloc.c (mark_overlay): Assume that overlay boundaries are @@ -398,7 +404,7 @@ * macfont.m (macfont_close): Release and free font-specific data only if it wasn't previously freed. -2014-09-22 David Caldwell (tiny change) +2014-09-22 David Caldwell (tiny change) * unexmacosx.c (dump_it): Improve error message. @@ -9808,7 +9814,7 @@ * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically scoped code (bug#11258). -2013-08-28 Davor Cubranic (tiny change) +2013-08-28 Davor Cubranic (tiny change) * nsterm.m (last_window): New variable. (EV_TRAILER2): New macro. === modified file 'src/xfaces.c' --- src/xfaces.c 2014-10-01 03:28:16 +0000 +++ src/xfaces.c 2014-10-02 15:13:05 +0000 @@ -3112,17 +3112,26 @@ f = XFRAME (selected_frame); else f = XFRAME (frame); - if (! FONT_OBJECT_P (value)) - { - Lisp_Object *attrs = XVECTOR (lface)->contents; - Lisp_Object font_object; - - font_object = font_load_for_lface (f, attrs, value); - if (NILP (font_object)) - signal_error ("Font not available", value); - value = font_object; - } - set_lface_from_font (f, lface, value, 1); + + /* FIXME: + If frame is t, and selected frame is a tty frame, the font + can't be realized. An improvement would be to loop over frames + for a non-tty frame and use that. See discussion in + bug#18573. */ + if (f->terminal->type != output_termcap) + { + if (! FONT_OBJECT_P (value)) + { + Lisp_Object *attrs = XVECTOR (lface)->contents; + Lisp_Object font_object; + + font_object = font_load_for_lface (f, attrs, value); + if (NILP (font_object)) + signal_error ("Font not available", value); + value = font_object; + } + set_lface_from_font (f, lface, value, 1); + } } else ASET (lface, LFACE_FONT_INDEX, value); === modified file 'test/ChangeLog' --- test/ChangeLog 2014-09-26 00:15:21 +0000 +++ test/ChangeLog 2014-10-02 15:13:05 +0000 @@ -1,3 +1,10 @@ +2014-10-02 Glenn Morris + + * automated/package-test.el (with-package-test, package-test-signed): + Also set HOME to a temp value, in case the real one is absent (e.g. + hydra) or read-only. (Bug#18575) + (package-test-signed): Use skip-unless rather than expected-result. + 2014-09-26 Leo Liu * automated/cl-lib.el (cl-digit-char-p, cl-parse-integer): New === modified file 'test/automated/package-test.el' --- test/automated/package-test.el 2014-06-26 06:55:15 +0000 +++ test/automated/package-test.el 2014-10-02 15:13:05 +0000 @@ -89,6 +89,8 @@ "Set up temporary locations and variables for testing." (declare (indent 1)) `(let* ((package-test-user-dir (make-temp-file "pkg-test-user-dir-" t)) + (process-environment (cons (format "HOME=%s" package-test-user-dir) + process-environment)) (package-user-dir package-test-user-dir) (package-archives `(("gnu" . ,package-test-data-dir))) (old-yes-no-defn (symbol-function 'yes-or-no-p)) @@ -361,11 +363,15 @@ (ert-deftest package-test-signed () "Test verifying package signature." - :expected-result (condition-case nil - (progn + (skip-unless (ignore-errors + (let ((homedir (make-temp-file "package-test" t))) + (unwind-protect + (let ((process-environment + (cons (format "HOME=%s" homedir) + process-environment))) (epg-check-configuration (epg-configuration)) - :passed) - (error :failed)) + t) + (delete-directory homedir t))))) (let* ((keyring (expand-file-name "key.pub" package-test-data-dir)) (package-test-data-dir (expand-file-name "data/package/signed" package-test-file-dir))) ------------------------------------------------------------ revno: 118013 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2014-10-02 18:01:27 +0400 message: * alloc.c (mark_overlay): Assume that overlay boundaries are always markers. Add comment. * lread.c (read_internal_start): Use convenient validate_subarray. Adjust docstring. (Fread_from_string): Adjust docstring. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-10-02 12:27:19 +0000 +++ src/ChangeLog 2014-10-02 14:01:27 +0000 @@ -1,3 +1,11 @@ +2014-10-02 Dmitry Antipov + + * alloc.c (mark_overlay): Assume that overlay boundaries are + always markers. Add comment. + * lread.c (read_internal_start): Use convenient validate_subarray. + Adjust docstring. + (Fread_from_string): Adjust docstring. + 2014-10-02 Stefan Monnier * lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false. === modified file 'src/alloc.c' --- src/alloc.c 2014-09-30 20:17:36 +0000 +++ src/alloc.c 2014-10-02 14:01:27 +0000 @@ -6015,8 +6015,9 @@ for (; ptr && !ptr->gcmarkbit; ptr = ptr->next) { ptr->gcmarkbit = 1; - mark_object (ptr->start); - mark_object (ptr->end); + /* These two are always markers and can be marked fast. */ + XMARKER (ptr->start)->gcmarkbit = 1; + XMARKER (ptr->end)->gcmarkbit = 1; mark_object (ptr->plist); } } === modified file 'src/lread.c' --- src/lread.c 2014-10-01 03:28:16 +0000 +++ src/lread.c 2014-10-02 14:01:27 +0000 @@ -2096,9 +2096,10 @@ doc: /* Read one Lisp expression which is represented as text by STRING. Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX). FINAL-STRING-INDEX is an integer giving the position of the next - remaining character in STRING. -START and END optionally delimit a substring of STRING from which to read; - they default to 0 and (length STRING) respectively. */) +remaining character in STRING. START and END optionally delimit +a substring of STRING from which to read; they default to 0 and +(length STRING) respectively. Negative values are counted from +the end of STRING. */) (Lisp_Object string, Lisp_Object start, Lisp_Object end) { Lisp_Object ret; @@ -2109,10 +2110,9 @@ } /* Function to set up the global context we need in toplevel read - calls. */ + calls. START and END only used when STREAM is a string. */ static Lisp_Object read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end) -/* `start', `end' only used when stream is a string. */ { Lisp_Object retval; @@ -2134,25 +2134,9 @@ else string = XCAR (stream); - if (NILP (end)) - endval = SCHARS (string); - else - { - CHECK_NUMBER (end); - if (! (0 <= XINT (end) && XINT (end) <= SCHARS (string))) - args_out_of_range (string, end); - endval = XINT (end); - } + validate_subarray (string, start, end, SCHARS (string), + &startval, &endval); - if (NILP (start)) - startval = 0; - else - { - CHECK_NUMBER (start); - if (! (0 <= XINT (start) && XINT (start) <= endval)) - args_out_of_range (string, start); - startval = XINT (start); - } read_from_string_index = startval; read_from_string_index_byte = string_char_to_byte (string, startval); read_from_string_limit = endval; ------------------------------------------------------------ revno: 118012 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18598 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-10-02 09:26:23 -0400 message: * lisp/frame.el: Use lexical-binding. (make-frame): Use t rather than nil for tty's window-system. * lisp/startup.el (command-line): Use gui-method. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-10-02 03:19:32 +0000 +++ lisp/ChangeLog 2014-10-02 13:26:23 +0000 @@ -1,5 +1,9 @@ 2014-10-02 Stefan Monnier + * frame.el: Use lexical-binding (bug#18598). + (make-frame): Use t rather than nil for tty's window-system. + * startup.el (command-line): Use gui-method. + Consolidate management/ownership of selections. * select.el (gui-get-selection-alist): New method. (gui-get-selection): Use it. Rename from x-get-selection. === modified file 'lisp/frame.el' --- lisp/frame.el 2014-10-01 22:13:11 +0000 +++ lisp/frame.el 2014-10-02 13:26:23 +0000 @@ -1,4 +1,4 @@ -;;; frame.el --- multi-frame management independent of window systems +;;; frame.el --- multi-frame management independent of window systems -*- lexical-binding:t -*- ;; Copyright (C) 1993-1994, 1996-1997, 2000-2014 Free Software Foundation, Inc. @@ -680,7 +680,7 @@ ;; Now make the frame. (run-hooks 'before-make-frame-hook) (setq frame - (funcall (gui-method frame-creation-function w) params)) + (funcall (gui-method frame-creation-function (or w t)) params)) (normal-erase-is-backspace-setup-frame frame) ;; Inherit the original frame's parameters. (dolist (param frame-inherited-parameters) === modified file 'lisp/startup.el' --- lisp/startup.el 2014-10-01 22:13:11 +0000 +++ lisp/startup.el 2014-10-02 13:26:23 +0000 @@ -954,8 +954,7 @@ command-line-args)) ;; Initialize the window system. (Open connection, etc.) (funcall - (or (cdr (assq initial-window-system window-system-initialization-alist)) - (error "Unsupported window system `%s'" initial-window-system))) + (gui-method window-system-initialization (or initial-window-system t))) (put initial-window-system 'window-system-initialized t)) ;; If there was an error, print the error message and exit. (error ------------------------------------------------------------ revno: 118011 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-10-02 08:44:48 -0400 message: * simple.el (deactivate-mark): Fix typo. diff: === modified file 'lisp/simple.el' --- lisp/simple.el 2014-10-02 03:19:32 +0000 +++ lisp/simple.el 2014-10-02 12:44:48 +0000 @@ -4528,7 +4528,7 @@ ;; If another program has acquired the selection, region ;; deactivation should not clobber it (Bug#11772). ((and (/= (region-beginning) (region-end)) - (or (call-gui gui-selection-owner-p 'PRIMARY) + (or (gui-call gui-selection-owner-p 'PRIMARY) (null (gui-selection-exists-p 'PRIMARY)))) (gui-set-selection 'PRIMARY (funcall region-extract-function nil))))) ------------------------------------------------------------ revno: 118010 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2014-10-02 08:27:19 -0400 message: * src/lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-10-02 03:19:32 +0000 +++ src/ChangeLog 2014-10-02 12:27:19 +0000 @@ -1,5 +1,7 @@ 2014-10-02 Stefan Monnier + * lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false. + * nsselect.m (ns-own-selection-internal, ns-disown-selection-internal): Rename from the "x-" prefix. === modified file 'src/lisp.h' --- src/lisp.h 2014-10-01 03:28:16 +0000 +++ src/lisp.h 2014-10-02 12:27:19 +0000 @@ -4658,7 +4658,7 @@ /* Check whether stack-allocated strings are ASCII-only. */ -#ifdef ENABLE_CHECKING +#if defined (ENABLE_CHECKING) && USE_STACK_LISP_OBJECTS extern const char *verify_ascii (const char *); #else # define verify_ascii(str) (str) ------------------------------------------------------------ revno: 118009 fixes bug: http://debbugs.gnu.org/18300 committer: Kelvin White branch nick: trunk timestamp: Thu 2014-10-02 07:55:22 -0400 message: Use local variable to determine if buffers should be renamed diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2014-10-02 11:31:56 +0000 +++ lisp/erc/ChangeLog 2014-10-02 11:55:22 +0000 @@ -1,5 +1,10 @@ 2014-10-02 Kelvin White + * erc.el (erc-rename-buffer-p): When set to t buffers will be + renamed to the current irc network. + (erc-format-target-and/or-network): Use `erc-rename-buffer-p' when + renaming buffers. + * erc-ring.el (erc-input-ring-setup): Fixes Bug #18599 2014-09-30 Stefan Monnier === modified file 'lisp/erc/erc.el' --- lisp/erc/erc.el 2014-09-26 13:22:47 +0000 +++ lisp/erc/erc.el 2014-10-02 11:55:22 +0000 @@ -1792,6 +1792,10 @@ "Used to keep track of how many times an attempt at changing nick is made.") (make-variable-buffer-local 'erc-nick-change-attempt-count) +(defvar erc-rename-buffer-p nil + "When this is set to t, buffers will be renamed to network name if available") +(make-variable-buffer-local 'erc-rename-buffer-p) + (defun erc-migrate-modules (mods) "Migrate old names of ERC modules to new ones." ;; modify `transforms' to specify what needs to be changed @@ -6227,7 +6231,8 @@ "@" network-name)) ((and network-name (not (get-buffer network-name))) - (rename-buffer network-name) + (when erc-rename-buffer-p + (rename-buffer network-name)) network-name) (t (buffer-name (current-buffer)))))) ------------------------------------------------------------ revno: 118008 fixes bug: http://debbugs.gnu.org/18599 author: Ivan Shmakov committer: Kelvin White branch nick: trunk timestamp: Thu 2014-10-02 07:31:56 -0400 message: Do not reset input ring if one exists diff: === modified file 'lisp/erc/ChangeLog' --- lisp/erc/ChangeLog 2014-09-30 23:19:31 +0000 +++ lisp/erc/ChangeLog 2014-10-02 11:31:56 +0000 @@ -1,3 +1,7 @@ +2014-10-02 Kelvin White + + * erc-ring.el (erc-input-ring-setup): Fixes Bug #18599 + 2014-09-30 Stefan Monnier * erc-track.el (erc-modified-channels-display): Update all mode lines === modified file 'lisp/erc/erc-ring.el' --- lisp/erc/erc-ring.el 2014-02-10 01:34:22 +0000 +++ lisp/erc/erc-ring.el 2014-10-02 11:31:56 +0000 @@ -67,7 +67,8 @@ (defun erc-input-ring-setup () "Do the setup required so that we can use comint style input rings. Call this function when setting up the mode." - (setq erc-input-ring (make-ring comint-input-ring-size)) + (unless (ring-p erc-input-ring) + (setq erc-input-ring (make-ring comint-input-ring-size))) (setq erc-input-ring-index nil)) (defun erc-add-to-input-ring (s) ------------------------------------------------------------ revno: 118007 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-10-01 21:24:07 -0700 message: Rotate etc/NEWS files for version 25 diff: === added file 'etc/NEWS' --- etc/NEWS 1970-01-01 00:00:00 +0000 +++ etc/NEWS 2014-10-02 04:24:07 +0000 @@ -0,0 +1,357 @@ +GNU Emacs NEWS -- history of user-visible changes. + +Copyright (C) 2014 Free Software Foundation, Inc. +See the end of the file for license conditions. + +Please send Emacs bug reports to bug-gnu-emacs@gnu.org. +If possible, use M-x report-emacs-bug. + +This file is about changes in Emacs version 25. + +See files NEWS.24, NEWS.23, NEWS.22, NEWS.21, NEWS.20, NEWS.19, NEWS.18, +and NEWS.1-17 for changes in older Emacs versions. + +You can narrow news to a specific version by calling `view-emacs-news' +with a prefix argument or by typing C-u C-h C-n. + +Temporary note: ++++ indicates that all necessary documentation updates are complete. + (This means all relevant manuals in doc/ AND lisp doc-strings.) +--- means no change in the manuals is needed. +When you add a new item, use the appropriate mark if you are sure it applies, +otherwise leave it unmarked. + + +* Installation Changes in Emacs 25.1 + ++++ +** Building Emacs now requires C99 or later. + +** Building Emacs now requires GNU make, version 3.81 or later. + +** By default, Emacs no longer works on IRIX. We expect that Emacs +users are not affected by this, as SGI stopped supporting IRIX in +December 2013. If you are affected, please send a bug report. You +should be able to work around the problem either by porting the Emacs +undumping code to GCC under IRIX, or by configuring --with-wide-int, +or by sticking with Emacs 24.4. + +--- +** The configure option `--with-pkg-config-prog' has been removed. +Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. + +** The configure option '--enable-silent-rules' and the command +'make V=0' now do a better job of suppressing chatter. + + +* Startup Changes in Emacs 25.1 + + +* Changes in Emacs 25.1 + +** x-select-enable-clipboard is renamed gui-select-enable-clipboard. +Additionally it now also applies to OSX and GNUstep. + +** `insert-register' now leaves point after the inserted text +when called interactively. A prefix argument toggles this behavior. + +** New var `truncate-string-ellipsis' to choose how to indicate truncation. + +--- +** The default value of `history-length' has increased to 100. + ++++ +** The new variable `term-file-aliases' replaces some files from lisp/term. +The function `tty-run-terminal-initialization' consults this variable +when deciding what terminal-specific initialization code to run. + +--- +** New variable `system-configuration-features', listing some of the +main features that Emacs was compiled with. This is mainly intended +for use in Emacs bug reports. + ++++ +** A password is now hidden also when typed in batch mode. Another +hiding character but the default `.' can be used by let-binding the +variable `read-hide-char'. + +** The new functions `string-collate-lessp' and `string-collate-equalp' +preserve the collation order as defined by the system's locale(1) +environment. For the time being this is implemented for modern POSIX +systems and for MS-Windows, for other systems they fall back to their +counterparts `string-lessp' and `string-equal'. + +*** The ls-lisp package uses `string-collate-lessp' to sort file names. +If you want the old, locale-independent sorting, customize the new +option `ls-lisp-use-string-collate' to a nil value. + +*** The MS-Windows specific variable `w32-collate-ignore-punctuation', +if set to a non-nil value, causes the above 2 functions to ignore +symbol and punctuation characters when collating strings. This +emulates the behavior of modern Posix platforms when the locale's +codeset is "UTF-8" (as in "en_US.UTF-8"). This is needed because +MS-Windows doesn't support UTF-8 as codeset in its locales. + + +* Editing Changes in Emacs 25.1 + +** Emacs now supports "bracketed paste mode" when running on a terminal +that supports it. This facility allows Emacs to understand pasted +chunks of text as strings to be inserted, instead of interpreting each +character in the pasted text as actual user input. This results in a +paste experience similar to that under a window system, and significant +performance improvements when pasting large amounts of text. + + +* Changes in Specialized Modes and Packages in Emacs 25.1 + +** ElDoc +*** New minor mode global-eldoc-mode +*** eldoc-documentation-function now defaults to nil + +** pcase +*** New UPatterns `quote' and `app'. +*** New UPatterns can be defined with `pcase-defmacro'. + +** Lisp mode +*** Strings after `:documentation' are highlighted as docstrings. + +** Rectangle editing +*** Rectangle Mark mode can have corners past EOL or in the middle of a TAB. +*** C-x C-x in rectangle-mark-mode now cycles through the four corners. +*** `string-rectangle' provides on-the-fly preview of the result. + ++++ +** Macro `pcase' now supports vector qpattern. + +** New font-lock functions font-lock-ensure and font-lock-flush, which +should be used instead of font-lock-fontify-buffer when called from Elisp. + +** Macro `minibuffer-with-setup-hook' takes (:append FUN) to mean +appending FUN to `minibuffer-setup-hook'. + +** Calendar and diary + ++++ +*** New commands to insert diary entries with Chinese dates: +`diary-chinese-insert-anniversary-entry' `diary-chinese-insert-entry' +`diary-chinese-insert-monthly-entry', `diary-chinese-insert-yearly-entry'. + ++++ +*** Calendar can list and mark diary entries with Chinese dates. +See `diary-chinese-list-entries' and `diary-chinese-mark-entries'. + +*** The mode line of the calendar buffer will not be modified if +`calendar-mode-line-format' is nil. + +** New ERT function `ert-summarize-tests-batch-and-exit'. + +--- +** The Rmail commands d, C-d and u now handle repeat counts to delete or +undelete multiple messages. + +** Rmail can now render HTML mail messages if your Emacs was built with +libxml2 or if you have the Lynx browser installed. By default, Rmail +will display the HTML version of a mail message that has both HTML and +plain text parts, if display of HTML email is possible; customize the +`rmail-mime-prefer-html' option to `nil' if you don't want that. + +** SES now supports local printer functions; see `ses-define-local-printer'. + +** In sh-mode, you can now use `sh-shell' as a file-local variable to +specify the type of shell in use (bash, csh, etc). + +** The URL package accepts now the protocols "ssh", "scp" and "rsync". +When `url-handler-mode' is enabled, file operations for these +protocols as well as for "telnet" and "ftp" are passed to Tramp. + +** Tramp + +*** New connection method "nc", which allows to access dumb busyboxes. + +** SQL mode + +*** New user variable `sql-default-directory' enables remote +connections using Tramp. + +*** New command `sql-send-line-and-next' sends the current line to the +interactive buffer and advances to the next line, skipping whitespace +and comments. + +*** Add support for Vertica SQL. + +** VC and related modes + +*** New option `vc-annotate-background-mode' controls whether +the color range from `vc-annotate-color-map' is applied to the +background or to the foreground. + +** Calculator: decimal display mode uses "," groups, so it's more +fitting for use in money calculations; factorial works with +non-integer inputs. + +** HideIfDef mode now support full C/C++ expressions, argumented macro expansions +, interactive macro evaluation and automatic scanning of #defined symbols. + +*** New custom variable `hide-ifdef-header-regexp' to define C/C++ header file +name patterns. Default case-insensitive .h, .hh, .hpp and .hxx. +*** New custom variable `hide-ifdef-expand-reinclusion-protection' to prevent +reinclusion protected header files from being fully hidden. +*** New custom variable `hide-ifdef-exclude-define-regexp' to define symbol +name patterns (e.x. all "FOR_DOXYGEN_ONLY_*") to be excluded. + +** TeX mode + +*** New custom variable `tex-print-file-extension' to help users who +use PDF instead of DVI. + +** Obsolete packages + +--- +*** gulp.el + +--- +*** crisp.el, tpu-edt.el, ws-mode.el +These emulations of old editors are believed to be no longer relevant + - contact emacs-devel@gnu.org if you disagree. + +--- +*** vi.el, vip.el (try M-x viper instead) + + +* New Modes and Packages in Emacs 25.1 + + +* Incompatible Lisp Changes in Emacs 25.1 + +** window-configurations no longer record the buffers's marks. + +** inhibit-modification-hooks now also inhibits lock-file checks, as well as +active region handling. + +** deactivate-mark is now buffer-local. + +** `cl-the' now asserts that its argument is of the given type. + ++++ +** Mouse click events on mode line or header line no longer include +any reference to a buffer position. The 6th member of the mouse +position list returned for such events is now nil. + +** Menu items in keymaps do not support the "key shortcut cache" any more. +These slots used to hold key-shortcut data, but have been obsolete since +Emacs-21. + + +* Lisp Changes in Emacs 25.1 + +** Some "x-*" were obsoleted: +*** x-select-text is renamed gui-select-text. +*** x-get-selection is renamed gui-get-selection. +*** x-get-clipboard and x-clipboard-yank are marked obsolete. +*** x-get-selection-value is renamed to gui-get-primary-selection. +*** x-set-selection is renamed to gui-set-selection + +** call-process-shell-command and process-file-shell-command +don't take "&rest args" any more. + +** New function `alist-get', which is also a valid place (aka lvalue). + +** New function `funcall-interactively', which works like `funcall' +but makes `called-interactively-p' treat the function as (you guessed it) +called interactively. + +** New function `function-put' to use instead of `put' for function properties. + ++++ +** New properties that can be specified with `declare': +*** (interactive-only INSTEAD), says to use INSTEAD for non-interactive use. +*** (pure VAL), if VAL is non-nil, indicates the function is pure. +*** (side-effect-free VAL), if VAL is non-nil, indicates the function does not +have side effects. + ++++ +** New macro `with-file-modes', for evaluating expressions with default file +permissions set to temporary values (e.g., for creating private files). + +** You can access the slots of structures using `cl-struct-slot-value'. + +** Functions `rmail-delete-forward' and `rmail-delete-backward' take an +optional repeat-count argument. + +** Function `sort' can deal with vectors. + +--- +** New utilities in subr-x.el: +*** New macros `if-let' and `when-let' allow defining bindings and to + execute code depending whether all values are true. +*** New macros `thread-first' and `thread-last' allow threading a form + as the first or last argument of subsequent forms. + + +* Changes in Frames and Windows Code in Emacs 25.1 + +** Emacs can now draw horizontal scroll bars on some platforms that +provide toolkit scroll bars, namely Gtk, Lucid, Motif and Windows. +Horizontal scroll bars are turned off by default. +*** New function `horizontal-scroll-bars-available-p' telling whether + horizontal scroll bars are available on the underlying system. +*** New mode `horizontal-scroll-bar-mode' to toggle horizontal scroll + bars on all existing and future frames. +*** New frame parameters `horizontal-scroll-bars' and + `scroll-bar-height' to set horizontal scroll bars and their height + for individual frames and in `default-frame-alist'. +*** New function `frame-scroll-bar-height' to return the height of + horizontal scroll bars on a specific frame. +*** `set-window-scroll-bars' now accepts five parameters where the last + two specify height and type of the window's horizontal scroll bar. + +** The height of a frame's menu and tool bar are no more counted in the +frame's text height. This means that the text height stands only for +the height of the frame's root window plus that of the echo area (if +present). This was already the behavior for frames with external tool +and menu bars (like in the Gtk builds) but has now been extended to all +builds. + +** Frames now do not necessarily preserve the number of columns or lines +they display when setting default font, menu bar, fringe width, or +scroll bars. In particular, maximized and fullscreen frames are +conceptually never resized if such settings change. For fullheight and +fullwidth frames, the behavior may depend on the toolkit used. +*** New option `frame-inhibit-implied-resize' if non-nil, means that + setting default font, menu bar, fringe width, or scroll bars of a + specific frame does not resize that frame in order to preserve the + number of columns or lines it displays. + + +* Changes in Emacs 25.1 on Non-Free Operating Systems + +--- +** Building Emacs for MS-Windows requires at least Windows XP +or Windows Server 2003. The built binaries still run on all versions +of Windows starting with Windows 9X. + + + +---------------------------------------------------------------------- +This file is part of GNU Emacs. + +GNU Emacs is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs. If not, see . + + +Local variables: +coding: utf-8 +mode: outline +paragraph-separate: "[ ]*$" +end: === renamed file 'etc/NEWS' => 'etc/NEWS.24' --- etc/NEWS 2014-10-02 03:19:32 +0000 +++ etc/NEWS.24 2014-10-02 04:24:07 +0000 @@ -14,322 +14,6 @@ You can narrow news to a specific version by calling `view-emacs-news' with a prefix argument or by typing C-u C-h C-n. -Temporary note: -+++ indicates that all necessary documentation updates are complete. - (This means all relevant manuals in doc/ AND lisp doc-strings.) ---- means no change in the manuals is needed. -When you add a new item, use the appropriate mark if you are sure it applies, -otherwise leave it unmarked. - - -* Installation Changes in Emacs 25.1 - -+++ -** Building Emacs now requires C99 or later. - -** Building Emacs now requires GNU make, version 3.81 or later. - -** By default, Emacs no longer works on IRIX. We expect that Emacs -users are not affected by this, as SGI stopped supporting IRIX in -December 2013. If you are affected, please send a bug report. You -should be able to work around the problem either by porting the Emacs -undumping code to GCC under IRIX, or by configuring --with-wide-int, -or by sticking with Emacs 24.4. - ---- -** The configure option `--with-pkg-config-prog' has been removed. -Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. - -** The configure option '--enable-silent-rules' and the command -'make V=0' now do a better job of suppressing chatter. - - -* Startup Changes in Emacs 25.1 - - -* Changes in Emacs 25.1 - -** x-select-enable-clipboard is renamed gui-select-enable-clipboard. -Additionally it now also applies to OSX and GNUstep. - -** `insert-register' now leaves point after the inserted text -when called interactively. A prefix argument toggles this behavior. - -** New var `truncate-string-ellipsis' to choose how to indicate truncation. - ---- -** The default value of `history-length' has increased to 100. - -+++ -** The new variable `term-file-aliases' replaces some files from lisp/term. -The function `tty-run-terminal-initialization' consults this variable -when deciding what terminal-specific initialization code to run. - ---- -** New variable `system-configuration-features', listing some of the -main features that Emacs was compiled with. This is mainly intended -for use in Emacs bug reports. - -+++ -** A password is now hidden also when typed in batch mode. Another -hiding character but the default `.' can be used by let-binding the -variable `read-hide-char'. - -** The new functions `string-collate-lessp' and `string-collate-equalp' -preserve the collation order as defined by the system's locale(1) -environment. For the time being this is implemented for modern POSIX -systems and for MS-Windows, for other systems they fall back to their -counterparts `string-lessp' and `string-equal'. - -*** The ls-lisp package uses `string-collate-lessp' to sort file names. -If you want the old, locale-independent sorting, customize the new -option `ls-lisp-use-string-collate' to a nil value. - -*** The MS-Windows specific variable `w32-collate-ignore-punctuation', -if set to a non-nil value, causes the above 2 functions to ignore -symbol and punctuation characters when collating strings. This -emulates the behavior of modern Posix platforms when the locale's -codeset is "UTF-8" (as in "en_US.UTF-8"). This is needed because -MS-Windows doesn't support UTF-8 as codeset in its locales. - - -* Editing Changes in Emacs 25.1 - -** Emacs now supports "bracketed paste mode" when running on a terminal -that supports it. This facility allows Emacs to understand pasted -chunks of text as strings to be inserted, instead of interpreting each -character in the pasted text as actual user input. This results in a -paste experience similar to that under a window system, and significant -performance improvements when pasting large amounts of text. - - -* Changes in Specialized Modes and Packages in Emacs 25.1 - -** ElDoc -*** New minor mode global-eldoc-mode -*** eldoc-documentation-function now defaults to nil - -** pcase -*** New UPatterns `quote' and `app'. -*** New UPatterns can be defined with `pcase-defmacro'. - -** Lisp mode -*** Strings after `:documentation' are highlighted as docstrings. - -** Rectangle editing -*** Rectangle Mark mode can have corners past EOL or in the middle of a TAB. -*** C-x C-x in rectangle-mark-mode now cycles through the four corners. -*** `string-rectangle' provides on-the-fly preview of the result. - -+++ -** Macro `pcase' now supports vector qpattern. - -** New font-lock functions font-lock-ensure and font-lock-flush, which -should be used instead of font-lock-fontify-buffer when called from Elisp. - -** Macro `minibuffer-with-setup-hook' takes (:append FUN) to mean -appending FUN to `minibuffer-setup-hook'. - -** Calendar and diary - -+++ -*** New commands to insert diary entries with Chinese dates: -`diary-chinese-insert-anniversary-entry' `diary-chinese-insert-entry' -`diary-chinese-insert-monthly-entry', `diary-chinese-insert-yearly-entry'. - -+++ -*** Calendar can list and mark diary entries with Chinese dates. -See `diary-chinese-list-entries' and `diary-chinese-mark-entries'. - -*** The mode line of the calendar buffer will not be modified if -`calendar-mode-line-format' is nil. - -** New ERT function `ert-summarize-tests-batch-and-exit'. - ---- -** The Rmail commands d, C-d and u now handle repeat counts to delete or -undelete multiple messages. - -** Rmail can now render HTML mail messages if your Emacs was built with -libxml2 or if you have the Lynx browser installed. By default, Rmail -will display the HTML version of a mail message that has both HTML and -plain text parts, if display of HTML email is possible; customize the -`rmail-mime-prefer-html' option to `nil' if you don't want that. - -** SES now supports local printer functions; see `ses-define-local-printer'. - -** In sh-mode, you can now use `sh-shell' as a file-local variable to -specify the type of shell in use (bash, csh, etc). - -** The URL package accepts now the protocols "ssh", "scp" and "rsync". -When `url-handler-mode' is enabled, file operations for these -protocols as well as for "telnet" and "ftp" are passed to Tramp. - -** Tramp - -*** New connection method "nc", which allows to access dumb busyboxes. - -** SQL mode - -*** New user variable `sql-default-directory' enables remote -connections using Tramp. - -*** New command `sql-send-line-and-next' sends the current line to the -interactive buffer and advances to the next line, skipping whitespace -and comments. - -*** Add support for Vertica SQL. - -** VC and related modes - -*** New option `vc-annotate-background-mode' controls whether -the color range from `vc-annotate-color-map' is applied to the -background or to the foreground. - -** Calculator: decimal display mode uses "," groups, so it's more -fitting for use in money calculations; factorial works with -non-integer inputs. - -** HideIfDef mode now support full C/C++ expressions, argumented macro expansions -, interactive macro evaluation and automatic scanning of #defined symbols. - -*** New custom variable `hide-ifdef-header-regexp' to define C/C++ header file -name patterns. Default case-insensitive .h, .hh, .hpp and .hxx. -*** New custom variable `hide-ifdef-expand-reinclusion-protection' to prevent -reinclusion protected header files from being fully hidden. -*** New custom variable `hide-ifdef-exclude-define-regexp' to define symbol -name patterns (e.x. all "FOR_DOXYGEN_ONLY_*") to be excluded. - -** TeX mode - -*** New custom variable `tex-print-file-extension' to help users who -use PDF instead of DVI. - -** Obsolete packages - ---- -*** gulp.el - ---- -*** crisp.el, tpu-edt.el, ws-mode.el -These emulations of old editors are believed to be no longer relevant - - contact emacs-devel@gnu.org if you disagree. - ---- -*** vi.el, vip.el (try M-x viper instead) - - -* New Modes and Packages in Emacs 25.1 - - -* Incompatible Lisp Changes in Emacs 25.1 - -** window-configurations no longer record the buffers's marks. - -** inhibit-modification-hooks now also inhibits lock-file checks, as well as -active region handling. - -** deactivate-mark is now buffer-local. - -** `cl-the' now asserts that its argument is of the given type. - -+++ -** Mouse click events on mode line or header line no longer include -any reference to a buffer position. The 6th member of the mouse -position list returned for such events is now nil. - -** Menu items in keymaps do not support the "key shortcut cache" any more. -These slots used to hold key-shortcut data, but have been obsolete since -Emacs-21. - - -* Lisp Changes in Emacs 25.1 - -** Some "x-*" were obsoleted: -*** x-select-text is renamed gui-select-text. -*** x-get-selection is renamed gui-get-selection. -*** x-get-clipboard and x-clipboard-yank are marked obsolete. -*** x-get-selection-value is renamed to gui-get-primary-selection. -*** x-set-selection is renamed to gui-set-selection - -** call-process-shell-command and process-file-shell-command -don't take "&rest args" any more. - -** New function `alist-get', which is also a valid place (aka lvalue). - -** New function `funcall-interactively', which works like `funcall' -but makes `called-interactively-p' treat the function as (you guessed it) -called interactively. - -** New function `function-put' to use instead of `put' for function properties. - -+++ -** New properties that can be specified with `declare': -*** (interactive-only INSTEAD), says to use INSTEAD for non-interactive use. -*** (pure VAL), if VAL is non-nil, indicates the function is pure. -*** (side-effect-free VAL), if VAL is non-nil, indicates the function does not -have side effects. - -+++ -** New macro `with-file-modes', for evaluating expressions with default file -permissions set to temporary values (e.g., for creating private files). - -** You can access the slots of structures using `cl-struct-slot-value'. - -** Functions `rmail-delete-forward' and `rmail-delete-backward' take an -optional repeat-count argument. - -** Function `sort' can deal with vectors. - ---- -** New utilities in subr-x.el: -*** New macros `if-let' and `when-let' allow defining bindings and to - execute code depending whether all values are true. -*** New macros `thread-first' and `thread-last' allow threading a form - as the first or last argument of subsequent forms. - - -* Changes in Frames and Windows Code in Emacs 25.1 - -** Emacs can now draw horizontal scroll bars on some platforms that -provide toolkit scroll bars, namely Gtk, Lucid, Motif and Windows. -Horizontal scroll bars are turned off by default. -*** New function `horizontal-scroll-bars-available-p' telling whether - horizontal scroll bars are available on the underlying system. -*** New mode `horizontal-scroll-bar-mode' to toggle horizontal scroll - bars on all existing and future frames. -*** New frame parameters `horizontal-scroll-bars' and - `scroll-bar-height' to set horizontal scroll bars and their height - for individual frames and in `default-frame-alist'. -*** New function `frame-scroll-bar-height' to return the height of - horizontal scroll bars on a specific frame. -*** `set-window-scroll-bars' now accepts five parameters where the last - two specify height and type of the window's horizontal scroll bar. - -** The height of a frame's menu and tool bar are no more counted in the -frame's text height. This means that the text height stands only for -the height of the frame's root window plus that of the echo area (if -present). This was already the behavior for frames with external tool -and menu bars (like in the Gtk builds) but has now been extended to all -builds. - -** Frames now do not necessarily preserve the number of columns or lines -they display when setting default font, menu bar, fringe width, or -scroll bars. In particular, maximized and fullscreen frames are -conceptually never resized if such settings change. For fullheight and -fullwidth frames, the behavior may depend on the toolkit used. -*** New option `frame-inhibit-implied-resize' if non-nil, means that - setting default font, menu bar, fringe width, or scroll bars of a - specific frame does not resize that frame in order to preserve the - number of columns or lines it displays. - -* Changes in Emacs 25.1 on Non-Free Operating Systems - ---- -** Building Emacs for MS-Windows requires at least Windows XP -or Windows Server 2003. The built binaries still run on all versions -of Windows starting with Windows 9X. - * Installation Changes in Emacs 24.4 ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.