[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117809: Merge from emacs-24; up to r117476
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r117809: Merge from emacs-24; up to r117476 |
Date: |
Wed, 03 Sep 2014 04:22:19 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117809 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2014-09-02 21:21:40 -0700
message:
Merge from emacs-24; up to r117476
added:
test/indent/scheme.scm scheme.scm-20140417210116-orjfjpzrbauh15ad-1
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/emacs-lisp/package.el package.el-20100617020707-ybavz666awsxwin6-2
lisp/progmodes/gud.el gud.el-20091113204419-o5vbwnq5f7feedwu-2927
lisp/progmodes/python.el python.el-20091113204419-o5vbwnq5f7feedwu-3008
lisp/startup.el startup.el-20091113204419-o5vbwnq5f7feedwu-260
lisp/subr.el subr.el-20091113204419-o5vbwnq5f7feedwu-151
lisp/tar-mode.el tarmode.el-20091113204419-o5vbwnq5f7feedwu-204
lisp/tutorial.el
tutorial.el-20091113204419-o5vbwnq5f7feedwu-4434
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/conf_post.h conf_post.h-20120730211826-q0qbxxwh2emw52hd-1
src/dispnew.c dispnew.c-20091113204419-o5vbwnq5f7feedwu-258
src/eval.c eval.c-20091113204419-o5vbwnq5f7feedwu-237
src/xdisp.c xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
test/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-8588
test/automated/python-tests.el
pythontests.el-20130220195218-kqcioz3fssz9hwe1-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-09-03 00:38:49 +0000
+++ b/lisp/ChangeLog 2014-09-03 04:21:40 +0000
@@ -1,5 +1,47 @@
2014-09-03 Stefan Monnier <address@hidden>
+ * emacs-lisp/package.el (package-generate-description-file):
+ Properly quote the arguments (bug#18332). Change second arg.
+ (package--alist-to-plist-args): Rename from package--alist-to-plist and
+ quote the elements.
+ (package--make-autoloads-and-stuff): Fix the test for pre-existence of
+ the *-pkg.el file. Adjust to new calling convention of
+ package-generate-description-file.
+
+ * progmodes/gud.el (gud-gdb-completion-at-point): Add hack (bug#18282).
+ (gud-gdb-completions): Remove obsolete workaround.
+
+2014-09-03 Eli Zaretskii <address@hidden>
+
+ * subr.el (posn-col-row): Revert the change from commit
+ r99634.2.576 address@hidden, which
+ was inadvertently merged from emacs-23 release branch in r102428
+ address@hidden, and
+ introduced an off-by-one error in the reported row when there is a
+ header line. (Bug#18384)
+
+2014-09-03 Fabián Ezequiel Gallina <address@hidden>
+
+ * progmodes/python.el (python-indent-post-self-insert-function):
+ Avoid electric colon at beginning-of-defun. (Bug#18228)
+
+2014-09-03 Glenn Morris <address@hidden>
+
+ * tutorial.el (tutorial--display-changes):
+ Fix 2014-08-01 change. (Bug#18382)
+
+2014-09-03 Ken Brown <address@hidden>
+
+ * startup.el (fancy-splash-frame): Extend the fix for Bug#16014 to
+ the Cygwin-w32 build. (Bug#18347)
+
+2014-09-03 Glenn Morris <address@hidden>
+
+ * tar-mode.el (tar--extract, tar-extract):
+ Avoid permanently disabling undo in extracted buffers. (Bug#18344)
+
+2014-09-03 Stefan Monnier <address@hidden>
+
* progmodes/sh-script.el (sh-font-lock-quoted-subshell): Try to better
handle multiline elements (bug#18380).
=== modified file 'lisp/emacs-lisp/package.el'
--- a/lisp/emacs-lisp/package.el 2014-06-28 17:27:29 +0000
+++ b/lisp/emacs-lisp/package.el 2014-09-03 04:21:40 +0000
@@ -689,11 +689,9 @@
(error "Package does not untar cleanly into directory %s/" dir)))))
(tar-untar-buffer))
-(defun package-generate-description-file (pkg-desc pkg-dir)
+(defun package-generate-description-file (pkg-desc pkg-file)
"Create the foo-pkg.el file for single-file packages."
- (let* ((name (package-desc-name pkg-desc))
- (pkg-file (expand-file-name (package--description-file pkg-dir)
- pkg-dir)))
+ (let* ((name (package-desc-name pkg-desc)))
(let ((print-level nil)
(print-quoted t)
(print-length nil))
@@ -714,25 +712,20 @@
(list (car elt)
(package-version-join (cadr elt))))
requires))))
- (let ((alist (package-desc-extras pkg-desc))
- flat)
- (while alist
- (let* ((pair (pop alist))
- (key (car pair))
- (val (cdr pair)))
- ;; Don't bother ‘quote’ing ‘key’; it is always a keyword.
- (push key flat)
- (push (if (and (not (consp val))
- (or (keywordp val)
- (not (symbolp val))
- (memq val '(nil t))))
- val
- `',val)
- flat)))
- (nreverse flat))))
+ (package--alist-to-plist-args
+ (package-desc-extras pkg-desc))))
"\n")
nil pkg-file nil 'silent))))
+(defun package--alist-to-plist-args (alist)
+ (mapcar (lambda (x)
+ (if (and (not (consp x))
+ (or (keywordp x)
+ (not (symbolp x))
+ (memq x '(nil t))))
+ x `',x))
+ (apply #'nconc
+ (mapcar (lambda (pair) (list (car pair) (cdr pair))) alist))))
(defun package-unpack (pkg-desc)
"Install the contents of the current buffer as a package."
(let* ((name (package-desc-name pkg-desc))
@@ -764,9 +757,10 @@
(defun package--make-autoloads-and-stuff (pkg-desc pkg-dir)
"Generate autoloads, description file, etc.. for PKG-DESC installed at
PKG-DIR."
(package-generate-autoloads (package-desc-name pkg-desc) pkg-dir)
- (let ((desc-file (package--description-file pkg-dir)))
+ (let ((desc-file (expand-file-name (package--description-file pkg-dir)
+ pkg-dir)))
(unless (file-exists-p desc-file)
- (package-generate-description-file pkg-desc pkg-dir)))
+ (package-generate-description-file pkg-desc desc-file)))
;; FIXME: Create foo.info and dir file from foo.texi?
)
=== modified file 'lisp/progmodes/gud.el'
--- a/lisp/progmodes/gud.el 2014-08-13 19:15:28 +0000
+++ b/lisp/progmodes/gud.el 2014-09-03 04:21:40 +0000
@@ -810,18 +810,6 @@
(current-buffer)
;; From string-match above.
(length context))))
- ;; `gud-gdb-run-command-fetch-lines' has some nasty side-effects on the
- ;; buffer (via `gud-delete-prompt-marker'): it removes the prompt and then
- ;; re-adds it later, thus messing up markers and overlays along the way.
- ;; This is a problem for completion-in-region which uses an overlay to
- ;; create a field.
- ;; So we restore completion-in-region's field if needed.
- ;; FIXME: change gud-gdb-run-command-fetch-lines so it doesn't modify the
- ;; buffer at all.
- (when (/= start (- (point) (field-beginning)))
- (dolist (ol (overlays-at (1- (point))))
- (when (eq (overlay-get ol 'field) 'completion)
- (move-overlay ol (- (point) start) (overlay-end ol)))))
;; Protect against old versions of GDB.
(and complete-list
(string-match "^Undefined command: \"complete\"" (car complete-list))
@@ -860,7 +848,14 @@
(save-excursion
(skip-chars-backward "^ " (comint-line-beginning-position))
(point))))
- (list start end
+ ;; FIXME: `gud-gdb-run-command-fetch-lines' has some nasty side-effects on
+ ;; the buffer (via `gud-delete-prompt-marker'): it removes the prompt and
+ ;; then re-adds it later, thus messing up markers and overlays along the
+ ;; way (bug#18282).
+ ;; We use an "insert-before" marker for `start', since it's typically right
+ ;; after the prompt, which works around the problem, but is a hack (and
+ ;; comes with other downsides, e.g. if completion adds text at `start').
+ (list (copy-marker start t) end
(completion-table-dynamic
(apply-partially gud-gdb-completion-function
(buffer-substring (comint-line-beginning-position)
=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el 2014-08-28 01:59:29 +0000
+++ b/lisp/progmodes/python.el 2014-09-03 04:21:40 +0000
@@ -1162,9 +1162,15 @@
((and (eq ?: last-command-event)
(memq ?: electric-indent-chars)
(not current-prefix-arg)
+ ;; Trigger electric colon only at end of line
(eolp)
+ ;; Avoid re-indenting on extra colon
(not (equal ?: (char-before (1- (point)))))
- (not (python-syntax-comment-or-string-p)))
+ (not (python-syntax-comment-or-string-p))
+ ;; Never re-indent at beginning of defun
+ (not (save-excursion
+ (python-nav-beginning-of-statement)
+ (python-info-looking-at-beginning-of-defun))))
(python-indent-line)))))
=== modified file 'lisp/startup.el'
--- a/lisp/startup.el 2014-08-27 10:51:21 +0000
+++ b/lisp/startup.el 2014-09-03 04:21:40 +0000
@@ -1797,7 +1797,7 @@
(let (chosen-frame)
;; MS-Windows needs this to have a chance to make the initial
;; frame visible.
- (if (eq system-type 'windows-nt)
+ (if (eq (window-system) 'w32)
(sit-for 0 t))
(dolist (frame (append (frame-list) (list (selected-frame))))
(if (and (frame-visible-p frame)
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2014-08-28 01:55:45 +0000
+++ b/lisp/subr.el 2014-09-03 04:21:40 +0000
@@ -1156,10 +1156,7 @@
((null spacing)
(setq spacing 0)))
(cons (/ (car pair) (frame-char-width frame))
- (- (/ (cdr pair) (+ (frame-char-height frame) spacing))
- (if (null (with-current-buffer (window-buffer window)
- header-line-format))
- 0 1))))))))
+ (/ (cdr pair) (+ (frame-char-height frame) spacing))))))))
(defun posn-actual-col-row (position)
"Return the actual column and row in POSITION, measured in characters.
=== modified file 'lisp/tar-mode.el'
--- a/lisp/tar-mode.el 2014-02-10 01:34:22 +0000
+++ b/lisp/tar-mode.el 2014-08-28 19:18:24 +0000
@@ -800,8 +800,6 @@
tarname
")"))
(buffer (generate-new-buffer bufname)))
- (with-current-buffer buffer
- (setq buffer-undo-list t))
(with-current-buffer tar-data-buffer
(let (coding)
(narrow-to-region start end)
@@ -829,7 +827,11 @@
(with-current-buffer buffer
(set-buffer-multibyte nil)))
(widen)
- (decode-coding-region start end coding buffer)))
+ (with-current-buffer buffer
+ (setq buffer-undo-list t))
+ (decode-coding-region start end coding buffer)
+ (with-current-buffer buffer
+ (setq buffer-undo-list nil))))
buffer))
(defun tar-extract (&optional other-window-p)
@@ -869,7 +871,6 @@
(with-current-buffer tar-buffer
default-directory))
(set-buffer-modified-p nil)
- (setq buffer-undo-list t)
(normal-mode) ; pick a mode.
(set (make-local-variable 'tar-superior-buffer) tar-buffer)
(set (make-local-variable 'tar-superior-descriptor) descriptor)
=== modified file 'lisp/tutorial.el'
--- a/lisp/tutorial.el 2014-07-29 13:41:50 +0000
+++ b/lisp/tutorial.el 2014-09-02 06:48:20 +0000
@@ -209,10 +209,10 @@
(symbol-name cx)))))))
(defconst tutorial--default-keys
- ;; On window system, `suspend-emacs' is replaced in the default
- ;; keymap
+ ;; On window system, `suspend-emacs' is replaced in the default keymap.
(let* ((suspend-emacs 'suspend-frame)
(default-keys
+ ;; The first few are not mentioned but are basic:
`((ESC-prefix [27])
(Control-X-prefix [?\C-x])
(mode-specific-command-prefix [?\C-c])
@@ -552,7 +552,7 @@
;; binding because the Hebrew tutorial uses directional
;; controls and Hebrew character maqaf, the Hebrew hyphen,
;; immediately before the binding string.
- (concat "\\([[:space:]]\\|[[:punct:]]\\)\\("
+ (concat "\\(?:[[:space:]]\\|[[:punct:]]\\)\\("
(mapconcat (lambda (kdf) (regexp-quote
(tutorial--key-description
(nth 1 kdf))))
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-09-02 18:05:00 +0000
+++ b/src/ChangeLog 2014-09-03 04:21:40 +0000
@@ -1,3 +1,25 @@
+2014-09-03 Eli Zaretskii <address@hidden>
+
+ * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
+ the reported row in the case of a window with a header line, by
+ improving on the fix committed in r106022
+ address@hidden (Bug#18384)
+
+2014-09-03 Paul Eggert <address@hidden>
+
+ * eval.c (internal_lisp_condition_case): Don't overrun the stack
+ when configured --with-wide-int on typical 32-bit platforms.
+
+2014-09-03 Eli Zaretskii <address@hidden>
+
+ * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
+ when HPOS is negative, for the benefit of R2L glyph rows whose
+ newline overflows into the fringe.
+
+2014-09-03 Ken Brown <address@hidden>
+
+ * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366)
+
2014-09-02 Paul Eggert <address@hidden>
Minor cleanup of recent strlen-avoiding patch.
=== modified file 'src/conf_post.h'
--- a/src/conf_post.h 2014-08-28 14:48:02 +0000
+++ b/src/conf_post.h 2014-09-03 04:21:40 +0000
@@ -193,6 +193,10 @@
#if defined CYGWIN && defined HAVE_NTGUI
# define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */
# define _WIN32_WINNT 0x500 /* Win2k */
+/* The following was in /usr/include/string.h prior to Cygwin 1.7.33. */
+#ifndef strnicmp
+#define strnicmp strncasecmp
+#endif
#endif
#ifdef emacs /* Don't do this for lib-src. */
=== modified file 'src/dispnew.c'
--- a/src/dispnew.c 2014-08-28 01:59:29 +0000
+++ b/src/dispnew.c 2014-09-03 04:21:40 +0000
@@ -5121,7 +5121,7 @@
#ifdef HAVE_WINDOW_SYSTEM
struct image *img = 0;
#endif
- int x0, x1, to_x;
+ int x0, x1, to_x, it_vpos;
void *itdata = NULL;
/* We used to set current_buffer directly here, but that does the
@@ -5130,11 +5130,6 @@
itdata = bidi_shelve_cache ();
CLIP_TEXT_POS_FROM_MARKER (startp, w->start);
start_display (&it, w, startp);
- /* start_display takes into account the header-line row, but IT's
- vpos still counts from the glyph row that includes the window's
- start position. Adjust for a possible header-line row. */
- it.vpos += WINDOW_WANTS_HEADER_LINE_P (w);
-
x0 = *x;
/* First, move to the beginning of the row corresponding to *Y. We
@@ -5204,8 +5199,13 @@
}
#endif
- if (it.vpos < w->current_matrix->nrows
- && (row = MATRIX_ROW (w->current_matrix, it.vpos),
+ /* IT's vpos counts from the glyph row that includes the window's
+ start position, i.e. it excludes the header-line row, but
+ MATRIX_ROW includes the header-line row. Adjust for a possible
+ header-line row. */
+ it_vpos = it.vpos + WINDOW_WANTS_MODELINE_P (w);
+ if (it_vpos < w->current_matrix->nrows
+ && (row = MATRIX_ROW (w->current_matrix, it_vpos),
row->enabled_p))
{
if (it.hpos < row->used[TEXT_AREA])
=== modified file 'src/eval.c'
--- a/src/eval.c 2014-07-27 13:21:30 +0000
+++ b/src/eval.c 2014-09-03 04:21:40 +0000
@@ -1273,7 +1273,7 @@
{ /* The first clause is the one that should be checked first, so it should
be added to handlerlist last. So we build in `clauses' a table that
contains `handlers' but in reverse order. */
- Lisp_Object *clauses = alloca (clausenb * sizeof (Lisp_Object *));
+ Lisp_Object *clauses = alloca (clausenb * sizeof *clauses);
Lisp_Object *volatile clauses_volatile = clauses;
int i = clausenb;
for (val = handlers; CONSP (val); val = XCDR (val))
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2014-08-31 15:46:47 +0000
+++ b/src/xdisp.c 2014-09-03 04:21:40 +0000
@@ -27513,6 +27513,10 @@
&& (!on
|| w->phys_cursor.x != x
|| w->phys_cursor.y != y
+ /* HPOS can be negative in R2L rows whose
+ exact_window_width_line_p flag is set (i.e. their newline
+ would "overflow into the fringe"). */
+ || hpos < 0
|| new_cursor_type != w->phys_cursor_type
|| ((new_cursor_type == BAR_CURSOR || new_cursor_type == HBAR_CURSOR)
&& new_cursor_width != w->phys_cursor_width)))
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog 2014-08-29 07:29:47 +0000
+++ b/test/ChangeLog 2014-09-03 04:21:40 +0000
@@ -1,3 +1,8 @@
+2014-09-03 Fabián Ezequiel Gallina <address@hidden>
+
+ * automated/python-tests.el (python-indent-electric-colon-1):
+ New test. (Bug#18228)
+
2014-08-29 Dmitry Antipov <address@hidden>
* automated/fns-tests.el (fns-tests-sort): New test.
=== modified file 'test/automated/python-tests.el'
--- a/test/automated/python-tests.el 2014-08-18 19:15:06 +0000
+++ b/test/automated/python-tests.el 2014-09-01 22:51:46 +0000
@@ -711,6 +711,20 @@
(should (= (python-indent-calculate-indentation) 0))
(should (equal (python-indent-calculate-levels) '(0)))))
+(ert-deftest python-indent-electric-colon-1 ()
+ "Test indentation case from Bug#18228."
+ (python-tests-with-temp-buffer
+ "
+def a():
+ pass
+
+def b()
+"
+ (python-tests-look-at "def b()")
+ (goto-char (line-end-position))
+ (python-tests-self-insert ":")
+ (should (= (current-indentation) 0))))
+
;;; Navigation
=== added file 'test/indent/scheme.scm'
--- a/test/indent/scheme.scm 1970-01-01 00:00:00 +0000
+++ b/test/indent/scheme.scm 2014-09-03 04:21:40 +0000
@@ -0,0 +1,9 @@
+#!/usr/bin/scheme is this a comment?
+
+;; This one is a comment
+(a)
+#| and this one as #|well|# as this! |#
+(b)
+(cons #;(this is a
+ comment)
+ head tail)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117809: Merge from emacs-24; up to r117476,
Glenn Morris <=