Grégoire Jadi [Tue, 11 Jun 2013 13:14:43 +0000 (15:14 +0200)]
* src/xwidget.c (Fmake_xwidget): Add a docstring and add BUFFER as an optional parameter.
The docstring now lists the types accepted.
The GCPROtection has also been removed because it wasn't necessary (no
call to Feval/eval_sub either directly or indirectly).
(syms_of_xwidget): Add a comment to remind us to update the docstring of
`Fmake_xwidget' if new types are added.
* lisp/vc/vc-bzr.el: No need to require vc when compiling.
(vc-exec-after, vc-set-async-update, vc-default-dir-printer)
(vc-resynch-buffer, vc-dir-refresh): Declare.
(vc-setup-buffer, vc-switches): Autoload.
Juri Linkov [Mon, 27 May 2013 23:38:56 +0000 (02:38 +0300)]
* lisp/replace.el (replace-search): New function with code moved out
from `perform-replace'.
(replace-highlight, replace-dehighlight): Move function definitions
up closer to `replace-search'.
Dmitry Gutov [Mon, 27 May 2013 23:11:21 +0000 (03:11 +0400)]
* lisp/vc/vc-git.el (vc-git-working-revision): When in detached mode,
return the commit hash. Also set the `vc-git-detached' property.
(vc-git--rev-parse): Extract from `vc-git-previous-revision'.
(vc-git-mode-line-string): Use the same help-echo format whether in
detached mode or not, because we know the actual revision now. When
in detached mode, shorten the revision to 7 chars.
Juri Linkov [Mon, 27 May 2013 23:02:37 +0000 (02:02 +0300)]
* lisp/replace.el (perform-replace): Ignore invisible matches.
In addition to checking `query-replace-skip-read-only', also
filter out matches by calling `run-hook-with-args-until-failure'
on `isearch-filter-predicates', and also check `search-invisible'
for t or call `isearch-range-invisible'.
(replace-dehighlight): Call `isearch-clean-overlays'.
Juri Linkov [Mon, 27 May 2013 22:42:11 +0000 (01:42 +0300)]
* lisp/isearch.el (isearch-filter-predicates): Rename from `isearch-filter-predicate'.
Doc fix.
(isearch-message-prefix): Display text from the property
`isearch-message-prefix' of the currently active filters.
(isearch-search): Don't compare `isearch-filter-predicate' with
`isearch-filter-visible'. Call `run-hook-with-args-until-failure'
on `isearch-filter-predicates'. Also check `search-invisible' for t
or call `isearch-range-invisible'.
(isearch-filter-visible): Make obsolete.
(isearch-lazy-highlight-search):
Call `run-hook-with-args-until-failure' on
`isearch-filter-predicates' and use `isearch-range-invisible'.
* lisp/info.el (Info-search): Call `run-hook-with-args-until-failure' on
`isearch-filter-predicates' instead of `funcall'ing
`isearch-filter-predicate'.
(Info-mode): Set `Info-isearch-filter' to
`isearch-filter-predicates' instead of `isearch-filter-predicate'.
* lisp/dired-aux.el (dired-isearch-filter-predicate-orig): Remove variable.
(dired-isearch-filenames-toggle, dired-isearch-filenames-setup)
(dired-isearch-filenames-end): Add and remove
`dired-isearch-filter-filenames' in `isearch-filter-predicates'
instead of changing the value of `isearch-filter-predicate'.
Rebind `dired-isearch-filenames-toggle' from "\M-sf" to "\M-sff".
(dired-isearch-filter-filenames): Don't use `isearch-filter-visible'.
Put property `isearch-message-prefix' to "filename " on
`dired-isearch-filter-filenames'.
* lisp/wdired.el (wdired-change-to-wdired-mode):
Add `isearch-filter-predicates' to `wdired-isearch-filter-read-only'
locally instead of changing `isearch-filter-predicate'.
(wdired-isearch-filter-read-only): Don't use `isearch-filter-visible'.
Eli Zaretskii [Mon, 27 May 2013 16:54:33 +0000 (19:54 +0300)]
Fix bug #14476 with posn-at-point and glyphs from display vector.
src/xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
display vector, and we backtrack, handle the case that the
previous character position is also displayed from a display
vector or covered by a display string or image.
Stefan Monnier [Mon, 27 May 2013 16:12:52 +0000 (12:12 -0400)]
Always defvar a mode's hook and provide a docstring.
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode):
* lisp/emacs-lisp/derived.el (define-derived-mode): Always defvar the
mode hook and provide a docstring.
Alan Mackenzie [Mon, 27 May 2013 13:30:21 +0000 (13:30 +0000)]
Remove spurious syntax-table text properties inserted by C-y.
* progmodes/cc-mode.el (c-after-change): Also clear hard
syntax-table property with value nil.
Stefan Monnier [Sat, 25 May 2013 02:21:49 +0000 (22:21 -0400)]
* lisp/simple.el (read--expression): New function, extracted from
eval-expression. Set completion-at-point-functions.
(eval-expression, eval-minibuffer): Use it.
* lisp/progmodes/flymake.el (flymake-nop): Don't return a string.
(flymake-set-at): Fix typo.
Stefan Monnier [Fri, 24 May 2013 19:37:55 +0000 (15:37 -0400)]
* lisp/emacs-lisp/smie.el (smie-auto-fill): Rework to be more robust.
(smie-setup): Use add-function to set it.
* lisp/progmodes/octave.el (octave-smie-rules): Return nil rather than
0 after a semi-colon; it works better for smie-auto-fill.
(octave--indent-new-comment-line): New function.
(octave-indent-new-comment-line): Use it (indirectly).
(octave-mode): Don't disable smie-auto-fill. Use add-function to
modify comment-line-break-function.
Tassilo Horn [Fri, 24 May 2013 10:54:20 +0000 (12:54 +0200)]
* doc-view.el: Integrate with desktop.el. (Bug#14435)
(doc-view-desktop-save-buffer): New function.
(doc-view-restore-desktop-buffer): New function.
(desktop-buffer-mode-handlers): Add
`doc-view-restore-desktop-buffer' as desktop.el buffer mode
handler.
(doc-view-mode): Set `doc-view-desktop-save-buffer' as custom
`desktop-save-buffer' function.
Michael Albinus [Fri, 24 May 2013 10:03:45 +0000 (12:03 +0200)]
* net/tramp-gvfs.el (tramp-gvfs-enabled): New defconst.
(tramp-gvfs-file-name-handler): Raise a user error when
`tramp-gvfs-enabled' is nil.
(top): Register signals only when `tramp-gvfs-enabled' is non-nil.
Do not raise a user error when loading package. (Bug#14447)
Glenn Morris [Fri, 24 May 2013 06:53:54 +0000 (23:53 -0700)]
socks.el small cleanup
* lisp/net/socks.el (socks-split-string): Use this rather than split-string.
(socks-nslookup-host): Update for above change.
(dynamic-choice, s5-dynamic-choice-match)
(s5-dynamic-choice-match-inline, s5-widget-value-create):
Comment out unused code.
Comment out other unused code in a more standard manner, with ";"
rather than "'".
Glenn Morris [Fri, 24 May 2013 06:50:22 +0000 (23:50 -0700)]
Gud tooltip tweak
* tooltip.el (tooltip-use-echo-area): Warn only on 'set.
* progmodes/gud.el (gud-gdb-completion-function): Move before use.
(gud-tooltip-echo-area): Make obsolete.
(gud-tooltip-process-output, gud-tooltip-tips): Also check tooltip-mode.
Glenn Morris [Fri, 24 May 2013 03:45:50 +0000 (20:45 -0700)]
Silence sym-comp compilation
* obsolete/sym-comp.el: No need to load hipper-exp when compiling.
(he-search-string, he-tried-table, he-expand-list)
(he-init-string, he-string-member, he-substitute-string)
(he-reset-string): Declare.
Sam Steingold [Thu, 23 May 2013 21:01:47 +0000 (17:01 -0400)]
* simple.el (shell-command-on-region): Pass the `replace' argument
down to `call-process-region' to comply with he doc as reported on
<http://stackoverflow.com/questions/16720458/emacs-noninteractive-call-to-shell-command-on-region-always-deletes-region>
Stefan Monnier [Thu, 23 May 2013 17:25:42 +0000 (13:25 -0400)]
Don't apply keyboard decoding to unread-command-events.
* src/keyboard.c: Apply keyboard decoding only to events that come directly
from the tty, not from unread-command-events (bug#14368).
(read_event_from_main_queue): New function, extracted from read_char).
(read_decoded_char): Remove.
(read_decoded_event_from_main_queue): New function to replace it.
(read_char): Use it.
(read_key_sequence): Use read_char rather than read_decoded_char.
Glenn Morris [Thu, 23 May 2013 07:37:56 +0000 (00:37 -0700)]
Silence some js compilation warnings
* lisp/progmodes/js.el: No need to load comint when compiling.
(ring-insert, comint-send-string, comint-send-input)
(comint-last-input-end, ido-chop): Declare.
* lisp/vc/ediff.el: No need to load dired, ediff-ptch when compiling.
(dired-get-filename, dired-get-marked-files)
(ediff-last-dir-patch, ediff-patch-default-directory)
(ediff-get-patch-buffer, ediff-dispatch-file-patching-job)
(ediff-patch-buffer-internal): Declare.
Glenn Morris [Thu, 23 May 2013 05:01:59 +0000 (22:01 -0700)]
Silence checkdoc.el compilation
* lisp/emacs-lisp/checkdoc.el: No need to load ispell when compiling.
(ispell-process, ispell-buffer-local-words, lm-summary)
(lm-section-start, lm-section-end): Declare.
(checkdoc-ispell-init): Simplify.
* lisp/eshell/esh-util.el: No need to load tramp when compiling.
(tramp-file-name-structure, ange-ftp-ls, ange-ftp-file-modtime): Declare.
(eshell-parse-ange-ls): Require ange-ftp and tramp.
* lisp/eshell/eshell.el: Do not require esh-util twice.
(eshell-add-input-to-history): Declare.
(eshell-command): Check history module is active before using it.
Michael Albinus [Wed, 22 May 2013 14:47:19 +0000 (16:47 +0200)]
* autorevert.el (auto-revert-notify-add-watch)
(auto-revert-notify-handler): Add `attrib' for the inotify case,
it indicates changes in file modification time.