]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 years agoLoad documentation at startup.
Ken Raeburn [Wed, 8 Feb 2017 09:42:00 +0000 (04:42 -0500)]
Load documentation at startup.

Documentation pointers for Lisp subrs are currently only loadable via
Snarf-documentation.

* lisp/loadup.el: Make dumped.elc attempt to reload the DOC file.
Warn but continue if it fails.

7 years agoDon't save internal--text-quoting-flag.
Ken Raeburn [Tue, 7 Feb 2017 08:15:40 +0000 (03:15 -0500)]
Don't save internal--text-quoting-flag.

It gets set in emacs.c at startup, and should reflect the environment
in which we are running, not the environment in which the lisp code
was loaded and dumped.

This manifested indirectly in the Python documentation, where due to
the use of format-message inside a defmacro body, the quoting style
used in some macro-generated functions was dependent on the use of
UTF-8 in the environment when the file was byte-compiled.

* lisp/loadup.el: Don't save internal--text-quoting-flag.

7 years agoCreate frame's face cache.
Ken Raeburn [Fri, 20 Jan 2017 08:00:47 +0000 (03:00 -0500)]
Create frame's face cache.

* src/xfaces.c (Finternal_set_lisp_face_attribute): Ensure the face
cache exists on a frame before calling Fmodify_frame_parameters.

7 years agoDon't save coding-system-list.
Ken Raeburn [Sun, 5 Feb 2017 13:03:27 +0000 (08:03 -0500)]
Don't save coding-system-list.

The act of re-defining the coding systems and aliases will update the
list.

* lisp/loadup.el: Skip coding-system-list when dumping variables.

7 years agoLoad dumped.elc quietly.
Ken Raeburn [Sun, 5 Feb 2017 12:31:22 +0000 (07:31 -0500)]
Load dumped.elc quietly.

* src/emacs.c (main): Pass additional arguments to load to silence
messages about loading dumped.elc.

7 years agoCall unify-charset on appropriate charsets.
Ken Raeburn [Sun, 5 Feb 2017 11:23:21 +0000 (06:23 -0500)]
Call unify-charset on appropriate charsets.

* lisp/loadup.el: Build a list of charsets with the :unify-map
property, and generate calls to unify-charset on them at startup.

7 years agoReload category table at startup rather than saving it.
Ken Raeburn [Mon, 5 Jun 2017 03:34:54 +0000 (23:34 -0400)]
Reload category table at startup rather than saving it.

* lisp/loadup.el: Dump instructions to load international/characters
at startup.

7 years agoDump and restore the standard syntax table.
Ken Raeburn [Wed, 1 Feb 2017 04:44:30 +0000 (23:44 -0500)]
Dump and restore the standard syntax table.

* src/syntax.c (Finternal_set_standard_syntax_table): New function.
(syms_of_syntax): Make it know.
* lisp/loadup.el: Generate a call, supplying the table definition at
dump time.

7 years agoSave and restore default values, and buffer-local setting.
Ken Raeburn [Fri, 27 Jan 2017 08:54:36 +0000 (03:54 -0500)]
Save and restore default values, and buffer-local setting.

* lisp/loadup.el: When dumping symbol values, write out the default
value, not the current value.  If the variable is marked as
local-if-set, emit a make-variable-buffer-local call.

7 years agoDon't trash current-load-list while loading dumped.elc.
Ken Raeburn [Fri, 27 Jan 2017 08:35:35 +0000 (03:35 -0500)]
Don't trash current-load-list while loading dumped.elc.

The variable is used during the load process; setting its value
results in a scrambled load history and difficult looking up help
strings.

* lisp/loadup.el: Exclude current-load-list from the variables dumped.

7 years agoEli's test patch to stop using dump-emacs.
Ken Raeburn [Sun, 8 Jan 2017 19:13:01 +0000 (14:13 -0500)]
Eli's test patch to stop using dump-emacs.

7 years agoUse #N# syntax for repeated symbols in dumped.elc.
Ken Raeburn [Sat, 31 Dec 2016 00:44:27 +0000 (19:44 -0500)]
Use #N# syntax for repeated symbols in dumped.elc.

Parsing symbol names involves processing for possible multibyte
characters and comparisons against other symbol-name strings in the
obarray.  The #N# syntax is simpler, uses an automatically resized
hash table keyed by integers, and is in most cases shorter, so reading
can be a little faster.

When doing this we have to avoid the special "," syntax because we
would wind up printing "#1=,foo" which reads back as setting #1# to
,foo when we really wanted to set #1# to just the comma symbol.

* src/print.c (syms_of_print): Define new Lisp variable
print-symbols-as-references.
(PRINT_CIRCLE_CANDIDATE_P): If it's set, accept interned symbols.
(print_preprocess): Update comment.
(print_object): When printing "," or related symbols with special
syntax, don't use print_object on the special symbol itself.
* lisp/loadup.el: Bind print-symbols-as-references to t while creating
the dumped.elc file.

7 years agoDon't dump a copy of the obarray.
Ken Raeburn [Wed, 14 Dec 2016 05:32:47 +0000 (00:32 -0500)]
Don't dump a copy of the obarray.

The obarray was included by value in a function definition as a result
of apply-partial, but it writes out as a simple array and a lot of
chained symbols are discarded.

* lisp/progmodes/elisp-mode.el (elisp--xref-identifier-completion-table):
Rewrite definition to not directly incorporate the value of obarray.

7 years agoDump defvars for special variables only.
Ken Raeburn [Wed, 14 Dec 2016 02:49:18 +0000 (21:49 -0500)]
Dump defvars for special variables only.

* lisp/loadup.el: Don't generate a defvar unless the variable is
special.  Do include an initializer, otherwise defvar is a no-op.

7 years agoDon't memset storage we're about to fill anyway.
Ken Raeburn [Tue, 13 Dec 2016 05:37:20 +0000 (00:37 -0500)]
Don't memset storage we're about to fill anyway.

