Paul Eggert [Tue, 1 Apr 2014 20:18:12 +0000 (13:18 -0700)]
* fns.c (validate_subarray): Rename from validate_substring,
since it works for vectors too. New arg ARRAY. Optimize for the
non-nil case. Instead of returning bool, throw an error if out of
range, so that the caller needn't do that. All uses changed.
Report original values if out of range.
(Fsubstring, Fsubstring_no_properties, secure_hash):
Also optimize the case where FROM is 0 or TO is the size.
Dmitry Antipov [Mon, 31 Mar 2014 07:13:58 +0000 (11:13 +0400)]
* search.c (Freplace_match): Use make_specified_string.
* xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
to catch bogus override face of glyph strings.
* lisp/progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update.
(top-level): No longer require assoc.
(vhdl-asort, vhdl-anot-head-p, vhdl-aput, vhdl-adelete, vhdl-aget):
New functions. Use throughout to replace aget etc.
(vhdl-aput-delete-if-nil): Rename from vhdl-aput.
(vhdl-update-file-contents): Update for vhdl-aput-delete-if-nil rename.
(vhdl-template-replace-header-keywords): Fix bug for "<title string>".
(vhdl-compile-init): Do not initialize regexps for Emacs 22+.
(vhdl-error-regexp-emacs-alist): Remove regexps from all compilers
except `vhdl-compiler'.
(vhdl-error-regexp-add-emacs): Remove all other compilers,
when appropriate.
Jan Djärv [Sun, 30 Mar 2014 17:21:20 +0000 (19:21 +0200)]
Avoid flickering on frame creation with tool bar on OSX.
* nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
is nil. If waiting for toolbar to complete, force a redraw.
* nsterm.h (EmacsView): Add wait_for_tool_bar.
* nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
bar is zero height, just return.
(initFrameFromEmacs:): Initialize wait_for_tool_bar.
Glenn Morris [Fri, 28 Mar 2014 23:11:39 +0000 (19:11 -0400)]
Improve usage of AC_INIT
* configure.ac (AC_INIT): Add "GNU" in package, add bug address.
(PACKAGE_BUGREPORT): Use it.
* src/emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
(emacs_bugreport): New variable.
(usage_message): Use PACKAGE_BUGREPORT.
(syms_of_emacs) <report-emacs-bug-address>: New variable.
* lisp/cus-start.el (report-emacs-bug-address): Set custom properties.
* lisp/mail/emacsbug.el (report-emacs-bug-address):
Variable is now defined in emacs.c.
Make `cycle-spacing' behave more like `just-one-space' if colled once.
* simple.el (cycle-spacing): Never delete spaces on first run by
default, but do so in a new 'fast mode and if there are already
N spaces (the previous behaviour).
Compare N with its value in previous invocation so that changing
prefix argument restarts `cycle-spacing' sequence.
The idea is that with this change, binding M-SPC to
`cycle-spacing' should not introduce any changes in behaviour of
the binding so long as users do not type M-SPC twice in a raw with
the same prefix argument or lack thereof.
Paul Eggert [Thu, 27 Mar 2014 22:52:14 +0000 (15:52 -0700)]
Port recent signal-related changes to FreeBSD.
Problem reported by Herbert J. Skuhra.
* lisp.h (block_tty_out_signal, unblock_tty_out_signal):
Move decls from here ...
* syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
Glenn Morris [Thu, 27 Mar 2014 20:57:23 +0000 (16:57 -0400)]
Simplify treatment of some startup hooks
* lisp/startup.el (inhibit-startup-hooks): Doc tweak.
(normal-top-level): Simplify running of hooks.
For window-setup-hook, respect inhibit-startup-hooks.
(command-line-1): Don't set window-setup-hook to nil.
Glenn Morris [Thu, 27 Mar 2014 19:41:57 +0000 (15:41 -0400)]
Require GNU make to build Emacs
Ref: http://debbugs.gnu.org/16717#45
If no-one objects, we can then start getting rid of some of the
convoluted Makefile hacks that exist to support non-GNU makes.
* configure.ac: Require GNU make.
(HAVE_GNU_MAKE): Remove.
* INSTALL, etc/NEWS, etc/PROBLEMS: Update for this change.
Glenn Morris [Thu, 27 Mar 2014 18:20:08 +0000 (14:20 -0400)]
vhdl-mode.texi clean-up
* doc/misc/vhdl-mode.texi: General clean-up.
Set copyright to FSF (years based on vhdl-mode releases), add license.
Remove hand-written node pointers. Remove info re old Emacs versions.
Markup fixes.
(Getting Connected): Remove irrelevant info.
(Indentation Commands, Requirements): Remove empty/irrelevant nodes.
(Frequently Asked Questions): Electric indent is now enabled.
* lisp/emacs-lisp/package.el: Fix bug#16733 (again).
(url-http-parse-response, url-http-end-of-headers, url-recreate-url)
(url-http-target-url): Remove unused declarations.
(package-handle-response): Remove.
(package--with-work-buffer): Use url-insert-file-contents and simplify.
(package--download-one-archive): Use current-buffer instead of
dynamic binding of `buffer'.
(describe-package-1): Do not decode readme-string.
* lisp/url/url-handlers.el (url-http-parse-response): Add autoload.
(url-insert-file-contents): Signal file-error in case of HTTP error.
Reto Zimmermann [Wed, 26 Mar 2014 03:58:25 +0000 (20:58 -0700)]
Sync with upstream vhdl mode v3.35.1
* lisp/progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp): Update.
(vhdl-compiler-alist): Doc fix.
(vhdl-goto-line): Remove.
(vhdl-mode-abbrev-table-init): Add XEmacs compat.
(vhdl-mode) <paragraph-start>: Fix value.
(vhdl-fix-statement-region): Not `for' in wait-statement.
(vhdl-beautify-region): Also (un)tabify.
(vhdl-get-visible-signals):
Scan declarative part of generate statements.
(vhdl-template-record): Fix indentation for record type declaration.
(vhdl-expand-abbrev, vhdl-expand-paren): FIXME.
(vhdl-scan-directory-contents): Tweak.
(vhdl-speedbar-find-file, vhdl-speedbar-port-copy)
(vhdl-compose-components-package):
Replace vhdl-goto-line with forward-line.
(top-level): Tweak speedbar frame selection.
(vhdl-generate-makefile-1): Support for compilers with no
unit-to-file name mapping (create directory with dummy files).
Paul Eggert [Tue, 25 Mar 2014 14:43:26 +0000 (07:43 -0700)]
Handle sigmask better with nested signal handlers.
* atimer.c (sigmask_atimers): Remove.
Remaining use rewritten to use body of this function.
* atimer.c (block_atimers, unblock_atimers):
* callproc.c (block_child_signal, unblock_child_signal):
* sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
New arg OLDSET. All callers changed.
* atimer.c (block_atimers, unblock_atimers):
* callproc.c (block_child_signal, unblock_child_signal):
* keyboard.c (handle_interrupt):
* sound.c (vox_configure, vox_close):
Restore the old signal mask rather than unilaterally clearing bits
from the mask, in case a handler is running within another
handler. All callers changed.
* lisp.h, process.c, process.h, term.c:
Adjust decls and callers to match new API.
* sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
signal handlers aren't supposed to use floating point anyway.
(handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
* net/tramp-sh.el (tramp-sh-handle-vc-registered): Revert change
from 2014-03-07, it decreases performance unnecessarily. Let-bind
`remote-file-name-inhibit-cache' to nil in the second pass.
(tramp-find-executable): Do not call "which" on SunOS.
(tramp-send-command-and-check): Fix docstring.
Barry O'Reilly [Tue, 25 Mar 2014 02:47:39 +0000 (22:47 -0400)]
Undo in region after markers in undo history relocated
* simple.el (primitive-undo): Only process marker adjustments
validated against their corresponding (TEXT . POS). Issue warning
for lone marker adjustments in undo history. (Bug#16818)
(undo-make-selective-list): Add marker adjustments to selective
undo list based on whether their corresponding (TEXT . POS) is in
the region. Remove variable adjusted-markers, which was unused
and only non nil during undo-make-selective-list.
(undo-elt-in-region): Return nil when passed a marker adjustment
and explain in function doc.
Have (MARKER . ADJUSTMENT) undo records always be immediately
after their corresponding (TEXT . POS) record in undo list.
(Bug#16818)
* lisp.h (record-delete): New arg record_markers.
(record_marker_adjustment): No longer needed outside undo.c.
* insdel.c (adjust_markers_for_delete): Move calculation of marker
adjustments to undo.c's record_marker_adjustments. Note that
fileio.c's decide_coding_unwind is another caller to
adjust_markers_for_delete. Because it has undo list bound to t,
it does not rely on adjust_markers_for_delete to record marker
adjustments.
(del_range_2): Swap call to record_delete and
adjust_markers_for_delete so as undo marker adjustments are
recorded before current deletion's adjustments, as before.
(adjust_after_replace):
(replace_range): Pass value for new record_markers arg to
delete_record.
* undo.c (record_marker_adjustment): Renamed to
record_marker_adjustments and made static.
(record_delete): Check record_markers arg and call
record_marker_adjustments.
(record_change): Pass value for new record_markers arg to
delete_record.
(record_point): at_boundary calculation no longer needs to account
for marker adjustments.
* undo-tests.el (undo-test-marker-adjustment-nominal):
(undo-test-region-t-marker): New tests of marker adjustments.
(undo-test-marker-adjustment-moved):
(undo-test-region-mark-adjustment): New tests to demonstrate
bug#16818, which fail without the fix.
* markers.texi (Moving Marker Positions): The 2014-03-02 doc
change mentioning undo's inability to handle relocated markers no
longer applies. See bug#16818.
* text.texi (Undo): Expand documentation of (TEXT . POS) and
(MARKER . ADJUSTMENT) undo elements.
Dmitry Gutov [Mon, 24 Mar 2014 22:38:06 +0000 (00:38 +0200)]
Fix bug#16762
* lisp/emacs-lisp/package.el (package--add-to-archive-contents):
Include already installed and built-in packages in
`package-archive-contents'.
(package-install): Don't include already installed packages in the
options on interactive invocation.
Dmitry Gutov [Mon, 24 Mar 2014 08:53:56 +0000 (10:53 +0200)]
Match special globals in Ruby better
* lisp/progmodes/ruby-mode.el (ruby-expression-expansion-re):
Match special global variables without curlies, too.
(ruby-font-lock-keywords): Simplify the matcher for special global
variables. Don't require a non-word character after the variable.
Gnus developers [Sun, 23 Mar 2014 23:14:52 +0000 (23:14 +0000)]
Merge from Gnus git master
2014-02-04 Lars Ingebrigtsen <larsi@gnus.org>
* calendar/parse-time.el (parse-time-iso8601-regexp)
(parse-iso8601-time-string): Copied from `url-dav' so that we can use
it more generally.
2014-02-01 Lars Ingebrigtsen <larsi@gnus.org>
* net/dns.el (network-interface-list): Define for XEmacs.
2014-01-31 Magnus Henoch <magnus.henoch@gmail.com>
* net/dns.el (dns-servers-up-to-date-p): New function to see whether
the network interfaces changed.
(dns-query): Use it to flush the data.
Gnus developers [Sun, 23 Mar 2014 23:13:36 +0000 (23:13 +0000)]
Merge from Gnus git master
2014-03-14 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-sum.el (gnus-summary-toggle-header): Display header attachment
buttons when toggling the header off.
2014-03-07 Daiki Ueno <ueno@gnu.org>
* mml2015.el (mml2015-use): Don't check the availability of GnuPG
commands here; instead, only check if epg-config.el is available.
2014-03-06 Lars Ingebrigtsen <larsi@gnus.org>
* mml.el (mml-expand-html-into-multipart-related): Allow sending HTML
messages with embedded images.
(mml-generate-mime): Don't bug out if you don't have libxml.
2014-03-06 Lars Ingebrigtsen <larsi@gnus.org>
* message.el (message-make-html-message-with-image-files): New command.
2014-03-05 Lars Ingebrigtsen <larsi@gnus.org>
* mml.el (mml-insert-mime-headers): Allow `recipient-filename'.
2014-02-23 David Engster <deng@randomsample.de>
* auth-source.el (auth-source-netrc-saver): Do not depend on `cl-lib'
to stay compatible with older Emacsen, so replace `cl-loop' with
`loop'.
2014-02-17 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-article-prepare, gnus-article-prepare-display):
Display header attachment buttons by gnus-article-prepare-display
rather than gnus-article-prepare so as to view in mml-preview as well.
2014-02-10 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-article-goto-part): Find a button in the body first.
(gnus-mime-buttonize-attachments-in-header): Number hidden buttons.
2014-02-07 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-mime-buttonize-attachments-in-header): Display
buttons that are hidden in unselected alternative part as well.
(gnus-mime-display-alternative): Redraw attachment buttons in header.
* gmm-utils.el (gmm-labels): Add edebug spec.
2014-02-07 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-srvr.el (gnus-server-toggle-cloud-server): New command and
keystroke.
(gnus-server-toggle-cloud-server): Only allow clouding applicable
types.
2014-02-05 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus.el (gnus-copy-overlay, gnus-overlays-at): New functions.
* gnus-art.el (gnus-mime-display-attachment-buttons-in-header):
New user option.
(gnus-mime-buttonize-attachments-in-header): New function.
(gnus-article-prepare): Use it.
(gnus-mime-inline-part): Suppress extra newline.
(gnus-mm-display-part): Save excursion;
remove useless deleting and adding of buttons.
(gnus-insert-mime-button): Allow insertion in the middle of a line.
* gnus-sum.el (gnus-summary-wash-mime-map, gnus-summary-article-menu):
Add gnus-mime-buttonize-attachments-in-header.
2014-02-05 Lars Ingebrigtsen <larsi@gnus.org>
* nnimap.el (nnimap-request-articles): New command to download several
articles at once.
* gnus.el (gnus-variable-list): Save Cloud variables.
2014-02-01 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-cloud.el: New file to provide the Emacs Cloud.
* gravatar.el (gravatar-retrieve-synchronously): XEmacs also has
`url-retrieve-synchronously', apparently.
* gnus-notifications.el (gravatar-retrieve-synchronously): Declare for
XEmacs.
* nnrss.el (libxml-parse-html-region): Silence compilation error.
2014-02-01 Daniel Dehennin <daniel.dehennin@baby-gnu.org>
* gnus-mlspl.el (gnus-group-split-fancy): Use `gnus-parameters' in
`gnus-group-split-fancy'.
2014-02-01 Lars Ingebrigtsen <larsi@gnus.org>
* message.el (message-remove-header): Doc fix.
(message-forward-included-headers): New variable.
(message-remove-ignored-headers): Use it.
2014-01-31 Dave Abrahams <dave@boostpro.com>
* gnus-sum.el (gnus-summary-open-group-with-article): New command.
2013-09-04 Rasmus Pank Roulund <emacs@pank.eu>
* gnus-fun.el (gnus-x-face-omit-files): Regexp to omit matched results
from random face commands.
(gnus-face-directory): Like `gnus-x-face-directory` for png files and
Face.
(gnus-face-omit-files): Like `gnus-x-face-omit-files` for Face.
(gnus--random-face-with-type): Generic function returning a face-type
as a string.
(gnus--insert-random-face-with-type): Generic function inserting a face
in a message buffer header.
(gnus-random-x-face): Rewritten to use `gnus--random-face-with-type`.
(gnus-insert-random-x-face-header): Rewritten to use
`gnus--insert-random-face-with-type`.
(gnus-random-face): Return random (png) Face as string.
(nus-insert-random-face-header): Insert random (png) Face in a message
buffer.
2014-01-31 Lars Ingebrigtsen <larsi@gnus.org>
* mm-url.el: Remove all usage of w3.
* nnrss.el: Ditto.
* mm-decode.el: Ditto.
* mm-view.el: Ditto.
* gnus-setup.el: Remove outdated file.
Stefan Monnier [Sun, 23 Mar 2014 22:30:47 +0000 (18:30 -0400)]
* lisp/simple.el (redisplay-highlight-region-function): Increase priority of
overlay to make sure boundaries are visible.
* src/buffer.c (struct sortvec): Add field `spriority'.
(compare_overlays): Use it.
(sort_overlays): Set it.
Eli Zaretskii [Sun, 23 Mar 2014 15:57:25 +0000 (17:57 +0200)]
Fix bug #17047 with cursor motion when invisible text starts a line.
src/xdisp.c (redisplay_window): If all previous attempts to find the
cursor row failed, try a few alternatives before falling back to
the top-most row of the window. Use row_containing_pos.