commit 0147cdd4d96f1eaeef720ee0b89bddd27eaf4233 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sat Jun 3 01:31:04 2017 -0700 Document uniqueness limitation of ‘format’ * doc/lispref/strings.texi (Formatting Strings): * src/editfns.c (Fformat): Document that field numbers should be unique within a format. diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index e80e778bec..f365c80493 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -965,9 +965,10 @@ extra values to be formatted are ignored. decimal number immediately after the initial @samp{%}, followed by a literal dollar sign @samp{$}. It causes the format specification to convert the argument with the given number instead of the next -argument. Field numbers start at 1. A format can contain either -numbered or unnumbered format specifications but not both, except that -@samp{%%} can be mixed with numbered specifications. +argument. Field numbers start at 1. A field number should differ +from the other field numbers in the same format. A format can contain +either numbered or unnumbered format specifications but not both, +except that @samp{%%} can be mixed with numbered specifications. @example (format "%2$s, %3$s, %%, %1$s" "x" "y" "z") diff --git a/src/editfns.c b/src/editfns.c index 29af25aab4..a5088b0a1f 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -3901,9 +3901,10 @@ where field is [0-9]+ followed by a literal dollar "$", flags is followed by [0-9]+. If a %-sequence is numbered with a field with positive value N, the -Nth argument is substituted instead of the next one. A format can -contain either numbered or unnumbered %-sequences but not both, except -that %% can be mixed with numbered %-sequences. +Nth argument is substituted instead of the next one. A field number +should differ from the other field numbers in the same format. A +format can contain either numbered or unnumbered %-sequences but not +both, except that %% can be mixed with numbered %-sequences. The + flag character inserts a + before any positive number, while a space inserts a space before any positive number; these flags only commit 73635edb43e0e4a31cfe8af41ccb07c32836b148 Author: Glenn Morris Date: Fri Jun 2 20:42:01 2017 -0400 Small rmailmm fix (bug#27203) * lisp/mail/rmailmm.el (rmail-mime-insert-bulk): Fall back to HOME if no match in rmail-mime-attachment-dirs-alist. diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index c6b9cfddb6..1ffd4668ac 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -817,12 +817,13 @@ directly." (bulk-data (aref tagline 1)) (body (rmail-mime-entity-body entity)) ;; Find the default directory for this media type. - (directory (catch 'directory - (dolist (entry rmail-mime-attachment-dirs-alist) - (when (string-match (car entry) (car content-type)) - (dolist (dir (cdr entry)) - (when (file-directory-p dir) - (throw 'directory dir))))))) + (directory (or (catch 'directory + (dolist (entry rmail-mime-attachment-dirs-alist) + (when (string-match (car entry) (car content-type)) + (dolist (dir (cdr entry)) + (when (file-directory-p dir) + (throw 'directory dir)))))) + "~")) (filename (or (cdr (assq 'name (cdr content-type))) (cdr (assq 'filename (cdr content-disposition))) "noname")) commit 606bfcf00ed39f4f05045dbbdb3a6f12ec4baf03 Author: Glenn Morris Date: Fri Jun 2 20:29:34 2017 -0400 * admin/authors.el (authors-aliases): Addition. diff --git a/admin/authors.el b/admin/authors.el index a361bf9ee2..4285e65548 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -154,6 +154,7 @@ files.") ("Roland B. Roberts" "Roland B Roberts" "Roland Roberts") ("Ron Schnell" "Ronnie Schnell") ("Rui-Tao Dong" "Rui-Tao Dong ~{6-HpLN~}") + ("Ryan Thompson" "Ryan .*rct@thompsonclan") ("Sacha Chua" "Sandra Jean Chua") ("Sam Steingold" "Sam Shteingold") ("Satyaki Das" "Indexed search by Satyaki Das") @@ -1240,6 +1241,7 @@ it is found in `authors-fixed-case'." (setq author (replace-regexp-in-string "\\`[ \t]+" "" author)) (setq author (replace-regexp-in-string "[ \t]+$" "" author)) (setq author (replace-regexp-in-string "[ \t]+" " " author)) + ;; NB this ignores the first name only case. (unless (string-match "[-, \t]" author) (setq author "")) (or (car (member author authors-fixed-case)) commit 182912c7a927c8c659662750017148e129571fc6 Author: Glenn Morris Date: Fri Jun 2 20:06:12 2017 -0400 Add watch for password back to inferior python comint filter It was removed along with other items for speed (bug#16875), but doesn't seem to have been causing an issue, and it's useful to have it there (bug#27154). * lisp/progmodes/python.el (inferior-python-mode): Add comint-watch-for-password-prompt to comint-output-filter-functions. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4eecfba2e7..464b931cff 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2731,7 +2731,8 @@ variable. '(ansi-color-process-output python-shell-comint-watch-for-first-prompt-output-filter python-pdbtrack-comint-output-filter-function - python-comint-postoutput-scroll-to-bottom)) + python-comint-postoutput-scroll-to-bottom + comint-watch-for-password-prompt)) (set (make-local-variable 'compilation-error-regexp-alist) python-shell-compilation-regexp-alist) (add-hook 'completion-at-point-functions commit b406174d814e1c1bd34917b1497801137e9211a1 Author: Ryan Date: Fri Jun 2 20:00:49 2017 -0400 Use completing-read-default in tmm-prompt tmm uses completing-read, but customizes its behavior so much that any alternative completing-read-function will almost certainly break it. For example, both ido-ubiquitous and ivy have special code to deactivate themselves for tmm. * lisp/tmm.el (tmm-prompt): Use completing-read-default instead of completing-read. (Bug#27193) Copyright-paperwork-exempt: yes diff --git a/lisp/tmm.el b/lisp/tmm.el index c6830903e3..8755971d7c 100644 --- a/lisp/tmm.el +++ b/lisp/tmm.el @@ -247,7 +247,7 @@ Its value should be an event that has a binding in MENU." ;; candidates in the order they are shown on ;; the menu bar. So pass completing-read the ;; reversed copy of the list. - (completing-read + (completing-read-default (concat gl-str " (up/down to change, PgUp to menu): ") (tmm--completion-table (reverse tmm-km-list)) nil t nil commit 412e7086f68c0d9d6f436c8c376f7e33667c2f20 Author: Mats Lidell Date: Fri Jun 2 22:16:01 2017 +0200 * etc/tutorials/TUTORIAL.sv: synced with TUTORIAL (Bug#20371) diff --git a/etc/tutorials/TUTORIAL.sv b/etc/tutorials/TUTORIAL.sv index de28661796..30608c5688 100644 --- a/etc/tutorials/TUTORIAL.sv +++ b/etc/tutorials/TUTORIAL.sv @@ -12,6 +12,8 @@ ALT eller EDIT). Vi använder här följande förkortningar: Viktigt: För att avsluta Emacs trycker du C-x C-c (två tecken). För att avsluta kommandon som inte skrivits in fullt, tryck C-g. +För att avsluta användarhandledningen, tryck C-x k och sedan +vid prompten. Tecknen ">>" i vänstermarginalen anger att du kan prova ett kommando. Till exempel: <> commit f0d79d2b8d3a8a0b2aa7b39519d1df32f0e335e6 Author: Glenn Morris Date: Fri Jun 2 13:14:44 2017 -0400 Fix with-todo-test * test/lisp/calendar/todo-mode-tests.el (with-todo-test): HOME should be a directory, not a file. Delete it when finished. diff --git a/test/lisp/calendar/todo-mode-tests.el b/test/lisp/calendar/todo-mode-tests.el index 5e1a22b37b..08dfe54192 100644 --- a/test/lisp/calendar/todo-mode-tests.el +++ b/test/lisp/calendar/todo-mode-tests.el @@ -44,13 +44,15 @@ (defmacro with-todo-test (&rest body) "Set up an isolated todo-mode test environment." - `(let* ((todo-test-home (make-temp-file "todo-test-home-")) + `(let* ((todo-test-home (make-temp-file "todo-test-home-" t)) (process-environment (cons (format "HOME=%s" todo-test-home) process-environment)) (todo-directory todo-test-data-dir) (todo-default-todo-file (todo-short-file-name (car (funcall todo-files-function))))) - ,@body)) + (unwind-protect + (progn ,@body) + (delete-directory todo-test-home t)))) ;; (defun todo-test-show (num &optional archive) ;; "Display category NUM of test todo file. commit d801f5a2cf6c150841a65e5dbb378e840227f77f Author: Lele Gaifax Date: Fri Jun 2 17:06:55 2017 +0300 Update TUTORIAL.it * etc/tutorials/TUTORIAL.it: Adjust to recent changes in TUTORIAL. Copyright-paperwork-exempt: yes diff --git a/etc/tutorials/TUTORIAL.it b/etc/tutorials/TUTORIAL.it index 4e010cb9fb..0f5039de24 100644 --- a/etc/tutorials/TUTORIAL.it +++ b/etc/tutorials/TUTORIAL.it @@ -15,9 +15,11 @@ le seguenti abbreviazioni: per indicare il tasto ESC. Nota importante: per chiudere una sessione di lavoro di Emacs usa C-x -C-c (due caratteri). Per annullare un comando inserito parzialmente -usa C-g. I caratteri “>>” posti al margine sinistro indicano le -direttive per provare a usare un comando. Per esempio: +C-c (due caratteri). +Per annullare un comando inserito parzialmente usa C-g. +Per terminare l'esercitazione, usa C-x k quindi al prompt. +I caratteri “>>” posti al margine sinistro indicano le direttive per +provare a usare un comando. Per esempio: <> [Spaziatura inserita a scopo didattico. Il testo continua sotto] >> Adesso premi C-v (vedi schermata successiva) per spostarti alla commit ca575372ed608d503dcd01dc3a56a8dbddc3c095 Author: Eli Zaretskii Date: Fri Jun 2 15:27:55 2017 +0300 ; * doc/emacs/emacs-xtra.texi: Explain in a comment the purpose of this file. diff --git a/doc/emacs/emacs-xtra.texi b/doc/emacs/emacs-xtra.texi index d4d4860f95..32ed22fc5a 100644 --- a/doc/emacs/emacs-xtra.texi +++ b/doc/emacs/emacs-xtra.texi @@ -9,6 +9,10 @@ @syncodeindex ky cp @comment %**end of header +@c This is a separate manual to avoid making the Emacs User manual too +@c large in print. In the Info format, the chapters included below +@c are part of the Emacs User manual. + @copying This manual describes specialized features of Emacs. commit 5e6481bdc57912ff31c92c5df85e22b5f8ede99d Author: Eli Zaretskii Date: Fri Jun 2 12:53:57 2017 +0300 Fix cursor position in Dired buffers after dired-sort-toggle * src/xdisp.c (display_and_set_cursor): Record cursor coordinates even if the frame is marked as garbaged. (Bug#27187) diff --git a/src/xdisp.c b/src/xdisp.c index 53210e5be5..17a1cae004 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -28793,7 +28793,6 @@ display_and_set_cursor (struct window *w, bool on, be in the midst of changing its size, and x and y may be off the window. */ if (! FRAME_VISIBLE_P (f) - || FRAME_GARBAGED_P (f) || vpos >= w->current_matrix->nrows || hpos >= w->current_matrix->matrix_w) return; @@ -28811,6 +28810,26 @@ display_and_set_cursor (struct window *w, bool on, return; } + /* A frame might be marked garbaged even though its cursor position + is correct, and will not change upon subsequent redisplay. This + happens in some rare situations, like toggling the sort order in + Dired windows. We've already established that VPOS is valid, so + it shouldn't do any harm to record the cursor position, as we are + going to return without acting on it anyway. Otherwise, expose + events might come in and call update_window_cursor, which will + blindly use outdated values in w->phys_cursor. */ + if (FRAME_GARBAGED_P (f)) + { + if (on) + { + w->phys_cursor.x = x; + w->phys_cursor.y = glyph_row->y; + w->phys_cursor.hpos = hpos; + w->phys_cursor.vpos = vpos; + } + return; + } + glyph = NULL; if (0 <= hpos && hpos < glyph_row->used[TEXT_AREA]) glyph = glyph_row->glyphs[TEXT_AREA] + hpos; commit 800602b3835d1dcb13dda9319676fe92ad3505fd Author: Eli Zaretskii Date: Fri Jun 2 09:27:09 2017 +0300 Update TUTORIAL.he * etc/tutorials/TUTORIAL.he: Adjust to recent changes in TUTORIAL. diff --git a/etc/tutorials/TUTORIAL.he b/etc/tutorials/TUTORIAL.he index fefc780d64..4999716463 100644 --- a/etc/tutorials/TUTORIAL.he +++ b/etc/tutorials/TUTORIAL.he @@ -12,6 +12,7 @@ הערה חשובה: כדי לצאת מ־Emacs יש להקיש C-x C-c (שני תוים, משמאל לימין). כדי להפסיק פקודה באמצע ההקשה, יש להקיש C-g. +כדי להפסיק שיעור זה, יש להקיש C-x k, ואז בתשובה לשאלה. המחרוזת ">>" בקצה הימני מסמנת הוראות עבורכם כדי לנסות להשתמש בפקודה כלשהי. לדוגמה: <<שורות ריקות תתווספנה סביב השורה הבאה ע״י help-with-tutorial>>