* src/charset.c (load_charset_map_from_file): Don't bother to memset
the large allocated arrays before filling them.

7 years agoCreate *Messages* buffer when loading dumped data.
Ken Raeburn [Sat, 10 Dec 2016 02:10:54 +0000 (21:10 -0500)]
Create *Messages* buffer when loading dumped data.

There seem to be some startup paths using dumped.elc that attempt to
use the messages buffer without creating it.

* lisp/loadup.el: When generating dumped.elc, emit a form to create
the standard "*Messages*" buffer.

7 years agoDon't get into an error loop if dumped.elc isn't found.
Ken Raeburn [Thu, 8 Dec 2016 13:04:35 +0000 (08:04 -0500)]
Don't get into an error loop if dumped.elc isn't found.

When temacs is run, if dumped.elc isn't in the right place (currently
$srctop/src/dumped.elc, though it's generated in the build tree's src
directory), starting in X11 mode will produce a message about not
finding it, but starting in tty mode will produce an error loop
because internal-echo-keystrokes-prefix isn't defined.

This patch traps the error and kills the Emacs session with an exit
code of 42, and no message.  This is worse than the X11 behavior, but
better than the tty behavior.

It's not a long term fix though.

* src/emacs.c (main): If dumped.elc isn't found, exit with an error
code.
(syms_of_emacs): Define Qcondition_case.

7 years agoForce purification off when using dumped.elc.
Ken Raeburn [Wed, 7 Dec 2016 11:42:58 +0000 (06:42 -0500)]
Force purification off when using dumped.elc.

* lisp/loadup.el: Print a separate form at the start of dumped.elc
setting purify-flag to nil, before the big progn form is read.

7 years agoIncrease gc-cons-threshold.
Ken Raeburn [Wed, 7 Dec 2016 11:34:22 +0000 (06:34 -0500)]
Increase gc-cons-threshold.

The large "progn" block in dumped.elc greatly exceeds the old default
GC threshold.  Garbage collection during startup becomes a non-trivial
part of startup time.  (Less than 10% in my testing, but that's not
nothing.)

This is NOT a good long-term solution, at least by itself.

* src/alloc.c (GC_DEFAULT_THRESHOLD): Increase to 3 million words.

7 years agoStefan's patch to write out and load "dumped.elc"; Oct 31 version.
Stefan Monnier [Tue, 6 Dec 2016 10:37:47 +0000 (05:37 -0500)]
Stefan's patch to write out and load "dumped.elc"; Oct 31 version.

7 years ago; * doc/emacs/search.texi (Word Search): Update for changes in bug#27341.
Eli Zaretskii [Sat, 22 Jul 2017 07:52:52 +0000 (10:52 +0300)]
; * doc/emacs/search.texi (Word Search): Update for changes in bug#27341.

7 years agoFix the eww-search-words description in the Emacs manual
Fabrice Bauzac [Sat, 22 Jul 2017 07:43:11 +0000 (10:43 +0300)]
Fix the eww-search-words description in the Emacs manual

* doc/emacs/search.texi (Word Search):
Include the key binding for eww-search-words in the manual.
Fix the spelling of the 'eww-search-words' command.

Copyright-paperwork-exempt: yes

7 years agoIntroduce defcustom 'executable-prefix-env'
Andrew L. Moore [Sat, 22 Jul 2017 07:34:18 +0000 (10:34 +0300)]
Introduce defcustom 'executable-prefix-env'

* lisp/progmodes/executable.el (executable-prefix): Update the doc
string.
(executable-prefix-env): New defcustom.
(executable-set-magic): Use executable-prefix-env.

* etc/NEWS: Document the new variable.

7 years ago* test/lisp/ibuffer-tests.el: Delete temporary files.
Glenn Morris [Sat, 22 Jul 2017 01:22:49 +0000 (21:22 -0400)]
* test/lisp/ibuffer-tests.el: Delete temporary files.

7 years agoFurther attempt to avoid hang in network-stream-tests
Glenn Morris [Fri, 21 Jul 2017 18:01:12 +0000 (14:01 -0400)]
Further attempt to avoid hang in network-stream-tests

* test/lisp/net/network-stream-tests.el (connect-to-tls-ipv6-nowait):
Limit the time we wait for the external process.

7 years agoStop skipping many ibuffer tests by default
Glenn Morris [Fri, 21 Jul 2017 17:49:37 +0000 (13:49 -0400)]
Stop skipping many ibuffer tests by default

* test/lisp/ibuffer-tests.el (ibuffer-0autoload):
Rename so it sorts first.
(ibuffer-save-filters, ibuffer-filter-inclusion-1)
(ibuffer-filter-inclusion-2, ibuffer-filter-inclusion-3)
(ibuffer-filter-inclusion-4, ibuffer-filter-inclusion-5)
(ibuffer-filter-inclusion-6, ibuffer-filter-inclusion-7)
(ibuffer-filter-inclusion-8, ibuffer-decompose-filter)
(ibuffer-and-filter, ibuffer-or-filter, ibuffer-format-qualifier)
(ibuffer-unary-operand): Require ibuf-ext so tests not skipped.

7 years agoUse lexical-binding in todo-mode.el
Stefan Monnier [Fri, 21 Jul 2017 16:54:07 +0000 (18:54 +0200)]
Use lexical-binding in todo-mode.el

Adjust code accordingly and make various minor improvements.

