1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-22 18:35:09 +00:00
Commit Graph

129133 Commits

Author SHA1 Message Date
Glenn Morris
2d0a3feda6 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.
2017-04-24 19:51:20 -04:00
Alan Third
53f8f4bf2d Fix XBM colour rendering in NS port (bug#22060)
src/nsimage.m (setXBMColor): Fix calculation of xbm_fg.
2017-04-24 10:26:20 +01:00
Vibhav Pant
2205546269 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.
2017-04-24 11:57:46 +05:30
Lars Ingebrigtsen
e589018b48 Add image sizing tests for an image that's narrow 2017-04-24 07:56:31 +02:00
Lars Ingebrigtsen
fe304efa51 Needlessly refactor tests for clarity 2017-04-24 07:47:09 +02:00
Philipp Stephani
a1f93c1dfa 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.
2017-04-23 18:42:42 +02:00
Martin Rudalics
a02885a370 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).
2017-04-23 10:52:56 +02:00
Noam Postavsky
b20d05c6d7 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'.
2017-04-22 23:17:59 -04:00
Andrew G Cohen
5317193fe5 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.
2017-04-23 09:05:49 +08:00
Andrew G Cohen
03f6388892 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.
2017-04-23 08:25:02 +08:00
Andrew G Cohen
ea9acccd64 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.
2017-04-23 08:13:09 +08:00
Andrew G Cohen
6df3eea938 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.
2017-04-23 08:08:42 +08:00
Noam Postavsky
6fa9cc0593 ; Merge: improve indent-sexp and lisp-indent-region performance 2017-04-22 14:18:46 -04:00
Noam Postavsky
4713dd425b 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'.
2017-04-22 14:09:58 -04:00
Noam Postavsky
2f6769f9cd 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'.
2017-04-22 14:09:58 -04:00
Noam Postavsky
8bb5d7adaf * lisp/emacs-lisp/lisp-mode.el (indent-sexp): Clean up marker. 2017-04-22 14:09:57 -04:00
Noam Postavsky
43c84577a3 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.
2017-04-22 14:09:57 -04:00
Vibhav Pant
66dc8dd6d1 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.
2017-04-22 22:08:16 +05:30
Vibhav Pant
1c91bc9221 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.
2017-04-22 22:08:15 +05:30
Philipp Stephani
ace38bafa6 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.
2017-04-22 18:33:38 +02:00
Alan Mackenzie
d354fc3828 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).
2017-04-22 14:45:24 +00:00
Philipp Stephani
eb52828a43 Fix usage of FRAME_Z_GROUP
* src/nsterm.m (initFrameFromEmacs:): FRAME_Z_GROUP does not return a
Lisp object, cf. Bug#26597.
2017-04-22 13:54:08 +02:00
Alan Third
401e41df0c 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.
2017-04-22 10:42:35 +01:00
Alan Third
d812d20fbc 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.
2017-04-21 20:44:35 +01:00
Glenn Morris
784602b105 ; Add release notice 2017-04-21 15:27:59 -04:00
Stefan Monnier
a3b8618d79 Improve prefix handling for dash.el
* lisp/emacs-lisp/autoload.el (autoload--make-defs-autoload):
Don't drop dash's "-<letter>" prefixes.
2017-04-21 12:14:59 -04:00
Stefan Monnier
89898e43c7 * lisp/emacs-lisp/cl-macs.el: Fix symbol-macrolet
Revert 0d112c00ba (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.
2017-04-21 12:12:42 -04:00
Eli Zaretskii
72d7961d67 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)
2017-04-21 11:10:14 +03:00
Lars Ingebrigtsen
b1fe497a44 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.
2017-04-21 06:13:06 +02:00
Lars Ingebrigtsen
0ca61907cf Allow svg-image to take all create-image PROPS
* lisp/svg.el (svg-image): Allow passing in PROPS when
creating an image for convenience.
2017-04-21 06:13:06 +02:00
George D. Plymale II
e8875bcbe0 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
2017-04-20 23:03:10 -04:00
Reuben Thomas
a6b375ba4b 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'.
2017-04-20 22:39:15 -04:00
Stefan Monnier
d490770dd0 * lisp/vc/vc-hg.el (vc-hg-state-fast): Fix compiler warning
by simplifying ascii-test.
2017-04-20 17:38:21 -04:00
Vibhav Pant
b389379c87 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.
2017-04-20 21:23:08 +05:30
Nicolas Petton
3a34412caa Set Emacs version to 25.2 and update AUTHORS file
* README: Set Emacs version to 25.2.
* etc/HISTORY: Add release log.
* lisp/ldefs-boot.el:
* etc/AUTHORS:
* ChangeLog.2: Update.
2017-04-20 17:29:11 +02:00
Noam Postavsky
4364a769b4 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.
2017-04-19 23:11:44 -04:00
Noam Postavsky
56a4461a48 ; Move stray item from admin/notes/repo to CONTRIBUTE
* admin/notes/repo: Remove stray item.
* CONTRIBUTE: Move it here, fix incorrect references to "branch".
2017-04-19 21:43:05 -04:00
Stefan Monnier
cd56490fef 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`.
2017-04-19 20:43:41 -04:00
Glenn Morris
992e2019d3 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.
2017-04-19 16:32:04 -04:00
Glenn Morris
41a5b76f79 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.
2017-04-19 16:28:48 -04:00
Alan Third
3533623c4a Note frame documentation exceptions for NS builds
* doc/lispref/frames.texi (Management Parameters, Child Frames): Note
NS differences.
2017-04-19 20:48:13 +01:00
Alan Third
21fa90b048 Fix bug introduced by my last commit
* src/nsterm.m (ns_draw_fringe_bitmap): Revert key-mashing accident.
2017-04-19 17:58:49 +01:00
Alan Third
aca21d42d3 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.
2017-04-19 17:17:35 +01:00
Noam Postavsky
2b0d111819 ; CONTRIBUTE: Remove stray header. 2017-04-19 09:47:35 -04:00
Glenn Morris
b6a57fb80c 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.
2017-04-18 20:52:22 -04:00
Glenn Morris
0f83433946 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.
2017-04-18 19:07:28 -04:00
michael schuldt
d831312d66 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
2017-04-18 11:25:13 -07:00
Glenn Morris
0c98dec5c9 * test/lisp/kmacro-tests.el: Require seq, for seq-concatenate. 2017-04-18 13:02:02 -04:00
Glenn Morris
491531b20d 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
2017-04-18 12:52:33 -04:00
Eli Zaretskii
f2ab09ec60 Fix a typo in indexing the user manual
* doc/emacs/cmdargs.texi (General Variables): Fix a horrible typo.
2017-04-18 19:33:08 +03:00