1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-25 05:52:42 -08:00
Commit graph

130436 commits

Author SHA1 Message Date
Stefan Monnier
94a5064675 * lisp/cedet/semantic/db-global.el: Make dynbind use explicit
(semanticdb--ih): Declare.
(semanticdb-enable-gnu-global-databases): Use it instead of `ih'.
(semanticdb-enable-gnu-global-in-buffer, semanticdb-get-database-tables)
(semanticdb-find-tags-for-completion-method): Silence compiler warning.
2017-03-02 02:23:45 -05:00
Stefan Monnier
2c18969c81 * lisp/help-fns.el (describe-variable): Use cl-print for the value
Use `pp-buffer' rather than `pp' so as to avoid calling prin1 twice.
2017-03-02 02:08:32 -05:00
Glenn Morris
41f91d367a * test/lisp/net/puny.el: New file. 2017-03-01 20:36:19 -05:00
Glenn Morris
8c1e16bee4 Small puny.el fix
* lisp/net/puny.el (puny-decode-string-internal):
Handle strings with no ascii parts.  (Bug#23688)
2017-03-01 20:35:41 -05:00
Glenn Morris
8244357283 Small recover-this-file improvement
* lisp/files.el (recover-this-file): Explicit error if not
visiting a file.  (Bug#23671)
2017-03-01 18:29:48 -05:00
Noam Postavsky
6e788ef0e2 ; etc/PROBLEMS: Explain about the python+libedit problem (Bug#25753). 2017-03-01 17:56:20 -05:00
Glenn Morris
79abec2fee Fix for coding-system completion (bug#23670)
* lisp/international/mule.el (read-buffer-file-coding-system):
Ensure that completion-pcm--delim-wild-regex is enclosed in parens,
so that completion-pcm--pattern->regex can append "*?".
2017-03-01 16:53:08 -05:00
Paul Eggert
207ee94b1d Fix rounding error in ‘ceiling’ etc.
Without this fix, (ceiling most-negative-fixnum -1.0) returns
most-negative-fixnum instead of correctly signaling range-error,
and similarly for floor, round, and truncate.
* configure.ac (trunc): Add a check, since Gnulib’s doc says
‘trunc’ is missing from MSVC 9.  The Gnulib doc says ‘trunc’ is
also missing from some other older operating systems like Solaris
9 which I know we don’t care about any more, so MSVC is the only
reason to worry about ‘trunc’ here.
* src/editfns.c (styled_format): Formatting a float with %c is now an
error.  The old code did not work in general, because FIXNUM_OVERFLOW_P
had rounding errors.  Besides, the "if (FLOATP (...))" was in there
only as a result of my misunderstanding old code that I introduced
2011.  Although %d etc. is sometimes used on floats that represent
huge UIDs or PIDs etc. that do not fit in fixnums, this cannot
happen with characters.
* src/floatfns.c (rounding_driver): Rework to do the right thing
when the intermediate result equals 2.305843009213694e+18, i.e.,
is exactly 1 greater than MOST_POSITIVE_FIXNUM on a 64-bit host.
Simplify so that only one section of code checks for overflow,
rather than two.
(double_identity): Remove.  All uses changed to ...
(emacs_trunc): ... this new function.  Add replacement for
platforms that lack ‘trunc’.
* src/lisp.h (FIXNUM_OVERFLOW_P, make_fixnum_or_float):
Make it clear that the arg cannot be floating point.
* test/src/editfns-tests.el (format-c-float): New test.
* test/src/floatfns-tests.el: New file, to test for this bug.
2017-03-01 12:47:28 -08:00
Glenn Morris
ebb105054a Small help--loaded-p fix
* lisp/help-fns.el (help--loaded-p): Handle entry in load-history
with nil file name.  (Bug#25847)
2017-03-01 14:35:29 -05:00
Leo Liu
03f64ebbc6 * src/fns.c (Fbuffer_hash): Doc fix. 2017-03-01 16:15:21 +08:00
Eric Abrahamsen
16e304f38e Don't use mapconcat with chars in gnus registry marks (Bug#25839)
* lisp/gnus/gnus-registry.el (gnus-registry-article-marks-to-chars):
Instead, use a plain concat, which will create a string out of a list
of characters.
2017-02-28 21:57:07 -05:00
Noam Postavsky
b7250496bd Fix epg-tests with dummy-pinentry program (Bug#23619)
* test/data/epg/dummy-pinentry: New file.
* test/lisp/epg-tests.el (with-epg-tests): Add it to gpg-agent.conf
when a passphrase is required.  Add debug declaration.  Set
GPG_AGENT_INFO non-destructively.
2017-02-28 19:57:35 -05:00
Phillip Lord
7b5e1c8238 Speed generation of ldefs-boot-auto
Previously, generation of ldefs-boot-auto required at least one full
bootstrap and, in extreme cases, two. Now, from build system, it
requires the same time as taken to dump Emacs.

* Makefile.in: Remove all calls, pass to src.
* admin/ldefs-clean.el: Update for changed messages.
* lisp/Makefile.in (compile-first-delete): Add.
* lisp/ldefs-boot-auto.el: Update.
* src/Makefile.in (generate-ldefs-boot): Add.
2017-02-28 21:32:49 +00:00
Phillip Lord
7572740653 Add error handling to magic-mode-alist
* lisp/files.el (set-auto-mode): Add explicit error handling in two
  places.
2017-02-28 21:12:59 +00:00
Phillip Lord
1b94630518 Remove conditional includes from bootstrap
Previously, bootstrap-emacs includes optional functionality, depending
on the platform which is not needed for bootstrap function.  As a
result, bootstrap-emacs contains different functions in different
circumstances.  If ldefs-boot-auto.el is generated, then loaded
functions will not be added to ldefs-boot-auto.el, although they may be
required during some builds.  With this change, bootstrap-emacs should
always behave the same way and, therefore, require the same autoloads.

 * lisp/loadup.el: No longer load optional includes during bootstrap
   dumping.
 * lisp/ldefs-boot-auto.el: Regenerate.
 * lisp/ldefs-boot-manual.el: Add two autoloads.
2017-02-28 21:12:59 +00:00
Phillip Lord
514a14ffd8 Do not use find-file non-interactively
* lisp/international/titdic-cnv (miscdic-convert): Use
   insert-file-contents in place of find-file.
2017-02-28 21:12:59 +00:00
Stefan Monnier
c2469c50e8 * src/xdisp.c (overlay_arrows_changed_p): Fix return value and doc
(update_overlay_arrows): Skip non-markers.
2017-02-28 14:00:17 -05:00
Ken Brown
f8e36e04c4 ; * src/w32fns.c (w32_wnd_proc): Adjust comment. 2017-02-28 11:59:12 -05:00
Ken Brown
57f5ab8c40 Try to avoid hang when logging out of MS-Windows
* src/w32term.c (x_update_window_begin, x_update_window_end)
(my_show_window, my_set_window_pos, my_set_focus)
(my_set_foreground_window, my_destroy_window)
(my_bring_window_to_top, x_iconify_frame): Replace calls to
SendMessage by calls to SendMessageTimeout with a 6-second
timeout.  (Bug#25875)
2017-02-28 11:25:00 -05:00
Stefan Monnier
122d2d675c * lisp/textmodes/reftex-toc.el (reftex-re-enlarge): Demote errors. 2017-02-28 11:15:24 -05:00
Stefan Monnier
0fa5941727 * doc/misc/eieio.texi: Update to account for the cl-generic facilities
(Quick Start, Class Options, Generics): Adjust names for cl-generic.
(Methods): Document cl-defmethod.
Explain in more detail the order in which the various
methods are executed.  Document the conditions under which a method
is redefined.  Remove reference to `eieio-generic-call-arglst`.
Don't document the precise return value of cl-next-method-p.
(Static Methods): Adjust to use `subclass` specializer.
(Method Invocation): Use cl-call-next-method and drop mention of :primary.
(Signal Handling, Signals): Adjust names and args for cl-generic; add
cl-no-primary-method.
(CLOS compatibility, Wish List): Adjust to new featureset.
2017-02-28 11:11:01 -05:00
Stefan Monnier
8d7a3f4890 * lisp/cedet/mode-local.el (define-mode-local-override): Declare doctring. 2017-02-28 09:41:04 -05:00
Stefan Monnier
a3069604d5 * lisp/nxml/nxml-mode.el (nxml-mode): Use new sgml-syntax-propertize. 2017-02-28 09:35:25 -05:00
Stefan Monnier
0055190174 * lisp/textmodes/sgml-mode.el: syntax-propertize <![CDATA and <?..?>
(sgml-syntax-propertize-function): Mark <![CDATA and <?..?>.
(sgml-syntax-propertize-inside): New fun.
2017-02-28 09:34:13 -05:00
Stefan Monnier
fe578ae4dd * lisp/textmodes/css-mode.el (css-completion-at-point): Auto-insert
": ;" after completing a property.
2017-02-28 09:29:06 -05:00
Tino Calancha
0e355e7816 Show Ibuffer and jump to line listing current buffer
* lisp/ibuffer.el (ibuffer-jump): New command (Bug#25577).
; * etc/NEWS: Add entry for it.
2017-02-28 11:47:45 +09:00
Juri Linkov
499b43d4cc * lisp/vc/add-log.el (change-log-next-buffer): Check if file exists
before adding it to the list of files.
2017-02-28 00:53:46 +02:00
Juri Linkov
61881d32ad Put text properties on query-replace separator string instead of "\0"
* lisp/replace.el (query-replace--split-string):
Split at a substring instead of just character.
(query-replace-read-from): Put text properties on the
separator string instead of "\0".  (Bug#25482)
2017-02-28 00:50:57 +02:00
Juri Linkov
3bf717b05b Add file name and its extension to suggestions in dired-mark-files-regexp
* lisp/dired.el (dired-mark-files-regexp): Add file name
and its extension to the list of suggested defaults.  (Bug#25578)
2017-02-28 00:45:21 +02:00
Chunyang Xu
50a2ccd87e Prompt default extension in dired-mark-extension
* lisp/dired-x.el (dired-mark-extension): Prompt default extension
based on extension of file at point.  (Bug#25578)

Copyright-paperwork-exempt: yes
2017-02-28 00:41:56 +02:00
Tino Calancha
4daca38d5c Prevent for consing in cl-mapc and cl-mapl
* lisp/emacs-lisp/cl-extra.el (cl--mapcar-many): Add optional arg ACC;
If non-nil, accumulate values in the result (Bug#25826).
(cl-mapc): Do computations inside function instead of call cl-map.
(cl-mapl): Do computations inside function instead of call cl-maplist.
* lisp/emacs-lisp/cl-lib.el (mapcar): Add autoload cookie.
Call cl--mapcar-many with non-nil 3rd argument.
* test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-map)
(cl-extra-test-mapc, cl-extra-test-mapcar, cl-extra-test-mapl)
(cl-extra-test-maplist): New tests.
2017-02-27 16:32:10 +09:00
Tino Calancha
841e3e377c Choose the right target dir on dired operations
Prevent from changing the input target dir
when dired-dwim-target is non-nil (Bug#25609).
* lisp/dired-aux.el (dired-do-create-files):
If dired-dwim-target is non-nil, then bind 'default' to nil.
* test/lisp/dired-tests.el (dired-test-bug25609): Add test.
2017-02-27 16:26:06 +09:00
Stefan Monnier
fd8f724147 * src/xdisp.c (overlay_arrows_changed_p): Fix last change. 2017-02-27 00:06:08 -05:00
Noam Postavsky
4676542062 Don't record eshell/clear "command" in history (Bug#25838)
`eshell/clear' is implemented by sending a series of blank lines,
which is not a useful thing to have in the history.

* lisp/eshell/em-hist.el (eshell-input-filter-default): Use
`string-blank-p' which does check for newlines (even though newlines
have comment-end syntax, not whitespace syntax class).
* lisp/eshell/esh-mode.el (eshell/clear): Remove
`eshell-add-to-history' from `eshell-input-filter-functions' while
sending the blank lines.  This change is needed to solve the bug if
the user customizes `eshell-input-filter' to something that doesn't
filter newlines.
2017-02-26 20:39:11 -05:00
Paul Eggert
d83c75ec19 Remove a few unused C functions
* src/eval.c (let_shadows_global_binding_p):
* src/print.c (write_string):
* src/systhread.c (sys_mutex_destroy, sys_thread_equal):
Remove.
* src/print.c (write_string): Rename from write_string_1.
All uses changed.
2017-02-26 09:58:25 -08:00
Eli Zaretskii
d8899b9d1b Avoid segfault in overlay_arrows_changed_p
* src/xdisp.c (overlay_arrows_changed_p): Fix recent change
to avoid a segfault.
2017-02-26 19:52:22 +02:00
Noam Postavsky
6b6cc56e72 Don't call package--ensure-init-file if initialized during startup
* lisp/emacs-lisp/package.el (package-initialize): Check
`after-init-time' rather than `load-file-name' to decide if
`package--ensure-init-file' should be called.  Depending on
`load-file-name' will fail if the user calls `pacakge-initialize' in
file which is loaded from the init file (Bug#24643, Bug#25819).
2017-02-26 11:11:40 -05:00
Eli Zaretskii
2bb467a2e2 Fix display of before- and after-strings at invisible text
* src/xdisp.c (next_overlay_string): Don't raise the
ignore_overlay_strings_at_pos_p flag if the iterator is already
set to continue at a buffer position different from the one
where the overlay strings we just processed were loaded.  (Bug#25856)
2017-02-26 17:56:13 +02:00
Michael Albinus
618310c22d Work on `tramp-completion-mode-p'
* etc/NEWS: Say that `tramp-completion-mode' is obsolete.

* lisp/net/tramp.el (tramp-completion-mode): Make it obsolete.
(tramp-completion-mode-p): Reintroduce the check for 'tab.
2017-02-26 12:45:06 +01:00
Tom Tromey
8db75f0ef9 Use font-lock-doc-face in js-mode
Bug#25858:
* lisp/progmodes/js.el (js-font-lock-syntactic-face-function): New
defun.
(js-mode): Use it.
* test/lisp/progmodes/js-tests.el (js-mode-doc-comment-face): New
test.
2017-02-25 14:02:37 -07:00
Noam Postavsky
546d30ed14 Don't use IP 0.0.0.0 for package test server (Bug#22582)
* test/lisp/emacs-lisp/package-resources/package-test-server.py: Set
'server_address' when port number is given on the command line.  Print
IP and port number as a URL, and flush it after printing.
* test/lisp/emacs-lisp/package-tests.el:
(package-test-update-archives-async): Grab the whole URL from server
output.
2017-02-25 12:56:09 -05:00
Tom Tromey
9e9d381ff0 Add more branch support to vc-dir
Bug#25859:
* lisp/vc/vc-dir.el (vc-dir-mode-map) Add "B" bindings.
* lisp/vc/vc.el (vc-revision-history): New defvar.
(vc-read-revision): Use vc-revision-history.
(vc-print-branch-log): New function.
* doc/emacs/maintaining.texi (VC Directory Commands): Document new
bindings.
* etc/NEWS: Mention new vc-dir bindings.
2017-02-25 10:46:13 -07:00
Alan Mackenzie
54319e7a24 Allow for the :: operator in C++ "enum class" declarations.
* lisp/progmodes/cc-engine.el (c-backward-typed-enum-colon): Check for
"::".
2017-02-25 14:53:59 +00:00
Michael Albinus
d79fd6c95e Fix bug#25854
* lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls):
Simplify error handling for huge inodes.
(tramp-convert-file-attributes): Handle very huge inodes.  (Bug#25854)
2017-02-25 15:02:10 +01:00
Eli Zaretskii
a3c9a554f1 Avoid leaving garbage on screen when using 'raise' display property
* src/xdisp.c (display_line): Reset voffset value of the iterator
when it hits ZV, to avoid "inheriting" it to glyph rows past ZV,
which then leaves stuff on screen that needs to be cleared by
redisplay.  (Bug#25855)
2017-02-25 13:40:23 +02:00
Eli Zaretskii
640661838d Fix doc strings in info.el
* lisp/info.el (Info-selection-hook, Info-mode-hook)
(Info-edit-mode-hook): Doc fixes.  (Bug#25794)
2017-02-25 10:52:11 +02:00
Eli Zaretskii
c1ed1525c6 ; * src/keyboard.c (Fposn_at_point): Fix last change. 2017-02-25 10:41:21 +02:00
Eli Zaretskii
eed96776b1 Fix doc string of 'posn-at-point'
* src/keyboard.c (Fposn_at_point): Clarify the doc string.
(Bug#25796)
2017-02-25 10:40:13 +02:00
Peder O. Klingenberg
ecbd5f9ac6 New option -u / --suppress-output to emacsclient
* lib-src/emacsclient.c (print_help_and_exit, longopts)
(decode_options, main): Implement new option --suppress-output / -u to
suppress printing of eval-results.
* doc/emacs/misc.texi (emacsclient Options): Document the new
"--suppress-output/-u" options.
* etc/NEWS: Mention the new options.
2017-02-25 10:30:46 +02:00
Noam Postavsky
f0e7f39e0b Fix scrolling with partial line corner case (Bug#25792)
Also fix up the scrolling tests so that they don't make so many
assumptions about the current window configuration.

* src/xdisp.c (try_window): Take partial line height into account when
comparing cursor position against scroll margin.

* test/manual/scroll-tests.el (scroll-tests-with-buffer-window): Add
HEIGHT argument, to allow setting up window with exact height and
partial line.
(scroll-tests-display-buffer-with-height): New display-buffer action
function.
(scroll-tests-scroll-margin-over-max):
(scroll-tests--scroll-margin-whole-window): Pass HEIGHT to
`scroll-tests--scroll-margin-whole-window'.
(scroll-tests-conservative-show-trailing-whitespace): New test.
(scroll-tests-scroll-margin-negative): Fix line counting.
(scroll-tests--point-in-middle-of-window-p): Set window height
properly.
2017-02-24 23:15:40 -05:00