]> git.eshelyaron.com Git - emacs.git/log
emacs.git
7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 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.

7 years agoDon't advertise s_client in tls.el docs
Glenn Morris [Tue, 25 Apr 2017 00:06:14 +0000 (20:06 -0400)]
Don't advertise s_client in tls.el docs

* lisp/net/tls.el (tls-end-of-info, tls-success, tls-untrusted):
Don't mention s_client in docs.
; * doc/misc/gnus.texi (Direct Functions): Comment.

7 years agoRemove s_client usage from tls.el
Rob Browning [Mon, 24 Apr 2017 23:58:45 +0000 (19:58 -0400)]
Remove s_client usage from tls.el

* lisp/net/tls.el (tls-program, tls-checktrust): Remove s_client.
Ref http://bugs.debian.org/766397
http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00803.html

; Backport this to Emacs 25.3, if there is one

7 years agoFurther robustify cedet bootstrap to loaddefs not yet built
Glenn Morris [Mon, 24 Apr 2017 23:51:20 +0000 (19:51 -0400)]
Further robustify cedet bootstrap to loaddefs not yet built

* lisp/cedet/semantic/util.el (semantic-something-to-tag-table):
Avoid void-function error when bootstrapping and semantic/loaddefs.el
does not yet exist.

7 years agoFix XBM colour rendering in NS port (bug#22060)
Alan Third [Mon, 24 Apr 2017 09:23:28 +0000 (10:23 +0100)]
Fix XBM colour rendering in NS port (bug#22060)

src/nsimage.m (setXBMColor): Fix calculation of xbm_fg.

7 years agoAdd support for IRCv3 message tags.
Vibhav Pant [Mon, 24 Apr 2017 06:27:46 +0000 (11:57 +0530)]
Add support for IRCv3 message tags.

* erc-backend.el:
  erc-response: Add `tags' element.
  Add (erc-parse-tags).
  (erc-parse-server-response): Use (erc-parse-tags) to parse message
  tags (if any), and store them in `erc-resopnse' struct.

* erc.el: (erc-display-message): Expose message tags with text
  properties of the corresponding message line.

7 years agoAdd image sizing tests for an image that's narrow
Lars Ingebrigtsen [Mon, 24 Apr 2017 05:56:31 +0000 (07:56 +0200)]
Add image sizing tests for an image that's narrow

7 years agoNeedlessly refactor tests for clarity
Lars Ingebrigtsen [Mon, 24 Apr 2017 05:47:09 +0000 (07:47 +0200)]
Needlessly refactor tests for clarity

7 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.

7 years agoMerge branch 'nnselect' into feature/gnus-select
Andrew G Cohen [Mon, 24 Apr 2017 01:28:32 +0000 (09:28 +0800)]
Merge branch 'nnselect' into feature/gnus-select

7 years agoAdd missing remappings for Ido mode
Philipp Stephani [Thu, 20 Apr 2017 13:41:15 +0000 (15:41 +0200)]
Add missing remappings for Ido mode

Among others, add a remapping for C-x 4 d, cf. Bug#26360.

* lisp/ido.el (ido-mode): Remap missing commands.
(ido-file-internal, ido-visit-buffer): Add support for new
methods.
(ido-display-buffer-other-frame)
(ido-find-alternate-file-other-window, ido-dired-other-window)
(ido-dired-other-frame): New commands.

* test/lisp/ido-tests.el (ido-tests--other-window-frame): Add unit
test for the bindings.

7 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.

7 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.

7 years agoLet w32_mouse_position pick a child window only if it has a child frame
Martin Rudalics [Sun, 23 Apr 2017 08:52:56 +0000 (10:52 +0200)]
Let w32_mouse_position pick a child window only if it has a child frame

* src/w32term.c (w32_mouse_position): When using a frame found
by ChildWindowFromPoint make sure it's a child frame (Bug#26615,
maybe).

7 years agoDon't require bytecomp for running ert tests
Noam Postavsky [Wed, 5 Apr 2017 03:48:42 +0000 (23:48 -0400)]
Don't require bytecomp for running ert tests

"Fix ert-tests when running compiled" 2016-12-06 accidentally
introduced a dependency on `bytecomp' into `ert'.  As mentioned in
"Avoid ert test failures" 2017-04-18, the accidental dependency of ert
on bytecomp was masked by loading other libraries until recently.

* lisp/emacs-lisp/ert.el (ert--expand-should-1): Only use
`byte-compile-macro-environment' if it's bound.
* test/src/eval-tests.el: Add defvar for dynamic variable
`byte-compile-debug'.

7 years agoEliminate unneeded warp-to-article in gnus article referral
Andrew G Cohen [Sun, 23 Apr 2017 01:05:49 +0000 (09:05 +0800)]
Eliminate unneeded warp-to-article in gnus article referral

* lisp/gnus/gnus-sum.el (gnus-summary-refer-thread):
(gnus-summary-refer-article): Remove gnus-warp-to article call.

7 years agoAllow limiting gnus summary buffers to a thread
Andrew G Cohen [Sun, 23 Apr 2017 00:25:02 +0000 (08:25 +0800)]
Allow limiting gnus summary buffers to a thread

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Include
an optional argument to allow limiting the summary buffer to just the
thread-related articles.
(gnus-refer-thread-limit-to-thread): Introduce customizable variable
to control whether thread-referral adds the thread to the summary
buffer or limits to just the thread.
(gnus-summary-refer-thread): Use the new variable.

7 years agoCorrect gnus-newsgroup-limits in gnus when including thread
Andrew G Cohen [Sun, 23 Apr 2017 00:13:09 +0000 (08:13 +0800)]
Correct gnus-newsgroup-limits in gnus when including thread

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Should
only add one list of thread-related articles to gnus-newsgroup-limits
rather than two.

7 years agoImprove gnus thread matching of similar subjects
Andrew G Cohen [Sun, 23 Apr 2017 00:07:22 +0000 (08:07 +0800)]
Improve gnus thread matching of similar subjects

* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread):
Use the more liberal gnus-general-simplify-subject regexp to
find thread articles with similar subjects.

