]> git.eshelyaron.com Git - emacs.git/log
emacs.git
6 years agoRemove nnselect-artlist variable in nnselect
Andrew G Cohen [Sun, 18 Mar 2018 01:11:04 +0000 (09:11 +0800)]
Remove nnselect-artlist variable in nnselect

This fixes a bug which causes the group info to get out of sync.

* lisp/gnus/nnselect.el (nnselect-add-prefix): New macro.
  (nnselect-get-artlist): New macro.
  (nnselect-possibly-change-group): Delete.
  (nnselect-request-group, nnselect-retrieve-headers,
  nnselect-request-update-info, nnselect-close-group): Remove
  nnselect-artlist variable and update with new macros.
  (nnselect-request-update-info): Use memq instead of member for speed.

6 years agoAllow automatic scanning of nnselect groups
Andrew G Cohen [Mon, 5 Mar 2018 20:57:22 +0000 (04:57 +0800)]
Allow automatic scanning of nnselect groups

* lisp/gnus/gnus-start.el (gnus-read-active-for-groups): Scan when
  activating virtual groups.

* lisp/gnus/nnselect.el (nnselect-request-group): Rescan only if no
  artlist is present.
  (nnselect-request-group-scan): New function to rescan a group.
  (nnselect-request-scan): If called with a group arg rescan that
  group.

6 years ago* lisp/gnus/nnir.el (nnir-make-specs): Use the current buffer.
Andrew G Cohen [Wed, 17 May 2017 02:39:57 +0000 (10:39 +0800)]
* lisp/gnus/nnir.el (nnir-make-specs): Use the current buffer.

6 years ago* lisp/gnus/gnus-srvr.el (gnus-server-mode-map): Use ephemeral group
Andrew G Cohen [Mon, 15 May 2017 02:45:45 +0000 (10:45 +0800)]
* lisp/gnus/gnus-srvr.el (gnus-server-mode-map): Use ephemeral group

6 years agoImprove search and select group creation
Andrew G Cohen [Sat, 13 May 2017 07:05:27 +0000 (15:05 +0800)]
Improve search and select group creation

* lisp/gnus/gnus-group.el (gnus-group-make-search-group): Make sure
new group is inserted into the group buffer.
* lisp/gnus/nnselect.el (nnselect-request-create-group): Improve input
of selection function.

6 years agoRedo entry functions for making search groups
Andrew G Cohen [Fri, 12 May 2017 01:40:03 +0000 (09:40 +0800)]
Redo entry functions for making search groups

* lisp/gnus/gnus-group.el (gnus-group-make-search-group):
(gnus-group-read-ephemeral-search-group): Rename these functions to be
more consistent with other group creation functions, and move to
gnus-group.el.
* lisp/gnus/nnir.el (nnir-make-specs): Refactor new function to ease
search group creation.

6 years agoInline nnselect helper macros
Andrew G Cohen [Thu, 11 May 2017 02:36:40 +0000 (10:36 +0800)]
Inline nnselect helper macros

* lisp/gnus/gnus-registry.el (gnus-nnselect-group-p):
* lisp/gnus/gnus-sum.el (nnselect-article-rsv): Silence byte-compiler.
* lisp/gnus/nnselect.el (nnselect-group-server): New function.
(nnselect-artlist-length):
(nnselect-artlist-article):
(nnselect-artitem-group):
(nnselect-artitem-number):
(nnselect-artitem-rsv):
(nnselect-article-group):
(nnselect-article-number):
(nnselect-article-rsv):
(nnselect-article-id):
(nnselect-categorize):
(ids-by-group):
(numbers-by-group): Inline for speed.

6 years ago* lisp/gnus/nnselect.el (nnselect-request-rename-group): Allow it.
Andrew G Cohen [Thu, 11 May 2017 01:53:04 +0000 (09:53 +0800)]
* lisp/gnus/nnselect.el (nnselect-request-rename-group): Allow it.

6 years ago* lisp/gnus/nnselect.el (nnselect-request-group): Don't close group.
Andrew G Cohen [Thu, 11 May 2017 01:51:40 +0000 (09:51 +0800)]
* lisp/gnus/nnselect.el (nnselect-request-group): Don't close group.

6 years ago* lisp/gnus/nnselect.el (nnselect-server-opened): Just return t.
Andrew G Cohen [Thu, 11 May 2017 01:49:37 +0000 (09:49 +0800)]
* lisp/gnus/nnselect.el (nnselect-server-opened): Just return t.

6 years agoRestore accidentally remove gnus-summary-make-search-group
Andrew G Cohen [Tue, 9 May 2017 02:13:50 +0000 (10:13 +0800)]
Restore accidentally remove gnus-summary-make-search-group

* lisp/gnus/nnselect.el (gnus-summary-make-search-group): Restore the
function that was removed in a fit of overzealousness.

6 years agoImprove nnselect-request-article
Andrew G Cohen [Tue, 9 May 2017 02:11:47 +0000 (10:11 +0800)]
Improve nnselect-request-article

* lisp/gnus/nnselect.el (nnselect-request-article): Recode the
selection of the article server.
(nnselect-request-thread): Spelling.

6 years agoImprove group-info handling in nnselect
Andrew G Cohen [Tue, 9 May 2017 02:08:55 +0000 (10:08 +0800)]
Improve group-info handling in nnselect

* lisp/gnus/nnselect.el (nnselect-request-group):
(nnselect-push-info): Use info argument to functions or retrieve the
group info. If the info is null (for example the group might have been
killed) don't try to update it.

6 years agoRemove unnecessary listing in nnselect-categorize
Andrew G Cohen [Mon, 8 May 2017 23:51:56 +0000 (07:51 +0800)]
Remove unnecessary listing in nnselect-categorize