* lisp/calendar/todo-mode.el: Enable lexical-binding.
(dayname, monthname, day, month, year): Make forward defvars
of these keywords from macros defined in calendar.el; wrap
them in with-no-warnings.
(todo-files, todo-files-function, todo-date-pattern)
(todo-mode-line-function, todo-show, todo-forward-category)
(todo-edit-item--header, todo-set-category-number)
(todo-adjusted-category-label-length)
(todo-total-item-counts, todo-filter-items)
(todo-print-buffer-function, todo-convert-legacy-date-time)
(todo-category-number, todo-category-completions)
(todo-read-file-name, todo-read-category)
(todo-validate-name, todo-read-date)
(todo-set-show-current-file, todo-modes-set-1)
(todo-modes-set-2, todo-modes-set-3, todo-mode):
Use #' instead of ' to quote functions.
(todo-files): Use \' instead of $ in regexp.
(todo--files-type-list): New function.
(todo-default-todo-file, todo-category-completions-files)
(todo-filter-files, todo-multiple-filter-files)
(todo-reevaluate-default-file-defcustom)
(todo-reevaluate-category-completions-files-defcustom)
(todo-reevaluate-filter-files-defcustom): Use it.
(todo-show, todo-rename-file, todo-move-category)
(todo-edit-item--text, todo-edit-quit, todo-edit-item--header)
(todo-item-undone, todo-unarchive-items, todo-search)
(todo-filter-items, todo-filter-items-1, todo-find-item)
(todo-category-select, todo-read-date)
(todo-nondiary-marker-matcher, todo-date-string-matcher)
(todo-diary-expired-matcher, todo-convert-legacy-files)
(todo-read-category): Reformat to avoid code hiding behind a
more deeply embedded element.
(todo-forward-category, todo-set-category-number):
Use 'funcall' instead of 'apply'.
(todo-toggle-mark-item, todo-edit-item--diary-inclusion)
(todo-edit-category-diary-inclusion)
(todo-insert-sort-button, todo-insert-category-line)
(todo-multiple-filter-files): Mark unused local variables.
(todo-edit-item--header, todo-move-item, todo-print-buffer)
(todo-edit-item--header, todo-move-item, todo-check-file)
(todo-edit-item--next-key): Remove unused local variables.
(todo-insert-sort-button, todo-insert-category-line):
Use a closure instead of a backquoted lambda.
(todo-update-categories-display, todo-print-buffer): Simplify code.
(todo-print-buffer-function): Document calling convention.
(todo-category-completions): Use cl-pushnew instead of add-to-list.
(todo-mode-map, todo-archive-mode-map)
(todo-categories-mode-map, todo-filtered-items-mode-map):
Remove superfluous call of suppress-keymap, since it's already
in the parent special-mode-map.

7 years agodired: Revert buffer when DIRNAME is a cons
Tino Calancha [Fri, 21 Jul 2017 04:32:48 +0000 (13:32 +0900)]
dired: Revert buffer when DIRNAME is a cons