7 years ago; Merge: improve indent-sexp and lisp-indent-region performance
Noam Postavsky [Sat, 22 Apr 2017 18:10:58 +0000 (14:10 -0400)]
; Merge: improve indent-sexp and lisp-indent-region performance

7 years agoAdd new `lisp-indent-region' that doesn't reparse the code.
Noam Postavsky [Thu, 16 Mar 2017 02:27:27 +0000 (22:27 -0400)]
Add new `lisp-indent-region' that doesn't reparse the code.

Both `lisp-indent-region' and `lisp-indent-line' now use `syntax-ppss'
to get initial state, so they will no longer indent string literal
contents.

* lisp/emacs-lisp/lisp-mode.el (lisp-ppss): New function, like
`syntax-ppss', but with a more dependable item 2.
(lisp-indent-region): New function, like `indent-region-line-by-line'
but additionally keep a running parse state to avoid reparsing the
code repeatedly.  Use `lisp-ppss' to get initial state.
(lisp-indent-line): Take optional PARSE-STATE argument, pass it to
`calculate-lisp-indent', use `lisp-ppss' if not given.
(lisp-mode-variables): Set `indent-region-function' to
`lisp-indent-region'.

7 years agoRemove ignored argument from lisp-indent-line
Noam Postavsky [Thu, 16 Mar 2017 01:59:13 +0000 (21:59 -0400)]
Remove ignored argument from lisp-indent-line

* lisp/emacs-lisp/lisp-mode.el (lisp-indent-line): Remove WHOLE-EXP
argument, the behavior has long since been handled in
`indent-for-tab-command'.  Also remove redundant `beg' and `shift-amt'
variables and use `indent-line-to'.

7 years ago* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Clean up marker.
Noam Postavsky [Thu, 16 Mar 2017 02:35:47 +0000 (22:35 -0400)]
* lisp/emacs-lisp/lisp-mode.el (indent-sexp): Clean up marker.

7 years agoDon't reparse the sexp in indent-sexp (Bug#25122)
Noam Postavsky [Mon, 13 Mar 2017 03:59:19 +0000 (23:59 -0400)]
Don't reparse the sexp in indent-sexp (Bug#25122)

* lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Let
PARSE-START be a parse state that can be reused.
(indent-sexp): Pass the running parse state to calculate-lisp-indent
instead of the sexp beginning position.  Saving the
CONTAINING-SEXP-START returned by `calculate-lisp-indent' is no longer
needed.  Don't bother stopping if we don't descend below init-depth,
since we now alway scan the whole buffer (via syntax-ppss) anyway.
* test/lisp/emacs-lisp/lisp-mode-tests.el (indent-sexp): Add blank
line to test case.

7 years agoAdd cond test cases for singleton clauses.
Vibhav Pant [Sat, 22 Apr 2017 16:21:43 +0000 (21:51 +0530)]
Add cond test cases for singleton clauses.

* test/lisp/emacs-lisp/bytecomp-tests.el: Add test cond forms where
  the default clause is a single non-nil expression.

7 years agob-c--cond-jump-table-info: Use correct body for singleton clauses
Vibhav Pant [Sat, 22 Apr 2017 15:08:53 +0000 (20:38 +0530)]
b-c--cond-jump-table-info: Use correct body for singleton clauses