* lisp/gnus/nnselect.el (nnselect-categorize): Remove unneeded extra
list around a category value.
(nnselect-retrieve-headers):
(nnselect-request-expire-articles):
(nnselect-request-set-mark):
(nnselect-request-update-info):
(nnselect-request-thread):
(nnselect-push-info):
(gnus-group-make-permanent-search-group): Accommodate change to
nnselect-categorize.
* lisp/gnus/nnir.el (nnir-run-query): Accommodate change to
nnselect-categorize.

6 years agoUse gnus-newsgroup-selection instead of nnselect-artlist
Andrew G Cohen [Mon, 8 May 2017 23:44:19 +0000 (07:44 +0800)]
Use gnus-newsgroup-selection instead of nnselect-artlist

* lisp/gnus/nnselect.el (nnselect-retrieve-headers):
(nnselect-request-thread):
(nnselect-retrieve-headers):
(nnselect-close-group): Use the summary local variable
gnus-newsgroup-selection rather than the internal nnselect-artlist
variable.
(nnselect-request-group):
(nnselect-request-move-article):
(nnselect-request-expire-articles):
(nnselect-warp-to-article):
(nnselect-request-set-mark):
(nnselect-request-thread): Don't unnecessarily retrieve the
nnselect-artlist value.

6 years agoFix pushing marks on nnselect exit
Andrew G Cohen [Sat, 6 May 2017 13:24:37 +0000 (21:24 +0800)]
Fix pushing marks on nnselect exit

