Joao Tavora [Thu, 29 Aug 2013 09:20:31 +0000 (10:20 +0100)]
fix: more idiomatic elisp, better docstrings, less byte-compiler warnings
By Stefan Monnier, with original commentary.
"Here's an untested patch of cleanups, found partly via compilation using
lexical-binding and partly via checkdoc-current-buffer (and
occasionally by stumble-upon happenstance)."
Stefan Monnier [Thu, 22 Aug 2013 18:53:18 +0000 (14:53 -0400)]
* register-list.el: Use lexical-binding. Remove redundant :groups.
(register-list-preserve-pos): Don't eval `force-line'. Use forward-line
to better match line-number-at-pos's behavior.
(register-list-refresh): Don't use the line number that happens to be current
during macro-expansion.
(register-list): Remove unused arg `reg-alist'. Use dolist. Use a closure
rather than `(lambda ...).
(register-list-edit-value): Remove unused var `new-val'.
Stefan Monnier [Wed, 21 Aug 2013 20:37:42 +0000 (16:37 -0400)]
* packages/shen-mode/inf-shen.el: Require CL. Fix up comment convention.
Don't autoload variables unless there's a really good reason for it.
Turn some comments into docstrings.
(inferior-shen-mode-map): Initialize in the declaration.
(inferior-shen-mode): Use define-derived-mode.
(check-balanced-parens): `c' was not used.
(shen-eval-region): Use with-current-buffer.
* packages/shen-mode/shen-mode.el: Require CL.
(calculate-lisp-indent-last-sexp): Declare.
(shen-mode): Auto load. Don't use ((lambda ..) ..) forms.
(auto-mode-alist): Auto load the added entry.
Stefan Monnier [Wed, 21 Aug 2013 18:54:13 +0000 (14:54 -0400)]
* packages/eldoc-eval/eldoc-eval.el: Put the custom vars in the eldoc-eval
group, where they seem to belong. Fix up naming conventions.
(eldoc-eval-preferred-function): Rename from eval-preferred-function.
(eldoc-display-message-no-interference-p): Use an advice again, but this time
I think I wrote it correctly.
(eldoc-in-minibuffer-mode-map): Rename from eldoc-mode-in-minibuffer-map.
(eldoc-in-minibuffer-mode): Don't bother specifying the keymap now that we're
using the standard name.
(eldoc-run-in-minibuffer): Rename from run-eldoc-in-minibuffer.
(eldoc-eval-expression): Rename from eval-expression-with-eldoc.
Stefan Monnier [Wed, 21 Aug 2013 17:30:52 +0000 (13:30 -0400)]
* packages/f90-interface-browser/f90-interface-browser.el: Don't require CL
at runtime since it's not needed.
(f90-approx-arglist-match): Remove unused var `match'.
(f90-parse-single-type-declaration): Don't use `add-to-list' on a local var.
* packages/f90-interface-browser/f90-tests.el: Require `cl-lib'.
(test-check, test-combine-results, parse-declaration): Fix up
names accordingly.
Stefan Monnier [Wed, 21 Aug 2013 03:59:12 +0000 (23:59 -0400)]
* packages/js2-mode/js2-mode.el: Remove unused variables. Use posix
character classes. Do a bit of CSE simplification.
(js2-parse-highlight-member-expr-node): Flip test order to simplify code.
(js2-re-search-forward, js2-re-search-backward): Don't quote code.
(js2-echo-help): Defalias applies to symbol, not functions.
Thierry Volpiatto [Sat, 17 Aug 2013 04:46:04 +0000 (06:46 +0200)]
* eldoc-eval.el: Fix eldoc not working when mode is disabled.
(eldoc-eval--old-message-function): new internal.
(eldoc-display-message-no-interference-p): now a defun.(already adviced in slime)
(eldoc-in-minibuffer-mode): reenable correctly all when toggling.
Stefan Monnier [Wed, 14 Aug 2013 18:34:52 +0000 (14:34 -0400)]
Update infrastructure for Git.
* .gitignore: New file.
* .bzrignore: keep it as a symlink to .gitignore.
* externals-list: New file.
* admin/update-archive.sh: Use Git. Use make.log when running in batch.
Turn build/packages into an rsync-copy rather than a symlink. Use relative
file names.
(copyright_notices, check_copyright): Remove. Use new "make" rule instead.
* admin/archive-contents.el: Use lexical-binding and pcase.
(archive--revno-re): New const.
(archive-prepare-packages): New `srcdir' argument, so we can add the ChangeLogs
to a parallel tree to the Git working dir.
(archive--simple-package-p): Don't return the commentary any more.
(archive--process-simple-package): Remove `commentary' arg. Don't write out
the *-readme.txt file. Reduce stdout noise.
(archive--make-changelog): New arg `srcdir'. Use Git.
(archive--process-multi-file-package): Don't copy the readme.
(batch-make-site-dir, batch-make-site-package): Remove functions.
(archive--get-prop, archive--get-section, archive--quote)
(archive--insert-repolinks): New functions.
(archive--html-make-pkg): Include NEWS and obey "URL:" header. Generate the
*-readme.txt files here.
(archive--elpa-git-url): New constant.
(archive-add/remove/update-externals): New function.
Andrey Kotlarski [Tue, 13 Aug 2013 22:01:04 +0000 (01:01 +0300)]
* packages/vlf/vlf.el:: Version 0.9.1.
Add development repository URL.
(vlf-encode-size): New variable.
(vlf-adjust-chunk): Allow fluctuation when searching for proper
decoding. Save encoded size to `vlf-encode-size'.
(vlf-write): Use `vlf-encode-size' for expected encoding size.
(vlf-batch-size, vlf-start-pos, vlf-end-pos, vlf-file-size)
(vlf-encode-size): Move permanent declarations to top level.
(vlf-mode): Fix locality of `write-file-functions' hook.
(vlf): Use `set-visited-file-name'.
(abort-if-file-too-large): Make `vlf-if-file-too-large' around
advice.
(scroll-up, scroll-down): Use `derived-mode-p'.
(vlf-change-batch-size): Remove superfluous check.
(vlf-verify-size): New function.
(vlf-next-batch, vlf-move-to-batch, vlf-move-to-chunk)
(vlf-file-shift-back, vlf-shift-batch, vlf-shift-batches): Use
it.
(vlf-revert): Fix boolean condition and ignored variable naming.
(vlf-prev-batch): Style fix.
Stefan Monnier [Tue, 13 Aug 2013 14:35:49 +0000 (16:35 +0200)]
Merge with ELPA
(eldoc-display-message-no-interference-p): Turn it into an advice.elpa
(eldoc-active-minibuffers-list): Store buffers rather than buffer names.
Stefan Monnier [Tue, 13 Aug 2013 13:59:47 +0000 (09:59 -0400)]
* eldoc-eval.el (eldoc-display-message-no-interference-p): Force
old definition.
(eldoc-mode-in-minibuffer): Catch errors, run eldoc-in-minibuffer-show-fn
from the minibuffer.
Stefan Monnier [Fri, 9 Aug 2013 21:52:50 +0000 (17:52 -0400)]
* packages/auctex/tex.el (TeX--call-3/2): New auxiliary function.
(ConTeXt-Omega-engine, TeX-Omega-mode, TeX-source-specials-mode):
Use it to provide the obsolescence version when possible.