* lisp/emacs-lisp/bytecomp.el (byte-compile-cond-jump-table-info):
When a clause's body consists of a single constant expression, use
that expression as the body to be compiled. This fixes switch bytecode
evaluating to nil to such clauses.

7 years agoffap: Don't switch window unless needed
Philipp Stephani [Sun, 8 Jan 2017 18:44:22 +0000 (19:44 +0100)]
ffap: Don't switch window unless needed

When using ffap-other-window, don't change the window configuration
unless a new buffer has actually been created (Bug#25352).

* lisp/ffap.el (ffap-other-frame): Don't change the window
configuration if no new buffer has been created.
* test/lisp/ffap-tests.el (ffap-other-window--bug-25352): Add unit
test.

7 years agoFix fontification of C++ declaration with type FOO::FOO.
Alan Mackenzie [Sat, 22 Apr 2017 14:45:24 +0000 (14:45 +0000)]
Fix fontification of C++ declaration with type FOO::FOO.

* lisp/progmodes/cc-engine.el (c-find-decl-spots): Initialize
cfd-top-level properly.
(c-forward-decl-or-cast-1): On finding FOO::FOO, check it is followed by "("
before deciding it is a constructor.

* lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Negate the
result of the c-bs-at-toplevel-p call passed to c-font-lock-declarators
(simple bug fix).

7 years agoFix usage of FRAME_Z_GROUP
Philipp Stephani [Sat, 22 Apr 2017 11:54:08 +0000 (13:54 +0200)]
Fix usage of FRAME_Z_GROUP

* src/nsterm.m (initFrameFromEmacs:): FRAME_Z_GROUP does not return a
Lisp object, cf. Bug#26597.

7 years agoFix GNUstep build
Alan Third [Sat, 22 Apr 2017 09:42:35 +0000 (10:42 +0100)]
Fix GNUstep build

* src/nsfns.m (Fns_frame_z_list_order): Rewrite for GNUstep
compatibility.
* src/nsmenu.m (update_frame_tool_bar): Remove unused variable.

7 years agoAdd no-accept-focus and frame-list-z-order to NS port
Alan Third [Thu, 20 Apr 2017 14:25:56 +0000 (15:25 +0100)]
Add no-accept-focus and frame-list-z-order to NS port

* lisp/frame.el (frame-list-z-order): Add NS.
* src/nsfns.m: Add x_set_no_accept_focus to handler struct.
(Fx_create_frame): Handle no-accept-focus parameter.
(ns_window_is_ancestor):
(Fns_frame_list_z_order): New functions.
* src/nsterm.m (x_set_no_accept_focus): New function.
(initFrameFromEmacs): Use EmacsWindow instead of EmacsFSWindow for
non-fullscreen windows.
(EmacsWindow:canBecomeKeyWindow): New function.

7 years agoImprove prefix handling for dash.el
Stefan Monnier [Fri, 21 Apr 2017 16:14:59 +0000 (12:14 -0400)]
Improve prefix handling for dash.el

* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload):
Don't drop dash's "-<letter>" prefixes.

7 years ago* lisp/emacs-lisp/cl-macs.el: Fix symbol-macrolet
Stefan Monnier [Fri, 21 Apr 2017 16:12:42 +0000 (12:12 -0400)]
* lisp/emacs-lisp/cl-macs.el: Fix symbol-macrolet

Revert 0d112c00ba0ec14bd3014efcd3430b9ddcfe1fc1 (to fix bug#26325)
and use a different fix for bug#26068.
(cl--symbol-macro-key): New function.
(cl--sm-macroexpand, cl-symbol-macrolet): Use it instead of `symbol-name`.
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-symbol-macrolet):
Failure is not expected any more.

7 years agoAvoid infinite loop in redisplay when header-line-format is invalid
Eli Zaretskii [Fri, 21 Apr 2017 08:10:14 +0000 (11:10 +0300)]
Avoid infinite loop in redisplay when header-line-format is invalid

