Chong Yidong [Tue, 1 May 2012 13:37:56 +0000 (21:37 +0800)]
* lisp/follow.el: Rework, eliminating reliance on advice.
(set-process-filter, process-filter, sit-for): Advice deleted.
(follow-mode-off-hook): Obsolete hook removed.
(follow-avoid-tail-recenter-p, follow-process-filter-alist): Vars
deleted.
(follow-auto): Use a :set function.
(follow-mode): Rewritten. Don't advise process filters.
(follow-switch-to-current-buffer-all, follow-scroll-up)
(follow-scroll-down): Assume follow-mode is bound.
(follow-comint-scroll-to-bottom)
(follow-align-compilation-windows): New functions.
(follow--window-sorter): New function.
(follow-all-followers): Use it to explicitly sort windows by their
positions; don't make assumptions about next-window order.
(follow-windows-start-end, follow-delete-other-windows-and-split)
(follow-calc-win-start): Doc fix.
(follow-windows-aligned-p, follow-select-if-visible): Don't call
vertical-motion unnecessarily.
(follow-adjust-window): New function.
(follow-post-command-hook): Use it.
(follow-call-set-process-filter, follow-call-process-filter)
(follow-intercept-process-output, follow-tidy-process-filter-alist)
(follow-stop-intercept-process-output, follow-generic-filter):
Functions deleted.
(follow-scroll-bar-toolkit-scroll, follow-scroll-bar-drag)
(follow-scroll-bar-scroll-up, follow-scroll-bar-scroll-down): New
functions, replacing advice on scroll-bar-* commands.
* lisp/comint.el (comint-adjust-point): New function.
(comint-postoutput-scroll-to-bottom): Use it. Call
follow-comint-scroll-to-bottom for Follow mode buffers.
Glenn Morris [Tue, 1 May 2012 06:59:34 +0000 (23:59 -0700)]
Remove no-byte-compile setting from some lisp/term files.
Not that compiling these will bring any noticeable speed benefit, but
there's really no reason not to compile them. The extra disk space
and build time is negligible, and it might reveal use of obsolete
functions, bugs, etc.
Glenn Morris [Tue, 1 May 2012 03:45:39 +0000 (20:45 -0700)]
Remove references to macros that are not defined anywhere
* src/syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
All were removed before 23.1.
Paul Eggert [Sat, 28 Apr 2012 22:17:27 +0000 (15:17 -0700)]
Do not avoid creating empty evaporating overlays (Bug#9642).
* buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
That is, do not delete an evaporating overlay if it becomes
empty after its bounds are adjusted to fit within its buffer.
This fix caused other problems, and I'm reverting it until we get
to the bottom of them.
Stefan Monnier [Sat, 28 Apr 2012 21:59:08 +0000 (17:59 -0400)]
Avoid the obsolete `assoc' package.
* lisp/speedbar.el (speedbar-refresh): Avoid adelete.
(speedbar-file-lists): Simplify and avoid aput.
* lisp/man.el (Man--sections, Man--refpages): New vars, replacing
Man-sections-alist and Man-refpages-alist.
(Man-build-section-alist, Man-build-references-alist):
Use them; avoid aput.
(Man--last-section, Man--last-refpage): New vars.
(Man-follow-manual-reference): Use them.
Use the `default' arg of completing-read.
(Man-goto-section): Idem. Move prompt to the `interactive' spec.
* lisp/gnus/auth-source.el (auth-source--aput-1, auth-source--aput)
(auth-source--aget): New functions and macros.
Use them instead of aput/aget.
Fix application of menu-bar-mode etc. by X resources.
* lisp/startup.el (x-apply-session-resources): New function.
* lisp/term/ns-win.el (ns-initialize-window-system):
* lisp/term/w32-win.el (w32-initialize-window-system):
* lisp/term/x-win.el (x-initialize-window-system): Use it to properly
set menu-bar-mode and other vars from X resources, even if the initial
frame is not a window-system frame (Bug#2299).
Eli Zaretskii [Thu, 26 Apr 2012 10:07:35 +0000 (13:07 +0300)]
Don't disable Unicode menus on Windows NT and later due to random errors.
src/w32menu.c: Include w32heap.h.
(add_menu_item): If the call to AppendMenuW (via
unicode_append_menu) fails, disable Unicode menus only if we are
running on Windows 9X/Me.
* lisp/vc/diff-mode.el (diff-beginning-of-hunk): Return a meaningful
value, for symmetry with diff-end-of-hunk.
(diff-split-hunk, diff-find-source-location)
(diff-ignore-whitespace-hunk, diff-refine-hunk): Use it.
(diff-bounds-of-hunk, diff-bounds-of-file): New functions.
(diff-restrict-view, diff-hunk-kill, diff-file-kill): Use them to
compute the relevant hunk or file properly.
(diff-file-junk-re): Add bzr's "modified file" tag.
* vc/ediff-wind.el (ediff-setup-windows-default): New function.
(ediff-window-setup-function): Use it as the default, to set up
windows based on whether the current frame is graphical.
(ediff-choose-window-setup-function-automatically): Make obsolete.
Stefan Monnier [Wed, 25 Apr 2012 18:57:09 +0000 (14:57 -0400)]
Remove unnecessary use of minibuffer-completing-file-name.
* lisp/ffap.el: Remove old code for obsolete package.
(ffap-complete-as-file-p): Remove.
* lisp/mh-e/mh-utils.el (minibuffer-completing-file-name): Don't declare.
Stefan Monnier [Wed, 25 Apr 2012 18:53:57 +0000 (14:53 -0400)]
Use completion-table-with-quoting for comint and pcomplete.
* lisp/comint.el (comint--unquote&requote-argument)
(comint--unquote-argument, comint--requote-argument): New functions.
(comint--unquote&expand-filename, comint-unquote-filename): Obsolete.
(comint-quote-filename): Use regexp-opt-charset.
(comint--common-suffix, comint--common-quoted-suffix)
(comint--table-subvert): Remove.
(comint-unquote-function, comint-requote-function): New vars.
(comint--complete-file-name-data): Use them with
completion-table-with-quoting.
* lisp/pcmpl-unix.el (pcomplete/scp): Use completion-table-subvert.
* lisp/pcomplete.el (pcomplete-arg-quote-list)
(pcomplete-quote-arg-hook, pcomplete-quote-argument): Obsolete.
(pcomplete-unquote-argument-function): Default to non-nil.
(pcomplete-unquote-argument): Simplify.
(pcomplete--common-quoted-suffix): Remove.
(pcomplete-requote-argument-function): New var.
(pcomplete--common-suffix): New function.
(pcomplete-completions-at-point): Use completion-table-with-quoting
and completion-table-subvert.
Stefan Monnier [Wed, 25 Apr 2012 18:42:15 +0000 (14:42 -0400)]
* lisp/minibuffer.el: Use completion-table-with-quoting for read-file-name.
(minibuffer--double-dollars): Preserve properties.
(completion--sifn-requote): New function.
(completion--file-name-table): Rewrite using it and c-t-with-quoting.
Stefan Monnier [Wed, 25 Apr 2012 18:40:42 +0000 (14:40 -0400)]
* lisp/minibuffer.el: Add support for completion of quoted/escaped data.
(completion-table-with-quoting, completion-table-subvert): New funs.
(completion--twq-try, completion--twq-all): New functions.
(completion--nth-completion): New function.
(completion-try-completion, completion-all-completions): Use it.
Alex Harsanyi [Wed, 25 Apr 2012 10:28:29 +0000 (12:28 +0200)]
Sync with soap-client repository. Support SOAP simpleType. (Bug#10331)
* soap-client.el (soap-resolve-references-for-sequence-type)
(soap-resolve-references-for-array-type): hack to prevent self
references, see Bug#9.
(soap-parse-envelope): report the contents of the 'detail' node
when receiving a fault reply.
(soap-parse-envelope): report the contents of the entire 'detail' node.
* soap-inspect.el (soap-sample-value-for-simple-type)
(soap-inspect-simple-type): new function
* soap-client.el (soap-simple-type): new struct
(soap-default-xsd-types, soap-default-soapenc-types)
(soap-decode-basic-type, soap-encode-basic-type): support
unsignedInt and double basic types
(soap-resolve-references-for-simple-type)
(soap-parse-simple-type, soap-encode-simple-type): new function
(soap-parse-schema): parse xsd:simpleType declarations
* soap-client.el (soap-default-xsd-types)
(soap-default-soapenc-types): add integer, byte and anyURI types
(soap-parse-complex-type-complex-content): use `soap-wk2l' to find
the local name of "soapenc:Array"
(soap-decode-basic-type, soap-encode-basic-type): support encoding
decoding integer, byte and anyURI xsd types.
Eli Zaretskii [Wed, 25 Apr 2012 08:07:57 +0000 (11:07 +0300)]
Force interactive-mode in GDB on MS-Windows.
lisp/progmodes/gdb-mi.el (gdb-init-1): Condition Windows-specific
settings on 'system-type', not on 'window-system'. On MS-Windows,
set interactive-mode on in GDB.
Michael Albinus [Tue, 24 Apr 2012 17:56:30 +0000 (19:56 +0200)]
* notifications.el (notifications-specification-version): Change to "1.2".
(notifications-notify): Add :action-items, :resident and
:transient hints. Change "image_data" to "image-data" and
"image_path" to "image-path".
(notifications-get-capabilities): Return a list of keywords.
* os.texi (Notifications): Extend possible notification hints.
Stefan Monnier [Tue, 24 Apr 2012 17:06:12 +0000 (13:06 -0400)]
* lisp/progmodes/ruby-mode.el: Simplify last change, and cleanup code.
(ruby-syntax-propertize-regexp): Remove.
(ruby-syntax-propertize-function): Split regexp into chunks.
Match following code directly.
* test/indent/ruby.rb: New file, to test new syntax-propertize code.
* lisp/progmodes/ruby-mode.el: Handle Cucumber defs (bug#6286).
(ruby-syntax-propertize-regexp): New function.
(ruby-syntax-propertize-function): Use it to handle regexp not preceded
by a special keyword.
* lisp/progmodes/ruby-mode.el: Handle general delimited literals.
(ruby-syntax-general-delimiters-goto-beg)
(ruby-syntax-propertize-general-delimiters): New functions.
(ruby-syntax-propertize-function): Use them to handle GDL.
(ruby-font-lock-keywords): Move old handling of GDL...
(ruby-font-lock-syntactic-keywords): .. to here.
(ruby-calculate-indent): Adjust indentation for GDL.
Martin Rudalics [Tue, 24 Apr 2012 08:56:31 +0000 (10:56 +0200)]
Don't clear echo area prematurely when handling select window events (Bug#11304).
* keyboard.c (read_char): Don't wipe echo area for select window
events: These might get delayed via `mouse-autoselect-window'
(Bug#11304).
* window.el (handle-select-window): Clear echo area since this is
no more done by read_char (Bug#11304).
Ensure that X selection convertors properly encode returned strings.
Though not itself a regression, this bug was exposed by the support
for MULTIPLE selections, which is new to Emacs 24 (see Bug#11315).
* lisp/select.el (xselect--encode-string): New function, split from
xselect-convert-to-string.
(xselect-convert-to-string): Use it.
(xselect-convert-to-filename, xselect-convert-to-os)
(xselect-convert-to-host, xselect-convert-to-user): Ensure that
returned strings are properly encoded.
Stefan Monnier [Tue, 24 Apr 2012 03:40:57 +0000 (23:40 -0400)]
* lisp/ibuffer.el (ibuffer-mode-map): Bind `/ m' to filter-used-mode
and `/ M' to filter-derived-mode.
* lisp/ibuf-ext.el (ibuffer-list-buffer-modes): Simplify; avoid add-to-list.
(ibuffer-filter-by-mode, ibuffer-filter-by-used-mode)
(ibuffer-mark-by-mode): Use default rather than initial-input.
(ibuffer-filter-by-derived-mode): Autoload and require-match.
Paul Eggert [Mon, 23 Apr 2012 22:46:35 +0000 (15:46 -0700)]
Do not create empty overlays with the evaporate property (Bug#9642).
* buffer.c (Fmove_overlay): Delete an evaporating overlay
if it becomes empty after its bounds are adjusted to fit within
its buffer. Without this fix, in a nonempty buffer (let ((o
(make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
yields an empty overlay that has the evaporate property, which is
not supposed to happen.