1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-26 19:18:50 +00:00
Commit Graph

126516 Commits

Author SHA1 Message Date
Alan Third
5508f06f32 Fix some deprecated functions
* src/nsterm.m (firstRectForCharacterRange): In OS X >10.6 replace
convertBaseToScreen with convertRectToScreen.
* src/nsmenu.m (ns_update_menubar): Remove attachedMenu, deprecated in
OS X 10.2, and always seems to return nil.
2016-07-07 20:48:35 +01:00
Aaron Jensen
42ac8f5723 Disable App Nap (bug#22993)
* nextstep/templates/Info.plist.in: Insert AppNap disable code.

Copyright-paperwork-exempt: yes
2016-07-07 19:57:47 +01:00
Michael Albinus
0e8d3445a7 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2016-07-07 18:51:00 +02:00
Michael Albinus
7f8e742833 Fix an error in Tramp for rsync
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
Make it work for "rsync".
(tramp-make-copy-program-file-name): Apply `directory-file-name'.
2016-07-07 18:50:24 +02:00
Tino Calancha
44517b21ab Ibuffer: Mark locked buffers
* lisp/ibuf-ext.el (ibuffer-locked-buffer-p): New defun.
(ibuffer-mark-by-locked): New command.
(ibuffer-mode-map): Bind it to '% L'; update menus.
(ibuffer-mode): Update mode doc.
;* etc/NEWS: Add NEWS entry for these changes and previous two commits.
2016-07-08 01:34:35 +09:00
Tino Calancha
9d70e4da74 * lisp/ibuffer.el: Add face for locked buffers 2016-07-08 01:15:54 +09:00
Tino Calancha
56277b8150 * lisp/ibuffer.el: Add mark for locked buffers 2016-07-08 01:13:55 +09:00
Tino Calancha
ee554d94f6 ;* etc/NEWS (Ibuffer): Update entry according with last commit 2016-07-08 00:57:40 +09:00
Tino Calancha
1650d7102a Remove duplicate binding
* lisp/ibuffer.el (ibuffer-mode-map): 'ibuffer-mark-by-content-regexp'
just bound to '% g'.
As suggested in:
http://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00165.html
2016-07-07 23:59:45 +09:00
Tino Calancha
1583b569eb Ibuffer: Drop needless binding
* lisp/ibuffer.el (ibuffer-mark-interactive): 'inhibit-read-only'
already bound to 't' inside 'ibuffer-set-mark'.
2016-07-07 17:49:02 +09:00
Phillip Lord
1efb208032 Run tests from non-byte compiled files
* test/Makefile.in: Eval non-byte-compiled files for tests.
2016-07-07 09:35:11 +01:00
Mark Oteiza
5811404f0b Replace eldoc-documentation-function with a hook
* lisp/emacs-lisp/eldoc.el (eldoc-documentation-functions): New hook.
(eldoc-documentation-function): Make into obsolete alias.
(eldoc-echo-area-use-multiline-p, eldoc-highlight-function-argument):
(eldoc-argument-case, global-eldoc-mode): Update docstrings.
(eldoc-print-current-symbol-info): Use run-hook-with-args-until-success
on eldoc-documentation-functions.
(eldoc-supported-p): New function.
(eldoc-mode, global-eldoc-mode, eldoc-schedule-timer): Use eldoc-supported-p.
* etc/NEWS: Mention eldoc-documentation-functions.
* doc/lispref/modes.texi: Update reference.
2016-07-06 23:16:32 -04:00
Simen Heggestøyl
c0a5ae906d Complete "initial" and "unset" in CSS mode
* lisp/textmodes/css-mode.el (css--complete-property-value): Make
"initial" and "unset" completion candidates for all CSS properties,
just like "inherit".

* test/lisp/textmodes/css-mode-tests.el
(css-test-complete-property-value): Update test to reflect the above
change.
2016-07-06 19:25:10 +02:00
Michael Albinus
2cbd80a5f8 * lisp/net/tramp-gvfs.el (tramp-gvfs-mount-spec): Fix typo. 2016-07-06 17:33:00 +02:00
Paul Eggert
7eb7335f00 Simplify rfc1345.el a bit
* lisp/leim/quail/rfc1345.el: Omit commented-out codes for ASCII
that would no longer parse.  Replace control characters with
escapes in character constants.  Omit unnecessary \ after ?.
This does not change behavior.
2016-07-06 16:11:06 +02:00
Dmitry Antipov
a7e302dc1d Prefer 'frame-parameter' where it is expected to be a bit faster
* lisp/international/mule-diag.el (mule-diag):
* lisp/menu-bar.el (menu-bar-showhide-scroll-bar-menu):
* lisp/mouse.el (mouse-drag-line, font-menu-add-default):
* lisp/scroll-bar.el (toggle-scroll-bar, toggle-horizontal-scroll-bar):
* lisp/faces.el (x-resolve-font-name): Use 'frame-parameter'.
2016-07-06 06:05:15 +03:00
Dmitry Antipov
b1a64dba04 Reduce consing caused by vertical motion commands
* src/frame.c (Fframe_parameter): Avoid call to Fframe_parameters for the
parameters frequently requested by calls to 'next-line' and 'previous-line'.
2016-07-06 06:03:12 +03:00
Michael Albinus
1ba6f2c7bb Make all Tramp tests pass for "gdrive" method
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-delete-directory)
* lisp/net/tramp-compat.el (tramp-compat-copy-directory)
(tramp-compat-delete-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-delete-directory):
Use `directory-files-no-dot-files-regexp'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-send-command): Call `tramp-flush-file-property' in
case of problems.

* test/lisp/net/tramp-tests.el (tramp--instrument-test-case):
Adapt docstring.
(tramp-test14-delete-directory): Make further tests.
2016-07-05 21:16:25 +02:00
Eli Zaretskii
36e69bd82a Fix redisplay with window-start on continuation lines
* src/xdisp.c (pos_visible_p): Return false if the window starts
after CHARPOS.
(compute_window_start_on_continuation_line): Don't return
window-start position that is after point in the buffer, as the
callers don't expect this to happen, and will generally display an
empty window with the cursor in its middle.  (Bug#23871)
2016-07-05 19:33:01 +03:00
Tino Calancha
c770dbb098 Add :expected-result :failed for unfixed bug test
* test/lisp/help-fns-tests.el (help-fns-test-bug23887):
2016-07-06 01:10:22 +09:00
Tino Calancha
a18baf565e * test/lisp/help-fns-tests.el: Add several tests for 'describe-function'. 2016-07-05 16:16:11 +09:00
Michal Nazarewicz
dcefd2bbc0 Don’t create unnecessary marker in ‘delete-trailing-whitespace’
* lisp/simple.el (delete-trailing-whitespace): If END argument is nil,
there is no need for the end-marker to be created.
2016-07-04 23:44:06 +02:00
Michal Nazarewicz
7c6317a049 Simplify ‘delete-trailing-whitespace’ by not treating \n as whitespace
* lisp/simple.el (delete-trailing-whitespace): Set newline’s character
syntax to non-whitespace so that ‘\s-’ regular expression does not match
it.

This simplifies the loop slightly since a simple ‘\s-+$’ can be used and
as a consequence ‘line-beginning-position’ function does not need to be
called any longer.

Furthermore, when newline has whitespace syntax, ‘\s-$’ regular
expression ends up matching empty lins since ‘\s-’ matches newline
characetr of proceeding line.  This leads to needless loop iterations.

Since previous change to ‘delete-trailing-whitespace’ already introduced
‘with-syntax-table’, take advantage of it and also overwrite newline’s
character syntax.
2016-07-04 23:44:06 +02:00
Michal Nazarewicz
dc294483af Make ‘delete-trailing-whitespace’ delete spaces after form feed
* lisp/simple.el (delete-trailing-whitespace): Treat form fead as
a non-whitespace character (regradless of whether it’s character syntax
is whitespace) and delete any whitespace following it instead of leaving
lines with form feeds completely unchanged.  I.e. a line like "\f " will
now became "\f".
2016-07-04 23:44:06 +02:00
Dmitry Antipov
e3ae3c4488 Cleanup XEditRes hack
* configure.ac [USE_X_TOOLKIT]: Define X_TOOLKIT_EDITRES if
_XEditResCheckMessages is declared in X11/Xmu/Editres.h and may be
linked with -lXmu.  This should work with any non-ancient Xmu library.
* xfns.c (toplevel): Remove old cruft.
(x_window) [USE_X_TOOLKIT]: Use X_TOOLKIT_EDITRES.
* xterm.c (toplevel): Remove old cruft.
(handle_one_xevent): Use X_TOOLKIT_EDITRES.
* xterm.h (toplevel): Include X11/Xmu/Editres.h if X_TOOLKIT_EDITRES.
2016-07-04 20:05:06 +03:00
Michael Albinus
f24fe30cb8 Add Google Drive support to Tramp
* doc/misc/tramp.texi: Add `gdrive' method.

* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.3.1-pre".

* etc/NEWS: Add Tramp connection method "gdrive".

* lisp/net/tramp-gvfs.el (tramp-gvfs-methods) <gdrive>: Add.
(tramp-default-user-alist, tramp-default-host-alist): Add rule
for "gdrive".
(tramp-gvfs-file-attributes): Add "name", remove "standard::icon".
(tramp-gvfs-file-attributes-with-gvfs-ls-regexp): Simplify regexp.
(tramp-gvfs-get-directory-attributes): Improve loop.  Use
"standard::display-name" as file name, if available.
(tramp-gvfs-handle-file-name-all-completions): Simplify.
(tramp-gvfs-url-file-name, tramp-gvfs-handler-mounted-unmounted)
(tramp-gvfs-connection-mounted-p, tramp-gvfs-mount-spec):
Map between "gdrive" and "google-drive".

* lisp/net/tramp.el (tramp-call-process): Do not signal error.

* test/lisp/net/tramp-tests.el (tramp--instrument-test-case):
Do not enable `tramp-message-show-message'.
(tramp-test13-make-directory, tramp-test14-delete-directory):
Do not specify error type.
2016-07-04 15:36:30 +02:00
Tino Calancha
05d76dba66 Calc: Update mode line after change mode
* lisp/calc/calc-ext.el (calc-change-mode): Call 'calc-set-mode-line'.
2016-07-04 16:08:55 +09:00
Mark Oteiza
ca1b9b38dc * lisp/simple.el (save-mark-and-excursion): Add declare forms. 2016-07-03 18:54:43 -04:00
Paul Eggert
838f122873 Re-fix open-network-stream responsiveness
Problem reported by Christer Ekholm (Bug#23864).
* src/process.c (wait_reading_process_output): Further fix for
typo introduced in 2015-07-06T02:19:13Z!eggert@cs.ucla.edu when
wait == INFINITY and got_output_end_time is invalid.  See:
http://bugs.gnu.org/23864#20
2016-07-04 00:47:41 +02:00
Alan Mackenzie
9e54c5250d Remove redundant forms from CC Mode for faster fontification
* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): Remove four arms of
the "main" cond form in the function, which have been redundant since the
extraction of c-font-lock-cut-off-declarators from the function on
2016-06-15/16.
2016-07-03 18:13:51 +00:00
Alan Mackenzie
4b9ac23960 Speed up CC Mode fontification with less accurate functions extending region
* lisp/progmodes/cc-fonts.el (c-font-lock-cut-off-declarators)
(c-font-lock-enclosing-decls)
* lisp/progmodes/cc-mode.el (c-fl-decl-start): Replace invocations of
c-beginning-of-decl-1 with less accurate invocations of
c-syntactic-skip-backwards to speed up fontification.
2016-07-03 13:15:44 +00:00
Tino Calancha
b56a8bcd0e Ibuffer: unmark all buffers without confirmation
* lisp/ibuffer.el (ibuffer-unmark-all-marks): New command (Bug#23680).
(ibuffer-mouse-popup-menu): Use it.
(ibuffer-mode): Update mode doc.
(ibuffer-mode-map): Bind 'ibuffer-unmark-all-marks' to 'U'.
Rebind 'ibuffer-do-replace-regexp' to 'r'.
; * etc/NEWS: Add entry for this change.
2016-07-03 21:42:02 +09:00
Paul Eggert
1e97ecb964 Fix open-network-stream responsiveness
Problem reported by Constantin Kulikov (Bug#23684).
* src/process.c (wait_reading_process_output):
Fix typo introduced in 2015-07-06T02:19:13Z!eggert@cs.ucla.edu
when wait == INFINITY and got_output_end_time is invalid.
In this case the code should break, not continue.
2016-07-03 10:50:31 +02:00
Tino Calancha
08974112ae Ibuffer: Mark buffers by content
* lisp/ibuf-ext.el (ibuffer-mark-by-content-regexp): New command.
(ibuffer-never-search-content-name): New option.
(ibuffer-never-search-content-mode): Idem.
(ibuffer-mark-by-content-regexp): Use them (Bug#23734).

* lisp/ibuffer.el (ibuffer-mode-map): Bind new command to '% c' and '% g'.
(ibuffer-mode): Update mode documentation.
; * etc/NEWS: Add NEWS entry for these changes.
2016-07-03 14:51:18 +09:00
Tino Calancha
0d06e94309 ibuffer-copy-filename-as-kill verbosity increase
* lisp/ibuf-ext.el (ibuffer-copy-filename-as-kill):
Use shorter name, result, for a local bound var.
Show the string result in the echo area.
2016-07-03 14:11:49 +09:00
Eli Zaretskii
da2512f24c Fix cursor positioning on TTY frames after stretch glyph
* src/term.c (append_glyph, append_composite_glyph)
(append_glyphless_glyph): Set the avoid_cursor_p and multibyte_p
members of the produced 'struct glyph'.  Fixes cursor positioning
on the first character after a stretch glyph produced from
line-prefix, wrap-prefix, etc. on TTY frames.
2016-07-02 16:56:36 +03:00
Eli Zaretskii
3a1e3b41a5 Fix vertical-movement in buffers with wrap-prefix
* src/indent.c (Fvertical_motion): Zero the current_y coordinate
whenever we zero the vpos vertical position of the iterator.
* src/xdisp.c (move_it_in_display_line_to): Handle line-prefix and
wrap-prefix regardless of whether the current Y coordinate is
inside the window dimensions.  (Bug#23879)
2016-07-02 15:39:26 +03:00
Eli Zaretskii
55d38fc89f Rename FACE_OPT_FROM_ID to FACE_FROM_ID_OR_NULL
* src/dispextern.h (FACE_FROM_ID_OR_NULL): Renamed from
FACE_OPT_FROM_ID; all callers changed.
* src/xdisp.c (extend_face_to_end_of_line): Call FACE_FROM_ID, not
FACE_FROM_ID_OR_NULL, as the resulting face is immediately
dereferenced.
(fill_gstring_glyph_string): Call FACE_FROM_ID, not
FACE_FROM_ID_OR_NULL, as the resulting face will be dereferenced
when the glyph string is drawn.
(BUILD_COMPOSITE_GLYPH_STRING): Call FACE_FROM_ID, not
FACE_FROM_ID_OR_NULL, as the resulting face will be dereferenced
in fill_composite_glyph_string.
(calc_line_height_property): Call FACE_FROM_ID_OR_NULL rather that
FACE_FROM_ID, since the function and its caller can cope with that
situation.  Conflate 3 tests of missing face or font into just
one.
* src/xfaces.c (Fx_list_fonts, Fface_font, lookup_face): Call
FACE_FROM_ID_OR_NULL rather that FACE_FROM_ID, since these
functions can cope with that situation.
(lookup_derived_face): Don't call FACE_FROM_ID if the result will
not be used.
* src/w32console.c (w32_face_attributes): Remove redundant 'eassert'.
2016-07-02 12:39:47 +03:00
Mark Oteiza
a5ec5c073a * lisp/gnus/gnus-art.el (gnus-article-send-map): Remove extra quote. 2016-07-01 18:50:00 -04:00
Stefan Monnier
af0d0b8cfc * lisp/auth-source.el (auth-source--symbol-keyword): Fix namespace
i.e. rename from auto-source--symbol-keyword.
2016-07-01 11:59:37 -04:00
Dmitry Antipov
d942c39c44 Avoid yet another possible NULL pointer dereference found by GCC 6.1.1
* lwlib/lwlib.c (lw_get_all_values): Always check the value returned by
get_widget_info.
2016-07-01 18:45:24 +03:00
Glenn Morris
55e4e83cf4 ; Auto-commit of loaddefs files. 2016-07-01 06:18:09 -04:00
Alan Mackenzie
455700d69a CC Mode: truncate the semi-nonlit cache when applying syntax-table to a quote
This applies to applying or removing syntax-table text properties in raw
strings which affect the stringiness of a piece of text.  This fixes the
bug
reported in
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00695.html.

* lisp/progmodes/cc-engine.el (c-truncate-semi-nonlit-pos-cache): new
defsubst.
(c-invalidate-state-cache-1): Call new function in place of inline
manipulation.
(c-depropertize-raw-string, c-propertize-raw-string-opener): truncate the
semi-nonlit cache when pertinent syntax-table text properties get applied to
the text.
2016-06-30 12:58:30 +00:00
Dmitry Antipov
fd6a133fdc Minor tweaks to openp
* src/lread.c (openp): Move invariant code out of the loop
and thus avoid redundant calls to memcpy.  Adjust comments.
2016-06-30 09:30:41 +03:00
Dmitry Antipov
3aeb7c35ed Simplify handling of frame parameters
* src/frame.c (x_set_frame_parameters): Avoid extra loop processing
foreground color, background color and font parameters.  Adjust
comments.
2016-06-30 09:21:07 +03:00
Dmitry Antipov
4bd3503991 Cleanup around mature character manipulation functions
* lisp/international/mule-diag.el (decode-codepage-char): Remove.

* lisp/ldefs-boot.el (toplevel): Adjust accordingly.

* lisp/subr.el (toplevel): Do not advertise calling conventions
for 'decode-char' and 'encode-char'.

* src/charset.c (Fdecode_char, Fencode_char): Remove unused 3rd arg.
2016-06-30 08:37:46 +03:00
Alan Mackenzie
681d3f1f58 Fix C-M-a in a C function finding the start of a macro preceding it.
Also amend some pertinent documentation.  This fixes bug #23818.

* lisp/progmodes/cc-engine.el (c-beginning-of-decl-1): Also check for a
virtual semicolon at a place where we check for other types of statement ends.

* lisp/progmodes/cc-vars.el (c-macro-nacmes-with-semicolon): Remove from the
doc string the bit saying that the variable is a prototype and liable to
change.

* doc/misc/cc-mode.texi (Macros with ;): Enhance, stating that configuring
macros with semicolon can prevent C-M-a missing the beginning of defun.
2016-06-29 20:17:39 +00:00
Dmitry Antipov
4a2a1eba09 Avoid possible NULL pointer dereference found by GCC 6.1.1
* src/xfns.c (x_get_monitor_attributes_xrandr): Always check
the value returned by XRRGetOutputInfo.
2016-06-29 07:46:59 +03:00
Tino Calancha
1a5d0c1518 Dired recognize dirs when file size in human units
* lisp/dired.el (dired-re-inode-size): Update 'dired-re-inode-size'
to match when Dired displays the allocated file size column
in human readable units (Bug#22255).
2016-06-29 11:47:16 +09:00
Mark Oteiza
ff64fa75a8 Fix breakage from previous change
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1):
* lisp/vc/log-view.el (log-view-font-lock-keywords): Quote face.
2016-06-28 21:52:48 -04:00