* lisp/gnus/nnselect.el (nnselect-push-info): Deal with scoring.
Ensure that mark lists are properly compressed before saving. Add only
the group-specific articles to the `seen' lists.

6 years agoNew gnus summary sorting functions on rsv
Andrew G Cohen [Sat, 6 May 2017 08:11:58 +0000 (16:11 +0800)]
New gnus summary sorting functions on rsv

* lisp/gnus/gnus-sum.el (gnus-article-sort-by-rsv):
(gnus-thread-sort-by-rsv): New functions to allow sorting by rsv in
nnselect groups.

6 years agoRemove obsolete variable nnselect-summary-line-format
Andrew G Cohen [Thu, 4 May 2017 06:34:42 +0000 (14:34 +0800)]
Remove obsolete variable nnselect-summary-line-format

* lisp/gnus/nnselect.el (nnselect-summary-line-format): This variable
is no longer needed.

6 years agoUse fetch-old-headers group parameter in nnselect
Andrew G Cohen [Tue, 2 May 2017 02:33:59 +0000 (10:33 +0800)]
Use fetch-old-headers group parameter in nnselect

* lisp/gnus/nnselect.el (nnselect-retrieve-headers): Use
gnus-fetch-old-headers parameter for original article group.

6 years agoDisable nnselect-server-opened check
Andrew G Cohen [Sat, 29 Apr 2017 02:03:11 +0000 (10:03 +0800)]
Disable nnselect-server-opened check

* lisp/gnus/nnselect.el (nnselect-server-opened): Always return t for
now. This is disabled for testing purposes.
(nnselect-possibly-change-group): Eliminate unnecessary test for
server openness.

6 years agoImprove nnselect-request-article
Andrew G Cohen [Sat, 29 Apr 2017 01:50:20 +0000 (09:50 +0800)]
Improve nnselect-request-article

* lisp/gnus/nnselect.el (nnselect-request-article): Rework to prepare
for universal search language.
(nnselect-request-thread): Remove duplicate declare-function.

6 years agoRemove unnecessary check gnus-nnselect-group-p
Andrew G Cohen [Fri, 28 Apr 2017 23:49:39 +0000 (07:49 +0800)]
Remove unnecessary check gnus-nnselect-group-p

* lisp/gnus/gnus-msg.el (gnus-setup-message):
* lisp/gnus/gnus-sum.el (gnus-summary-line-format-alist): No need to
check that we are coming from an nnselect group now that we use
gnus-newsgroup-selection.

6 years agoDon't stomp on local variables in gnus-msg
Andrew G Cohen [Fri, 28 Apr 2017 23:43:54 +0000 (07:43 +0800)]
Don't stomp on local variables in gnus-msg

* lisp/gnus/gnus-msg.el (gnus-setup-message):
(gnus-msg-mail):
(gnus-group-mail):
(gnus-group-post-news):
(gnus-summary-news-other-window):
(gnus-summary-post-news): Use let rather than setq for temporary
overriding of gnus-newsgroup-name.

6 years agoIntroduce summary-local variable gnus-newsgroup-selection
Andrew G Cohen [Thu, 27 Apr 2017 07:15:24 +0000 (15:15 +0800)]
Introduce summary-local variable gnus-newsgroup-selection

* lisp/gnus/gnus-sum.el (gnus-newsgroup-selection): Introduce a new
gnus-summary-local-variable to hold an nnselect article list.
* lisp/gnus/nnselect.el: Use the summary-local variable where
appropriate.

6 years agoRestore article retrieval by message-id in nnselect
Andrew G Cohen [Tue, 25 Apr 2017 05:10:41 +0000 (13:10 +0800)]
Restore article retrieval by message-id in nnselect

* lisp/gnus/nnselect.el (nnselect-request-article): If passed a
message-id attempt to find an article by searching.

; Silence byte-compiler

* lisp/gnus/nnselect.el (nnir-run-query): declare-function to silence
byte-compiler.

6 years agoRestore article retrieval by message-id in nnselect
Andrew G Cohen [Tue, 25 Apr 2017 05:10:41 +0000 (13:10 +0800)]
Restore article retrieval by message-id in nnselect

* lisp/gnus/nnselect.el (nnselect-request-article): If passed a
message-id attempt to find an article by searching.

6 years agoFix requesting sparse articles in gnus
Andrew G Cohen [Tue, 25 Apr 2017 05:13:10 +0000 (13:13 +0800)]
Fix requesting sparse articles in gnus

* lisp/gnus/gnus-art.el (gnus-request-article-this-buffer): Delete the
sparse article number from the list, not its id.

6 years agoTemporary function to ease search group creation
Andrew G Cohen [Tue, 25 Apr 2017 01:55:36 +0000 (09:55 +0800)]
Temporary function to ease search group creation

* lisp/gnus/nnselect.el (gnus-group-make-permanent-search-group):
(gnus-group-make-search-group): Allow permanent group creation.
* lisp/gnus/gnus-group.el (gnus-group-group-map): Bind it to "G g" in
the group buffer.

6 years ago; Clean up parameter input for nnselect groups
Andrew G Cohen [Mon, 24 Apr 2017 02:53:07 +0000 (10:53 +0800)]
; Clean up parameter input for nnselect groups

* lisp/gnus/nnselect.el (nnselect-request-create-group): Better
argument parsing.

6 years ago; Silence byte-compiler
Andrew G Cohen [Sun, 23 Apr 2017 12:08:29 +0000 (20:08 +0800)]
; Silence byte-compiler

* lisp/gnus/nnir.el: Require gnus.
(gnus-request-list): Autoload.
* lisp/gnus/nnselect.el: Require gnus-art.
(nnselect-request-set-mark): Use cl-destructuring-bind.
(nnir-run-query): Declare function.
(nnselect-request-thread): Use cl-incf.
(nnselect-push-info): Use cl-decf.

6 years agoInitial landing of gnus nnselect backend
Andrew G Cohen [Sun, 23 Apr 2017 10:35:04 +0000 (18:35 +0800)]
Initial landing of gnus nnselect backend

This is a new virtual backend for gnus, wherein any collection of
articles can be viewed as a gnus group (permanent or ephemeral).

* lisp/gnus/nnselect.el: New file.
* lisp/gnus/nnir.el: Remove the nnir backend but leave the search
functions.
* lisp/gnus/nnimap.el: Replace nnir backend related items with
nnselect.
(gnus-refer-thread-use-search): Renamed from gnus-refer-thread-use-nnir
(nnselect-search-thread): New function.
(nnimap-request-thread): Use it.
* lisp/gnus/gnus-group.el (gnus-group-make-search-group): New function
replacing gnus-group-make-nnir-group.
* lisp/gnus/gnus-msg.el: Replace nnir backend related items with
nnselect.
(gnus-setup-message): Pass virtual group article number to
gnus-inews-add-send-actions.
* lisp/gnus/gnus-registry.el (gnus-registry-action): Find the
originating article group when in an nnselect group.
(gnus-registry-ignore-group-p): Ignore virtual groups.
* lisp/gnus/gnus-srvr.el (gnus-group-make-search-group): Use new
function.
* lisp/gnus/gnus-sum.el (nnselect-article-): Use new nnselect backend
functions.
(gnus-summary-line-format-alist): Rework specs specific to nnselect
groups.
(nnselect-artlist):
(gnus-summary-local-variables): A new group-local variable.

6 years ago* make-dist: Improve no-byte-compile check.
Glenn Morris [Fri, 14 Dec 2018 20:41:17 +0000 (15:41 -0500)]
* make-dist: Improve no-byte-compile check.

6 years ago* make-dist: Improve tempfile handling.
Glenn Morris [Fri, 14 Dec 2018 20:40:15 +0000 (15:40 -0500)]
* make-dist: Improve tempfile handling.

Prompted by /tmp/out existing and being owned by another user.

6 years ago* make-dist: Silence test of tar functionality.
Glenn Morris [Fri, 14 Dec 2018 19:57:11 +0000 (14:57 -0500)]
* make-dist: Silence test of tar functionality.

6 years ago* lisp/emacs-lisp/map.el: Fix recent changes
Basil L. Contovounesios [Fri, 14 Dec 2018 14:46:47 +0000 (14:46 +0000)]
* lisp/emacs-lisp/map.el: Fix recent changes

(map-empty-p): Add method for lists which avoids computing their
entire length.
(map-contains-key): Check for alist membership by comparing against
DEFAULT argument returned by alist-get.
(map-put!): Reconcile argument name with that used in docstring.

6 years ago* test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27844): Remove debug.
Glenn Morris [Fri, 14 Dec 2018 02:02:15 +0000 (21:02 -0500)]
* test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27844): Remove debug.

6 years agoGet long package description for installed packages from installed files
Stephen Leake [Thu, 13 Dec 2018 22:45:05 +0000 (14:45 -0800)]
Get long package description for installed packages from installed files

* doc/lispref/package.texi (Archive Web Server): New; document web
server interface.

* lisp/emacs-lisp/package.el (package--get-description): New; get long
description from installed files.
(describe-package-1): Use it, improve comments. No longer writing
NAME-readme.txt.

* test/lisp/emacs-lisp/package-tests.el:
(package-test-describe-package): There is now a description for an
installed package.
(package-test-describe-installed-multi-file-package): New test.

6 years agoMerge commit 'd08b75abe0f0cf9ade812b189c374809a2c7836e'
Stephen Leake [Thu, 13 Dec 2018 22:39:02 +0000 (14:39 -0800)]
Merge commit 'd08b75abe0f0cf9ade812b189c374809a2c7836e'

6 years agoFix stray CHECK_FIXNUM_COERCE_MARKER
Paul Eggert [Thu, 13 Dec 2018 21:03:54 +0000 (13:03 -0800)]
Fix stray CHECK_FIXNUM_COERCE_MARKER

* src/xdisp.c (Fbidi_resolved_levels): Don’t allow a marker arg;
markers are character positions not vertical positions.

6 years ago* test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27844): Add debug.
Glenn Morris [Thu, 13 Dec 2018 18:41:19 +0000 (13:41 -0500)]
* test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27844): Add debug.

6 years ago* doc/misc/tramp.texi (Ad-hoc multi-hops): Reinsert lost line.
Michael Albinus [Thu, 13 Dec 2018 13:19:22 +0000 (14:19 +0100)]
* doc/misc/tramp.texi (Ad-hoc multi-hops): Reinsert lost line.

6 years agoAllow per-diagnostic overlay properties in Flymake
João Távora [Thu, 13 Dec 2018 00:09:01 +0000 (00:09 +0000)]
Allow per-diagnostic overlay properties in Flymake

* lisp/progmodes/flymake.el (Version): Bump to 1.0.3.
(flymake--diag): Add new field overlay-properties.
(flymake-make-diagnostic): New optional arg overlay-properties.
(flymake--highlight-line): Use it.

6 years ago* lisp/vc/vc.el (vc-find-revision-no-save): Use decode-coding-inserted-region
Juri Linkov [Wed, 12 Dec 2018 23:17:05 +0000 (01:17 +0200)]
* lisp/vc/vc.el (vc-find-revision-no-save): Use decode-coding-inserted-region

and after-insert-file-set-coding.  Don't let-bind coding-system-for-read
and coding-system-for-write.  For non-interactive use, let-bind
enable-local-variables to :safe and ignore errors from set-auto-mode call.
(Bug#33567)

6 years agoImprove em-ls-test-bug27844
Glenn Morris [Wed, 12 Dec 2018 22:01:06 +0000 (17:01 -0500)]
Improve em-ls-test-bug27844

* test/lisp/eshell/em-ls-tests.el (em-ls-test-bug27844):
Skip if source-directory absent.

6 years agoSimplify validate_interval_range and callers
Paul Eggert [Wed, 12 Dec 2018 17:54:42 +0000 (09:54 -0800)]
Simplify validate_interval_range and callers

* src/textprop.c (validate_interval_range):
Remove useless code.  Fix comment to match current behavior.
(set_text_properties, copy_text_properties): Simplify, as
validate_interval_range has not incremented START or END for
quite some time.
(copy_text_properties): Assume C99.  Fix an unlikely
integer overflow bug if WIDE_EMACS_INT.

6 years agoset_text_properties_1 can assume START <= END
Paul Eggert [Wed, 12 Dec 2018 17:54:42 +0000 (09:54 -0800)]
set_text_properties_1 can assume START <= END

* src/textprop.c (set_text_properties_1):
Do not swap START and END.  All callers do that already,
and the test for swapping here is redundant.

6 years agoFix regression in expand-file-name with drive-relative HOME
Eli Zaretskii [Wed, 12 Dec 2018 16:27:05 +0000 (18:27 +0200)]
Fix regression in expand-file-name with drive-relative HOME

* src/fileio.c (get_homedir) [DOS_NT]: Expand drive-relative
$HOME to begin with "X:/".

* test/src/fileio-tests.el (fileio-tests--relative-HOME): Add
testing of drive-relative value of $HOME on MS-Windows and
MS-DOS.

6 years agoFix Bug#33568
Michael Albinus [Wed, 12 Dec 2018 09:49:59 +0000 (10:49 +0100)]
Fix Bug#33568

* test/lisp/net/secrets-tests.el (secrets-test02-collections)
(secrets-test03-items): Do not expect "login" collection to
exist.  (Bug#33568)

6 years ago* lisp/emacs-lisp/map.el: Make the functions generic
Stefan Monnier [Tue, 11 Dec 2018 22:54:13 +0000 (17:54 -0500)]
* lisp/emacs-lisp/map.el: Make the functions generic

Make them document their delegation relationship, to clarify when
a method is needed.
(map--dispatch): Give more info in the error message.
(map-elt): Make it generic and deprecate the 'testfn' arg.
(map-put): Make it obsolete.
(map-length): Make it work on hash-tables.
(map-apply): Define it in terms of map-do.
(map-do, map-into): Use cl-generic dispatch instead of map--dispatch.
(map-empty-p): Define it in terms of map-length.
(map-contains-key): Deprecate 'testfn'.  Make it return a boolean, so
it can return non-nil even if 'key' is nil.  Improve implementation to
avoid constructing an intermediate list of all keys.
(map-merge-with): Use 'eql' rather than `eq'.
(map-put!): Rename from map--put and make it generic, to replace map-put.
(map--apply-alist, map--apply-hash-table, map--apply-array):
Turn them into methods of map-apply.
(map--do-alist, map--do-array): Turn them into methods of map-do.
(map--into-hash-table): Turn it into a method of map-into.