* lisp/dired.el (dired-internal-noselect): Revert buffer if DIR-OR-LIST
is a cons, or dired-directory is a cons and DIR-OR-LIST a string (Bug#7131).
Update the comments.
* test/lisp/dired-tests.el (dired-test-bug7131): Test should pass.

7 years ago; * etc/NEWS: Fix format of an entry.
Tino Calancha [Fri, 21 Jul 2017 04:23:38 +0000 (13:23 +0900)]
; * etc/NEWS: Fix format of an entry.

7 years agoHandle when dired-directory is a cons in some Dired functions
Tino Calancha [Fri, 21 Jul 2017 04:17:14 +0000 (13:17 +0900)]
Handle when dired-directory is a cons in some Dired functions

* lisp/dired-aux.el (dired-rename-subdir-1)
* lisp/dired-x.el (dired-mark-omitted):
Handle when dired-directory is a cons.

7 years agoMake eshell-next-prompt more reliable (Bug#27405)
Noam Postavsky [Wed, 12 Jul 2017 02:11:19 +0000 (22:11 -0400)]
Make eshell-next-prompt more reliable (Bug#27405)

* lisp/eshell/em-prompt.el (eshell-next-prompt): Search for
`eshell-prompt-regexp' (and `read-only' text-property if
`eshell-highlight-prompt' is set) rather than trying to use
`forward-paragraph'.
(eshell-previous-prompt): Don't count prompt on current line.

7 years agoSimplify recent gnutls.c changes
Paul Eggert [Thu, 20 Jul 2017 23:21:57 +0000 (16:21 -0700)]
Simplify recent gnutls.c changes

* src/gnutls.c (clear_storage) [HAVE_GNUTLS3_AEAD]: Remove.
All uses replaced by calls to explicit_bzero; that’s clear enough.
(gnutls_symmetric_aead) [HAVE_GNUTLS3_AEAD]: Simplify by
coalescing duplicate actions.  There is no need to invoke
SAFE_FREE before calling ‘error’.

7 years ago; Spelling fixes
Paul Eggert [Thu, 20 Jul 2017 22:40:48 +0000 (15:40 -0700)]
; Spelling fixes

7 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Thu, 20 Jul 2017 18:28:17 +0000 (20:28 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

7 years agoStylistic changes in tramp-cache.el
Michael Albinus [Thu, 20 Jul 2017 18:27:55 +0000 (20:27 +0200)]
Stylistic changes in tramp-cache.el

* test/lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-set-file-property): Use `bound-and-true-p'.  Add
counter variables to `tramp-cache-unload-hook'.

7 years ago* admin/notes/hydra: Small updates.
Glenn Morris [Thu, 20 Jul 2017 18:00:27 +0000 (14:00 -0400)]
* admin/notes/hydra: Small updates.

7 years agoMake tramp unloading handle debug counter variables
Glenn Morris [Thu, 20 Jul 2017 17:46:52 +0000 (13:46 -0400)]
Make tramp unloading handle debug counter variables

* lisp/net/tramp-cache.el (tramp-get-file-property)
(tramp-set-file-property): Add counter variables to tramp-unload-hook.

7 years agoFix hscrolling calculations when display-line-numbers is set
Eli Zaretskii [Thu, 20 Jul 2017 13:25:11 +0000 (16:25 +0300)]
Fix hscrolling calculations when display-line-numbers is set

* src/xdisp.c (move_it_in_display_line_to): Account for line
numbers in hscrolled lines.  (Bug#27756)

7 years agoFix the bogus change made 13 years ago (bug#27084)
Katsumi Yamaoka [Thu, 20 Jul 2017 07:16:48 +0000 (07:16 +0000)]
Fix the bogus change made 13 years ago (bug#27084)

* lisp/gnus/gnus-sum.el (gnus-summary-toggle-header):
Fix the way to test if there is no visible header (bug#27084).

7 years agoUse grep's --null option (Bug#6843)
Noam Postavsky [Wed, 14 Sep 2016 00:48:09 +0000 (20:48 -0400)]
Use grep's --null option (Bug#6843)

* lisp/progmodes/grep.el (grep-use-null-filename-separator): New option.
(grep--regexp-alist-column, grep--regexp-alist-bin-matcher)
(grep-with-null-regexp-alist, grep-fallback-regexp-alist): New
constants, replacing `grep-regexp-alist'.
(grep-regex-alist): Mark the variable obsolete, add a new function of
the same name to replace it.
(grep-compute-defaults): Compute default for
`grep-use-null-filename-separator'.
(grep-mode): Set compilation-error-regexp-alist (buffer locally) to the
value of `grep-with-null-regexp-alist' or `grep-fallback-regexp-alist'
according to `grep-use-null-filename-separator'.
* lisp/progmodes/xref.el (xref-collect-matches): Call
`grep-regex-alist' instead of the obsolete variable.  Don't hardcode
grep-regexp-alist match groups.
* etc/NEWS: Announce new use of --null.  Move 'grep-save-buffers'
item under "Grep" heading as well.

7 years ago* src/gnutls.c (clear_storage): Define only if needed.
Philipp Stephani [Wed, 19 Jul 2017 19:21:40 +0000 (21:21 +0200)]
* src/gnutls.c (clear_storage): Define only if needed.

7 years agoAdjust todo-quit to recent change in dired
Stephen Berman [Wed, 19 Jul 2017 13:41:59 +0000 (15:41 +0200)]
Adjust todo-quit to recent change in dired

* lisp/calendar/todo-mode.el (todo-quit): Use quit-window instead of
bury-buffer to exit todo-mode.  This restores the desired behavior
of not immediately returning to the exited todo-mode buffer on
quitting another buffer, which a dired bug fix had changed (see
http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00739.html).

7 years ago; Editorial changes in admin/notes/hydra
Michael Albinus [Wed, 19 Jul 2017 09:34:29 +0000 (11:34 +0200)]
; Editorial changes in admin/notes/hydra

7 years agoAdd test for bugs 7131, 27762
Tino Calancha [Wed, 19 Jul 2017 08:46:14 +0000 (17:46 +0900)]
Add test for bugs 7131, 27762

Require 'ls-lisp' at top of the file.
* test/lisp/dired-tests.el (dired-test-bug7131, dired-test-bug27762):
New tests.
(dired-test-bug27693): Delete Dired buffer at the end.

7 years ago* admin/notes/hydra: Mention environment variable EMACS_HYDRA_CI.
Michael Albinus [Tue, 18 Jul 2017 20:40:23 +0000 (22:40 +0200)]
* admin/notes/hydra: Mention environment variable EMACS_HYDRA_CI.

7 years ago* lisp/emacs-lisp/nadvice.el (advice--defalias-fset): Strip advices
Stefan Monnier [Tue, 18 Jul 2017 18:07:16 +0000 (14:07 -0400)]
* lisp/emacs-lisp/nadvice.el (advice--defalias-fset): Strip advices

This tries to make sure that (defalias F (symbol-function F)) stays a no-op.

7 years agoUse a more specific test for running on hydra.nixos.org
Glenn Morris [Tue, 18 Jul 2017 16:53:46 +0000 (12:53 -0400)]
Use a more specific test for running on hydra.nixos.org

* lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit):
* test/Makefile.in (WRITE_LOG):
* test/lisp/filenotify-tests.el:
* test/lisp/emacs-lisp/eieio-tests/eieio-test-methodinvoke.el
(eieio-test-method-order-list-6):
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-37-obsolete-name-in-constructor):
* test/lisp/net/tramp-tests.el: Replace NIX_STORE with EMACS_HYDRA_CI.

7 years agoAvoid infloop due to Eshell's "smart" redisplay
Eli Zaretskii [Tue, 18 Jul 2017 16:13:58 +0000 (19:13 +0300)]
Avoid infloop due to Eshell's "smart" redisplay

* src/xdisp.c (pos_visible_p): Save and restore the window's
mode-line and header-line height.  (Bug#27752)

7 years ago; Add further traces to tramp-tests.el
Michael Albinus [Tue, 18 Jul 2017 16:10:09 +0000 (18:10 +0200)]
; Add further traces to tramp-tests.el

7 years ago* emacs-lisp/cl-lib.el (cl--old-struct-type-of): Accept `[]'
Stefan Monnier [Tue, 18 Jul 2017 16:01:27 +0000 (12:01 -0400)]
* emacs-lisp/cl-lib.el (cl--old-struct-type-of): Accept `[]'

7 years agoFix indentation when display-line-numbers is non-nil
Eli Zaretskii [Tue, 18 Jul 2017 14:25:30 +0000 (17:25 +0300)]
Fix indentation when display-line-numbers is non-nil

* src/xdisp.c (x_produce_glyphs): Fix a typo in deciding whether
to go one more tab stop to display a TAB.  (Bug#27743)

7 years agoDon't use gtk_widget_get_scale_factor on old GTK3 versions
Lars Ingebrigtsen [Tue, 18 Jul 2017 13:31:28 +0000 (15:31 +0200)]
Don't use gtk_widget_get_scale_factor on old GTK3 versions

* src/gtkutil.c (xg_get_scale): gtk_widget_get_scale_factor is
only present since GTK 3.10.

7 years agoLet delete-selection-mode work with popup-menu commands (Bug#27569)
Noam Postavsky [Wed, 12 Jul 2017 01:09:10 +0000 (21:09 -0400)]
Let delete-selection-mode work with popup-menu commands (Bug#27569)

* lisp/menu-bar.el (popup-menu): Run `pre-command-hook' with
`this-command' set to the selected command.

7 years agoPort gnutls.c to older (buggier?) GnuTLS
Paul Eggert [Tue, 18 Jul 2017 07:37:03 +0000 (00:37 -0700)]
Port gnutls.c to older (buggier?) GnuTLS

Problem reported for GnuTLS 3.2.1 by Glenn Morris in:
http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00716.html
http://lists.gnu.org/archive/html/emacs-devel/2017-07/msg00742.html
Although I don't see how this bug can occur with vanilla GnuTLS 3.2.1,
perhaps hydra was using a modified GnuTLS.
* src/gnutls.c (Fgnutls_ciphers): Don't assume GNUTLS_CIPHER_NULL
is at the end of the list returned by gnutls_cipher_list,
or that the earlier ciphers all have non-null names.

7 years agoFix relocation with named cell referred to by a one-symbol formula.
Vincent Belaïche [Mon, 17 Jul 2017 18:54:20 +0000 (20:54 +0200)]
Fix relocation with named cell referred to by a one-symbol formula.

* lisp/ses.el (ses-replace-name-in-formula): Fix bug for it to
work also with one symbol formulas.

* test/lisp/ses-tests.el
(ses-tests-renaming-cell-with-one-symbol-formula): Add new
test for renaming with relocating a one symbol formula.

7 years agoFix symbol completion and document it.
Vincent Belaïche [Mon, 17 Jul 2017 17:58:12 +0000 (19:58 +0200)]
Fix symbol completion and document it.

* doc/misc/ses.texi (Configuring what printer function
applies): Add description of keys for completing local printer
symbols and listing local printers in a help buffer.
(Formulas): Add decription for key to list the named cell
symbols in a help buffer.

* lisp/ses.el (ses-completion-keys): New constant.
(ses--completion-table): New defvar.
(ses--list-orig-buffer): New defvar.
(ses-mode-edit-map): Fixed for symbol completion, plus add
help functions to list named cells or local printers.
(ses-edit-cell-complete-symbol)
(ses--edit-cell-completion-at-point-function): New defuns for
completion during formula edition.
(ses-edit-cell): Redefine dynamically edit keymap for
completion keys to point at the right function.
(ses-read-printer-complete-symbol)
(ses--read-printer-completion-at-point-function): New defuns
for completion during printer edition.
(ses-read-printer): Redefine dynamically edit keymap for
completion keys to point at the right function.
(ses-list-local-printers): New defun.
(ses-list-named-cells): New defun.

7 years agoMove comments around
Lars Ingebrigtsen [Sun, 16 Jul 2017 15:32:43 +0000 (17:32 +0200)]
Move comments around

7 years agoMake scaling work (?) on pre-GTK3 systems
Lars Ingebrigtsen [Sun, 16 Jul 2017 15:31:54 +0000 (17:31 +0200)]
Make scaling work (?) on pre-GTK3 systems

* src/gtkutil.c (xg_get_gdk_scale): Reinstate function.
(xg_get_scale): Use it on non-GTK3 systems.

7 years agoAlways return the GDK scale
Lars Ingebrigtsen [Sun, 16 Jul 2017 14:54:51 +0000 (16:54 +0200)]
Always return the GDK scale

* src/gtkutil.c (xg_get_scale): Return the GDK scale always.

7 years agoRemove usage of the GDK_SCALE variable
Lars Ingebrigtsen [Sun, 16 Jul 2017 14:50:57 +0000 (16:50 +0200)]
Remove usage of the GDK_SCALE variable

* src/gtkutil.c (xg_get_gdk_scale): Remove.
(xg_get_default_scrollbar_height)
(xg_get_default_scrollbar_width): Pass in a frame to check for
scaling.
(xg_frame_set_char_size): Use the API for querying scale
instead of looking at the GDK_SCALE variable.
(xg_get_default_scrollbar_width): Ditto.
(xg_get_default_scrollbar_height): Ditto.
(xg_update_scrollbar_pos): Ditto.

* src/xfns.c (x_set_scroll_bar_default_height): Pass in the
frame to get the width.

7 years agoGet positions of menus and tooltips right on HiDPI
Lars Ingebrigtsen [Sun, 16 Jul 2017 14:42:26 +0000 (16:42 +0200)]
Get positions of menus and tooltips right on HiDPI

* src/gtkutil.c (xg_get_scale): New function.
(xg_show_tooltip): Use it.

* src/xmenu.c (create_and_show_popup_menu): Put menus in the
right place.

7 years ago; * doc/emacs/dired.texi (Subdirectory Motion): Fix a typo. (Bug#27727)
Eli Zaretskii [Mon, 17 Jul 2017 14:58:12 +0000 (17:58 +0300)]
; * doc/emacs/dired.texi (Subdirectory Motion): Fix a typo. (Bug#27727)

7 years agoAllow user control on what starts and ends a paragraph for bidi
Eli Zaretskii [Mon, 17 Jul 2017 14:50:37 +0000 (17:50 +0300)]
Allow user control on what starts and ends a paragraph for bidi

* src/buffer.h (struct buffer): New members
bidi_paragraph_separate_re_ and bidi_paragraph_start_re_.
* src/buffer.c (bset_bidi_paragraph_start_re)
(bset_bidi_paragraph_separate_re): New setters/
(Fbuffer_swap_text): Swap the values of bidi-paragraph-start-re and
bidi-paragraph-separate-re.
(init_buffer_once): Init the values of bidi-paragraph-start-re and
bidi-paragraph-separate-re.
(syms_of_buffer) <bidi-paragraph-start-re, bidi-paragraph-separate-re>:
New per-buffer variables.
* src/bidi.c (bidi_at_paragraph_end, bidi_find_paragraph_start):
Support bidi-paragraph-start-re and bidi-paragraph-separate-re.
(bidi_move_to_visually_next): Handle correctly the case when the
separator matches an empty string.  (Bug#27526)

* doc/emacs/mule.texi (Bidirectional Editing):
* doc/lispref/display.texi (Bidirectional Display): Document
bidi-paragraph-start-re and bidi-paragraph-separate-re.

* etc/NEWS: Mention bidi-paragraph-start-re and
bidi-paragraph-separate-re.

7 years ago* lisp/emacs-lisp/map.el (map-put): Fix redundancy in docstring.
Tino Calancha [Mon, 17 Jul 2017 13:01:17 +0000 (22:01 +0900)]
* lisp/emacs-lisp/map.el (map-put): Fix redundancy in docstring.

7 years agoalist-get: Add optional arg TESTFN
Tino Calancha [Mon, 17 Jul 2017 12:30:50 +0000 (21:30 +0900)]
alist-get: Add optional arg TESTFN

If TESTFN is non-nil, then it is the predicate to lookup
the alist.  Otherwise, use 'eq' (Bug#27584).
* lisp/subr.el (alist-get): Add optional arg FULL.
* lisp/emacs-lisp/map.el (map-elt, map-put): Add optional arg TESTFN.
* lisp/emacs-lisp/gv.el (alist-get): Update expander.
* doc/lispref/lists.texi (Association Lists): Update manual.
* etc/NEWS: Announce the changes.
* test/lisp/emacs-lisp/map-tests.el (test-map-put-testfn-alist)
(test-map-elt-testfn): New tests.

7 years agoFix `tramp-test39-unload'
Michael Albinus [Mon, 17 Jul 2017 12:12:20 +0000 (14:12 +0200)]
Fix `tramp-test39-unload'

* test/lisp/net/tramp-tests.el (tramp--test-instrument-test-case-p)
(tramp--test-instrument-test-case): Rename.  Adapt all callees.
(tramp-test36-asynchronous-requests): Bind `timer-max-repeats'.
(tramp-test39-unload): Expect it to pass.  Ignore buffer-local
variables and autoload functions; they are not removed.  Check
also for `-function(s)'.

7 years agoPreserve point under 'dired-auto-revert-buffer' (second case)
Stephen Berman [Mon, 17 Jul 2017 09:09:07 +0000 (11:09 +0200)]
Preserve point under 'dired-auto-revert-buffer' (second case)

* lisp/dired.el (dired): Use pop-to-buffer-same-window instead
of switch-to-buffer.  This preserves Dired window point when
dired-auto-revert-buffer is non-nil.  (Bug#27243)

* test/lisp/dired-tests.el (dired-test-bug27243): New test.

7 years agoHave Fgnutls_available_p return Qnil when GNUTLS is undefined
Martin Rudalics [Mon, 17 Jul 2017 07:00:55 +0000 (09:00 +0200)]
Have Fgnutls_available_p return Qnil when GNUTLS is undefined

* src/gnutls.c (Fgnutls_available_p): Return Qnil when GNUTLS is
undefined to allow --with-gnutls=no builds to proceed.

7 years ago* src/gnutls.c: Restore some comments.
Paul Eggert [Mon, 17 Jul 2017 00:27:03 +0000 (17:27 -0700)]
* src/gnutls.c: Restore some comments.

7 years agoUse memset, not bzero
Paul Eggert [Sun, 16 Jul 2017 23:22:33 +0000 (16:22 -0700)]
Use memset, not bzero

* src/ftcrfont.c (ftcrfont_glyph_extents): Use memset instead
of the (less-portable) bzero.

7 years agoUse explicit_bzero to clear GnuTLS keys
Paul Eggert [Sun, 16 Jul 2017 23:22:33 +0000 (16:22 -0700)]
Use explicit_bzero to clear GnuTLS keys

* admin/merge-gnulib (GNULIB_MODULES): Add explicit_bzero.
* lib/explicit_bzero.c, m4/explicit_bzero.m4: New files.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/gnutls.c (clear_storage): New function.
(gnutls_symmetric_aead): Use it instead of memset.

7 years agoMerge from gnulib
Paul Eggert [Sun, 16 Jul 2017 23:22:33 +0000 (16:22 -0700)]
Merge from gnulib

This incorporates:
2017-07-16 explicit_bzero: new module
2017-07-15 getdtablesize: Add minimal support for OpenVMS.
* lib/getdtablesize.c, lib/string.in.h, m4/getdtablesize.m4:
* m4/string_h.m4:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.

7 years agoFix vc-src-dir-status-files
Dieter Deyke [Sun, 16 Jul 2017 23:08:30 +0000 (02:08 +0300)]
Fix vc-src-dir-status-files

* lisp/vc/vc-src.el (vc-src-dir-status-files): Fix broken
copy-paste from b1a765b3 (bug#27641).

7 years agoFix mismatched parens
Wilfred Hughes [Sun, 16 Jul 2017 17:32:25 +0000 (18:32 +0100)]
Fix mismatched parens

* etc/NEWS.21: Remove excess parenthesis in code example

7 years agoAdd missing declare-function for new function
Alan Third [Sun, 16 Jul 2017 09:49:47 +0000 (10:49 +0100)]
Add missing declare-function for new function

* lisp/frame.el: Add declare function for
ns-mouse-absolute-pixel-position.

7 years agoRealgud for tango themes
R. Bernstein [Sun, 16 Jul 2017 07:51:28 +0000 (03:51 -0400)]
Realgud for tango themes

7 years agoFix test when running from test/lisp/subr-tests.elc
Noam Postavsky [Sat, 15 Jul 2017 16:12:17 +0000 (12:12 -0400)]
Fix test when running from test/lisp/subr-tests.elc

* test/lisp/subr-tests.el (subr-test-backtrace-simple-tests): Don't
assume a lambda expression will be `equal' to its quoted form.  That's
not true if the lambda expression has been compiled.

7 years agoFix some frame handling issues on NS
Alan Third [Sat, 15 Jul 2017 20:57:18 +0000 (21:57 +0100)]
Fix some frame handling issues on NS

* lisp/frame.el (mouse-absolute-pixel-position): Use new NS function.
* src/nsfns.m (Sns_mouse_absolute_pixel_position): New function.
* src/nsterm.m (x_make_frame_visible): Re-establish parent-child
relationship if it's broken.

7 years agols-lisp: Fix file size format
Tino Calancha [Sat, 15 Jul 2017 15:30:56 +0000 (00:30 +0900)]
ls-lisp: Fix file size format

* lisp/ls-lisp.el (ls-lisp-filesize-d-fmt, ls-lisp-filesize-f-fmt)
(ls-lisp-filesize-b-fmt): Add space in front (Bug#27693).
* test/lisp/dired-tests.el (dired-test-bug27693): Add test.

7 years agoAvoid link errors with older versions of GnuTLS
Eli Zaretskii [Sat, 15 Jul 2017 13:54:12 +0000 (16:54 +0300)]
Avoid link errors with older versions of GnuTLS

* src/gnutls.c (Fgnutls_ciphers, gnutls_symmetric_aead)
(Fgnutls_macs, Fgnutls_digests): Conditionally compile code that
calls GnuTLS functions which might be unavailable in older
versions of GnuTLS.

7 years agoImprove comments in faces.el
Eli Zaretskii [Sat, 15 Jul 2017 12:34:03 +0000 (15:34 +0300)]
Improve comments in faces.el

* lisp/faces.el (face-font-family-alternatives): Improve
commentary.

7 years agoImprove some GnuTL error messages
Eli Zaretskii [Sat, 15 Jul 2017 11:41:44 +0000 (14:41 +0300)]
Improve some GnuTL error messages

* src/gnutls.c (gnutls_symmetric_aead, gnutls_symmetric):
* src/fns.c (Fsecure_hash_algorithms): Fix error messages.

7 years agoFix the Elisp manual wrt GnuTL cryptography
Eli Zaretskii [Sat, 15 Jul 2017 11:28:43 +0000 (14:28 +0300)]
Fix the Elisp manual wrt GnuTL cryptography

* doc/lispref/elisp.texi (Top): Update the master menu.
* doc/lispref/text.texi (GnuTLS Cryptography): Add a @menu, to
avoid errors in makeinfo.

7 years agoFix compilation of gnutls.c with older GnuTLS
Eli Zaretskii [Sat, 15 Jul 2017 11:03:44 +0000 (14:03 +0300)]
Fix compilation of gnutls.c with older GnuTLS

* src/gnutrls.c (syms_of_gnutls): Condition some defsubr's
on HAVE_GNUTLS3, to avoid compilation errors when GnuTLS
v3.X is not available.  Reported by Colin Baxter <m43cap@yandex.com>.

7 years agoRealgud for two more light themes
rocky [Sat, 15 Jul 2017 09:23:43 +0000 (05:23 -0400)]
Realgud for two more light themes

7 years agoRearrange MS-Windows code that dynamically loads GnuTLS functions
Eli Zaretskii [Sat, 15 Jul 2017 08:33:22 +0000 (11:33 +0300)]
Rearrange MS-Windows code that dynamically loads GnuTLS functions

* src/gnutls.c [WINDOWSNT]: Reorganize definitions and loading
of functions using the same preprocessing directives as in the code.

7 years agoFix the MS-Windows build broken in gnutls.c
Eli Zaretskii [Sat, 15 Jul 2017 07:43:38 +0000 (10:43 +0300)]
Fix the MS-Windows build broken in gnutls.c

* src/gnutls.c (Fgnutls_available_p) [WINDOWSNT]: Move the DLL
loading code to after 'capabilities' has been calculated.  Remove
redundant comments.

7 years agosrc/image.c (compute_image_size): Remove superfluous checks.
Lars Ingebrigtsen [Sat, 15 Jul 2017 01:21:07 +0000 (03:21 +0200)]
src/image.c (compute_image_size): Remove superfluous checks.

* src/image.c (compute_image_size): Remove superfluous checks.

7 years agoMake combinations of :width/:max-height image specs work reliably
Lars Ingebrigtsen [Sat, 15 Jul 2017 00:45:19 +0000 (02:45 +0200)]
Make combinations of :width/:max-height image specs work reliably

* doc/lispref/display.texi (ImageMagick Images): Document
:width/:max-height combinations (etc) (bug #25583).

* src/image.c (compute_image_size): Handle :width/:max-height
(etc) combinations consistently (by letting "max" win and
preserve ratio).

* test/manual/image-size-tests.el (image-size-tests): Add
tests for :width/:max-height (etc) combinations.

7 years agoFix recent theme changes
Glenn Morris [Fri, 14 Jul 2017 23:46:44 +0000 (19:46 -0400)]
Fix recent theme changes

* etc/themes/manoj-dark-theme.el, etc/themes/tsdh-dark-theme.el:
Fix typos in recent changes.

7 years agoGnuTLS integer-overflow and style fixes
Paul Eggert [Fri, 14 Jul 2017 23:18:37 +0000 (16:18 -0700)]
GnuTLS integer-overflow and style fixes

This tweaks the recently-added GnuTLS improvements so that
they avoid some integer-overflow problems and follow typical
Emacs style a bit better.
* configure.ac (HAVE_GNUTLS3_HMAC, HAVE_GNUTLS3_AEAD)
(HAVE_GNUTLS3_CIPHER): Use AC_CACHE_CHECK so that the
configure-time results are displayed.
* src/fns.c (extract_data_from_object): Return char *, not char
const *, since one gnutls caller wants a non-const pointer.  Use
CONSP rather than !NILP when testing for conses.  Use CAR_SAFE
instead of rolling our own code.  Prefer signed types to unsigned
when either will do.  Report problems for lengths out of range,
instead of silently mishandling them.
* src/gnutls.c (emacs_gnutls_strerror): New function, to simplify
callers.  All callers of gnutls_sterror changed.
(Fgnutls_boot): Check for integers out of range rather than
silently truncating them.
(gnutls_symmetric_aead): Check for integer overflow in size
calculations.
(gnutls_symmetric_aead, Fgnutls_macs, Fgnutls_digests):
Prefer signed to unsigned integers where either will do.
(gnutls_symmetric_aead, gnutls_symmetric):
Work even if ptrdiff_t is wider than ‘long’.
(gnutls_symmetric, Fgnutls_hash_mac, Fgnutls_hash_digest):
Check for integer overflow in algorithm selection.

7 years ago* .gitlab-ci.yml: Don't install a C++ compiler. Suppress apt interaction.
Noam Postavsky [Sun, 4 Jun 2017 03:57:26 +0000 (23:57 -0400)]
* .gitlab-ci.yml: Don't install a C++ compiler.  Suppress apt interaction.

7 years agoFix the MS-Windows build due to added GnuTLS functions
Eli Zaretskii [Fri, 14 Jul 2017 19:00:55 +0000 (22:00 +0300)]
Fix the MS-Windows build due to added GnuTLS functions

* src/gnutls.c [WINDOWSNT]: Add DEF_DLL_FN for new functions.
(init_gnutls_functions) [WINDOWSNT]: Add LOAD_DLL_FN for new
functions.  Add #define redirections for new functions.
(gnutls_symmetric_aead): Fix format specs to be more portable when
printing ptrdiff_t arguments.
* src/fns.c (gnutls_rnd) [WINDOWSNT]: Redirect to w32_gnutls_rnd
wrapper.
* src/gnutls.h [WINDOWSNT]: Add prototype for w32_gnutls_rnd.

* test/lisp/net/gnutls-tests.el (gnutls-tests-tested-macs)
(gnutls-tests-tested-digests, gnutls-tests-tested-ciphers): Call
gnutls-available-p, otherwise GnuTLS functions might not be loaded
from the DLL on MS-Windows.

7 years ago; Standardize license notices in new files
Glenn Morris [Fri, 14 Jul 2017 17:26:04 +0000 (10:26 -0700)]
; Standardize license notices in new files

7 years ago* lisp/emacs-lisp/bytecomp.el: Fix bug#14860.
Stefan Monnier [Fri, 14 Jul 2017 15:27:21 +0000 (11:27 -0400)]
* lisp/emacs-lisp/bytecomp.el: Fix bug#14860.

* lisp/emacs-lisp/bytecomp.el (byte-compile--function-signature): New fun.
Dig into advice wrappers to find the "real" signature.
(byte-compile-callargs-warn, byte-compile-arglist-warn): Use it.
(byte-compile-arglist-signature): Don't bother with "new-style" arglists,
since bytecode functions are now handled in byte-compile--function-signature.

* lisp/files.el (create-file-buffer, insert-directory):
Remove workaround introduced for (bug#14860).

* lisp/help-fns.el (help-fns--analyse-function): `nadvice` is preloaded.

* lisp/help.el (help-function-arglist):
Dig into advice wrappers to find the "real" signature.

7 years agoGnuTLS HMAC and symmetric cipher support
Ted Zlatanov [Fri, 14 Jul 2017 15:04:19 +0000 (11:04 -0400)]
GnuTLS HMAC and symmetric cipher support

    * etc/NEWS: Add news for new feature.

    * doc/lispref/text.texi (GnuTLS Cryptography): Add
    documentation.

    * configure.ac: Add macros HAVE_GNUTLS3_DIGEST,
    HAVE_GNUTLS3_CIPHER, HAVE_GNUTLS3_AEAD, HAVE_GNUTLS3_HMAC.

    * src/fns.c (Fsecure_hash_algorithms): Add function to list
    supported `secure-hash' algorithms.
    (extract_data_from_object): Add data extraction function that
    can operate on buffers and strings.
    (secure_hash): Use it.
    (Fsecure_hash): Mention `secure-hash-algorithms'.

    * src/gnutls.h: Include gnutls/crypto.h.

    * src/gnutls.c (Fgnutls_ciphers, gnutls_symmetric_aead)
    (gnutls_symmetric, Fgnutls_symmetric_encrypt, Fgnutls_symmetric_decrypt)
    (Fgnutls_macs, Fgnutls_digests, Fgnutls_hash_mac, Fgnutls_hash_digest)
    (Fgnutls_available_p): Implement GnuTLS cryptographic integration.

    * test/lisp/net/gnutls-tests.el: Add tests.

7 years ago* lisp/emacs-lisp/cl-lib.el (cl--random-time): Remove as well
Stefan Monnier [Fri, 14 Jul 2017 14:29:10 +0000 (10:29 -0400)]
* lisp/emacs-lisp/cl-lib.el (cl--random-time): Remove as well

It's also defined in cl-extra.el.

7 years agoDo not convert ij and IJ to compatibility chars
Paul Eggert [Fri, 14 Jul 2017 13:19:39 +0000 (06:19 -0700)]
Do not convert ij and IJ to compatibility chars

* lisp/leim/quail/latin-alt.el: Omit lines for ij and IJ in Dutch.
Problem reported by James Cloos (Bug#518#10).

7 years agoRemove Turkish ligatures from Dutch input method
Toon Claes [Fri, 14 Jul 2017 12:53:14 +0000 (05:53 -0700)]
Remove Turkish ligatures from Dutch input method

* lisp/leim/quail/latin-alt.el: Remove Turkish ligatures (Bug#518).

7 years agoImprove stack-overflow heuristic on GNU/Linux
Paul Eggert [Fri, 14 Jul 2017 11:54:05 +0000 (04:54 -0700)]
Improve stack-overflow heuristic on GNU/Linux

Problem reported by Steve Kemp (Bug#27585).
* src/eval.c (near_C_stack_top): Remove.  All uses replaced
by current_thread->stack_top.
(record_in_backtrace): Set current_thread->stack_top.
This is for when the Lisp interpreter calls itself.
* src/lread.c (read1): Set current_thread->stack_top.
This is for recursive s-expression reads.
* src/print.c (print_object): Set current_thread->stack_top.
This is for recursive s-expression printing.
* src/thread.c (mark_one_thread): Get stack top first.
* src/thread.h (struct thread_state.stack_top): Now void *, not char *.