]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years ago; Spelling fix
Paul Eggert [Mon, 26 Mar 2018 16:29:42 +0000 (09:29 -0700)]
; Spelling fix

6 years ago* lisp/emacs-lisp/package.el: New quickstart feature
Stefan Monnier [Mon, 26 Mar 2018 13:41:30 +0000 (09:41 -0400)]
* lisp/emacs-lisp/package.el: New quickstart feature

(package--quickstart-pkgs): New var.
(package-activate-1): Obey and fill it.
(package-activate-all): New function.
(package-initialize): Call it.
Set package-initialized before activating the packages.
(package-installed-p): Make it work before package.el is initialized in
the case where min-version is not specified.
(package-install, package-delete): Refresh the quickstart if applicable.
(package-quickstart, package-quickstart-file): New vars.
(package--quickstart-maybe-refresh, package-quickstart-refresh):
New functions.

* lisp/startup.el (command-line): Use package-activate-all rather than
package-initialize.

* doc/lispref/package.texi (Packaging Basics):
* doc/emacs/package.texi (Package Installation):
* doc/lispref/os.texi (Startup Summary): Refer to package-activate-all.

6 years ago* src/marker.c: Try and speed up byte<->char conversion with many markers.
Stefan Monnier [Mon, 26 Mar 2018 13:01:30 +0000 (09:01 -0400)]
* src/marker.c: Try and speed up byte<->char conversion with many markers.

When considering markers (to find a starting point for the conversion),
typically one of the two bounds is nearby (coming from
cached_(byte|char)pos) but the other is far (point-min or point-max),
so change the exit condition so we stop as soon as *one* of the bounds
is near.

(BYTECHAR_DISTANCE_INITIAL, BYTECHAR_DISTANCE_INCREMENT): New constants.
(buf_charpos_to_bytepos, buf_bytepos_to_charpos): Use them to try and
reduce the number of markers we consider.

6 years agoFix problem with trailing slash in Tramp
Michael Albinus [Mon, 26 Mar 2018 12:33:24 +0000 (14:33 +0200)]
Fix problem with trailing slash in Tramp

* lisp/net/tramp.el (tramp-handle-file-truename):
* lisp/net/tramp-adb.el (tramp-adb-handle-file-truename):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename):
Fix problem with trailing slash.

* test/lisp/net/tramp-tests.el (tramp-test21-file-links):
Test also quoted directories.

6 years agoRemove architecture dependent source downloads
Phillip Lord [Mon, 26 Mar 2018 11:49:50 +0000 (12:49 +0100)]
Remove architecture dependent source downloads

* admin/nt/dist-build/build-dep-zips.py:

6 years agoMake eshell/kill handle -<signal> and -<SIGNALNAME> (Bug#29156)
Eric Skoglund [Fri, 16 Mar 2018 13:49:56 +0000 (14:49 +0100)]
Make eshell/kill handle -<signal> and -<SIGNALNAME> (Bug#29156)

* lisp/eshell/esh-proc.el (eshell/kill): Handle the argument parsing
and numeric conversion in function in order to parse -signal and
-SIGNALNAME correctly.
* doc/misc/eshell.texi (kill): Update docs to reflect new function
behaviour.
* etc/NEWS: Mention new eshell/kill behaviour.

6 years agoAllow `&rest' or `&optional' without following variable (Bug#29165)
Noam Postavsky [Sat, 20 Jan 2018 16:27:23 +0000 (11:27 -0500)]
Allow `&rest' or `&optional' without following variable (Bug#29165)

This is sometimes convenient when writing macros, so that the empty
variable case doesn't need to be handled specially.  Older versions of
Emacs accepted this in some cases (especially the interpreter in Emacs
25 and below was very accepting).

                            |   interpreted/compiled   |
| arglist                   | 25 & earlier | 26  | 27  |
|---------------------------+--------------+-----+-----|
| (&rest)                   | y/n          | n/n | y/y |
| (&rest &rest)             | y/n          | n/n | n/n |
| (&rest &rest x)           | y/n          | n/n | n/n |
| (&rest x &rest)           | y/n          | n/n | n/n |
| (&rest x &rest y)         | y/n          | n/n | n/n |
|---------------------------+--------------+-----+-----|
| (&optional)               | y/n          | n/n | y/y |
| (&optional &optional)     | y/n          | n/n | n/n |
| (&optional x &optional)   | y/n          | n/n | n/n |
| (&optional x &optional y) | y/y          | n/n | n/n |
|---------------------------+--------------+-----+-----|
| (&optional &rest)         | y/n          | n/n | y/y |
| (&optional x &rest)       | y/n          | n/n | y/y |
| (&optional &rest y)       | y/y          | n/n | y/y |
|---------------------------+--------------+-----+-----|
| (&rest &optional)         | y/n          | n/n | n/n |
| (&rest &optional y)       | y/n          | n/n | n/n |
| (&rest x &optional y)     | y/n          | n/n | n/n |

The values in the table above can be produced with the following code:

(with-current-buffer (get-buffer-create "*ck-args*")
  (erase-buffer)
  (dolist (arglist '((&rest)
                     (&rest &rest)
                     (&rest &rest x)
                     (&rest x &rest)
                     (&rest x &rest y)
                     (&optional)
                     (&optional &optional)
                     (&optional x &optional)
                     (&optional x &optional y)
                     (&optional &rest)
                     (&optional x &rest)
                     (&optional &rest y)
                     (&rest &optional)
                     (&rest &optional y)
                     (&rest x &optional y)))
    (insert
     (format "%c/%c\n"
             (condition-case err
                 (progn (funcall `(lambda ,arglist 'ok))
                        ?y)
               (error ?n))
             (condition-case err
                 (progn (byte-compile-check-lambda-list arglist)
                        ?y)
               (error ?n))))
    (display-buffer (current-buffer))))

* src/eval.c (funcall_lambda):
* lisp/emacs-lisp/bytecomp.el (byte-compile-check-lambda-list): Don't
check for missing variables after `&rest' and `&optional'.
* test/src/eval-tests.el (eval-tests--bugs-24912-and-24913)
(eval-tests-accept-empty-optional-rest): Update tests accordingly.
* etc/NEWS: Update announcement accordingly.
* doc/lispref/functions.texi (Argument List): Update manual to
indicate that variable names are optional.

6 years agoFix byte-optimize-memq incorrectly optimizing some memq forms.
Vibhav Pant [Sun, 25 Mar 2018 05:52:50 +0000 (11:22 +0530)]
Fix byte-optimize-memq incorrectly optimizing some memq forms.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-memq): Call
  byte-optimize-and only for memq forms that can be optimized, use
  byte-optimize-predicate to optimize the final form.

6 years agoOptimize certain memq forms during byte-compilation.
Vibhav Pant [Sat, 24 Mar 2018 19:08:01 +0000 (00:38 +0530)]
Optimize certain memq forms during byte-compilation.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-memq): New function.
  Set the byte optimizer function for memq to byte-optimize-memq.

6 years agoReduce build load
Phillip Lord [Sat, 24 Mar 2018 17:34:19 +0000 (17:34 +0000)]
Reduce build load

* admin/nt/dist-build/build-zips.sh: Reduce parallelism to 8

6 years ago* lisp/emulation/viper.el (viper-set-hooks): Replace obsolete func.
Glenn Morris [Sat, 24 Mar 2018 00:55:51 +0000 (20:55 -0400)]
* lisp/emulation/viper.el (viper-set-hooks): Replace obsolete func.

6 years ago* lisp/vc/vc.el (vc-initial-comment): Remove var unused since 23.2.
Glenn Morris [Sat, 24 Mar 2018 00:31:53 +0000 (20:31 -0400)]
* lisp/vc/vc.el (vc-initial-comment): Remove var unused since 23.2.

6 years agoRemove some unused gnus-registry variables
Glenn Morris [Sat, 24 Mar 2018 00:01:26 +0000 (20:01 -0400)]
Remove some unused gnus-registry variables

* lisp/gnus/gnus-registry.el (gnus-registry-clean-empty)
(gnus-registry-use-long-group-names)
(gnus-registry-max-track-groups, gnus-registry-entry-caching)
(gnus-registry-trim-articles-without-groups):
Remove variables labeled as obsolete since 23.4 that do nothing.

6 years agoRemove variables labeled as obsolete that do nothing
Glenn Morris [Fri, 23 Mar 2018 23:52:09 +0000 (19:52 -0400)]
Remove variables labeled as obsolete that do nothing

* lisp/allout.el (allout-passphrase-verifier-string)
(allout-passphrase-hint-string):
* lisp/w32-vars.el (w32-list-proportional-fonts):
Remove variables that are unused since Emacs 23.x.

6 years agoLimit build load
Phillip Lord [Fri, 23 Mar 2018 23:11:13 +0000 (23:11 +0000)]
Limit build load

* admin/nt/dist-build/build-zips.sh: Limit build load.

6 years agoEnsure configure is running if necessary
Phillip Lord [Fri, 23 Mar 2018 22:01:08 +0000 (22:01 +0000)]
Ensure configure is running if necessary

* admin/nt/dist-build/build-zips.sh: Check for missing Makefile.

6 years ago* lisp/progmodes/cc-langs.el: Silence compiler.
Glenn Morris [Fri, 23 Mar 2018 21:09:51 +0000 (17:09 -0400)]
* lisp/progmodes/cc-langs.el: Silence compiler.

6 years agoQuieten lisp/obsolete compilation
Glenn Morris [Fri, 23 Mar 2018 21:05:01 +0000 (17:05 -0400)]
Quieten lisp/obsolete compilation

* lisp/obsolete/vi.el (vi-mark-region):
* lisp/obsolete/vip.el (vip-delete-backward-char): Silence compiler.

6 years agoClarify syntax of radixed integers
Paul Eggert [Fri, 23 Mar 2018 20:49:58 +0000 (13:49 -0700)]
Clarify syntax of radixed integers

* doc/lispref/numbers.texi (Integer Basics): Specify what digits
are allowed in radixed integers, and that there is no initial sign
or final period.

6 years agoRemove some declare-function stub definitions
Glenn Morris [Fri, 23 Mar 2018 20:28:24 +0000 (16:28 -0400)]
Remove some declare-function stub definitions

* lisp/emulation/viper-cmd.el, lisp/emulation/viper-keym.el:
* lisp/emulation/viper-util.el, lisp/net/newst-plainview.el:
* lisp/net/newst-treeview.el, lisp/ps-def.el, lisp/vc/ediff.el:
* lisp/vc/ediff-util.el, lisp/vc/ediff-wind.el:
Remove stub declare-function definitions.
It exists since Emacs 22.2, released 10 years ago.
Most of these files are using even newer features, such as
lexical-binding and cl-lib anyway, making the stubs pointless.

6 years agoReplace some uses of cl with cl-lib
Glenn Morris [Fri, 23 Mar 2018 20:14:26 +0000 (16:14 -0400)]
Replace some uses of cl with cl-lib

* lisp/progmodes/idlw-toolbar.el: No need for cl.
* lisp/progmodes/antlr-mode.el, lisp/progmodes/idlw-shell.el:
* lisp/progmodes/idlwave.el: Replace cl with cl-lib.

6 years agoReplace cl in some obsolete files
Glenn Morris [Fri, 23 Mar 2018 20:13:55 +0000 (16:13 -0400)]
Replace cl in some obsolete files

* lisp/obsolete/assoc.el, lisp/obsolete/fast-lock.el:
* lisp/obsolete/mouse-sel.el: No need for cl.
* lisp/obsolete/lazy-lock.el, lisp/obsolete/pgg-gpg.el:
* lisp/obsolete/pgg-parse.el, lisp/obsolete/pgg-pgp.el:
* lisp/obsolete/pgg-pgp5.el, lisp/obsolete/pgg.el:
* lisp/obsolete/sregex.el: Replace cl with cl-lib.

6 years agocedet: replace cl with cl-lib
Glenn Morris [Fri, 23 Mar 2018 20:13:40 +0000 (16:13 -0400)]
cedet: replace cl with cl-lib

* lisp/cedet/ede/linux.el, lisp/cedet/semantic/decorate/mode.el:
* lisp/cedet/semantic/wisent/comp.el: Replace cl with cl-lib.
* lisp/cedet/cedet.el, lisp/cedet/mode-local.el:
* lisp/cedet/ede/dired.el, lisp/cedet/ede/pmake.el:
* lisp/cedet/ede/proj-comp.el, lisp/cedet/ede/proj-misc.el:
* lisp/cedet/ede/proj-obj.el, lisp/cedet/ede/proj-prog.el:
* lisp/cedet/ede/speedbar.el, lisp/cedet/semantic/analyze.el:
* lisp/cedet/semantic/complete.el:
* lisp/cedet/semantic/mru-bookmark.el, lisp/cedet/semantic/debug.el:
* lisp/cedet/semantic/wisent/python.el:
* lisp/cedet/srecode/compile.el, lisp/cedet/srecode/dictionary.el:
* lisp/cedet/srecode/srt.el: No need for cl.

6 years ago* src/process.c (Fsignal_process): Simplify.
Paul Eggert [Fri, 23 Mar 2018 20:14:06 +0000 (13:14 -0700)]
* src/process.c (Fsignal_process): Simplify.

6 years agoFix too-large integer in Hg backend
Paul Eggert [Fri, 23 Mar 2018 20:10:14 +0000 (13:10 -0700)]
Fix too-large integer in Hg backend

* lisp/vc/vc-hg.el (vc-hg-state-fast):
Don’t assume that 2**32 - 1 is representable as a fixnum.

6 years agoAvoid Fortran-style floating-point optimization
Paul Eggert [Fri, 23 Mar 2018 19:57:39 +0000 (12:57 -0700)]
Avoid Fortran-style floating-point optimization

When optimizing arithmetic operations, avoid optimizations that
are valid for mathematical numbers but invalid for floating-point.
For example, do not optimize (+ 1 v 0.5) to (+ v 1.5), as they may
not be the same due to rounding errors.  In general,
floating-point numbers cannot be constant-folded, since that would
make .elc files platform-dependent.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-associative-math):
Do not optimize floats.
(byte-optimize-nonassociative-math, byte-optimize-approx-equal)
(byte-optimize-delay-constants-math, byte-compile-butlast)
(byte-optimize-logmumble):
Remove; no longer used.
(byte-optimize-minus): Do not optimize (- 0 x) to (- x).
(byte-optimize-multiply): Do not optimize (* -1 x) to (- x).
(byte-optimize-divide): Do not optimize (/ x -1) to (- x).
(logand, logior, logxor): Optimize with byte-optimize-predicate
instead of with byte-optimize-logmumble.
* test/lisp/emacs-lisp/bytecomp-tests.el:
(byte-opt-testsuite-arith-data): Add a couple of test cases.

6 years agoInstrument tramp-test39-utf8
Michael Albinus [Fri, 23 Mar 2018 16:39:29 +0000 (17:39 +0100)]
Instrument tramp-test39-utf8

* test/lisp/net/tramp-tests.el (tramp--test-expensive-test):
Add the test name to the template.
(tramp-test39-utf8): Instrument test.

6 years agoFix bug#30846, along with misc cleanups found along the way
Stefan Monnier [Fri, 23 Mar 2018 15:29:06 +0000 (11:29 -0400)]
Fix bug#30846, along with misc cleanups found along the way

* test/src/data-tests.el (data-tests-kill-all-local-variables): New test.

* src/buffer.c (swap_out_buffer_local_variables): Remove.
Fuse the body of its loop into that of reset_buffer_local_variables.
(Fkill_buffer, Fkill_all_local_variables): Don't call it any more.
(reset_buffer_local_variables): Make sure the buffer's local binding
is swapped out before removing it from the alist (bug#30846).
Call watchers before actually killing the var.

* src/data.c (Fmake_local_variable): Simplify.
Use swap_in_global_binding to swap out any local binding, instead of
a mix of find_symbol_value followed by messing with where&found.
Don't call swap_in_symval_forwarding since the currently swapped
binding is never one we've modified.
(Fkill_local_variable): Use swap_in_global_binding rather than messing
with where&found to try and trick find_symbol_value into doing the same.

* src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more.

6 years ago* src/alloc.c: Avoid O(N²) complexity when unchaining markers (bug#24548).
Stefan Monnier [Fri, 23 Mar 2018 15:09:54 +0000 (11:09 -0400)]
* src/alloc.c: Avoid O(N²) complexity when unchaining markers (bug#24548).

Unchain all dead markers with a single scan of the markers list,
instead of calling the O(N) 'unchain_marker' N times.

(unchain_dead_markers): New function.
(sweep_buffers): Use it.
(gc_sweep): Sweep buffers before markers.
(sweep_misc): Check that markers have been unchained when reclaiming them.

6 years ago* src/lisp.h (struct Lisp_Buffer_Local_Value): Update commentary.
Noam Postavsky [Fri, 23 Mar 2018 08:51:53 +0000 (04:51 -0400)]
* src/lisp.h (struct Lisp_Buffer_Local_Value): Update commentary.

6 years ago* doc/emacs/trouble.texi: Fix location of `emacs-version' index.
Noam Postavsky [Thu, 15 Mar 2018 11:42:40 +0000 (07:42 -0400)]
* doc/emacs/trouble.texi: Fix location of `emacs-version' index.

6 years agoExplain more about (defvar foo) form (Bug#18059)
Noam Postavsky [Sat, 10 Feb 2018 19:06:05 +0000 (14:06 -0500)]
Explain more about (defvar foo) form (Bug#18059)

* doc/lispref/variables.texi (Defining Variables)
(Using Lexical Binding):
* doc/lispref/compile.texi (Compiler Errors): Emphasize that omitting
VALUE for `defvar' marks the variable special only locally.
* doc/lispref/variables.texi (Using Lexical Binding): Add example of
using `defvar' without VALUE.

6 years agoMake update_autogen work in git worktrees
Robert Pluim [Thu, 22 Mar 2018 08:06:44 +0000 (09:06 +0100)]
Make update_autogen work in git worktrees

* admin/update_autogen: Make it work in a git worktree

6 years agoQuieten cl-lib related compiler warnings
Glenn Morris [Fri, 23 Mar 2018 04:40:24 +0000 (21:40 -0700)]
Quieten cl-lib related compiler warnings

* lisp/completion.el (cl-set-difference):
* lisp/files.el (map-merge-with, map-merge):
* lisp/emacs-lisp/radix-tree.el (map-apply): Declare.
* lisp/emacs-lisp/thunk.el: Load cl-lib at run-time, not
cl-macs at compile.
* lisp/gnus/gnus-group.el: Load cl-lib at run-time, not cl at compile.
* lisp/emacs-lisp/checkdoc.el, lisp/emacs-lisp/package.el
* lisp/gnus/gnus-sum.el, lisp/gnus/message.el, lisp/net/shr.el:
Load cl-lib at run-time.
* lisp/gnus/mml-sec.el (mml-signencrypt-style)
(mml-secure-cust-record-keys): Replace cl with cl-lib,
and load it at run-time.
* lisp/cedet/ede/linux.el, lisp/vc/vc-hg.el: Reorder requires.

6 years agoTry and fix the more obvious sources of bug#30635
Stefan Monnier [Thu, 22 Mar 2018 22:18:26 +0000 (18:18 -0400)]
Try and fix the more obvious sources of bug#30635

* lisp/files.el (dir-locals-read-from-dir): Handle the easy cases
without loading `map`.

* lisp/emacs-lisp/bytecomp.el: Don't require cl-lib at run-time.
(byte-compile-and-folded): Avoid cl-every.

6 years ago* doc/lispref/buffers.texi (Buffer List): Fix grammar.
Charles A. Roelli [Thu, 22 Mar 2018 19:43:42 +0000 (20:43 +0100)]
* doc/lispref/buffers.texi (Buffer List): Fix grammar.

6 years ago* doc/lispref/anti.texi (Antinews): Fix grammar.
Charles A. Roelli [Thu, 22 Mar 2018 19:40:02 +0000 (20:40 +0100)]
* doc/lispref/anti.texi (Antinews): Fix grammar.

6 years agoAdd new command vc-git-stash-delete
Charles A. Roelli [Thu, 22 Mar 2018 19:33:45 +0000 (20:33 +0100)]
Add new command vc-git-stash-delete

* lisp/vc/vc-git.el (vc-git-stash-delete): New command, in line with
vc-git-stash-delete-at-point.
(vc-git-extra-menu-map): Add menu entry.

6 years ago* lisp/org/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type.
Glenn Morris [Thu, 22 Mar 2018 18:37:45 +0000 (14:37 -0400)]
* lisp/org/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type.

Avoids type mismatch when relevant library is not present/loaded.

6 years agosql.el defcustom fixes
Glenn Morris [Thu, 22 Mar 2018 18:31:33 +0000 (14:31 -0400)]
sql.el defcustom fixes

* lisp/progmodes/sql.el (sql-login-params): Update.
Avoids type mismatch with postgres and sqlite login params.
(sql-postgres-login-params): Bump version.

6 years agoFix byte-opt lists of pure functions etc.
Paul Eggert [Thu, 22 Mar 2018 18:25:42 +0000 (11:25 -0700)]
Fix byte-opt lists of pure functions etc.

This fixes a bug where a byte-compiler running on 64-bit Emacs
optimized (lsh -1 -1) to #x1fffffffffffffff, an optimization
that is incorrect for .elc files intended for either 32- or
64-bit Emacs.  While I was in the neighborhood, I noticed other
glitches in the lists of pure and side-effect-free functions, and
fixed the errors that I found.
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
Move some functions here from side-effect-and-error-free-fns,
since they can now signal errors.  The affected functions are
current-time-string, current-time-zone,
line-beginning-position, line-end-position.  Rename langinfo
to locale-info.  Add logcount.  Remove string-to-int.
(side-effect-and-error-free-fns): Remove minibuffer-window, a
function that can signal errors, and that is already in
side-effect-free-fns.
(pure-fns): Remove ash, lsh, and logb, since they are
platform-dependent and .elc files should be
platform-independent.  Add %, logand, logcount.  Sort.
Clarify what is meant by “pure”.

6 years agoPort emacs-module-tests to 32-bit Emacs
Paul Eggert [Thu, 22 Mar 2018 16:32:50 +0000 (09:32 -0700)]
Port emacs-module-tests to 32-bit Emacs

Fix a portability bug when emacs-module-tests.el is byte-compiled
with a 32-bit Emacs (where #x20000000 evaluates to a
floating-point number) and then is run on a 64-bit Emacs (where
the floating-point number causes a test failure).
* test/src/emacs-module-tests.el (mod-test-sum-test):
Don’t assume #x20000000 can be represented as an Emacs integer.

6 years ago; Fix last commit in tramp.el
Michael Albinus [Thu, 22 Mar 2018 15:52:58 +0000 (16:52 +0100)]
; Fix last commit in tramp.el

6 years agoDocument DEFUN attributes
Eli Zaretskii [Thu, 22 Mar 2018 12:57:43 +0000 (14:57 +0200)]
Document DEFUN attributes

* doc/lispref/internals.texi (Writing Emacs Primitives): Document
specification of function attributes in DEFUN.

6 years ago* etc/NEWS: Add an entry for auth-source-pass.
Nicolas Petton [Thu, 22 Mar 2018 10:55:15 +0000 (11:55 +0100)]
* etc/NEWS: Add an entry for auth-source-pass.

6 years agoFix the MSDOS build
Eli Zaretskii [Thu, 22 Mar 2018 09:15:23 +0000 (11:15 +0200)]
Fix the MSDOS build

* msdos/sed2v2.inp (HAVE_SBRK): Define to 1.

6 years agoFix commit c24c5dc4a4
Michael Albinus [Thu, 22 Mar 2018 08:58:56 +0000 (09:58 +0100)]
Fix commit c24c5dc4a4

* lisp/net/tramp.el (tramp-handle-substitute-in-file-name): Drop volume
letter of localname substitution.  Reported by Chris Zheng
<chriszheng99@gmail.com>.

6 years agoTag tramp-test39-utf8* as :unstable
Michael Albinus [Thu, 22 Mar 2018 08:43:44 +0000 (09:43 +0100)]
Tag tramp-test39-utf8* as :unstable

* test/lisp/net/tramp-tests.el (tramp-test39-utf8)
(tramp-test39-utf8-with-stat, tramp-test39-utf8-with-perl)
(tramp-test39-utf8-with-ls): Tag the tests as :unstable.

6 years agoFix Bug#30904
Michael Albinus [Thu, 22 Mar 2018 08:37:48 +0000 (09:37 +0100)]
Fix Bug#30904

* lisp/net/tramp.el (tramp-dissect-file-name): Adapt docstring.  (Bug#30904)

6 years agoImprove warning and error messages
Eric Abrahamsen [Sat, 10 Mar 2018 08:26:38 +0000 (16:26 +0800)]
Improve warning and error messages

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read,
  (eieio-persistent-validate/fix-slot-value): Indicate exactly what
  went wrong.

6 years agoAdjust eieio persistence tests for expected failure
Eric Abrahamsen [Sat, 30 Dec 2017 18:12:22 +0000 (10:12 -0800)]
Adjust eieio persistence tests for expected failure

* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
 (eieio-test-persist-hash-and-vector,
  eieio-test-persist-interior-lists): Persistence does not currently
 handle deeply-nested objects. Expect current failures, and mark for
 future fixes.

6 years agoLet eieio-persistent-read read what object-write has written
Eric Abrahamsen [Fri, 29 Dec 2017 02:14:47 +0000 (18:14 -0800)]
Let eieio-persistent-read read what object-write has written

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
  `object-write' may quote lists inside hash tables and vectors, so
  unquote those lists here.

This patch allows the eieio-persistent write/restore process to
perform a clean round trip. It only handles a very specific and
limited range of object structures, but at least the write and read
procedures match.

6 years agoHandle possible classtype values in eieio-persistent-read
Eric Abrahamsen [Tue, 19 Dec 2017 22:56:13 +0000 (14:56 -0800)]
Handle possible classtype values in eieio-persistent-read

* lisp/emacs-lisp/eieio-base.el (eieio-persistent-validate/fix-slot-value):
  The function `eieio-persistent-slot-type-is-class-p' could return
  either a single class, or a list of classes.

6 years agoAdd new tests for eieio persistence
Pierre Téchoueyres [Fri, 15 Dec 2017 20:42:21 +0000 (21:42 +0100)]
Add new tests for eieio persistence

* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el:
  (hash-equal): New comparison test for hash-tables.
  (persist-test-save-and-compare): Use test for hash-tables.
  (eieio-test-persist-hash-and-vector,
  eieio-test-persist-interior-lists): New tests.

6 years ago* lisp/gnus/gnus-cloud.el (gnus-cloud-synced-files): Fix doc & type.
Glenn Morris [Thu, 22 Mar 2018 00:47:28 +0000 (20:47 -0400)]
* lisp/gnus/gnus-cloud.el (gnus-cloud-synced-files): Fix doc & type.

6 years ago* lisp/ibuf-ext.el (ibuffer-never-search-content-mode): Fix type.
Glenn Morris [Wed, 21 Mar 2018 23:38:44 +0000 (19:38 -0400)]
* lisp/ibuf-ext.el (ibuffer-never-search-content-mode): Fix type.

6 years agoPort data-tests-popcnt to 32-bit Emacs
Paul Eggert [Wed, 21 Mar 2018 23:08:27 +0000 (16:08 -0700)]
Port data-tests-popcnt to 32-bit Emacs

* test/src/data-tests.el (data-tests-popcnt):
Don’t assume Emacs integers can represent 32-bit quantities.
Change to a simple and straightforward approach, since runtime
performance is not important here.

6 years ago* lisp/play/fortune.el (fortune-in-buffer): Revert previous nonsense.
Glenn Morris [Wed, 21 Mar 2018 21:10:41 +0000 (17:10 -0400)]
* lisp/play/fortune.el (fortune-in-buffer): Revert previous nonsense.

6 years ago* doc/lispref/windows.texi (Selecting Windows): Fix a typo.
Glenn Morris [Wed, 21 Mar 2018 20:58:11 +0000 (16:58 -0400)]
* doc/lispref/windows.texi (Selecting Windows): Fix a typo.

6 years agoProvide completion in vc-git-stash-* commands
Charles A. Roelli [Wed, 21 Mar 2018 20:16:18 +0000 (21:16 +0100)]
Provide completion in vc-git-stash-* commands

* lisp/vc/vc-git.el (vc-git-stash-read-history)
(vc-git-stash-read): New history variable and function.
(vc-git-stash-show, vc-git-stash-apply, vc-git-stash-pop): Update
their interactive specifications.

6 years ago* doc/lispref/internals.texi (Writing Emacs Primitives): Fix grammar.
Charles A. Roelli [Wed, 21 Mar 2018 19:52:35 +0000 (20:52 +0100)]
* doc/lispref/internals.texi (Writing Emacs Primitives): Fix grammar.

6 years agoAdd tests for Bug#30408
Paul Eggert [Wed, 21 Mar 2018 19:10:11 +0000 (12:10 -0700)]
Add tests for Bug#30408

* test/src/editfns-tests.el (format-%d-large-float)
(format-%x-large-float, format-%o-invalid-float): New tests.

6 years agoQuieten eieio-test compilation
Glenn Morris [Wed, 21 Mar 2018 18:13:53 +0000 (14:13 -0400)]
Quieten eieio-test compilation

* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el:
Remove obsolete name args where not being explicitly tested.

6 years ago; * autogen.sh: Comment.
Glenn Morris [Wed, 21 Mar 2018 18:12:42 +0000 (14:12 -0400)]
; * autogen.sh: Comment.

6 years ago* lisp/play/fortune.el (fortune-in-buffer): Unadvertise no-op arg.
Glenn Morris [Wed, 21 Mar 2018 18:12:17 +0000 (14:12 -0400)]
* lisp/play/fortune.el (fortune-in-buffer): Unadvertise no-op arg.

6 years agoFirm up documentation of generalized variables
Alan Mackenzie [Wed, 21 Mar 2018 17:36:34 +0000 (17:36 +0000)]
Firm up documentation of generalized variables

* doc/lispref/variables.texi (Generalized Variables)
(Setting Generalized Variables): Define a generalized variable as something
setf can write to.  Remove the insinuation that hackers have poor memories.
State explicitly that the list of GVs given is complete.  Remove the
suggestion that `setf' has superseded, or is in the process of superseding,
`setq'.  Make minor corrections to the English.

6 years agoImprove documentation of Auto-Revert mode
Eli Zaretskii [Wed, 21 Mar 2018 16:57:41 +0000 (18:57 +0200)]
Improve documentation of Auto-Revert mode

* doc/emacs/files.texi (Reverting): Mention that Aut-Revert
applies to Dired buffers as well.  Suggested by Michael Albinus
<michael.albinus@gmx.de> in emacs-manual-bugs@gnu.org.

6 years agoImprovements in dired.texi
Eli Zaretskii [Wed, 21 Mar 2018 16:49:29 +0000 (18:49 +0200)]
Improvements in dired.texi

* doc/emacs/dired.texi (Dired): Mention that Dired works with
remote directories.
(Dired Enter): ls-lisp is used on some remote systems as well.
(Dired Navigation): Mention and index the command names.
(Dired Deletion): Document the 'always' value of
dired-recursive-deletes.  Mention the alternative deletion method.
(Marks vs Flags): Fix spelling of Auto-Revert mode.  Document what
marking does on a subdirectory header line.
(Operating on Files): Document that 'Z' uses gzip or compress.
(Comparison in Dired): Mention ediff-files.
(Misc Dired Features): Fix a typo.  Suggested by Michael Albinus
<michael.albinus@gmx.de> in emacs-manual-bugs@gnu.org.

6 years agoRevert "Support all perl variable declarators and prefixes"
Noam Postavsky [Tue, 20 Mar 2018 23:18:33 +0000 (19:18 -0400)]
Revert "Support all perl variable declarators and prefixes"

It highlights normal variable names in perl programs (Bug#30812).
* lisp/progmodes/perl-mode.el (perl-imenu-generic-expression)
(perl-font-lock-keywords-2): Restore values prior to Bug#27613 fix.

Don't merge to master, we will fix Bug#27613 properly there (it's too
close to release to do that on emacs-26).

6 years ago* lisp/isearch.el (isearch-pre-command-hook): Replace cl-lib function.
Glenn Morris [Tue, 20 Mar 2018 21:15:39 +0000 (17:15 -0400)]
* lisp/isearch.el (isearch-pre-command-hook): Replace cl-lib function.

As a preloaded file, isearch.el cannot require cl-lib at runtime.

6 years ago* cc-engine.el (c-looking-at-or-maybe-in-bracelist): Remove pessimization
Alan Mackenzie [Tue, 20 Mar 2018 18:40:52 +0000 (18:40 +0000)]
* cc-engine.el (c-looking-at-or-maybe-in-bracelist): Remove pessimization

6 years agoAvoid redisplay problems with too wide wrap-prefix
Eli Zaretskii [Tue, 20 Mar 2018 17:05:21 +0000 (19:05 +0200)]
Avoid redisplay problems with too wide wrap-prefix

* src/xdisp.c (display_line): Avoid looping in redisplay when
wrap-prefix is set to a too-wide stretch of whitespace.
(Bug#30432)

6 years agoPort to 32-bit sparc64
Paul Eggert [Tue, 20 Mar 2018 16:54:20 +0000 (09:54 -0700)]
Port to 32-bit sparc64

Problem reported by Ulrich Mueller; fix suggested by Eli Zaretskii
and Andreas Schwab (Bug#30855).
* src/alloc.c (mark_memory): Call mark_maybe_object only on
pointers that are properly aligned for Lisp_Object.

6 years agoAutoupdate from Gnulib
Paul Eggert [Tue, 20 Mar 2018 16:26:09 +0000 (09:26 -0700)]
Autoupdate from Gnulib

6 years ago; Rewrap doc string
Paul Eggert [Tue, 20 Mar 2018 15:57:40 +0000 (08:57 -0700)]
; Rewrap doc string

6 years agoExtend Tramp's UTF8 tests
Michael Albinus [Tue, 20 Mar 2018 15:33:51 +0000 (16:33 +0100)]
Extend Tramp's UTF8 tests

* test/lisp/net/tramp-tests.el (tramp--test-utf8):
Apply more exhaustive tests.

6 years agoBetter support for 'transpose-chars' in Flyspell mode
Aaron Jensen [Wed, 14 Mar 2018 15:09:50 +0000 (08:09 -0700)]
Better support for 'transpose-chars' in Flyspell mode

* lisp/textmodes/flyspell.el (flyspell-post-command-hook): Check
word  before previous point location after 'transpose-chars'.
(Bug#30813)

6 years agoCorrect Info link markup
Robert Pluim [Mon, 12 Mar 2018 16:43:23 +0000 (17:43 +0100)]
Correct Info link markup

* lisp/gnus/gnus-agent.el (gnus-agent-auto-agentize-methods):
Correct markup for Info link.
* src/minibuf.c (Fcompleting_read): Likewise.

6 years agoImprove documentation of 'with-help-window'
Nick Helm [Sun, 18 Mar 2018 08:05:44 +0000 (21:05 +1300)]
Improve documentation of 'with-help-window'

* doc/lispref/help.texi (Help Functions): Change variable name
to 'buffer-or-name'.

* lisp/help.el (with-help-window): Change variable name to
'buffer-or-name' and rewrite the doc string, adding reference
to 'help-window-setup'.  (Bug#30792)

6 years agoMinor improvements in building.texi
Eli Zaretskii [Tue, 20 Mar 2018 09:34:14 +0000 (11:34 +0200)]
Minor improvements in building.texi

* doc/emacs/building.texi (Compilation Shell): Mention that this
section is for local compilation buffers.
(Compilation, Compilation Mode): Mention that 'g' is bound to
'recompile' in compilation buffers.
(Grep Searching): Add a cross-reference to "Compilation Mode".
Suggested by Michael Albinus <michael.albinus@gmx.de> in
emacs-manual-bugs@gnu.org.

6 years ago* lisp/textmodes/bibtex.el (bibtex-mark-entry): activate mark
Alex Branham [Fri, 19 Jan 2018 18:54:00 +0000 (12:54 -0600)]
* lisp/textmodes/bibtex.el (bibtex-mark-entry): activate mark

6 years agoSet gnus-newsgroup-selection in the summary buffer
Andrew G Cohen [Tue, 20 Mar 2018 05:28:21 +0000 (13:28 +0800)]
Set gnus-newsgroup-selection in the summary buffer

* lisp/gnus/nnselect.el (nnselect-retrieve-headers,
  nnselect-request-thread): Ensure that gnus-newsgroup-selection is
  set locally in the summary buffer.

6 years ago; Spelling fix
Paul Eggert [Tue, 20 Mar 2018 01:55:14 +0000 (18:55 -0700)]
; Spelling fix

6 years ago; Spelling fix
Paul Eggert [Tue, 20 Mar 2018 01:53:21 +0000 (18:53 -0700)]
; Spelling fix

6 years agoImprove port to NetBSD tzalloc
Paul Eggert [Mon, 19 Mar 2018 23:49:09 +0000 (16:49 -0700)]
Improve port to NetBSD tzalloc

Problem reported by Valery Ushakov (Bug#30738#22).
* src/editfns.c (HAVE_TZALLOC_BUG): New macro.
(tzlookup): Use it.  Compile on all platforms, not just on NetBSD.

6 years ago; * test/lisp/info-xref-tests.el: Remove stray line from previous.
Glenn Morris [Mon, 19 Mar 2018 21:08:46 +0000 (17:08 -0400)]
; * test/lisp/info-xref-tests.el: Remove stray line from previous.

6 years ago* test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals): New.
Glenn Morris [Mon, 19 Mar 2018 20:57:28 +0000 (16:57 -0400)]
* test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals): New.

6 years agoTune time zone 0
Paul Eggert [Mon, 19 Mar 2018 20:29:22 +0000 (13:29 -0700)]
Tune time zone 0

* src/editfns.c (tzlookup): Treat time zone 0 like t, for speed.
Suggested by Valery Ushakov (Bug#30738#19).

6 years ago* doc/emacs/building.texi (Starting GUD): Mention 'guiler'.
Eli Zaretskii [Mon, 19 Mar 2018 20:01:55 +0000 (22:01 +0200)]
* doc/emacs/building.texi (Starting GUD): Mention 'guiler'.

6 years agoYet more proofreading of the Emacs manual
Eli Zaretskii [Mon, 19 Mar 2018 19:53:52 +0000 (21:53 +0200)]
Yet more proofreading of the Emacs manual

* doc/emacs/building.texi (Compilation, Grep Searching)
(Debuggers, GUD Customization, Source Buffers)
(Breakpoints Buffer, Threads Buffer): Minor fixes and updates.
Suggested by Michael Albinus <michael.albinus@gmx.de> in
emacs-manual-bugs@gnu.org.

6 years agoNormalize and fix some mistakes in NS-related commentary
Charles A. Roelli [Mon, 19 Mar 2018 19:16:19 +0000 (20:16 +0100)]
Normalize and fix some mistakes in NS-related commentary

* lisp/term/ns-win.el (ns-insert-working-text): Normalize
commentary.
(x-file-dialog): Fix indentation.

* src/nsfns.m (ns_get_window, interpret_services_menu)
(x_set_background_color, x_set_icon_name, x_set_tool_bar_lines)
(x_set_icon_type, x_set_mouse_color, Fx_create_frame)
(ns_window_is_ancestor, Fns_popup_font_panel)
(Fx_display_visual_class, Fns_font_name, Fns_do_applescript)
(ns_screen_name, compute_tip_xy, Fns_mouse_absolute_pixel_position)
(handlePanelKeys): Normalize commentary (also in top-level
declarations) and remove two outdated comments (one in
Fx_create_frame, the other in compute_tip_xy).

* src/nsterm.h (NSApplication, NSWindow, ns_bitmap_record):
* src/nsselect.m:
* src/nsmenu.m (ns_update_menubar, addItemWithWidgetValue:)
(runMenuAt:forFrame:keymaps:, ns_menu_show, free_frame_tool_bar)
(update_frame_tool_bar, init)
(initWithContentRect:styleMask:backing:defer:)
(initFromContents:isQuestion:, timeout_handler:)
(Fmenu_or_popup_active_p):
* src/nsimage.m (initFromXBM, initFromXBMWithDepth):
* src/nsgui.h:
* src/nsfont.m (ns_spec_to_descriptor, ns_descriptor_to_entity)
(ns_charset_covers, ns_get_req_script, ns_findfonts)
(nsfont_list_family, nsfont_open, nsfont_encode_char)
(nsfont_draw, ns_uni_to_glyphs, ns_glyph_metrics)
(syms_of_nsfont): Normalize commentary (also in top-level
declarations).

* src/nsterm.m (ns_init_locale, ns_retain_object)
(ns_screen_margins_ignoring_hidden_dock, ns_unfocus, NSImageView)
(x_make_frame_visible, x_iconify_frame, x_destroy_window)
(x_set_undecorated, x_set_no_focus_on_map, x_set_z_group)
(ns_index_color, ns_get_color, ns_lisp_to_color)
(note_mouse_movement, scrollbar, ns_scroll_run)
(ns_draw_fringe_bitmap, ns_draw_window_cursor)
(ns_draw_text_decoration, ns_draw_relief)
(ns_dumpglyphs_box_or_relief, ns_dumpglyphs_image)
(ns_dumpglyphs_stretch, ns_draw_glyph_string, ns_send_appdefined)
(ns_check_menu_open, ns_read_socket, ns_select, ns_run_loop_break)
(ns_set_vertical_scroll_bar, ns_set_horizontal_scroll_bar)
(ns_string_to_lispmod, ns_default, ns_initialize_display_info)
(ns_delete_display, ns_term_init, sendEvent:)
(applicationDidFinishLaunching:, applicationDidBecomeActive:)
(fd_handler:, setWindowClosing:, keyDown:, insertText:)
(mouseDown:, mouseMoved:, updateFrameSize:)
(windowWillResize:toSize:, windowDidResize:, windowDidResignKey:)
(initFrameFromEmacs:, toggleFullScreen:, toolbarClicked:)
(writeSelectionToPasteboard:types:, setMiniwindowImage:)
(scrollerWidth, initFrame:window:, setFrame:, repeatScroll:)
(ns_xlfd_to_fontname, syms_of_nsterm): Normalize commentary (also in
top-level declarations), and in ns_get_color, replace a Gmane link
with one from lists.gnu.org, which does not require JS to view the
message.

6 years ago* doc/emacs/rmail.texi: Fix broken link.
Paul Eggert [Mon, 19 Mar 2018 18:44:07 +0000 (11:44 -0700)]
* doc/emacs/rmail.texi: Fix broken link.

6 years ago; Spelling fix
Paul Eggert [Mon, 19 Mar 2018 18:41:40 +0000 (11:41 -0700)]
; Spelling fix

6 years agoFix recently-added POP doc glitch
Paul Eggert [Mon, 19 Mar 2018 18:41:24 +0000 (11:41 -0700)]
Fix recently-added POP doc glitch

* doc/emacs/rmail.texi (Remote Mailboxes):
POP3 → POP, when talking about POP in general.

6 years agoRevert move of interactive `transpose-regions' to Lisp
Karl Fogel [Mon, 19 Mar 2018 17:21:03 +0000 (12:21 -0500)]
Revert move of interactive `transpose-regions' to Lisp

This reverts my commit 3a3aa0e056a of 2018-03-18 at 21:43:18 UTC.
I thought consensus had been reached, but it had not: Eli Zaretskii
felt the pre-3a3aa0e056a situation was fine and would not like to
see it changed without at least further discussion.

6 years agoFix frame resize flicker on macOS (bug#30699)
Alan Third [Mon, 19 Mar 2018 15:04:40 +0000 (15:04 +0000)]
Fix frame resize flicker on macOS (bug#30699)

* src/nsterm.h (ns_enable_screen_updates): New function.
* src/nsterm.m (ns_enable_screen_updates):
(ns_disable_screen_updates): New functions.
(disable_screen_updates_count): Count of number of times we've called
NSDisableScreenUpdates.
(x_set_window_size): Disable screen updates when not in a live resize
loop.
* src/xdisp.c (redisplay_internal): Reenable screen updates when
redisplay doesn't complete due to a popup.
(unwind_redisplay): Reenable screen updates.

6 years agoMore proofreading of the Emacs manual
Eli Zaretskii [Mon, 19 Mar 2018 15:18:47 +0000 (17:18 +0200)]
More proofreading of the Emacs manual

* doc/emacs/macos.texi (Mac / GNUstep Basics): Fix typos.  Improve
indexing.
(Mac / GNUstep Basics, Mac / GNUstep Customization)
(Mac / GNUstep Events): Improve indexing.

* doc/emacs/rmail.texi (Rmail): Mention Gnus.
(Rmail Basics, Rmail Scrolling): Improve cross-references and
indexing.
(Rmail Motion): Minor improvements.
(Rmail Inbox): Remove outdated text about Babyl format.
(Rmail Files): Formatting changes.  Comment out
set-rmail-inbox-list in the table of commands, as it is commented
out in the text that follows.
(Rmail Output, Rmail Labels, Rmail Reply, Rmail Make Summary):
Minor copyedits.
(Rmail Summary Edit): Document
rmail-summary-scroll-between-messages.
(Rmail Editing): Improve indexing.
(Movemail): Fix typos.
(Remote Mailboxes): Use "POP3" rather than "POP".

6 years agoPrint top time consuming tests if advised
Michael Albinus [Mon, 19 Mar 2018 11:58:45 +0000 (12:58 +0100)]
Print top time consuming tests if advised

* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
New argument HIGH.  Print top-running tests.

* test/Makefile.in (check-doit): Use ${SUMMARIZE_TESTS}.

* test/README: Explain SUMMARIZE_TESTS.

6 years agoFollowup to last change in browse-url.el
Eli Zaretskii [Mon, 19 Mar 2018 09:17:20 +0000 (11:17 +0200)]
Followup to last change in browse-url.el

* lisp/net/browse-url.el (browse-url-emacs): Doc fix to follow up
the previous change.  (Bug#30673)

* etc/NEWS: Mention the change in 'browse-url-emacs'.

6 years agoAllow 'browse-url-emacs' to fetch URL in the selected window
Pierre Téchoueyres [Thu, 1 Mar 2018 21:22:05 +0000 (22:22 +0100)]
Allow 'browse-url-emacs' to fetch URL in the selected window

* lisp/net/browse-url.el (browse-url-emacs): Use same-window argument.
(Bug#30673)