6 years agoFix bug in display-buffer-use-some-frame
Stephen Leake [Tue, 11 Dec 2018 19:25:45 +0000 (11:25 -0800)]
Fix bug in display-buffer-use-some-frame

* lisp/window.el (display-buffer-use-some-frame): Pass 'reuse, not
'frame, to window--display-buffer.

6 years agoFix typo in 'dired-restore-positions'
Martin Rudalics [Tue, 11 Dec 2018 07:56:15 +0000 (08:56 +0100)]
Fix typo in 'dired-restore-positions'

* lisp/dired.el (dired-restore-positions): Fix typo in last
change fixing Bug#33458.

6 years agoAdd test/Makefile machinery to exclude test .el files
Glenn Morris [Tue, 11 Dec 2018 01:40:16 +0000 (20:40 -0500)]
Add test/Makefile machinery to exclude test .el files

* test/Makefile.in (EXCLUDE_TESTS): New variable.
(ELFILES): Filter out any specified exclude files.

6 years agoSupport Ruby block arguments ending with , or *
Nobuyoshi Nakada [Tue, 11 Dec 2018 01:12:46 +0000 (03:12 +0200)]
Support Ruby block arguments ending with , or *

* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token):
Recognize punctuation before "closing-|" as a separate token.
(ruby-smie--backward-token): Same (bug#33487).

* test/lisp/progmodes/ruby-mode-tests.el
(ruby-forward-sexp-jumps-do-end-block-with-no-args)
(ruby-backward-sexp-jumps-do-end-block-with-no-args)
(ruby-forward-sexp-jumps-do-end-block-with-empty-args)
(ruby-backward-sexp-jumps-do-end-block-with-empty-args)
(ruby-forward-sexp-jumps-do-end-block-with-args)
(ruby-backward-sexp-jumps-do-end-block-with-args)
(ruby-forward-sexp-jumps-do-end-block-with-any-args)
(ruby-forward-sexp-jumps-do-end-block-with-expanded-one-arg)
(ruby-forward-sexp-jumps-do-end-block-with-one-and-any-args)
(ruby-backward-sexp-jumps-do-end-block-with-one-and-any-args):
New tests.

6 years ago* lisp/isearch.el (isearch-pre-command-hook): Support `isearch-move'
Juri Linkov [Tue, 11 Dec 2018 00:36:46 +0000 (02:36 +0200)]
* lisp/isearch.el (isearch-pre-command-hook): Support `isearch-move'

command properties with values `enabled' and `disabled'
also for the value `shift' of isearch-yank-on-move.  (Bug#15839)

6 years ago* lisp/vc/vc.el (vc-root-version-diff): New command (bug#33650).
Juri Linkov [Mon, 10 Dec 2018 23:54:20 +0000 (01:54 +0200)]
* lisp/vc/vc.el (vc-root-version-diff): New command (bug#33650).

(vc-root-diff): Call it interactively on a prefix argument.

6 years agoSupport git commit --no-verify
Matthias Meulien [Tue, 4 Sep 2018 20:50:56 +0000 (22:50 +0200)]
Support git commit --no-verify

* lisp/vc/vc-git.el (vc-git-log-edit-toggle-no-verify): New function.
(vc-git-log-edit-mode-map): Add binding.
(vc-git-checkin): Add an entry for that header.

6 years agoFix bug when hashing reversed buffer regions
Paul Eggert [Mon, 10 Dec 2018 21:40:43 +0000 (13:40 -0800)]
Fix bug when hashing reversed buffer regions

* src/fns.c (extract_data_from_object): When checking
file-coding-system-alist, calculate the coding system
correctly even if START and END are out of order.
Use bool for booleans.

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 10 Dec 2018 17:43:05 +0000 (09:43 -0800)]
Merge from origin/emacs-26

2075864 (origin/emacs-26) CC Mode: stop extra parens on expression ca...

6 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 10 Dec 2018 17:43:05 +0000 (09:43 -0800)]
; Merge from origin/emacs-26

The following commit was skipped:

0220391 Fix cairo scrolling for side-by-side windows

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 10 Dec 2018 17:43:05 +0000 (09:43 -0800)]
Merge from origin/emacs-26

5a7451c CC Mode: stop wrongly recognizing "func(a * 9)" as "pointer t...
b0ed9d1 * lisp/emacs-lisp/cursor-sensor.el: Add motivation

6 years ago; Merge from origin/emacs-26
Glenn Morris [Mon, 10 Dec 2018 17:43:05 +0000 (09:43 -0800)]
; Merge from origin/emacs-26

The following commit was skipped:

ee1ebe8 Guard occur against an undefined orig-line

6 years agoMerge from origin/emacs-26
Glenn Morris [Mon, 10 Dec 2018 17:43:05 +0000 (09:43 -0800)]
Merge from origin/emacs-26

908af9d Indexing followup to recent changes
505ac9a Improve documentation of cursor-sensor.el (bug#33664)
d817d2c * doc/lispref/commands.texi (Adjusting Point): Bug#33662
18442da Tramp multi-hop methods must be inline
1e3e24d ; * src/xterm.c (x_update_begin): Fix whitespace.
1d743d2 Fix scaling problem in Cairo builds
2b9e993 ; * doc/lispref/text.texi (Special Properties): Fix wording. ...
e568202 * lisp/simple.el (next-line-or-history-element): Use current-...
c7897c2 A few further fixes of window internals description

# Conflicts:
# doc/misc/tramp.texi

6 years ago* admin/gitmerge.el (gitmerge-skip-regexp): Add yet another variant.
Glenn Morris [Mon, 10 Dec 2018 17:42:17 +0000 (12:42 -0500)]
* admin/gitmerge.el (gitmerge-skip-regexp): Add yet another variant.

6 years ago* lisp/net/tramp-compat.el (tramp-compat-flatten-list): New defun.
Michael Albinus [Mon, 10 Dec 2018 15:52:21 +0000 (16:52 +0100)]
* lisp/net/tramp-compat.el (tramp-compat-flatten-list): New defun.

6 years ago* lisp/Makefile.in (compile-main): Use a more selective regexp.
Stefan Monnier [Mon, 10 Dec 2018 15:06:34 +0000 (10:06 -0500)]
* lisp/Makefile.in (compile-main): Use a more selective regexp.

6 years agoCC Mode: stop extra parens on expression causing false fontification as type
Alan Mackenzie [Mon, 10 Dec 2018 14:30:40 +0000 (14:30 +0000)]
CC Mode: stop extra parens on expression causing false fontification as type

* lisp/progmodes/cc-fonts.el (c-get-fontification-context): recognize
arithmetic operator followed by several open parentheses, not just one, as not
being an argument list.

6 years agoFix cairo scrolling for side-by-side windows
Ari Roponen [Sun, 6 May 2018 12:29:28 +0000 (15:29 +0300)]
Fix cairo scrolling for side-by-side windows

Backport: Fixes Bug#33442.

* src/xterm.c (x_scroll_run) [USE_CAIRO]: Fix scrolling for
side-by-side split windows.  (Bug#31288)

(cherry picked from commit 6e362a32bc9d21f73a0f29ca6f45481edeea6f29)

6 years agoCC Mode: stop wrongly recognizing "func(a * 9)" as "pointer to type a"
Alan Mackenzie [Mon, 10 Dec 2018 12:12:02 +0000 (12:12 +0000)]
CC Mode: stop wrongly recognizing "func(a * 9)" as "pointer to type a"

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): When testing for an
identifier after "a *", on failure additionally check for a digit, setting a
new flag variable got-number if one is found.  In the test for CASE 18, check
this flag.

6 years ago* lisp/emacs-lisp/cursor-sensor.el: Add motivation
Stefan Monnier [Mon, 10 Dec 2018 01:56:35 +0000 (20:56 -0500)]
* lisp/emacs-lisp/cursor-sensor.el: Add motivation

6 years agoRemove CHECK_FIXNUM_CAR etc.
Paul Eggert [Mon, 10 Dec 2018 01:07:16 +0000 (17:07 -0800)]
Remove CHECK_FIXNUM_CAR etc.

* src/coding.c (CHECK_FIXNAT_CAR, CHECK_FIXNAT_CDR):
* src/lisp.h (CHECK_FIXNUM_CAR, CHECK_FIXNUM_CDR):
Remove.  All uses removed.  These seem to have been based on
the assumption that the argument cons needs to be modified,
an assumption that is incorrect for fixnums.
(Fdefine_coding_system_internal): Use CHECK_RANGED_INTEGER
instead of a special diagnostic for graphic register numbers.

6 years ago* test/lisp/eshell/eshell-tests.el (with-temp-eshell):
Glenn Morris [Sun, 9 Dec 2018 23:54:35 +0000 (15:54 -0800)]
* test/lisp/eshell/eshell-tests.el (with-temp-eshell):
Avoid permanently changing HISTFILE.

6 years agoFix occur for non-nil list-matching-lines-jump-to-current-line (bug#33476)
Juri Linkov [Sun, 9 Dec 2018 23:53:08 +0000 (01:53 +0200)]
Fix occur for non-nil list-matching-lines-jump-to-current-line (bug#33476)

* lisp/replace.el (occur-engine): Move orig-line let-binding higher.
Don't use start-line in forward-line.

6 years agoGuard occur against an undefined orig-line
Raimon Grau [Sun, 9 Dec 2018 23:42:41 +0000 (01:42 +0200)]
Guard occur against an undefined orig-line

; Not to be merged to master
* lisp/replace.el (occur-engine): Avoid inserting the current line if
orig-line is nil.  This happens, for example, when reverting an occur
buffer with `list-matching-lines-jump-to-current-line' set to t.
(Bug#33476)

6 years ago* test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules):
Michael Albinus [Sun, 9 Dec 2018 16:09:53 +0000 (17:09 +0100)]
* test/lisp/net/tramp-tests.el (tramp-test03-file-name-host-rules):

Use proper error symbol.

6 years agoIndexing followup to recent changes
Eli Zaretskii [Sun, 9 Dec 2018 15:14:55 +0000 (17:14 +0200)]
Indexing followup to recent changes

* doc/lispref/text.texi (Special Properties): Index
'cursor-sensor-inhibit'.  (Bug#33664)

6 years agoImprove documentation of cursor-sensor.el (bug#33664)
Stefan Monnier [Sun, 9 Dec 2018 13:59:20 +0000 (08:59 -0500)]
Improve documentation of cursor-sensor.el (bug#33664)

* doc/lispref/text.texi (Special Properties): Mention cursor-sensor-inhibit.
* lisp/emacs-lisp/cursor-sensor.el (Commentary): Add cursor-sensor-mode.
(cursor-sensor-inhibit): Add docstring.

6 years ago* doc/lispref/commands.texi (Adjusting Point): Bug#33662
Stefan Monnier [Sun, 9 Dec 2018 13:34:35 +0000 (08:34 -0500)]
* doc/lispref/commands.texi (Adjusting Point): Bug#33662

Tweak text to clarify intangibility.

6 years agoDon't create *Compile-Log* due to byte-compile. Amend message to it.
Alan Mackenzie [Sun, 9 Dec 2018 12:59:03 +0000 (12:59 +0000)]
Don't create *Compile-Log* due to byte-compile.  Amend message to it.

This fixes bug #33602 and is a partial reversion of a commit from
2018-11-28T13:15:50.

* lisp/emacs-lisp/bytecomp.el (byte-compile-log-file): Don't create buffer
*Compile-Log* because it doesn't already exist.  Amend message "Compiling no
file" to be clearer (?and less irritating).

6 years agoTramp multi-hop methods must be inline
Michael Albinus [Sun, 9 Dec 2018 08:55:29 +0000 (09:55 +0100)]
Tramp multi-hop methods must be inline

* doc/misc/tramp.texi (Ad-hoc multi-hops): Involved methods must
be inline methods.

6 years agoAdd make_vector and make_nil_vector
Paul Eggert [Sun, 9 Dec 2018 08:18:36 +0000 (00:18 -0800)]
Add make_vector and make_nil_vector

This makes the callers a bit easier to read, and doubtless
improves efficiency very slightly.  It also simplifies
possible future changes to allow bignum indexes to buffers.
* src/alloc.c (allocate_vectorlike):
Prefer ptrdiff_t to size_t when either will do.
(make_vector): New function.
(Fmake_vector): Use it.
* src/buffer.c (syms_of_buffer):
* src/bytecode.c (syms_of_bytecode):
* src/category.c (Fmake_category_table, init_category_once):
* src/ccl.c (syms_of_ccl):
* src/character.c (syms_of_character):
* src/charset.c (Fdefine_charset_internal)
(Ffind_charset_region, Ffind_charset_string):
* src/chartab.c (copy_char_table):
* src/coding.c (Fdefine_coding_system_internal, syms_of_coding):
* src/composite.c (get_composition_id, Fcomposition_get_gstring):
* src/composite.h (LGLYPH_NEW):
* src/fns.c (concat, Flocale_info, make_hash_table):
* src/font.c (font_otf_ValueRecord, font_otf_anchor)
(build_style_table, syms_of_font):
* src/fontset.c (RFONT_DEF_NEW, fontset_find_font)
(dump_fontset, syms_of_fontset):
* src/image.c (xpm_make_color_table_v):
* src/keyboard.c (modify_event_symbol, menu_bar_items)
(parse_menu_item, parse_tool_bar_item, init_tool_bar_items)
(syms_of_keyboard):
* src/keymap.c (Fdefine_key, describe_map, describe_vector):
* src/lread.c (read_vector):
* src/macfont.m (macfont_shape):
* src/menu.c (init_menu_items):
* src/nsfns.m (ns_make_monitor_attribute_list):
* src/process.c (conv_sockaddr_to_lisp, network_interface_info):
* src/profiler.c (make_log):
* src/window.c (Fcurrent_window_configuration):
* src/xdisp.c (with_echo_area_buffer_unwind_data)
(format_mode_line_unwind_data):
* src/xfaces.c (Finternal_make_lisp_face)
(Fface_attributes_as_vector):
* src/xfns.c (x_make_monitor_attribute_list)
(Fx_display_monitor_attributes_list):
* src/xfont.c (syms_of_xfont):
* src/xselect.c (x_handle_dnd_message):
* src/xwidget.c (save_script_callback):
Prefer make_nil_vector (N) to Fmake_vector (make_fixnum (N), Qnil).
* src/callint.c (Fcall_interactively):
* src/charset.c (load_charset_map):
* src/chartab.c (Fmake_char_table, uniprop_encode_value_numeric):
* src/composite.c (get_composition_id)
* src/dispnew.c (Fframe_or_buffer_changed_p)
(syms_of_display):
* src/fns.c (make_hash_table, maybe_resize_hash_table):
* src/font.c (font_style_to_value):
* src/fontset.c (FONTSET_ADD, fontset_add):
* src/json.c (json_to_lisp):
* src/keymap.c (syms_of_keymap):
* src/lread.c (init_obarray):
* src/profiler.c (make_log, Fprofiler_cpu_log):
* src/term.c (term_get_fkeys_1):
Prefer make_vector (N, V) to Fmake_vector (make_fixnum (N), V).
* src/font.c (build_style_table):
* src/macfont.m (macfont_shape):
* src/process.c (conv_sockaddr_to_lisp, network_interface_info):
Prefer make_uninit_vector if the vector will be initialized soon.
* src/lisp.h (make_nil_vector): New function.

6 years agoFix resolving symlinks in Eshell history file names
Eli Zaretskii [Sun, 9 Dec 2018 07:45:40 +0000 (09:45 +0200)]
Fix resolving symlinks in Eshell history file names

* lisp/eshell/em-dirs.el (eshell-write-last-dir-ring):
* lisp/eshell/em-hist.el (eshell-write-history): Don't call
file-truename with argument of nil.  (Bug#33477)

* test/lisp/eshell/eshell-tests.el (with-temp-eshell): Remove
HISTFILE from the environment, to make sure the Eshell history
file is nil.

6 years ago* src/alloc.c (VECTOR_ELTS_MAX): Make sure it’s signed.
Paul Eggert [Sun, 9 Dec 2018 06:59:50 +0000 (22:59 -0800)]
* src/alloc.c (VECTOR_ELTS_MAX): Make sure it’s signed.

6 years agoPort VECTOR_ELTS_MAX to older GCC etc.
Paul Eggert [Sun, 9 Dec 2018 06:53:15 +0000 (22:53 -0800)]
Port VECTOR_ELTS_MAX to older GCC etc.

Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-12/msg00182.html
* src/alloc.c (VECTOR_ELTS_MAX): Now a macro.
Needed for portability to older GCC and non-GCC.

6 years agoStreamline and fix vector-size checks
Paul Eggert [Sun, 9 Dec 2018 00:56:32 +0000 (16:56 -0800)]
Streamline and fix vector-size checks

* src/alloc.c (VECTOR_ELTS_MAX): New constant.
(allocate_vectorlike): LEN now must be positive.  Assume LEN
is in range.  All callers changed.
(allocate_vector): Arg is now ptrdiff_t, not EMACS_INT.
All callers changed.  Return zero vector here, not in
allocate_vectorlike.
* src/lisp.h (make_uninit_vector): Simplify.
* src/xwidget.c (webkit_js_to_lisp):
Check for overflow in ptrdiff_t calculations.

6 years agoSuppress WebKitGTK+ 2.21.1 diagnostics
Paul Eggert [Sat, 8 Dec 2018 23:29:07 +0000 (15:29 -0800)]
Suppress WebKitGTK+ 2.21.1 diagnostics

* src/xwidget.c: Suppress deprecation warnings (Bug#33679).

6 years agoFix quote in the copyright skeleton
Michael Heerdegen [Sat, 8 Dec 2018 21:21:23 +0000 (22:21 +0100)]
Fix quote in the copyright skeleton

Revert replacing a backquote in the "copyright" skeleton with a quote
done in "Replace insignificant backquotes" which broke the skeleton.

* lisp/emacs-lisp/copyright.el (copyright): Restore the correct
version of the skeleton that used a backquote.

6 years agoFix integer overflow in oversize vectors
Paul Eggert [Sat, 8 Dec 2018 18:47:38 +0000 (10:47 -0800)]
Fix integer overflow in oversize vectors

* src/alloc.c (allocate_vector): Fix integer overflow when
allocating very large vectors, by taking large_vector_offset
into account.  Assume C99.

6 years ago* src/alloc.c (allocate_vectorlike): Simplify.
Paul Eggert [Sat, 8 Dec 2018 18:42:50 +0000 (10:42 -0800)]
* src/alloc.c (allocate_vectorlike): Simplify.

6 years ago; * src/xterm.c (x_update_begin): Fix whitespace.
Eli Zaretskii [Sat, 8 Dec 2018 09:50:58 +0000 (11:50 +0200)]
; * src/xterm.c (x_update_begin): Fix whitespace.

6 years agoFix scaling problem in Cairo builds
Ari Roponen [Fri, 30 Nov 2018 12:09:09 +0000 (14:09 +0200)]
Fix scaling problem in Cairo builds

* src/xterm.c (x_begin_cr_clip) [USE_GTK]:
(x_update_begin) [USE_CAIRO && USE_GTK]: Support scaling.
(Bug#33442)

6 years agoHonor 'vc-bzr-log-switches' in 'vc-bzr-revision-table'
Eli Zaretskii [Sat, 8 Dec 2018 09:39:35 +0000 (11:39 +0200)]
Honor 'vc-bzr-log-switches' in 'vc-bzr-revision-table'

* lisp/vc/vc-bzr.el (vc-bzr-revision-table): Honor
'vc-bzr-log-switches'.

6 years agoHonor 'vc-bzr-log-switches' in 'vc-bzr-expanded-log-entry'
Steven De Herdt [Sat, 24 Nov 2018 22:57:57 +0000 (23:57 +0100)]
Honor 'vc-bzr-log-switches' in 'vc-bzr-expanded-log-entry'

* lisp/vc/vc-bzr.el (vc-bzr-expanded-log-entry): Honor
'vc-bzr-log-switches'.  (Bug#33494)

Copyright-paperwork-exempt: yes

6 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 8 Dec 2018 09:13:28 +0000 (11:13 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

6 years agoDocument that Eshell follows symlinks in history file names
Eli Zaretskii [Sat, 8 Dec 2018 09:12:38 +0000 (11:12 +0200)]
Document that Eshell follows symlinks in history file names

* etc/NEWS: Mention that Eshell now follows symlinks in
history file names.

6 years agoFollow links in Eshell last-dir-ring
Philip Hudson [Sat, 24 Nov 2018 00:16:14 +0000 (00:16 +0000)]
Follow links in Eshell last-dir-ring

* lisp/eshell/em-hist.el (eshell-write-last-dir-ring):
Follow symlinks in 'eshell-last-dir-ring-file-name'.
(Bug#33477)

6 years agoFollow symlink in Eshell history
Philip Hudson [Wed, 21 Nov 2018 23:09:16 +0000 (23:09 +0000)]
Follow symlink in Eshell history

* lisp/eshell/em-hist.el (eshell-write-history): Follow
symlinks in 'eshell-history-file-name'.  (Bug#33460)

6 years agoNew buffer display action alist entry 'window-min-height' (Bug#32825)
Martin Rudalics [Sat, 8 Dec 2018 08:37:40 +0000 (09:37 +0100)]
New buffer display action alist entry 'window-min-height' (Bug#32825)

* lisp/window.el (display-buffer-below-selected): Handle
'window-min-height' action alist entry (Bug#32825).
* doc/lispref/windows.texi (Buffer Display Action Functions)
(Buffer Display Action Alists): Add documentation for
'window-min-height' action alist entries.
* etc/NEWS: Mention 'window-min-height' action alist entry.

6 years agoAdjust windows' previous buffers when reverting dired buffers (Bug#33458)
Martin Rudalics [Sat, 8 Dec 2018 08:18:28 +0000 (09:18 +0100)]
Adjust windows' previous buffers when reverting dired buffers (Bug#33458)

* lisp/dired.el (dired-save-positions, dired-restore-positions):
For each window that showed the reverted buffer before, fix the
point positions in its list of previously shown buffers the way
these routines handle window point for all windows currently
showing the buffer (Bug#33458).

6 years agoImprove how 'balance-windows' handles fixed-size windows (Bug#33254)
Martin Rudalics [Sat, 8 Dec 2018 08:01:23 +0000 (09:01 +0100)]
Improve how 'balance-windows' handles fixed-size windows (Bug#33254)

* lisp/window.el (balance-windows-2): When a child window has
fixed size, don't count it as resizable (Bug#33254).
Handle case where a window has no resizable child windows.

6 years agoCC Mode: Compensate for backward-sexp ignoring trailing commas after {...}
Alan Mackenzie [Fri, 7 Dec 2018 17:38:03 +0000 (17:38 +0000)]
CC Mode: Compensate for backward-sexp ignoring trailing commas after {...}

This fixes bug #32808.

* lisp/progmodes/cc-engine.el (c-beginning-of-statement-1): New variable
comma-delimited, set when we're about to scan backward over a comma.  Do not
reckon a brace block as bounding a statement when it is followed or preceded
by a comma (except when argument comma-delim is non-nil).
(c-guess-basic-syntax, CASE 9C): Call c-beginning-of-statement-1 with argument
comma-delim changed to non-nil.