* src/xdisp.c (handle_invisible_prop): Avoid inflooping when the
string has an invalid %-construct in it and is displayed as part
of mode-line or header-line.  (Bug#26586)

7 years agoAdd tests to check image scaling functionality
Lars Ingebrigtsen [Fri, 21 Apr 2017 04:12:53 +0000 (06:12 +0200)]
Add tests to check image scaling functionality

This is in preparation to doing further work in this area to avoid
regressions.

* test/data/image/blank-200x100.png: New file for testing
image scaling.

* test/manual/image-size-tests.el: New file.

7 years agoAllow svg-image to take all create-image PROPS
Lars Ingebrigtsen [Thu, 20 Apr 2017 21:23:59 +0000 (23:23 +0200)]
Allow svg-image to take all create-image PROPS

* lisp/svg.el (svg-image): Allow passing in PROPS when
creating an image for convenience.

7 years agoTreat non-erroring lisp call as successful eshell command (Bug#26161)
George D. Plymale II [Thu, 20 Apr 2017 18:05:11 +0000 (14:05 -0400)]
Treat non-erroring lisp call as successful eshell command (Bug#26161)

This lets a compound command like 'cd .. && echo ok' print 'ok',
similar to how most other shells behave.

* lisp/eshell/esh-cmd.el (eshell-exit-success-p): Only check if the
last exit code was zero, rather than first checking whether the last
command returned nil.
(eshell-exec-lisp): Set `eshell-last-command-status' to 1 on error.

Copyright-paperwork-exempt: yes

7 years agoFix reading of tab settings in whitespace-mode
Reuben Thomas [Thu, 2 Mar 2017 12:50:06 +0000 (12:50 +0000)]
Fix reading of tab settings in whitespace-mode

lisp/whitespace.el (whitespace-indent-tabs-mode)
whitespace-tab-width): Remove these variables. The underlying
variables `indent-tabs-mode' and `tab-width' are already buffer-local
when needed, and whitespace-mode never changes them.
(whitespace-ensure-local-variables): Remove this function, which only
existed to set the above variables.
(whitespace-cleanup-region, whitespace-regexp)
(whitespace-indentation-regexp, whitespace-report-region)
(whitespace-turn-on, whitespace-color-on): Adjust these functions to
use `indent-tabs-mode' and `tab-width' directly, and not call
`whitespace-ensure-local-variables'.

7 years ago* lisp/vc/vc-hg.el (vc-hg-state-fast): Fix compiler warning
Stefan Monnier [Thu, 20 Apr 2017 21:38:21 +0000 (17:38 -0400)]
* lisp/vc/vc-hg.el (vc-hg-state-fast): Fix compiler warning

by simplifying ascii-test.

7 years agobytecomp: Don't inline functions that use byte-switch (Bug#26518)
Vibhav Pant [Thu, 20 Apr 2017 15:29:15 +0000 (20:59 +0530)]
bytecomp: Don't inline functions that use byte-switch (Bug#26518)

* lisp/emacs-lisp/bytecomp.el (byte-compile-unfold-bcf): Don't inline
  FORM if the bytecode uses the byte-switch instruction. It is
  impossible to guess the correct stack depth while inlining such
  bytecode, resulting in faulty code.

7 years agoDon't register "def" as an autoload prefix (Bug#26412)
Noam Postavsky [Thu, 20 Apr 2017 03:01:43 +0000 (23:01 -0400)]
Don't register "def" as an autoload prefix (Bug#26412)

* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload): Don't
accept "def" as a prefix.

7 years agoUse substring completion for Info menus and index
Stefan Monnier [Thu, 20 Apr 2017 00:43:41 +0000 (20:43 -0400)]
Use substring completion for Info menus and index

* lisp/info.el (Info-complete-menu-item): Add `category' metadata.
(Info-menu): Simplify now that we use the `default' arg of completing-read.
* lisp/minibuffer.el (completion-category-defaults): Use substring
completion for `info-menu`.

7 years agoRemove some explicit runtime loads of pcase
Glenn Morris [Wed, 19 Apr 2017 20:32:04 +0000 (16:32 -0400)]
Remove some explicit runtime loads of pcase

Pcase is macros, so these should have used eval-when-compile.
Anyway, pcase entry points are autoloaded, so the compiler handles it.
* lisp/profiler.el, lisp/emacs-lisp/eieio-core.el:
* lisp/emacs-lisp/generator.el, lisp/emacs-lisp/subr-x.el:
* lisp/progmodes/xref.el: No need to require pcase.

7 years agoStop cl-lib loading pcase at runtime
Glenn Morris [Wed, 19 Apr 2017 20:28:48 +0000 (16:28 -0400)]
Stop cl-lib loading pcase at runtime

The cause was an unexpanded pcase-defmacro in cl-loaddefs.
* lisp/emacs-lisp/autoload.el (make-autoload):
Treat pcase-defmacro like defmacro.

7 years agoNote frame documentation exceptions for NS builds
Alan Third [Wed, 19 Apr 2017 19:36:40 +0000 (20:36 +0100)]
Note frame documentation exceptions for NS builds

* doc/lispref/frames.texi (Management Parameters, Child Frames): Note
NS differences.

7 years agoFix bug introduced by my last commit
Alan Third [Wed, 19 Apr 2017 16:58:49 +0000 (17:58 +0100)]
Fix bug introduced by my last commit

* src/nsterm.m (ns_draw_fringe_bitmap): Revert key-mashing accident.

7 years agoAdd new frame functionality to NS port
Alan Third [Fri, 14 Apr 2017 09:02:38 +0000 (10:02 +0100)]
Add new frame functionality to NS port

* lisp/frame.el (frame-restack): Call ns-frame-restack.
* src/keyboard.c (kbd_buffer_get_event) [HAVE_NS]: Enable
MOVE_FRAME_EVENT handling.
* src/frame.h:
* src/frame.c: Enable 'z-group', 'undecorated' and 'parent' frame
definitions.
* src/nsfns.m: Add x_set_z_group, x_set_parent_frame and
x_set_undecorated (Cocoa only) to handler struct.
(Fx_create_frame): Handle 'z-group', 'parent-frame' and 'undecorated'
frame parameter.
(Fns_frame_restack): New function.
* src/nsmenu.m (free_frame_tool_bar, update_frame_tool_bar):
FRAME_TOOLBAR_HEIGHT is no longer a variable.
* src/nsterm.h (NS_PARENT_WINDOW_LEFT_POS, NS_PARENT_WINDOW_TOP_POS):
Add #defines to find the screen position of the parent frame.
(NS_TOP_POS): Remove defun.
(EmacsView): Remove redundant toolbar variables and add createToolbar
method.
(FRAME_NS_TITLEBAR_HEIGHT, FRAME_TOOLBAR_HEIGHT): Always calculate the
values instead of storing them in a variable.
* src/nsterm.m (x_set_offset, windowDidMove): Take parent frame
position into account when positioning frames.
(initFrameFromEmacs): Remove toolbar creation code and handle new
frame parameters.
(x_set_window_size): Remove toolbar height calculation.
(x_set_z_group):
(x_set_parent_frame):
(x_set_undecorated) [NS_IMPL_COCOA]: New function.
(x_destroy_window): Detach parent if child closes.
(updateFrameSize): Change NSTRACE message to reflect new reality and
no longer reset frame size.
(windowWillResize): Don’t change NS window name when the titlebar
is invisible.
(createToolbar): Move toolbar creation code into it’s own method.
(toggleFullScreen): FRAME_TOOLBAR_HEIGHT and FRAME_NS_TITLEBAR_HEIGHT
are no longer variables.
(windowDidMove): Fire MOVE_FRAME_EVENT Emacs event.

7 years agoTweak bytecomp's loading of cl-extra
Glenn Morris [Wed, 19 Apr 2017 00:52:22 +0000 (20:52 -0400)]
Tweak bytecomp's loading of cl-extra

* lisp/emacs-lisp/bytecomp.el: Don't force load of cl-extra in a
post-bootstrap emacs where cl-loaddefs does exist.

7 years agoAvoid unnecessary loading of subr-x at run-time
Glenn Morris [Tue, 18 Apr 2017 23:07:28 +0000 (19:07 -0400)]
Avoid unnecessary loading of subr-x at run-time

* lisp/doc-view.el, lisp/filenotify.el, lisp/info-look.el:
* lisp/svg.el, lisp/emacs-lisp/byte-opt.el, lisp/net/shr.el:
* lisp/textmodes/sgml-mode.el, test/lisp/dom-tests.el:
No need to load subr-x at run-time.
* lisp/gnus/nnheader.el: No need to load subr-x.
; * lisp/emacs-lisp/subr-x.el, lisp/gnus/message.el, lisp/net/nsm.el:
; Comments.

7 years agoUse iteration in math-factorial-iter
michael schuldt [Tue, 18 Apr 2017 18:24:37 +0000 (11:24 -0700)]
Use iteration in math-factorial-iter

* lisp/calc/calc-comb.el (math-factorial-iter):
Use iteration instead of recursion to avoid max-specpdl-size problem.
Copyright-paperwork-exempt: yes

7 years ago* test/lisp/kmacro-tests.el: Require seq, for seq-concatenate.
Glenn Morris [Tue, 18 Apr 2017 17:02:02 +0000 (13:02 -0400)]
* test/lisp/kmacro-tests.el: Require seq, for seq-concatenate.

7 years agoAvoid ert test failures
Glenn Morris [Tue, 18 Apr 2017 16:52:33 +0000 (12:52 -0400)]
Avoid ert test failures

* lisp/emacs-lisp/ert.el (ert--expand-should-1):
Avoid errors related to undefined byte-compile-macro-environment.
Somehow masked until very recently because loading seq (eg)
loads bytecomp.  http://hydra.nixos.org/build/51730765

7 years agoFix find-library-name for load-history entries with nil FILE-NAME (Bug#26355)
Noam Postavsky [Sun, 26 Mar 2017 02:41:34 +0000 (22:41 -0400)]
Fix find-library-name for load-history entries with nil FILE-NAME (Bug#26355)

* lisp/emacs-lisp/find-func.el (find-library--from-load-history):
Rename from find-library--from-load-path.  Check for `load-history'
entries with nil FILE-NAMEs.  Simplify by not double
checking for suffixes and making use of `locate-file'.

7 years agoUse vfork if possible on Darwin (bug#26397)
Alan Third [Sun, 9 Apr 2017 19:10:33 +0000 (20:10 +0100)]
Use vfork if possible on Darwin (bug#26397)

Co-authored-by: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* src/conf_post.h (HAVE_WORKING_VFORK): Don't undef.
(vfork): Don't define.
* src/process.c (create_process) [DARWIN_OS]: Use fork if pty_flag is
set, otherwise vfork.
* src/callproc.c (call_process) [DARWIN_OS]: Use TIOCNOTTY to detach
the controlling terminal instead of setsid.

7 years agoSmall erc-kill-channel fix (bug#23700)
Fran Litterio [Tue, 18 Apr 2017 00:30:40 +0000 (20:30 -0400)]
Small erc-kill-channel fix (bug#23700)

* lisp/erc/erc.el (erc-kill-channel): Handle null erc-default-target.

7 years agoediff: use user-error rather than debug-ignored-errors
Glenn Morris [Tue, 18 Apr 2017 00:16:15 +0000 (20:16 -0400)]
ediff: use user-error rather than debug-ignored-errors

* lisp/vc/ediff-diff.el (ediff-prepare-error-list):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
* lisp/vc/ediff-init.el (ediff-barf-if-not-control-buffer)
(ediff-check-version):
* lisp/vc/ediff-merg.el (ediff-shrink-window-C):
* lisp/vc/ediff-mult.el (ediff-draw-dir-diffs, ediff-show-dir-diffs)
(ediff-append-custom-diff, ediff-meta-show-patch)
(ediff-filegroup-action, ediff-show-meta-buffer, ediff-show-registry)
(ediff-get-meta-info, ediff-patch-file-form-meta):
* lisp/vc/ediff-ptch.el (ediff-patch-file-internal):
* lisp/vc/ediff-util.el (ediff-toggle-autorefine)
(ediff--check-ancestor-exists, ediff-toggle-read-only)
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-toggle-show-clashes-only)
(ediff-next-difference, ediff-previous-difference)
(ediff-pop-diff, ediff-read-file-name, ediff-verify-file-buffer)
(ediff-save-buffer):
* lisp/vc/ediff-wind.el (ediff-make-wide-display):
* lisp/vc/ediff.el (ediff-find-file, ediff-buffers-internal)
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-regions-wordwise, ediff-regions-linewise)
(ediff-load-version-control): Use user-error.
(debug-ignored-errors): No longer modify.

7 years agomh-e: use user-error rather than debug-ignored-errors
Glenn Morris [Tue, 18 Apr 2017 00:10:28 +0000 (20:10 -0400)]
mh-e: use user-error rather than debug-ignored-errors

* lisp/mh-e/mh-alias.el (mh-alias-grab-from-field):
* lisp/mh-e/mh-utils.el (mh-get-msg-num): Use user-error.
(debug-ignored-errors): No longer modify.

7 years agoispell.el: use user-error rather than debug-ignored-errors
Glenn Morris [Tue, 18 Apr 2017 00:09:27 +0000 (20:09 -0400)]
ispell.el: use user-error rather than debug-ignored-errors

* lisp/textmodes/ispell.el (ispell-get-word): Use user-error.
(debug-ignored-errors): No longer modify.

7 years ago; Spelling fix
Paul Eggert [Mon, 17 Apr 2017 18:22:34 +0000 (11:22 -0700)]
; Spelling fix

7 years ago* src/xterm.c (x_fill_rectangle): Now static.
Paul Eggert [Mon, 17 Apr 2017 18:13:56 +0000 (11:13 -0700)]
* src/xterm.c (x_fill_rectangle): Now static.

7 years agoTighten recently-added UTF-8 check
Paul Eggert [Mon, 17 Apr 2017 17:19:39 +0000 (10:19 -0700)]
Tighten recently-added UTF-8 check

* src/coding.c (encode_coding_utf_8): Now extern.
* src/terminal.c (terminal_glyph_code) [HAVE_STRUCT_UNIPAIR_UNICODE]:
Check for UTF-8, not just for multibyte.

7 years agoxml: Properly handle symbol-qnames for attribute parsing
David Engster [Mon, 17 Apr 2017 14:52:08 +0000 (16:52 +0200)]
xml: Properly handle symbol-qnames for attribute parsing

* lisp/xml.el (xml-parse-attlist): Do not strip 'symbol-qnames from
  xml-ns argument (reverts aea67018) (Bug#26533).
  (xml-maybe-do-ns): Properly handle default namespace by not
  interning new symbol when 'special' flag is set.

* tests/lisp/xml-tests.el (xml-parse-test--namespace-attribute-qnames)
  (xml-parse-namespace-attribute-qnames): Add test for Bug#26533.

7 years ago* src/lisp.h (STRING_SET_CHARS): Simplify assertion.
Paul Eggert [Mon, 17 Apr 2017 14:56:08 +0000 (07:56 -0700)]
* src/lisp.h (STRING_SET_CHARS): Simplify assertion.

7 years agoFix assertion violations when displaying thread-related error
Eli Zaretskii [Mon, 17 Apr 2017 06:47:39 +0000 (09:47 +0300)]
Fix assertion violations when displaying thread-related error

* src/process.c (Faccept_process_output): Don't assume a thread's
name is always a string.

7 years agodired ‘M’ should not complain about ‘.’ and ‘..’
Paul Eggert [Mon, 17 Apr 2017 06:36:26 +0000 (23:36 -0700)]
dired ‘M’ should not complain about ‘.’ and ‘..’

* lisp/dired-aux.el (dired-do-redisplay):
Allow redisplay of ‘.’ and ‘..’ (Bug#26528).

7 years agoRemove unused coding enums
Paul Eggert [Mon, 17 Apr 2017 06:07:33 +0000 (23:07 -0700)]
Remove unused coding enums

* src/coding.h (enum coding_system_type, enum end_of_line_type):
Remove; unused.

7 years agoWork around bug with unibyte Linux consoles
Paul Eggert [Mon, 17 Apr 2017 05:50:02 +0000 (22:50 -0700)]
Work around bug with unibyte Linux consoles

* src/terminal.c (terminal_glyph_code): Skip the UTF-8 stuff if
the terminal's coding system is unibyte (Bug#26396).

7 years ago; Fix typo in error messages (Bug#26034)
Christian Garbs [Wed, 8 Mar 2017 20:13:57 +0000 (21:13 +0100)]
; Fix typo in error messages (Bug#26034)

Copyright-paperwork-exempt: yes

7 years agoFix org-agenda's command for calendar-lunar-phases
Teemu Likonen [Sun, 16 Apr 2017 13:14:22 +0000 (16:14 +0300)]
Fix org-agenda's command for calendar-lunar-phases

Function org-agenda-phases-of-moon tries to call a non-existing
function calendar-phases-of-moon. The correct function is
calendar-lunar-phases.

7 years agoTuning for `separate' Tramp syntax
Michael Albinus [Sun, 16 Apr 2017 14:51:24 +0000 (16:51 +0200)]
Tuning for `separate' Tramp syntax

* lisp/net/tramp.el (tramp-method-regexp): Fix it for `separate' syntax.
(tramp-completion-file-name-regexp-separate): Simplify.

* test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect-separate):
Extend test.

7 years agoFix bug #26529: C-h k errors with a lambda function bound to a key.
Alan Mackenzie [Sun, 16 Apr 2017 10:01:09 +0000 (10:01 +0000)]
Fix bug #26529: C-h k errors with a lambda function bound to a key.

* lisp/help-fns.el (help-fns--signature, describe-function-1): Check
`function' is a symbol before trying to get property `reader-construct' from
it.

7 years agoFix highlighting of short selectors in CSS mode
Simen Heggestøyl [Sun, 16 Apr 2017 09:55:33 +0000 (11:55 +0200)]
Fix highlighting of short selectors in CSS mode

* lisp/textmodes/css-mode.el (css--font-lock-keywords): Highlight
selectors where the part before a colon is only one character long,
such as `a:hover'.

7 years agoFix redisplay performance problems with some fonts
Eli Zaretskii [Sun, 16 Apr 2017 07:43:22 +0000 (10:43 +0300)]
Fix redisplay performance problems with some fonts

* src/font.c (font_list_entities): Revert part of the changes
introduced on Apr 2, 2014 to fix bug#17125.  It turns out having
zero_vector in the font-cache is an important indication that
cannot be removed.  (Bug#21028)

7 years agoAdd assertion to STRING_SET_CHARS
Eli Zaretskii [Sun, 16 Apr 2017 07:27:23 +0000 (10:27 +0300)]
Add assertion to STRING_SET_CHARS

* src/lisp.h (STRING_SET_CHARS): Add an assertion and commentary
to prevent incorrect usage.  For details, see this discussion:
http://lists.gnu.org/archive/html/emacs-devel/2017-04/msg00412.html.

7 years agoAvoid compilation warnings on MS-Windows
Eli Zaretskii [Sun, 16 Apr 2017 07:12:42 +0000 (10:12 +0300)]
Avoid compilation warnings on MS-Windows

* src/w32term.c (w32_read_socket): Avoid compiler warnings about
parentheses around assignment.
* src/w32fns.c (w32_createwindow): Remove unused variable
dwStyle.  Use "|=" where appropriate.

7 years agoMerge from gnulib
Paul Eggert [Sun, 16 Apr 2017 05:22:49 +0000 (22:22 -0700)]
Merge from gnulib

This incorporates:
2017-04-14 intprops: try to avoid tickling similar bugs
2017-04-14 intprops: port to Oracle Studio 12.3 x86
* doc/misc/texinfo.tex, lib/intprops.h: Copy from gnulib.

7 years agoFix bugs in `with-displayed-buffer-window' and `fit-window-to-buffer'
Martin Rudalics [Sat, 15 Apr 2017 14:16:26 +0000 (16:16 +0200)]
Fix bugs in `with-displayed-buffer-window' and `fit-window-to-buffer'

* lisp/window.el (with-displayed-buffer-window): When a
'window-height' action alist entry specifies a function, call
`temp-buffer-window-show' with a '(window-height . t)' dummy
entry so `window--try-to-split-window' will bind
`window-combination-limit' to t and that function does not
resize any other window but the one we split this one off
(Bug#25055, Bug#25179).
(fit-window-to-buffer): Call `window-max-delta' with NOUP t so
we steal space only from windows in the same combination.
Stealing space from other windows would not allow us to return
that space later when this window is deleted (Bug#25055,
Bug#25179).

7 years agoAvoid userlock queries hanging forever in batch mode
Glenn Morris [Sat, 15 Apr 2017 01:18:07 +0000 (21:18 -0400)]
Avoid userlock queries hanging forever in batch mode

* lisp/userlock.el (ask-user-about-lock)
(ask-user-about-supersession-threat): Abort in batch mode.

7 years ago; Spelling and minor wording fixes
Paul Eggert [Fri, 14 Apr 2017 19:42:03 +0000 (12:42 -0700)]
; Spelling and minor wording fixes

7 years agoFix segfault when calling frame_ancestor_p (Bug#26493)
Martin Rudalics [Fri, 14 Apr 2017 10:14:09 +0000 (12:14 +0200)]
Fix segfault when calling frame_ancestor_p (Bug#26493)

* src/xterm.c (handle_one_xevent): Check that hf was not reset
before calling frame_ancestor_p (Bug#26493).

7 years agoA few additional copy-edits in documentation of frames
Martin Rudalics [Fri, 14 Apr 2017 07:26:03 +0000 (09:26 +0200)]
A few additional copy-edits in documentation of frames

* doc/lispref/frames.texi (Frame Layout)
(Implied Frame Resizing): Windows -> MS-Windows.
(Deleting Frames): Fix typo.

7 years agoUse user-error for some ert.el errors
Glenn Morris [Fri, 14 Apr 2017 01:17:09 +0000 (21:17 -0400)]
Use user-error for some ert.el errors

* lisp/emacs-lisp/ert.el (ert-read-test-name, ert-delete-all-tests)
(ert-results-find-test-at-point-other-window, ert-describe-test):
Use user-error.

7 years agoUse user-error for customize's "invalid face" error
Glenn Morris [Fri, 14 Apr 2017 00:17:08 +0000 (20:17 -0400)]
Use user-error for customize's "invalid face" error

* lisp/cus-edit.el (customize-face): Use user-error.
(debug-ignored-errors): No more need to add "Invalid face".

7 years agoRemove duplicate lisp-eval-defun definition
Glenn Morris [Fri, 14 Apr 2017 00:15:34 +0000 (20:15 -0400)]
Remove duplicate lisp-eval-defun definition

* lisp/emacs-lisp/lisp-mode.el (lisp-eval-defun):
Autoload rather than defining a stub.

7 years ago* lisp/Makefile.in (check-defun-dups): Ignore obsolete files.
Glenn Morris [Fri, 14 Apr 2017 00:14:01 +0000 (20:14 -0400)]
* lisp/Makefile.in (check-defun-dups): Ignore obsolete files.