diff -Nru emacs-snapshot-96774/admin/admin.el emacs-snapshot-96792/admin/admin.el --- emacs-snapshot-96774/admin/admin.el 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/admin/admin.el 2019-04-21 22:14:02.000000000 +0000 @@ -138,7 +138,10 @@ (if (eq 2 (length newversion)) 0 1)))) (majorbump (and oldversion (not (equal oldmajor newmajor)))) (minorbump (and oldversion (not majorbump) - (not (equal (cadr oldversion) (cadr newversion))))) + (or (not (equal (cadr oldversion) + (cadr newversion))) + (and (equal (cadr oldversion) (cadr newversion)) + (equal (nth 2 newversion) 50))))) (newsfile (expand-file-name "etc/NEWS" root)) (oldnewsfile (expand-file-name (format "etc/NEWS.%s" oldmajor) root))) (unless (> (length newversion) 2) ; pretest or release candidate? diff -Nru emacs-snapshot-96774/configure.ac emacs-snapshot-96792/configure.ac --- emacs-snapshot-96774/configure.ac 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/configure.ac 2019-04-21 22:14:02.000000000 +0000 @@ -2795,22 +2795,25 @@ with_toolkit_scroll_bars=yes fi - dnl Check if we have the old file selection dialog declared and - dnl in the link library. In 2.x it may be in the library, - dnl but not declared if deprecated featured has been selected out. - dnl AC_CHECK_DECL checks for a macro, so check for GTK_TYPE_FILE_SELECTION. - HAVE_GTK_FILE_SELECTION=no - AC_CHECK_DECL(GTK_TYPE_FILE_SELECTION, HAVE_GTK_FILE_SELECTION=yes, - HAVE_GTK_FILE_SELECTION=no, [AC_INCLUDES_DEFAULT -#include ]) - if test "$HAVE_GTK_FILE_SELECTION" = yes; then - AC_CHECK_FUNCS(gtk_file_selection_new) - fi + term_header=gtkutil.h - dnl This procedure causes a bug on certain Ubuntu GTK+2 builds - AC_CHECK_FUNCS(gtk_window_set_has_resize_grip) + if test "${USE_GTK_TOOLKIT}" = GTK2; then - term_header=gtkutil.h + dnl Check if we have the old file selection dialog declared and + dnl in the link library. In 2.x it may be in the library, + dnl but not declared if deprecated featured has been selected out. + dnl AC_CHECK_DECL checks for a macro, so check for GTK_TYPE_FILE_SELECTION. + HAVE_GTK_FILE_SELECTION=no + AC_CHECK_DECL(GTK_TYPE_FILE_SELECTION, HAVE_GTK_FILE_SELECTION=yes, + HAVE_GTK_FILE_SELECTION=no, [AC_INCLUDES_DEFAULT +#include ]) + if test "$HAVE_GTK_FILE_SELECTION" = yes; then + AC_CHECK_FUNCS(gtk_file_selection_new) + fi + + dnl This procedure causes a bug on certain Ubuntu GTK+2 builds + AC_CHECK_FUNCS(gtk_window_set_has_resize_grip) + fi fi diff -Nru emacs-snapshot-96774/debian/changelog emacs-snapshot-96792/debian/changelog --- emacs-snapshot-96774/debian/changelog 2019-04-20 22:17:39.000000000 +0000 +++ emacs-snapshot-96792/debian/changelog 2019-04-21 22:14:37.000000000 +0000 @@ -1,8 +1,8 @@ -emacs-snapshot (20190420:96774-b3a12c6~ubuntu18.10.1) cosmic; urgency=low +emacs-snapshot (20190421:96792-3a618e5~ubuntu18.10.1) cosmic; urgency=low * Auto build. - -- Launchpad Package Builder Sat, 20 Apr 2019 22:17:39 +0000 + -- Launchpad Package Builder Sun, 21 Apr 2019 22:14:37 +0000 emacs-snapshot (0-0ubuntu1) UNRELEASED; urgency=low diff -Nru emacs-snapshot-96774/debian/git-build-recipe.manifest emacs-snapshot-96792/debian/git-build-recipe.manifest --- emacs-snapshot-96774/debian/git-build-recipe.manifest 2019-04-20 22:17:39.000000000 +0000 +++ emacs-snapshot-96792/debian/git-build-recipe.manifest 2019-04-21 22:14:37.000000000 +0000 @@ -1,3 +1,3 @@ -# git-build-recipe format 0.4 deb-version 20190420:96774-b3a12c6 -lp:~ubuntu-elisp/emacs/+git/master git-commit:b3a12c62c9085171866256f00dada4326a4a3084 +# git-build-recipe format 0.4 deb-version 20190421:96792-3a618e5 +lp:~ubuntu-elisp/emacs/+git/master git-commit:3a618e5f89c86bc96925b06647fb33568c8fa2c9 merge packaging lp:~ubuntu-elisp/emacs git-commit:65079bcb08ff2082268aef0c95127dc24fec6ef7 diff -Nru emacs-snapshot-96774/doc/emacs/mark.texi emacs-snapshot-96792/doc/emacs/mark.texi --- emacs-snapshot-96774/doc/emacs/mark.texi 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/doc/emacs/mark.texi 2019-04-21 22:14:02.000000000 +0000 @@ -76,7 +76,7 @@ @item mouse-3 Set the mark at point, then move point to where you click (@code{mouse-save-then-kill}). -@item @samp{Shifted cursor motion keys} +@item @r{Shifted cursor motion keys} Set the mark at point if the mark is inactive, then move point. @xref{Shift Selection}. @end table diff -Nru emacs-snapshot-96774/doc/misc/calc.texi emacs-snapshot-96792/doc/misc/calc.texi --- emacs-snapshot-96774/doc/misc/calc.texi 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/doc/misc/calc.texi 2019-04-21 22:14:02.000000000 +0000 @@ -14661,7 +14661,7 @@ operators and functions in Yacas are similar to those of Calc, the names of built-in functions in Yacas are capitalized. The Calc formula @samp{sin(2 x)}, for example, is entered and displayed @samp{Sin(2 x)} -in Yacas mode, and `@samp{arcsin(x^2)} is @samp{ArcSin(x^2)} in Yacas +in Yacas mode, and @samp{arcsin(x^2)} is @samp{ArcSin(x^2)} in Yacas mode. Complex numbers are written are written @samp{3 + 4 I}. The standard special constants are written @code{Pi}, @code{E}, @code{I}, @code{GoldenRatio} and @code{Gamma}. @code{Infinity} diff -Nru emacs-snapshot-96774/doc/misc/mh-e.texi emacs-snapshot-96792/doc/misc/mh-e.texi --- emacs-snapshot-96774/doc/misc/mh-e.texi 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/doc/misc/mh-e.texi 2019-04-21 22:14:02.000000000 +0000 @@ -6287,24 +6287,24 @@ the cursor over the desired folder and then use the shortcuts for the menu items listed in the table below. -@table @samp +@table @asis @findex mh-speed-view -@item Visit Folder (@key{RET}) +@item @samp{Visit Folder} (@key{RET}) Visits the selected folder just as if you had used @kbd{F v} (@code{mh-speed-view}). @c ------------------------- @findex mh-speed-expand-folder -@item Expand Nested Folders (@kbd{+}) +@item @samp{Expand Nested Folders} (@kbd{+}) Expands the selected folder in the speedbar, exposing the children folders inside it (@code{mh-speed-expand-folder}). @c ------------------------- @findex mh-speed-contract-folder -@item Contract Nested Folders (@kbd{-}) +@item @samp{Contract Nested Folders} (@kbd{-}) Contracts or collapses the selected folder in the speedbar, hiding the children folders inside it (@code{mh-speed-contract-folder}). @c ------------------------- @findex mh-speed-refresh -@item Refresh Speedbar (@kbd{r}) +@item @samp{Refresh Speedbar} (@kbd{r}) Regenerates the list of folders in the speedbar. Run this command if you've added or deleted a folder, or want to update the unseen message count before the next automatic update (@code{mh-speed-refresh}). diff -Nru emacs-snapshot-96774/doc/misc/sc.texi emacs-snapshot-96792/doc/misc/sc.texi --- emacs-snapshot-96774/doc/misc/sc.texi 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/doc/misc/sc.texi 2019-04-21 22:14:02.000000000 +0000 @@ -249,10 +249,10 @@ @end menu Note that multiple inclusions of the original messages result in a -nesting of the @samp{@code{>}} characters. This can sometimes be quite +nesting of the @samp{>} characters. This can sometimes be quite confusing when many levels of citations are included since it may be difficult or impossible to figure out who actually participated in the -thread, and multiple nesting of @samp{@code{>}} characters can sometimes +thread, and multiple nesting of @samp{>} characters can sometimes make the message very difficult for the eye to scan. @cindex non-nested citations diff -Nru emacs-snapshot-96774/etc/NEWS.26 emacs-snapshot-96792/etc/NEWS.26 --- emacs-snapshot-96774/etc/NEWS.26 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/etc/NEWS.26 2019-04-21 22:14:02.000000000 +0000 @@ -16,6 +16,33 @@ with a prefix argument or by typing 'C-u C-h C-n'. +* Installation Changes in Emacs 26.3 + + +* Startup Changes in Emacs 26.3 + + +* Changes in Emacs 26.3 + + +* Editing Changes in Emacs 26.3 + + +* Changes in Specialized Modes and Packages in Emacs 26.3 + + +* New Modes and Packages in Emacs 26.3 + + +* Incompatible Lisp Changes in Emacs 26.3 + + +* Lisp Changes in Emacs 26.3 + + +* Changes in Emacs 26.3 on Non-Free Operating Systems + + * Installation Changes in Emacs 26.2 ** Building Emacs with the '--with-xwidgets' option now requires WebKit2. @@ -30,9 +57,6 @@ Emacs modules outside of the Emacs source tree. -* Startup Changes in Emacs 26.2 - - * Changes in Emacs 26.2 ** Emacs is now compliant with the latest version 11.0 of the Unicode Standard. @@ -42,9 +66,6 @@ often cause crashes. Set it to nil if you really need those fonts. -* Editing Changes in Emacs 26.2 - - * Changes in Specialized Modes and Packages in Emacs 26.2 ** Dired @@ -116,9 +137,6 @@ option 'vc-hg-symbolic-revision-styles' to the value '("{rev}")'. -* New Modes and Packages in Emacs 26.2 - - * Incompatible Lisp Changes in Emacs 26.2 ** shadowfile config files have changed their syntax. diff -Nru emacs-snapshot-96774/lib-src/make-fingerprint.c emacs-snapshot-96792/lib-src/make-fingerprint.c --- emacs-snapshot-96774/lib-src/make-fingerprint.c 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/lib-src/make-fingerprint.c 2019-04-21 22:14:02.000000000 +0000 @@ -57,6 +57,9 @@ #endif #endif /* WINDOWSNT */ +/* Static (instead of being local to 'main') to pacify LeakSanitizer. */ +static char *buf; + int main (int argc, char **argv) { @@ -111,7 +114,7 @@ return EXIT_FAILURE; } - char *buf = malloc (st.st_size + 1); + buf = malloc (st.st_size + 1); if (!buf) { perror ("malloc"); diff -Nru emacs-snapshot-96774/lisp/emacs-lisp/unsafep.el emacs-snapshot-96792/lisp/emacs-lisp/unsafep.el --- emacs-snapshot-96774/lisp/emacs-lisp/unsafep.el 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/lisp/emacs-lisp/unsafep.el 2019-04-21 22:14:03.000000000 +0000 @@ -92,11 +92,6 @@ in the parse.") (put 'unsafep-vars 'risky-local-variable t) -;;Side-effect-free functions from subr.el -(dolist (x '(assoc-default butlast last match-string - match-string-no-properties member-ignore-case remove remq)) - (put x 'side-effect-free t)) - ;;Other safe functions (dolist (x '(;;Special forms and catch if or prog1 prog2 progn while unwind-protect diff -Nru emacs-snapshot-96774/lisp/emulation/cua-base.el emacs-snapshot-96792/lisp/emulation/cua-base.el --- emacs-snapshot-96774/lisp/emulation/cua-base.el 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/lisp/emulation/cua-base.el 2019-04-21 22:14:03.000000000 +0000 @@ -602,6 +602,7 @@ (autoload 'cua-set-rectangle-mark "cua-rect" "Start rectangle at mouse click position." t nil) +(autoload 'cua-toggle-rectangle-mark "cua-rect" nil t) ;; Stub definitions until it is loaded (defvar cua--rectangle) diff -Nru emacs-snapshot-96774/lisp/eshell/esh-proc.el emacs-snapshot-96792/lisp/eshell/esh-proc.el --- emacs-snapshot-96774/lisp/eshell/esh-proc.el 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/lisp/eshell/esh-proc.el 2019-04-21 22:14:03.000000000 +0000 @@ -251,7 +251,11 @@ "A marker that tracks the beginning of output of the last subprocess. Used only on systems which do not support async subprocesses.") -(defvar eshell-needs-pipe '("bc") +(defvar eshell-needs-pipe + '("bc" + ;; xclip.el (in GNU ELPA) calls all of these with + ;; `process-connection-type' set to nil. + "pbpaste" "putclip" "xclip" "xsel" "wl-copy") "List of commands which need `process-connection-type' to be nil. Currently only affects commands in pipelines, and not those at the front. If an element contains a directory part it must match diff -Nru emacs-snapshot-96774/lisp/image.el emacs-snapshot-96792/lisp/image.el --- emacs-snapshot-96774/lisp/image.el 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/lisp/image.el 2019-04-21 22:14:03.000000000 +0000 @@ -454,10 +454,10 @@ ;; plist. Decouple plist entries where the key matches ;; the property. (if (eq (cadr image) property) - (setcdr image (cddr image)) + (setcdr image (cdddr image)) (setq image (cddr image)))) ;; Just enter the new value. - (plist-put (cdr image) property value)) + (setcdr image (plist-put (cdr image) property value))) value) (defun image-property (image property) diff -Nru emacs-snapshot-96774/lisp/image-file.el emacs-snapshot-96792/lisp/image-file.el --- emacs-snapshot-96774/lisp/image-file.el 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/lisp/image-file.el 2019-04-21 22:14:03.000000000 +0000 @@ -97,8 +97,9 @@ ;;;###autoload (defun insert-image-file (file &optional visit beg end replace) "Insert the image file FILE into the current buffer. -Optional arguments VISIT, BEG, END, and REPLACE are interpreted as for -the command `insert-file-contents'." +Optional arguments VISIT, BEG, END, and REPLACE are interpreted +as for the command `insert-file-contents'. Return list of +absolute file name and number of characters inserted." (let ((rval (image-file-call-underlying #'insert-file-contents-literally 'insert-file-contents diff -Nru emacs-snapshot-96774/lisp/info.el emacs-snapshot-96792/lisp/info.el --- emacs-snapshot-96774/lisp/info.el 2019-04-20 22:17:07.000000000 +0000 +++ emacs-snapshot-96792/lisp/info.el 2019-04-21 22:14:03.000000000 +0000 @@ -4268,8 +4268,9 @@ ;; We deliberately fontify only ‘..’ quoting, and not `..', because ;; the former can be done much more reliably, i.e. without risking ;; false positives. +;; FIXME: It doesn't handle nested quotes. (defvar Info-mode-font-lock-keywords - '(("‘\\([^’]*\\)’" (1 'Info-quoted)))) + '(("‘\\([‘’]\\|[^‘’]*\\)’" (1 'Info-quoted)))) ;; Autoload cookie needed by desktop.el ;;;###autoload diff -Nru emacs-snapshot-96774/lisp/progmodes/cc-mode.el emacs-snapshot-96792/lisp/progmodes/cc-mode.el --- emacs-snapshot-96774/lisp/progmodes/cc-mode.el 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/lisp/progmodes/cc-mode.el 2019-04-21 22:14:03.000000000 +0000 @@ -2584,6 +2584,7 @@ ;; reporter-submit-bug-report requires sendmail. (declare-function mail-position-on-field "sendmail" (field &optional soft)) +(declare-function mail-text "sendmail" ()) (defun c-submit-bug-report () "Submit via mail a bug report on CC Mode." @@ -2648,9 +2649,26 @@ vars) (lambda () (run-hooks 'c-prepare-bug-report-hook) + (let ((hook (get mail-user-agent 'hookvar))) + (if hook + (add-hook hook + (lambda () + (save-excursion + (mail-text) + (unless (looking-at "Package: ") + (insert "Package: " c-mode-bug-package "\n\n")))) + nil t))) (save-excursion (or (mail-position-on-field "X-Debbugs-Package") - (insert c-mode-bug-package))) + (insert c-mode-bug-package)) + ;; For mail clients that do not support X- headers. + ;; Sadly reporter-submit-bug-report unconditionally adds + ;; a blank line before SALUTATION, so we can't use that. + ;; It is also sad that reporter offers no way to leave point + ;; after this line we are now inserting. + (mail-text) + (or (looking-at "Package:") + (insert "Package: " c-mode-bug-package))) (insert (format "Buffer Style: %s\nc-emacs-features: %s\n" style c-features))))))) diff -Nru emacs-snapshot-96774/lisp/progmodes/sql.el emacs-snapshot-96792/lisp/progmodes/sql.el --- emacs-snapshot-96774/lisp/progmodes/sql.el 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/lisp/progmodes/sql.el 2019-04-21 22:14:03.000000000 +0000 @@ -223,6 +223,7 @@ ;; Simen Heggestøyl -- Postgres database completion ;; Robert Cochran -- MariaDB support ;; Alex Harsanyi -- sql-indent package and support +;; Roy Mathew -- bug in `sql-send-string' ;; @@ -442,6 +443,7 @@ :sqli-login sql-ms-login-params :sqli-comint-func sql-comint-ms :prompt-regexp "^[0-9]*>" + :prompt-cont-regexp "^[0-9]*>" :prompt-length 5 :syntax-alist ((?@ . "_")) :terminator ("^go" . "go")) @@ -477,7 +479,7 @@ :prompt-cont-regexp "^\\(?:[ ][ ][1-9]\\|[ ][1-9][0-9]\\|[1-9][0-9]\\{2\\}\\)[ ]\\{2\\}" :statement sql-oracle-statement-starters :syntax-alist ((?$ . "_") (?# . "_")) - :terminator ("\\(^/\\|;\\)$" . "/") + :terminator ("\\(^/\\|;\\)" . "/") :input-filter sql-placeholders-filter) (postgres @@ -495,7 +497,7 @@ :prompt-length 5 :prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] " :input-filter sql-remove-tabs-filter - :terminator ("\\(^\\s-*\\\\g$\\|;\\)" . "\\g")) + :terminator ("\\(^\\s-*\\\\g\\|;\\)" . "\\g")) (solid :name "Solid" @@ -520,8 +522,7 @@ :completion-object sql-sqlite-completion-object :prompt-regexp "^sqlite> " :prompt-length 8 - :prompt-cont-regexp "^ \\.\\.\\.> " - :terminator ";") + :prompt-cont-regexp "^ \\.\\.\\.> ") (sybase :name "Sybase" @@ -1219,6 +1220,11 @@ ;; Customization for Microsoft +;; Microsoft documentation seems to indicate that ISQL and OSQL are +;; going away and being replaced by SQLCMD. If anyone has experience +;; using SQLCMD, modified product configuration and feedback on its +;; use would be greatly appreciated. + (defcustom sql-ms-program "osql" "Command to start osql by Microsoft. @@ -3640,12 +3646,16 @@ Placeholders are words starting with an ampersand like &this." (when sql-oracle-scan-on - (while (string-match "&?&\\(\\(?:\\sw\\|\\s_\\)+\\)[.]?" string) - (setq string (replace-match - (read-from-minibuffer - (format "Enter value for %s: " (match-string 1 string)) - nil nil nil 'sql-placeholder-history) - t t string)))) + (let ((start 0) + (replacement "")) + (while (string-match "&?&\\(\\(?:\\sw\\|\\s_\\)+\\)[.]?" string start) + (setq replacement (read-from-minibuffer + (format "Enter value for %s: " + (propertize (match-string 1 string) + 'face 'font-lock-variable-name-face)) + nil nil nil 'sql-placeholder-history) + string (replace-match replacement t t string) + start (+ (match-beginning 1) (length replacement)))))) string) ;; Using DB2 interactively, newlines must be escaped with " \". @@ -3742,7 +3752,8 @@ (or (> (length (or sql-preoutput-hold "")) 0) (> (or sql-output-newline-count 0) 0) (not (or (string-match sql-prompt-regexp oline) - (string-match sql-prompt-cont-regexp oline))))) + (and sql-prompt-cont-regexp + (string-match sql-prompt-cont-regexp oline)))))) (save-match-data (let (prompt-found last-nl) @@ -3794,6 +3805,8 @@ oline) ;;; Sending the region to the SQLi buffer. +(defvar sql-debug-send nil + "Display text sent to SQL process pragmatically.") (defun sql-send-string (str) "Send the string STR to the SQL process." @@ -3807,12 +3820,14 @@ (save-excursion ;; Set product context (with-current-buffer sql-buffer + (when sql-debug-send + (message ">>SQL> %S" s)) + ;; Send the string (trim the trailing whitespace) - (sql-input-sender (get-buffer-process sql-buffer) s) + (sql-input-sender (get-buffer-process (current-buffer)) s) ;; Send a command terminator if we must - (when sql-send-terminator - (sql-send-magic-terminator sql-buffer s sql-send-terminator)) + (sql-send-magic-terminator sql-buffer s sql-send-terminator) (when sql-pop-to-buffer-after-send-region (message "Sent string to buffer %s" sql-buffer)))) @@ -3874,12 +3889,8 @@ ;; Check to see if the pattern is present in the str already sent (unless (and pat term - (string-match (concat pat "\\'") str)) - (comint-simple-send (get-buffer-process buf) term) - (setq sql-output-newline-count - (if sql-output-newline-count - (1+ sql-output-newline-count) - 1))))) + (string-match-p (concat pat "\\'") str)) + (sql-input-sender (get-buffer-process buf) term)))) (defun sql-remove-tabs-filter (str) "Replace tab characters with spaces." @@ -4390,12 +4401,12 @@ ;; Set comint based on user overrides. (setq comint-prompt-regexp (if sql-prompt-cont-regexp - (concat "\\(" sql-prompt-regexp - "\\|" sql-prompt-cont-regexp "\\)") + (concat "\\(?:\\(?:" sql-prompt-regexp "\\)" + "\\|\\(?:" sql-prompt-cont-regexp "\\)\\)") sql-prompt-regexp)) (setq left-margin (or sql-prompt-length 0)) ;; Install input sender - (set (make-local-variable 'comint-input-sender) 'sql-input-sender) + (set (make-local-variable 'comint-input-sender) #'sql-input-sender) ;; People wanting a different history file for each ;; buffer/process/client/whatever can change separator and file-name ;; on the sql-interactive-mode-hook. diff -Nru emacs-snapshot-96774/lisp/subr.el emacs-snapshot-96792/lisp/subr.el --- emacs-snapshot-96774/lisp/subr.el 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/lisp/subr.el 2019-04-21 22:14:03.000000000 +0000 @@ -580,6 +580,7 @@ If LIST is nil, return nil. If N is non-nil, return the Nth-to-last link of LIST. If N is bigger than the length of LIST, return LIST." + (declare (side-effect-free t)) (if n (and (>= n 0) (let ((m (safe-length list))) @@ -591,6 +592,7 @@ "Return a copy of LIST with the last N elements removed. If N is omitted or nil, the last element is removed from the copy." + (declare (side-effect-free t)) (if (and n (<= n 0)) list (nbutlast (copy-sequence list) n))) @@ -726,6 +728,7 @@ If no element matches, the value is nil. If TEST is omitted or nil, `equal' is used." + (declare (side-effect-free t)) (let (found (tail alist) value) (while (and tail (not found)) (let ((elt (car tail))) @@ -739,6 +742,7 @@ ELT must be a string. Upper-case and lower-case letters are treated as equal. Unibyte strings are converted to multibyte for comparison. Non-strings in LIST are ignored." + (declare (side-effect-free t)) (while (and list (not (and (stringp (car list)) (eq t (compare-strings elt 0 nil (car list) 0 nil t))))) @@ -822,6 +826,7 @@ (defun remove (elt seq) "Return a copy of SEQ with all occurrences of ELT removed. SEQ must be a list, vector, or string. The comparison is done with `equal'." + (declare (side-effect-free t)) (if (nlistp seq) ;; If SEQ isn't a list, there's no need to copy SEQ because ;; `delete' will return a new object. @@ -832,6 +837,7 @@ "Return LIST with all occurrences of ELT removed. The comparison is done with `eq'. Contrary to `delq', this does not use side-effects, and the argument LIST is not modified." + (declare (side-effect-free t)) (while (and (eq elt (car list)) (setq list (cdr list)))) (if (memq elt list) (delq elt (copy-sequence list)) @@ -3898,6 +3904,7 @@ STRING should be given if the last search was by `string-match' on STRING. If STRING is nil, the current buffer should be the same buffer the search/match was performed in." + (declare (side-effect-free t)) (if (match-beginning num) (if string (substring string (match-beginning num) (match-end num)) @@ -3911,6 +3918,7 @@ STRING should be given if the last search was by `string-match' on STRING. If STRING is nil, the current buffer should be the same buffer the search/match was performed in." + (declare (side-effect-free t)) (if (match-beginning num) (if string (substring-no-properties string (match-beginning num) diff -Nru emacs-snapshot-96774/lisp/vc/log-edit.el emacs-snapshot-96792/lisp/vc/log-edit.el --- emacs-snapshot-96774/lisp/vc/log-edit.el 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/lisp/vc/log-edit.el 2019-04-21 22:14:03.000000000 +0000 @@ -1087,6 +1087,22 @@ (if summary (insert summary "\n\n")) (cons (buffer-string) res)))) +(defun log-edit--toggle-amend (last-msg-fn) + (when (log-edit-toggle-header "Amend" "yes") + (goto-char (point-max)) + (unless (bolp) (insert "\n")) + (insert (funcall last-msg-fn)) + (save-excursion + (rfc822-goto-eoh) + (forward-line 1) + (let ((pt (point))) + (and (zerop (forward-line 1)) + (looking-at "\n\\|\\'") + (let ((summary (buffer-substring-no-properties pt (1- (point))))) + (skip-chars-forward " \n") + (delete-region pt (point)) + (log-edit-set-header "Summary" summary))))))) + (provide 'log-edit) ;;; log-edit.el ends here diff -Nru emacs-snapshot-96774/lisp/vc/vc-git.el emacs-snapshot-96792/lisp/vc/vc-git.el --- emacs-snapshot-96774/lisp/vc/vc-git.el 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/lisp/vc/vc-git.el 2019-04-21 22:14:03.000000000 +0000 @@ -750,7 +750,7 @@ (declare-function log-edit-mode "log-edit" ()) (declare-function log-edit-toggle-header "log-edit" (header value)) (declare-function log-edit-extract-headers "log-edit" (headers string)) -(declare-function log-edit-set-header "log-edit" (header value &optional toggle)) +(declare-function log-edit--toggle-amend "log-edit" (last-msg-fn)) (defun vc-git-log-edit-toggle-signoff () "Toggle whether to add the \"Signed-off-by\" line at the end of @@ -767,23 +767,12 @@ "Toggle whether this will amend the previous commit. If toggling on, also insert its message into the buffer." (interactive) - (when (log-edit-toggle-header "Amend" "yes") - (goto-char (point-max)) - (unless (bolp) (insert "\n")) - (insert (with-output-to-string - (vc-git-command - standard-output 1 nil - "log" "--max-count=1" "--pretty=format:%B" "HEAD"))) - (save-excursion - (rfc822-goto-eoh) - (forward-line 1) - (let ((pt (point))) - (and (zerop (forward-line 1)) - (looking-at "\n\\|\\'") - (let ((summary (buffer-substring-no-properties pt (1- (point))))) - (skip-chars-forward " \n") - (delete-region pt (point)) - (log-edit-set-header "Summary" summary))))))) + (log-edit--toggle-amend + (lambda () + (with-output-to-string + (vc-git-command + standard-output 1 nil + "log" "--max-count=1" "--pretty=format:%B" "HEAD"))))) (defvar vc-git-log-edit-mode-map (let ((map (make-sparse-keymap "Git-Log-Edit"))) diff -Nru emacs-snapshot-96774/lisp/vc/vc-hg.el emacs-snapshot-96792/lisp/vc/vc-hg.el --- emacs-snapshot-96774/lisp/vc/vc-hg.el 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/lisp/vc/vc-hg.el 2019-04-21 22:14:03.000000000 +0000 @@ -1104,15 +1104,42 @@ (vc-hg-command nil 0 file "forget")) (declare-function log-edit-extract-headers "log-edit" (headers string)) +(declare-function log-edit-mode "log-edit" ()) +(declare-function log-edit--toggle-amend "log-edit" (last-msg-fn)) + +(defun vc-hg-log-edit-toggle-amend () + "Toggle whether this will amend the previous commit. +If toggling on, also insert its message into the buffer." + (interactive) + (log-edit--toggle-amend + (lambda () + (with-output-to-string + (vc-hg-command + standard-output 1 nil + "log" "--limit=1" "--template" "{desc}"))))) + +(defvar vc-hg-log-edit-mode-map + (let ((map (make-sparse-keymap "Hg-Log-Edit"))) + (define-key map "\C-c\C-e" 'vc-hg-log-edit-toggle-amend) + map)) + +(define-derived-mode vc-hg-log-edit-mode log-edit-mode "Log-Edit/hg" + "Major mode for editing Hg log messages. +It is based on `log-edit-mode', and has Hg-specific extensions.") (defun vc-hg-checkin (files comment &optional _rev) "Hg-specific version of `vc-backend-checkin'. REV is ignored." - (apply 'vc-hg-command nil 0 files - (nconc (list "commit" "-m") - (log-edit-extract-headers '(("Author" . "--user") - ("Date" . "--date")) - comment)))) + (let ((amend-extract-fn + (lambda (value) + (when (equal value "yes") + (list "--amend"))))) + (apply 'vc-hg-command nil 0 files + (nconc (list "commit" "-m") + (log-edit-extract-headers `(("Author" . "--user") + ("Date" . "--date") + ("Amend" . ,amend-extract-fn)) + comment))))) (defun vc-hg-find-revision (file rev buffer) (let ((coding-system-for-read 'binary) diff -Nru emacs-snapshot-96774/lwlib/lwlib-Xaw.c emacs-snapshot-96792/lwlib/lwlib-Xaw.c --- emacs-snapshot-96774/lwlib/lwlib-Xaw.c 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/lwlib/lwlib-Xaw.c 2019-04-21 22:14:03.000000000 +0000 @@ -154,7 +154,7 @@ &gi); bp = cp ? cp + 1 : NULL; h += xft_font->height; - if (w < gi.width) w = gi.width; + if (w < gi.xOff) w = gi.xOff; } *height = h; @@ -170,11 +170,12 @@ int x = inverse ? 0 : 2; char *bp = lbl; - data->xft_draw = XftDrawCreate (XtDisplay (data->widget), - data->p, - DefaultVisual (XtDisplay (data->widget), - screen), - DefaultColormapOfScreen (sc)); + if (!data->xft_draw) + data->xft_draw = XftDrawCreate (XtDisplay (data->widget), + data->p, + DefaultVisual (XtDisplay (data->widget), + screen), + DefaultColormapOfScreen (sc)); XftDrawRect (data->xft_draw, inverse ? &data->xft_fg : &data->xft_bg, 0, 0, data->p_width, data->p_height); diff -Nru emacs-snapshot-96774/lwlib/xlwmenu.c emacs-snapshot-96792/lwlib/xlwmenu.c --- emacs-snapshot-96774/lwlib/xlwmenu.c 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/lwlib/xlwmenu.c 2019-04-21 22:14:03.000000000 +0000 @@ -332,7 +332,7 @@ XftTextExtentsUtf8 (XtDisplay (mw), mw->menu.xft_font, (FcChar8 *) s, strlen (s), &gi); - return gi.width; + return gi.xOff; } #endif #ifdef HAVE_X_I18N diff -Nru emacs-snapshot-96774/src/emacs.c emacs-snapshot-96792/src/emacs.c --- emacs-snapshot-96774/src/emacs.c 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/src/emacs.c 2019-04-21 22:14:03.000000000 +0000 @@ -342,7 +342,7 @@ bool fatal_error_in_progress; #ifdef HAVE_NS -/* NS autrelease pool, for memory management. */ +/* NS autorelease pool, for memory management. */ static void *ns_pool; #endif diff -Nru emacs-snapshot-96774/src/pdumper.c emacs-snapshot-96792/src/pdumper.c --- emacs-snapshot-96774/src/pdumper.c 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/src/pdumper.c 2019-04-21 22:14:03.000000000 +0000 @@ -4623,9 +4623,7 @@ { map->mapping = NULL; map->release = NULL; - void *private = map->private; map->private = NULL; - free (private); } static void @@ -4648,7 +4646,10 @@ { eassert (cb->refcount > 0); if (--cb->refcount == 0) - free (cb->mem); + { + free (cb->mem); + free (cb); + } } static void @@ -4663,7 +4664,12 @@ size_t total_size) { bool ret = false; + + /* FIXME: This storage sometimes is never freed. + Beware: the simple patch 2019-03-11T15:20:54Z!eggert@cs.ucla.edu + is worse, as it sometimes frees this storage twice. */ struct dump_memory_map_heap_control_block *cb = calloc (1, sizeof (*cb)); + char *mem; if (!cb) goto out; diff -Nru emacs-snapshot-96774/test/lisp/image-tests.el emacs-snapshot-96792/test/lisp/image-tests.el --- emacs-snapshot-96774/test/lisp/image-tests.el 1970-01-01 00:00:00.000000000 +0000 +++ emacs-snapshot-96792/test/lisp/image-tests.el 2019-04-21 22:14:03.000000000 +0000 @@ -0,0 +1,45 @@ +;;; image-tests.el --- tests for image.el -*- lexical-binding: t -*- + +;; Copyright (C) 2019 Free Software Foundation, Inc. + +;; 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 . + +;;; Code: + +(require 'ert) +(require 'image) + +(ert-deftest image--set-property () + "Test `image--set-property' behavior." + (let ((image (list 'image))) + ;; Add properties. + (setf (image-property image :scale) 1) + (should (equal image '(image :scale 1))) + (setf (image-property image :width) 8) + (should (equal image '(image :scale 1 :width 8))) + (setf (image-property image :height) 16) + (should (equal image '(image :scale 1 :width 8 :height 16))) + ;; Delete properties. + (setf (image-property image :type) nil) + (should (equal image '(image :scale 1 :width 8 :height 16))) + (setf (image-property image :scale) nil) + (should (equal image '(image :width 8 :height 16))) + (setf (image-property image :height) nil) + (should (equal image '(image :width 8))) + (setf (image-property image :width) nil) + (should (equal image '(image))))) + +;;; image-tests.el ends here diff -Nru emacs-snapshot-96774/test/lisp/progmodes/flymake-tests.el emacs-snapshot-96792/test/lisp/progmodes/flymake-tests.el --- emacs-snapshot-96774/test/lisp/progmodes/flymake-tests.el 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/test/lisp/progmodes/flymake-tests.el 2019-04-21 22:14:03.000000000 +0000 @@ -143,7 +143,8 @@ (ert-deftest different-diagnostic-types () "Test GCC warning via function predicate." ;; http://lists.gnu.org/archive/html/emacs-devel/2019-03/msg01043.html - :expected-result (if (getenv "EMACS_HYDRA_CI") :failed :passed) + :expected-result (if (or (getenv "EMACS_HYDRA_CI") (getenv "EMACS_EMBA_CI")) + :failed :passed) (skip-unless (and (executable-find "gcc") (version<= "5" (string-trim diff -Nru emacs-snapshot-96774/test/lisp/progmodes/sql-tests.el emacs-snapshot-96792/test/lisp/progmodes/sql-tests.el --- emacs-snapshot-96774/test/lisp/progmodes/sql-tests.el 2019-04-20 22:17:08.000000000 +0000 +++ emacs-snapshot-96792/test/lisp/progmodes/sql-tests.el 2019-04-21 22:14:03.000000000 +0000 @@ -270,5 +270,39 @@ (sql-test-product-feature-harness (should-not (sql-get-product-feature 'd :Z)))) +;;; SQL Oracle SCAN/DEFINE +(ert-deftest sql-tests-placeholder-filter () + "Test that placeholder relacement is as expected." + (let ((syntab (syntax-table)) + (sql-oracle-scan-on t) + (placeholder-value "")) + (set-syntax-table sql-mode-syntax-table) + + (cl-letf + (((symbol-function 'read-from-minibuffer) + (lambda (&rest _) placeholder-value))) + + (setq placeholder-value "XX") + (should (equal + (sql-placeholders-filter "select '&x' from dual;") + "select 'XX' from dual;")) + + (setq placeholder-value "&Y") + (should (equal + (sql-placeholders-filter "select '&x' from dual;") + "select '&Y' from dual;")) + (should (equal + (sql-placeholders-filter "select '&x' from dual;") + "select '&Y' from dual;")) + (should (equal + (sql-placeholders-filter "select '&x.' from dual;") + "select '&Y' from dual;")) + (should (equal + (sql-placeholders-filter "select '&x.y' from dual;") + "select '&Yy' from dual;"))) + + (set-syntax-table syntab))) + + (provide 'sql-tests) ;;; sql-tests.el ends here