Dmitry Gutov [Wed, 6 May 2015 20:15:45 +0000 (23:15 +0300)]
Only cancel timer when it is non-nil
* lisp/cedet/pulse.el (pulse-momentary-unhighlight): Only cancel
timer when it is non-nil
(http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00223.html).
Stefan Monnier [Wed, 6 May 2015 14:50:48 +0000 (10:50 -0400)]
* lisp/emacs-lisp/testcover.el: Don't use edebug--read (bug#20487)
* lisp/emacs-lisp/testcover.el: Use lexical-binding.
(testcover--read): Rename from testcover-read. Change calling convention.
Use edebug-read-and-maybe-wrap-form now that edebug-read is gone.
(testcover-start): Use add-function. Move edebug-all-defs binding to
testcover--read.
(testcover-this-defun): Tighten scope of edebug-all-defs binding.
(testcover-mark): Remove unused var `item'.
* src/lread.c (syms_of_lread): Default load-read-function to `read'.
Oleh Krehel [Wed, 6 May 2015 13:21:23 +0000 (15:21 +0200)]
lisp/subr.el (delete-dups): Use a hash table
* lisp/subr.el (delete-dups): When there are more than 100 candidates,
use a hash table. This can result in ~500 times speed-up for typical
collections of size 5000, like that of `load-library'.
Dmitry Gutov [Wed, 6 May 2015 12:21:32 +0000 (15:21 +0300)]
Clean up pulse.el a little
* lisp/cedet/pulse.el (pulse): Remove.
(pulse-momentary-timer): Save instead of the stop time.
(pulse-momentary-highlight-overlay): Call
pulse-momentary-unhighlight first thing. Treat
pulse-momentary-overlay as a single value, not a list. Save the
created timer. Only pass the stop time to the timer.
(pulse-tick): Update accordingly.
(pulse-momentary-unhighlight): Treat pulse-momentary-overlay as a
single value. Cancel the timer.
Dmitry Gutov [Wed, 6 May 2015 02:54:52 +0000 (05:54 +0300)]
Pulse using a timer
* lisp/cedet/pulse.el (pulse-momentary-stop-time): New variable.
(pulse-momentary-highlight-overlay): Set up the timer instead of
calling `pulse'
(http://lists.gnu.org/archive/html/emacs-devel/2015-05/).
(pulse-tick): New function.
(pulse-momentary-unhighlight): Cut off the stop time.
(pulse-delay): Update the docstring WRT to not using sit-for.
Dmitry Gutov [Wed, 6 May 2015 01:35:46 +0000 (04:35 +0300)]
Don't require match
* lisp/progmodes/xref.el (xref--read-identifier): Don't require
match. That doesn't work for every command, and some identifier
completion tables are bound to be imperfect anyway.
(semantic-grammar--template-expand): New function.
(semantic-grammar-header, semantic-grammar-footer): Use it.
(semantic-grammar--lex-block-specs): Remove unused var `block-spec'.
(semantic-grammar-file-regexp): Refine regexp.
(semantic-grammar-eldoc-get-macro-docstring):
Use elisp-get-fnsym-args-string when available.
(semantic-idle-summary-current-symbol-info): Use new elisp-* names
instead of the old eldoc-* names.
* lisp/emacs-lisp/eldoc.el (eldoc-docstring-format-sym-doc): Move back
from elisp-mode.el. Tweak calling convention.
* lisp/progmodes/elisp-mode.el (package-user-dir): Declare.
(elisp-get-fnsym-args-string): Add `prefix' argument. Rename from
elisp--get-fnsym-args-string.
(elisp--highlight-function-argument): Add `prefix' arg.
(elisp-get-var-docstring): Rename from elisp--get-var-docstring.
(elisp--docstring-format-sym-doc): Move back to eldoc.el.
Nicolas Petton [Tue, 5 May 2015 19:45:36 +0000 (21:45 +0200)]
Add support for &rest in `seq-let'
* lisp/emacs-lisp/seq.el (seq--make-bindings): Add support for `&rest'
in the argument list.
* test/automated/seq-tests.el: Add a test for parsing and binding
`&rest' in `seq-let'.
Dmitry Gutov [Tue, 5 May 2015 12:28:41 +0000 (15:28 +0300)]
Work around "Attempt to modify read-only object"
* lisp/progmodes/elisp-mode.el (elisp--xref-format): Extract from
elisp--xref-find-definitions, to work around "Attempt to modify
read-only object" error.
Dmitry Gutov [Tue, 5 May 2015 12:11:14 +0000 (15:11 +0300)]
Only skip some variables that have function counterparts
* lisp/progmodes/elisp-mode.el (elisp--xref-identifier-location):
Only skip minor-mode-named variable if it's defined in a Lisp
file, and it's in minor-mode-list (bug#20506).
* test/automated/elisp-mode-tests.el
(elisp-xref-finds-both-function-and-variable)
(elisp-xref-finds-only-function-for-minor-mode): New tests.
Dmitry Gutov [Tue, 5 May 2015 02:05:02 +0000 (05:05 +0300)]
Buttonize the whole line, including the number at the beginning
* lisp/progmodes/xref.el (xref--location-at-point): Revert the
previous change.
(xref--insert-xrefs): Buttonize the whole line, including the
number at the beginning.
Dmitry Gutov [Mon, 4 May 2015 23:44:20 +0000 (02:44 +0300)]
Insert, highlight and align line numbers in xref output
* lisp/progmodes/etags.el (xref-location-line): Specialize for
xref-etags-location.
* lisp/progmodes/xref.el (xref-location-line): New generic method.
(xref-file-location): Add reader for the line slot.
(xref--location-at-point): Skip to the `xref-location' property.
(xref--collect-reference): Drop the line number from description.
(xref--insert-xrefs): Insert, highlight and align line numbers.
Dmitry Gutov [Mon, 4 May 2015 20:16:12 +0000 (23:16 +0300)]
Don't pulse the indentation, or the newline
* lisp/cedet/pulse.el (pulse-lighten-highlight)
(pulse-reset-face): Fall back to the inherited background
attribute in FACE.
(pulse-momentary-highlight-region): Add autoload cookie.
* lisp/progmodes/xref.el (xref--maybe-pulse): Don't highlight the
indentation, or the newline, if the line's non-empty
(http://lists.gnu.org/archive/html/emacs-devel/2015-05/msg00118.html).
* lisp/progmodes/xref.el (xref-pulse-on-jump): New option.
(xref--maybe-pulse): New function.
(xref-pop-marker-stack, xref--pop-to-location)
(xref--display-position): Use it.
(xref--location-at-point): Use back-to-indentation.
* lisp/org/org-list.el (org-list-struct): Remove unused var `ind'.
(org-list-get-next-item, org-list-get-prev-item)
(org-list-get-children): Mark unused arg `struct'.
(org-list-use-alpha-bul-p): Remove unused var `bul'.
(org-toggle-checkbox): Mark unused var.
(org-update-checkbox-count): Remove unused var `box-num'.
(org-adapt-indentation): Declare.
(org-list-parse-list): Declare var instead of adding a dummy duplicate.
(org-list-send-list): Remove unused var `txt'.
(org-list-to-latex, org-list-to-texinfo): Mark unused arg `params'.
(org-list-to-subtree): Add prefix to dyn-bind var, and declare them.
* lisp/org/org-macs.el: Use `declare'.
(org-with-limited-levels): Declare dyn-bound vars.
Eli Zaretskii [Mon, 4 May 2015 14:46:30 +0000 (17:46 +0300)]
Fix minor issues with CEDET on MS-Windows
* lisp/cedet/semantic/symref/idutils.el
(semantic-symref-parse-tool-output-one-line): Fix the search
regexp to match MS-Windows file names with drive letters.
(Bug#19468)
* lisp/cedet/semantic/symref/grep.el
(semantic-symref-grep-use-template): Remove "--color=always" from
Grep switches on MS-Windows.
(semantic-symref-grep-shell): Use shell-file-name as the default
value, so this works not only on Posix platforms.
(semantic-symref-perform-search): Use shell-quote-argument instead
of literal '..' for portable quoting of Grep command-line
argument. Use shell-command-switch instead of a literal "-c".
* lisp/cedet/semantic/bovine/gcc.el
(semantic-gcc-get-include-paths): Use file-name-absolute-p to test
for an absolute file name in a portable way.
(package-import-keyring, package-refresh-contents)
(package-compute-transaction, package--save-selected-packages)
(package-install-from-archive, package-delete)
(package-menu--perform-transaction): Use `inhibit-message'
instead.
(package--compile): Set `warning-minimum-level' to :error.
Stefan Monnier [Mon, 4 May 2015 02:24:20 +0000 (22:24 -0400)]
* lisp/term/screen.el (xterm-screen-extra-capabilities): New custom
(terminal-init-screen): Use it (bug#20356).
* lisp/term/xterm.el: Provide `term/xterm' instead of `xterm'.
(xterm--extra-capabilities-type): New const.
(xterm-extra-capabilities): Use it.
(xterm--version-handler): Lower the pseudo-version for `screen'.
Dmitry Gutov [Sun, 3 May 2015 21:39:06 +0000 (00:39 +0300)]
xref--insert-xrefs: Tweak the faces
* lisp/progmodes/xref.el (xref--insert-xrefs): Tweak the faces.
Always insert a newline at the end (to avoid mouse-face background
tail at the last line).
Dmitry Gutov [Sun, 3 May 2015 18:32:40 +0000 (21:32 +0300)]
Stop vc-print-log from jumping to the top
* lisp/vc/vc.el (vc-print-log-internal): Pass nil
GOTO-LOCATION-FUNC to vc-log-internal-common when WORKING-REVISION
is not specified.
(vc-incoming-outgoing-internal): Always pass nil.
(vc-log-internal-common): When GOTO-LOCATION-FUNC is nil, don't
call it, and don't set vc-sentinel-movepoint (bug#15322).
(vc-print-root-log): Don't fetch the root working revision, nor
pass it to vc-print-log-internal.
* lisp/whitespace.el (whitespace-style): Use `set' instead of a
`repeat' because the option is really set-like. Add missing
options. Reorder options to match the order in the
documentation. (Bug#20346)
Eli Zaretskii [Sat, 2 May 2015 09:01:04 +0000 (12:01 +0300)]
Fix error diagnostics of c-macro-expand
* lisp/progmodes/cmacexp.el (c-macro-expansion): Don't bail out
too early if no start-marker string was found -- that generally
means cpp exited abnormally, and we still want to show its error
messages to the user.
Eli Zaretskii [Sat, 2 May 2015 06:58:22 +0000 (09:58 +0300)]
Don't require Texinfo 5.0 for Emacs documentation
* doc/emacs/docstyle.texi: Use "@set txicodequoteundirected" and
"@set txicodequotebacktick" instead of "@codequotebacktick on" and
"@codequoteundirected on", respectively, to avoid requiring
Texinfo 5.x for Emacs documentation.
Paul Eggert [Fri, 1 May 2015 19:05:53 +0000 (12:05 -0700)]
Fix single-quoting style in PDF manuals
The PDF versions of the GNU manuals used curved single quotes to
represent grave accent and apostrophe, which made it a pain to cut
and paste code examples from them. Fix the PDF versions to use
grave accent and apostrophe for Lisp source code, keystrokes, etc.
This change does not affect the info files, nor does it affect
ordinary uses of curved single quotes in PDF.
* doc/emacs/docstyle.texi: New file, which specifies treatment for
grave accent and apostrophe, as well as the document encoding.
* doc/emacs/emacs-xtra.texi, doc/emacs/emacs.texi:
* doc/lispintro/emacs-lisp-intro.texi:
* doc/lispref/back.texi, doc/lispref/book-spine.texi:
* doc/lispref/elisp.texi, doc/lispref/lay-flat.texi:
* doc/misc/ada-mode.texi, doc/misc/auth.texi:
* doc/misc/autotype.texi, doc/misc/bovine.texi, doc/misc/calc.texi:
* doc/misc/cc-mode.texi, doc/misc/cl.texi, doc/misc/dbus.texi:
* doc/misc/dired-x.texi, doc/misc/ebrowse.texi, doc/misc/ede.texi:
* doc/misc/ediff.texi, doc/misc/edt.texi, doc/misc/efaq-w32.texi:
* doc/misc/efaq.texi, doc/misc/eieio.texi, doc/misc/emacs-gnutls.texi:
* doc/misc/emacs-mime.texi, doc/misc/epa.texi, doc/misc/erc.texi:
* doc/misc/ert.texi, doc/misc/eshell.texi, doc/misc/eudc.texi:
* doc/misc/eww.texi, doc/misc/flymake.texi, doc/misc/forms.texi:
* doc/misc/gnus-coding.texi, doc/misc/gnus-faq.texi:
* doc/misc/gnus.texi, doc/misc/htmlfontify.texi:
* doc/misc/idlwave.texi, doc/misc/ido.texi, doc/misc/info.texi:
* doc/misc/mairix-el.texi, doc/misc/message.texi, doc/misc/mh-e.texi:
* doc/misc/newsticker.texi, doc/misc/nxml-mode.texi:
* doc/misc/octave-mode.texi, doc/misc/org.texi, doc/misc/pcl-cvs.texi:
* doc/misc/pgg.texi, doc/misc/rcirc.texi, doc/misc/reftex.texi:
* doc/misc/remember.texi, doc/misc/sasl.texi, doc/misc/sc.texi:
* doc/misc/semantic.texi, doc/misc/ses.texi, doc/misc/sieve.texi:
* doc/misc/smtpmail.texi, doc/misc/speedbar.texi:
* doc/misc/srecode.texi, doc/misc/todo-mode.texi, doc/misc/tramp.texi:
* doc/misc/url.texi, doc/misc/vhdl-mode.texi, doc/misc/vip.texi:
* doc/misc/viper.texi, doc/misc/widget.texi, doc/misc/wisent.texi:
* doc/misc/woman.texi:
Use it instead of '@documentencoding UTF-8', to lessen the need for
global changes like this in the future.
* doc/emacs/Makefile.in (EMACS_XTRA):
* doc/lispintro/Makefile.in (srcs):
* doc/lispref/Makefile.in (srcs):
Add dependency on docstyle.texi.
* doc/misc/Makefile.in (style): New macro.
(${buildinfodir}/%.info, %.dvi, %.pdf, %.html)
(${buildinfodir}/ccmode.info, ${buildinfodir}/efaq%.info, gnus_deps):
Use it.
Nicolas Petton [Fri, 1 May 2015 17:30:56 +0000 (19:30 +0200)]
New macro seq-let, providing destructuring support to seq.el
* lisp/emacs-lisp/seq.el (seq-let): New macro. `seq-let' is similar
to `cl-destructuring-bind' but works on all sequence types supported
by `seq.el'. Bump version number to 1.6.
* test/automated/seq-tests.el: Add tests for seq-let.
* doc/lispref/sequences.texi: Add documentation for seq-let.
Glenn Morris [Fri, 1 May 2015 00:00:23 +0000 (20:00 -0400)]
Remove compatibility code for 20-year old function renaming
* lisp/progmodes/idlw-shell.el (idlwave-shell-comint-filter):
Make it an obsolete alias.
(idlwave-shell-filter): Change all uses to comint-output-filter.
Paul Eggert [Thu, 30 Apr 2015 16:17:57 +0000 (09:17 -0700)]
Unclutter 'make doc' output a bit
* Makefile.in ($(DOCS), $(INSTALL_DOC), $(UNINSTALL_DOC)):
Use make subst rather than sh IFS to split target string apart.
This makes 'make' output easier to follow.
Artur Malabarba [Thu, 30 Apr 2015 01:27:10 +0000 (02:27 +0100)]
* lisp/emacs-lisp/package.el: Some speed optimizations on menu refresh
(package-menu--print-info): Obsolete.
(package-menu--print-info-simple): New function.
(package-menu--refresh): Use it, simplify code, and improve
performance.