Paul Eggert [Fri, 20 Sep 2013 03:41:37 +0000 (20:41 -0700)]
Work around performance bug on OS X 10.8 and earlier.
Perhaps Apple will fix this bug some day.
See the thread starting with Daniel Colascione's email in:
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00343.html
* configure.ac (FORTIFY_SOUR): New verbatim section.
Paul Eggert [Thu, 19 Sep 2013 21:40:08 +0000 (14:40 -0700)]
Merge from gnulib.
This incorporates the following changes:
2013-09-19 stdio: OS X port of putc_unlocked + extern inline
2013-09-19 signal: OS X port of sigaddset etc. + extern inline
2013-09-19 extern-inline: do not always suppress extern inline on OS X
2013-09-17 getgroups: statement without effect
2013-08-28 headers: check that _GL_INLINE_HEADER_BEGIN is defined
Stefan Monnier [Thu, 19 Sep 2013 20:51:33 +0000 (16:51 -0400)]
* lisp/eshell/em-ls.el: Use advice. Remove redundant :group keywords.
(eshell-ls-orig-insert-directory): Remove.
(eshell-ls-unload-hook): Not a defcustom any more. Use advice-remove.
(eshell-ls-use-in-dired): Use advice-add/remove.
(eshell-ls--insert-directory): Rename from eshell-ls-insert-directory.
Add `orig-fun' arg for use in :around advice.
Make it check (redundantly) eshell-ls-use-in-dired.
Michael Albinus [Thu, 19 Sep 2013 11:08:01 +0000 (13:08 +0200)]
* net/tramp-sh.el (tramp-get-remote-id): Do not raise an error.
(tramp-get-remote-uid-with-id, tramp-get-remote-gid-with-id)
(tramp-get-remote-python): New defuns.
(tramp-get-remote-uid-with-perl)
(tramp-get-remote-gid-with-perl): New defuns. Perl code
contributed by yary <not.com@gmail.com> (tiny change).
(tramp-get-remote-uid-with-python)
(tramp-get-remote-gid-with-python): New defuns. Python code
contributed by Andrey Tykhonov <atykhonov@gmail.com> (tiny change).
(tramp-get-remote-uid, tramp-get-remote-gid): Use new defuns.
Eli Zaretskii [Thu, 19 Sep 2013 08:43:01 +0000 (11:43 +0300)]
Fix MinGW builds from inside the MSYS installation tree.
configure.ac <srcdir> [MINGW32]: Make sure the value of 'srcdir'
is in the full /d/foo/bar form. See the discussion in
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00210.html,
and in particular
http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00252.html
and its followups, for the details.
Eli Zaretskii [Thu, 19 Sep 2013 08:25:43 +0000 (11:25 +0300)]
Fix a compiler warning on MS-Windows due to recent changes.
src/w32reg.c (w32_get_string_resource): Make the first 2 arguments
'const char *' to avoid compiler warnings due to similar change in
the prototype of x_get_string_resource.
Do not use external array to process X scroll bar messages.
* xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
(x_send_scroll_bar_event): Pack window pointer into two slots
of XClientMessageEvent if we're 64-bit. Adjust comment.
(x_scroll_bar_to_input_event): Unpack accordingly.
Alan Mackenzie [Wed, 18 Sep 2013 20:47:37 +0000 (20:47 +0000)]
Fix fontification of type when followed by "const".
* progmodes/cc-engine.el (c-forward-decl-or-cast-1): Don't exclude
"known" types from fontification.
Stefan Monnier [Tue, 17 Sep 2013 17:22:32 +0000 (13:22 -0400)]
* lisp/gnus/gnus-agent.el (gnus-category-mode): Use define-derived-mode.
(gnus-agent-mode): Use derived-mode-p.
(gnus-agent-rename-group, gnus-agent-delete-group): Don't bind
gnus-command-method and *-command-method to nil, but bind
gnus-command-method to *-command-method instead!
(gnus-agent-fetch-articles): Remove unused var `id'.
(gnus-agent-fetch-headers): Remove unused arg `force'.
(gnus-agent-braid-nov): Remove unused arg `group'. Adjust callers.
(gnus-agent-save-alist, gnus-agent-save-local): Remove unused `item'.
(gnus-agent-short-article, gnus-agent-long-article)
(gnus-agent-low-score, gnus-agent-high-score): Move declaration before
first use.
(gnus-agent-fetch-group-1): Remove unused vars `arts', `category',
`score-param'.
(gnus-tmp-name, gnus-tmp-groups): Defvar them.
(gnus-get-predicate): Push in front of the cache, rather than end.
(gnus-agent-expire-current-dirs, gnus-agent-expire-stats): Defvar them.
(gnus-agent-expire-group-1): Use push. Don't abuse dyn-binding.
(gnus-agent-expire-unagentized-dirs): Don't rebind
gnus-agent-expire-current-dirs since the defvar silences the warning.
(gnus-agent-retrieve-headers): Remove unused var `cached-articles'.
(gnus-agent-regenerate-group): Remove unused vars `point' and `dl'.
(gnus-agent-regenerate): Simplify interactive spec and doc.
* lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Use define-derived-mode.
* lisp/gnus/gnus-salt.el (gnus-tree-mode): Use define-derived-mode.
Use save-current-buffer.
(gnus-tree-mode-map): Initialize in the declaration.
(gnus-pick-mouse-pick-region): Remove unused var `fun'.
(scroll-in-place): Defvar it.
(gnus-tmp-*): Defvar them.
(gnus-get-tree-buffer): Use derived-mode-p.
(gnus--let-eval): New macro.
(gnus-tree-highlight-node): Use it to avoid dynamic binding of
non-prefixed variables.
(gnus-tree-open, gnus-tree-close): Remove unused arg `group'.
* lisp/gnus/gnus-sum.el (gnus-summary-highlight): Remove `below' from the list of
vars since it doesn't seem to be available.
(gnus-set-global-variables, gnus-summary-read-group-1)
(gnus-select-newsgroup, gnus-handle-ephemeral-exit)
(gnus-summary-display-article, gnus-summary-select-article)
(gnus-summary-next-article, gnus-offer-save-summaries)
(gnus-summary-generic-mark): Use derived-mode-p.
(gnus-summary-read-group-1, gnus-summary-exit)
(gnus-summary-exit-no-update, gnus-kill-or-deaden-summary):
Adjust calls to gnus-tree-close and gnus-tree-open.
Stefan Monnier [Tue, 17 Sep 2013 15:52:31 +0000 (11:52 -0400)]
* lisp/emacs-lisp/package.el (package-generate-autoloads): Remove `require'
which should not be needed any more.
(package-menu-refresh, package-menu-describe-package): Use user-error.
Stefan Monnier [Tue, 17 Sep 2013 15:50:33 +0000 (11:50 -0400)]
* lisp/cedet/semantic/symref/list.el (semantic-symref-results-mode):
Use define-derived-mode.
(semantic-symref-produce-list-on-results): Set up the results here
instead of in semantic-symref-results-mode. Move after
semantic-symref-current-results's defvar now that it refers to that var.
(semantic-symref-auto-expand-results)
(semantic-symref-results-summary-function)
(semantic-symref-results-mode-hook): Remove redundant :group arg.
(semantic-symref, semantic-symref-symbol, semantic-symref-regexp):
Initialize directly in the let.
Stefan Monnier [Tue, 17 Sep 2013 15:19:12 +0000 (11:19 -0400)]
* lisp/eshell/esh-cmd.el (eshell-post-rewrite-command-function): New var.
(eshell-post-rewrite-command-hook): Make obsolete.
(eshell-parse-command): Simplify.
(eshell-structure-basic-command): Remove unused arg `vocal-test'.
(eshell--cmd): Declare.
(eshell-parse-pipeline): Remove unused var `final-p'.
Pass a dynvar to eshell-post-rewrite-command-hook.
Implement the new eshell-post-rewrite-command-function.
(eshell-invoke-directly): Remove unused arg `input'.
* lisp/eshell/esh-io.el (eshell-io-initialize):
Use eshell-post-rewrite-command-function.
(eshell--apply-redirections): Rename from eshell-apply-redirections;
adjust to new calling convention.
(eshell-create-handles): Rename args to avoid clashing with dynvar
`standard-output'.
Paul Eggert [Tue, 17 Sep 2013 07:06:42 +0000 (00:06 -0700)]
Don't overuse 'const' in types of locals.
* bidi.c (bidi_count_bytes):
* gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
(xg_event_is_for_scrollbar):
* xselect.c (x_handle_property_notify)
(x_handle_selection_notify, x_handle_dnd_message):
* xsettings.c, xsettings.h (xft_settings_event):
* xterm.c (x_handle_net_wm_state, handle_one_event)
(x_menubar_window_to_frame, x_detect_focus_change)
(construct_mouse_click, note_mouse_movement)
(x_scroll_bar_to_input_event, x_scroll_bar_expose)
(x_scroll_bar_handle_click, x_scroll_bar_note_movement)
(handle_one_xevent, x_handle_net_wm_state):
* xterm.h (x_handle_property_notify, x_handle_selection_notify)
(x_handle_dnd_message):
Avoid unnecessary 'const', typically the second 'const' in
'const foo * const arg', a 'const' that does not affect the API
and doesn't significantly help the human reader.
* configure.ac: Do not check for g_type_init because we
require glib >= 2.28 for GTK3, glib >= 2.10 for GTK2,
glib >= 2.26 for GSettings and glib >= 2.7.0 for GConf, so
suitable glib should provide g_type_init unconditionally.
* src/image.c (fn_g_type_init) [WINDOWSNT]: Define and load
only if Glib < 2.36.0.
(fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
* src/xsettings.c (init_gconf, init_gsettings): Do not check
for g_type_init.
Stefan Monnier [Mon, 16 Sep 2013 19:09:24 +0000 (15:09 -0400)]
* lisp/icomplete.el (icomplete-in-buffer): New var.
(icomplete-pre-command-hook, icomplete-post-command-hook): Remove those
vars and replace them with functions.
(icomplete-minibuffer-setup): Adjust accordingly.
(icomplete--completion-table, icomplete--completion-predicate)
(icomplete--field-string, icomplete--field-beg, icomplete--field-end):
New functions.
(icomplete-forward-completions, icomplete-backward-completions)
(icomplete-simple-completing-p, icomplete-exhibit)
(icomplete-completions): Use them.
(icomplete--in-region-buffer): New var.
(icomplete--in-region-setup): New function.
(icomplete-mode): Use it.
Stefan Monnier [Mon, 16 Sep 2013 18:23:30 +0000 (14:23 -0400)]
* lisp/eshell/esh-opt.el: Fix last change to set lexical-vars properly.
(eshell--do-opts): Rename from eshell-do-opt, remove arg `body-fun',
return args and options.
(eshell-eval-using-options): Use the new return value of
eshell--do-opts to set the options's vars in their scope.
(eshell--set-option): Rename from eshell-set-option.
Add arg `opt-vals'.
(eshell--process-option): Rename from eshell-process-option.
Add arg `opt-vals'.
(eshell--process-args): Use an `opt-vals' alist to store the options's
values during their processing and return them additionally to the
remaining args.