Commit 190644a0 authored by Glenn Morris's avatar Glenn Morris
Browse files

Merge from emacs-24; up to 2014-06-25T10:17:41Z!

parents 4d6abf24 ef3b7194
2014-07-21 Glenn Morris <>
* emacs.texi (Intro): Workaround makeinfo 4 @acronym bug. (Bug#18040)
2014-07-09 Juri Linkov <>
* search.texi (Regexp Search): Update lax space matching that is
......@@ -1476,7 +1476,16 @@ Neal Ziring, Teodor Zlatanov, and Detlev Zundel.
You are reading about GNU Emacs, the GNU incarnation of the
advanced, self-documenting, customizable, extensible editor Emacs.
(The @samp{G} in @acronym{GNU, @acronym{GNU}'s Not Unix} is not silent.)
(The @samp{G} in
@c Workaround makeinfo 4 bug.
@acronym{GNU, @acronym{GNU}'s Not Unix}
@end iftex
@acronym{GNU, GNU's Not Unix}
@end ifnottex
is not silent.)
We call Emacs @dfn{advanced} because it can do much more than simple
insertion and deletion of text. It can control subprocesses, indent
......@@ -870,6 +870,22 @@ display a "Homepage" header.)
** In Prolog mode, `prolog-use-smie' has been removed,
along with the non-SMIE indentation code.
** Python mode
*** Out of the box support for CPython, iPython and readline based shells.
**** `python-shell-completion-module-string-code` is no longer used.
*** Automatic shell prompt detection. New user options:
**** `python-shell-interpreter-interactive-arg'.
**** `python-shell-prompt-detect-enabled'.
**** `python-shell-prompt-detect-failure-warning'.
**** `python-shell-prompt-input-regexps'.
**** `python-shell-prompt-output-regexps'.
*** Python shell support for remote hosts via tramp.
*** Correct display of line numbers for code sent to the Python shell.
** Remember
*** The new command `remember-notes' creates a buffer that is saved on exit.
2014-07-21 Glenn Morris <>
* progmodes/hideif.el (hide-ifdef-mode-submap):
Also substitute read-only-mode.
* bindings.el (mode-line-toggle-read-only):
* bs.el (bs-toggle-readonly):
* buff-menu.el (Buffer-menu-toggle-read-only):
* dired.el (dired-toggle-read-only):
* files.el (view-read-only, find-file-read-only)
* progmodes/hideif.el (hide-ifdef-toggle-outside-read-only):
Doc fixes re toggle-read-only.
2014-07-21 Fabián Ezequiel Gallina <>
* progmodes/python.el: Add comment about pipe buffering and
solutions for missing/delayed output in inferior Python shells.
* progmodes/python.el (python-mode): Don't set
mode-require-final-newline. (Bug#17990)
Make python.el work with IPython automatically. (Bug#15510)
* progmodes/python.el:
(python-shell-completion-setup-code): New value supporting iPython.
(python-shell-completion-string-code): New value supporting iPython.
(python-shell-completion-get-completions): Use them.
(python-shell-completion-module-string-code): Make obsolete.
(python-shell-prompt-output-regexps): Add safeguard for ipdb.
(python-shell-output-filter): Fix comment typo.
Fix Python shell prompts detection for remote hosts.
* progmodes/python.el (python-shell-prompt-detect): Replace
call-process with process-file and make it more robust.
Autodetect Python shell prompts. (Bug#17370)
* progmodes/python.el:
(python-shell-prompt-output-regexps): New vars.
(python-shell-prompt-calculated-output-regexp): New vars.
(python-shell-completion-get-completions): Use them.
(python-shell-prompt-validate-regexps): New functions.
(python-shell-prompt-set-calculated-regexps): New function.
(inferior-python-mode): Use it. Also honor overriden
python-shell-interpreter and python-shell-interpreter-args.
(python-shell-make-comint): Honor overriden
python-shell-interpreter and python-shell-interpreter-args.
(python-shell-get-or-create-process): Make it testable by allowing
to call run-python non-interactively.
(python-util-valid-regexp-p): New function.
(python-shell-prompt-regexp, python-shell-prompt-block-regexp)
(python-shell-prompt-pdb-regexp): Use it as defcustom :safe.
2014-07-21 Stefan Monnier <>
* emacs-lisp/smie.el (smie-config--guess-1): Split from
......@@ -36,7 +36,7 @@ corresponding to the mode line clicked."
(defun mode-line-toggle-read-only (event)
"Like `toggle-read-only', for the mode-line."
"Like toggling `read-only-mode', for the mode-line."
(interactive "e")
(with-selected-window (posn-window (event-start event))
(read-only-mode 'toggle)))
......@@ -954,7 +954,7 @@ Default is `bs--current-sort-function'."
(defun bs-toggle-readonly ()
"Toggle read-only status for buffer on current line.
Uses function `toggle-read-only'."
Uses function `read-only-mode'."
(with-current-buffer (bs--current-buffer)
(read-only-mode 'toggle))
......@@ -539,7 +539,7 @@ The current window remains selected."
(defun Buffer-menu-toggle-read-only ()
"Toggle read-only status of buffer on this line.
This behaves like invoking \\[toggle-read-only] in that buffer."
This behaves like invoking \\[read-only-mode] in that buffer."
(let ((read-only
(with-current-buffer (Buffer-menu-buffer t)
......@@ -2015,7 +2015,7 @@ Actual changes in files cannot be undone by Emacs."))
"Edit Dired buffer with Wdired, or make it read-only.
If the current buffer can be edited with Wdired, (i.e. the major
mode is `dired-mode'), call `wdired-change-to-wdired-mode'.
Otherwise, call `toggle-read-only'."
Otherwise, toggle `read-only-mode'."
(if (derived-mode-p 'dired-mode)
......@@ -564,7 +564,7 @@ A value of nil means ignore them; anything else means query."
In fact, this means that all read-only buffers normally have
View mode enabled, including buffers that are read-only because
you visit a file you cannot alter, and buffers you make read-only
using \\[toggle-read-only]."
using \\[read-only-mode]."
:type 'boolean
:group 'view)
......@@ -1502,7 +1502,7 @@ file names with wildcards."
(defun find-file-read-only (filename &optional wildcards)
"Edit file FILENAME but don't allow changes.
Like \\[find-file], but marks buffer as read-only.
Use \\[toggle-read-only] to permit editing."
Use \\[read-only-mode] to permit editing."
(find-file-read-args "Find file read-only: "
......@@ -1511,7 +1511,7 @@ Use \\[toggle-read-only] to permit editing."
(defun find-file-read-only-other-window (filename &optional wildcards)
"Edit file FILENAME in another window but don't allow changes.
Like \\[find-file-other-window], but marks buffer as read-only.
Use \\[toggle-read-only] to permit editing."
Use \\[read-only-mode] to permit editing."
(find-file-read-args "Find file read-only other window: "
......@@ -1520,7 +1520,7 @@ Use \\[toggle-read-only] to permit editing."
(defun find-file-read-only-other-frame (filename &optional wildcards)
"Edit file FILENAME in another frame but don't allow changes.
Like \\[find-file-other-frame], but marks buffer as read-only.
Use \\[toggle-read-only] to permit editing."
Use \\[read-only-mode] to permit editing."
(find-file-read-args "Find file read-only other frame: "
......@@ -188,6 +188,9 @@ Effective only if `hide-ifdef-expand-reinclusion-protection' is t."
(define-key map "\C-q" 'hide-ifdef-toggle-read-only)
(define-key map "\C-w" 'hide-ifdef-toggle-shadowing)
'read-only-mode 'hide-ifdef-toggle-outside-read-only map)
;; `toggle-read-only' is obsoleted by `read-only-mode'.
'toggle-read-only 'hide-ifdef-toggle-outside-read-only map)
......@@ -1789,7 +1792,7 @@ It does not do the work that's pointless to redo on a recursive entry."
(defun hide-ifdef-toggle-outside-read-only ()
"Replacement for `toggle-read-only' within Hide-Ifdef mode."
"Replacement for `read-only-mode' within Hide-Ifdef mode."
(setq hif-outside-read-only (not hif-outside-read-only))
(message "Read only %s"
This diff is collapsed.
......@@ -491,12 +491,12 @@ Entry to view-mode runs the normal hook `view-mode-hook'."
(defun view--disable ()
(remove-hook 'change-major-mode-hook 'view--disable t)
(and view-overlay (delete-overlay view-overlay))
;; Calling toggle-read-only while View mode is enabled
;; Calling read-only-mode while View mode is enabled
;; sets view-read-only to t as a buffer-local variable
;; after exiting View mode. That arranges that the next toggle-read-only
;; after exiting View mode. That arranges that the next read-only-mode
;; will reenable View mode.
;; Canceling View mode in any other way should cancel that, too,
;; so that View mode stays off if toggle-read-only is called.
;; so that View mode stays off if read-only-mode is called.
(if (local-variable-p 'view-read-only)
(kill-local-variable 'view-read-only))
(if (boundp 'Helper-return-blurb)
2014-07-21 Jan Djärv <>
* nsterm.m (applicationDidFinishLaunching:): Call
antialiasThresholdDidChange, register for antialias changes (Bug#17534).
(antialiasThresholdDidChange:): New method for EmacsApp.
* nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
* macfont.m (macfont_update_antialias_threshold): Remove static.
* macfont.h (macfont_update_antialias_threshold): Declare.
2014-07-21 Eli Zaretskii <>
* w32select.c (setup_windows_coding_system): Apply
CODING_ANNOTATION_MASK to the common_flags member of struct
coding_system. Reported by martin rudalics <>.
* w16select.c (Fw16_get_clipboard_data): Apply
CODING_ANNOTATION_MASK to the common_flags member of struct
* xdisp.c (init_iterator): Initialize it->stop_charpos to the
buffer position where we are to start the iteration.
(handle_invisible_prop): Record in it->stop_charpos the position
where the invisible text ends. (Bug#18035)
(hscroll_window_tree): Don't try hscrolling windows whose cursor
row has zero buffer position as their start position. Reported by
martin rudalics <>.
* xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
infinite looping in redisplay when display lines don't have enough
space to display even a single character. (Bug#18036)
2014-07-20 Dmitry Antipov <>
* frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
......@@ -144,4 +144,5 @@ typedef const struct _EmacsScreenFont *ScreenFontRef; /* opaque */
extern void mac_register_font_driver (struct frame *f);
extern void *macfont_get_nsctfont (struct font *font);
extern void macfont_update_antialias_threshold (void);
......@@ -728,7 +728,7 @@ static void mac_font_get_glyphs_for_variants (CFDataRef, UTF32Char,
static CGFloat macfont_antialias_threshold;
static void
macfont_update_antialias_threshold (void)
int threshold;
......@@ -111,6 +111,7 @@ typedef float EmacsCGFloat;
- (void)logNotification: (NSNotification *)notification;
- (void)antialiasThresholdDidChange:(NSNotification *)notification;
- (void)sendEvent: (NSEvent *)theEvent;
- (void)showPreferencesWindow: (id)sender;
- (BOOL) openFile: (NSString *)fileName;
......@@ -4670,9 +4670,30 @@ - (void)applicationDidFinishLaunching: (NSNotification *)notification
((EmacsApp *)self)->applicationDidFinishLaunchingCalled = YES;
[NSApp setServicesProvider: NSApp];
[self antialiasThresholdDidChange:nil];
[[NSNotificationCenter defaultCenter]
ns_send_appdefined (-2);
- (void)antialiasThresholdDidChange:(NSNotification *)notification
macfont_update_antialias_threshold ();
/* Termination sequences:
C-x C-c:
......@@ -600,7 +600,7 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat
coding.mode |= CODING_MODE_LAST_BLOCK;
/* We explicitly disable composition handling because selection
data should not contain any composition sequence. */
coding.common_flags &= ~CODING_ANNOTATION_MASK;
decode_coding_object (&coding, Qnil, 0, 0, truelen, truelen, Qt);
ret = coding.dst_object;
Vlast_coding_system_used = CODING_ID_NAME (;
......@@ -670,7 +670,7 @@ setup_windows_coding_system (Lisp_Object coding_system,
which both apply to ISO6429 only. We don't know if these really
need to be unset on Windows, but it probably doesn't hurt
either. */
coding->mode &= ~CODING_ANNOTATION_MASK;
coding->common_flags &= ~CODING_ANNOTATION_MASK;
......@@ -3034,6 +3034,7 @@ init_iterator (struct it *it, struct window *w,
getting overlays and face properties from that position. */
if (charpos >= BUF_BEG (current_buffer))
it->stop_charpos = charpos;
it->end_charpos = ZV;
eassert (charpos == BYTE_TO_CHAR (bytepos));
IT_CHARPOS (*it) = charpos;
......@@ -4546,7 +4547,24 @@ handle_invisible_prop (struct it *it)
&& get_overlay_strings (it, it->stop_charpos))
it->stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p;
if (it->sp > 0)
it->stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p;
/* The call to get_overlay_strings above recomputes
it->stop_charpos, but it only considers changes
in properties and overlays beyond iterator's
current position. This causes us to miss changes
that happen exactly where the invisible property
ended. So we play it safe here and force the
iterator to check for potential stop positions
immediately after the invisible text. Note that
if get_overlay_strings returns non-zero, it
normally also pushed the iterator stack, so we
need to update the stop position in the slot
below the current one. */
it->stack[it->sp - 1].stop_charpos
= CHARPOS (it->stack[it->sp - 1].current.pos);
else if (display_ellipsis_p)
......@@ -9351,7 +9369,7 @@ move_it_vertically_backward (struct it *it, int dy)
/* Estimate how many newlines we must move back. */
nlines = max (1, dy / default_line_pixel_height (it->w));
if (it->line_wrap == TRUNCATE)
if (it->line_wrap == TRUNCATE || nchars_per_row == 0)
pos_limit = BEGV;
pos_limit = max (start_pos - nlines * nchars_per_row, BEGV);
......@@ -9606,7 +9624,7 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos)
/* Go back -DVPOS buffer lines, but no farther than -DVPOS full
screen lines, and reseat the iterator there. */
start_charpos = IT_CHARPOS (*it);
if (it->line_wrap == TRUNCATE)
if (it->line_wrap == TRUNCATE || nchars_per_row == 0)
pos_limit = BEGV;
pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV);
......@@ -12847,6 +12865,13 @@ hscroll_window_tree (Lisp_Object window)
h_margin = hscroll_margin * WINDOW_FRAME_COLUMN_WIDTH (w);
if (!NILP (Fbuffer_local_value (Qauto_hscroll_mode, w->contents))
/* In some pathological cases, like restoring a window
configuration into a frame that is much smaller than
the one from which the configuration was saved, we
get glyph rows whose start and end have zero buffer
positions, which we cannot handle below. Just skip
such windows. */
&& CHARPOS (cursor_row->start.pos) >= BUF_BEG (w->contents)
/* For left-to-right rows, hscroll when cursor is either
(i) inside the right hscroll margin, or (ii) if it is
inside the left margin and the window is already
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment