Stefan Monnier [Thu, 19 Dec 2013 14:00:55 +0000 (09:00 -0500)]
* lisp/hl-line.el (hl-line-make-overlay): New fun. Set priority.
(hl-line-highlight, global-hl-line-highlight): Use it.
(hl-line-overlay): Use defvar-local.
* src/nsterm.m (Qfile, Qurl): New.
(EV_MODIFIERS2): New macro.
(EV_MODIFIERS): Use EV_MODIFIERS2.
(ns_term_init): Remove font and color from DND, does not work on
newer OSX, and other ports don't have them.
(performDragOperation:): Handle modifiers used during drag.
Use DRAG_N_DROP_EVENT instead of NS specific events.
Remove global Lisp variables used to communicate with ns-win.el.
Remove font and color handling.
(syms_of_nsterm): Defsym Qfile and Qurl.
Jan Djärv [Thu, 19 Dec 2013 08:40:11 +0000 (09:40 +0100)]
Redo size constraint for NS so frames can span screens.
* nsterm.h (ns_output): Remove dont_constrain.
* nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
(ns_constrain_all_frames, x_set_offset): Remove assignment to
dont_constrain.
(updateFrameSize:, windowWillResize:toSize:): Add trace.
(constrainFrameRect): Remove special case nr_screens == 1.
Don't constrain size to size of view.
Dmitry Gutov [Thu, 19 Dec 2013 04:21:44 +0000 (06:21 +0200)]
* lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Allow the
first arg to be a string (fixed dead code), or an operator symbol.
(ruby-smie--forward-token): Tokenize ` @ ' before strings and
operator symbols.
(ruby-smie-rules): Remove parent token check in the `.' clause, it
did nothing. Don't respond to `(:after ".")', it will be called
with :before anyway. Remove the ` @ ' rule, it didn't seem to
change anything. Only return indentation for binary operators
when they are hanging. De-dent opening paren when its parent is
`.', otherwise it looks bad when the dot is not at bol or eol.
Juri Linkov [Thu, 19 Dec 2013 00:29:41 +0000 (02:29 +0200)]
query-replace backward
* lisp/replace.el (query-replace-read-args): Split a non-negative arg
and a negative arg into separate elements.
(query-replace, query-replace-regexp, replace-string)
(replace-regexp): Add arg `backward'. Doc fix.
(replace-match-maybe-edit): When new arg `backward' is non-nil,
move point to the beginning of the match.
(replace-search, replace-highlight): Use new arg `backward'
to set the value of `isearch-forward'.
(perform-replace): Add arg `backward' and use it to perform
replacement backward.
* lisp/isearch.el (isearch-query-replace): Use a negative prefix arg
to call `perform-replace' with a non-nil arg `backward'.
Juri Linkov [Wed, 18 Dec 2013 23:51:45 +0000 (01:51 +0200)]
* lisp/vc/log-edit.el (log-edit-hook): Add `log-edit-insert-message-template'
to the default list. Move `log-edit-show-files' to the end.
Add more available functions to options.
(log-edit): Move default specific settings to
`log-edit-insert-message-template'. Don't move point.
(log-edit-insert-message-template): New function.
(log-edit-insert-changelog): Add `save-excursion' and don't move point.
Paul Eggert [Wed, 18 Dec 2013 20:36:50 +0000 (12:36 -0800)]
Minor fixes for recent openp changes.
* lisp.h (GCPRO7): New macro.
* lread.c (openp): Use bool for boolean; all callers changed.
Protect save_string from GC. Don't assume that file descriptors
are nonzero. Redo save_mtime comparison to avoid bogus GCC
warning about uninitialized variable.
Eli Zaretskii [Wed, 18 Dec 2013 16:01:43 +0000 (18:01 +0200)]
Fix bug #16179 with ls-lisp emulation of the ls -s switch.
src/ls-lisp.el (ls-lisp-insert-directory): Don't modify %d and %f
formats for displaying file sizes when the -s switch is given.
Instead, compute a separate format for displaying the size in
blocks, which is displayed in addition to the "regular" size.
When -h is given in addition to -s, produce size in blocks in
human-readable form as well.
Chong Yidong [Wed, 18 Dec 2013 08:53:22 +0000 (16:53 +0800)]
Fix loading of themes when NO-ENABLE is t.
* lisp/custom.el (custom-push-theme): If custom--inhibit-theme-enable
is non-nil, do not create a new entry in the symbol's theme-value
or theme-face property; update theme-settings only.
Glenn Morris [Wed, 18 Dec 2013 03:21:48 +0000 (19:21 -0800)]
Add load-prefer-newer option, to load .el if newer than .elc
* src/lread.c (Fload): Pass load_prefer_newer to openp.
Don't bother checking mtime if openp already did it.
(openp): Add `newer' argument, to check all suffixes
and find the newest file.
(syms_of_lread) <load_prefer_newer>: New option.
* lisp/startup.el (fancy-startup-screen, fancy-about-screen):
Set browse-url-browser-function to eww-browse-url locally.
(Bug#14751)
* lisp/net/browse-url.el (browse-url-browser-function): Move `eww'
closer to similar functions.
* lisp/net/eww.el (browse-web): Add alias to `eww'.
(eww-mode-map): Bind "r" to `eww-forward-url' like in Info.
Bind "S-SPC" to `scroll-down-command'. (Bug#16178)
Paul Eggert [Tue, 17 Dec 2013 20:43:43 +0000 (12:43 -0800)]
Merge from gnulib, incorporating:
2013-12-17 gettimeofday: port recent C++ fix to Emacs
2013-12-17 gettimeofday: fix C++ crosscompilation
2013-12-17 qacl: port to Windows better
* lib/file-has-acl.c, lib/time.in.h, m4/gettimeofday.m4, m4/time_h.m4:
Update from gnulib.
* lib/gnulib.mk: Regenerate.
Eli Zaretskii [Tue, 17 Dec 2013 17:46:31 +0000 (19:46 +0200)]
Fix some warnings in w32 specific code.
src/w32term.c (w32_initialize): Declare the argument of
set_user_model as const.
src/w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
(w32_menu_show): Constify some arguments passed to MessageBox.
src/w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
to initialize Lisp objects.
src/w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
initialize Lisp objects.
src/frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
use variables used only on X under that condition.
src/fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
variables not used there.
Martin Rudalics [Tue, 17 Dec 2013 17:29:11 +0000 (18:29 +0100)]
Remove no more needed bindings of split-height-threshold.
* dired.el (dired-mark-pop-up):
* register.el (register-preview): Don't bind
split-height-threshold here since it's now done in
display-buffer-below-selected.
oblique [Tue, 17 Dec 2013 16:03:23 +0000 (00:03 +0800)]
Fix 256 color mapping in rxvt.el
* term/rxvt.el (rxvt-rgb-convert-to-16bit): Standardize with
xterm-rgb-convert-to-16bit.
(rxvt-register-default-colors): Standardize with
xterm-register-default-colors.
Dmitry Gutov [Tue, 17 Dec 2013 01:31:55 +0000 (03:31 +0200)]
Fix bug#16116
* lisp/emacs-lisp/smie.el (smie-indent--rule): Extract `smie-indent--rule-1'.
(smie-indent-close): Call `smie-indent--rule-1' with METHOD
:close-all, to see which indentation method to use.
(smie-rules-function): Document the method :close-all.
* test/indent/ruby.rb: Update examples according to the change
in `smie-indent-close'.
Paul Eggert [Mon, 16 Dec 2013 22:35:57 +0000 (14:35 -0800)]
Fix problems with CANNOT_DUMP and EMACSLOADPATH.
* leim/Makefile.in (RUN_EMACS):
* lisp/Makefile.in (emacs): Add lisp src to EMACSLOADPATH.
* lisp/loadup.el: Check for src/bootstrap-emacs only when Emacs can dump.
Expand dir too, in case it's relative.
* src/lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
Juri Linkov [Mon, 16 Dec 2013 21:48:51 +0000 (23:48 +0200)]
* lisp/desktop.el (desktop-auto-save-timeout): Change default to
`auto-save-timeout'. Doc fix.
(desktop-save): Skip the timestamp in desktop-saved-frameset
when checking for auto-save changes.
(desktop-auto-save): Don't call desktop-auto-save-set-timer since
`desktop-auto-save' is called repeatedly by the idle timer.
(desktop-auto-save-set-timer): Replace `run-with-timer' with
`run-with-idle-timer' and a non-nil arg REPEAT. Doc fix.
Eli Zaretskii [Mon, 16 Dec 2013 18:18:44 +0000 (20:18 +0200)]
Update Emacs's Windows manifests to support Windows 8.1.
nt/emacs-x64.manifest:
nt/emacs-x86.manifest: Declare that we target Windows 8.1 as well
as earlier versions. This is so GetVersion and GetVersionEx APIs
used for bug reporting and other purposes return accurate version
number on Windows 8.1. See the discussion on MSDN
http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx
for more details.
Eli Zaretskii [Mon, 16 Dec 2013 18:09:36 +0000 (20:09 +0200)]
A better fix for bug #16148 and related issues.
src/xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
code, revealed in presence of R2L characters, character
compositions, and display vectors.
src/dispextern.h (struct composition_it): Correct a comment for the
'width' member.
Paul Eggert [Mon, 16 Dec 2013 18:05:53 +0000 (10:05 -0800)]
* font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
This prevents a compilation error on C compilers that do not
default functions to return 'int' if not declared. Also, add
INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
since it now uses inline functions.
Ted Zlatanov [Mon, 16 Dec 2013 15:49:25 +0000 (10:49 -0500)]
Cleanup cfengine3-mode so complete-symbol works again.
* progmodes/cfengine.el (cfengine3--current-word): Remove.
(cfengine3--current-function): Bring in the current-function
functionality from `cfengine3--current-word'.
(cfengine3-completion-function): Bring in the
bounds-of-current-word functionality from
`cfengine3--current-word'.
Dmitry Antipov [Mon, 16 Dec 2013 07:45:33 +0000 (11:45 +0400)]
* font.c (valid_font_driver) [ENABLE_CHECKING]: New function
intended to find bogus pointers in font objects (Bug#16140).
* font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
* alloc.c (cleanup_vector): Use valid_font_driver in eassert.
(compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
Disable for MS-Windows due to Bug#15876; apparently this
requires more or less substantial changes in fontset code.
* xfont.c (xfont_close):
* xftfont.c (xftfont_close): Call x_display_info_for_display
to check whether 'Display *' is valid (Bug#16093 and probably
Bug#16069).
Stefan Monnier [Mon, 16 Dec 2013 02:24:08 +0000 (21:24 -0500)]
* lisp/emulation/cua-rect.el (cua-rectangle-mark-mode): New minor mode.
(cua--deactivate-rectangle): Don't deactivate the mark.
(cua-set-rectangle-mark): Don't set mark-active since
cua--activate-rectangle already does it for us.
(cua--rectangle-highlight-for-redisplay): Unhighlight a previous
non-rectangular region.
* lisp/emulation/cua-base.el (cua-repeat-replace-region):
Use with-current-buffer.
* lisp/net/gnutls.el: Use cl-lib.
(gnutls-negotiate): `mapcan' -> cl-mapcan.
Eli Zaretskii [Sun, 15 Dec 2013 16:51:59 +0000 (18:51 +0200)]
Fix bug #16151 with background of display margins.
src/xdisp.c (extend_face_to_end_of_line): Extend background of
non-default face in margin areas as well. (Bug#16151)
(display_line): Call extend_face_to_end_of_line for continued
lines as well, if the display margins have non-zero width.
(set_glyph_string_background_width): When needed, set the
extends_to_end_of_line_p flag on glyph strings to be drawn in
margin areas, not only in the text area.
Paul Eggert [Sun, 15 Dec 2013 04:20:53 +0000 (20:20 -0800)]
Use bool for boolean (GLYPH_DEBUG case).
* xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
Use bool for boolean.
* dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
Args must now be expressions; all callers changed.
Ted Zlatanov [Sat, 14 Dec 2013 19:55:19 +0000 (14:55 -0500)]
Support filtering by keywords in package listings.
* emacs-lisp/package.el (package-built-in-p): Support both
built-in and the package.el converted package descriptions.
(package-show-package-list): Allow keywords.
(package-keyword-button-action): Use it instead of
`finder-list-matches'.
(package-menu-filter-interactive): Interactive filtering (by
keyword) function.
(package-menu--generate): Support keywords and change keymappings
and headers when they are given.
(package--has-keyword-p): Helper function.
(package-menu--refresh): Use it.
(package--mapc): Helper function.
(package-all-keywords): Use it.
(package-menu-mode-map): Set up menu items and keybindings to
provide a filtering UI.
Ted Zlatanov [Sat, 14 Dec 2013 18:04:09 +0000 (13:04 -0500)]
New verify-error GnuTLS interface for certificate validation
* net/gnutls.el (gnutls-verify-error): New defcustom to control
the behavior when a certificate fails validation. Defaults to
old behavior: never abort, just warn.
(gnutls-negotiate): Use it.
* gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
now a list of certificate validation checks that will abort a
connection with an error.
(Fgnutls_boot): Document it and use it.
Eli Zaretskii [Sat, 14 Dec 2013 08:29:42 +0000 (10:29 +0200)]
Fix copy-file on MS-Windows with file names outside of current locale.
src/fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
Windows-specific code to w32.c. Change error message text to
match that of Posix platforms.
src/w32.c (w32_copy_file): New function, most of the code copied and
reworked from Fcopy_file. Improve error handling. Plug memory
leak when errors are thrown. Support file names outside of the
current codepage. (Bug#7100)
Dmitry Gutov [Sat, 14 Dec 2013 06:46:13 +0000 (08:46 +0200)]
Fix bug#16118
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Return nil before
open-paren tokens when preceded by a open-paren, too.
(ruby-smie-rules): Handle virtual indentation after open-paren
tokens specially. If there is code between it and eol, return the
column where is starts.