commit 27b754d6b3ade7446b139177e324145f2683e089 (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Tue Jan 9 23:01:24 2018 -0800 Remove some obsolete calendar functions and variables * lisp/calendar/cal-tex.el (cal-tex-list-holidays): Remove alias, obsolete since 24.4. * lisp/calendar/calendar.el (calendar-mode): No longer use calendar-font-lock-keywords. (calendar-font-lock-keywords): Delete variable, obsolete since 24.4. ; * lisp/calendar/holidays.el: Comment. diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index 552832b483..7ae0ecb767 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el @@ -246,8 +246,6 @@ This definition is the heart of the calendar!") (autoload 'holiday-in-range "holidays") -(define-obsolete-function-alias 'cal-tex-list-holidays 'holiday-in-range "24.3") - (autoload 'diary-list-entries "diary-lib") (defun cal-tex-list-diary-entries (d1 d2) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 97acfab326..bfe533fd60 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1786,10 +1786,7 @@ For a complete description, see the info node `Calendar/Diary'. ;; so let's make sure they're always set. Most likely, this will be reset ;; soon in calendar-generate, but better safe than sorry. (unless (boundp 'displayed-month) (setq displayed-month 1)) - (unless (boundp 'displayed-year) (setq displayed-year 2001)) - (if (bound-and-true-p calendar-font-lock-keywords) - (set (make-local-variable 'font-lock-defaults) - '(calendar-font-lock-keywords t)))) + (unless (boundp 'displayed-year) (setq displayed-year 2001))) (defun calendar-string-spread (strings char length) "Concatenate list of STRINGS separated with copies of CHAR to fill LENGTH. @@ -2307,13 +2304,6 @@ Negative years are interpreted as years BC; -1 being 1 BC, and so on." (+ (* 12 (- yr2 yr1)) (- mon2 mon1))) -(defvar calendar-font-lock-keywords nil - "Default keywords to highlight in Calendar mode.") - -(make-obsolete-variable 'calendar-font-lock-keywords - "set font-lock keywords in `calendar-mode-hook', \ -or customize calendar faces." "24.4") - (defun calendar-day-name (date &optional abbrev absolute) "Return a string with the name of the day of the week of DATE. DATE should be a list in the format (MONTH DAY YEAR), unless the diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 8e2a6c9655..198c3bb087 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -522,7 +522,6 @@ strings describing those holidays that apply on DATE, or nil if none do." (setq holiday-list (append holiday-list (cdr h))))))) -;; Formerly cal-tex-list-holidays. (defun holiday-in-range (d1 d2) "Generate a list of all holidays in range from absolute date D1 to D2." (let* ((start (calendar-gregorian-from-absolute d1)) commit 641b817c5c37b2256f85fd54ffea0fbfc572eeae Author: Glenn Morris Date: Tue Jan 9 22:58:08 2018 -0800 Remove some obsolete compat code in supercite.el * lisp/mail/supercite.el (sc-ask, sc-cite-original): Remove obsolete compat code. This file uses modern features. diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index 60669a0212..ce061e2d8c 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -634,12 +634,7 @@ the list should be unique." (deallocate-event event)) (setq quit-flag nil) (signal 'quit '()))) - (let ((char - (if (featurep 'xemacs) - (let* ((key (and (key-press-event-p event) (event-key event))) - (char (and key (event-to-character event)))) - char) - event)) + (let ((char event) elt) (if char (setq char (downcase char))) (cond @@ -651,9 +646,7 @@ the list should be unique." nil) (t (message "%s%s" p (single-key-description event)) - (if (featurep 'xemacs) - (ding nil 'y-or-n-p) - (ding)) + (ding) (discard-input) (if (eq p prompt) (setq p (concat "Try again. " prompt))))))) @@ -1887,8 +1880,7 @@ and `sc-post-hook' is run after the guts of this function." ;; grab point and mark since the region is probably not active when ;; this function gets automatically called. we want point to be a ;; mark so any deleting before point works properly - (let* ((zmacs-regions nil) ; for XEemacs - (mark-active t) ; for Emacs + (let* ((mark-active t) (point (point-marker)) (mark (copy-marker (mark-marker)))) commit d697faca37f8bec92128a278c0a57f6f685df29a Author: Glenn Morris Date: Tue Jan 9 22:56:31 2018 -0800 Remove some obsolete compat code in f90.el * lisp/progmodes/f90.el (f90-mark-subprogram, f90-indent-region) (f90-fill-region): Remove obsolete compat code. This file uses modern features. diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 2105377a16..c3e085dda5 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -123,7 +123,6 @@ ;; mechanism for treating multi-line directives (continued by \ ). ;; 7) f77 do-loops do 10 i=.. ; ; 10 continue are not correctly indented. ;; You are urged to use f90-do loops (with labels if you wish). -;; 8) The highlighting mode under XEmacs is not as complete as under Emacs. ;; List of user commands ;; f90-previous-statement f90-next-statement @@ -1847,10 +1846,8 @@ A block is a subroutine, if-endif, etc." (push-mark) (goto-char pos) (setq program (f90-beginning-of-subprogram)) - (if (featurep 'xemacs) - (zmacs-activate-region) - (setq mark-active t - deactivate-mark nil)) + (setq mark-active t + deactivate-mark nil) program)) (defun f90-comment-region (beg-region end-region) @@ -2042,9 +2039,7 @@ If run in the middle of a line, the line is not broken." (goto-char save-point) (set-marker end-region-mark nil) (set-marker save-point nil) - (if (featurep 'xemacs) - (zmacs-deactivate-region) - (deactivate-mark)))) + (deactivate-mark))) (defun f90-indent-subprogram () "Properly indent the subprogram containing point." @@ -2157,9 +2152,7 @@ Like `join-line', but handles F90 syntax." f90-cache-position (point))) (setq f90-cache-position nil) (set-marker end-region-mark nil) - (if (featurep 'xemacs) - (zmacs-deactivate-region) - (deactivate-mark)))) + (deactivate-mark))) (defun f90-fill-paragraph (&optional justify) "In a comment, fill it as a paragraph, else fill the current statement. commit a94cbaab9ff63d269f62b8619445d4f598f72aaf Author: Glenn Morris Date: Tue Jan 9 22:54:46 2018 -0800 Remove some obsolete compat code in fortran.el * lisp/progmodes/fortran.el (fortran-abbrev-start): Remove obsolete compat code. This file uses modern features. diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index 3fddf2392e..bfbf6c09b2 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -1040,13 +1040,9 @@ With non-nil ARG, uncomments the region." Any other key combination is executed normally." (interactive "*") (insert last-command-event) - (let* ((event (if (fboundp 'next-command-event) ; XEmacs - (next-command-event) - (read-event))) - (char (if (fboundp 'event-to-character) - (event-to-character event) event))) + (let ((event (read-event))) ;; Insert char if not equal to `?', or if abbrev-mode is off. - (if (and abbrev-mode (or (eq char ??) (eq char help-char) + (if (and abbrev-mode (or (eq event ??) (eq event help-char) (memq event help-event-list))) (fortran-abbrev-help) (push event unread-command-events)))) commit ddb26f79b20329ada5f5bc6e1742807d029e06c0 Merge: 0b33768053 7668717d6f Author: Paul Eggert Date: Tue Jan 9 15:29:25 2018 -0800 Merge from origin/emacs-26 7668717d6f Merge from Gnulib 9e4d523427 * lisp/epg.el (epg-start-sign): Replace obsolete functions. 26c58f31a8 Small fix for erc-logging-enabled 34b41e3bc6 Quieten semantic normal usage e25f961e37 Avoid irrelevant hyperlink in doc string of 'epa-pinentry-... ec2636513c * doc/misc/tramp.texi (Remote processes): Mention gdb rest... 918a052a42 Query background for gnome terminal version 3.22 (Bug#29716) 1dfc27576a Make pixel-wise scrolling less laggy f92264fc2a Fix child frame placement issues (bug#29953) a5f718c4c5 ; * doc/lispref/text.texi (Change Hooks): Fix last change. e876f5f9fb Describe the precise interaction of complex primitives wit... 3a22097cf6 Fix valgrind report in call-interactively d5f1c87bfe * src/editfns.c (Fsave_excursion): Doc fix. (Bug#30001) b8d74c4578 Fix mark-defun when there's no spaces between successive d... a377c652b5 Fix Dired display and operations on file names with raw bytes d9d6e8a04c ; Comments related to src/termcap.c f8a07fa6b1 Improve documentation of 'gdb-many-windows' f82400798e Fix failures in smerge-mode on MS-Windows commit 0b33768053184ceadda0ca6dc431969e664cd17e Merge: 646c8e56f8 c967ba1861 Author: Paul Eggert Date: Tue Jan 9 15:29:25 2018 -0800 ; Merge from origin/emacs-26 The following commit was skipped: c967ba1861 Fix description of 'struct' generic function specializer B... commit 646c8e56f8a11832f25523907b85d6522a99f361 Merge: 85f5ee14b5 d382d2bfc5 Author: Paul Eggert Date: Tue Jan 9 15:29:25 2018 -0800 Merge from origin/emacs-26 d382d2bfc5 * etc/DEBUG (Getting control to the debugger): Fix grammar. 687af4c8e8 * lisp/vc/vc.el (vc-region-history): log-view-vc-fileset h... 43e2aafae3 Don't bind dframe events on load (Bug#29599) ab31bf3c5f * lisp/textmodes/picture.el (picture-mode-exit): Doc fix. ... ed44d92fa6 * lisp/textmodes/picture.el (picture-open-line): Doc fix. ... b87a772612 Fix description of 'emacs-internal' a5256da588 Update PROBLEMS with selection-related issues c59ecb005e New customization variable for python-mode indentation (Bu... 4e20c8f220 Fix menu keyboard shortcuts on macOS (Bug#29595) # Conflicts: # etc/NEWS commit 85f5ee14b55489845eaafbdf70d7f4e25ec44ed7 Merge: fd21bf0c41 30d6c31301 Author: Paul Eggert Date: Tue Jan 9 15:29:20 2018 -0800 ; Merge from origin/emacs-26 The following commit was skipped: 30d6c31301 ; Auto-commit of loaddefs files. commit 7668717d6fecd610d71b54a33708038b2ede8cce Author: Paul Eggert Date: Tue Jan 9 15:21:44 2018 -0800 Merge from Gnulib This incorporates: 2018-01-05 maint: Add encoding marker for Emacs to non-ASCII sources 2018-01-04 update-copyright: Handle use of © 2018-01-04 pthread_sigmask: Avoid compilation error on mingw 2018-01-02 stat-time: silence -Wunused-parameter regression * build-aux/config.guess, build-aux/config.sub: * build-aux/update-copyright, doc/misc/texinfo.tex, lib/gnulib.mk.in: * lib/md5.c, lib/md5.h, lib/sha1.c, lib/sha1.h, lib/sha256.c: * lib/sha256.h, lib/sha512.c, lib/sha512.h, lib/signal.in.h: * lib/stat-time.h: Copy from Gnulib, or regenerate. diff --git a/build-aux/config.guess b/build-aux/config.guess index 6be308dd9c..588fe82a42 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2017-12-17' +timestamp='2018-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." diff --git a/build-aux/config.sub b/build-aux/config.sub index 9e84c010ec..f2632cd8a2 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2017-11-23' +timestamp='2018-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -67,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2017 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." diff --git a/build-aux/update-copyright b/build-aux/update-copyright index 5b11e306cd..3bb26abea1 100755 --- a/build-aux/update-copyright +++ b/build-aux/update-copyright @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"' if 0; # Update an FSF copyright year list to include the current year. -my $VERSION = '2017-09-13.06:45'; # UTC +my $VERSION = '2018-01-04.14:48'; # UTC # Copyright (C) 2009-2018 Free Software Foundation, Inc. # @@ -81,6 +81,7 @@ my $VERSION = '2017-09-13.06:45'; # UTC # B. (c) # C. @copyright{} # D. © +# E. © # # 4. The "Copyright" appears at the beginning of a line, except that it # may be prefixed by any sequence (e.g., a comment) of no more than @@ -124,7 +125,7 @@ use strict; use warnings; my $copyright_re = 'Copyright'; -my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)'; +my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©|©)'; my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; $holder ||= 'Free Software Foundation, Inc.'; my $prefix_max = 5; @@ -263,7 +264,9 @@ else print STDERR "$ARGV: warning: copyright statement not found\n"; } +# Hey Emacs! # Local variables: +# coding: utf-8 # mode: perl # indent-tabs-mode: nil # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index b0179d6b00..1987c50ba2 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -5,7 +5,10 @@ % \def\texinfoversion{2017-12-26.21} % -% Copyright 1985-1986, 1988, 1990-2018 Free Software Foundation, Inc. +% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 +% Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index ee9e6bd12e..71c01e3e2a 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -945,7 +945,6 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ -runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/md5.c b/lib/md5.c index 8bdd4a7884..9dc915e2cf 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -469,3 +469,10 @@ md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) ctx->D = D; } #endif + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff --git a/lib/md5.h b/lib/md5.h index 4adfcdd9cf..d89f819a97 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -133,3 +133,10 @@ extern int __md5_stream (FILE *stream, void *resblock) __THROW; # endif #endif /* md5.h */ + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff --git a/lib/sha1.c b/lib/sha1.c index 89a0f71e20..ce0f0b2e71 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -434,3 +434,10 @@ sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx) } } #endif + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff --git a/lib/sha1.h b/lib/sha1.h index 62c507bbdf..b1db15da1e 100644 --- a/lib/sha1.h +++ b/lib/sha1.h @@ -98,3 +98,10 @@ extern int sha1_stream (FILE *stream, void *resblock); # endif #endif + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff --git a/lib/sha256.c b/lib/sha256.c index 2f28fcd710..85405b20fd 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -577,3 +577,10 @@ sha256_process_block (const void *buffer, size_t len, struct sha256_ctx *ctx) } } #endif + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff --git a/lib/sha256.h b/lib/sha256.h index ca06691241..e3449864bb 100644 --- a/lib/sha256.h +++ b/lib/sha256.h @@ -101,3 +101,10 @@ extern int sha224_stream (FILE *stream, void *resblock); # endif #endif + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff --git a/lib/sha512.c b/lib/sha512.c index d6a8ce181a..8a6dd4e83a 100644 --- a/lib/sha512.c +++ b/lib/sha512.c @@ -629,3 +629,10 @@ sha512_process_block (const void *buffer, size_t len, struct sha512_ctx *ctx) } } #endif + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff --git a/lib/sha512.h b/lib/sha512.h index 516e75b301..6a0aadba02 100644 --- a/lib/sha512.h +++ b/lib/sha512.h @@ -104,3 +104,10 @@ extern int sha384_stream (FILE *stream, void *resblock); # endif #endif + +/* + * Hey Emacs! + * Local Variables: + * coding: utf-8 + * End: + */ diff --git a/lib/signal.in.h b/lib/signal.in.h index 483413dc7f..7d4927b828 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -137,7 +137,7 @@ _GL_FUNCDECL_RPL (pthread_sigmask, int, _GL_CXXALIAS_RPL (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # else -# if !@HAVE_PTHREAD_SIGMASK@ +# if !(@HAVE_PTHREAD_SIGMASK@ || defined pthread_sigmask) _GL_FUNCDECL_SYS (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # endif diff --git a/lib/stat-time.h b/lib/stat-time.h index 5f8bf4e126..104f537668 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h @@ -102,15 +102,13 @@ get_stat_mtime_ns (struct stat const *st) /* Return the nanosecond component of *ST's birth time. */ _GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE -get_stat_birthtime_ns (struct stat const *st) +get_stat_birthtime_ns (struct stat const *st _GL_UNUSED) { # if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC return STAT_TIMESPEC (st, st_birthtim).tv_nsec; # elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC return STAT_TIMESPEC_NS (st, st_birthtim); # else - /* Avoid a "parameter unused" warning. */ - (void) st; return 0; # endif } @@ -160,7 +158,7 @@ get_stat_mtime (struct stat const *st) /* Return *ST's birth time, if available; otherwise return a value with tv_sec and tv_nsec both equal to -1. */ _GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE -get_stat_birthtime (struct stat const *st) +get_stat_birthtime (struct stat const *st _GL_UNUSED) { struct timespec t; @@ -184,8 +182,6 @@ get_stat_birthtime (struct stat const *st) /* Birth time is not supported. */ t.tv_sec = -1; t.tv_nsec = -1; - /* Avoid a "parameter unused" warning. */ - (void) st; #endif #if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ @@ -212,7 +208,7 @@ get_stat_birthtime (struct stat const *st) errno to EOVERFLOW if normalization overflowed. This function is intended to be private to this .h file. */ _GL_STAT_TIME_INLINE int -stat_time_normalize (int result, struct stat *st) +stat_time_normalize (int result, struct stat *st _GL_UNUSED) { #if defined __sun && defined STAT_TIMESPEC if (result == 0) commit 9e4d523427782ea4e49f4f13b2b99b09660516cc Author: Glenn Morris Date: Tue Jan 9 15:10:43 2018 -0500 * lisp/epg.el (epg-start-sign): Replace obsolete functions. diff --git a/lisp/epg.el b/lisp/epg.el index 3c20c27049..dc0e2df583 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -1676,8 +1676,8 @@ If you are unsure, use synchronous version of this function (setf (epg-context-operation context) 'sign) (setf (epg-context-result context) nil) (unless (memq mode '(t detached nil normal)) ;i.e. cleartext - (epg-context-set-armor context nil) - (epg-context-set-textmode context nil)) + (setf (epg-context-armor context) nil) + (setf (epg-context-textmode context) nil)) (epg--start context (append (list (if (memq mode '(t detached)) "--detach-sign" commit 26c58f31a84b7e30110326008eb293e42edca78f Author: Glenn Morris Date: Tue Jan 9 14:48:29 2018 -0500 Small fix for erc-logging-enabled * lisp/erc/erc-log.el (erc-logging-enabled): Respect buffer-locality of erc-enable-logging variable. diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el index 1f0cb13c0d..babcb5f68f 100644 --- a/lisp/erc/erc-log.el +++ b/lisp/erc/erc-log.el @@ -321,12 +321,13 @@ If BUFFER is nil, the value of `current-buffer' is used. Logging is enabled if `erc-log-channels-directory' is non-nil, the directory is writable (it will be created as necessary) and `erc-enable-logging' returns a non-nil value." + (or buffer (setq buffer (current-buffer))) (and erc-log-channels-directory (or (functionp erc-log-channels-directory) (erc-directory-writable-p erc-log-channels-directory)) (if (functionp erc-enable-logging) - (funcall erc-enable-logging (or buffer (current-buffer))) - erc-enable-logging))) + (funcall erc-enable-logging buffer) + (buffer-local-value 'erc-enable-logging buffer)))) (defun erc-log-standardize-name (filename) "Make FILENAME safe to use as the name of an ERC log. commit 34b41e3bc63db635612233a887a30ef11651c1c1 Author: Glenn Morris Date: Tue Jan 9 13:54:11 2018 -0500 Quieten semantic normal usage * lisp/cedet/semantic/lex.el (semantic-flex): Mark obsolete at compile time in the normal way, not at run-time. (Bug#30035) diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index 9a35dd82f0..3a8b0c7800 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el @@ -471,6 +471,7 @@ PROPERTY set." ;;; Lexical Analyzer framework settings ;; +;; FIXME change to non-obsolete default. (defvar semantic-lex-analyzer 'semantic-flex "The lexical analyzer used for a given buffer. See `semantic-lex' for documentation. @@ -1857,7 +1858,7 @@ end of the return token will be larger than END. To truly restrict scanning, use `narrow-to-region'. The last argument, LENGTH specifies that `semantic-flex' should only return LENGTH tokens." - (message "`semantic-flex' is an obsolete function. Use `define-lex' to create lexers.") + (declare (obsolete define-lex "23.2")) (if (not semantic-flex-keywords-obarray) (setq semantic-flex-keywords-obarray [ nil ])) (let ((ts nil) commit e25f961e37b063c10d7ffb3caa167ff61e816dcb Author: Eli Zaretskii Date: Mon Jan 8 23:26:11 2018 +0200 Avoid irrelevant hyperlink in doc string of 'epa-pinentry-mode' * lisp/epa.el (epa-pinentry-mode): Doc fix. (Bug#30025) diff --git a/lisp/epa.el b/lisp/epa.el index d2ad80e8fe..7878340fcd 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -56,12 +56,15 @@ If neither t nor nil, ask user for confirmation." :type 'integer :group 'epa) +;; In the doc string below, we say "symbol `error'" to avoid producing +;; a hyperlink for `error' the function. (defcustom epa-pinentry-mode nil "The pinentry mode. GnuPG 2.1 or later has an option to control the behavior of -Pinentry invocation. Possible modes are: `ask', `cancel', -`error', and `loopback'. See the GnuPG manual for the meanings. +Pinentry invocation. The value should be the symbol `error', +`ask', `cancel', or `loopback'. See the GnuPG manual for the +meanings. In epa commands, a particularly useful mode is `loopback', which redirects all Pinentry queries to the caller, so Emacs can query commit ec2636513cff3c35063dbaaf10059cbf2c8a9673 Author: Michael Albinus Date: Mon Jan 8 16:43:46 2018 +0100 * doc/misc/tramp.texi (Remote processes): Mention gdb restrictions with I/O. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index c1f941a640..25ae8ae3e8 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2828,6 +2828,10 @@ warning, which can be ignored: &"warning: GDB: Failed to set controlling terminal: Operation not permitted\n" @end example +@noindent +As consequence, there will be restrictions in I/O of the process to be +debugged. + Relative file names are based on the remote default directory. When @file{myprog.pl} exists in @file{@trampfn{ssh,host,/home/user}}, valid calls include: commit 918a052a422c05b5f78fd7c702eb6e3ee189fa18 Author: Noam Postavsky Date: Thu Dec 14 21:42:56 2017 -0500 Query background for gnome terminal version 3.22 (Bug#29716) * lisp/term/xterm.el (xterm--version-handler): Use xterm--report-background-handler for terminals reporting minor version 4000 and above. diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index 6f0d128b3d..9209a76fcd 100644 --- a/lisp/term/xterm.el +++ b/lisp/term/xterm.el @@ -670,8 +670,13 @@ Return the pasted text as a string." (when (and (> version 2000) (equal (match-string 1 str) "1")) ;; Hack attack! bug#16988: gnome-terminal reports "1;NNNN;0" ;; with a large NNNN but is based on a rather old xterm code. - ;; Gnome terminal 3.6.1 reports 1;3406;0 ;; Gnome terminal 2.32.1 reports 1;2802;0 + ;; Gnome terminal 3.6.1 reports 1;3406;0 + ;; Gnome terminal 3.22.2 reports 1;4601;0 and *does* support + ;; background color querying (Bug#29716). + (when (> version 4000) + (xterm--query "\e]11;?\e\\" + '(("\e]11;" . xterm--report-background-handler)))) (setq version 200)) (when (equal (match-string 1 str) "83") ;; `screen' (which returns 83;40003;0) seems to also lack support for commit 1dfc27576afe558da781b2d5f4845ca242dce3cc Author: Tak Kunihiro Date: Sun Jan 7 09:17:09 2018 +0200 Make pixel-wise scrolling less laggy * lisp/pixel-scroll.el (pixel-dead-time, pixel-last-scroll-time): New variables. (pixel-scroll-up, pixel-scroll-down): Invoke 'scroll-up' or 'scroll-down' when called within 'pixel-dead-time'. (Bug#29737) diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index bfc48bac2e..d362419e0f 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -82,6 +82,27 @@ case you need scrolling resolution of a pixel, set to 1. After a pixel scroll, typing \\[next-line] or \\[previous-line] scrolls the window to make it fully visible, and undoes the effect of the pixel-level scroll.") +(defvar pixel-dead-time 0.1 + "Minimal interval in seconds before next smooth scrolling. +If another scrolling request arrives within this period, scrolling +will be carried out without pixel resolution. If zero, scrolling +is always with pixel resolution.") + +(defvar pixel-last-scroll-time 0 + "Time when the last scrolling was made, in second since the epoch.") + +(defun pixel-scroll-in-rush-p () + "Return non-nil if next scroll should be non-smooth. +When scrolling request is delivered soon after the previous one, +user is in hurry. When the time since last scroll is larger than +`pixel-dead-time', we are ready for another smooth scroll, and this +function returns nil." + (let* ((current-time (float-time)) + (scroll-in-rush-p (< (- current-time pixel-last-scroll-time) + pixel-dead-time))) + (setq pixel-last-scroll-time current-time) + scroll-in-rush-p)) + ;;;###autoload (define-minor-mode pixel-scroll-mode "A minor mode to scroll text pixel-by-pixel. @@ -104,35 +125,39 @@ if ARG is omitted or nil." This is an alternative of `scroll-up'. Scope moves downward." (interactive) (or arg (setq arg 1)) - (dotimes (ii arg) ; move scope downward - (let ((amt (if pixel-resolution-fine-flag - (if (integerp pixel-resolution-fine-flag) - pixel-resolution-fine-flag - (frame-char-height)) - (pixel-line-height)))) - (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close - (scroll-up 1) ; relay on robust method - (while (pixel-point-at-top-p amt) ; prevent too late (multi tries) - (vertical-motion 1)) ; move point downward - (pixel-scroll-pixel-up amt))))) ; move scope downward + (if (pixel-scroll-in-rush-p) + (scroll-up arg) + (dotimes (ii arg) ; move scope downward + (let ((amt (if pixel-resolution-fine-flag + (if (integerp pixel-resolution-fine-flag) + pixel-resolution-fine-flag + (frame-char-height)) + (pixel-line-height)))) + (if (pixel-eob-at-top-p) ; when end-of-the-buffer is close + (scroll-up 1) ; relay on robust method + (while (pixel-point-at-top-p amt) ; prevent too late (multi tries) + (vertical-motion 1)) ; move point downward + (pixel-scroll-pixel-up amt)))))) ; move scope downward (defun pixel-scroll-down (&optional arg) "Scroll text of selected window down ARG lines. This is and alternative of `scroll-down'. Scope moves upward." (interactive) (or arg (setq arg 1)) - (dotimes (ii arg) - (let ((amt (if pixel-resolution-fine-flag - (if (integerp pixel-resolution-fine-flag) - pixel-resolution-fine-flag - (frame-char-height)) - (pixel-line-height -1)))) - (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries) - (vertical-motion -1)) ; move point upward - (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen - (pixel-eob-at-top-p)) ; for file with a long line - (scroll-down 1) ; relay on robust method - (pixel-scroll-pixel-down amt))))) + (if (pixel-scroll-in-rush-p) + (scroll-down arg) + (dotimes (ii arg) + (let ((amt (if pixel-resolution-fine-flag + (if (integerp pixel-resolution-fine-flag) + pixel-resolution-fine-flag + (frame-char-height)) + (pixel-line-height -1)))) + (while (pixel-point-at-bottom-p amt) ; prevent too late (multi tries) + (vertical-motion -1)) ; move point upward + (if (or (pixel-bob-at-top-p amt) ; when beginning-of-the-buffer is seen + (pixel-eob-at-top-p)) ; for file with a long line + (scroll-down 1) ; relay on robust method + (pixel-scroll-pixel-down amt)))))) (defun pixel-bob-at-top-p (amt) "Return non-nil if window-start is at beginning of the current buffer. commit f92264fc2acf3af3f98ebefa5ef0e1d4e9be4b80 Author: Alan Third Date: Wed Jan 3 13:45:03 2018 +0000 Fix child frame placement issues (bug#29953) * src/nsterm.h (NS_PARENT_WINDOW_LEFT_POS): (NS_PARENT_WINDOW_TOP_POS): Get the parent frame through the frame struct as invisible child windows are detached from their parents in NS. * src/nsterm.m (x_set_offset): Offscreen frames have `nil' screen value, so handle that gracefully. Child frames with negative left and top should be positioned relative to the bottom right of the parent frame. diff --git a/src/nsterm.h b/src/nsterm.h index c40ddf3284..588b9fc644 100644 --- a/src/nsterm.h +++ b/src/nsterm.h @@ -1073,11 +1073,11 @@ struct x_output window or, if there is no parent window, the screen. */ #define NS_PARENT_WINDOW_LEFT_POS(f) \ (FRAME_PARENT_FRAME (f) != NULL \ - ? [[FRAME_NS_VIEW (f) window] parentWindow].frame.origin.x : 0) + ? [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window].frame.origin.x : 0) #define NS_PARENT_WINDOW_TOP_POS(f) \ (FRAME_PARENT_FRAME (f) != NULL \ - ? ([[FRAME_NS_VIEW (f) window] parentWindow].frame.origin.y \ - + [[FRAME_NS_VIEW (f) window] parentWindow].frame.size.height \ + ? ([FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window].frame.origin.y \ + + [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window].frame.size.height \ - FRAME_NS_TITLEBAR_HEIGHT (FRAME_PARENT_FRAME (f))) \ : [[[NSScreen screens] objectAtIndex: 0] frame].size.height) diff --git a/src/nsterm.m b/src/nsterm.m index 5798f4fd0b..419a37033f 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1736,7 +1736,6 @@ -(void)remove { NSView *view = FRAME_NS_VIEW (f); NSArray *screens = [NSScreen screens]; - NSScreen *fscreen = [screens objectAtIndex: 0]; NSScreen *screen = [[view window] screen]; NSTRACE ("x_set_offset"); @@ -1746,26 +1745,41 @@ -(void)remove f->left_pos = xoff; f->top_pos = yoff; - if (view != nil && screen && fscreen) + if (view != nil) { - f->left_pos = f->size_hint_flags & XNegative - ? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH (f) - : f->left_pos; - /* We use visibleFrame here to take menu bar into account. - Ideally we should also adjust left/top with visibleFrame.origin. */ - - f->top_pos = f->size_hint_flags & YNegative - ? ([screen visibleFrame].size.height + f->top_pos - - FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f) - - FRAME_TOOLBAR_HEIGHT (f)) - : f->top_pos; + if (FRAME_PARENT_FRAME (f) == NULL && screen) + { + f->left_pos = f->size_hint_flags & XNegative + ? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH (f) + : f->left_pos; + /* We use visibleFrame here to take menu bar into account. + Ideally we should also adjust left/top with visibleFrame.origin. */ + + f->top_pos = f->size_hint_flags & YNegative + ? ([screen visibleFrame].size.height + f->top_pos + - FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f) + - FRAME_TOOLBAR_HEIGHT (f)) + : f->top_pos; #ifdef NS_IMPL_GNUSTEP - if (FRAME_PARENT_FRAME (f) == NULL) - { if (f->left_pos < 100) f->left_pos = 100; /* don't overlap menu */ - } #endif + } + else if (FRAME_PARENT_FRAME (f) != NULL) + { + struct frame *parent = FRAME_PARENT_FRAME (f); + + /* On X negative values for child frames always result in + positioning relative to the bottom right corner of the + parent frame. */ + if (f->left_pos < 0) + f->left_pos = FRAME_PIXEL_WIDTH (parent) - FRAME_PIXEL_WIDTH (f) + f->left_pos; + + if (f->top_pos < 0) + f->top_pos = FRAME_PIXEL_HEIGHT (parent) + FRAME_TOOLBAR_HEIGHT (parent) + - FRAME_PIXEL_HEIGHT (f) + f->top_pos; + } + /* Constrain the setFrameTopLeftPoint so we don't move behind the menu bar. */ NSPoint pt = NSMakePoint (SCREENMAXBOUND (f->left_pos commit a5f718c4c58c821fb121196a499df01391bb7ba4 Author: Eli Zaretskii Date: Sat Jan 6 21:43:04 2018 +0200 ; * doc/lispref/text.texi (Change Hooks): Fix last change. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index cd644478d4..a004952c37 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -5023,21 +5023,21 @@ these functions, and neither do certain internal buffer changes, such as changes in buffers created by Emacs internally for certain jobs, that should not be visible to Lisp programs. -The vast bulk of buffer changing primitives will call +The vast majority of buffer changing primitives will call @code{before-change-functions} and @code{after-change-functions} in balanced pairs, once for each change, where the arguments to these hooks exactly delimit the change being made. Yet, hook functions -should not rely on this always being the case: - -Other, complex primitives call @code{before-change-functions} once -before making changes, and then call @code{after-change-functions} -zero, one, or several times, depending on how many individual changes -the primitive is making. The arguments to +should not rely on this always being the case, because some complex +primitives call @code{before-change-functions} once before making +changes, and then call @code{after-change-functions} zero or more +times, depending on how many individual changes the primitive is +making. When that happens, the arguments to @code{before-change-functions} will enclose a region in which the individual changes are made, but won't necessarily be the minimal such -region. The arguments to each successive call of -@code{after-change-functions} will then delimit the current part of -the change exactly. +region, and the arguments to each successive call of +@code{after-change-functions} will then delimit the part of text being +changed exactly. In general, we advise to use either before- or the +after-change hooks, but not both. @defmac combine-after-change-calls body@dots{} The macro executes @var{body} normally, but arranges to call the commit e876f5f9fb090203b77c9cc2fa0208224ac2a1be Author: Alan Mackenzie Date: Sat Jan 6 18:55:08 2018 +0000 Describe the precise interaction of complex primitives with the change hooks * doc/lispref/text.texi (Change Hooks): Document that most buffer changing primitives call before- and after-change-functions in balanced pairs, but that some complex primitives call b-c-f once, and a-c-f zero, one, or several times. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index f590a20896..cd644478d4 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -5023,14 +5023,21 @@ these functions, and neither do certain internal buffer changes, such as changes in buffers created by Emacs internally for certain jobs, that should not be visible to Lisp programs. - Do @emph{not} expect the before-change hooks and the after-change -hooks be called in balanced pairs around each buffer change. Also -don't expect the before-change hooks to be called for every chunk of -text Emacs is about to delete. These hooks are provided on the -assumption that Lisp programs will use either before- or the -after-change hooks, but not both, and the boundaries of the region -where the changes happen might include more than just the actual -changed text, or even lump together several changes done piecemeal. +The vast bulk of buffer changing primitives will call +@code{before-change-functions} and @code{after-change-functions} in +balanced pairs, once for each change, where the arguments to these +hooks exactly delimit the change being made. Yet, hook functions +should not rely on this always being the case: + +Other, complex primitives call @code{before-change-functions} once +before making changes, and then call @code{after-change-functions} +zero, one, or several times, depending on how many individual changes +the primitive is making. The arguments to +@code{before-change-functions} will enclose a region in which the +individual changes are made, but won't necessarily be the minimal such +region. The arguments to each successive call of +@code{after-change-functions} will then delimit the current part of +the change exactly. @defmac combine-after-change-calls body@dots{} The macro executes @var{body} normally, but arranges to call the commit 3a22097cf68761aa106a5455409b7eec689efd88 Author: Eli Zaretskii Date: Sat Jan 6 18:23:52 2018 +0200 Fix valgrind report in call-interactively * src/callint.c (Fcall_interactively): Don't try to access more bytes than are available in the interactive spec. (Bug#30004) diff --git a/src/callint.c b/src/callint.c index ef228517f1..e4491e9085 100644 --- a/src/callint.c +++ b/src/callint.c @@ -774,10 +774,23 @@ invoke it. If KEYS is omitted or nil, the return value of if anyone tries to define one here. */ case '+': default: - error ("Invalid control letter `%c' (#o%03o, #x%04x) in interactive calling string", - STRING_CHAR ((unsigned char *) tem), - (unsigned) STRING_CHAR ((unsigned char *) tem), - (unsigned) STRING_CHAR ((unsigned char *) tem)); + { + /* How many bytes are left unprocessed in the specs string? + (Note that this excludes the trailing null byte.) */ + ptrdiff_t bytes_left = SBYTES (specs) - (tem - string); + unsigned letter; + + /* If we have enough bytes left to treat the sequence as a + character, show that character's codepoint; otherwise + show only its first byte. */ + if (bytes_left >= BYTES_BY_CHAR_HEAD (*((unsigned char *) tem))) + letter = STRING_CHAR ((unsigned char *) tem); + else + letter = *((unsigned char *) tem); + + error ("Invalid control letter `%c' (#o%03o, #x%04x) in interactive calling string", + (int) letter, letter, letter); + } } if (varies[i] == 0) commit d5f1c87bfed04c3cd84a27f599d1b38233e88816 Author: Eli Zaretskii Date: Sat Jan 6 17:14:41 2018 +0200 * src/editfns.c (Fsave_excursion): Doc fix. (Bug#30001) diff --git a/src/editfns.c b/src/editfns.c index c4bbbb1ba4..d0ccdbddc2 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1036,7 +1036,7 @@ If you only want to save the current buffer but not point, then just use `save-current-buffer', or even `with-current-buffer'. Before Emacs 25.1, `save-excursion' used to save the mark state. -To save the marker state as well as the point and buffer, use +To save the mark state as well as point and the current buffer, use `save-mark-and-excursion'. usage: (save-excursion &rest BODY) */) commit b8d74c4578a6a4f1cabe993209358eb84883b869 Author: Alan Mackenzie Date: Sat Jan 6 11:48:32 2018 +0000 Fix mark-defun when there's no spaces between successive defuns. The problem was a parse-partial-sexp call which tried to use the STOPBEFORE argument to detect non-syntactic WS. This fails on a "}", which does not begin a sexp. * lisp/emacs-lisp/lisp.h (beginning-of-defun--in-emptyish-line-p): Enhance to handle BOL being in a string. (beginning-of-defun-comments): Call the above function in place of the call to parse-partial-sexp. diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 1777779b75..68d50e6d0b 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el @@ -405,12 +405,13 @@ whitespace." ;; See https://lists.gnu.org/r/help-gnu-emacs/2016-08/msg00141.html (save-excursion (forward-line 0) - (< (line-end-position) - (let ((ppss (syntax-ppss))) - (when (nth 4 ppss) - (goto-char (nth 8 ppss))) - (forward-comment (point-max)) - (point))))) + (let ((ppss (syntax-ppss))) + (and (null (nth 3 ppss)) + (< (line-end-position) + (progn (when (nth 4 ppss) + (goto-char (nth 8 ppss))) + (forward-comment (point-max)) + (point))))))) (defun beginning-of-defun-comments (&optional arg) "Move to the beginning of ARGth defun, including comments." @@ -428,10 +429,7 @@ whitespace." (progn (skip-syntax-backward "-" (line-beginning-position)) (not (bolp))) ; Check for blank line. - (progn (parse-partial-sexp - (line-beginning-position) (line-end-position) - nil t (syntax-ppss (line-beginning-position))) - (eolp))))) ; Check for non-comment text. + (beginning-of-defun--in-emptyish-line-p)))) ; Check for non-comment text. (forward-line (if first-line-p 0 1)))) (defvar end-of-defun-function commit a377c652b55db4f118076fec2cdbd65e0d61e31a Author: Eli Zaretskii Date: Sat Jan 6 10:56:21 2018 +0200 Fix Dired display and operations on file names with raw bytes * src/coding.c (decode_coding): When flushing remaining raw bytes from multibyte text, copy 2-byte forms of eight-bit-* characters as single characters, not as 2 raw bytes. (Bug#29189) diff --git a/src/coding.c b/src/coding.c index 35f85052c9..a7b040e271 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7423,10 +7423,23 @@ decode_coding (struct coding_system *coding) while (nbytes-- > 0) { - int c = *src++; + int c; - if (c & 0x80) - c = BYTE8_TO_CHAR (c); + /* Copy raw bytes in their 2-byte forms from multibyte + text as single characters. */ + if (coding->src_multibyte + && CHAR_BYTE8_HEAD_P (*src) && nbytes > 0) + { + c = STRING_CHAR_ADVANCE (src); + nbytes--; + } + else + { + c = *src++; + + if (c & 0x80) + c = BYTE8_TO_CHAR (c); + } coding->charbuf[coding->charbuf_used++] = c; } produce_chars (coding, Qnil, 1); commit d9d6e8a04c81235f805f6625e6d26aaaa6797b9d Author: Glenn Morris Date: Fri Jan 5 18:50:31 2018 -0800 ; Comments related to src/termcap.c diff --git a/src/Makefile.in b/src/Makefile.in index e622ade931..15ca1667d6 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -170,7 +170,7 @@ NOTIFY_LIBS = @NOTIFY_LIBS@ ## -ltermcap, or -lncurses, or -lcurses, or "". LIBS_TERMCAP=@LIBS_TERMCAP@ -## terminfo.o if TERMINFO, else tparam.o. +## terminfo.o if TERMINFO, else (on MS-DOS only: termcap.o +) tparam.o. TERMCAP_OBJ=@TERMCAP_OBJ@ LIBXMU=@LIBXMU@ diff --git a/src/termcap.c b/src/termcap.c index ee0b8f5cbb..4d85323a9e 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -15,6 +15,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ +/* Since 2010-03, 073589f4, Emacs 24.1, this file is only used + by the MS-DOS port of Emacs. */ + /* Emacs config.h may rename various library functions such as malloc. */ #include #include commit f8a07fa6b1cf138d1bf58a966bf4f10fa1dfee1d Author: Eli Zaretskii Date: Fri Jan 5 17:05:42 2018 +0200 Improve documentation of 'gdb-many-windows' * doc/emacs/building.texi (GDB User Interface Layout): Add advice for using a separate frame for 'gdb-many-windows'. diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 6af2d9d754..eb8d2027cf 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -916,6 +916,14 @@ layout by typing @kbd{M-x gdb-restore-windows}. To toggle between the many windows layout and a simple layout with just the GUD interaction buffer and a source file, type @kbd{M-x gdb-many-windows}. + If you have an elaborate window setup, and don't want +@code{gdb-many-windows} to disrupt that, it is better to invoke +@kbd{M-x gdb} in a separate frame to begin with, then the arrangement +of windows on your original frame will not be affected. A separate +frame for GDB sessions can come in especially handy if you work on a +text-mode terminal, where the screen estate for windows could be at a +premium. + You may also specify additional GDB-related buffers to display, either in the same frame or a different one. Select the buffers you want by typing @code{M-x gdb-display-@var{buffertype}-buffer} or commit f82400798ee4f7b0945c7b14e15c806108a504cb Author: Eli Zaretskii Date: Fri Jan 5 11:22:27 2018 +0200 Fix failures in smerge-mode on MS-Windows * lisp/vc/smerge-mode.el (smerge--refine-chopup-region): Use utf-8-emacs-unix, not emacs-internal, to make the forced EOL convention explicit. (smerge-refine-regions): Use utf-8-emacs instead of emacs-internal, to allow decoding of non-Unix EOL conventions. (Bug#29916) diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index 761536745f..ea99d31e89 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el @@ -1019,7 +1019,7 @@ chars to try and eliminate some spurious differences." (setq s short))) (dotimes (_i (1- len)) (insert s))))))) (unless (bolp) (error "Smerge refine internal error")) - (let ((coding-system-for-write 'emacs-internal)) + (let ((coding-system-for-write 'utf-8-emacs-unix)) (write-region (point-min) (point-max) file nil 'nomessage)))) (defun smerge--refine-highlight-change (beg match-num1 match-num2 props) @@ -1084,7 +1084,9 @@ used to replace chars to try and eliminate some spurious differences." ;; Call diff on those files. (unwind-protect (with-temp-buffer - (let ((coding-system-for-read 'emacs-internal)) + ;; Allow decoding the EOL format, as on MS-Windows the Diff + ;; utility might produce CR-LF EOLs. + (let ((coding-system-for-read 'utf-8-emacs)) (call-process diff-command nil t nil (if (and smerge-refine-ignore-whitespace (not smerge-refine-weight-hack)) commit c967ba186137e48b14c25ce2a439293fe07ead34 Author: Stephen Leake Date: Tue Jan 2 07:28:06 2018 -0600 Fix description of 'struct' generic function specializer Backport: * doc/lispref/functions.texi (Generic Functions): Fix description of 'struct' specializer; it must be the named struct or a child, not a parent. (cherry picked from commit b6add8c7cfc6d36f9dd8ad99be06bd8ab41cc6f8) diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index c6188ce466..277a42d2c2 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -1246,10 +1246,10 @@ This specializer requires the argument be @code{eql} to the given @item (head @var{object}) The argument must be a cons cell whose @code{car} is @code{eql} to @var{object}. -@item @var{struct-tag} -The argument must be an instance of a class named @var{struct-tag} +@item @var{struct-type} +The argument must be an instance of a class named @var{struct-type} defined with @code{cl-defstruct} (@pxref{Structures,,, cl, Common Lisp -Extensions for GNU Emacs Lisp}), or of one of its parent classes. +Extensions for GNU Emacs Lisp}), or of one of its child classes. @end table Alternatively, the argument specializer can be of the form commit d382d2bfc5072d4220b3e51785d22f70b147d63f Author: Charles A. Roelli Date: Thu Jan 4 21:27:26 2018 +0100 * etc/DEBUG (Getting control to the debugger): Fix grammar. diff --git a/etc/DEBUG b/etc/DEBUG index 81de77285a..7171d6db25 100644 --- a/etc/DEBUG +++ b/etc/DEBUG @@ -200,7 +200,7 @@ errors go through there. If you are only interested in errors that would fire the Lisp debugger, breaking at 'maybe_call_debugger' is useful. -Another technique for get control to the debugger is to put a +Another technique for getting control to the debugger is to put a breakpoint in some rarely used function. One such convenient function is Fredraw_display, which you can invoke at will interactively with "M-x redraw-display RET". commit 687af4c8e88a4abc004f6afb00fc724d38a12712 Author: Stefan Monnier Date: Wed Jan 3 15:33:08 2018 -0500 * lisp/vc/vc.el (vc-region-history): log-view-vc-fileset holds a list! diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 7c502f88df..f8d63d1498 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2428,7 +2428,7 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION." (with-current-buffer buf (vc-call-backend backend 'region-history-mode) (set (make-local-variable 'log-view-vc-backend) backend) - (set (make-local-variable 'log-view-vc-fileset) file) + (set (make-local-variable 'log-view-vc-fileset) (list file)) (set (make-local-variable 'revert-buffer-function) (lambda (_ignore-auto _noconfirm) (with-current-buffer buf commit 43e2aafae306d9f7a463cba301d0253db846e20d Author: Noam Postavsky Date: Mon Dec 18 20:30:10 2017 -0500 Don't bind dframe events on load (Bug#29599) * lisp/dframe.el (dframe-setup-hook): New hook. (dframe-set-special-events): New function, containing previous top-level key binding code. (top-level): Add it to dframe-setup-hook. (dframe-frame-mode): Run the hook. diff --git a/lisp/dframe.el b/lisp/dframe.el index 9b0e550728..12cedaf520 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -288,6 +288,7 @@ CREATE-HOOK is a hook to run after creating a frame." (set frame-var nil)) ;; Set this as our currently attached frame (setq dframe-attached-frame (selected-frame)) + (run-hooks 'dframe-setup-hook) (run-hooks popup-hook) ;; Updated the buffer passed in to contain all the hacks needed ;; to make it work well in a dedicated window. @@ -543,16 +544,21 @@ CACHE-VAR and BUFFER-VAR are symbols as in `dframe-frame-mode'." ))) ;;; Special frame event proxies -;; -(if (boundp 'special-event-map) - (progn - (define-key special-event-map [make-frame-visible] - 'dframe-handle-make-frame-visible) - (define-key special-event-map [iconify-frame] - 'dframe-handle-iconify-frame) - (define-key special-event-map [delete-frame] - 'dframe-handle-delete-frame)) - ) +(defvar dframe-setup-hook nil + "Used for setting frame special event bindings.") + +(defun dframe-set-special-events () + (define-key special-event-map [make-frame-visible] + 'dframe-handle-make-frame-visible) + (define-key special-event-map [iconify-frame] + 'dframe-handle-iconify-frame) + (define-key special-event-map [delete-frame] + 'dframe-handle-delete-frame) + ;; Only need to run once. + (remove-hook 'dframe-setup-hook #'dframe-set-special-events)) + +(when (boundp 'special-event-map) + (add-hook 'dframe-setup-hook #'dframe-set-special-events)) (defvar dframe-make-frame-visible-function nil "Function used when a dframe controlled frame is de-iconified. commit ab31bf3c5f207dbc209bac350262137f48db4037 Author: Eli Zaretskii Date: Tue Jan 2 21:34:58 2018 +0200 * lisp/textmodes/picture.el (picture-mode-exit): Doc fix. (Bug#29949) diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index f5a6a254a0..6836fd09a0 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -789,8 +789,9 @@ they are not by default assigned to keys." (defun picture-mode-exit (&optional nostrip) "Undo `picture-mode' and return to previous major mode. -With no argument, strip whitespace from end of every line in Picture buffer; - otherwise, just return to previous mode. +With NOSTRIP omitted or nil, strip whitespace from end of every line + in Picture buffer; otherwise, just return to previous mode. +Interactively, NOSTRIP is the prefix argument, and defaults to nil. Runs `picture-mode-exit-hook' at the end." (interactive "P") (if (not (eq major-mode 'picture-mode)) commit ed44d92fa6e7f52293bd2c8db44d9672f3cbb855 Author: Eli Zaretskii Date: Tue Jan 2 21:24:34 2018 +0200 * lisp/textmodes/picture.el (picture-open-line): Doc fix. (Bug#29948) diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index caf76a41a1..f5a6a254a0 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -338,8 +338,9 @@ always moves to the beginning of a line." (newline lines-left)))) (defun picture-open-line (arg) - "Insert an empty line after the current line. -With positive argument insert that many lines." + "Insert ARG empty lines after the current line. +ARG must be positive. +Interactively, ARG is the numeric argument, and defaults to 1." (interactive "p") (save-excursion (end-of-line) commit b87a77261246048c16e0b051335ea36de3ba5855 Author: Eli Zaretskii Date: Mon Jan 1 18:36:28 2018 +0200 Fix description of 'emacs-internal' * doc/lispref/nonascii.texi (Coding System Basics): Correct inaccuracy in description of 'emacs-internal'. (Bug#29916) diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 9d6fc6ca72..2fd2bbc1ce 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -1112,7 +1112,9 @@ represented in the internal Emacs encoding (@pxref{Text Representations}). This is like @code{raw-text} in that no code conversion happens, but different in that the result is multibyte data. The name @code{emacs-internal} is an alias for -@code{utf-8-emacs}. +@code{utf-8-emacs-unix} (so it forces no conversion of end-of-line, +unlike @code{utf-8-emacs}, which can decode all 3 kinds of +end-of-line conventions). @defun coding-system-get coding-system property This function returns the specified property of the coding system commit a5256da588627155e873f56119686d80007d84f9 Author: Eli Zaretskii Date: Mon Jan 1 18:28:53 2018 +0200 Update PROBLEMS with selection-related issues * etc/PROBLEMS: Update the entry about large selections and klipper. (Bug#29661) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 2f6802948d..32f12eab62 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -1049,6 +1049,19 @@ commands show above to make them modifier keys. Note that if you have Alt keys but no Meta keys, Emacs translates Alt into Meta. This is because of the great importance of Meta in Emacs. +*** Emacs hangs or crashes when a large portion of text is selected or killed. + +This is caused by a bug in the clipboard management applets (it has +been observed in 'klipper' and 'clipit'), which periodically request +the X clipboard contents from applications. After a while, Emacs may +print a message: + + Timed out waiting for property-notify event + +A workaround is to not use 'klipper'/'clipit'. Upgrading 'klipper' to +the one coming with KDE 3.3 or later might solve the problem; if it +doesn't, set 'select-active-regions' to 'only' or nil. + ** Window-manager and toolkit-related problems *** Emacs built with GTK+ toolkit produces corrupted display on HiDPI screen @@ -1153,19 +1166,6 @@ It is also reported that a bug in the gtk-engines-qt engine can cause this if Emacs is compiled with Gtk+. The bug is fixed in version 0.7 or newer of gtk-engines-qt. -*** KDE: Emacs hangs on KDE when a large portion of text is killed. - -This is caused by a bug in the KDE applet 'klipper' which periodically -requests the X clipboard contents from applications. Early versions -of klipper don't implement the ICCCM protocol for large selections, -which leads to Emacs being flooded with selection requests. After a -while, Emacs may print a message: - - Timed out waiting for property-notify event - -A workaround is to not use 'klipper'. Upgrading 'klipper' to the one -coming with KDE 3.3 or later also solves the problem. - *** KDE / Plasma 5: Emacs exhausts memory and needs to be killed This problem occurs when large selections contain mixed line endings commit c59ecb005e560420d927ad7884c9030ba15319a4 Author: Ross Donaldson Date: Mon Dec 25 12:51:19 2017 -0800 New customization variable for python-mode indentation (Bug#28475) * lisp/progmodes/python.el (python-indent-def-block-scale): New variable. (python-indent--calculate-indentation): Let it control how many indent levels are inserted for multi-line function signatures. Copyright-paperwork-exempt: yes diff --git a/etc/NEWS b/etc/NEWS index 55385f59a8..b4c489cf7b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1037,6 +1037,13 @@ located and whether GnuPG's option '--homedir' is used or not. --- *** Deleting a package no longer respects 'delete-by-moving-to-trash'. +** Python + ++++ +*** The new variable 'python-indent-def-block-scale' has been added. +It controls the depth of indentation of arguments inside multi-line +function signatures. + ** Tramp +++ diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 68926b275e..5baf6e0f80 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -752,6 +752,12 @@ It makes underscores and dots word constituent chars.") :type '(repeat symbol) :group 'python) +(defcustom python-indent-def-block-scale 2 + "Multiplier applied to indentation inside multi-line def blocks." + :version "26.1" + :type 'integer + :safe 'natnump) + (defvar python-indent-current-level 0 "Deprecated var available for compatibility.") @@ -1071,9 +1077,9 @@ possibilities can be narrowed to specific indentation points." (current-indentation))) opening-block-start-points)))) (`(,(or :inside-paren-newline-start-from-block) . ,start) - ;; Add two indentation levels to make the suite stand out. (goto-char start) - (+ (current-indentation) (* python-indent-offset 2)))))) + (+ (current-indentation) + (* python-indent-offset python-indent-def-block-scale)))))) (defun python-indent--calculate-levels (indentation) "Calculate levels list given INDENTATION. commit 4e20c8f22031d6f19e70f0dfcb11c09606446d88 Author: Alan Third Date: Fri Dec 22 12:27:05 2017 +0000 Fix menu keyboard shortcuts on macOS (Bug#29595) * src/nsmenu.m (addItemWithWidgetValue)[NS_IMPL_COCOA]: It looks like macOS 10.13 no longer ignores long modifier strings, so explicitly use an empty string. diff --git a/src/nsmenu.m b/src/nsmenu.m index 20b4e58b47..604adcf40b 100644 --- a/src/nsmenu.m +++ b/src/nsmenu.m @@ -643,14 +643,23 @@ - (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr keyEq = [self parseKeyEquiv: wv->key]; #ifdef NS_IMPL_COCOA - /* macOS just ignores modifier strings longer than one character */ + /* macOS mangles modifier strings longer than one character. */ if (keyEquivModMask == 0) - title = [title stringByAppendingFormat: @" (%@)", keyEq]; + { + title = [title stringByAppendingFormat: @" (%@)", keyEq]; + item = [self addItemWithTitle: (NSString *)title + action: @selector (menuDown:) + keyEquivalent: @""]; + } + else + { +#endif + item = [self addItemWithTitle: (NSString *)title + action: @selector (menuDown:) + keyEquivalent: keyEq]; +#ifdef NS_IMPL_COCOA + } #endif - - item = [self addItemWithTitle: (NSString *)title - action: @selector (menuDown:) - keyEquivalent: keyEq]; [item setKeyEquivalentModifierMask: keyEquivModMask]; [item setEnabled: wv->enabled]; commit 30d6c31301a348fa2d227af8e490ebe41616a242 Author: Glenn Morris Date: Mon Jan 1 06:34:11 2018 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 0ae0ead498..843f4c3cc2 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -6860,8 +6860,7 @@ a non-positive integer, and enable the mode otherwise When Delete Selection mode is enabled, typed text replaces the selection if the selection is active. Otherwise, typed text is just inserted at -point regardless of any selection. Also, commands that normally delete -just one character will delete the entire selection instead. +point regardless of any selection. See `delete-selection-helper' and `delete-selection-pre-hook' for information on adapting behavior of commands in Delete Selection mode. @@ -9581,9 +9580,10 @@ To change the default, set the variable `ediff-use-toolbar-p', which see. (autoload 'edit-kbd-macro "edmacro" "\ Edit a keyboard macro. At the prompt, type any key sequence which is bound to a keyboard macro. -Or, type `C-x e' or RET to edit the last keyboard macro, `C-h l' to edit -the last 300 keystrokes as a keyboard macro, or `\\[execute-extended-command]' to edit a macro by -its command name. +Or, type `\\[kmacro-end-and-call-macro]' or RET to edit the last +keyboard macro, `\\[view-lossage]' to edit the last 300 +keystrokes as a keyboard macro, or `\\[execute-extended-command]' +to edit a macro by its command name. With a prefix argument, format the macro in a more concise way. \(fn KEYS &optional PREFIX FINISH-HOOK STORE-HOOK)" t nil) @@ -12670,7 +12670,7 @@ whose elements are of the form (VAR . VALUE). When a connection to a remote server is opened, the server's connection profiles are found. A server may be assigned a -connection profile using `connection-local-set-profile'. Then +connection profile using `connection-local-set-profiles'. Then variables are set in the server's process buffer according to the VARIABLES list of the connection profile. The list is processed in order. @@ -18653,7 +18653,10 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\" ;;; Generated autoloads from emacs-lisp/inline.el (autoload 'define-inline "inline" "\ +Define an inline function NAME with arguments ARGS and body in BODY. +This is like `defmacro', but has several advantages. +See Info node `(elisp)Defining Functions' for more details. \(fn NAME ARGS &rest BODY)" nil t) @@ -25459,25 +25462,6 @@ they are not by default assigned to keys. ;;;*** -;;;### (autoloads nil "pinentry" "net/pinentry.el" (0 0 0 0)) -;;; Generated autoloads from net/pinentry.el -(push (purecopy '(pinentry 0 1)) package--builtin-versions) - -(autoload 'pinentry-start "pinentry" "\ -Start a Pinentry service. - -Once the environment is properly set, subsequent invocations of -the gpg command will interact with Emacs for passphrase input. - -If the optional QUIET argument is non-nil, messages at startup -will not be shown. - -\(fn &optional QUIET)" t nil) - -(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "pinentry" '("pinentry-"))) - -;;;*** - ;;;### (autoloads nil "pixel-scroll" "pixel-scroll.el" (0 0 0 0)) ;;; Generated autoloads from pixel-scroll.el @@ -38288,7 +38272,7 @@ or call the function `winner-mode'.") Toggle Winner mode on or off. With a prefix argument ARG, enable Winner mode if ARG is positive, and disable it otherwise. If called from Lisp, enable -the mode if ARG is omitted or nil, and toggle it if ARG is ‘toggle’. +the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. Winner mode is a global minor mode that records the changes in the window configuration (i.e. how the frames are partitioned