1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00
Commit Graph

64949 Commits

Author SHA1 Message Date
Paul Eggert
af32fa9562 New optional ZONE arg for format-time-string etc.
This simplifies time conversions in other time zones.
It also prevents display-time-world tampering with TZ (Bug#21020).
* admin/admin.el (add-release-logs):
Use improved add-log-time-format API.
* admin/merge-gnulib (GNULIB_MODULES): Add time_rz, timegm.
(GNULIB_TOOL_FLAGS): Avoid flexmember, setenv, unsetenv.
* configure.ac (tzalloc): Remove test for this, since
Emacs no longer uses HAVE_TZALLOC directly.
* doc/lispref/os.texi (Time of Day, Time Conversion)
(Time Parsing):
* etc/NEWS: Document the new behavior.
Merge from gnulib, incorporating:
2015-07-25 strftime: fix newly-introduced bug on Solaris
2015-07-23 fprintftime, strftime: use timezone_t args
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/strftime.c, lib/strftime.h, lib/time.in.h, m4/sys_time_h.m4:
* m4/time_h.m4:
Update from gnulib.
* lib/time_rz.c, lib/timegm.c, m4/time_rz.m4, m4/timegm.m4:
New files from gnulib.
* lisp/time-stamp.el (time-stamp-string):
* lisp/time.el (display-time-world-list)
(display-time-world-display):
Use new API, with time zone arg.
* lisp/time.el (display-time-world-display):
Fix race when current-time advances while we're running.
* lisp/vc/add-log.el (add-log-iso8601-time-zone)
(add-log-iso8601-time-string): Accept optional time zone arg.
* lisp/vc/add-log.el (add-change-log-entry):
* lisp/vc/log-edit.el (log-edit-changelog-ours-p): Use new arg.
* nt/gnulib.mk: Propagate lib/gnulib.mk changes here.
Add rules for the time module, since they're now needed
for tzalloc etc.
* src/conf_post.h (getenv_TZ, setenv_TZ): New macros.
(emacs_getenv_TZ, emacs_setenv_TZ): New decls.
* src/editfns.c: Include errno.h.
(set_time_zone_rule): Omit unnecessary forward decl.
(initial_tz): Remove, replacing with ...
(local_tz, wall_clock_tz, utc_tz): New static vars and constants.
(tzeqlen): New constant; prefer it to (sizeof "TZ=" - 1).
(emacs_localtime_rz, emacs_mktime_z, xtzalloc, xtzfree)
(tzlookup): New static functions.
(init_editfns): New arg DUMPING.  All uses changed.
(init_editfns): Omit most initialization if dumping, not if
!initialized.  Initialize wall_clock_tz and local_tz.
(emacs_nmemftime, format_time_string): Time zone argument can now
be any time zone, not just a boolean for UTC or local time.  All
callers changed.
(Fformat_time_string, Fencode_time, Fcurrent_time_string)
(Fcurrent_time_zone): New optional arg ZONE.
(Fdecode_time, Fset_time_zone_rule): ZONE arg can now also take
the same form as with the other new additions.
(decode_time_zone): Remove; no longer needed.
(tzvalbuf): Now file-scope.
(emacs_getenv_TZ, emacs_setenv_TZ): New functions.
(syms_of_editfns): Define Qwall.
* src/editfns.c (mktime_z) [!HAVE_TZALLOC]:
* src/systime.h (mktime_z, timezone_t, tzalloc, tzfree)
[!HAVE_TZALLOC]:
Remove; now supplied by gnulib.
* src/emacs.c (main):
* src/lisp.h (init_editfns): Adjust to init_editfns API change.
2015-07-26 12:44:54 -07:00
Shigeru Fukaya
4c55786d9b Fix infinite loop in delete-consecutive-dups
* lisp/subr.el (delete-consecutive-dups): Work even if the last
element is nil (Bug#20588).  Avoid rescan of a circular list in
deletion of last element.
2015-07-26 10:43:28 -07:00
Eli Zaretskii
5e63841f28 Fix flyspell-check-previous-highlighted-word
* lisp/textmodes/flyspell.el
(flyspell-check-previous-highlighted-word): Really accept a
numeric argument, as the doc string describes.  Fix an off-by-one
error in looking up overlays, so invocation with point immediately
after a word would check that word.  Clarify the doc string as
Suggested by N. Jackson <nljlistbox2@gmail.com>.  (Bug#21129)
2015-07-25 12:35:16 +03:00
Harald Hanche-Olsen
c1ff88c0ce Pass lambdas to `skeleton-read'
* lisp/skeleton.el (skeleton-read): Allow PROMPT to be a function.

* lisp/textmodes/sgml-mode.el (sgml-attributes, sgml-value): Pass
lambdas to `skeleton-read' (bug#20386).

Copyright-paperwork-exempt: yes
2015-07-24 19:27:56 +03:00
Eli Zaretskii
de576a55d8 Don't require GUI frames and mouse for Flyspell menus
* lisp/textmodes/flyspell.el (flyspell-correct-word-before-point)
(flyspell-emacs-popup): Require neither a GUI frame nor mouse
support, since pop-up menus work with text terminals and can be
controlled via the keyboard.
2015-07-24 10:47:05 +03:00
Michael Albinus
8e03731cb9 Fix some Tramp problems with HP-UX
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Add "tab0" to stty call.

* test/automated/tramp-tests.el (tramp-persistency-file-name):
Set to nil.
(tramp--test-hpux-p): New defun.
(tramp--test-utf8): Use it.
2015-07-23 21:49:40 +02:00
Dmitry Gutov
a0b8421e3b ; xref-find-regexp: (require 'grep), for grep-read-files 2015-07-22 23:08:50 +03:00
Eli Zaretskii
e48a116780 Fix point positioning in ffap-next-guess
* lisp/ffap.el (ffap-url-at-point): Set ffap-string-at-point-region,
as our callers expect.  This was clobbered as part of fixing
bug#5673.  (Bug#21107)
(ffap-gopher-at-point): Set ffap-string-at-point-region.
2015-07-22 18:35:16 +03:00
Martin Rudalics
fa1463896d Fix customization type of `even-window-sizes'.
* lisp/window.el (even-window-sizes): Fix customization type.
2015-07-22 12:34:41 +02:00
Martin Rudalics
59526c325e 2015-07-22 Martin Rudalics <rudalics@gmx.at>
Optionally even widths of `display-buffer' windows.  (Bug#21100)

* lisp/window.el (quit-restore-window): Restore width if
requested.
(display-buffer-record-window): Record width when window is
reused and horizontally combined.
(even-window-sizes): New option to allow evening window widths.
(even-window-heights): Defalias to `even-window-sizes'.
(window--even-window-heights): Rename to
`window--even-window-sizes'.  Handle side-by-side windows.
(display-buffer-use-some-window): Call `window--even-window-sizes'
instead of `window--even-window-heights'.
* lisp/help.el (resize-temp-buffer-window): Fix indentation.

* doc/lispref/windows.texi (Choosing Window Options): Describe
`even-window-sizes'.
(Coordinates and Windows): Fix typo.
2015-07-22 12:20:13 +02:00
Stephen Leake
fed091f7c2 add file name to autoload error messages.
* lisp/emacs-lisp/autoload.el (autoload-save-buffers): add condition-case
  to add file name to error message.
2015-07-22 04:31:44 -05:00
Michael Albinus
4f855d6fc9 Use 0.0.0.1 as test host in Tramp
* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Use 0.0.0.1 as test host.
2015-07-22 07:54:48 +02:00
Stefan Monnier
5abadebc35 (advice--called-interactively-skip): Fix inf-loop (bug#21083)
* lisp/emacs-lisp/nadvice.el (advice--called-interactively-skip):
Fix inf-loop (bug#21083).
2015-07-21 19:09:12 -04:00
Dmitry Gutov
7f58daf816 Make eldoc timer non-repeatable
* lisp/emacs-lisp/eldoc.el (eldoc-schedule-timer): Make the timer
non-repeatable.  Since it's on post-command hook, that just wasted
CPU cycles.
2015-07-21 16:58:14 +03:00
Michael Albinus
b0dbf4c038 Sync with Tramp repository
* doc/misc/tramp.texi (Configuration): Note, that Tramp must be
required prior changing its configuration.
(Connection caching, Predefined connection information)
(Remote shell setup): Fix typos.
(Predefined connection information): Describe, how to overwrite
parameters of `tramp-methods'.
(Remote programs, Remote processes, Traces and Profiles):
Simplify example.
(Remote programs): Remove superfluous comment.

* doc/misc/trampver.texi: Update release number.

* lisp/net/tramp-cache.el (tramp-connection-properties): Adapt docstring.

* lisp/net/tramp-gvfs.el (tramp-gvfs-do-copy-or-rename-file): New defun.
(tramp-gvfs-handle-copy-file, tramp-gvfs-handle-rename-file): Use it.
(tramp-gvfs-handle-make-directory): Reimplement PARENTS handling,
"gvfs-mkdir -p ..." does not work robust.
(tramp-gvfs-maybe-open-connection): Adapt `tramp-get-method-parameter' call.

* lisp/net/tramp-sh.el (tramp-methods):
Add `tramp-remote-shell-login' parameter where it fits.
(tramp-get-remote-path): Use it.
(tramp-make-copy-program-file-name): Fix quoting for "psftp" method.
(all): Adapt `tramp-get-method-parameter' calls.

* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-get-method-parameter): Replace argument METHOD by VEC.
Check also for hits in `tramp-connection-properties'.  Adapt docstring.
(tramp-get-remote-tmpdir): Cache only the local name of tmpdir.
(all): Adapt `tramp-get-method-parameter' calls.

* lisp/net/trampver.el Update release number.

* test/automated/tramp-tests.el (tramp--instrument-test-case):
Add "^make-symbolic-link not supported$" to `debug-ignored-errors'.
(tramp-test13-make-directory, tramp--test-adb-p)
(tramp--test-smb-or-windows-nt-p): Simplify.
(tramp--test-ftp-p, tramp--test-gvfs-p): New defuns.
(tramp--test-special-characters): Fix docstring.  Add gvfs and ftp tests.
(tramp--test-utf8): Fix docstring.
2015-07-21 14:59:18 +02:00
Dmitry Gutov
b6ac30ab43 Add new xref-query-replace command
* lisp/progmodes/xref.el (xref--match-buffer-bounds): New
function, extracted from xref-pulse-momentarily.
(xref-query-replace): New command.
(xref--query-replace-1): New helper function.
(xref--xref-buffer-mode-map): Add `r' binding.
2015-07-21 03:25:24 +03:00
Dmitry Gutov
4051fb202e ; Fix a typo 2015-07-21 00:44:41 +03:00
Paul Eggert
136dd7bc02 Simplify icalendar decoding of Z dates
* lisp/calendar/icalendar.el (icalendar--decode-isodatetime):
Simplify calculation of time strings with trailing "Z".
2015-07-20 09:48:02 -07:00
Dmitry Gutov
057f93499e Do not corrupt grep-find-ignored-files
* lisp/progmodes/project.el (project-ignores): Change the order of
the arguments to nconc, in order not to corrupt grep-find-ignored-files.
2015-07-20 04:42:53 +03:00
Dmitry Gutov
5330a45ebf Add xref-match-item, and use it
* lisp/progmodes/xref.el (xref-match-bounds): New generic function.
(xref-file-location): Add reader for the column slot.
(xref-match-item): New class.
(xref-match-bounds): A method implementation for it.
(xref-make-match): New constructor function.
(xref--current-item): New private variable.
(xref-pulse-momentarily): Use it.
(xref--pop-to-location): Change the first argument to an xref
item, instead of location, bind xref--current-item.
Update all callers.
(xref-next-line, xref-prev-line, xref--next-error-function)
(xref--mouse-2): Look for the property `xref-item',
instead of `xref-location'.
(xref--item-at-point): Likewise.  This function replaces
`xref-location-at-point'.  Update all callers.
(xref--insert-xrefs): Add the `xref-item' text property, instead
of `xref-location'.
(xref--collect-match): Use xref-make-match.
2015-07-20 04:32:58 +03:00
Dmitry Gutov
10ac9dbdcf Rename xref--xref to xref-item
* lisp/progmodes/xref.el (xref-item): Rename from `xref--xref'.
Update all references.
2015-07-20 03:26:01 +03:00
Dmitry Gutov
e29206e84a Rename xref description slot to summary
* lisp/progmodes/xref.el (xref--xref): Rename the `description'
slot to `summary'.
2015-07-20 03:12:32 +03:00
Dmitry Gutov
a215fe8a8d vc-hg: Perform the print-log call asynchronously
* lisp/vc/vc-hg.el (vc-hg-print-log): Perform the call
asynchronously (bug#21067).
2015-07-19 20:51:28 +03:00
Dmitry Gutov
50ad176d28 Add xref-after-jump-hook and xref-after-return-hook
* lisp/progmodes/xref.el (xref-after-jump-hook)
(xref-after-return-hook): New hooks.
(xref-pulse-on-jump): Remove, in favor of the above.
(xref-pulse-momentarily): Rename from xref--maybe-pulse.
(xref--pop-to-location, xref--display-position)
(xref-pop-marker-stack): Use the new hooks, as requested in
http://lists.gnu.org/archive/html/emacs-devel/2015-07/msg00213.html
2015-07-19 20:51:28 +03:00
Bozhidar Batsov
83fbe89537 Correct js-mode's lighter
* lisp/progmodes/js.el (js-mode): Correct the lighter.
2015-07-19 08:18:56 +03:00
Leo Liu
f7ba648def Fix a bug in cfengine3-mode
* progmodes/cfengine.el (cfengine3-mode): Handle nil
  eldoc-documentation-function.
2015-07-19 12:39:37 +08:00
Julien Danjou
82ed706469 sieve-mode: support "body" test command
* lisp/gnus/sieve-mode.el (sieve-font-lock-keywords):
Add missing "body" test command.
2015-07-19 00:11:02 +00:00
Eli Zaretskii
3d139d59fb Fix info-apropos when the default encoding is Latin-N
* lisp/info.el (Info-find-node-2): Reset the buffer's encoding to
'undecided', so that it is set to the encoding of the Info file we
are about to insert.  Otherwise, 'info-apropos' will fail to find
some index nodes in some UTF-8 encoded files, if the buffer's
previous encoding is Latin-N or some such.
2015-07-18 21:43:21 +03:00
Ivan Andrus
5d72d5d1f4 * epg.el (epg--start): Check that gpgconf can be found before calling it. 2015-07-18 09:06:46 -06:00
Eli Zaretskii
166ffcb6c7 Fix following Info cross-references to anchors
* lisp/info.el (Info-read-subfile): Add to the returned value the
length of subfile preamble, after converting it to file's byte
offset, as expected by the caller.  Use bufferpos-to-filepos.
(Info-find-node-2): If searching for a node with a
1000-character slop fails, try again with a 10000-character slop,
to account for known bugs in Texinfo 5.0 and 5.1.  (Bug#21055)

* lisp/international/mule-util.el (bufferpos-to-filepos): New
function.
* etc/NEWS: Mention bufferpos-to-filepos.
2015-07-18 13:23:22 +03:00
Dmitry Gutov
8b57f12ab7 Consider a jsdoc tag to be a beginning of a paragraph as well
* lisp/progmodes/js.el (js-mode): Change c-paragraph-start to
consider a jsdoc tag to be a beginning of a paragraph as well.
2015-07-18 04:01:30 +03:00
Artur Malabarba
6413c10131 * lisp/emacs-lisp/package.el: Fix warnings 2015-07-17 23:51:32 +01:00
Artur Malabarba
86814e7a80 * lisp/emacs-lisp/package.el (package-buffer-info):
Add author and maintainers to `package-buffer-info'.
2015-07-17 23:44:39 +01:00
Artur Malabarba
ca66737c53 * lisp/emacs-lisp/package.el: Many small changes
Replace all instances of 'face with 'font-lock-face.
(describe-package-1): Improve some strings and move the summary up the
list.
(package-install-file): Update docstring.
(package-menu-hide-package): Bind to `H'.
2015-07-17 23:42:16 +01:00
Artur Malabarba
e276b42800 * lisp/emacs-lisp/package.el (package--with-work-buffer-async):
Fix error handling.
2015-07-17 23:42:16 +01:00
Artur Malabarba
eed81d277f * lisp/obsolete/longlines.el (longlines-search-function):
Fallback on `isearch-search-fun-default'.
2015-07-17 12:39:01 +01:00
Tassilo Horn
5bd8e67c6e Support @-mentions
* rcirc.el (rcirc-completion-at-point): Support completion of
mentions/messages with @nick instead of just nick.
2015-07-17 13:18:38 +02:00
Michael Albinus
fa5a880f73 Fix Bug#20943.
* lisp/autorevert.el (auto-revert-handler): Do not check for
`buffer-modified-p'.

* lisp/files.el (buffer-stale--default-function): Check for
`buffer-modified-p'.

* test/automated/auto-revert-tests.el
(auto-revert-test02-auto-revert-mode-dired): Adapt test.
2015-07-16 20:04:07 +02:00
Ari Roponen
572cd26f3f Fix delete-dups bug on long lists
* lisp/subr.el (delete-dups):
Don't mistakenly keep some dups when applied to long lists.
2015-07-16 07:52:52 -07:00
Daiki Ueno
bd8b5ac772 epg: Automatically start pinentry server
* epg-config.el (epg-gpgconf-program): New variable.
* epg.el (epg--start): Call `pinentry-start' if
allow-emacs-pinentry is set in ~/.gnupg/gpg-agent.conf.
2015-07-16 15:43:03 +09:00
Katsumi Yamaoka
f90fe8e76f * lisp/gnus/nnimap.el: Fix my last bogus change
Reinstall Stefan Monnier's change that was made in
<83d824bc4041332f338ad7e5e830f443535aa300>.
2015-07-15 23:06:57 +00:00
Dmitry Gutov
35ad161d9a Show the default value in the prompt
* lisp/progmodes/xref.el: Add `M-?' binding for
xref-find-references.  Declare functions `grep-read-files' and
`grep-expand-template'.
(xref--read-identifier): Show the default value in the prompt.
2015-07-13 04:27:32 +03:00
Dmitry Gutov
5153d30c16 When called with prefix argument, ask for file patterns to search as well
* lisp/progmodes/xref.el (xref-find-regexp): When called with
prefix argument, ask for file patterns to search as well.  When
prompting for the directory, require an existing one.
(xref-collect-matches): Add a new argument, FILES.  Use it in the
above function.
2015-07-12 18:35:08 +03:00
Dmitry Gutov
62d5d46551 Add `project-ignores'
* lisp/progmodes/project.el (project-ignores): New generic
function, and an implementation for the	VC project type.

* lisp/progmodes/xref.el (xref--rgrep-command): Split, as a
variant of rgrep-default-command that handles a generic list of
ignores.
(xref-collect-matches): Use it, and pass through to it the value
of the newly added argument.
(xref-find-regexp): Handle ignored paths within the project.
Remove outdated comment.

* lisp/vc/vc.el (vc-default-ignore-completion-table):
Skip the comments and the empty lines.
2015-07-12 17:19:08 +03:00
Eric Abrahamsen
168c80efdc gnus-registry.el: Correct function argument order
* lisp/gnus/gnus-registry.el (gnus-registry--set/remove-mark):
Reverse the order of function arguments.
2015-07-11 23:48:09 +00:00
Dmitry Gutov
d6c2b34e9e Bind grep-highlight-matches to nil
* lisp/progmodes/xref.el (xref-collect-matches):
Bind grep-highlight-matches to nil (bug#20728).
2015-07-11 18:56:42 +03:00
Nikolaus Rath
8f1df3c40d nnimap.el: Fix IMAP message size parsing
* lisp/gnus/nnimap.el (nnimap-transform-headers):
Don't assume that UID comes before RFC822.SIZE.
2015-07-11 06:01:43 +00:00
Stefan Monnier
83d824bc40 * lisp/gnus/nnimap.el: Clean up "unused var" warnings
(auth-source-creation-prompts): Declare.
(nnimap-retrieve-headers, nnimap-status-message)
(nnimap-request-create-group, nnimap-request-delete-group)
(nnimap-close-group, nnimap-request-move-article)
(nnimap-request-accept-article, nnimap-request-newgroups)
(nnimap-request-post, nnimap-dummy-active-number)
(nnimap-save-mail-spec, nnimap-get-groups): Add _ to unused vars.
(nnimap-parse-flags): Remove unused var `p'.
(nnimap-retrieve-group-data-early): Remove unused var `groups'.
(nnimap-flags-to-marks): Remove unused var `totalp'.
2015-07-10 16:17:13 -04:00
Dmitry Gutov
53cf3cfec1 Don't check the exit status, it can be misleading
* lisp/progmodes/xref.el (xref-collect-matches): Don't check the
exit status, it can be misleading.
2015-07-10 04:40:09 +03:00
Dmitry Gutov
f8c720b55b Introduce a Project API
* lisp/progmodes/project.el: New file.

* lisp/cedet/ede.el: (project-try-ede): New function.
(project-root): New implementation.

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode):
Set project-search-path-function.
(elisp--xref-find-references): Delegate some logic to
project-search-path.
(elisp-search-path): New function.
(elisp-xref-find): Don't implement `matches' anymore.

* lisp/progmodes/etags.el: Don't implement `matches'.
Delegate some logic to project-search-path.
(etags-search-path): New function.

* lisp/progmodes/xref.el (xref-find-function):
Remove `matches' from the API.
(xref-find-regexp): Move whatever common logic was in elisp and
etags implementations, and search the directories returned by
project-directories and project-search-path.
2015-07-10 04:40:09 +03:00