commit 4635016869f7b85dfe37669674677a7dcaab20c4 (HEAD, refs/remotes/origin/master) Author: Noam Postavsky Date: Thu May 11 21:06:33 2017 -0400 Make `indent-line-to' respect field boundaries (Bug#26891) * lisp/indent.el (indent-line-to): Use `back-to-indentation' instead of `backward-to-indentation'. diff --git a/lisp/indent.el b/lisp/indent.el index fdd184c799..e7a30b885d 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -285,7 +285,7 @@ indentation by specifying a large negative ARG." "Indent current line to COLUMN. This function removes or adds spaces and tabs at beginning of line only if necessary. It leaves point at end of indentation." - (backward-to-indentation 0) + (back-to-indentation) (let ((cur-col (current-column))) (cond ((< cur-col column) (if (>= (- column (* (/ cur-col tab-width) tab-width)) tab-width) commit 750f0e2e79e1bdc3246b07aa3219cab34ebde6e7 Author: Noam Postavsky Date: Thu May 11 18:12:40 2017 -0400 Make sure indent-sexp stops at end of sexp (Bug#26878) * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Check endpos before indenting. * test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp-stop): New test. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 6287f27b13..3334471d25 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1184,21 +1184,24 @@ ENDPOS is encountered." ;; after point. (save-excursion (forward-sexp 1) (point))))) (save-excursion - (while (< (point) endpos) - (let ((indent (lisp-indent-calc-next parse-state))) - ;; If the line contains a comment indent it now with - ;; `indent-for-comment'. - (when (nth 4 (lisp-indent-state-ppss parse-state)) - (save-excursion - (goto-char (lisp-indent-state-ppss-point parse-state)) - (indent-for-comment) - (setf (lisp-indent-state-ppss-point parse-state) - (line-end-position)))) - ;; But not if the line is blank, or just a comment (we - ;; already called `indent-for-comment' above). - (skip-chars-forward " \t") - (unless (or (eolp) (eq (char-syntax (char-after)) ?<) (not indent)) - (indent-line-to indent))))) + (while (let ((indent (lisp-indent-calc-next parse-state)) + (ppss (lisp-indent-state-ppss parse-state))) + ;; If the line contains a comment indent it now with + ;; `indent-for-comment'. + (when (and (nth 4 ppss) (<= (nth 8 ppss) endpos)) + (save-excursion + (goto-char (lisp-indent-state-ppss-point parse-state)) + (indent-for-comment) + (setf (lisp-indent-state-ppss-point parse-state) + (line-end-position)))) + (when (< (point) endpos) + ;; Indent the next line, unless it's blank, or just a + ;; comment (we will `indent-for-comment' the latter). + (skip-chars-forward " \t") + (unless (or (eolp) (not indent) + (eq (char-syntax (char-after)) ?<)) + (indent-line-to indent)) + t)))) (move-marker endpos nil))) (defun indent-pp-sexp (&optional arg) diff --git a/test/lisp/emacs-lisp/lisp-mode-tests.el b/test/lisp/emacs-lisp/lisp-mode-tests.el index 1f78eb3010..f2fe7a6cf4 100644 --- a/test/lisp/emacs-lisp/lisp-mode-tests.el +++ b/test/lisp/emacs-lisp/lisp-mode-tests.el @@ -99,6 +99,20 @@ noindent\" 3 (indent-sexp) (should (equal (buffer-string) correct))))) +(ert-deftest indent-sexp-stop () + "Make sure `indent-sexp' stops at the end of the sexp." + ;; See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26878. + (with-temp-buffer + (emacs-lisp-mode) + (insert "(a ()\n)") + (let ((original (buffer-string))) + (search-backward "a ") + (goto-char (match-end 0)) + (indent-sexp) + ;; The final paren should not be indented, because the sexp + ;; we're indenting ends on the previous line. + (should (equal (buffer-string) original))))) + (ert-deftest lisp-indent-region () "Test basics of `lisp-indent-region'." (with-temp-buffer commit 24d06313c4f205061fb74c9665d5819a05362636 Author: Glenn Morris Date: Mon May 15 21:01:30 2017 -0400 Stop some epg tests failing on rhel7 with gpg 2.0.22 (bug#23619) * test/lisp/epg-tests.el (with-epg-tests): Also set GNUPGHOME in the environment of child processes. This avoids problems if gpg does not pass --homedir to spawned agent. ; Ref eg https://gpgtools.tenderapp.com/discussions/problems/29537-gpg2-doesnt-start-agent-properly-if-using-homedir diff --git a/test/lisp/epg-tests.el b/test/lisp/epg-tests.el index c61527207f..9dd093e792 100644 --- a/test/lisp/epg-tests.el +++ b/test/lisp/epg-tests.el @@ -53,8 +53,12 @@ &rest body) "Set up temporary locations and variables for testing." (declare (indent 1) (debug (sexp body))) - `(let ((epg-tests-home-directory (make-temp-file "epg-tests-homedir" t)) - (process-environment (cons "GPG_AGENT_INFO" process-environment))) + `(let* ((epg-tests-home-directory (make-temp-file "epg-tests-homedir" t)) + (process-environment + (append + (list "GPG_AGENT_INFO" + (format "GNUPGHOME=%s" epg-tests-home-directory)) + process-environment))) (unwind-protect (let ((context (epg-make-context 'OpenPGP))) (setf (epg-context-program context) commit 4ce6e94c99a31475c4c411f06cf9abc096b95bbf Author: Glenn Morris Date: Mon May 15 20:56:46 2017 -0400 Add oldxmenu to system-configuration-features * configure.ac (HAVE_OLDXMENU): New. (emacs_config_features): Add oldxmenu. diff --git a/configure.ac b/configure.ac index d6b8001858..d085552ffe 100644 --- a/configure.ac +++ b/configure.ac @@ -5023,9 +5023,11 @@ else fi AC_SUBST(LIBX_OTHER) +HAVE_OLDXMENU=no if test "$HAVE_GTK" = yes || test "$HAVE_X11" != yes; then LIBXMENU= elif test "$USE_X_TOOLKIT" = none; then + HAVE_OLDXMENU=yes LIBXMENU='$(oldXMenudir)/libXMenu11.a' AUTODEPEND_PARENTS="$AUTODEPEND_PARENTS oldXMenu" else @@ -5298,7 +5300,7 @@ optsep= emacs_config_features= for opt in XAW3D XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND GPM DBUS \ GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT \ - LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT X11 NS MODULES \ + LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS X_TOOLKIT OLDXMENU X11 NS MODULES \ XWIDGETS LIBSYSTEMD CANNOT_DUMP; do case $opt in commit e782761a7defd44e7fce661aee4ac37e27c30bf4 Author: Ted Zlatanov Date: Mon May 15 16:06:08 2017 -0400 * .gitlab-ci.yml: Adjust disclaimer as per RMS. diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 893cb61afb..a438052e00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,11 +15,11 @@ # You should have received a copy of the GNU General Public License # along with GNU Emacs. If not, see . -# GitLab CI support for GNU Emacs +# GNU Emacs support for the GitLab protocol for CI # The presence of this file does not imply any FSF/GNU endorsement of -# GitLab CI or any related entities and is intended only for -# evaluation purposes. +# any particular servce that uses that protocol. Also, it is intended for +# evaluation purposes, thus possibly temporary. # Maintainer: tzz@lifelogs.com # URL: https://gitlab.com/emacs-ci/emacs commit 3241c84fd8cfa1e02472e52e6aefe2fff0726b3d Author: Eli Zaretskii Date: Mon May 15 22:45:57 2017 +0300 Remove unneeded stuff from nt/inc/sys/time.h * nt/inc/sys/time.h (_TIMEVAL_DEFINED, struct timevat, timerisset) (timercmp, timerclear): Don't define. Instead, include the system header sys/time.h, and add only the interval timers stuff. This avoids compiler warnings about 'gettimeofday's prototype, and also avoids redefinition of macros from system headers. diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index de06c116ce..6f67e5db4e 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h @@ -1,29 +1,7 @@ #ifndef SYS_TIME_H_INCLUDED #define SYS_TIME_H_INCLUDED -/* - * sys/time.h either doesn't exist on Windows, or doesn't necessarily - * have the below stuff. - */ - -/* The guards are for MinGW64, which defines these structs on its - system headers which are included by ms-w32.h. */ -/* Allow inclusion of sys/time.h and winsock2.h in any order. Needed - for running the configure test, which is only relevant to MinGW. */ -#ifndef _TIMEVAL_DEFINED -#define _TIMEVAL_DEFINED -struct timeval -{ - long tv_sec; /* seconds */ - long tv_usec; /* microseconds */ -}; -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timercmp(tvp, uvp, cmp) \ - (((tvp)->tv_sec != (uvp)->tv_sec) ? \ - ((tvp)->tv_sec cmp (uvp)->tv_sec) : \ - ((tvp)->tv_usec cmp (uvp)->tv_usec)) -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 -#endif /* _TIMEVAL_DEFINED */ +#include_next #define ITIMER_REAL 0 #define ITIMER_PROF 1