1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00
Commit Graph

132569 Commits

Author SHA1 Message Date
Stefan Monnier
3ddff08034 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.
2018-03-23 11:29:06 -04:00
Stefan Monnier
cf3164523b * 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.
2018-03-23 11:09:54 -04:00
Stefan Monnier
6695c1be51 Merge from origin/emacs-26
b8ebf5fb64 * src/lisp.h (struct Lisp_Buffer_Local_Value): Update comm...
8c92a37cb4 * doc/emacs/trouble.texi: Fix location of `emacs-version' ...
10b1f2fdd5 Explain more about (defvar foo) form (Bug#18059)
68c2f336b1 * doc/lispref/buffers.texi (Buffer List): Fix grammar.
7e720c6851 * doc/lispref/anti.texi (Antinews): Fix grammar.
a6a821d29b * lisp/org/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type.
2018-03-23 11:01:31 -04:00
Stefan Monnier
8e5ab342aa ; Merge from origin/emacs-26
The following commit was skipped:

7c993c34b0 sql.el defcustom fixes
2018-03-23 11:01:31 -04:00
Noam Postavsky
b8ebf5fb64 * src/lisp.h (struct Lisp_Buffer_Local_Value): Update commentary. 2018-03-23 08:19:42 -04:00
Noam Postavsky
8c92a37cb4 * doc/emacs/trouble.texi: Fix location of `emacs-version' index. 2018-03-23 08:19:42 -04:00
Noam Postavsky
10b1f2fdd5 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.
2018-03-23 08:19:09 -04:00
Robert Pluim
31ce174a72 Make update_autogen work in git worktrees
* admin/update_autogen: Make it work in a git worktree
2018-03-23 09:15:42 +01:00
Glenn Morris
dfea6d5a4a 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.
2018-03-22 21:40:24 -07:00
Stefan Monnier
97b7e58c4d 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.
2018-03-22 18:18:26 -04:00
Charles A. Roelli
68c2f336b1 * doc/lispref/buffers.texi (Buffer List): Fix grammar. 2018-03-22 20:43:42 +01:00
Charles A. Roelli
7e720c6851 * doc/lispref/anti.texi (Antinews): Fix grammar. 2018-03-22 20:40:02 +01:00
Charles A. Roelli
86d6417bf1 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.
2018-03-22 20:33:45 +01:00
Glenn Morris
a6a821d29b * lisp/org/ob-lisp.el (org-babel-lisp-eval-fn): Tweak type.
Avoids type mismatch when relevant library is not present/loaded.
2018-03-22 14:37:45 -04:00
Glenn Morris
7c993c34b0 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.
2018-03-22 14:31:33 -04:00
Paul Eggert
311bb33218 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”.
2018-03-22 11:29:02 -07:00
Paul Eggert
011186279c 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.
2018-03-22 09:33:33 -07:00
Michael Albinus
2849477af2 ; Fix last commit in tramp.el 2018-03-22 16:52:58 +01:00
Glenn Morris
0afb436eeb Merge from origin/emacs-26
8ac621b (origin/emacs-26) Document DEFUN attributes
16d0cc7 * etc/NEWS: Add an entry for auth-source-pass.
cc1702f Fix the MSDOS build
daa9e85 Improve warning and error messages
7612dd1 Adjust eieio persistence tests for expected failure
f0cf4dc Let eieio-persistent-read read what object-write has written
40ad1ff Handle possible classtype values in eieio-persistent-read
4ec935d Add new tests for eieio persistence
47917d8 * lisp/gnus/gnus-cloud.el (gnus-cloud-synced-files): Fix doc ...
e32f352 * lisp/ibuf-ext.el (ibuffer-never-search-content-mode): Fix t...
5268f30 * doc/lispref/windows.texi (Selecting Windows): Fix a typo.
143b485 * doc/lispref/internals.texi (Writing Emacs Primitives): Fix ...
4ab4551 Firm up documentation of generalized variables
a5bf099 Improve documentation of Auto-Revert mode
ed05eaa Improvements in dired.texi

Conflicts:
	etc/NEWS
2018-03-22 07:50:37 -07:00
Glenn Morris
081c39beb0 ; Merge from origin/emacs-26
The following commits were skipped:

f8cad16 Revert "Support all perl variable declarators and prefixes"
d09c488 Port to 32-bit sparc64
2018-03-22 07:50:37 -07:00
Eli Zaretskii
8ac621bb55 Document DEFUN attributes
* doc/lispref/internals.texi (Writing Emacs Primitives): Document
specification of function attributes in DEFUN.
2018-03-22 14:57:43 +02:00
Nicolas Petton
16d0cc73f2
* etc/NEWS: Add an entry for auth-source-pass. 2018-03-22 11:55:15 +01:00
Eli Zaretskii
cc1702f790 Fix the MSDOS build
* msdos/sed2v2.inp (HAVE_SBRK): Define to 1.
2018-03-22 11:15:23 +02:00
Michael Albinus
bbcd5787cb 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>.
2018-03-22 09:58:56 +01:00
Michael Albinus
aeb107b630 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.
2018-03-22 09:43:44 +01:00
Michael Albinus
0a53c71fe2 Fix Bug#30904
* lisp/net/tramp.el (tramp-dissect-file-name): Adapt docstring.  (Bug#30904)
2018-03-22 09:37:48 +01:00
Eric Abrahamsen
daa9e853bd 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.
2018-03-22 10:46:09 +08:00
Eric Abrahamsen
7612dd14b6 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.
2018-03-22 10:46:08 +08:00
Eric Abrahamsen
f0cf4dc629 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.
2018-03-22 10:46:08 +08:00
Eric Abrahamsen
40ad1ff327 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.
2018-03-22 10:46:08 +08:00
Pierre Téchoueyres
4ec935dc5b 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.
2018-03-22 10:46:07 +08:00
Glenn Morris
47917d8f4d * lisp/gnus/gnus-cloud.el (gnus-cloud-synced-files): Fix doc & type. 2018-03-21 20:47:28 -04:00
Glenn Morris
e32f3525ea * lisp/ibuf-ext.el (ibuffer-never-search-content-mode): Fix type. 2018-03-21 19:38:44 -04:00
Paul Eggert
cae9e0fa03 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.
2018-03-21 16:08:53 -07:00
Glenn Morris
3b42c083b6 * lisp/play/fortune.el (fortune-in-buffer): Revert previous nonsense. 2018-03-21 17:10:41 -04:00
Glenn Morris
5268f3059d * doc/lispref/windows.texi (Selecting Windows): Fix a typo. 2018-03-21 16:58:11 -04:00
Charles A. Roelli
61dfc2c283 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.
2018-03-21 21:16:18 +01:00
Charles A. Roelli
143b485029 * doc/lispref/internals.texi (Writing Emacs Primitives): Fix grammar. 2018-03-21 20:52:35 +01:00
Paul Eggert
e70d0c9e66 Add tests for Bug#30408
* test/src/editfns-tests.el (format-%d-large-float)
(format-%x-large-float, format-%o-invalid-float): New tests.
2018-03-21 12:11:52 -07:00
Glenn Morris
5648746756 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.
2018-03-21 14:13:53 -04:00
Glenn Morris
319fbc9fce ; * autogen.sh: Comment. 2018-03-21 14:12:42 -04:00
Glenn Morris
e0080b854d * lisp/play/fortune.el (fortune-in-buffer): Unadvertise no-op arg. 2018-03-21 14:12:17 -04:00
Glenn Morris
03a27fab69 * lisp/play/fortune.el (fortune-message):
Avoid trailing newline.  (Bug#30887)
2018-03-21 14:10:05 -04:00
Alan Mackenzie
4ab4551470 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.
2018-03-21 17:36:34 +00:00
Eli Zaretskii
a5bf099008 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.
2018-03-21 18:57:41 +02:00
Eli Zaretskii
ed05eaa948 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.
2018-03-21 18:49:29 +02:00
Noam Postavsky
f8cad16bb3 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).
2018-03-20 20:14:40 -04:00
Paul Eggert
d09c488cb5 Port to 32-bit sparc64
Backport from master.
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.
2018-03-20 14:39:12 -07:00
Glenn Morris
20db48089b * lisp/isearch.el (isearch-pre-command-hook): Replace cl-lib function.
As a preloaded file, isearch.el cannot require cl-lib at runtime.
2018-03-20 17:15:39 -04:00
Alan Mackenzie
16559146f9 * cc-engine.el (c-looking-at-or-maybe-in-bracelist): Remove pessimization 2018-03-20 18:40:52 +00:00