Fix some minor shell.el oddness related to usage of error and message
* lisp/shell.el (shell-directory-tracker): Output error as a message
rather than just returning it as a string.
(shell-process-pushd): Remove useless use of message.
Cleaning up a few X scroll bar bits.
* termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
* xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
New member last_seen_part, going to replace...
* xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
(xt_action_hook) [USE_LUCID]: Adjust user.
(xm_scroll_callback, xg_scroll_callback): Do not bloat with
Lucid-specific scroll bar support.
(xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
to int and adjust to use last_seen_part member.
(x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
(x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
Initialize last_seen_part.
Paul Eggert [Wed, 11 Sep 2013 08:24:05 +0000 (01:24 -0700)]
Fix corruption with multiple emacsclient -t instances.
This bug was introduced by my 2013-08-26 patch, which incorrectly
assumed that the terminfo implementation doesn't use termcap buffers.
* term.c (init_tty) [TERMINFO]: Remove optimization, as
these buffers apparently are used after all.
* termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
(struct tty_display_info): Define members termcap_term_buffer and
termcap_strings_buffer even if TERMINFO.
Barry O'Reilly [Wed, 11 Sep 2013 05:03:23 +0000 (01:03 -0400)]
Change comparison functions =, <, >, <=, >= to take many arguments.
* src/data.c: Change comparison functions' interface and
implementation
* src/lisp.h: Make arithcompare available for efficient two arg
comparisons
* src/bytecode.c: Use arithcompare
* src/fileio.c: Use new interface
* test/automated/data-tests.el: New tests for comparison functions
* etc/NEWS
Stefan Monnier [Wed, 11 Sep 2013 03:31:56 +0000 (23:31 -0400)]
Use define-derived-mode (and derived-mode-p).
* lisp/play/snake.el (snake-mode):
* lisp/play/mpuz.el (mpuz-mode):
* lisp/play/landmark.el (lm-mode):
* lisp/play/blackbox.el (blackbox-mode):
* lisp/play/5x5.el (5x5-mode):
* lisp/obsolete/options.el (Edit-options-mode):
* lisp/net/quickurl.el (quickurl-list-mode):
* lisp/net/newst-treeview.el (newsticker-treeview-mode):
* lisp/mail/rmailsum.el (rmail-summary-mode):
* lisp/mail/mspools.el (mspools-mode):
* lisp/locate.el (locate-mode):
* lisp/ibuffer.el (ibuffer-mode):
* lisp/emulation/ws-mode.el (wordstar-mode):
* lisp/emacs-lisp/debug.el (debugger-mode):
* lisp/array.el (array-mode):
* lisp/net/eudc.el (eudc-mode): Use define-derived-mode.
* lisp/net/mairix.el (mairix-searches-mode-font-lock-keywords):
Move initialization into declaration.
(mairix-searches-mode): Use define-derived-mode.
* lisp/net/eudc-hotlist.el (eudc-hotlist-mode): Use define-derived-mode.
(eudc-edit-hotlist): Use dolist.
* lisp/man.el (Man-mode-syntax-table): Rename from man-mode-syntax-table.
(Man-mode): Use define-derived-mode.
* lisp/info.el (Info-edit-mode-map): Rename from Info-edit-map.
(Info-edit-mode): Use define-derived-mode.
(Info-cease-edit): Use Info-mode.
* lisp/eshell/esh-mode.el (eshell-mode-syntax-table): Move initialization
into declaration.
(eshell-mode): Use define-derived-mode.
* lisp/chistory.el (command-history-mode-map): Rename from
command-history-map.
(command-history-mode): Use define-derived-mode.
* lisp/calc/calc.el (calc-trail-mode-map): New var.
(calc-trail-mode): Use define-derived-mode.
(calc-trail-buffer): Set calc-main-buffer manually.
* lisp/bookmark.el (bookmark-insert-annotation): New function.
(bookmark-edit-annotation): Use it.
(bookmark-edit-annotation-mode): Make it a proper major mode.
(bookmark-send-edited-annotation): Use derived-mode-p.
* lisp/arc-mode.el (archive-mode): Move kill-all-local-variables a tiny bit
closer to its ideal place. Use \' to match EOS.
* lisp/cedet/semantic/grammar.el (semantic-grammar-mode): Use define-derived-mode.
(semantic-grammar-mode-syntax-table): Rename from
semantic-grammar-syntax-table.
(semantic-grammar-mode-map): Rename from semantic-grammar-map.
* lisp/cedet/data-debug.el (data-debug-mode-map): Rename from data-debug-map.
(data-debug-mode): Use define-derived-mode.
* lisp/gnus/score-mode.el (gnus-score-mode-map): Move initialization
into declaration.
(gnus-score-mode): Use define-derived-mode.
* lisp/gnus/gnus-srvr.el (gnus-browse-mode): Use define-derived-mode.
* lisp/gnus/gnus-kill.el (gnus-kill-file-mode-map): Move initialization
into declaration.
(gnus-kill-file-mode): Use define-derived-mode.
(gnus-kill-file-edit-file, gnus-kill-file-enter-kill, gnus-kill):
Use derived-mode-p.
* lisp/gnus/gnus-group.el (gnus-group-mode): Use define-derived-mode.
(gnus-group-setup-buffer, gnus-group-name-at-point)
(gnus-group-make-web-group, gnus-group-enter-directory)
(gnus-group-suspend): Use derived-mode-p.
* lisp/gnus/gnus-cus.el (gnus-custom-mode): Use define-derived-mode.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-mode): Use define-derived-mode.
* lisp/gnus/gnus-art.el (gnus-article-mode): Use define-derived-mode.
(gnus-article-setup-buffer, gnus-article-prepare)
(gnus-article-prepare-display, gnus-sticky-article)
(gnus-kill-sticky-article-buffer, gnus-kill-sticky-article-buffers)
(gnus-bind-safe-url-regexp, gnus-article-check-buffer)
(gnus-article-read-summary-keys): Use derived-mode-p.
Review and drop old frame resize hack.
* frame.h (struct frame): Remove force_flush_display_p.
* dispnew.c (update_frame): Adjust user and don't call
flush_frame here. The comment has said that there was an issues
with redisplaying fringes, but I don't see any differences with
and without this hack. Hopefully we can continue without it.
* xdisp.c (clear_garbaged_frames): Adjust user and do not clear
current frame matrices twice if resized_p is set.
Do not populate pure Xism x_sync to other ports.
* frame.h (x_sync): Move under HAVE_X_WINDOWS.
* frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
* nsfns.m, w32xfns.c (x_sync): Remove no-op.
* w32term.h (x_sync): Remove prototype.
Cleanup frame flushing.
* dispextern.h (struct redisplay_interface): Drop
flush_display_optional because flush_display is enough
for X and flushing via RIF is just a no-op for others.
* frame.h (flush_frame): New function.
* dispnew.c (update_frame):
* minibuf.c (read_minibuf):
* xdisp.c (echo_area_display, redisplay_preserve_echo_area):
Use it.
* keyboard.c (detect_input_pending_run_timers): Do not flush
all frames but selected one in redisplay_preserve_echo_area.
* nsterm.m (ns_flush): Remove no-op.
(ns_redisplay_interface): Adjust user.
* w32term.h (x_flush): Remove no-op.
(w32_redisplay_interface): Adjust user.
* xterm.c (x_flush): Simplify because we do not flush all
frames at once any more. Adjust comment.
(x_redisplay_interface): Adjust user.
* configure.ac (LDFLAGS_NOCOMBRELOC): New variable.
(LDFLAGS): Move nocombreloc option from here...
(LD_SWITCH_SYSTEM_TEMACS): ... to here.
This is an essential option that should not be in LDFLAGS,
because the user may override that at build time; eg
http://bugs.debian.org/684788. temacs is the only thing
that actually needs this option; this is where it was orginally:
http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00170.html
Michael Albinus [Sun, 8 Sep 2013 15:04:10 +0000 (17:04 +0200)]
Improve compatibility with older Emacsen, and XEmacs.
* net/tramp.el (tramp-find-method, tramp-find-user): Call `propertize'
only if it is bound. It isn't for XEmacs.
(with-tramp-progress-reporter): Do not let-bind `result'. This
yields to scoping errors in XEmacs.
(tramp-handle-make-auto-save-file-name): New function, moved from
tramp-sh.el.
* net/tramp-adb.el (tramp-adb-file-name-handler-alist): Add handler
for `make-auto-save-file-name'.
(tramp-adb--gnu-switches-to-ash): Use
`tramp-compat-replace-regexp-in-string'.
* net/tramp-cache.el (tramp-cache-print): Call
`substring-no-properties' only if it is bound. It isn't for XEmacs.
* net/tramp-cmds.el (tramp-bug): Call `propertize' only if it is
bound. It isn't for XEmacs.
* net/tramp-compat.el (tramp-compat-copy-file): Catch
`wrong-number-of-arguments' error.
(tramp-compat-replace-regexp-in-string): New defun.
* net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): Add handler
for `make-auto-save-file-name'.
(tramp-gvfs-handle-copy-file): Use `tramp-compat-funcall' for
`copy-file'.
(tramp-gvfs-file-gvfs-monitor-file-process-filter)
(tramp-gvfs-file-name): Use `tramp-compat-replace-regexp-in-string'.
(tramp-synce-list-devices): Use `push' instead of `pushnew'.
* net/tramp-gw.el (tramp-gw-open-network-stream): Use
`tramp-compat-replace-regexp-in-string'.
* net/tramp-sh.el (tramp-sh-file-name-handler-alist): Call
`tramp-handle-make-auto-save-file-name'.
(tramp-sh-handle-make-auto-save-file-name): Move to tramp.el.
(tramp-sh-file-gvfs-monitor-dir-process-filter)
(tramp-sh-file-inotifywait-process-filter): Use
`tramp-compat-replace-regexp-in-string'.
(tramp-compute-multi-hops): Use `push' instead of `pushnew'.
* net/tramp-smb.el (tramp-smb-file-name-handler-alist): Add handler
for `make-auto-save-file-name'.
(tramp-smb-handle-copy-directory): Call
`tramp-compat-replace-regexp-in-string'.
(tramp-smb-get-file-entries): Use `push' instead of `pushnew'.
(tramp-smb-handle-copy-file): Improve error message.
(tramp-smb-handle-rename-file): Rename directly only in case
`newname' does not exist yet. This is a restriction of smbclient.
(tramp-smb-maybe-open-connection): Rerun the function only when
`auth-sources' is non-nil.
Alan Mackenzie [Sat, 7 Sep 2013 14:33:50 +0000 (14:33 +0000)]
Correctly fontify Java class constructors.
* progmodes/cc-langs.el (c-type-decl-suffix-key): Now matches ")"
in Java Mode.
(c-recognize-typeless-decls): Set the Java value to t.
* progmodes/cc-engine.el (c-forward-decl-or-cast-1): While
handling a "(", add a check for, effectively, Java, and handle a
"typeless" declaration there.